mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-26 11:21:37 +08:00
re PR c++/71966 (ICE on invalid C++11 code (undefined constructor used in a constant expression): in cp_build_addr_expr_1, at cp/typeck.c:5671)
2017-03-09 Paolo Carlini <paolo.carlini@oracle.com> PR c++/71966 * g++.dg/cpp0x/pr71966-1.C: New. * g++.dg/cpp0x/pr71966-2.C: Likewise. From-SVN: r246000
This commit is contained in:
parent
88119b464e
commit
35f77c2855
@ -1,3 +1,9 @@
|
||||
2017-03-09 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/71966
|
||||
* g++.dg/cpp0x/pr71966-1.C: New.
|
||||
* g++.dg/cpp0x/pr71966-2.C: Likewise.
|
||||
|
||||
2017-03-09 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR tree-optimization/79631
|
||||
|
13
gcc/testsuite/g++.dg/cpp0x/pr71966-1.C
Normal file
13
gcc/testsuite/g++.dg/cpp0x/pr71966-1.C
Normal file
@ -0,0 +1,13 @@
|
||||
// PR c++/71966
|
||||
// { dg-do compile { target c++11 } }
|
||||
|
||||
struct A
|
||||
{
|
||||
constexpr A (int); // { dg-message "never defined" }
|
||||
constexpr operator int () const { return 0; }
|
||||
};
|
||||
|
||||
template < int > struct B {};
|
||||
|
||||
constexpr A a = 0; // { dg-error "before its definition" }
|
||||
B < a > b;
|
15
gcc/testsuite/g++.dg/cpp0x/pr71966-2.C
Normal file
15
gcc/testsuite/g++.dg/cpp0x/pr71966-2.C
Normal file
@ -0,0 +1,15 @@
|
||||
// PR c++/71966
|
||||
// { dg-do compile { target c++11 } }
|
||||
|
||||
struct A
|
||||
{
|
||||
constexpr A (int); // { dg-message "never defined" }
|
||||
constexpr operator int () const { return 0; }
|
||||
int c;
|
||||
};
|
||||
|
||||
template <int>
|
||||
struct B {};
|
||||
|
||||
constexpr A a = 0; // { dg-error "before its definition" }
|
||||
B<a> b;
|
Loading…
x
Reference in New Issue
Block a user