http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48889
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Known to work| |4.3.4, 4.4.0, 4.5.3 Keywords| |ice-on-valid-code Last reconfirmed| |2011.05.08 13:59:00 CC| |burnus at gcc dot gnu.org Ever Confirmed|0 |1 Summary|f951: internal compiler |[4.6/4.7 Regression] f951: |error: in |internal compiler error: in |gfc_is_constant_expr, at |gfc_is_constant_expr, at |fortran/expr.c:906 |fortran/expr.c:906 Known to fail| |4.6.0, 4.7.0 --- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-05-08 13:59:00 UTC --- Thanks, Lowrence, for the initial report - and thanks, David, for the reduced test case. * * * Confirmed: Fails with 4.6 and 4.7, works with 4.3/4.4/4.5. (gdb) p e->ts.type $12 = BT_INTEGER (gdb) p e->expr_type $13 = EXPR_FUNCTION (gdb) p e->symtree $14 = (gfc_symtree *) 0x0 No surprise that the assert fails. Backtrace: #0 gfc_is_constant_expr (e=0x15a2a00) at expr.c:875 #1 0x00000000004f02ac in simplify_intrinsic_op (type=0, p=0x15a2930) at expr.c:1008 #2 gfc_simplify_expr (p=0x15a2930, type=0) at expr.c:1856 #3 0x000000000053909e in resolve_operator (e=0x15a2930) at resolve.c:3978 #4 gfc_resolve_expr (e=0x15a2930) at resolve.c:6093 #5 0x00000000004c9bf8 in resolve_array_bound (e=0x15a2930, check_constant=0) at array.c:305 #6 0x00000000004ca0d1 in gfc_resolve_array_spec (as=0x15a27c0, check_constant=0) at array.c:343 With: Breakpoint 1, resolve_array_bound (e=0x15a2930, check_constant=0) at array.c:301 301 { (gdb) p e->expr_type $1 = EXPR_OP (gdb) p e->value.op.op $7 = INTRINSIC_TIMES (gdb) p e->value.op.op1->expr_type $3 = EXPR_FUNCTION (gdb) p e->value.op.op1->symtree $4 = (gfc_symtree *) 0x0 (gdb) p e->value.op.op2->expr_type $8 = EXPR_VARIABLE (gdb) p e->value.op.op2->symtree->n.sym->name $9 = 0x2aaaaced6030 "ele_n" That seems to be the line: integer, dimension(size(EEList,1)*ele_n%loc), intent(in), target ::& & xndglno where SIZE is not the intrinsic function but a generic functions; if one uses the specific "sparsity_size" instead of the generic, it works.