libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / 20030703-1.c
blob5d274c1f92244ee4411679ca29ecc6aebe565ebd
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-dom2" } */
4 extern void abort (void);
5 extern int blah[];
7 void
8 foo(int index)
10 if (blah [(unsigned int)index] != 0)
11 abort ();
12 if (blah [(unsigned int)index] != 0)
13 abort ();
16 /* There should be precisely one load of blah. If there is
17 more than one, then the dominator optimizations failed. */
18 /* { dg-final { scan-tree-dump-times "blah" 1 "dom2"} } */
20 /* There should be exactly one IF conditional. */
21 /* { dg-final { scan-tree-dump-times "if " 1 "dom2"} } */