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
d: Merge upstream dmd, druntime 4c18eed967, phobos d945686a4.
[official-gcc.git]
/
gcc
/
testsuite
/
gdc.test
/
fail_compilation
/
goto3.d
blob
ef3b5f76dc1b86c570609b2aa0b0f4f0304c3002
1
/*
2
TEST_OUTPUT:
3
---
4
fail_compilation/goto3.d(1010): Error: case cannot be in different `try` block level from `switch`
5
fail_compilation/goto3.d(1012): Error: default cannot be in different `try` block level from `switch`
6
---
7
*/
8
9
10
void
foo
();
11
void
bar
();
12
13
#line
1000
14
15
void
test1
()
16
{
17
int
i
;
18
switch
(
i
)
19
{
20
case
1
:
21
try
22
{
23
foo
();
24
case
2
:
25
{ }
26
default
:
27
{ }
28
}
29
finally
30
{
31
bar
();
32
}
33
break
;
34
}
35
}