Pushed these to trunk as obvious.

Johann

--

    Fix sloppy test case.

    This test case failed with

.../inline-mem-set-1.c:49:20: error: size of array 'p' exceeds maximum object size '32767' .../inline-mem-set-1.c:54:22: error: size of array 'p' exceeds maximum object size '32767'

            PR testsuite/52641
    gcc/testsuite/
            * gcc.dg/torture/inline-mem-set-1.c: Require size20plus.

diff --git a/gcc/testsuite/gcc.dg/torture/inline-mem-set-1.c b/gcc/testsuite/gcc.dg/torture/inline-mem-set-1.c
index bdcf9bf5b61..0727daa6523 100644
--- a/gcc/testsuite/gcc.dg/torture/inline-mem-set-1.c
+++ b/gcc/testsuite/gcc.dg/torture/inline-mem-set-1.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-finline-stringops -fno-lto" } */
+/* { dg-require-effective-target size20plus } */

 void *zero (unsigned long long (*p)[32], int n)
 {

--

    Fix sloppy PR111036 test case

    A test case failed with:

FAIL: gcc.dg/torture/pr111036.c -O2 -flto -fno-use-linker-plugin -flto-partition=none (test for excess errors)
    Excess errors:
.../pr111036.c:13:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

    with the obvious reason that is used unsigned long int
    instead of __UINTPTR_TYPE__.  Adjusted accordingly.

            PR testsuite/111036
    gcc/testsuite/
            * gcc.dg/torture/pr111036.c (foo): Use __UINTPTR_TYPE__
            instead of unsigned long int.

diff --git a/gcc/testsuite/gcc.dg/torture/pr111036.c b/gcc/testsuite/gcc.dg/torture/pr111036.c
index f3a0e61705d..9f8b60bc319 100644
--- a/gcc/testsuite/gcc.dg/torture/pr111036.c
+++ b/gcc/testsuite/gcc.dg/torture/pr111036.c
@@ -10,7 +10,7 @@ __attribute__((aligned(32))) static struct
 static inline void __attribute__((always_inline))
 foo (void *base, size_t length)
 {
-  unsigned long int p = (unsigned long int) base;
+  __UINTPTR_TYPE__ p = (__UINTPTR_TYPE__) base;
   if (__builtin_constant_p(p) && (p & 31) == 0) { exit (0); }
   else if (__builtin_constant_p(length)) { exit (0); }
   else { exit (0); }

--

    PR116353 test requires int32plus.

    This test case breaks with
pr116353.c:34:30: warning: left shift count >= width of type [-Wshift-count-overflow] pr116353.c:38:30: warning: left shift count >= width of type [-Wshift-count-overflow]

    It's unclear how to rewrite the test so it works on int16 without
    spoiling the test case, hence skip if !int32plus.

            PR testsuite/116353
    gcc/testsuite/
            * gcc.dg/torture/pr116353.c: Require int32plus.

diff --git a/gcc/testsuite/gcc.dg/torture/pr116353.c b/gcc/testsuite/gcc.dg/torture/pr116353.c
index 65ea83518cd..f8a9fa8f14d 100644
--- a/gcc/testsuite/gcc.dg/torture/pr116353.c
+++ b/gcc/testsuite/gcc.dg/torture/pr116353.c
@@ -1,5 +1,6 @@
 /* PR tree-optimization/116353 */
 /* { dg-do compile } */
+/* { dg-require-effective-target int32plus } */

 enum desmode { C };
 struct {
(

Reply via email to