comparison gcc/testsuite/gcc.dg/tree-ssa/negneg-4.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
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 }