b/gcc/testsuite/gcc.dg/pr123109-scalar.c
@@ -7,10 +7,10 @@
#define TEST_EQ(type) \
type test_eq_##type (type a) { return (a >> 31) == 0; }
-TEST_NE(int)
-TEST_NE(unsigned)
-TEST_EQ(int)
-TEST_EQ(unsigned)
+TEST_NE(__INT32_TYPE__)
+TEST_NE(__UINT32_TYPE__)
+TEST_EQ(__INT32_TYPE__)
+TEST_EQ(__UINT32_TYPE__)
/* { dg-final { scan-tree-dump-times ">= 0" 2 optimized } } */
/* { dg-final { scan-tree-dump-times "< 0" 2 optimized } } */
b/gcc/testsuite/gcc.dg/pr123109-vector.c
@@ -2,8 +2,8 @@
/* { dg-options "-Wno-psabi -O2 -fdump-tree-forwprop2" } */
/* { dg-additional-options "-msse2" { target { i?86-*-* x86_64-*-* } }
} */
-typedef int v4si __attribute__((vector_size(4 * sizeof(int))));
-typedef unsigned int v4usi __attribute__((vector_size(4 *
sizeof(unsigned int))));
+typedef __INT32_TYPE__ v4si __attribute__((vector_size(4 *
sizeof(__INT32_TYPE__))));
+typedef __UINT32_TYPE__ v4usi __attribute__((vector_size(4 *
gcc.dg/pr123109-vector.c failed with FAIL: gcc.dg/pr123109-vector.c (test for excess errors) Excess errors: gcc.dg/pr123109-vector.c:9:44: warning: right shift count >= width of vector element [-Wshift-count-overflow] gcc.dg/pr123109-vector.c:9:44: warning: right shift count >= width of vector element [-Wshift-count-overflow] gcc.dg/pr123109-vector.c:12:44: warning: right shift count >= width of vector element [-Wshift-count-overflow] gcc.dg/pr123109-vector.c:12:44: warning: right shift count >= width of vector element [-Wshift-count-overflow] gcc.dg/pr123109-vector.c: pattern found 0 times FAIL: gcc.dg/pr123109-vector.c scan-tree-dump-times forwprop2 ">= { 0, 0, 0, 0 }" 2 in the obvious expectation that the vectors have 4 SImode elements. Hence use __[U]INT32_TYPE__ for the elements instead of [unsigned] int. Similarly, gcc.dg/pr123109-scalar.c failed with: FAIL: gcc.dg/pr123109-scalar.c (test for excess errors) Excess errors: gcc.dg/pr123109-scalar.c:5:44: warning: right shift count >= width of type [-Wshift-count-overflow] gcc.dg/pr123109-scalar.c:5:44: warning: right shift count >= width of type [-Wshift-count-overflow] gcc.dg/pr123109-scalar.c:8:44: warning: right shift count >= width of type [-Wshift-count-overflow] gcc.dg/pr123109-scalar.c:8:44: warning: right shift count >= width of type [-Wshift-count-overflow] gcc.dg/pr123109-scalar.c: pattern found 0 times FAIL: gcc.dg/pr123109-scalar.c scan-tree-dump-times optimized ">= 0" 2 gcc.dg/pr123109-scalar.c: pattern found 0 times FAIL: gcc.dg/pr123109-scalar.c scan-tree-dump-times optimized "< 0" 2 with a similar bogus assumption that int is int32plus. Johann -- gcc/testsuite/ PR testsuite/123109 * gcc.dg/pr123109-vector.c (v4si, v4usi): Use SImode elements. * gcc.dg/pr123109-vector.c: Use 32-bit integer types. sizeof(__INT32_TYPE__)))); #define TEST_NE(type) \ type test_ne_##type (type a) { return (a >> 31) != 0; }