]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/struct/wo_prof_escape_return.c
re PR middle-end/42834 (memcpy folding overeager)
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / struct / wo_prof_escape_return.c
CommitLineData
6b87d1b4 1/* { dg-options "-O3 -fno-inline -fdump-ipa-all -fipa-struct-reorg -fwhole-program -combine" } */
65e79ca2
OG
2/* { dg-do compile } */
3/* { dg-do run } */
4
5#include <stdlib.h>
6
7struct A {
8 int d;
9};
10
11struct A a;
12
13struct A foo ()
14{
15 a.d = 5;
16 return a;
17}
18
19int
20main ()
21{
22 a.d = 0;
23 foo ();
24
25 if (a.d != 5)
26 abort ();
27
28 return 0;
29}
30
31/*--------------------------------------------------------------------------*/
70f34814 32/* { dg-final { scan-ipa-dump "is return type of function...Excluded" "ipa_struct_reorg" { xfail *-*-* } } } */
65e79ca2 33/* { dg-final { cleanup-ipa-dump "*" } } */