https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65595
Bug ID: 65595 Summary: [5 Regression] Linux kernel build failure: ICE: in as_a, at is-a.h:192 Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: trippels at gcc dot gnu.org CC: hubicka at gcc dot gnu.org trippels@gcc2-power8 linux-3.18.8 % cat libcxgbi.i extern void *memcpy(void *, const void *, unsigned long); struct in6_addr { struct { int u6_addr32[4]; }; }; struct foo { struct in6_addr daddr; struct in6_addr saddr; } a; extern void ip6_route_output(struct foo, int); int b; static void find_route_ipv6(struct in6_addr *p1) { if (p1) memcpy(0, p1, sizeof(struct in6_addr)); ip6_route_output(a, b); } void cxgbi_ep_connect() { find_route_ipv6(0); } trippels@gcc2-power8 linux-3.18.8 % gcc -O2 -c libcxgbi.i libcxgbi.i: In function ‘find_route_ipv6.constprop’: libcxgbi.i:18:1: internal compiler error: in as_a, at is-a.h:192 void cxgbi_ep_connect() { find_route_ipv6(0); } ^ 0x100f16e3 as_a<gcall*, gimple_statement_base> ../../gcc/gcc/is-a.h:192 0x1030ffb7 as_a<gcall*, gimple_statement_base> ../../gcc/gcc/is-a.h:192 0x1030ffb7 cgraph_update_edges_for_call_stmt_node ../../gcc/gcc/cgraph.c:1524 0x1031045f cgraph_update_edges_for_call_stmt(gimple_statement_base*, tree_node*, gimple_statement_base*) ../../gcc/gcc/cgraph.c:1588 0x108720a3 fold_marked_statements ../../gcc/gcc/tree-inline.c:4843 0x10884ebf tree_function_versioning(tree_node*, tree_node*, vec<ipa_replace_map*, va_gc, vl_embed>*, bool, bitmap_head*, bool, bitmap_head*, basic_block_def*) ../../gcc/gcc/tree-inline.c:5813 0x103229ef cgraph_materialize_clone ../../gcc/gcc/cgraphclones.c:1056 0x103229ef symbol_table::materialize_all_clones() ../../gcc/gcc/cgraphclones.c:1153 0x1031c3cb symbol_table::compile() ../../gcc/gcc/cgraphunit.c:2326 0x1031ee67 symbol_table::finalize_compilation_unit() ../../gcc/gcc/cgraphunit.c:2444 0x1015d1c7 c_write_global_declarations() ../../gcc/gcc/c/c-decl.c:10801 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.