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
/
fail144.d
blob
4977e4d86d4e0410d13b61db2226655907239c19
1
/*
2
TEST_OUTPUT:
3
---
4
fail_compilation/fail144.d(13): Error: message
5
fail_compilation/fail144.d(26): called from here: `bar(7)`
6
---
7
*/
8
9
//import core.stdc.stdio : printf;
10
11
int
bar
(
int
i
)
12
{
13
assert
(
i
<
0
,
"message"
);
14
foreach_reverse
(
k
,
v
;
"hello"
)
15
{
16
i
<<=
1
;
17
if
(
k
==
2
)
18
break
;
19
i
+=
v
;
20
}
21
return
i
;
22
}
23
24
void
main
()
25
{
26
static
b
=
bar
(
7
);
27
auto
c
=
bar
(
7
);
28
//printf("b = %d, %d\n", b, c);
29
assert
(
b
==
674
);
30
}