Add single-lane SLP support to .GOMP_SIMD_LANE vectorization
[official-gcc.git] / gcc / testsuite / g++.dg / ipa / pure-const-1.C
blobc18278cae116c7b273c97d45849cd74b5193ae1e
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized -fno-ipa-vrp"  } */
3 int *ptr;
4 static int barvar;
6 /* We can not detect A to be const because it may be interposed by unoptimized
7    body.  */
8 inline
9 __attribute__ ((noinline))
10 int a(void)
12   return *ptr == *ptr;
14 int main()
16   int aa;
17   ptr = &barvar;
18   aa=!a();
19   ptr = 0;
20   return aa;
22 /* { dg-final { scan-tree-dump "barvar"  "optimized"  } } */