Commit adc86fa5 by Georg-Johann Lay Committed by Georg-Johann Lay

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) <struct S>: 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
parent e76d3098
2016-12-21 Georg-Johann Lay <avr@gjlay.de>
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) <struct S>: 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 <toma.tabacu@imgtec.com> 2016-12-21 Toma Tabacu <toma.tabacu@imgtec.com>
* gcc.target/mips/msa-builtins.c (msa_insert_d): Tweak expected output. * gcc.target/mips/msa-builtins.c (msa_insert_d): Tweak expected output.
......
...@@ -69,6 +69,10 @@ static short ia9[9]; ...@@ -69,6 +69,10 @@ static short ia9[9];
extern int ia0[0]; extern int ia0[0];
static int ia1[1]; static int ia1[1];
static int ia9[9]; static int ia9[9];
#elif __SIZEOF_LONG__ == 4
extern long ia0[0];
static long ia1[1];
static long ia9[9];
#endif #endif
static char a2x2[2][2]; static char a2x2[2][2];
......
...@@ -64,6 +64,10 @@ static short ia9[9]; ...@@ -64,6 +64,10 @@ static short ia9[9];
extern int ia0[0]; extern int ia0[0];
static int ia1[1]; static int ia1[1];
static int ia9[9]; static int ia9[9];
#elif __SIZEOF_LONG__ == 4
extern long ia0[0];
static long ia1[1];
static long ia9[9];
#endif #endif
static char a2x2[2][2]; static char a2x2[2][2];
......
...@@ -105,7 +105,7 @@ test2 (const H h) ...@@ -105,7 +105,7 @@ test2 (const H h)
unsigned char buf[21]; unsigned char buf[21];
memset (buf + 16, 0, 8); /* { dg-warning "writing 8 " "memset" } */ 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]; S *s[3];
memset (s, 0, sizeof (S) * 3); /* { dg-warning "writing 48 " "memset" } */ memset (s, 0, sizeof (S) * 3); /* { dg-warning "writing 48 " "memset" } */
......
/* PR c/78408 */ /* PR c/78408 */
/* { dg-do compile } */ /* { dg-do compile { target size32plus } } */
/* { dg-options "-O2 -fdump-tree-fab1-details" } */ /* { dg-options "-O2 -fdump-tree-fab1-details" } */
/* { dg-final { scan-tree-dump-times "after previous" 17 "fab1" } } */ /* { dg-final { scan-tree-dump-times "after previous" 17 "fab1" } } */
......
/* PR c/78408 */ /* PR c/78408 */
/* { dg-do compile } */ /* { dg-do compile { target size32plus } } */
/* { dg-options "-O2 -fdump-tree-fab1-details" } */ /* { dg-options "-O2 -fdump-tree-fab1-details" } */
/* { dg-final { scan-tree-dump-not "after previous" "fab1" } } */ /* { dg-final { scan-tree-dump-not "after previous" "fab1" } } */
......
/* PR tree-optimization/78428. */ /* PR tree-optimization/78428. */
/* { dg-options "-O2" } */ /* { dg-options "-O2" } */
/* { dg-do run } */ /* { dg-do run { target int32plus } } */
struct S0 struct S0
{ {
......
/* { dg-do compile } */ /* { dg-do compile { target trampolines } } */
/* { dg-options "-O2 -fdump-tree-tailc-details" } */ /* { dg-options "-O2 -fdump-tree-tailc-details" } */
struct s { int x; }; struct s { int x; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment