public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: gcc-patches@gcc.gnu.org
Cc: Andi Kleen <ak@linux.intel.com>
Subject: [PATCH 1/2] Remove -fshort-double
Date: Sat, 27 Sep 2014 13:55:00 -0000	[thread overview]
Message-ID: <1411826065-15761-1-git-send-email-andi@firstfloor.org> (raw)

From: Andi Kleen <ak@linux.intel.com>

-fshort-double has crashes the compiler since 4.6 (see PR60410)
Since it's an obscure option that apparently nobody uses it the
best way to fix it seems to just remove it.

This prevents constant ICEs when running an gcc optimization flags
autotuner.

gcc/testsuite/:

2014-09-26  Andi Kleen  <ak@linux.intel.com>

	PR target/60410
	* gcc.dg/lto/pr55113_0.c: Remove.

gcc/:

2014-09-26  Andi Kleen  <ak@linux.intel.com>

	PR target/60410
	* doc/invoke.texi: Remove -fshort-double.
	* lto-wrapper.c (merge_and_complain): Dito.
	(run_gcc): Dito.

gcc/c-family/:

2014-09-26  Andi Kleen  <ak@linux.intel.com>

	PR target/60410
	* c-common.c (c_common_nodes_and_builtins): Remove
	-fshort-double.
	* c.opt: Dito.

gcc/lto/:

2014-09-26  Andi Kleen  <ak@linux.intel.com>

	PR target/60410
	* lto-lang.c (lto_init): Remove -fshort-double.
---
 gcc/c-family/c-common.c              |  2 +-
 gcc/c-family/c.opt                   |  4 ----
 gcc/doc/invoke.texi                  | 10 +---------
 gcc/lto-wrapper.c                    |  3 ---
 gcc/lto/lto-lang.c                   |  2 +-
 gcc/testsuite/gcc.dg/lto/pr55113_0.c | 14 --------------
 6 files changed, 3 insertions(+), 32 deletions(-)
 delete mode 100644 gcc/testsuite/gcc.dg/lto/pr55113_0.c

diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index a9e0191..7a529a2 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -5325,7 +5325,7 @@ c_common_nodes_and_builtins (void)
   tree va_list_ref_type_node;
   tree va_list_arg_type_node;
 
-  build_common_tree_nodes (flag_signed_char, flag_short_double);
+  build_common_tree_nodes (flag_signed_char, false);
 
   /* Define `int' and `char' first so that dbx will output them first.  */
   record_builtin_type (RID_INT, NULL, integer_type_node);
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index 72ac2ed..d6a9698 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -1251,10 +1251,6 @@ frtti
 C++ ObjC++ Optimization Var(flag_rtti) Init(1)
 Generate run time type descriptor information
 
-fshort-double
-C ObjC C++ ObjC++ LTO Optimization Var(flag_short_double)
-Use the same size for double as for float
-
 fshort-enums
 C ObjC C++ ObjC++ LTO Optimization Var(flag_short_enums)
 Use the narrowest integer type possible for enumeration types
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 0c3f4be..b2b667d 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -1094,7 +1094,7 @@ See S/390 and zSeries Options.
 -fno-jump-tables @gol
 -frecord-gcc-switches @gol
 -freg-struct-return  -fshort-enums @gol
--fshort-double  -fshort-wchar @gol
+-fshort-wchar @gol
 -fverbose-asm  -fpack-struct[=@var{n}]  -fstack-check @gol
 -fstack-limit-register=@var{reg}  -fstack-limit-symbol=@var{sym} @gol
 -fno-stack-limit -fsplit-stack @gol
@@ -22598,14 +22598,6 @@ is equivalent to the smallest integer type that has enough room.
 code that is not binary compatible with code generated without that switch.
 Use it to conform to a non-default application binary interface.
 
-@item -fshort-double
-@opindex fshort-double
-Use the same size for @code{double} as for @code{float}.
-
-@strong{Warning:} the @option{-fshort-double} switch causes GCC to generate
-code that is not binary compatible with code generated without that switch.
-Use it to conform to a non-default application binary interface.
-
 @item -fshort-wchar
 @opindex fshort-wchar
 Override the underlying type for @samp{wchar_t} to be @samp{short
diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
index 08fd090..a2ce79c 100644
--- a/gcc/lto-wrapper.c
+++ b/gcc/lto-wrapper.c
@@ -275,7 +275,6 @@ merge_and_complain (struct cl_decoded_option **decoded_options,
 
 	case OPT_freg_struct_return:
 	case OPT_fpcc_struct_return:
-	case OPT_fshort_double:
 	  for (j = 0; j < *decoded_options_count; ++j)
 	    if ((*decoded_options)[j].opt_index == foption->opt_index)
 	      break;
@@ -500,7 +499,6 @@ run_gcc (unsigned argc, char *argv[])
 	case OPT_fgnu_tm:
 	case OPT_freg_struct_return:
 	case OPT_fpcc_struct_return:
-	case OPT_fshort_double:
 	case OPT_ffp_contract_:
 	case OPT_fwrapv:
 	case OPT_ftrapv:
@@ -573,7 +571,6 @@ run_gcc (unsigned argc, char *argv[])
 
 	case OPT_freg_struct_return:
 	case OPT_fpcc_struct_return:
-	case OPT_fshort_double:
 	  /* Ignore these, they are determined by the input files.
 	     ???  We fail to diagnose a possible mismatch here.  */
 	  continue;
diff --git a/gcc/lto/lto-lang.c b/gcc/lto/lto-lang.c
index 9e8524a..57b4f71 100644
--- a/gcc/lto/lto-lang.c
+++ b/gcc/lto/lto-lang.c
@@ -1165,7 +1165,7 @@ lto_init (void)
   flag_generate_lto = (flag_wpa != NULL);
 
   /* Create the basic integer types.  */
-  build_common_tree_nodes (flag_signed_char, flag_short_double);
+  build_common_tree_nodes (flag_signed_char, false);
 
   /* The global tree for the main identifier is filled in by
      language-specific front-end initialization that is not run in the
diff --git a/gcc/testsuite/gcc.dg/lto/pr55113_0.c b/gcc/testsuite/gcc.dg/lto/pr55113_0.c
deleted file mode 100644
index 8c30976..0000000
--- a/gcc/testsuite/gcc.dg/lto/pr55113_0.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/* PR 55113 */
-/* { dg-lto-do link } */
-/* { dg-lto-options { { -flto -fshort-double -O0 } } }*/
-/* { dg-skip-if "PR60410" { x86_64-*-* || { i?86-*-* && lp64 } } } */
-/* { dg-skip-if "PR60410" { i?86-*-solaris2.1[0-9]* } } */
-
-int 
-main(void)
-{
-  float a = 1.0;
-  float b = 2.0;
-  double f = a + b * 1e-12;
-  return (int)f - 1;
-}
-- 
2.1.1

             reply	other threads:[~2014-09-27 13:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-27 13:55 Andi Kleen [this message]
2014-09-27 13:55 ` [PATCH 2/2] Make -Q --help print param defaults and min/max values Andi Kleen
2014-09-29 11:15   ` Richard Biener
2014-09-29 11:17 ` [PATCH 1/2] Remove -fshort-double Richard Biener
2014-09-29 15:20   ` Andi Kleen
2014-09-29 15:22     ` Jakub Jelinek
2014-09-29 15:31       ` Richard Biener
2014-09-29 15:48   ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1411826065-15761-1-git-send-email-andi@firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=ak@linux.intel.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).