Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / negneg-4.c
blobe1131d06f647b6ae152f54933a1a3a5091ad84e1
1 /* { dg-do run } */
2 /* { dg-options "-O -fwrapv" } */
4 #define DEF(num, T1, T2) T2 f##num(T1 x) { \
5 T1 y = -x; \
6 T2 z = (T2)y; \
7 return -z; \
9 DEF(0, int, long long)
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();