From patchwork Tue Dec 27 16:26:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 89128 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp5061793qgi; Tue, 27 Dec 2016 08:26:38 -0800 (PST) X-Received: by 10.84.136.164 with SMTP id 33mr43307906pll.53.1482855998922; Tue, 27 Dec 2016 08:26:38 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id a1si38193138pga.249.2016.12.27.08.26.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Dec 2016 08:26:38 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-445069-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-445069-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-445069-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:to:cc :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=UCs5M6sZvLN9mWPPE8Mu/v6/q7rXjnBrDHW39JIDlft9D9HZvk 90/8zpWttawFKynpVpaDRBZJJbWOJZpytW+XeVweg/1gab9GEYGKDPQwTGaQM7qd NLj4h6hF8jYtba4XNFNUvDZTrAY1bCrsr2fBUGedvDMVKS/e6n/EOcX8k= 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:to:cc :from:subject:message-id:date:mime-version:content-type; s= default; bh=l/ec2aFOADvDkrO9BwX71vNRT3U=; b=TVsejDWTfCQqZipmzAq6 i0GSMzNIVs2YetbAH+z0BhF+z7dWuvSAayrOrevci8gO/LbWGIMjOcKa5w15cly5 F4nGwtYG9cc2NSM+SDtpd7Ub293SAPRi/mDRIvSWJ/nHmqUpQ9KCNhIxPVY0piQJ mhvswk9BOovh8r34tISpHeI= Received: (qmail 71728 invoked by alias); 27 Dec 2016 16:26:26 -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 71714 invoked by uid 89); 27 Dec 2016 16:26:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, SPF_PASS autolearn=ham version=3.3.2 spammy=H*Ad:D*cz X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 27 Dec 2016 16:26:15 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id C4187AB1A; Tue, 27 Dec 2016 16:26:12 +0000 (UTC) To: GCC Patches Cc: jason@redhat.com From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Subject: [PATCH] Add RejectNegative for a c option. Message-ID: Date: Tue, 27 Dec 2016 17:26:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 X-IsSubscribed: yes Without RejectNegative one can cause an ICE in the compiler. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin >From e005f69008daf6ad7705a2f9c3d0242e426c168f Mon Sep 17 00:00:00 2001 From: marxin Date: Tue, 27 Dec 2016 15:35:03 +0100 Subject: [PATCH] Add RejectNegative for a c option. gcc/testsuite/ChangeLog: 2016-12-27 Martin Liska * g++.dg/pr78933.C: New test. gcc/c-family/ChangeLog: 2016-12-27 Martin Liska * c.opt (strong-eval-order): Add RejectNegative keyword. --- gcc/c-family/c.opt | 2 +- gcc/testsuite/g++.dg/pr78933.C | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/g++.dg/pr78933.C diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index a5333a35e41..ba5c39d4f1c 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -1649,7 +1649,7 @@ Follow the C++17 evaluation order requirements for assignment expressions, shift, member function calls, etc. fstrong-eval-order= -C++ ObjC++ Common Var(flag_strong_eval_order) Joined Enum(strong_eval_order) Init(-1) +C++ ObjC++ Common Var(flag_strong_eval_order) Joined Enum(strong_eval_order) RejectNegative Init(-1) Follow the C++17 evaluation order requirements for assignment expressions, shift, member function calls, etc. diff --git a/gcc/testsuite/g++.dg/pr78933.C b/gcc/testsuite/g++.dg/pr78933.C new file mode 100644 index 00000000000..91a3a511711 --- /dev/null +++ b/gcc/testsuite/g++.dg/pr78933.C @@ -0,0 +1,3 @@ +// PR c/78933 +// { dg-do compile } +// { dg-options "-fno-strong-eval-order" } -- 2.11.0