what version of ifc do you use? i compiled your programs with
ifc -free -o test1 test1.f
(the -free to have free form code, can't remember what the exact code formatting should be*)
-rwxr-xr-x 393065 Jun 30 13:01 test1
-rwxr-xr-x 394791 Jun 30 13:02 test2
version info:
Intel(R) Fortran Compiler for 32-bit applications, Version 8.0 Build 20031016Z Package ID: l_fc_p_8.0.034
ifc is called ifort now, so probably you have an old version. I prefer g95, a free fortran compiler.
my guess is loop unrolling, easily to find out, do the loop 2 times and see whether the file gets twice as big.
Btw, ifc deliberately creates bad code on AMD's (the i stands for Intel after all):
http://www.swallowtail.org/naughty-intel.html
Boris
*for the unititiated, it is truly horrible, something like this: you have got to start all lines with 8 spaces, or put a 'C' in the second column to make it a comment. lines can only be about 77 characters long, but you can continue on the second line when you put a '2' in the second column, i could get the first program to run but not the second without -free..