Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.old-deja/g++.jason/enum8.C @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 // { dg-do run } | |
2 // Bug: the switch fails on the Alpha because folding ef - 1 fails. | |
3 | |
4 enum foo { one=1, thirty=30 }; | |
5 | |
6 int f (enum foo ef) | |
7 { | |
8 switch (ef) | |
9 { | |
10 case one: | |
11 case thirty: | |
12 return 0; | |
13 default: | |
14 return 1; | |
15 } | |
16 } | |
17 | |
18 int main () | |
19 { | |
20 return f (one); | |
21 } |