http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52010
Dominique d'Humieres <dominiq at lps dot ens.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2012-01-28 Ever Confirmed|0 |1 --- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-01-28 17:40:51 UTC --- The error is gone with the patch in comment #3. Note that playing with the code, the following two avatars give an ICE after error: [macbook] f90/bug% diff -up pr52010.f90 pr52010_db_1.f90 --- pr52010.f90 2012-01-26 17:36:45.000000000 +0100 +++ pr52010_db_1.f90 2012-01-26 17:40:47.000000000 +0100 @@ -16,7 +16,7 @@ subroutine subrt( x ) class(t1), intent(in) :: x - type(t1) :: local + class(t1) :: local local = x [macbook] f90/bug% gfc pr52010_db_1.f90 pr52010_db_1.f90:19.19: class(t1) :: local 1 Error: CLASS variable 'local' at (1) must be dummy, allocatable or pointer f951: internal compiler error: Segmentation fault [macbook] f90/bug% diff -up pr52010.f90 pr52010_db_2.f90 --- pr52010.f90 2012-01-26 17:36:45.000000000 +0100 +++ pr52010_db_2.f90 2012-01-26 17:41:50.000000000 +0100 @@ -6,7 +6,7 @@ program test integer :: a end type - type(t1) :: x + class(t1) :: x call subrt( x ) [macbook] f90/bug% gfc pr52010_db_2.f90 pr52010_db_2.f90:9.15: class(t1) :: x 1 Error: CLASS variable 'x' at (1) must be dummy, allocatable or pointer f951: internal compiler error: Segmentation fault The backtrace for the first case is #0 gfc_find_typebound_intrinsic_op (derived=0x0, t=0x7fff5fbfd304, op=INTRINSIC_ASSIGN, noaccess=false, where=0x0) at ../../work/gcc/fortran/class.c:946 #1 0x0000000100037746 in matching_typebound_op (tb_base=0x7fff5fbfd368, args=0x141e07910, op=INTRINSIC_ASSIGN, uop=0x0, gname=0x7fff5fbfd360) at ../../work/gcc/fortran/interface.c:3199 #2 0x00000001000381db in gfc_extend_assign (c=0x141e16a30, ns=0x0) at ../../work/gcc/fortran/interface.c:3478 #3 0x000000010008c76f in resolve_code (code=<value optimized out>, ns=<value optimized out>) at ../../work/gcc/fortran/resolve.c:9068 #4 0x000000010008f014 in resolve_codes (ns=<value optimized out>) at ../../work/gcc/fortran/resolve.c:13945 #5 0x000000010008ef18 in resolve_codes (ns=<value optimized out>) at ../../work/gcc/fortran/resolve.c:13931 #6 0x000000010007ee38 in gfc_resolve (ns=<value optimized out>) at ../../work/gcc/fortran/resolve.c:13972 #7 0x000000010007477b in gfc_parse_file () at ../../work/gcc/fortran/parse.c:4387 #8 0x00000001000b3486 in gfc_be_parse_file () at ../../work/gcc/fortran/f95-lang.c:250 #9 0x00000001007b8051 in toplev_main (argc=2, argv=0x7fff5fbfd7a0) at ../../work/gcc/toplev.c:557 #10 0x00000001000016c4 in start () and for the second case it is #0 gfc_compare_derived_types (derived1=0x141e13d70, derived2=0x0) at ../../work/gcc/fortran/interface.c:402 #1 0x00000001000a6327 in gfc_type_is_extension_of (t1=0x141e13d70, t2=0x0) at ../../work/gcc/fortran/symbol.c:4823 #2 0x00000001000333cb in gfc_compare_types (ts1=0x141e146c0, ts2=0x141e14328) at ../../work/gcc/fortran/interface.c:495 #3 0x00000001000347aa in compare_parameter (formal=0x141e146a0, actual=0x141e14320, ranks_must_agree=0, is_elemental=<value optimized out>, where=0x141e13878) at ../../work/gcc/fortran/interface.c:1697 #4 0x0000000100035a34 in compare_actual_formal (ap=0x141e138e0, formal=0x141e05f40, ranks_must_agree=0, is_elemental=0, where=0x141e13878) at ../../work/gcc/fortran/interface.c:2270 #5 0x0000000100037337 in gfc_procedure_use (sym=0x141e13fc0, ap=0x141e138e0, where=<value optimized out>) at ../../work/gcc/fortran/interface.c:2961 #6 0x0000000100087d59 in resolve_call (c=<value optimized out>) at ../../work/gcc/fortran/resolve.c:3614 #7 0x000000010008c7ce in resolve_code (code=<value optimized out>, ns=<value optimized out>) at ../../work/gcc/fortran/resolve.c:9480 #8 0x000000010008f014 in resolve_codes (ns=<value optimized out>) at ../../work/gcc/fortran/resolve.c:13945 #9 0x000000010007ee38 in gfc_resolve (ns=<value optimized out>) at ../../work/gcc/fortran/resolve.c:13972 #10 0x000000010007477b in gfc_parse_file () at ../../work/gcc/fortran/parse.c:4387 #11 0x00000001000b3486 in gfc_be_parse_file () at ../../work/gcc/fortran/f95-lang.c:250 #12 0x00000001007b8051 in toplev_main (argc=2, argv=0x7fff5fbfd7a0) at ../../work/gcc/toplev.c:557 #13 0x00000001000016c4 in start () Should I open new PR(s) for them?