Commit 0761f6bf by Nathan Sidwell Committed by Nathan Sidwell

re PR c++/77539 (gcc-5/6: comparison of array to nullptr failure in constexpr…

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
parent e51fbec3
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
......
// 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(),"");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment