From patchwork Mon Jun 20 15:22:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 55195 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 46AAB386CE51 for ; Mon, 20 Jun 2022 15:23:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 46AAB386CE51 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1655738608; bh=b3ADxUy/taF7zKYn5DHh2hbac38UkIAAOrcOCJqTIpc=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=uxVIaPnLrnjoRpgwgDj2kb7wmXFDCsyDKbFDgW6DQL4gU6wXjm0ZnaJP+nL2fRYkW gX/2blwCuSzavX3/0E1Kvt/kd2iLNDtaWJvh3Af5l5yrxtNnP3mRE35C0RUTk+E6wF bSBlBiXw7wnYKbCFp+psjo3Ciy/I1LY0xbmB17CY= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by sourceware.org (Postfix) with ESMTPS id 89B5C3858C2C for ; Mon, 20 Jun 2022 15:22:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 89B5C3858C2C Received: by mail-wm1-x32b.google.com with SMTP id n185so6004549wmn.4 for ; Mon, 20 Jun 2022 08:22:59 -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=b3ADxUy/taF7zKYn5DHh2hbac38UkIAAOrcOCJqTIpc=; b=JQcWwPHI7OQpgcS69mg3/8cMQZhBg38gpipITHFb7vduHwGrsWviixW59mJNiTs8Cn pxtjFD5YAR6kiz+g7GdrSrtrKAMpXKsfuUf5SEyo5Z28kZBWPCtQiFKYXxEJ3N4WeATM k/TMdeZ84PYHEA6FXqvkYm1Bpk3ZXwx7HL0SvTmJBpy5XWqva0TfdWGIYzwA3zVQyBka uQTAqJKdXkP45LwCJXtlmQTuy25agtOL6LLzIH7+R3Nz6j99PjG1Gk/WrLsC8TISjF9j KNg09YGzdWu8J5XPoFE1TEc/7C91lJhjNIQPxYRsyigHP61ssP8LdWkN5KzcVwUl1trH XyFw== X-Gm-Message-State: AOAM532NHwPwLXF8V6ac4lvL3ZX6dVWbiO3/M4BcIdgIRAanqingAn9x ONlEo4HCecK78DOuQgKqs6HXNoi3ATU= X-Google-Smtp-Source: ABdhPJwasd4W/rdqeFNRFYMUCgbf1pElitEn6bT93ieGDQutSC3pL+mSHrLG5XijNAY7doanAcuQyA== X-Received: by 2002:a05:600c:21c2:b0:39d:b60d:854c with SMTP id x2-20020a05600c21c200b0039db60d854cmr33238184wmj.18.1655738578396; Mon, 20 Jun 2022 08:22:58 -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 n1-20020a5d4201000000b0021a36955493sm13646507wrq.74.2022.06.20.08.22.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Jun 2022 08:22:57 -0700 (PDT) X-Google-Original-From: Iain Sandoe To: gcc-patches@gcc.gnu.org Subject: [pushed] testsuite, Darwin: Allow for two CTOR bodies in array61 test. Date: Mon, 20 Jun 2022 16:22:51 +0100 Message-Id: <20220620152251.80820-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" For targets without alias support, we emit two essentially identical function bodies into the gimple (complete and base CTORs). So this test needs to allow for that when the target does not support aliases. The target support alias test does not seem to be usable in the context of a single scan-tree-dump so the fix here uses the target designation. Note that the array has 10 elements, so that if the test were failing (because we were emitting 10 inits instead of a loop) the count would be expected to exceed 2, on Darwin and 1 where there's alias support. tested on x86_64 darwin / linux, pushed to master, thanks, Iain Signed-off-by: Iain Sandoe gcc/testsuite/ChangeLog: * g++.dg/init/array61.C: Allow for two CTOR bodies on Darwin, where aliases are not currently supported. --- gcc/testsuite/g++.dg/init/array61.C | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/g++.dg/init/array61.C b/gcc/testsuite/g++.dg/init/array61.C index eaf535c2546..c8f82b9f155 100644 --- a/gcc/testsuite/g++.dg/init/array61.C +++ b/gcc/testsuite/g++.dg/init/array61.C @@ -1,7 +1,8 @@ // PR c++/92385 // { dg-do compile { target c++11 } } // { dg-additional-options -fdump-tree-gimple } -// { dg-final { scan-tree-dump-times "item::item" 1 "gimple" } } +// { dg-final { scan-tree-dump-times "item::item" 1 "gimple" { target { ! *-*-darwin* } } } } +// { dg-final { scan-tree-dump-times "item::item" 2 "gimple" { target { *-*-darwin* } } } } struct item { int i;