https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97575
Bug ID: 97575
Summary: [11 Regression] ICE in
try_make_edge_direct_simple_call, at ipa-prop.c:3671
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: asolokha at gmx dot com
CC: marxin at gcc dot gnu.org
Target Milestone: ---
g++-11.0.0-alpha20201025 snapshot (g:308e40331f9d2820f8286769b5fc764671187364)
ICEs when compiling the following testcase w/ -Os -fopenacc:
template <typename>
struct db;
template <typename WM>
struct db<WM *>
{
typedef WM &k3;
};
template <typename XT>
struct zg
{
typename db<XT>::k3
operator* ();
};
int
fq (int);
template <typename TT, typename HA>
void
ri (TT k2, HA t0)
{
*k2 = t0 (0);
}
void
ai (zg<int *> pb)
{
ri (pb, fq);
}
% g++-11.0.0 -Os -fopenacc -c w6shyynz.cc
during IPA pass: inline
w6shyynz.cc:31:1: internal compiler error: in try_make_edge_direct_simple_call,
at ipa-prop.c:3671
31 | }
| ^
0x73eaf7 try_make_edge_direct_simple_call
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/ipa-prop.c:3671
0x73eaf7 update_indirect_edges_after_inlining
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/ipa-prop.c:3880
0x73eaf7 propagate_info_to_inlined_callees
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/ipa-prop.c:3974
0xe32fe3 ipa_propagate_indirect_call_infos(cgraph_edge*, vec<cgraph_edge*,
va_heap, vl_ptr>*)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/ipa-prop.c:4136
0xe0ae2c inline_call(cgraph_edge*, bool, vec<cgraph_edge*, va_heap, vl_ptr>*,
int*, bool, bool*)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/ipa-inline-transform.c:502
0x1a3d272 inline_small_functions
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/ipa-inline.c:2242
0x1a3d272 ipa_inline
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/ipa-inline.c:2723
0x1a3d272 execute
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/ipa-inline.c:3122