diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/opt/pr23372.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/opt/pr23372.C | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/opt/pr23372.C b/gcc-4.9/gcc/testsuite/g++.dg/opt/pr23372.C new file mode 100644 index 000000000..9be4c9c56 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.dg/opt/pr23372.C @@ -0,0 +1,15 @@ +// PR c++/23372 +// { dg-options -fdump-tree-gimple } + +// There shouldn't be an assignment to a temporary in the GIMPLE, +// as that represents a redundant copy. +// { dg-final { scan-tree-dump-not "=" gimple } } + +struct A { + int a[1000]; + //A(A const &); +}; +void f(A); +void g(A *a) { f(*a); } + +// { dg-final { cleanup-tree-dump gimple } } |