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
/
ctfeblock.d
blob
9c901033223ec0ddd6f4e59f9550baa756ce5122
1
/* TEST_OUTPUT:
2
---
3
fail_compilation/ctfeblock.d(112): Error: cannot `goto` into `if (__ctfe)` block
4
---
5
*/
6
7
/*******************************************/
8
// https://issues.dlang.org/show_bug.cgi?id=18472
9
// https://github.com/dlang/dmd/pull/14676
10
11
#line
100
12
13
struct
T
{ }
14
15
@nogc
void
test1
()
16
{
17
int
a
;
18
if
(
__ctfe
)
19
{
20
L1
:
21
new
T
();
22
a
=
3
;
23
}
24
goto
L1
;
25
}
26
27
@nogc
void
test2
()
28
{
29
if
(
__ctfe
)
30
{
31
new
T
();
32
}
33
}
34
35
@nogc
void
test3
()
36
{
37
if
(!
__ctfe
)
38
{
39
}
40
else
41
{
42
int
*
p
=
new int
;
43
}
44
}