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
+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
--- /dev/null
+// 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;
--- /dev/null
+// 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;