+2018-02-02 Georg-Johann Lay <avr@gjlay.de>
+
+ PR testsuite/52641
+ * gcc.c-torture/execute/pr83362.c: Make work for int16.
+ * gcc.dg/Wsign-conversion.c: Dito.
+ * gcc.dg/attr-alloc_size-4.c: Dito.
+ * gcc.dg/pr81020.c: Dito.
+ * gcc.dg/pr81192.c: Dito.
+ * gcc.dg/pr83463.c (dg-options): Add -Wno-pointer-to-int-cast.
+ * gcc.dg/attr-alloc_size-11.c: Also special-case avr.
+ * gcc.dg/pr83844.c: Restrict to int32plus.
+ * gcc.dg/attr-alloc_size-3.c: Restrict to size32plus.
+ * gcc.dg/tree-ssa/ldist-25.c: Dito.
+ * gcc.dg/tree-ssa/ldist-27.c: Dito.
+ * gcc.dg/tree-ssa/ldist-28.c: Dito.
+ * gcc.dg/tree-ssa/ldist-29.c: Dito.
+ * gcc.dg/tree-ssa/ldist-30.c: Dito.
+ * gcc.dg/tree-ssa/ldist-31.c: Dito.
+ * gcc.dg/tree-ssa/ldist-32.c: Dito.
+ * gcc.dg/tree-ssa/ldist-33.c: Dito.
+ * gcc.dg/tree-ssa/ldist-34.c: Dito.
+ * gcc.dg/tree-ssa/ldist-35.c: Dito.
+ * gcc.dg/tree-ssa/ldist-36.c: Dito.
+
2018-02-02 Julia Koval <julia.koval@intel.com>
* gcc.target/i386/funcspec-56.inc: Handle new march.
-typedef unsigned char u8;
-typedef unsigned int u32;
+typedef __UINT8_TYPE__ u8;
+typedef __UINT32_TYPE__ u32;
u32 a, b, d, e;
u8 c;
void fuc (unsigned char uc);
unsigned fui (unsigned int ui);
void fsi (signed int ui);
+void fsi32 (__INT32_TYPE__ ui);
void h (int x)
{
unsigned int ui = 3;
int si = 3;
+ __INT32_TYPE__ si32 = 3;
unsigned char uc = 3;
signed char sc = 3;
uc = '\xa0'; /* { dg-warning "unsigned conversion" } */
fui ('\xa0');/* { dg-warning "unsigned conversion" } */
ui = '\xa0'; /* { dg-warning "unsigned conversion" } */
- fsi (0x80000000); /* { dg-warning "signed conversion" } */
- si = 0x80000000; /* { dg-warning "signed conversion" } */
+ fsi32 (0x80000000); /* { dg-warning "signed conversion" } */
+ si32 = 0x80000000; /* { dg-warning "signed conversion" } */
fsi (UINT_MAX - 1); /* { dg-warning "conversion" } */
/* The following tests fail because of missing range information. The xfail
exclusions are PR79356. */
-TEST (signed char, SCHAR_MIN + 2, ALLOC_MAX); /* { dg-warning "argument 1 range \\\[13, \[0-9\]+\\\] exceeds maximum object size 12" "missing range info for signed char" { xfail { ! { aarch64*-*-* arm*-*-* alpha*-*-* ia64-*-* mips*-*-* powerpc*-*-* sparc*-*-* s390*-*-* visium-*-* } } } } */
-TEST (short, SHRT_MIN + 2, ALLOC_MAX); /* { dg-warning "argument 1 range \\\[13, \[0-9\]+\\\] exceeds maximum object size 12" "missing range info for short" { xfail { ! { aarch64*-*-* arm*-*-* alpha*-*-* ia64-*-* mips*-*-* powerpc*-*-* sparc*-*-* s390x-*-* visium-*-* } } } } */
+TEST (signed char, SCHAR_MIN + 2, ALLOC_MAX); /* { dg-warning "argument 1 range \\\[13, \[0-9\]+\\\] exceeds maximum object size 12" "missing range info for signed char" { xfail { ! { aarch64*-*-* arm*-*-* avr-*-* alpha*-*-* ia64-*-* mips*-*-* powerpc*-*-* sparc*-*-* s390*-*-* visium-*-* } } } } */
+TEST (short, SHRT_MIN + 2, ALLOC_MAX); /* { dg-warning "argument 1 range \\\[13, \[0-9\]+\\\] exceeds maximum object size 12" "missing range info for short" { xfail { ! { aarch64*-*-* arm*-*-* alpha*-*-* avr-*-* ia64-*-* mips*-*-* powerpc*-*-* sparc*-*-* s390x-*-* visium-*-* } } } } */
TEST (int, INT_MIN + 2, ALLOC_MAX); /* { dg-warning "argument 1 range \\\[13, \[0-9\]+\\\] exceeds maximum object size 12" } */
TEST (int, -3, ALLOC_MAX); /* { dg-warning "argument 1 range \\\[13, \[0-9\]+\\\] exceeds maximum object size 12" } */
TEST (int, -2, ALLOC_MAX); /* { dg-warning "argument 1 range \\\[13, \[0-9\]+\\\] exceeds maximum object size 12" } */
functions decorated with attribute alloc_size that either overflow or
exceed the default maximum object size (with -Walloc-size-larger-than
not explicitly specified). */
-/* { dg-do compile } */
+/* { dg-do compile { target size32plus } } */
/* { dg-options "-O2 -Wall" } */
#define SCHAR_MAX __SCHAR_MAX__
sink (f_size_2 ( 0, 1234));
sink (f_size_2 ( 1, 1234));
sink (f_size_2 ( 2, 1234)); /* { dg-warning "product .2 \\* 1234. of arguments 1 and 2 exceeds maximum object size \[0-9\]+" } */
- sink (f_size_2 (1234, 1234)); /* { dg-warning "product .1234 \\* 1234. of arguments 1 and 2 exceeds maximum object size 1234" } */
+ sink (f_size_2 (1234, 1234)); /* { dg-warning "product .1234 \\* 1234. of arguments 1 and 2 exceeds (.SIZE_MAX.|maximum object size 1234)" } */
sink (f_size_2 (1235, 1234)); /* { dg-warning "argument 1 value .1235. exceeds maximum object size 1234" } */
sink (f_size_2 (1234, 1235)); /* { dg-warning "argument 2 value .1235. exceeds maximum object size 1234" } */
sink (f_size_2 (1234, max)); /* { dg-warning "argument 2 value .\[0-9\]+. exceeds maximum object size 1234" } */
unsigned long long __attribute__((noipa))
foo (unsigned x)
{
+#if __SIZEOF_INT__ == 2
+ __UINT32_TYPE__ a = v;
+#else
unsigned a = v;
+#endif
a &= 1;
x |= 0 < a;
a >>= 31;
/* { dg-options "-Os -fdump-tree-pre-details" } */
+#if __SIZEOF_INT__ == 2
+#define unsigned __UINT32_TYPE__
+#define int __INT32_TYPE__
+#endif
+
unsigned a;
int b, c;
/* PR middle-end/83463 */
/* { dg-do compile } */
-/* { dg-options "-O2 -Wrestrict" } */
+/* { dg-options "-O2 -Wrestrict -Wno-pointer-to-int-cast" } */
int *a;
void *memcpy ();
/* PR c/83844 */
-/* { dg-do compile } */
+/* { dg-do compile { target int32plus } } */
/* { dg-options "-O0 -Wall" } */
typedef unsigned long long __u64 __attribute__((aligned(4),warn_if_not_aligned(8)));
-/* { dg-do compile } */
+/* { dg-do compile { target size32plus } } */
/* { dg-options "-O3 -ftree-loop-distribute-patterns -fdump-tree-ldist-details" } */
#define k 1335
-/* { dg-do run } */
+/* { dg-do run { target size32plus } } */
/* { dg-options "-O3 -ftree-loop-distribute-patterns -fdump-tree-ldist-details" } */
/* { dg-skip-if "too big data segment" { visium-*-* } } */
-/* { dg-do compile } */
+/* { dg-do compile { target size32plus } } */
/* { dg-options "-O2 -ftree-loop-distribution -ftree-loop-distribute-patterns -fdump-tree-ldist-details" } */
#define M (256)
-/* { dg-do compile } */
+/* { dg-do compile { target size32plus } } */
/* { dg-options "-O2 -ftree-loop-distribution -ftree-loop-distribute-patterns -fdump-tree-ldist-details" } */
#define M (256)
-/* { dg-do compile } */
+/* { dg-do compile { target size32plus } } */
/* { dg-options "-O2 -ftree-loop-distribution -ftree-loop-distribute-patterns -fdump-tree-ldist-details" } */
#define M (256)
-/* { dg-do compile } */
+/* { dg-do compile { target size32plus } } */
/* { dg-options "-O2 -ftree-loop-distribution -ftree-loop-distribute-patterns -fdump-tree-ldist-details" } */
#define M (256)
-/* { dg-do compile } */
+/* { dg-do compile { target size32plus } } */
/* { dg-options "-O2 -ftree-loop-distribution -ftree-loop-distribute-patterns -fdump-tree-ldist-details" } */
#define M (256)
-/* { dg-do compile } */
+/* { dg-do compile { target size32plus } } */
/* { dg-options "-O2 -ftree-loop-distribution -ftree-loop-distribute-patterns -fdump-tree-ldist-details" } */
#define N (1024)
-/* { dg-do compile } */
+/* { dg-do compile { target size32plus } } */
/* { dg-options "-O2 -ftree-loop-distribution" } */
#define X (3.0)
-/* { dg-do compile } */
+/* { dg-do compile { target size32plus } } */
/* { dg-options "-O2 -ftree-loop-distribution -ftree-loop-distribute-patterns -fdump-tree-ldist-details" } */
#define M (256)
-/* { dg-do compile } */
+/* { dg-do compile { target size32plus } } */
/* { dg-options "-O2 -ftree-loop-distribution -ftree-loop-distribute-patterns -fdump-tree-ldist-details" } */
#define M (256)