Add new test to verify that the array index, limit, and stride are
[official-gcc.git] / gcc / testsuite / gcc.dg / pr19105.c
blob499aa8956518a9dec643760f58cbdcf81067e28c
1 /* PR tree-optimization/19105 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-reassoc1-details" } */
5 enum e
7 a, b, c, d, e, f, g, h
8 };
10 int range1 (enum e v, int x)
12 return x && v != c && v != d && v != e;
15 int range2 (enum e v, int x)
17 return x && (v != c && v != d && v != e);
20 /* { dg-final { scan-tree-dump-times "Optimizing range tests v_\[0-9\]*.D. -.2, 2. and -.3, 4.\[\n\r\]* into|Optimizing range tests v_\[0-9\]*.D. -.2, 2. and -.3, 3. and -.4, 4.\[\n\r\]* into" 1 "reassoc1" } } */
21 /* { dg-final { cleanup-tree-dump "reassoc1" } } */