diff options
author | Richard Guenther <rguenther@suse.de> | 2006-01-30 13:46:30 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2006-01-30 13:46:30 +0000 |
commit | eb73a69a1538e24fcf39f108d22d324ae8cd1d90 (patch) | |
tree | 4075aa6a3ca867fcf1bacbb54f9f28ccc7e2699c /gcc/testsuite/gcc.dg | |
parent | 4e852d1f9d56a1325bffcf4512dfebdd3837d97c (diff) | |
download | gcc-eb73a69a1538e24fcf39f108d22d324ae8cd1d90.zip gcc-eb73a69a1538e24fcf39f108d22d324ae8cd1d90.tar.gz gcc-eb73a69a1538e24fcf39f108d22d324ae8cd1d90.tar.bz2 |
re PR c++/23372 (Temporary aggregate copy not elided when passing parameters by value)
2006-01-30 Richard Guenther <rguenther@suse.de>
PR c++/23372
* gimplify.c (gimplify_target_expr): Handle easy cases
without creating a temporary.
* gcc.dg/pr23372-1.C: New testcase.
From-SVN: r110396
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr23372-1.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr23372-1.c b/gcc/testsuite/gcc.dg/pr23372-1.c new file mode 100644 index 0000000..1414947 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr23372-1.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-options "-Os" } */ + +struct A { + int a[1000]; +}; +void f(struct A); +void g(struct A *a) { f(*a); } + +/* { dg-final { scan-assembler-times "memcpy" 1 } } */ |