libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / pr102478.c
blob43bc49b584df990c6f92970b65790a9abe69875c
1 /* PR rtl-optimization/102478 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fno-if-conversion -Wno-div-by-zero" } */
5 unsigned a, b, c;
7 void
8 foo (void)
10 c |= __builtin_expect (65535 / a, 0) && 0 / 0;
11 b = 0;
14 void
15 bar (void)
17 if (a <= 65535)
18 __builtin_trap ();
19 b = 0;
22 void
23 baz (void)
25 if (a > 65535)
26 b = 0;
27 else
28 __builtin_trap ();