]> 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:43:06 +0000 (08:43 +0000)
committerAndreas Krebbel <krebbel@gcc.gnu.org>
Wed, 1 Aug 2007 08:43:06 +0000 (08:43 +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: r127115

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

index 2383a0e5c871739f3714b2be30039f10a9f80043..1d966df49ad16e113dfb963ab31adb7eb38b182b 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-30  Mark Mitchell  <mark@codesourcery.com>
 
        * BASE-VER: Bump.
index 23484098f790fa1402f753de02b78306a69822a8..0dfc0c451b7c67a55f4c867ea9778b617255c8ec 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 7a904c901d39bb2e1497808dde9b7d2dff4466b9..10a9da7ae02584b0ced4764ec91b02c752a8468f 100644 (file)
@@ -1,3 +1,7 @@
+2007-08-01  Andreas Krebbel  <krebbel1@de.ibm.com>
+
+       * gcc.dg/20070801-1.c: New testcase.
+
 2007-07-30  Paolo Carlini  <pcarlini@suse.de>
 
        PR c++/32108
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);
+      }
+    }
+}