Hi, I am struggling against hundreds of fails in the testsuite because many cases are not carefully written, e.g. stull like shifting an int by 19 bits if int is only 16 bits wide.
This patch adds some additional tests to avoid FAILs that are confusing. Sorry for gathering it in one patch, other patches may follow. I just don't like to flood you with bulk of patches. Ok to commit? Johann. testsuite/ * gcc.dg/pragma-align.c: Run only if target !default_packed. * gcc.dg/pr46212.c: Run only if target int32plus. * gcc.dg/torture/pr48146.c: Ditto. * gcc.dg/tree-ssa/vrp51.c: Ditto. * c-c++-common/pr44832.c: Ditto. * gcc.dg/pr49544.c: Run only if target ptr32plus. * gcc.dg/pr31490.c: Ditto. * gcc.dg/torture/builtin-math-7.c: Run only if target large_double. * gcc.dg/torture/pr45764.c: Skip for AVR. * gcc.dg/pr47893.c: Ditto.
Index: gcc.dg/pragma-align.c =================================================================== --- gcc.dg/pragma-align.c (revision 175811) +++ gcc.dg/pragma-align.c (working copy) @@ -1,6 +1,6 @@ /* Prove that pragma alignment handling works somewhat. */ -/* { dg-do run } */ +/* { dg-do run { target { ! default_packed } } } */ extern void abort (void); Index: gcc.dg/pr46212.c =================================================================== --- gcc.dg/pr46212.c (revision 175811) +++ gcc.dg/pr46212.c (working copy) @@ -2,6 +2,7 @@ /* { dg-do compile } */ /* { dg-options "-O3 -funroll-loops" } */ /* { dg-options "-O3 -funroll-loops -march=i386" { target { { i686-*-* x86_64-*-* } && ilp32 } } } */ +/* { dg-require-effective-target int32plus } */ static inline unsigned foo (void *x) Index: gcc.dg/pr49544.c =================================================================== --- gcc.dg/pr49544.c (revision 175811) +++ gcc.dg/pr49544.c (working copy) @@ -1,6 +1,7 @@ /* PR debug/49544 */ /* { dg-do compile } */ /* { dg-options "-g -O2" } */ +/* { dg-require-effective-target ptr32plus } */ int baz (int, int, void *); Index: gcc.dg/torture/pr45764.c =================================================================== --- gcc.dg/torture/pr45764.c (revision 175811) +++ gcc.dg/torture/pr45764.c (working copy) @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-skip-if "Too much RAM needed" { "avr-*-*" } { "*" } { "" } } */ int result[64][16]; Index: gcc.dg/torture/builtin-math-7.c =================================================================== --- gcc.dg/torture/builtin-math-7.c (revision 175811) +++ gcc.dg/torture/builtin-math-7.c (working copy) @@ -6,6 +6,7 @@ /* { dg-do run } */ /* { dg-add-options ieee } */ +/* { dg-require-effective-target large_double } */ extern void link_error(int); Index: gcc.dg/torture/pr48146.c =================================================================== --- gcc.dg/torture/pr48146.c (revision 175811) +++ gcc.dg/torture/pr48146.c (working copy) @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target int32plus } */ static unsigned char safe_sub_func_int_s_s (int si1, unsigned char si2) Index: gcc.dg/pr47893.c =================================================================== --- gcc.dg/pr47893.c (revision 175811) +++ gcc.dg/pr47893.c (working copy) @@ -2,6 +2,7 @@ /* { dg-do run } */ /* { dg-options "-O2" } */ /* { dg-options "-O2 -mtune=atom -fno-omit-frame-pointer -fno-strict-aliasing" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */ +/* { dg-skip-if "Too much RAM needed" { "avr-*-*" } { "*" } { "" } } */ extern void abort (void); Index: gcc.dg/tree-ssa/vrp51.c =================================================================== --- gcc.dg/tree-ssa/vrp51.c (revision 175811) +++ gcc.dg/tree-ssa/vrp51.c (working copy) @@ -1,6 +1,7 @@ /* PR tree-optimization/28632 */ /* { dg-do compile } */ /* { dg-options "-O2 -ftree-vrp" } */ +/* { dg-require-effective-target int32plus } */ void v4 (unsigned a, unsigned b) Index: gcc.dg/pr31490.c =================================================================== --- gcc.dg/pr31490.c (revision 175811) +++ gcc.dg/pr31490.c (working copy) @@ -1,6 +1,8 @@ /* PR middle-end/31490 */ /* { dg-do compile } */ /* { dg-require-named-sections "" } */ +/* { dg-require-effective-target ptr32plus } */ + int cpu (void *attr) {} const unsigned long x __attribute__((section("foo"))) = (unsigned long)&cpu; const unsigned long g __attribute__((section("foo"))) = 0; Index: c-c++-common/pr44832.c =================================================================== --- c-c++-common/pr44832.c (revision 175811) +++ c-c++-common/pr44832.c (working copy) @@ -2,6 +2,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fcompare-debug" } */ /* { dg-options "-O2 -fcompare-debug -fno-short-enums" {target short_enums} } */ +/* { dg-require-effective-target int32plus } */ struct rtx_def; typedef struct rtx_def *rtx;