From: Uros Bizjak Date: Thu, 20 Jun 2013 18:13:31 +0000 (+0200) Subject: re PR target/57655 (ICE: in create_pre_exit, at mode-switching.c:418 with -mno-fp... X-Git-Tag: releases/gcc-4.9.0~5302 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=49b4ff639e15ea4f04355395f2d87d7fff94824d;p=thirdparty%2Fgcc.git re PR target/57655 (ICE: in create_pre_exit, at mode-switching.c:418 with -mno-fp-ret-in-387 -mvzeroupper -mxop and __builtin_ilogbl()) PR target/57655 * config/i386/i386.c (construct_container): Report error if long double is used with disabled x87 float returns. testsuite/ChangeLog: PR target/57655 * gcc.target/i386/pr57655.c: New test. From-SVN: r200260 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8fad2257455b..40a36c0df5a1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2013-06-20 Uros Bizjak + + PR target/57655 + * config/i386/i386.c (construct_container): Report error if + long double is used with disabled x87 float returns. + 2013-06-20 Jan Hubicka * lto-cgraph.c (input_symtab): Do not set cgraph state. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 0060b793807e..d134604eee3f 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -6498,7 +6498,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 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 94ebf89f03aa..c606a6ecf3d9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-06-20 Uros Bizjak + + PR target/57655 + * gcc.target/i386/pr57655.c: New test. + 2013-06-20 Eric Botcazou * ada/acats/tests/gcc: Delete. diff --git a/gcc/testsuite/gcc.target/i386/pr57655.c b/gcc/testsuite/gcc.target/i386/pr57655.c new file mode 100644 index 000000000000..586d33862223 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr57655.c @@ -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); +}