1 /* PR tree-optimization/19105 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-reassoc1-details" } */
4 
5 enum e
6 {
7   a, b, c, d, e, f, g, h
8 };
9 
range1(enum e v,int x)10 int range1 (enum e v, int x)
11 {
12   return x && v != c && v != d && v != e;
13 }
14 
range2(enum e v,int x)15 int range2 (enum e v, int x)
16 {
17   return x && (v != c && v != d && v != e);
18 }
19 
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 
22