https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80374
Bug ID: 80374 Summary: [7 Regression] ICE in fold_convert_loc, at fold-const.c:2384 Product: gcc Version: 7.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: law at gcc dot gnu.org Target Milestone: --- Starting from r246187, we ICE on: $ cat ice.ii void a (const char *, const char *, int, const char *) __attribute__ ((__noreturn__)); template <typename b, int> void c () try { throw; } catch (b d) { if (d) a ("", "", 2, __PRETTY_FUNCTION__); } main () { using e = decltype (nullptr); c<volatile e, true> (); } $ g++ -O ice.ii -std=c++14 ice.ii: In function ‘void c() [with b = std::nullptr_t; int <anonymous> = 1]’: ice.ii:5:1: internal compiler error: in fold_convert_loc, at fold-const.c:2384 c () try ^ 0xc7540c fold_convert_loc(unsigned int, tree_node*, tree_node*) ../../gcc/fold-const.c:2384 0x10ebd42 derive_equivalences_from_bit_ior ../../gcc/tree-ssa-dom.c:709 0x10ebf18 record_temporary_equivalences(edge_def*, const_and_copies*, avail_exprs_stack*) ../../gcc/tree-ssa-dom.c:763 0x10ec533 record_equivalences_from_incoming_edge ../../gcc/tree-ssa-dom.c:946 0x10ecd89 dom_opt_dom_walker::before_dom_children(basic_block_def*) ../../gcc/tree-ssa-dom.c:1167 0x16c69c2 dom_walker::walk(basic_block_def*) ../../gcc/domwalk.c:265 0x10eb476 execute ../../gcc/tree-ssa-dom.c:459