diff options
author | jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-09-10 11:34:09 +0000 |
---|---|---|
committer | jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-09-10 11:34:09 +0000 |
commit | d779c7b1f3580be290c8efdad295d86e5930d926 (patch) | |
tree | d7ee14246bd51291d717e5677748ab95847ddc12 /gcc/testsuite/g++.dg/ipa | |
parent | 56e8f47f4fa224b39289f6da0c8349854b7ed8df (diff) | |
download | gcc-d779c7b1f3580be290c8efdad295d86e5930d926.tar.gz |
2014-09-10 Martin Jambor <mjambor@suse.cz>
PR ipa/61654
* cgraphclones.c (duplicate_thunk_for_node): Copy arguments of the
new decl properly. Analyze the new thunk if it is expanded.
gcc/testsuite/
* g++.dg/ipa/pr61654.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215122 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg/ipa')
-rw-r--r-- | gcc/testsuite/g++.dg/ipa/pr61654.C | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ipa/pr61654.C b/gcc/testsuite/g++.dg/ipa/pr61654.C new file mode 100644 index 00000000000..d07e4586bdb --- /dev/null +++ b/gcc/testsuite/g++.dg/ipa/pr61654.C @@ -0,0 +1,40 @@ +/* { dg-do compile } */ +/* { dg-options "-O3" } */ + +/* The bug only presented itself on a 32 bit i386 but in theory it might also + pop up elsewhere and we do not want to put -m32 options to testcase + options. */ + +struct A +{ + virtual int a (int, int = 0) = 0; + void b (); + void c (); + int d; +}; + +struct B : virtual A +{ + int a (int, int); + int e; +}; + +int f; + +void +A::b () +{ + a (0); +} + +void +A::c () +{ + a (f); +} + +int +B::a (int, int) +{ + return e; +} |