MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail4375p.d
blob62c61a4cb7a42de78cd7c2c73e7c301051cca132
1 // REQUIRED_ARGS: -w
2 // https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else
3 /*
4 TEST_OUTPUT:
5 ---
6 fail_compilation/fail4375p.d(19): Warning: else is dangling, add { } after condition at fail_compilation/fail4375p.d(12)
7 fail_compilation/fail4375p.d(16): Error: undefined identifier `x`
8 ---
9 */
11 void main() {
12 if (true)
13 while (false)
14 for (;;)
15 scope (exit)
16 synchronized (x)
17 if (true)
18 assert(90);
19 else
20 assert(89);