predicates.md (easy_fp_constant): Reject TFmode constants for E500 double.
authorJoseph Myers <joseph@codesourcery.com>
Sat, 28 Jun 2008 19:40:03 +0000 (20:40 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Sat, 28 Jun 2008 19:40:03 +0000 (20:40 +0100)
* config/rs6000/predicates.md (easy_fp_constant): Reject TFmode
constants for E500 double.

testsuite:
* gcc.c-torture/compile/20080628-1.c: New test.

From-SVN: r137232

gcc/ChangeLog
gcc/config/rs6000/predicates.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/20080628-1.c [new file with mode: 0644]

index 909e4a6933842e9d93f659d3db1b12f20daf7e55..22c364936dd8fe890461ac3d07b7930bfdfcc005 100644 (file)
@@ -1,3 +1,8 @@
+2008-06-28  Joseph Myers  <joseph@codesourcery.com>
+
+       * config/rs6000/predicates.md (easy_fp_constant): Reject TFmode
+       constants for E500 double.
+
 2008-06-28  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
        * doc/rtl.texi (const_vector): Document const_fixed as legitimate
index 98cbdc64f91b0086980a1f3a053f7ec9b8920d95..8e97c79acd21fbec830a74ed802c4af181a3451d 100644 (file)
   switch (mode)
     {
     case TFmode:
+      if (TARGET_E500_DOUBLE)
+       return 0;
+
       REAL_VALUE_FROM_CONST_DOUBLE (rv, op);
       REAL_VALUE_TO_TARGET_LONG_DOUBLE (rv, k);
 
index 39d0a71a401ef382f082426986d24b46c714b4c0..b56104c323843fb80344087a93efa53d8c2aa92c 100644 (file)
@@ -1,3 +1,7 @@
+2008-06-28  Joseph Myers  <joseph@codesourcery.com>
+
+       * gcc.c-torture/compile/20080628-1.c: New test.
+
 2008-06-28  Richard Guenther  <rguenther@suse.de>
 
        * gcc.c-torture/execute/pta-field-1.c: Add return 0.
diff --git a/gcc/testsuite/gcc.c-torture/compile/20080628-1.c b/gcc/testsuite/gcc.c-torture/compile/20080628-1.c
new file mode 100644 (file)
index 0000000..aca4ff8
--- /dev/null
@@ -0,0 +1,15 @@
+void f (long double, long double);
+
+struct s {
+  char c;
+  struct s *p;
+} *p;
+
+void
+g (void)
+{
+  long double ld;
+  p->p->c = 1;
+  ld = p->p->c;
+  f (ld, 1.0L);
+}