From patchwork Mon Nov 22 09:15:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 47992 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 8084D3858424 for ; Mon, 22 Nov 2021 09:16:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8084D3858424 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1637572577; bh=ta5uOH7OXyOKwD8x2uinhtS/RnDJkBUpc+GYab5zRiQ=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=UuESO8qiDK6squldkhsADdIHDSICSi5lH1i1nw8Eg3yT2SvXVmwu2xlZTWoYheGsb ZtwX7O2Wbov8UnQtp8fla/E/fpOJ0whHc/f9OU5+nXMu+BLaJJWnEtvQu9SInWbcP0 TrPiN3jSDQLrzsiFuspaPgyymeCBlbvlMAdgBYyY= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 063253858406 for ; Mon, 22 Nov 2021 09:15:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 063253858406 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-232-S1jF4Yi8PBu4lTTeozCTEg-1; Mon, 22 Nov 2021 04:15:45 -0500 X-MC-Unique: S1jF4Yi8PBu4lTTeozCTEg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 151B687D543 for ; Mon, 22 Nov 2021 09:15:45 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B44EE60CC4 for ; Mon, 22 Nov 2021 09:15:44 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.16.1/8.16.1) with ESMTPS id 1AM9FfBc2535361 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Mon, 22 Nov 2021 10:15:42 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.16.1/8.16.1/Submit) id 1AM9Ffxa2535360 for gcc-patches@gcc.gnu.org; Mon, 22 Nov 2021 10:15:41 +0100 Date: Mon, 22 Nov 2021 10:15:41 +0100 To: gcc-patches@gcc.gnu.org Subject: [committed] openmp: Handle OMP_MASKED in potential_constant_expression_1 [PR103349] Message-ID: <20211122091541.GH2646553@tucnak> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham 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-Patchwork-Original-From: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Hi! When adding OMP_MASKED, I apparently forgot to handle it in potential_constant_expression_1, which means we can ICE on it. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk. 2021-11-22 Jakub Jelinek PR c++/103349 * constexpr.c (potential_constant_expression_1): Punt on OMP_MASKED. * g++.dg/gomp/masked-1.C: New test. Jakub --- gcc/cp/constexpr.c.jj 2021-11-18 12:33:22.014628184 +0100 +++ gcc/cp/constexpr.c 2021-11-21 20:56:15.138499377 +0100 @@ -8686,6 +8686,7 @@ potential_constant_expression_1 (tree t, case OMP_SINGLE: case OMP_SECTION: case OMP_MASTER: + case OMP_MASKED: case OMP_TASKGROUP: case OMP_TARGET_UPDATE: case OMP_TARGET_ENTER_DATA: --- gcc/testsuite/g++.dg/gomp/masked-1.C.jj 2021-11-21 21:01:19.610215568 +0100 +++ gcc/testsuite/g++.dg/gomp/masked-1.C 2021-11-21 21:00:44.914703723 +0100 @@ -0,0 +1,14 @@ +// PR c++/103349 +// { dg-do compile { target c++11 } } + +int v; + +void +foo (int x, int y) +{ + [=] () + { +#pragma omp masked + v = x + y; + } (); +}