annotate gcc/testsuite/g++.dg/init/goto3.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 // PR c++/63558
kono
parents:
diff changeset
2 // { dg-options "-fpermissive -w" }
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 extern int abs(int);
kono
parents:
diff changeset
5 static long int n_ants;
kono
parents:
diff changeset
6 enum enum_var_types
kono
parents:
diff changeset
7 { VAR_NONE, VAR_DELTA, VAR_SWITCH };
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 static enum enum_var_types option_var_n_ants;
kono
parents:
diff changeset
10 void
kono
parents:
diff changeset
11 adapt_parameters_next_iteration(void)
kono
parents:
diff changeset
12 {
kono
parents:
diff changeset
13 switch(option_var_n_ants) {
kono
parents:
diff changeset
14
kono
parents:
diff changeset
15 case VAR_NONE: break;
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 case VAR_DELTA:
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
18 int trunc_n_ants = 0; // { dg-message "initialization" }
111
kono
parents:
diff changeset
19 n_ants += trunc_n_ants;
kono
parents:
diff changeset
20 break;
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
21 case VAR_SWITCH: // { dg-error "jump" }
111
kono
parents:
diff changeset
22 break;
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
23 default: break; // { dg-error "jump" }
111
kono
parents:
diff changeset
24 }
kono
parents:
diff changeset
25 }