It would be better for performance if allocated memory wouldn't need to be cleared. Doing this for array temporaries can cost a lot.
Not #defining GFC_CLEAR_MEMORY in memory.c leads to failures, however: Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. Using /home/ig25/gcc-4.1/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. Running /home/ig25/gcc-4.1/gcc/testsuite/gfortran.dg/dg.exp ... WARNING: program timed out. FAIL: gfortran.dg/PR19872.f -O0 execution test WARNING: program timed out. FAIL: gfortran.dg/PR19872.f -O1 execution test WARNING: program timed out. FAIL: gfortran.dg/PR19872.f -O2 execution test WARNING: program timed out. FAIL: gfortran.dg/PR19872.f -O3 -fomit-frame-pointer execution test WARNING: program timed out. FAIL: gfortran.dg/PR19872.f -O3 -fomit-frame-pointer -funroll-loops executiontest WARNING: program timed out. FAIL: gfortran.dg/PR19872.f -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test WARNING: program timed out. FAIL: gfortran.dg/PR19872.f -O3 -g execution test WARNING: program timed out. FAIL: gfortran.dg/PR19872.f -Os execution test FAIL: gfortran.dg/backspace.f -O0 execution test FAIL: gfortran.dg/backspace.f -O1 execution test FAIL: gfortran.dg/backspace.f -O2 execution test FAIL: gfortran.dg/backspace.f -O3 -fomit-frame-pointer execution test FAIL: gfortran.dg/backspace.f -O3 -fomit-frame-pointer -funroll-loops execution test FAIL: gfortran.dg/backspace.f -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test FAIL: gfortran.dg/backspace.f -O3 -g execution test FAIL: gfortran.dg/backspace.f -Os execution test FAIL: gfortran.dg/endfile.f90 -O0 execution test FAIL: gfortran.dg/endfile.f90 -O1 execution test FAIL: gfortran.dg/endfile.f90 -O2 execution test FAIL: gfortran.dg/endfile.f90 -O3 -fomit-frame-pointer execution test FAIL: gfortran.dg/endfile.f90 -O3 -fomit-frame-pointer -funroll-loops execution test FAIL: gfortran.dg/endfile.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test FAIL: gfortran.dg/endfile.f90 -O3 -g execution test FAIL: gfortran.dg/endfile.f90 -Os execution test FAIL: gfortran.dg/eor_handling_4.f90 -O0 execution test FAIL: gfortran.dg/eor_handling_4.f90 -O1 execution test FAIL: gfortran.dg/eor_handling_4.f90 -O2 execution test FAIL: gfortran.dg/eor_handling_4.f90 -O3 -fomit-frame-pointer execution test FAIL: gfortran.dg/eor_handling_4.f90 -O3 -fomit-frame-pointer -funroll-loops execution test FAIL: gfortran.dg/eor_handling_4.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test FAIL: gfortran.dg/eor_handling_4.f90 -O3 -g execution test FAIL: gfortran.dg/eor_handling_4.f90 -Os execution test WARNING: program timed out. FAIL: gfortran.dg/inquire_5.f90 -O0 execution test WARNING: program timed out. FAIL: gfortran.dg/inquire_5.f90 -O1 execution test WARNING: program timed out. FAIL: gfortran.dg/inquire_5.f90 -O2 execution test WARNING: program timed out. FAIL: gfortran.dg/inquire_5.f90 -O3 -fomit-frame-pointer execution test WARNING: program timed out. FAIL: gfortran.dg/inquire_5.f90 -O3 -fomit-frame-pointer -funroll-loops execution test WARNING: program timed out. FAIL: gfortran.dg/inquire_5.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test WARNING: program timed out. FAIL: gfortran.dg/inquire_5.f90 -O3 -g execution test (plus maybe a few more, the testsuite hasn't finished yet), so some parts of the library seem to depend on zeroed memory. I'll try to isolate these failures and open individual PRs for them. Thomas -- Summary: #undef GFC_CLEAR_MEMORY causes testsuite failures Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: libfortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tkoenig at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21324