From patchwork Sat Sep 27 13:54:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Kleen X-Patchwork-Id: 394062 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 078F414013F for ; Sat, 27 Sep 2014 23:55:39 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; q=dns; s=default; b=lf6vGxOqitLC 9A8WW0Em9oCzaAoj4jQMg9PaIrL7fBWTSvir3+f2zFXDpWNiTfYNjO04GnfiDuDu n0hTFHJOkLW/VDfDREdEzZ/fbg8i/oeJ6BMWen+hnFX7DsxmSw4/b4i0s2nHD17d LT4zoeNs0Ge8FMwNlOyoq9O4fvGiieM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; s=default; bh=jqTeJLa9tZ5bS6hkKD wBaF11/lI=; b=ym7CXmBYlpVIqJkf3xv+SoyxMGij+/BoERj9EByIrz9Zwrf3iM HG0XlmPBL+GT+uujlfRhkm06UmJdMOzgzui6GlppyUuWYNGdqUha5tVh1HjHEYON QGvUqNTS8OY7xDqLilt7wx2/UrhJPQnjXh1z4MYSwA+ryGIdy16csF9t0= Received: (qmail 5400 invoked by alias); 27 Sep 2014 13:55:20 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 5376 invoked by uid 89); 27 Sep 2014 13:55:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: one.firstfloor.org Received: from one.firstfloor.org (HELO one.firstfloor.org) (193.170.194.197) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Sat, 27 Sep 2014 13:55:17 +0000 Received: from basil.firstfloor.org (184-100-254-193.ptld.qwest.net [184.100.254.193]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by one.firstfloor.org (Postfix) with ESMTPSA id ED2F68677B; Sat, 27 Sep 2014 15:55:11 +0200 (CEST) Received: by basil.firstfloor.org (Postfix, from userid 1000) id A1C8CA61F7; Sat, 27 Sep 2014 06:54:28 -0700 (PDT) From: Andi Kleen To: gcc-patches@gcc.gnu.org Cc: Andi Kleen Subject: [PATCH 1/2] Remove -fshort-double Date: Sat, 27 Sep 2014 06:54:24 -0700 Message-Id: <1411826065-15761-1-git-send-email-andi@firstfloor.org> From: Andi Kleen -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 PR target/60410 * gcc.dg/lto/pr55113_0.c: Remove. gcc/: 2014-09-26 Andi Kleen 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 PR target/60410 * c-common.c (c_common_nodes_and_builtins): Remove -fshort-double. * c.opt: Dito. gcc/lto/: 2014-09-26 Andi Kleen 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; -}