From: Paolo Carlini Date: Wed, 13 Mar 2019 10:32:29 +0000 (+0000) Subject: re PR c++/85558 (ICE in make_rtl_for_nonlocal_decl when using static member of templa... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=31ba0418a27bb61df31bb5fcdbe380288f3b10cf;p=gcc.git 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 --- 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;