http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54940
Dominique d'Humieres <dominiq at lps dot ens.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2012-10-16 CC| |burnus at gcc dot gnu.org Summary|ICE in |[4.6/4.7/4.8 Regression] |gfc_build_intrinsic_call, |ICE in |at fortran/expr.c:4609 |gfc_build_intrinsic_call, | |at fortran/expr.c:4609 Ever Confirmed|0 |1 --- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-10-16 22:07:45 UTC --- 4.4.6, 4.5.3, and 4.6.2 (r179116) gives pr54940.f90:4.30: integer :: j(:), bug(size(j-1)) 1 Error: Variable 'j' cannot appear in the expression at (1) pr54940.f90:4.19: integer :: j(:), bug(size(j-1)) 1 Error: Array 'j' at (1) cannot have a deferred shape The ICE starts with 4.6.3. The ICE occurs at gcc_assert (result->symtree && (result->symtree->n.sym->attr.flavor == FL_PROCEDURE || result->symtree->n.sym->attr.flavor == FL_UNKNOWN)); introduced by r183314 and the backtrace is #8 0x00000001009f2336 in fancy_abort (file=<value optimized out>, line=4611, function=0x100b33690 "gfc_build_intrinsic_call") at ../../_clean/gcc/diagnostic.c:1120 #9 0x000000010003b475 in gfc_build_intrinsic_call (name=0x100ab5a50 "size", where=DWARF-2 expression error: DW_OP_GNU_uninit must always be the very last op. ) at ../../_clean/gcc/fortran/expr.c:4609 #10 0x00000001000a7927 in gfc_simplify_size (array=0x141814110, dim=<value optimized out>, kind=<value optimized out>) at ../../_clean/gcc/fortran/simplify.c:5586 #11 0x0000000100043a22 in do_simplify (specific=0x142022ff8, e=0x141813d60) at ../../_clean/gcc/fortran/intrinsic.c:3809 #12 0x0000000100050b21 in gfc_intrinsic_func_interface (expr=0x141813d60, error_flag=1) at ../../_clean/gcc/fortran/intrinsic.c:4152 #13 0x0000000100090f33 in gfc_resolve_expr (e=<value optimized out>) at ../../_clean/gcc/fortran/resolve.c:2600 #14 0x000000010000e962 in resolve_array_bound (e=0x141813d60, check_constant=0) at ../../_clean/gcc/fortran/array.c:310 #15 0x000000010000f515 in gfc_resolve_array_spec (as=0x141813ba0, check_constant=0) at ../../_clean/gcc/fortran/array.c:348 #16 0x000000010008abee in resolve_symbol (sym=<value optimized out>) at ../../_clean/gcc/fortran/resolve.c:13108 #17 0x00000001000acfec in do_traverse_symtree (st=<value optimized out>, st_func=0, sym_func=0x10008a5d0 <resolve_symbol(gfc_symbol*)>) at ../../_clean/gcc/fortran/symbol.c:3448 #18 0x0000000100096fa2 in resolve_types (ns=<value optimized out>) at ../../_clean/gcc/fortran/resolve.c:14259 #19 0x0000000100089e70 in gfc_resolve (ns=<value optimized out>) at ../../_clean/gcc/fortran/resolve.c:14359 #20 0x000000010007f241 in gfc_parse_file () at ../../_clean/gcc/fortran/parse.c:4607 #21 0x00000001000bef36 in gfc_be_parse_file () at ../../_clean/gcc/fortran/f95-lang.c:191 #22 0x0000000100710fdf in compile_file () at ../../_clean/gcc/toplev.c:546 #23 0x0000000100712e7c in toplev_main (argc=<value optimized out>, argv=<value optimized out>) at ../../_clean/gcc/toplev.c:1866 #24 0x000000010000a254 in start (pc=<value optimized out>, bases=0x0) at ../../../_clean/libgcc/unwind-dw2-fde.c:1055