repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git]
/
gcc
/
testsuite
/
gdc.test
/
fail_compilation
/
debugCaseDeclaration.d
blob
0a06bca93a0b95130a16a7b1384af4dae4141064
1
/*
2
https://issues.dlang.org/show_bug.cgi?id=21739
3
4
REQUIRED_ARGS: -debug
5
TEST_OUTPUT:
6
---
7
fail_compilation/debugCaseDeclaration.d(22): Error: undefined identifier `x`
8
fail_compilation/debugCaseDeclaration.d(33): Error: undefined identifier `y`
9
---
10
*/
11
12
void
main
()
13
{
14
int
i
,
k
;
15
switch
(
i
)
16
{
17
case
0
:
18
int
x
;
19
break
;
20
21
case
1
:
22
x
=
1
;
23
break
;
24
25
case
2
:
26
int
y
;
27
break
;
28
29
debug
30
{
31
case
3
:
32
k
=
1
;
// Valid
33
y
=
1
;
// Invalid but accepted
34
break
;
35
}
36
37
default
:
38
}
39
}