Debian Codegraph @

gcc/testsuite/gdc.test/compilable/test20906.d

raw
1 /* REQUIRED_ARGS: -O
2 * No divide-by-zero constant folding errors
3 * https://issues.dlang.org/show_bug.cgi?id=20906
4 */
5
6 int test12()
7 {
8 int x = 0;
9 int a = x && 1 / x;
10 int b = !x || 1 / x;
11 int c = x ? 1 / x : 1;
12 int d = !x ? 1 : 1 / x;
13 return a | b | c;
14 }