From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by sourceware.org (Postfix) with ESMTPS id 2A9AC3858CDA for ; Mon, 26 Sep 2022 08:33:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2A9AC3858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x62d.google.com with SMTP id y3so12493993ejc.1 for ; Mon, 26 Sep 2022 01:33:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date; bh=oTyPSk3hoNlyp2b3j5by2FgTFrFETzSE2/EbmBoLbQ4=; b=Wr8QxcjHf49COWgiip1vEvKbW0LmbNgekahKZa7jd3PtLgQXnKl7rMB4flDCkhuqwo Fornr/uUsIktTNqMtiGNu+Y6wMDDdyiw1wsRhCQ8v0ZvqowVWtSMFWUNgVxvz8IdRhgE vFv/OWjVZJwdmxLX7wGE0nzM8wy+MwSBYnt882w+jRW3Yxhj70IdSQOlqKPrg0Vv62Hg I4Xg/FOBBWZb0ZN/Rmh5H/YuX2SllCS5jrf4mwgTz72+yCYXI8kEUnGezjSXjrOClTOg dLzSYCdfl2O9oy7BZWxIK/nru6mMe9eqs183W4vv2yt1BQQjGY3fJSLsrHfWR040jm/H KVtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date; bh=oTyPSk3hoNlyp2b3j5by2FgTFrFETzSE2/EbmBoLbQ4=; b=Y1OyWvQhj1jYBe0NCBJuJJiBPT10TrW+2efauLXbwzzX10k4HoskpOjh1/lXTESFe2 tm3I5vVIXocPAOmtgC3Cx+4SRrAmDRuJFkU0go2+3U1jaJ8Gjqbt9E/isnwtu9+QbmvV oGmz9Fk1DPIaKea9vT4LDx60V4kG2VxRDpcKKlRYOYLm3uEPJGoMy5kKpJwryscGR2Ye 2hDuFQuj2LN9QDFF0UUsKYAa9xrUPxq7tozY/Dl/mE5HwVurp2T2QYJ24TncLg2uoPvL g77n1WB6yg7qOmFZnIWW13/2tUQmgM4EUr6EWq5cmeTUDITXQ2NBGkG9hrQUHObWd4X8 an7g== X-Gm-Message-State: ACrzQf0C4icMqfI5HxUDlV+HMDngG0PPXN82kP90Rstm7tg72qqhjqcB pyZzjmCYFPu2YaRLUAkM5Tpfvf2yG6CD6ccgjLE= X-Google-Smtp-Source: AMsMyM7lMcycA7nfN27MDPk6mdtknc4PJ2SiiKmpDttV9bxSa9v3hRLBV9xWB71t95U1yTeA7i+2niFFtewIRVUY2WY= X-Received: by 2002:a17:906:8251:b0:781:8016:2dc9 with SMTP id f17-20020a170906825100b0078180162dc9mr17913523ejx.488.1664181193456; Mon, 26 Sep 2022 01:33:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Richard Biener Date: Mon, 26 Sep 2022 10:32:59 +0200 Message-ID: Subject: Re: [Patch] OpenACC: Fix reduction tree-sharing issue [PR106982] To: Tobias Burnus Cc: gcc-patches , Thomas Schwinge Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, Sep 23, 2022 at 5:25 PM Tobias Burnus wro= te: > > This fixes a tree-sharing ICE. It seems as if all unshare_expr > I added were required in this case. The first long testcase is > based on the real testcase from the OpenACC testsuite, the second > one is what reduction produced - but I thought some nested reduction > might be interesting as well; hence, I included both tests. > > > Bootstrapped and regtested on x86-64-gnu-linux w/o offloading. > OK for mainline and GCC 12? looks like v1/v2/v3 are now unshared twice and unsharing outgoing is better done when its used. That said, please put the unshares at places where new things are built, that's much clearer. That means the 'outgoing' at gimplify_assign (outgoing, teardown_call, &after_join); Richard. > (It gives an ICE with GCC 10 but not with GCC 9; thus, > more regression-fix backporting would be possible, > if someone cares.) > > Tobias > > > ----------------- > Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 2= 01, 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch= =C3=A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellsc= haft: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955