From: Georg-Johann Lay Date: Wed, 21 Dec 2016 13:50:11 +0000 (+0000) Subject: re PR testsuite/52641 (Test cases fail for 16-bit int targets) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=adc86fa52f4acec9cc8dc7243510d9c4eeee53d7;p=gcc.git re PR testsuite/52641 (Test cases fail for 16-bit int targets) gcc/testsuite/ PR testsuite/52641 * gcc.dg/builtin-object-size-16.c (ia0, ia1, ia9): Handle case where neither short nor int has a size of 4; use long. * gcc.dg/builtin-object-size-17.c: Same. * gcc.dg/builtin-stringop-chk-1.c (test2) : Use int32_t for components as 4 components are supposed to occupy 16 bytes. * gcc.dg/pr78408-1.c: Require target size32plus. * gcc.dg/pr78408-2.c: Same. * gcc.dg/tree-ssa/pr78428.c. Require target int32plus. * gcc.dg/tree-ssa/tailcall-7.c: Require target trampolines. From-SVN: r243854 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4f7b1ee93bd..b178e7335e8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,16 @@ +2016-12-21 Georg-Johann Lay + + PR testsuite/52641 + * gcc.dg/builtin-object-size-16.c (ia0, ia1, ia9): Handle case + where neither short nor int has a size of 4; use long. + * gcc.dg/builtin-object-size-17.c: Same. + * gcc.dg/builtin-stringop-chk-1.c (test2) : Use int32_t + for components as 4 components are supposed to occupy 16 bytes. + * gcc.dg/pr78408-1.c: Require target size32plus. + * gcc.dg/pr78408-2.c: Same. + * gcc.dg/tree-ssa/pr78428.c. Require target int32plus. + * gcc.dg/tree-ssa/tailcall-7.c: Require target trampolines. + 2016-12-21 Toma Tabacu * gcc.target/mips/msa-builtins.c (msa_insert_d): Tweak expected output. diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-16.c b/gcc/testsuite/gcc.dg/builtin-object-size-16.c index 15721e5ce89..48229390bfd 100644 --- a/gcc/testsuite/gcc.dg/builtin-object-size-16.c +++ b/gcc/testsuite/gcc.dg/builtin-object-size-16.c @@ -69,6 +69,10 @@ static short ia9[9]; extern int ia0[0]; static int ia1[1]; static int ia9[9]; +#elif __SIZEOF_LONG__ == 4 +extern long ia0[0]; +static long ia1[1]; +static long ia9[9]; #endif static char a2x2[2][2]; diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-17.c b/gcc/testsuite/gcc.dg/builtin-object-size-17.c index 03664d5d9a5..0497bbf4505 100644 --- a/gcc/testsuite/gcc.dg/builtin-object-size-17.c +++ b/gcc/testsuite/gcc.dg/builtin-object-size-17.c @@ -64,6 +64,10 @@ static short ia9[9]; extern int ia0[0]; static int ia1[1]; static int ia9[9]; +#elif __SIZEOF_LONG__ == 4 +extern long ia0[0]; +static long ia1[1]; +static long ia9[9]; #endif static char a2x2[2][2]; diff --git a/gcc/testsuite/gcc.dg/builtin-stringop-chk-1.c b/gcc/testsuite/gcc.dg/builtin-stringop-chk-1.c index 7689287cb1e..3d970d772a2 100644 --- a/gcc/testsuite/gcc.dg/builtin-stringop-chk-1.c +++ b/gcc/testsuite/gcc.dg/builtin-stringop-chk-1.c @@ -105,7 +105,7 @@ test2 (const H h) unsigned char buf[21]; memset (buf + 16, 0, 8); /* { dg-warning "writing 8 " "memset" } */ - typedef struct { int i, j, k, l; } S; + typedef struct { __INT32_TYPE__ i, j, k, l; } S; S *s[3]; memset (s, 0, sizeof (S) * 3); /* { dg-warning "writing 48 " "memset" } */ diff --git a/gcc/testsuite/gcc.dg/pr78408-1.c b/gcc/testsuite/gcc.dg/pr78408-1.c index a7a772a2be7..94e2090b374 100644 --- a/gcc/testsuite/gcc.dg/pr78408-1.c +++ b/gcc/testsuite/gcc.dg/pr78408-1.c @@ -1,5 +1,5 @@ /* PR c/78408 */ -/* { dg-do compile } */ +/* { dg-do compile { target size32plus } } */ /* { dg-options "-O2 -fdump-tree-fab1-details" } */ /* { dg-final { scan-tree-dump-times "after previous" 17 "fab1" } } */ diff --git a/gcc/testsuite/gcc.dg/pr78408-2.c b/gcc/testsuite/gcc.dg/pr78408-2.c index 7870e4e7ca6..89c9b7eae43 100644 --- a/gcc/testsuite/gcc.dg/pr78408-2.c +++ b/gcc/testsuite/gcc.dg/pr78408-2.c @@ -1,5 +1,5 @@ /* PR c/78408 */ -/* { dg-do compile } */ +/* { dg-do compile { target size32plus } } */ /* { dg-options "-O2 -fdump-tree-fab1-details" } */ /* { dg-final { scan-tree-dump-not "after previous" "fab1" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr78428.c b/gcc/testsuite/gcc.dg/tree-ssa/pr78428.c index 3a9b99c7e03..fa1cc9b0b61 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr78428.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr78428.c @@ -1,6 +1,6 @@ /* PR tree-optimization/78428. */ /* { dg-options "-O2" } */ -/* { dg-do run } */ +/* { dg-do run { target int32plus } } */ struct S0 { diff --git a/gcc/testsuite/gcc.dg/tree-ssa/tailcall-7.c b/gcc/testsuite/gcc.dg/tree-ssa/tailcall-7.c index eabf1a86dd3..def8d137f7c 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/tailcall-7.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/tailcall-7.c @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do compile { target trampolines } } */ /* { dg-options "-O2 -fdump-tree-tailc-details" } */ struct s { int x; };