diff mbox series

[committed] Add testcase for already fixed PR c++/82075

Message ID 20190308183316.GO7611@tucnak
State New
Headers show
Series [committed] Add testcase for already fixed PR c++/82075 | expand

Commit Message

Jakub Jelinek March 8, 2019, 6:33 p.m. UTC
Hi!

This got fixed with r257057 aka PR84031 fix, but the committed testcase
doesn't resemble anything close to this one.

Tested on x86_64-linux, committed to trunk as obvious.

2019-03-08  Jakub Jelinek  <jakub@redhat.com>

	PR c++/82075
	* g++.dg/cpp1z/decomp49.C: New test.


	Jakub
diff mbox series

Patch

--- gcc/testsuite/g++.dg/cpp1z/decomp49.C.jj	2019-03-08 19:25:32.680069446 +0100
+++ gcc/testsuite/g++.dg/cpp1z/decomp49.C	2019-03-08 19:26:06.192521962 +0100
@@ -0,0 +1,14 @@ 
+// PR c++/82075
+// { dg-do run { target c++11 } }
+// { dg-options "" }
+
+struct B { };
+struct D : B { int i; };
+
+int
+main ()
+{
+  auto [i] = D{};	// { dg-warning "only available with" "" { target c++14_down } }
+  if (i != 0)
+    __builtin_abort ();
+}