diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-06-19 20:10:02 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-06-19 20:10:02 +0000 |
commit | 94bf38b394f369bf88ff6b3c5016d1ba11c9ed7f (patch) | |
tree | 5cc3181728e0bd4bd32e455bcc8e6e8894da9909 /gcc/testsuite | |
parent | 83adc1898f3f296376a709fe60de2c1c2c2d6900 (diff) | |
download | gcc-94bf38b394f369bf88ff6b3c5016d1ba11c9ed7f.tar.gz |
2006-06-19 Richard Guenther <rguenther@suse.de>
PR tree-optimization/27090
* g++.dg/tree-ssa/pr27090.C: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114786 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/tree-ssa/pr27090.C | 21 |
2 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 888e45a572a..8fda51d5d1c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-06-19 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/27090 + * g++.dg/tree-ssa/pr27090.C: New testcase. + 2006-06-19 Roger Sayle <roger@eyesopen.com> PR target/27861 diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr27090.C b/gcc/testsuite/g++.dg/tree-ssa/pr27090.C new file mode 100644 index 00000000000..a56357a1b52 --- /dev/null +++ b/gcc/testsuite/g++.dg/tree-ssa/pr27090.C @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fdump-tree-optimized" } */ + +template <class T> +struct Bar +{ + int get() { return static_cast<T*>(this)->get2(); } +}; +struct Foo : public Bar<Foo> +{ + int get2() { return x; } + int x; +}; + +int foo(Foo& f) +{ + return f.get(); +} + +/* { dg-final { scan-tree-dump "return f->x;" "optimized" } } */ +/* { dg-final { cleanup-tree-dump "optimized" } } */ |