From patchwork Sat Jun 25 10:27:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 55404 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 82C003874747 for ; Sat, 25 Jun 2022 10:27:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 82C003874747 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1656152862; bh=2uPT0cqwsWkQiOfl1MX+Umk724ZYgt/X39Xj9SkS56A=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=f0goLpi1y4A7HiuB7sMiEebT8o580009m7YvuvV9d7O2v5Gowq5Nyq2o9uUgbIF+p 5yvQ1GCNxf77m04OEtHN8dMXpRQV8bZCTxgnjpddADD7c51o2D8vajUE45oQZ6RrlU cLdDGe2jl8mww+w7m8DJcajZ0TabBIzBYzz5VizI= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by sourceware.org (Postfix) with ESMTPS id 544D3385C312 for ; Sat, 25 Jun 2022 10:27:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 544D3385C312 Received: by mail-wr1-x430.google.com with SMTP id q9so6305985wrd.8 for ; Sat, 25 Jun 2022 03:27:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:reply-to :mime-version:content-transfer-encoding; bh=2uPT0cqwsWkQiOfl1MX+Umk724ZYgt/X39Xj9SkS56A=; b=d8jilWJvmzVPM6IIi5suqsxAotEtJhRi+r9jqeGhbQCcl3upoZ8e8ZAtZ6XKdM1wOa XWh/ZsCfufFU+pm5eAAZI7Hy4pjiVyEf7UxofBFXNu+8e2o3Vncd51AXZdS34wFQ0UYw tJ+MrRlTJhH/Jx8CK7iru/rOHz0rNYKrYroKjnnYWGU17iLB4dgfhkEp2ArfHtbHPFhZ PN/GKg6tD0a58O/2diFZUHUUfNkE+Wc/XEMoaaAq/SF//sb7YOoELu5KeBGZymOWHKHN OD5ODmkx+N4sgK/8rBL7+kZf4eaUrfigdfePgD1yPVYvSoL59wOQDhbkqmH3Cvta3gQ9 wxiw== X-Gm-Message-State: AJIora8Yf5evK1xeWdKicIZ/fe9DW70hkAlZiKP24PKexBeobC/upTee ZrXUKqjyQTYrBjSCfupB4d2MleaTX6U= X-Google-Smtp-Source: AGRyM1sutjO69vsVfpYyG4zURV9B4uBy78UMJ9goDh7eSnNAkLEqC5y9P0Z07lzndY1I8rVYtsX1vw== X-Received: by 2002:a5d:6b06:0:b0:21b:902e:5727 with SMTP id v6-20020a5d6b06000000b0021b902e5727mr3289185wrw.86.1656152831918; Sat, 25 Jun 2022 03:27:11 -0700 (PDT) Received: from localhost.localdomain (host81-138-1-83.in-addr.btopenworld.com. [81.138.1.83]) by smtp.gmail.com with ESMTPSA id e2-20020adfdbc2000000b0021b9f126fd3sm4835692wrj.14.2022.06.25.03.27.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 25 Jun 2022 03:27:11 -0700 (PDT) X-Google-Original-From: Iain Sandoe To: gcc-patches@gcc.gnu.org Subject: [PATCH] testsuite, Darwin: Fix darwin-comm-1.c error messages for Darwin <= 10. Date: Sat, 25 Jun 2022 11:27:04 +0100 Message-Id: <20220625102704.39545-1-iain@sandoe.co.uk> X-Mailer: git-send-email 2.24.3 (Apple Git-128) MIME-Version: 1.0 X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Iain Sandoe via Gcc-patches From: Iain Sandoe Reply-To: iain@sandoe.co.uk Cc: Iain Sandoe Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" When amending the allowed alignment size to accommodate the larger values permitted by newer tools, we retained the object file limit of 2^15 for Darwin versions <= 10, since that is what the native tools expect there. This triggers a different diagnostic path with a distinct error message, which is checked in the revised test here. Signed-off-by: Iain Sandoe gcc/testsuite/ChangeLog: * gcc.dg/darwin-comm-1.c: Check for the correct error message for Darwin <= 10. --- gcc/testsuite/gcc.dg/darwin-comm-1.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.dg/darwin-comm-1.c b/gcc/testsuite/gcc.dg/darwin-comm-1.c index 46519984fd8..2ea11d63d81 100644 --- a/gcc/testsuite/gcc.dg/darwin-comm-1.c +++ b/gcc/testsuite/gcc.dg/darwin-comm-1.c @@ -1,5 +1,6 @@ -/* { dg-do compile { target *-*-darwin[912]* } } */ +/* { dg-do compile { target *-*-darwin* } } */ /* { dg-options "-fcommon" } */ /* In all cases, common has a max alignment of 2^15. */ -int badcommon __attribute__ ((aligned (65536))); /* { dg-error "common variables must have an alignment" } */ +int badcommon __attribute__ ((aligned (65536))); /* { dg-error "common variables must have an alignment" "" { target { *-*-darwin1[1-9]* *-*-darwin2* } } } */ +/* { dg-error "requested alignment .65536. exceeds object file maximum 32768" "" { target { *-*-darwin[4-9]* *-*-darwin10* } } .-1 } */ \ No newline at end of file