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
/
fail284.d
blob
abfad672701084ea0ad035ed6efe252118b7e906
1
/*
2
TEST_OUTPUT:
3
---
4
fail_compilation/fail284.d(19): Error: `pure` function `fail284.foo` cannot call impure function pointer `a`
5
---
6
*/
7
8
static int
nasty
;
9
10
int
impure_evil_function
(
int
x
)
11
{
12
nasty
++;
13
return
nasty
;
14
}
15
16
pure int
foo
(
int
x
)
17
{
18
int function
(
int
)
a
= &
impure_evil_function
;
19
return
a
(
x
);
20
}