Debian Codegraph @

gcc/testsuite/g++.dg/cpp1z/init-statement10.C

raw
1 // DR 2345 - Jumping across initializers in init-statements and conditions.
2 // { dg-do compile { target c++17 } }
3
4 int
5 fn ()
6 {
7 goto X;
8 if (int i = 42; i == 42)
9 {
10 X: // { dg-error "jump to label" }
11 return i;
12 }
13 return -1;
14 }