2018-05-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / guality / pr58791-1.c
blob62ce881bfc240a6f45481355d760bb4fc23fa543
1 /* PR tree-optimization/58791 */
2 /* { dg-do run } */
3 /* { dg-options "-g" } */
5 #include "../nop.h"
7 __attribute__((noinline, noclone)) int
8 foo (int x, int y)
10 _Bool a = x != 0;
11 _Bool b = y != 2;
12 _Bool c = a & b;
13 _Bool d = !c;
14 int ret;
15 if (c)
17 if (y < 3 || y > 4)
18 ret = 1;
19 else
20 ret = 0;
22 else
23 ret = 0;
24 asm volatile (NOP : : : "memory"); /* { dg-final { gdb-test pr58791-1.c:25 "c & 1" "1" } } */
25 asm volatile (NOP : : : "memory"); /* { dg-final { gdb-test pr58791-1.c:25 "d & 1" "0" } } */
26 return ret;
29 int
30 main ()
32 foo (1, 3);
33 return 0;