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
libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
tree-ssa
/
negneg-4.c
blob
e1131d06f647b6ae152f54933a1a3a5091ad84e1
1
/* { dg-do run } */
2
/* { dg-options "-O -fwrapv" } */
3
4
#define DEF(num, T1, T2) T2 f##num(T1 x) { \
5
T1 y = -x; \
6
T2 z = (T2)y; \
7
return -z; \
8
}
9
DEF
(
0
,
int
,
long long
)
10
11
int
main
(){
12
volatile
int
a
= -
1
-
__INT_MAX__
;
13
volatile
long long
b
=
f0
(
a
);
14
volatile
long long
c
=
a
;
15
volatile
long long
d
= -
c
;
16
if
(
b
!=
d
)
17
__builtin_abort
();
18
}