From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14173 invoked by alias); 8 May 2011 14:14:52 -0000 Received: (qmail 14160 invoked by uid 22791); 8 May 2011 14:14:51 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_GL,TW_XN X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 08 May 2011 14:14:37 +0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/48889] [4.6/4.7 Regression] f951: internal compiler error: in gfc_is_constant_expr, at fortran/expr.c:906 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status Known to work Keywords Last reconfirmed CC Ever Confirmed Summary Known to fail Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Sun, 08 May 2011 14:14:00 -0000 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: 2011-05/txt/msg00658.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48889 Tobias Burnus 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 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.