From 4f6788a1717390202936322b1d2377bab6c45c39 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Mon, 7 Dec 2015 16:35:25 +0100 Subject: [PATCH] Fix changelog entry and add pr66896.C. From-SVN: r231365 --- gcc/testsuite/ChangeLog | 8 ++++---- gcc/testsuite/g++.dg/ipa/pr66896.C | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 gcc/testsuite/g++.dg/ipa/pr66896.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a937bb3b118..46b79e057fb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2015-12-07 Martin Liska + + * g++.dg/ipa/pr66896.C: New test. + 2015-12-06 Dmitry Vyukov * gcc.dg/sancov/sancov.exp: Load asan-dg.exp. @@ -10830,10 +10834,6 @@ PR rtl-optimization/66626 * gcc.target/i386/pr66626-2.c: New. -2015-07-16 Martin Liska - - * g++.dg/ipa/pr66896.c: New test. - 2015-07-16 Richard Biener PR tree-optimization/66894 diff --git a/gcc/testsuite/g++.dg/ipa/pr66896.C b/gcc/testsuite/g++.dg/ipa/pr66896.C new file mode 100644 index 00000000000..236537a5ea0 --- /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;}