------- Comment #2 from pault at gcc dot gnu dot org 2009-02-12 09:19 ------- (In reply to comment #1)
Interestingly, if the WRITE statement is cut, the compilation now fails with: pr36703.f90: In function 'gp': pr36703.f90:46: internal compiler error: in expand_expr_real_1, at expr.c:7282 This corresponds to the line: __result_gp = get_funloc (make_mess, aux, ..__result); and the declaration of get_funloc is: get_funloc (void (*<T193>) (character(kind=1)[0:][1:.x] * &, integer(kind=4), st ruct array01_integer(kind=4) &) x, void (*<T5b>) (void) (*<T181>) (void) y, inte ger(kind=4) _x) { void (*<T5b>) (void) __result_get_funloc; __result_get_funloc = y (x); return __result_get_funloc; } which looks OK. The ICE is generated by - context = decl_function_context (exp); gcc_assert (!context || context = current_function_decl || TREE_STATIC (exp) /* ??? C++ creates functions that are not TREE_STATIC. */ || TREE_CODE (exp) == FUNC_DECL); I have not checked yet but I would guess that it is the latter that is the problem. Paul -- pault at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pault at gcc dot gnu dot org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2009-02-12 09:19:21 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36703