Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / negneg-1.c
blob9c6c36998e5ba1b5305011831e22c3b1452cbed4
1 /* { dg-do compile } */
2 /* { dg-options "-O -frounding-math -fdump-tree-optimized-raw -Wno-psabi" } */
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)
10 DEF(1, int, unsigned long long)
11 DEF(2, long long, int)
12 DEF(3, unsigned long long, int)
13 DEF(4, long long, unsigned)
14 DEF(5, unsigned long long, unsigned)
15 DEF(6, float, double)
17 typedef int vec __attribute__((vector_size(4*sizeof(int))));
18 typedef unsigned uvec __attribute__((vector_size(4*sizeof(int))));
19 void h(vec*p,uvec*q){
20 vec a = -*p;
21 *q = -(uvec)a;
24 /* { dg-final { scan-tree-dump-not "negate_expr" "optimized"} } */