re PR c++/79629 (ICE on invalid code in tsubst_copy, at cp/pt.c:14477)
PR c++/79629 * g++.dg/other/error35.C: New test. From-SVN: r266712
This commit is contained in:
parent
8fc1ef712d
commit
16e48dd1b4
2 changed files with 17 additions and 0 deletions
|
@ -37,6 +37,9 @@
|
|||
PR c++/83856
|
||||
* g++.dg/cpp1y/lambda-generic-83856.C: New test.
|
||||
|
||||
PR c++/79629
|
||||
* g++.dg/other/error35.C: New test.
|
||||
|
||||
2018-12-01 Jeff Law <law@redhat.com>
|
||||
|
||||
* gcc.dg/predict-22.c: Update expected output.
|
||||
|
|
14
gcc/testsuite/g++.dg/other/error35.C
Normal file
14
gcc/testsuite/g++.dg/other/error35.C
Normal file
|
@ -0,0 +1,14 @@
|
|||
// PR c++/79629
|
||||
// { dg-do compile { target c++14 } }
|
||||
// { dg-options "-w" }
|
||||
|
||||
template <typename> struct S {
|
||||
enum E : int;
|
||||
constexpr int g() const;
|
||||
};
|
||||
enum S<char>::E;
|
||||
template <typename T> enum S<T>::E : int { b };
|
||||
template <typename T>
|
||||
constexpr int S<T>::g() const { b; } // { dg-error "not declared" }
|
||||
static_assert(S<char>().g() == 1, ""); // { dg-error "" }
|
||||
// { dg-message "in .constexpr. expansion of" "" { target *-*-* } .-1 }
|
Loading…
Add table
Reference in a new issue