From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11590 invoked by alias); 7 Jan 2014 15:08:38 -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 Received: (qmail 11560 invoked by uid 48); 7 Jan 2014 15:08:35 -0000 From: "fweimer at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/59711] New: ICE in force_constant_size, at gimplify.c:619 (nested function and variably-modified type) Date: Tue, 07 Jan 2014 15:08:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fweimer at redhat dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-01/txt/msg00666.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59711 Bug ID: 59711 Summary: ICE in force_constant_size, at gimplify.c:619 (nested function and variably-modified type) Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: fweimer at redhat dot com Created attachment 31764 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31764&action=edit u.c The attached test case ICEs on x86_64-redhat-linux-gnu with the following backtrace: #2 0x00000000007f5875 in force_constant_size (var=0x7ffff032a8e8) at ../../trunk/gcc/gimplify.c:619 #3 gimple_add_tmp_var (tmp=0x7ffff032a8e8) at ../../trunk/gcc/gimplify.c:638 #4 0x00000000007d58fb in create_tmp_var (type=type@entry=0x7ffff0328000, prefix=) at ../../trunk/gcc/gimple-expr.c:509 #5 0x00000000007f5b15 in create_tmp_from_val (is_formal=true, val=0x7ffff0324990) at ../../trunk/gcc/gimplify.c:457 #6 lookup_tmp_var (is_formal=true, val=0x7ffff0324990) at ../../trunk/gcc/gimplify.c:479 #7 internal_get_tmp_var (val=0x7ffff0324990, pre_p=0x7fffffffd968, post_p=, is_formal=) at ../../trunk/gcc/gimplify.c:523 #8 0x00000000007f627e in gimplify_expr (expr_p=expr_p@entry=0x7ffff03249d8, pre_p=pre_p@entry=0x7fffffffd968, post_p=post_p@entry=0x7fffffffd518, gimple_test_f=, fallback=fallback@entry=3) at ../../trunk/gcc/gimplify.c:8322 #9 0x00000000007fdea2 in gimplify_compound_lval (expr_p=expr_p@entry=0x7ffff0305ac0, pre_p=pre_p@entry=0x7fffffffd968, post_p=post_p@entry=0x7fffffffd518, fallback=fallback@entry=1) at ../../trunk/gcc/gimplify.c:1976 #10 0x00000000007f73cd in gimplify_expr (expr_p=expr_p@entry=0x7ffff0305ac0, pre_p=pre_p@entry=0x7fffffffd968, post_p=post_p@entry=0x7fffffffd518, gimple_test_f=, fallback=fallback@entry=1) at ../../trunk/gcc/gimplify.c:7383 #11 0x00000000008029bb in gimplify_modify_expr (expr_p=expr_p@entry=0x7fffffffd6b0, pre_p=pre_p@entry=0x7fffffffd968, post_p=post_p@entry=0x7fffffffd518, want_value=) at ../../trunk/gcc/gimplify.c:4493 #12 0x00000000007f771a in gimplify_expr (expr_p=0x7fffffffd6b0, pre_p=pre_p@entry=0x7fffffffd968, post_p=0x7fffffffd518, post_p@entry=0x0, gimple_test_f=gimple_test_f@entry=0x7efef0 , fallback=fallback@entry=0) at ../../trunk/gcc/gimplify.c:7431 #13 0x00000000007fb0f7 in gimplify_stmt (stmt_p=stmt_p@entry=0x7fffffffd6b0, seq_p=seq_p@entry=0x7fffffffd968) at ../../trunk/gcc/gimplify.c:5334 #14 0x00000000007f970c in gimplify_and_add (seq_p=0x7fffffffd968, t=0x7ffff0305aa0) at ../../trunk/gcc/gimplify.c:384 #15 gimplify_return_expr (pre_p=0x7fffffffd968, stmt=0x7ffff0314a60) at ../../trunk/gcc/gimplify.c:1234 #16 gimplify_expr (expr_p=0x7ffff0312bc8, pre_p=pre_p@entry=0x7fffffffd968, post_p=0x7fffffffd698, post_p@entry=0x0, gimple_test_f=gimple_test_f@entry=0x7efef0 , fallback=fallback@entry=0) at ../../trunk/gcc/gimplify.c:7671 #17 0x00000000007fb0f7 in gimplify_stmt (stmt_p=, seq_p=seq_p@entry=0x7fffffffd968) at ../../trunk/gcc/gimplify.c:5334 #18 0x00000000007f7ee4 in gimplify_statement_list (pre_p=0x7fffffffd968, expr_p=0x7ffff0324a10) at ../../trunk/gcc/gimplify.c:1405 #19 gimplify_expr (expr_p=0x7ffff0324a10, pre_p=pre_p@entry=0x7fffffffd968, post_p=0x7fffffffd818, post_p@entry=0x0, gimple_test_f=gimple_test_f@entry=0x7efef0 , fallback=fallback@entry=0) at ../../trunk/gcc/gimplify.c:7839 #20 0x00000000007fb0f7 in gimplify_stmt (stmt_p=stmt_p@entry=0x7ffff0324a10, seq_p=seq_p@entry=0x7fffffffd968) at ../../trunk/gcc/gimplify.c:5334 #21 0x00000000007fc01e in gimplify_bind_expr (expr_p=expr_p@entry=0x7ffff030a698, pre_p=pre_p@entry=0x7fffffffdb58) at ../../trunk/gcc/gimplify.c:1072 #22 0x00000000007f7856 in gimplify_expr (expr_p=0x7ffff030a698, pre_p=pre_p@entry=0x7fffffffdb58, post_p=0x7fffffffda28, post_p@entry=0x0, gimple_test_f=gimple_test_f@entry=0x7efef0 , fallback=fallback@entry=0) at ../../trunk/gcc/gimplify.c:7621 #23 0x00000000007fb0f7 in gimplify_stmt (stmt_p=stmt_p@entry=0x7ffff030a698, seq_p=seq_p@entry=0x7fffffffdb58) at ../../trunk/gcc/gimplify.c:5334 #24 0x00000000007fc9d0 in gimplify_body (fndecl=fndecl@entry=0x7ffff030a600, do_parms=do_parms@entry=true) at ../../trunk/gcc/gimplify.c:8531 #25 0x00000000007fd017 in gimplify_function_tree (fndecl=fndecl@entry=0x7ffff030a600) at ../../trunk/gcc/gimplify.c:8684 #26 0x000000000068d638 in analyze_function (node=node@entry=0x7ffff032b000) at ../../trunk/gcc/cgraphunit.c:649 #27 0x000000000068e9f5 in analyze_functions () at ../../trunk/gcc/cgraphunit.c:1017 #28 0x0000000000690036 in finalize_compilation_unit () at ../../trunk/gcc/cgraphunit.c:2310 #29 0x0000000000552704 in c_write_global_declarations () at ../../trunk/gcc/c/c-decl.c:10400 #30 0x00000000009a661d in compile_file () at ../../trunk/gcc/toplev.c:561 #31 0x00000000009a84b2 in do_compile () at ../../trunk/gcc/toplev.c:1887 #32 toplev_main (argc=21, argv=0x7fffffffde48) at ../../trunk/gcc/toplev.c:1963 #33 0x00007ffff6933b45 in __libc_start_main (main=0x535ca0 , argc=21, ubp_av=0x7fffffffde48, init=, fini=, rtld_fini=, stack_end=0x7fffffffde38) at libc-start.c:274 #34 0x0000000000535ce5 in _start () The crash happens at: 617 max_size = max_int_size_in_bytes (TREE_TYPE (var)); 618 619 gcc_assert (max_size >= 0); var looks like this: used unsigned ignored TI file /tmp/u.c line 3 col 10 size unit size align 128 context chain > unit size used unsigned ignored DI file /tmp/u.c line 3 col 10 size unit size align 64 context chain > align 32 symtab 0 alias set -1 canonical type 0x7ffff0328000 fields decl_0 BLK file /tmp/u.c line 4 col 9 size unit size align 32 offset_align 128 offset bit offset context > context chain > used ignored BLK file /tmp/u.c line 13 col 12 size unit size align 32>