re PR c++/77539 (gcc-5/6: comparison of array to nullptr failure in constexpr (fixed by r235506 on trunk))

PR c++/77539
	* g++.dg/cpp1y/pr77539.C: New.

From-SVN: r240138
This commit is contained in:
Nathan Sidwell 2016-09-14 16:13:52 +00:00 committed by Nathan Sidwell
parent e51fbec3ff
commit 0761f6bfb3
2 changed files with 19 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2016-09-14 Nathan Sidwell <nathan@acm.org>
PR c++/77539
* g++.dg/cpp1y/pr77539.C: New.
2016-09-14 Christophe Lyon <christophe.lyon@linaro.org>
* g++.dg/cpp0x/lambda/lambda-mangle.C: Move dg-do directive before

View file

@ -0,0 +1,14 @@
// PR c++/77539
// { dg-do compile { target c++14 } }
constexpr int foobar()
{
int array[100] = {};
int *ar = array;
if (ar == nullptr) // Error...
{
return 0;
}
return 1;
}
static_assert(foobar(),"");