From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id B7D67385803E for ; Tue, 3 May 2022 08:16:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B7D67385803E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.91,194,1647331200"; d="scan'208";a="75284669" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 03 May 2022 00:16:32 -0800 IronPort-SDR: ARNOHKGXeE04DLHoQF6/iNWeA0/Qj6h081zvgeXFgvGmfVOQKn3+QluABcGgJg1U9b5CnumSFt fP6z/sQkl6zd2+IzmJWkrUDMaHqE4QoP6bfe4JSO8IR9eEBYhDvcPY9Da10qXtZWUUdp2XiOGy lJTKKuSbcDCtyCvqyZHkZ3VBQoPA1k1FVTb+JSH9ZDxL2Cm3E++I6z3z0AXI4AMMtnT/bjRivL oaUlfIboiNwOW/ctV5dxhcAWNSB+KkSLsvNxhXRxSg1HwEY7C/PkBpUHj5ehDCo7DjSgvh15J9 gO4= From: Thomas Schwinge To: Richard Biener CC: Iain Sandoe , Jakub Jelinek , Subject: Re: Make 'c-c++-common/goacc/kernels-decompose-pr100400-1-*.c' behave consistently, regardless of checking level In-Reply-To: References: <87czgwkp8t.fsf@euler.schwinge.homeip.net> User-Agent: Notmuch/0.29.1+93~g67ed7df (https://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) Date: Tue, 3 May 2022 10:16:25 +0200 Message-ID: <87pmkvqbdy.fsf@dem-tschwing-1.ger.mentorg.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-09.mgc.mentorg.com (139.181.222.9) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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-List-Received-Date: Tue, 03 May 2022 08:16:34 -0000 Hi Richard! On 2022-05-03T09:17:52+0200, Richard Biener wr= ote: > On Mon, May 2, 2022 at 4:01 PM Thomas Schwinge = wrote: >> On 2022-05-01T11:02:29+0100, Iain Sandoe via Gcc wrote= : >> >> On 29 Apr 2022, at 15:34, Jakub Jelinek via Gcc wro= te: >> >> >> >> The first release candidate for GCC 12.1 is available from >> >> >> >> https://gcc.gnu.org/pub/gcc/snapshots/12.1.0-RC-20220429/ >> >> ftp://gcc.gnu.org/pub/gcc/snapshots/12.1.0-RC-20220429/ >> >> >> >> and shortly its mirrors. It has been generated from git commit >> >> r12-8321-g621650f64fb667. >> >> > [...] new fails (presumably because checking is off): >> >> > XPASS: c-c++-common/goacc/kernels-decompose-pr100400-1-2.c -std=3Dc++= 98 (internal compiler error) >> > FAIL: c-c++-common/goacc/kernels-decompose-pr100400-1-2.c -std=3Dc++9= 8 (test for excess errors) >> > XPASS: c-c++-common/goacc/kernels-decompose-pr100400-1-2.c -std=3Dc++= 14 (internal compiler error) >> > FAIL: c-c++-common/goacc/kernels-decompose-pr100400-1-2.c -std=3Dc++1= 4 (test for excess errors) >> > XPASS: c-c++-common/goacc/kernels-decompose-pr100400-1-2.c -std=3Dc++= 17 (internal compiler error) >> > FAIL: c-c++-common/goacc/kernels-decompose-pr100400-1-2.c -std=3Dc++1= 7 (test for excess errors) >> > XPASS: c-c++-common/goacc/kernels-decompose-pr100400-1-2.c -std=3Dc++= 20 (internal compiler error) >> > FAIL: c-c++-common/goacc/kernels-decompose-pr100400-1-2.c -std=3Dc++2= 0 (test for excess errors) >> >> Confirmed, and sorry. I had taken care to add explicit '-fchecking' >> next to 'dg-ice', but that's in fact not the problem/cure here. >> OK to push to the relevant branches the attached >> "Make 'c-c++-common/goacc/kernels-decompose-pr100400-1-*.c' behave >> consistently, regardless of checking level"? > > No, > > +++ b/gcc/omp-oacc-kernels-decompose.cc > @@ -239,7 +239,13 @@ visit_loops_in_gang_single_region > (gimple_stmt_iterator *gsi_p, > case GIMPLE_OMP_FOR: > /*TODO Given the current 'adjust_region_code' algorithm, this is > actually... */ > +#if 0 > gcc_unreachable (); > +#else > + /* ..., but due to bugs (PR100400), we may actually come here. > + Reliably catch this, regardless of checking level. */ > + abort (); > +#endif > > this doesn't look correct. If you want a reliable diagnostic here please= use > sorry ("...") or call internal_error () manually (the IL verifiers do thi= s). Hmm, I feel I'm going in circles... ;-) Here, 'sorry' isn't appropriate, because this is a plain bug, and not "a language feature which is required by the relevant specification but not implemented by GCC" ('gcc/diagnostic.cc'). I first had this as 'internal_error', but then saw the following source code comment, 'gcc/diagnostic.cc': /* An internal consistency check has failed. We make no attempt to continue. Note that unless there is debugging value to be had from a more specific message, or some other good reason, you should use abort () instead of calling this function directly. */ void internal_error (const char *gmsgid, ...) { Here, there's no "debugging value to be had from a more specific message", and I couldn't think of "some other good reason", so decided to "use abort () instead of calling this function directly". But, if that's what we want, I'm happy to again switch to 'internal_error', and then we should update this source code comment, too? > That said, having a testcase that checks for an ICE as a TODO is maybe no= t > the very best thing to have. We have bugzilla for unfixed bugs. As per the past 'dg-ice' discussions, there's certainly value seen for having such test cases (and it already did help me during development, elsewhere). I do agree/acknowledge that it's a bit more difficult to make those behave consistently across GCC configurations. Gr=C3=BC=C3=9Fe Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955