From patchwork Thu Jan 5 19:53:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 90071 Delivered-To: patch@linaro.org Received: by 10.182.224.138 with SMTP id rc10csp21818obc; Thu, 5 Jan 2017 11:54:16 -0800 (PST) X-Received: by 10.98.75.141 with SMTP id d13mr52534552pfj.145.1483646056040; Thu, 05 Jan 2017 11:54:16 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id f17si77043334plj.110.2017.01.05.11.54.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jan 2017 11:54:16 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-445481-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-445481-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-445481-patch=linaro.org@gcc.gnu.org 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:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= default; b=O85VUvlBa2DqXsM1OxwnmYje3n0DgMDpVyozGmEJEXpJ0bP2b88Jr HOmV/eu0hMfmSJt9/y9rF84zAOJU0qbkTF4ura6CMCDzKmcoS+2g4mdV47TgTxr8 fT52wtnoSJ74c3Ehsv0glNTWk64dc/AAGyiyFfekI+qljkJWyPNm1w= 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:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=default; bh=ZFdeSy/o3XmR6v0SXuiz07a0jg8=; b=v1uOU8fv/1phjW0KF4A/NeNyAoc3 QCz200FiehmedXLPX++UCl9D4cWGKR6C7UClLSb3QRzQ+kqm8GcXWv4G9LApM2Un kIGBGR9TZm9itxskBNP+vb7SQD4pjfiQJosYOCdT5w/8OTe6YhyjnNUncbNSkyFE JDBjItiJ6PXlYyA= Received: (qmail 94791 invoked by alias); 5 Jan 2017 19:54:03 -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 94778 invoked by uid 89); 5 Jan 2017 19:54:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL, BAYES_00, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=no version=3.3.2 spammy=act X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 05 Jan 2017 19:53:52 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 7A86782E5F; Thu, 5 Jan 2017 20:53:50 +0100 (CET) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bE9aIskHn7bf; Thu, 5 Jan 2017 20:53:50 +0100 (CET) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 3603B82E4E; Thu, 5 Jan 2017 20:53:49 +0100 (CET) From: Eric Botcazou To: Jakub Jelinek Cc: gcc-patches@gcc.gnu.org, Richard Biener Subject: Re: [PATCH] Fix ICE with -fno-sso-struct=none (PR driver/78957) Date: Thu, 05 Jan 2017 20:53:49 +0100 Message-ID: <247277927.gUkCtdRrLC@polaris> User-Agent: KMail/4.14.10 (Linux/3.16.7-53-desktop; KDE/4.14.9; x86_64; ; ) In-Reply-To: <20170104114031.GI21933@tucnak> References: <20170102192726.GH21933@tucnak> <20170104114031.GI21933@tucnak> MIME-Version: 1.0 > In this case there is no -fsso-struct option (what would it mean), so > -fno-sso-struct isn't there either (again, what would that mean). > The only thing that would make sense IMHO would be to allow > not just big-endian and little-endian, but also native, so one can > cancel earlier -fsso-struct= like > gcc ... -fsso-struct=little-endian ... -fsso-struct=native ... > and have it act as if neither of those options appeared. That makes sense and is immediate since the logic is already based on the native endianness of the target. Tested on x86-64_suse-linux, OK for the mainline? 2017-01-05 Eric Botcazou * c-family/c.opt (fsso-struct): Add 'native' value. * doc/invoke.texi (C Dialect Options): Document it. 2017-01-05 Eric Botcazou * gcc.dg/sso-10.c: New test. -- Eric Botcazou Index: c-family/c.opt =================================================================== --- c-family/c.opt (revision 244107) +++ c-family/c.opt (working copy) @@ -1631,7 +1631,7 @@ C++ ObjC++ Ignore Warn(switch %qs is no fsso-struct= C ObjC Joined RejectNegative Enum(sso_struct) Var(default_sso) Init(SSO_NATIVE) --fsso-struct=[big-endian|little-endian] Set the default scalar storage order. +-fsso-struct=[big-endian|little-endian|native] Set the default scalar storage order. Enum Name(sso_struct) Type(enum scalar_storage_order_kind) UnknownError(unrecognized scalar storage order value %qs) @@ -1642,6 +1642,9 @@ Enum(sso_struct) String(big-endian) Valu EnumValue Enum(sso_struct) String(little-endian) Value(SSO_LITTLE_ENDIAN) +EnumValue +Enum(sso_struct) String(native) Value(SSO_NATIVE) + fstats C++ ObjC++ Var(flag_detailed_statistics) Display statistics accumulated during compilation. Index: doc/invoke.texi =================================================================== --- doc/invoke.texi (revision 244034) +++ doc/invoke.texi (working copy) @@ -2166,9 +2166,9 @@ basic integer types such as @code{int} a @item -fsso-struct=@var{endianness} @opindex fsso-struct Set the default scalar storage order of structures and unions to the -specified endianness. The accepted values are @samp{big-endian} and -@samp{little-endian}. If the option is not passed, the compiler uses -the native endianness of the target. This option is not supported for C++. +specified endianness. The accepted values are @samp{big-endian}, +@samp{little-endian} and @samp{native} for the native endianness of +the target (the default). This option is not supported for C++. @strong{Warning:} the @option{-fsso-struct} switch causes GCC to generate code that is not binary compatible with code generated without it if the