libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / modref-4.c
bloba277c70677ed0a9dd0febe756d6ff65cdb5ce3e5
1 /* { dg-options "-O2 -fdump-tree-modref1" } */
2 /* { dg-do compile } */
3 __attribute__((noinline))
4 void a(char *ptr, char *ptr2)
6 (*ptr)++;
7 (*ptr2)++;
10 __attribute__((noinline))
11 void b(char *ptr)
13 a(ptr+1,&ptr[3]);
16 int main()
18 char c[5]={0,1,2,0,0};
19 b(c);
20 return c[0]+c[4];
22 /* Check that both param offsets are determined correctly and the computation
23 is optimized out. */
24 /* { dg-final { scan-tree-dump "param offset:1" "modref1" } } */
25 /* { dg-final { scan-tree-dump "param offset:3" "modref1" } } */
26 /* { dg-final { scan-tree-dump "return 0" "modref1" } } */