------- Comment #4 from jv244 at cam dot ac dot uk 2007-10-26 07:17 ------- In order to make the testcase valid, subroutine option_stopwatch_a needs to be replaced by:
subroutine option_stopwatch_a(default_clock) character(len=*), intent(in), dimension(:) :: default_clock allocate(default_clocks(size(default_clock))) end subroutine option_stopwatch_a In that case it segfaults with gfortran and runs fine .e.g. with g95 and NAG, also the g95 run is clean within valgrind, but gives several errors with gfortran: ==16592== Conditional jump or move depends on uninitialised value(s) ==16592== at 0x4011EE: __stopwatch_MOD_create_watch_ss (test.f90:33) ==16592== by 0x401A71: MAIN__ (test.f90:59) ==16592== by 0x401AAB: main (fmain.c:21) ==16592== ==16592== Conditional jump or move depends on uninitialised value(s) ==16592== at 0x401207: __stopwatch_MOD_create_watch_ss (test.f90:33) ==16592== by 0x401A71: MAIN__ (test.f90:59) ==16592== by 0x401AAB: main (fmain.c:21) ==16592== ==16592== Conditional jump or move depends on uninitialised value(s) ==16592== at 0x4A225FA: memcpy (mc_replace_strmem.c:406) ==16592== by 0x401271: __stopwatch_MOD_create_watch_ss (test.f90:33) ==16592== by 0x401A71: MAIN__ (test.f90:59) ==16592== by 0x401AAB: main (fmain.c:21) ==16592== ==16592== Conditional jump or move depends on uninitialised value(s) ==16592== at 0x4012D5: __stopwatch_MOD_create_watch_ss (test.f90:33) ==16592== by 0x401A71: MAIN__ (test.f90:59) ==16592== by 0x401AAB: main (fmain.c:21) ==16592== ==16592== Conditional jump or move depends on uninitialised value(s) ==16592== at 0x4012EE: __stopwatch_MOD_create_watch_ss (test.f90:33) ==16592== by 0x401A71: MAIN__ (test.f90:59) ==16592== by 0x401AAB: main (fmain.c:21) ==16592== ==16592== Conditional jump or move depends on uninitialised value(s) ==16592== at 0x4A225FA: memcpy (mc_replace_strmem.c:406) ==16592== by 0x4013A0: __stopwatch_MOD_create_watch_ss (test.f90:33) ==16592== by 0x401A71: MAIN__ (test.f90:59) ==16592== by 0x401AAB: main (fmain.c:21) which look as if they could be related to the optional character arguments. -- jv244 at cam dot ac dot uk changed: What |Removed |Added ---------------------------------------------------------------------------- OtherBugsDependingO| |32834 nThis| | Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2007-10-26 07:17:07 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33881