From 31ba0418a27bb61df31bb5fcdbe380288f3b10cf Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Wed, 13 Mar 2019 10:32:29 +0000 Subject: [PATCH] re PR c++/85558 (ICE in make_rtl_for_nonlocal_decl when using static member of template class) 2019-03-13 Paolo Carlini PR c++/85558 * g++.dg/other/friend16.C: New. * g++.dg/other/friend17.C: Likewise. From-SVN: r269644 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/g++.dg/other/friend16.C | 12 ++++++++++++ gcc/testsuite/g++.dg/other/friend17.C | 12 ++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 gcc/testsuite/g++.dg/other/friend16.C create mode 100644 gcc/testsuite/g++.dg/other/friend17.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5ba400fa2b3..2439836d647 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2019-03-13 Paolo Carlini + + PR c++/85558 + * g++.dg/other/friend16.C: New. + * g++.dg/other/friend17.C: Likewise. + 2019-03-13 Jakub Jelinek PR middle-end/88588 diff --git a/gcc/testsuite/g++.dg/other/friend16.C b/gcc/testsuite/g++.dg/other/friend16.C new file mode 100644 index 00000000000..8c62ef69ec1 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/friend16.C @@ -0,0 +1,12 @@ +// PR c++/85558 + +template +struct triggerBug { + friend void doInitUser(bool = triggerBug::doInit); // { dg-error "definition" } + static bool doInit; +}; + +template +bool triggerBug::doInit = true; + +triggerBug bug; diff --git a/gcc/testsuite/g++.dg/other/friend17.C b/gcc/testsuite/g++.dg/other/friend17.C new file mode 100644 index 00000000000..81269afde4d --- /dev/null +++ b/gcc/testsuite/g++.dg/other/friend17.C @@ -0,0 +1,12 @@ +// PR c++/85558 + +template +struct triggerBug { + friend void doInitUser(bool = triggerBug::doInit) {} + static bool doInit; +}; + +template +bool triggerBug::doInit = true; + +triggerBug bug; -- 2.30.2