]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
s390.md (TF in GPR splitter): Change operand_subword parameter to TFmode.
authorAndreas Krebbel <krebbel1@de.ibm.com>
Wed, 1 Aug 2007 08:47:17 +0000 (08:47 +0000)
committerAndreas Krebbel <krebbel@gcc.gnu.org>
Wed, 1 Aug 2007 08:47:17 +0000 (08:47 +0000)
2007-08-01  Andreas Krebbel  <krebbel1@de.ibm.com>

* config/s390/s390.md (TF in GPR splitter): Change operand_subword
parameter to TFmode.

2007-08-01  Andreas Krebbel  <krebbel1@de.ibm.com>

* gcc.dg/20070801-1.c: New testcase.

From-SVN: r127116

gcc/ChangeLog
gcc/config/s390/s390.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/20070801-1.c [new file with mode: 0644]

index c55224baf69f3a234d5dd8e16733023f1d13bacb..4225d4ce352fa2a70480e82d7ee9bb245e16a673 100644 (file)
@@ -1,3 +1,8 @@
+2007-08-01  Andreas Krebbel  <krebbel1@de.ibm.com>
+
+       * config/s390/s390.md (TF in GPR splitter): Change operand_subword
+       parameter to TFmode.
+
 2007-07-16  Richard Guenther  <rguenther@suse.de>
            Uros Bizjak  <ubizjak@gmail.com>
 
index 6d994c87944bbc844db1826df8194d1390e2abbb..d2c10337c54f97baa605cce332ec82191cd7bb65 100644 (file)
    && !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);
 })
index ad80215cd17c3ec5eb86556749648b7920958388..a292d2f5c54594e033f789227c0568a8b7d74691 100644 (file)
@@ -1,3 +1,7 @@
+2007-08-01  Andreas Krebbel  <krebbel1@de.ibm.com>
+
+       * gcc.dg/20070801-1.c: New testcase.
+
 2007-07-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * 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 (file)
index 0000000..d6a034c
--- /dev/null
@@ -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);
+      }
+    }
+}