]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR target/57655 (ICE: in create_pre_exit, at mode-switching.c:418 with...
authorUros Bizjak <ubizjak@gmail.com>
Fri, 5 Jul 2013 14:04:26 +0000 (16:04 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Fri, 5 Jul 2013 14:04:26 +0000 (16:04 +0200)
Backport from mainline
2013-06-20  Uros Bizjak  <ubizjak@gmail.com>

PR target/57655
* config/i386/i386.c (construct_container): Report error if
long double is used with disabled x87 float returns.

testsuite/ChangeLog:

Backport from mainline
2013-06-20  Uros Bizjak  <ubizjak@gmail.com>

PR target/57655
* gcc.target/i386/pr57655.c: New test.

From-SVN: r200716

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr57655.c [new file with mode: 0644]

index 2bfabf7b728860230b2b4c8b3c7f73bff9104e24..37b67a5215f2a0eec4584c86f9546fae5e1d6cad 100644 (file)
@@ -1,3 +1,12 @@
+2013-07-05  Uros Bizjak  <ubizjak@gmail.com>
+
+       Backport from mainline
+       2013-06-20  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/57655
+       * config/i386/i386.c (construct_container): Report error if
+       long double is used with disabled x87 float returns.
+
 2013-06-21  David Edelsohn  <dje.gcc@gmail.com>
 
        Backport from mainline
index 5bcb7e0db92d6b93e5036a2beb5e21abbeb53bc8..a6b53e99e546b8033a453a32aa938b8e84c86ef9 100644 (file)
@@ -6303,7 +6303,7 @@ construct_container (enum machine_mode mode, enum machine_mode orig_mode,
 
   /* Likewise, error if the ABI requires us to return values in the
      x87 registers and the user specified -mno-80387.  */
-  if (!TARGET_80387 && in_return)
+  if (!TARGET_FLOAT_RETURNS_IN_80387 && in_return)
     for (i = 0; i < n; i++)
       if (regclass[i] == X86_64_X87_CLASS
          || regclass[i] == X86_64_X87UP_CLASS
index d1abd627cc0c1d5b516e563cacb7b21592a8f95c..6fd55a6a30828674a0beb137f5619dd6c523de31 100644 (file)
@@ -1,3 +1,11 @@
+2013-07-05  Uros Bizjak  <ubizjak@gmail.com>
+
+       Backport from mainline
+       2013-06-20  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/57655
+       * gcc.target/i386/pr57655.c: New test.
+
 2013-06-09  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/57568
diff --git a/gcc/testsuite/gcc.target/i386/pr57655.c b/gcc/testsuite/gcc.target/i386/pr57655.c
new file mode 100644 (file)
index 0000000..586d338
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx -mvzeroupper -mno-fp-ret-in-387" }
+
+/* { dg-error "x87 register return with x87 disabled" "" { target { ! ia32 } } 8 } */
+
+long double
+foo (long double x)
+{
+  return __builtin_ilogbl (x);
+}