PR c++/71210
commitb9a1dcd541be1d886b3f473c1c310d351bf91b6f
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 20 May 2016 11:58:49 +0000 (20 11:58 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 20 May 2016 11:58:49 +0000 (20 11:58 +0000)
treef40d460b0d22bea9c8d8b3aaed1d75663960dafa
parent45cdf8c6c9498e0badf8c5bca4458c5f5480ca53
PR c++/71210
* gimple-fold.c (gimple_fold_call): Do not remove lhs of noreturn
calls if the LHS is variable length or has addressable type.
If targets[0]->decl is a noreturn call with void return type and
zero arguments, adjust fntype and remove lhs in that case.

* g++.dg/opt/pr71210-1.C: New test.
* g++.dg/opt/pr71210-2.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236506 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/gimple-fold.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/opt/pr71210-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/opt/pr71210-2.C [new file with mode: 0644]