[Bug other/59622] [4.9 Regression] internal compiler error: verify_gimple failed
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59622 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #5 from Jakub Jelinek jakub at gcc dot gnu.org --- if (targets.length () == 1) fndecl = targets[0]-decl; else fndecl = builtin_decl_implicit (BUILT_IN_UNREACHABLE); gimple_call_set_fndecl (stmt, fndecl); in gimple_fold_call is obviously wrong for the targets.length () == 0 case, __builtin_unreachable () has no arguments, not the arguments of the call, and no return value. So, IMNSHO, for targets.length () == 0 you want to punt if inplace is true, and otherwise not update the call itself, but replace the old call with a new stmt, __builtin_unreachable ();, and if the call had a lhs with gimple_reg_type, add lhs = 0 (build_zero_cst (TREE_TYPE (lhs))) after the __builtin_unreachable (), so that it is defined, it will be hopefully DCEd soon afterwards but we shouldn't let it being undefined, especially if it is e.g. anonymous SSA_NAME which can't be undefined.
[Bug other/59622] [4.9 Regression] internal compiler error: verify_gimple failed
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59622 Marc Glisse glisse at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2013-12-29 Target Milestone|--- |4.9.0 Summary|trunk gcc-4.9.0:internal|[4.9 Regression] internal |compiler error: |compiler error: |verify_gimple failed|verify_gimple failed Ever confirmed|0 |1 --- Comment #2 from Marc Glisse glisse at gcc dot gnu.org --- Seems related to OBJ_TYPE_REF. -O2 is sufficient.
[Bug other/59622] [4.9 Regression] internal compiler error: verify_gimple failed
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59622 Markus Trippelsdorf trippels at gcc dot gnu.org changed: What|Removed |Added CC||hubicka at ucw dot cz, ||trippels at gcc dot gnu.org --- Comment #3 from Markus Trippelsdorf trippels at gcc dot gnu.org --- Started with r206042.
[Bug other/59622] [4.9 Regression] internal compiler error: verify_gimple failed
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59622 --- Comment #4 from Markus Trippelsdorf trippels at gcc dot gnu.org --- Further reduced: markus@x4 tmp % cat test.ii namespace { class A { public: virtual int *m_fn1(); int *m_fn2() { return m_fn1(); } }; A a; int b = *a.m_fn2(); } markus@x4 tmp % g++ -O2 -c /var/tmp/test.ii /var/tmp/test.ii: In member function ‘int* {anonymous}::A::m_fn2()’: /var/tmp/test.ii:5:8: error: LHS in noreturn call int *m_fn2() { return m_fn1(); } ^ D.2269 = __builtin_unreachable (this); /var/tmp/test.ii:5:8: internal compiler error: verify_gimple failed 0xb74c4f verify_gimple_in_seq(gimple_statement_base*) ../../gcc/gcc/tree-cfg.c:4521 0x99ffe1 gimplify_body(tree_node*, bool) ../../gcc/gcc/gimplify.c:8599 0x9a0399 gimplify_function_tree(tree_node*) ../../gcc/gcc/gimplify.c:8684 0x82eb97 analyze_function ../../gcc/gcc/cgraphunit.c:649 0x82fe4b analyze_functions ../../gcc/gcc/cgraphunit.c:1017 0x831475 finalize_compilation_unit() ../../gcc/gcc/cgraphunit.c:2271 0x62a57e cp_write_global_declarations() ../../gcc/gcc/cp/decl2.c:4431 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. markus@x4 tmp % clang++ -c /var/tmp/test.ii /var/tmp/test.ii:4:16: warning: function 'anonymous namespace::A::m_fn1' has internal linkage but is not defined [-Wundefined-internal] virtual int *m_fn1(); ^ /var/tmp/test.ii:5:25: note: used here int *m_fn2() { return m_fn1(); } ^ 1 warning generated. markus@x4 tmp %