https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98744
Bug ID: 98744
Summary: [11 Regression] ICE in gimple_call_arg, at
gimple.h:3246 since r11-6735-g424deca72b63e644
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: ipa
Assignee: unassigned at gcc dot gnu.org
Reporter: marxin at gcc dot gnu.org
CC: jamborm at gcc dot gnu.org, jason at gcc dot gnu.org,
marxin at gcc dot gnu.org
Target Milestone: ---
I see the following ICE for:
$ cat elide.C
struct A {};
struct B : virtual A {};
struct C : B {
C() : B(B()) {}
};
int main() { C c; return 0; }
$ g++ elide.C -c -Wmaybe-uninitialized -fno-inline -O2 -c
during GIMPLE pass: uninit
elide.C: In constructor ‘C::C()’:
elide.C:4:3: internal compiler error: in gimple_call_arg, at gimple.h:3246
4 | C() : B(B()) {}
| ^
0x85ddd8 gimple_call_arg
/home/marxin/Programming/gcc/gcc/gimple.h:3246
0x85ddd8 gimple_call_arg
/home/marxin/Programming/gcc/gcc/gimple.h:3244
0x85ddd8 maybe_warn_pass_by_reference
/home/marxin/Programming/gcc/gcc/tree-ssa-uninit.c:515
0x85ddd8 warn_uninitialized_vars
/home/marxin/Programming/gcc/gcc/tree-ssa-uninit.c:648
0x1382507 execute
/home/marxin/Programming/gcc/gcc/tree-ssa-uninit.c:3019
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.
What happens is that:
#2 0x0000000001383cef in maybe_warn_pass_by_reference (stmt=0x7ffff7552630,
wlims=...) at /home/marxin/Programming/gcc/gcc/tree-ssa-uninit.c:531
(gdb) p debug_gimple_stmt(stmt)
B::__ct_base .isra (_1);
which is an ISRA clone, but the gimple_call_fntype function declaration has 2
arguments:
(gdb) pct(fntype)
void B::<T3e0> (struct B *, const void *)
@Martin: Is it expected or should be the decl adjusted after IPA SRA is done?