blob: 51fcd9788f2e90da027d76d7ca096e47c15d8b33 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
/* { dg-do compile } */
/* { dg-options "-O1 -fno-tree-sra -fdump-tree-optimized" } */
extern void link_error (void);
/* Check for copyprop on structs. */
struct s
{
char d;
int a, b;
double m;
};
struct s foo (struct s r)
{
struct s temp_struct1;
struct s temp_struct2;
struct s temp_struct3;
temp_struct1 = r;
temp_struct2 = temp_struct1;
temp_struct3 = temp_struct2;
return temp_struct3;
}
/* There should be no references to any of "temp_struct*"
temporaries. */
/* { dg-final { scan-tree-dump-times "temp_struct" 0 "optimized" { xfail *-*-* } } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
|