http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51972
Bug #: 51972 Summary: [OOP] ALLOCATE misses memset/calloc, causing segfault Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: bur...@gcc.gnu.org Created attachment 26435 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26435 Test case The test case is a reduced version of chapter07/strategy_surrogate_f2003, available from http://www.cambridge.org/rouson under "Resources available". When compiling and running the program, one might get: Program received signal SIGABRT: Process abort signal. Backtrace for this error: #6 0x400AC5 in __lorenz_module_MOD___copy_lorenz_module_Lorenz at test.F90:42 #7 0x401392 in __runge_kutta_2nd_module_MOD_integrate at test.F90:73 #8 0x40153F in MAIN__ at test.F90:84 And with valgrind: Conditional jump or move depends on uninitialised value(s) at 0x400AD8: __lorenz_module_MOD___copy_lorenz_module_Lorenz (test.F90:42) by 0x4013B2: __runge_kutta_2nd_module_MOD_integrate (test.F90:73) The issue is that there is MEMSET or CALLOC missing in "integrate". There is a call to memset in "constructor" and "assign_lorenz".