1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail12932.d(11): Error: array literal in @nogc function 'fail12932.foo' may cause GC allocation
5 fail_compilation/fail12932.d(15): Error: array literal in @nogc function 'fail12932.foo' may cause GC allocation
6 ---
7 */
8 
foo()9 int* foo() @nogc
10 {
11     foreach (ref e; [1,2,3])
12     {
13     }
14 
15     foreach (ref e; [1,2,3])
16     {
17         return &e;
18     }
19 }
20