* tree-loop-distribution.c (INCLUDE_ALGORITHM): New header file.
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / sra-1.c
blobc207c1f3af278c580ec9d308dde9ebb00277389e
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-optimized" } */
4 /* Tests for SRA. */
6 void link_error (void);
8 typedef struct teststruct
10 double d;
11 char f1;
12 } teststruct;
14 void
15 copystruct1 (teststruct param)
17 teststruct local;
18 param.f1 = 0;
19 local = param;
20 if (local.f1 != 0)
21 link_error ();
24 void
25 copystruct11 (teststruct *param)
27 teststruct local;
28 param->f1 = 0;
29 local = *param;
30 if (local.f1 != 0)
31 link_error ();
34 void
35 copystruct111 (teststruct param)
37 teststruct *local = &param;
38 param.f1 = 0;
39 if (local->f1 != 0)
40 link_error ();
43 teststruct globf;
44 void
45 copystruct1111 (void)
47 teststruct local;
48 globf.f1 = 0;
49 local = globf;
50 if (local.f1 != 0)
51 link_error ();
54 void
55 copystruct11111 (void)
57 teststruct *local = &globf;
58 globf.f1 = 0;
59 if (local->f1 != 0)
60 link_error ();
63 void
64 copystruct111111 (teststruct param)
66 static teststruct local;
67 param.f1 = 0;
68 local = param;
69 if (local.f1 != 0)
70 link_error ();
73 /* There should be no referenc to link_error. */
74 /* { dg-final { scan-tree-dump-times "link_error" 0 "optimized"} } */