------- Comment #10 from paul dot richard dot thomas at cea dot fr 2006-06-06 06:47 ------- Noting the non-fortran tilt on this, it is interesting that
implicit COMPLEX (a-z) CALL foo CONTAINS SUBROUTINE foo t = s + s END SUBROUTINE foo END is OK and produces declarations for s and t in foo. Alternatively, declaring s and t in foo also works. However, COMPLEX s, t CALL foo CONTAINS SUBROUTINE foo t = s + s END SUBROUTINE foo END puts the declarations in MAIN__, thusly: foo () { t = s + s; MAIN__ () { complex4 s; complex4 t; static void foo (void); _gfortran_set_std (70, 127, 0); foo (); } and triggers the ICE for any optimization level. In fortran parlance, it is host or use association of the complex type that is broken. Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27889