re PR c++/70265 (ICE on code with constexpr on x86_64-linux-gnu in tree check: expected statement_list, have nop_expr in tsi_start, at tree-iterator.h:42)
2017-05-21 Paolo Carlini <paolo.carlini@oracle.com> PR c++/70265 * g++.dg/cpp1y/constexpr-70265-1.C: New. * g++.dg/cpp1y/constexpr-70265-2.C: Likewise. From-SVN: r248313
This commit is contained in:
parent
6fac3d9757
commit
4bcbb7b816
@ -1,3 +1,9 @@
|
||||
2017-05-21 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/70265
|
||||
* g++.dg/cpp1y/constexpr-70265-1.C: New.
|
||||
* g++.dg/cpp1y/constexpr-70265-2.C: Likewise.
|
||||
|
||||
2017-05-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR libgfortran/80333
|
||||
|
13
gcc/testsuite/g++.dg/cpp1y/constexpr-70265-1.C
Normal file
13
gcc/testsuite/g++.dg/cpp1y/constexpr-70265-1.C
Normal file
@ -0,0 +1,13 @@
|
||||
// PR c++/70265
|
||||
// { dg-do compile { target c++14 } }
|
||||
|
||||
constexpr int
|
||||
foo (int p)
|
||||
{
|
||||
int t = 0;
|
||||
while (1) // { dg-error "count exceeds" }
|
||||
;
|
||||
return t;
|
||||
}
|
||||
|
||||
static_assert (foo (1) == 0, ""); // { dg-error "non-constant" }
|
13
gcc/testsuite/g++.dg/cpp1y/constexpr-70265-2.C
Normal file
13
gcc/testsuite/g++.dg/cpp1y/constexpr-70265-2.C
Normal file
@ -0,0 +1,13 @@
|
||||
// PR c++/70265
|
||||
// { dg-do compile { target c++14 } }
|
||||
|
||||
constexpr int
|
||||
foo (int p)
|
||||
{
|
||||
int t = 0;
|
||||
while (1)
|
||||
t = 0; // { dg-error "count exceeds" }
|
||||
return t;
|
||||
}
|
||||
|
||||
static_assert (foo (1) == 0, ""); // { dg-error "non-constant" }
|
Loading…
Reference in New Issue
Block a user