From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-Archive: List-Post: List-Help: Sender: gcc-patches-owner@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:47:00 -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 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Wilco.Dijkstra@arm.com X-SW-Source: 2019-05/txt/msg02031.txt.bz2 Fix the alignment option parser to always allow up to 4 alignments. Now -falign-functions=3D16: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..d3501421f7879113ab4422063ce= dfabd23cadce7 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -2022,14 +2022,7 @@ parse_and_check_align_values (const char *flag, free (str); =20 /* Check that we have a correct number of values. */ -#ifdef SUBALIGN_LOG - unsigned max_valid_values =3D 4; -#else - unsigned max_valid_values =3D 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%> "