gcc/testsuite/g++.dg/tree-ssa/initlist-opt4.C
raw| 1 | // PR c++/110070 |
| 2 | // { dg-additional-options -fdump-tree-gimple } |
| 3 | // { dg-do compile { target c++11 } } |
| 4 | |
| 5 | // { dg-final { scan-tree-dump {static const int [^\n]*\[4\] = } "gimple" } } |
| 6 | |
| 7 | #include <initializer_list> |
| 8 | extern void ext(int); |
| 9 | void foo() |
| 10 | { |
| 11 | for (int i: {1,2,4,6}) |
| 12 | ext(i); |
| 13 | } |