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/100898] New: ICE with -O2: in gimple_call_arg_ptr, at gimple.h:3264
Date: Fri, 04 Jun 2021 03:34:49 +0000	[thread overview]
Message-ID: <bug-100898-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 100898
           Summary: ICE with -O2: in gimple_call_arg_ptr, at gimple.h:3264
           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.6GNjkccaVE-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 20210603 (experimental) [master revision
:fe23f36c0:9663c744e2d0942f14eafa725a1bd9f766f02a16] (GCC)

$ cat mutant.c
a;
fn1() {
  for (; a;)
    return bar(__builtin_va_arg_pack());
}
main() { fn1(); }

$ gcc-trunk -O2 mutant.c
mutant.c:1:1: warning: data definition has no type or storage class
    1 | a;
      | ^
mutant.c:1:1: warning: type defaults to ‘int’ in declaration of ‘a’
[-Wimplicit-int]
mutant.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
    2 | fn1() {
      | ^~~
mutant.c: In function ‘fn1’:
mutant.c:4:12: warning: implicit declaration of function ‘bar’
[-Wimplicit-function-declaration]
    4 |     return bar(__builtin_va_arg_pack());
      |            ^~~
mutant.c: At top level:
mutant.c:6:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
    6 | main() { fn1(); }
      | ^~~~
during IPA pass: inline
In function ‘fn1’:
cc1: internal compiler error: in gimple_call_arg_ptr, at gimple.h:3264
0x758b10 gimple_call_arg_ptr
        /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/gimple.h:3264
0x758b10 gimple_call_arg_ptr
        /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/gimple.h:3262
0x758b10 copy_bb
        /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/tree-inline.c:2085
0xf93522 copy_cfg_body
        /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/tree-inline.c:3022
0xf93522 copy_body
        /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/tree-inline.c:3278
0xf96a56 expand_call_inline
        /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/tree-inline.c:5105
0xf98109 gimple_expand_calls_inline
        /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/tree-inline.c:5300
0xf98109 optimize_inline_calls(tree_node*)
        /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/tree-inline.c:5473
0xcbf76b inline_transform(cgraph_node*)
        /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/ipa-inline-transform.c:790
0xe19e04 execute_one_ipa_transform_pass
        /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/passes.c:2290
0xe19e04 execute_all_ipa_transforms(bool)
        /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/passes.c:2337
0xa874a9 cgraph_node::expand()
        /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/cgraphunit.c:1821
0xa888cf expand_all_functions
        /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/cgraphunit.c:1992
0xa888cf symbol_table::compile()
        /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/cgraphunit.c:2356
0xa8b7cb symbol_table::compile()
        /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/cgraphunit.c:2269
0xa8b7cb symbol_table::finalize_compilation_unit()
        /tmp/tmp.6GNjkccaVE-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-06-04  3:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-04  3:34 cnsun at uwaterloo dot ca [this message]
2021-06-04 13:30 ` [Bug middle-end/100898] [9/10/11/12 Regression] " jakub at gcc dot gnu.org
2021-06-04 13:57 ` jakub at gcc dot gnu.org
2021-06-07  7:26 ` cvs-commit at gcc dot gnu.org
2021-06-07  7:37 ` [Bug middle-end/100898] [9/10/11 " jakub at gcc dot gnu.org
2021-06-07  9:07 ` rguenth at gcc dot gnu.org
2021-06-17  5:59 ` cvs-commit at gcc dot gnu.org
2021-06-17  7:59 ` [Bug middle-end/100898] [9/10 " jakub at gcc dot gnu.org
2022-05-10  8:18 ` cvs-commit at gcc dot gnu.org
2022-05-11  6:20 ` cvs-commit at gcc dot gnu.org
2022-05-11  6:34 ` 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-100898-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).