d: Merge upstream dmd, druntime 4c18eed967, phobos d945686a4.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / ctfeblock.d
blob9c901033223ec0ddd6f4e59f9550baa756ce5122
1 /* TEST_OUTPUT:
2 ---
3 fail_compilation/ctfeblock.d(112): Error: cannot `goto` into `if (__ctfe)` block
4 ---
5 */
7 /*******************************************/
8 // https://issues.dlang.org/show_bug.cgi?id=18472
9 // https://github.com/dlang/dmd/pull/14676
11 #line 100
13 struct T { }
15 @nogc void test1()
17 int a;
18 if (__ctfe)
20 L1:
21 new T();
22 a = 3;
24 goto L1;
27 @nogc void test2()
29 if (__ctfe)
31 new T();
35 @nogc void test3()
37 if (!__ctfe)
40 else
42 int* p = new int;