https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78272
Bug ID: 78272
Summary: [7 Regression] ICE in unshare_expr_without_location
while building 471.omnetpp
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: ktkachov at gcc dot gnu.org
Target Milestone: ---
I'm seeing a segfault in ipa-prop.c when building SPEC2006, omnetpp in
particular.
The reduced testcase is:
class A
{
public:
A ();
};
int a;
int
fn1 (double, int)
{
new A;
}
int
fn2 (int rng)
{
if (a)
return fn1 (2.0, rng);
}
int
fn3 (double rng)
{
fn2 (rng);
}
Compiling with -Ofast on aarch64-none-linux-gnu gives the ICE:
distrib.cpp:24:1: internal compiler error: Segmentation fault
}
^
0xd4aabf crash_signal
$SRC/gcc/toplev.c:338
0xad6f24 unshare_expr_without_location(tree_node*)
$SRC/gcc/gimplify.c:978
0xb8057a ipa_set_jf_arith_pass_through
$SRC/gcc/ipa-prop.c:468
0xb8057a update_jump_functions_after_inlining
$SRC/gcc/ipa-prop.c:2645
0xb8618d propagate_info_to_inlined_callees
$SRC/gcc/ipa-prop.c:3407
0xb86f8f ipa_propagate_indirect_call_infos(cgraph_edge*, vec<cgraph_edge*,
va_heap, vl_ptr>*)
$SRC/gcc/ipa-prop.c:3561
0x132ff94 inline_call(cgraph_edge*, bool, vec<cgraph_edge*, va_heap, vl_ptr>*,
int*, bool, bool*)
$SRC/gcc/ipa-inline-transform.c:447
0x13285a6 inline_small_functions
$SRC/gcc/ipa-inline.c:2029
0x13285a6 ipa_inline
$SRC/gcc/ipa-inline.c:2439
0x13285a6 execute
$SRC/gcc/ipa-inline.c:2850
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.