[testsuite] Fix more bogus test failures for avr

Message ID 87d1kypni0.fsf@atmel.com
State New
Headers show

Commit Message

Senthil Kumar Selvaraj Aug. 24, 2016, 8:41 a.m.
Hi,

  This patch fixes a couple of testsuite failures for the avr target by
  requiring int32plus support for zero_sign_ext_test.c, and explicitly
  using __UINT32_TYPE__ instead of assuming 32 bit ints for pr71083.c

  Regtested with avr and x86_64-pc-linux. Committed to trunk.

Regards
Senthil

gcc/testsuite/ChangeLog

2016-08-24  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

        * gcc.c-torture/execute/pr71083.c: Use UINT32_TYPE instead
        of unsigned int.
        * gcc.dg/zero_sign_ext_test.c: Require int32plus.

Patch

Index: gcc/testsuite/gcc.c-torture/execute/pr71083.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/pr71083.c	(revision 239731)
+++ gcc/testsuite/gcc.c-torture/execute/pr71083.c	(working copy)
@@ -1,5 +1,7 @@ 
+__extension__ typedef __UINT32_TYPE__ uint32_t;
+
 struct lock_chain {
-  unsigned int irq_context: 2,
+  uint32_t irq_context: 2,
     depth: 6,
     base: 24;
 };
Index: gcc/testsuite/gcc.dg/zero_sign_ext_test.c
===================================================================
--- gcc/testsuite/gcc.dg/zero_sign_ext_test.c	(revision 239731)
+++ gcc/testsuite/gcc.dg/zero_sign_ext_test.c	(working copy)
@@ -2,6 +2,7 @@ 
 
 /* { dg-options "-O2" } */
 /* { dg-do run } */
+/* { dg-require-effective-target int32plus } */
 
 #define TYPE_MAX(type, sign)	\
   ((!sign) ? ((1 << (sizeof (type) * 8 - 1)) - 1) :	\