From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23187 invoked by alias); 12 Feb 2009 09:19:32 -0000 Received: (qmail 23132 invoked by uid 48); 12 Feb 2009 09:19:21 -0000 Date: Thu, 12 Feb 2009 09:19:00 -0000 Message-ID: <20090212091921.23131.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/36703] ICE (segfault) in reduce_binary0 (arith.c:1778) In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pault at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-02/txt/msg01056.txt.bz2 ------- 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 (*) (character(kind=1)[0:][1:.x] * &, integer(kind=4), st ruct array01_integer(kind=4) &) x, void (*) (void) (*) (void) y, inte ger(kind=4) _x) { void (*) (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