From 797db64b9ef75f3e65c967a73582b3760f354b4a Mon Sep 17 00:00:00 2001 From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Fri, 4 Feb 2011 17:23:30 +0000 Subject: [PATCH] Add a testcase for PR tree-optimization/43695. 2011-02-04 H.J. Lu <hongjiu.lu@intel.com> PR tree-optimization/43695 * g++.dg/ipa/pr43695.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169835 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/ipa/pr43695.C | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 gcc/testsuite/g++.dg/ipa/pr43695.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c4a145c4c69..6e225b4c17f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-02-04 H.J. Lu <hongjiu.lu@intel.com> + + PR tree-optimization/43695 + * g++.dg/ipa/pr43695.C: New. + 2011-02-04 Jakub Jelinek <jakub@redhat.com> PR inline-asm/23200 diff --git a/gcc/testsuite/g++.dg/ipa/pr43695.C b/gcc/testsuite/g++.dg/ipa/pr43695.C new file mode 100644 index 00000000000..a01478324b0 --- /dev/null +++ b/gcc/testsuite/g++.dg/ipa/pr43695.C @@ -0,0 +1,20 @@ +/* { dg-do compile } */ +/* { dg-options "-fipa-cp -fipa-cp-clone" } */ + +extern void baz(int) __attribute__ ((noreturn)); + +struct S { + ~S(); +}; + +__attribute__ ((noreturn, noinline)) +void bar(int i) +{ + baz(i); +} + +void foo() +{ + S s; + bar(0); +} -- GitLab