This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]