From: Andreas Krebbel Date: Wed, 1 Aug 2007 08:47:17 +0000 (+0000) Subject: s390.md (TF in GPR splitter): Change operand_subword parameter to TFmode. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e5170888518ec938608710839cefe169c46d463;p=thirdparty%2Fgcc.git s390.md (TF in GPR splitter): Change operand_subword parameter to TFmode. 2007-08-01 Andreas Krebbel * config/s390/s390.md (TF in GPR splitter): Change operand_subword parameter to TFmode. 2007-08-01 Andreas Krebbel * gcc.dg/20070801-1.c: New testcase. From-SVN: r127116 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c55224baf69f..4225d4ce352f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2007-08-01 Andreas Krebbel + + * config/s390/s390.md (TF in GPR splitter): Change operand_subword + parameter to TFmode. + 2007-07-16 Richard Guenther Uros Bizjak diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index 6d994c87944b..d2c10337c54f 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -1578,7 +1578,7 @@ && !s_operand (operands[1], VOIDmode)" [(set (match_dup 0) (match_dup 1))] { - rtx addr = operand_subword (operands[0], 1, 0, DFmode); + rtx addr = operand_subword (operands[0], 1, 0, TFmode); s390_load_address (addr, XEXP (operands[1], 0)); operands[1] = replace_equiv_address (operands[1], addr); }) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ad80215cd17c..a292d2f5c545 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2007-08-01 Andreas Krebbel + + * gcc.dg/20070801-1.c: New testcase. + 2007-07-21 Kaveh R. Ghazi * gcc.dg/c99-math-double-1.c: Mark test variables as volatile. diff --git a/gcc/testsuite/gcc.dg/20070801-1.c b/gcc/testsuite/gcc.dg/20070801-1.c new file mode 100644 index 000000000000..d6a034cd13d3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/20070801-1.c @@ -0,0 +1,62 @@ +/* This failed on s390x due to a back end bug. */ + +/* { dg-do compile { target fpic } } */ +/* { dg-options "-O2 -fpic" } */ + +typedef long unsigned int size_t; +typedef enum +{ + TYPE_SCHAR, TYPE_LONGDOUBLE +} +arg_type; + +typedef struct +{ + arg_type type; + union + { + signed char a_schar; + long double a_longdouble; + } + a; +} +argument; + +typedef struct +{ + argument *arg; +} +arguments; + +int ind; + +extern void foo (arguments *a); + +void +bar () +{ + arguments a; + char *buf; + char *result; + int uninitialized; + int count, i; + int retcount; + + foo (&a); + + switch (a.arg[ind].type) + { + case TYPE_SCHAR: + { + if (uninitialized == 0) + __builtin___snprintf_chk (result, 10, 1, 10, buf, 1, &count); + } + case TYPE_LONGDOUBLE: + { + long double arg = a.arg[ind].a.a_longdouble; + + if (uninitialized == 0) + __builtin___snprintf_chk (result, 10, 1, 10, buf, arg, &count); + } + } +}