public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-5912] c++: Add fixed test [PR68451]
@ 2020-12-10 15:00 Marek Polacek
  0 siblings, 0 replies; only message in thread
From: Marek Polacek @ 2020-12-10 15:00 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:e271cd0234d5db2f95c35454b8b29b6e8386caa8

commit r11-5912-ge271cd0234d5db2f95c35454b8b29b6e8386caa8
Author: Marek Polacek <polacek@redhat.com>
Date:   Thu Dec 10 09:56:40 2020 -0500

    c++: Add fixed test [PR68451]
    
    I was about to add this test with dg-ice but it turned out it had
    already been fixed by the recent r11-3361!
    
    gcc/testsuite/ChangeLog:
    
            PR c++/68451
            * g++.dg/cpp0x/friend6.C: New test.

Diff:
---
 gcc/testsuite/g++.dg/cpp0x/friend6.C | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gcc/testsuite/g++.dg/cpp0x/friend6.C b/gcc/testsuite/g++.dg/cpp0x/friend6.C
new file mode 100644
index 00000000000..fce7e55383e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/friend6.C
@@ -0,0 +1,23 @@
+// PR c++/68451
+// { dg-do compile { target c++11 } }
+
+struct A {};
+
+struct B
+{
+    A a;
+    friend decltype(a);
+};
+
+template <typename T>
+struct C
+{
+    A a;
+    friend decltype(a);
+};
+
+int main()
+{
+    B b;
+    C<int> c;
+}


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-10 15:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-10 15:00 [gcc r11-5912] c++: Add fixed test [PR68451] Marek Polacek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).