re PR c++/84138 (ICE folding broken constant)
authorMarek Polacek <polacek@redhat.com>
Wed, 31 Jan 2018 15:37:18 +0000 (15:37 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Wed, 31 Jan 2018 15:37:18 +0000 (15:37 +0000)
commit4ecd9c156cb6a4d67d59563b73cccfd0d5045a50
treec85e6710189647911c02e68ca5c60fe4855be851
parentbcec133fa9b1f65adcb68dbf7c9794019ddb66f3
re PR c++/84138 (ICE folding broken constant)

PR c++/84138
* cp-gimplify.c (cp_fold): Check if X is an error node before
calling useless_type_conversion_p.

* g++.dg/diagnostic/pr84138.C: New test.

From-SVN: r257240
gcc/cp/ChangeLog
gcc/cp/cp-gimplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/diagnostic/pr84138.C [new file with mode: 0644]