From patchwork Thu May 30 16:38:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 1107827 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-501978-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="JeFdlmtn"; dkim=pass (1024-bit key; unprotected) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="kDRLFwqy"; dkim-atps=neutral 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 45FCvR6nprz9s1c for ; Fri, 31 May 2019 02:38:43 +1000 (AEST) 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:content-type :content-transfer-encoding:mime-version; q=dns; s=default; b=x1Q 7ZDIbXRyN6v5vc6nT7SNRXWghJpOAoEX6Y2X21gwU5QIX1LWFV57iOPi5G70mc0a 6OBqd1YHxqQ39QFOEQ5S8gWnslW+mJq14UNsJxZSE4MeEP2+vwdJ9IMETaDvKPt/ vIMg0+Zv4fnY2L98xKlCBnS5Pm155BAs68m7hBIM= 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:content-type :content-transfer-encoding:mime-version; s=default; bh=wtYaBRvGU ex02MujLOndnjHdQKw=; b=JeFdlmtnEJxZuTg5NMksILU3wAo6koWKN4DMetK+B VAKGbv4rWb2C5FF9vdE5l5erKth6V8F5uHlXo8Jw+fyr62dk4yJ8+fhIpNZRPSu0 /5PO9Uj/QNFvf3cG6pgiFzxh75mV9SnSgMFs6uJWUxo2vGVK+Ks7Obk9yYM/ToNc lE= Received: (qmail 21902 invoked by alias); 30 May 2019 16:38:28 -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 21804 invoked by uid 89); 30 May 2019 16:38:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1002, error_at, UD:opts.c, optsc X-HELO: EUR04-HE1-obe.outbound.protection.outlook.com Received: from mail-eopbgr70072.outbound.protection.outlook.com (HELO EUR04-HE1-obe.outbound.protection.outlook.com) (40.107.7.72) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 30 May 2019 16:38:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=elCWp8+CyzaBgp8NsxWAwVLGUCAu1nm1hbaEZDbN6BY=; b=kDRLFwqyDVYhJ5H4sEJJd8jgIcVrDnEYBR5OmRzKUnIQnhsZVL5JVhhKC3W7YNs6DWq8fsYvc8Z5eQY6m/SXBPBHywk+kONobWun7uVez5/6apuLfLRSKp22VYvOEm8kFokcOelqDqICdXrBFiLorP7z4uLxVpf04DeXdnjCyrU= Received: from VI1PR0801MB2127.eurprd08.prod.outlook.com (10.168.62.22) by VI1PR0801MB2079.eurprd08.prod.outlook.com (10.173.76.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1922.18; Thu, 30 May 2019 16:38:21 +0000 Received: from VI1PR0801MB2127.eurprd08.prod.outlook.com ([fe80::fd18:cb50:3e52:9878]) by VI1PR0801MB2127.eurprd08.prod.outlook.com ([fe80::fd18:cb50:3e52:9878%7]) with mapi id 15.20.1922.021; Thu, 30 May 2019 16:38:21 +0000 From: Wilco Dijkstra To: GCC Patches CC: nd Subject: [PATCH] Fix alignment option parser (PR90684) Date: Thu, 30 May 2019 16:38:21 +0000 Message-ID: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; x-ms-oob-tlc-oobclassifiers: OLM:983; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Wilco.Dijkstra@arm.com Fix the alignment option parser to always allow up to 4 alignments. Now -falign-functions=16:8:8:8 no longer reports an error. OK for commit (and backport to GCC9)? ChangeLog: 2019-05-30 Wilco Dijkstra PR driver/90684 * gcc/opts.c (parse_and_check_align_values): Allow 4 alignment values. diff --git a/gcc/opts.c b/gcc/opts.c index a1ccd97746890b8259d000cbdeeaddc02df0b74a..d3501421f7879113ab4422063cedfabd23cadce7 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -2022,14 +2022,7 @@ parse_and_check_align_values (const char *flag, free (str); /* Check that we have a correct number of values. */ -#ifdef SUBALIGN_LOG - unsigned max_valid_values = 4; -#else - unsigned max_valid_values = 2; -#endif - - if (result_values.is_empty () - || result_values.length () > max_valid_values) + if (result_values.is_empty () || result_values.length () > 4) { if (report_error) error_at (loc, "invalid number of arguments for %<-falign-%s%> "