Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/torture/pr83391.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 // PR debug/83391 | |
2 // { dg-do compile } | |
3 // { dg-options "-g" } | |
4 // { dg-additional-options "-mbranch-cost=1" { target { i?86-*-* x86_64-*-* mips*-*-* s390*-*-* avr*-*-* } } } | |
5 | |
6 unsigned char a; | |
7 enum E { F, G, H } b; | |
8 int c, d; | |
9 | |
10 void | |
11 foo () | |
12 { | |
13 int e; | |
14 bool f; | |
15 E g = b; | |
16 while (1) | |
17 { | |
18 unsigned char h = a ? d : 0; | |
19 switch (g) | |
20 { | |
21 case 0: | |
22 f = h <= 'Z' || h >= 'a' && h <= 'z'; | |
23 break; | |
24 case 1: | |
25 { | |
26 unsigned char i = h; | |
27 e = 0; | |
28 } | |
29 if (e || h) | |
30 g = H; | |
31 /* FALLTHRU */ | |
32 default: | |
33 c = 0; | |
34 } | |
35 } | |
36 } |