This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix Changelog entry and add pr66896.C


Hi.

As Jakub pointed out in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66896#c15, I forgot
to add a test-case to both GCC-5-branch and trunk.

May I please installed the suggested patch to both these branches?
Thanks,
Martin
>From 7df3eaa59c4b6ee9f011f35ee480e022fe77e0b3 Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Mon, 7 Dec 2015 16:00:31 +0100
Subject: [PATCH] Fix ChangelogEntry and add pr66896.C.

---
 gcc/testsuite/ChangeLog            |  2 +-
 gcc/testsuite/g++.dg/ipa/pr66896.C | 22 ++++++++++++++++++++++
 2 files changed, 23 insertions(+), 1 deletion(-)
 create mode 100644 gcc/testsuite/g++.dg/ipa/pr66896.C

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index ca604d2..7106276 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -10570,7 +10570,7 @@
 
 2015-07-16  Martin Liska  <mliska@suse.cz>
 
-	* g++.dg/ipa/pr66896.c: New test.
+	* g++.dg/ipa/pr66896.C: New test.
 
 2015-07-16  Richard Biener  <rguenther@suse.de>
 
diff --git a/gcc/testsuite/g++.dg/ipa/pr66896.C b/gcc/testsuite/g++.dg/ipa/pr66896.C
new file mode 100644
index 0000000..236537a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr66896.C
@@ -0,0 +1,22 @@
+// PR ipa/66896
+// { dg-do compile }
+
+void f2 (void *);
+void f3 ();
+
+struct A
+{
+  int *a;
+  A ();
+  ~A () { a3 (); }
+  int a1 (int * p) { if (!p) f3 (); f2 (p); }
+  void a3 () { if (*a) a1 (a); }
+};
+
+struct B : A {~B () { a3 ();}};
+
+struct F {};
+
+struct G : F {B g;};
+
+void foo () {G g;}
-- 
2.6.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]