Commit 31ba0418 by Paolo Carlini Committed by Paolo Carlini

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
parent 7a26e273
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> 2019-03-13 Jakub Jelinek <jakub@redhat.com>
PR middle-end/88588 PR middle-end/88588
......
// 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;
// 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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment