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
LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
pr15785-1.c
blob
47cd3d7b01bc90f74169f5d5a1d201b3508f5882
1
/* { dg-do link } */
2
3
extern
void
link_error
();
4
5
void
a
(
int
x
) {
6
if
(~ (~
x
) -
x
)
7
link_error
();
8
}
9
void
b
(
int
x
) {
10
if
(- (-
x
) -
x
)
11
link_error
();
12
}
13
14
void
c
(
int
x
) {
15
if
(!(- (~
x
) -
x
))
16
link_error
();
17
}
18
19
void
d
(
int
x
) {
20
if
(!(~ (-
x
) -
x
))
21
link_error
();
22
}
23
24
void
e
(
int
x
) {
25
if
(
x
+ ~(
x
-
1
))
26
link_error
();
27
}
28
29
void
f
(
int
x
) {
30
if
(
x
+ ~(
x
+ (-
1
)))
31
link_error
();
32
}
33
34
int
main
(
int
argc
,
char
*
argv
[]) {
35
a
(
argc
);
36
b
(
argc
);
37
c
(
argc
);
38
d
(
argc
);
39
e
(
argc
);
40
f
(
argc
);
41
return
0
;
42
}