re PR c++/66635 (g++ ICE when compiling constexpr code with comma operator)
2016-06-01 Paolo Carlini <paolo.carlini@oracle.com> PR c++/66635 * g++.dg/cpp0x/constexpr-ice16.C: New. From-SVN: r236978
This commit is contained in:
parent
e04d2a35c8
commit
48de570121
2 changed files with 22 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2016-06-01 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
|
PR c++/66635
|
||||||
|
* g++.dg/cpp0x/constexpr-ice16.C: New.
|
||||||
|
|
||||||
2016-06-01 Patrick Palka <ppalka@gcc.gnu.org>
|
2016-06-01 Patrick Palka <ppalka@gcc.gnu.org>
|
||||||
|
|
||||||
PR tree-optimization/71314
|
PR tree-optimization/71314
|
||||||
|
@ -11,9 +16,9 @@
|
||||||
|
|
||||||
2016-05-31 Jan Hubicka <hubicka@ucw.cz>
|
2016-05-31 Jan Hubicka <hubicka@ucw.cz>
|
||||||
|
|
||||||
* g++.d/predict-lop-exit-1.C: Update template for new predictor name.
|
* g++.dg/predict-lop-exit-1.C: Update template for new predictor name.
|
||||||
* g++.d/predict-lop-exit-2.C: Update template for new predictor name.
|
* g++.dg/predict-lop-exit-2.C: Update template for new predictor name.
|
||||||
* g++.d/predict-lop-exit-2.C: Update template for new predictor name.
|
* g++.dg/predict-lop-exit-2.C: Update template for new predictor name.
|
||||||
|
|
||||||
2016-05-31 Paolo Carlini <paolo.carlini@oracle.com>
|
2016-05-31 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
|
|
14
gcc/testsuite/g++.dg/cpp0x/constexpr-ice16.C
Normal file
14
gcc/testsuite/g++.dg/cpp0x/constexpr-ice16.C
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
// PR c++/66635
|
||||||
|
// { dg-do compile { target c++11 } }
|
||||||
|
|
||||||
|
#include <cassert>
|
||||||
|
|
||||||
|
struct Foo {
|
||||||
|
constexpr Foo(const unsigned i) : val(i) {}
|
||||||
|
constexpr Foo operator-(const Foo &rhs) const {
|
||||||
|
return assert(val >= rhs.val), Foo(val - rhs.val); // { dg-error "call to non-constexpr" }
|
||||||
|
}
|
||||||
|
unsigned val;
|
||||||
|
};
|
||||||
|
|
||||||
|
constexpr Foo foo(Foo(1) - Foo(2));
|
Loading…
Add table
Reference in a new issue