public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cnsun at uwaterloo dot ca" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/100529] New: ICE at -O3: in force_constant_size, at gimplify.c:733
Date: Tue, 11 May 2021 15:46:03 +0000	[thread overview]
Message-ID: <bug-100529-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100529

            Bug ID: 100529
           Summary: ICE at -O3: in force_constant_size, at gimplify.c:733
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: cnsun at uwaterloo dot ca
  Target Milestone: ---

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /tmp/tmp.FUbEknNORK-gcc-builder/gcc/configure
--enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch
--prefix=/scratch/software/gcc-trunk --disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210511 (experimental) [master revision
:7db32cac8:aa891c56f25baac94db004e309d1b6e40b770a95] (GCC)

$ cat mutant.c
bar(n) { return foo(n, 2.0); }
foo(
    int n, struct { char a[n]; }) {}

$ gcc-trunk -O3 mutant.c
mutant.c:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
    1 | bar(n) { return foo(n, 2.0); }
      | ^~~
mutant.c: In function ‘bar’:
mutant.c:1:1: warning: type of ‘n’ defaults to ‘int’ [-Wimplicit-int]
mutant.c:1:17: warning: implicit declaration of function ‘foo’
[-Wimplicit-function-declaration]
    1 | bar(n) { return foo(n, 2.0); }
      |                 ^~~
mutant.c: At top level:
mutant.c:3:12: warning: anonymous struct declared inside parameter list will
not be visible outside of this definition or declaration
    3 |     int n, struct { char a[n]; }) {}
      |            ^~~~~~
mutant.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
    2 | foo(
      | ^~~
In function ‘foo.constprop’:
cc1: internal compiler error: in force_constant_size, at gimplify.c:733
0x6d5542 force_constant_size
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify.c:733
0xc21537 gimple_add_tmp_var(tree_node*)
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify.c:771
0xbea82b create_tmp_var(tree_node*, char const*)
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-expr.c:485
0xc2b230 create_tmp_from_val
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify.c:564
0xc2b230 lookup_tmp_var
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify.c:596
0xc2b230 internal_get_tmp_var
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify.c:635
0xc24bb7 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify.c:15072
0xc49b43 gimple_regimplify_operands(gimple*, gimple_stmt_iterator*)
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify-me.c:235
0xf7689a insert_init_stmt
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/tree-inline.c:3377
0xf88e47 tree_function_versioning(tree_node*, tree_node*, vec<ipa_replace_map*,
va_gc, vl_embed>*, ipa_param_adjustments*, bool, bitmap_head*,
basic_block_def*)
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/tree-inline.c:6418
0xa83c85 cgraph_node::materialize_clone()
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/cgraphclones.c:1131
0xa70dbd cgraph_node::get_untransformed_body()
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/cgraph.c:3921
0xa7dda9 cgraph_node::expand()
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/cgraphunit.c:1799
0xa7f26f expand_all_functions
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/cgraphunit.c:1992
0xa7f26f symbol_table::compile()
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/cgraphunit.c:2356
0xa8214b symbol_table::compile()
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/cgraphunit.c:2269
0xa8214b symbol_table::finalize_compilation_unit()
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/cgraphunit.c:2537
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

             reply	other threads:[~2021-05-11 15:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11 15:46 cnsun at uwaterloo dot ca [this message]
2021-05-11 15:51 ` [Bug c/100529] " cnsun at uwaterloo dot ca
2021-05-12  9:26 ` [Bug ipa/100529] [11/12 Regression] ICE at -O3: in force_constant_size, at gimplify.c:733 since r11-4494-ga4223abb3deb24e8 marxin at gcc dot gnu.org
2021-05-17 15:12 ` rguenth at gcc dot gnu.org
2021-06-05 15:02 ` cnsun at uwaterloo dot ca
2021-07-28  7:07 ` rguenth at gcc dot gnu.org
2022-01-17 14:55 ` [Bug c/100529] " rguenth at gcc dot gnu.org
2022-04-21  7:49 ` rguenth at gcc dot gnu.org
2023-05-29 10:04 ` [Bug c/100529] [11/12/13/14 " jakub at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-100529-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).