re PR c++/85558 (ICE in make_rtl_for_nonlocal_decl when using static member of template class)

2019-03-13  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/85558
	* g++.dg/other/friend16.C: New.
	* g++.dg/other/friend17.C: Likewise.

From-SVN: r269644
This commit is contained in:
Paolo Carlini 2019-03-13 10:32:29 +00:00 committed by Paolo Carlini
parent 7a26e2739d
commit 31ba0418a2
3 changed files with 30 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2019-03-13 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/85558
* g++.dg/other/friend16.C: New.
* g++.dg/other/friend17.C: Likewise.
2019-03-13 Jakub Jelinek <jakub@redhat.com>
PR middle-end/88588

View File

@ -0,0 +1,12 @@
// PR c++/85558
template <typename T>
struct triggerBug {
friend void doInitUser(bool = triggerBug::doInit); // { dg-error "definition" }
static bool doInit;
};
template <class T>
bool triggerBug<T>::doInit = true;
triggerBug<int> bug;

View File

@ -0,0 +1,12 @@
// PR c++/85558
template <typename T>
struct triggerBug {
friend void doInitUser(bool = triggerBug::doInit) {}
static bool doInit;
};
template <class T>
bool triggerBug<T>::doInit = true;
triggerBug<int> bug;