Message ID | 20250106152204.218226-1-parras@baylibre.com |
---|---|
State | New |
Headers |
Return-Path: <gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org> 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 84E0A3858D35 for <patchwork@sourceware.org>; Mon, 6 Jan 2025 15:24:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 84E0A3858D35 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=S91YTV9j X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by sourceware.org (Postfix) with ESMTPS id 4019F3858D21 for <gcc-patches@gcc.gnu.org>; Mon, 6 Jan 2025 15:23:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4019F3858D21 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=baylibre.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4019F3858D21 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::329 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1736176987; cv=none; b=prTvZkozIC5XSMfYiXG5YqZTWOLomLQzQ3BSwJuDTHhDxA7QG76rdfhL7d2LCjawRzQNxgn8yivpjJPkV1anrQhJ2WgeVRsylhdYlynNidtQ2H+Ytf9WHL0SpkbThUB9bphwPEStWUGEJzQ6vBKyniBtoN+HECScPRzoCZJB0js= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1736176987; c=relaxed/simple; bh=k10GbXKtXZidHE+D2u5hzL1gjoJwjvgl1qIk5yTYrFQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=MP5MTy8/N3GtGXOMfjDgWX1tSHtCqdppfx/mY9gwVUcuF7Tq7fy1H4tq0X9eUKlUHq3iv0WnXYnm3orLk2d2987pW1s9DZb01HjW9569UwCfHl+Lf/CEivb5pAnvy3HlIsIX0Qc2nMT5pGTH3hk9fIsqBh3mISGHQ4lIGYYOwck= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4019F3858D21 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4361f664af5so165194225e9.1 for <gcc-patches@gcc.gnu.org>; Mon, 06 Jan 2025 07:23:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1736176986; x=1736781786; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=+xPwVLzRnEeHTAShIfUb7VtJ6rnhv1s9cicAJoYc3DA=; b=S91YTV9j2soV/nLXfBQf6/KPFGPdMl7JW/aqYWRFsqsstnkSodDVv39sahh+wYFQUW M3zllTNMDLJQl54ZWeKtv96FPSWpHC76bINRKIgJKybUz6GsSwBQiJWMxzufNBsggKAR aTYDzxtOiVZc5cTgq6MkFv86xOEq9h7Lc9xi9WwOEUGYwjZJfd2dPo5VQOZsctxkaB1v 8ehxHAKGKq2Tm3nIliUnvxIUF2gmsCHYZ2mTOxRxt6Gu6JdIGDyWVn9fqDaoTpmY5Ogu PUX91LM1ctH1Q06qz4NzfH0hazstvSOsv4iMlMXZ84UG6JBSDa0TkC1rcvPAh3ko1Ihw lrUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736176986; x=1736781786; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+xPwVLzRnEeHTAShIfUb7VtJ6rnhv1s9cicAJoYc3DA=; b=U2tZKwhAieev1t5NEAyscfUysCaoOf90J4S9Y58qP85dpwarKPUFKCHf5f3j4ZRMSN wksKNkppd3PMIPLgurfMbE8mq4nQlGvHTA0zH+r8s4HgKmTR5ev9aVDQDVJlwS2JO4VN Zn1Go5EPfwRx27MhYuD1DOTDhs3wn0wTWwh6rN36qkmHhbnqNjARzP+D8c3YCSEYzJYp k3QQmrh6Q822YrOCKyxVrMKYT2LM+1zFYpLfaT061fQzcI9oRQccPywzpLwY6A/hKNGw Wc5IyKvQ0bHl+frkFw3I+F9SZ+woQpI6Qv7YeBbHACw82OfbuKlvIli99pXeYuxvV6N/ X5Qg== X-Gm-Message-State: AOJu0YyLrBHbJ2gcWpEHJnqTXN1fj1oYhZBXZ5zw7f7QKGHafKm5Y+CJ /zJhyi/HX6KJytscKEz5ntJolpzqR0VKz7MKkXgutDAvTqbI0pCeuZOu6VD3Gdn5roiYvKY6e6B i X-Gm-Gg: ASbGncvxU9nw5pMZjYqRd6WE3nNlqnpumV08jeh7b5+fK0rolvlYV/5iUEFz0hradDT lMhzjALW9SVLWhshL2NY5fXltQc8ytjcTwpp9N752ydew8/nWdNaeendZP1r9GHRJPw8O22W1Em 56ySEZxeb0ffVyn3MS1vdG6E5Our/cTqdpqtD85eXW0797fChWZZQJl+qttDwrGvKnNow2v2aJM deSkcTvt13FpCASVKboCs5+4P6TcD2eRXOpib/1vAXUPDKfFSkPmJzyVIYS X-Google-Smtp-Source: AGHT+IGVgNM73Iv3G3S3KJ8d9uM+84EdPbZv1t9Cbpkt+FI4y2Kj900G5yNVq5va7bwULv2+6RQ/+g== X-Received: by 2002:a05:600c:5254:b0:436:18e5:6917 with SMTP id 5b1f17b1804b1-4366790f200mr556186285e9.0.1736176985660; Mon, 06 Jan 2025 07:23:05 -0800 (PST) Received: from raptor.home ([2a01:cb1c:94d:7c00:3147:3f77:b6c4:c1e4]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656b3b271sm602805735e9.34.2025.01.06.07.23.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jan 2025 07:23:04 -0800 (PST) From: Paul-Antoine Arras <parras@baylibre.com> To: gcc-patches@gcc.gnu.org Cc: Paul-Antoine Arras <parras@baylibre.com> Subject: [PATCH] Do not call cp_parser_omp_dispatch directly in cp_parser_pragma Date: Mon, 6 Jan 2025 16:22:04 +0100 Message-ID: <20250106152204.218226-1-parras@baylibre.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org |
Series |
Do not call cp_parser_omp_dispatch directly in cp_parser_pragma
|
|
Checks
Context | Check | Description |
---|---|---|
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 | success | Build passed |
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 | success | Test passed |
linaro-tcwg-bot/tcwg_gcc_build--master-arm | success | Build passed |
Commit Message
Paul-Antoine Arras
Jan. 6, 2025, 3:22 p.m. UTC
This is a followup to ed49709acda OpenMP: C++ front-end support for dispatch + adjust_args. The call to cp_parser_omp_dispatch only belongs in cp_parser_omp_construct. In cp_parser_pragma, handle PRAGMA_OMP_DISPATCH by calling cp_parser_omp_construct. gcc/cp/ChangeLog: * parser.cc (cp_parser_pragma): Replace call to cp_parser_omp_dispatch with cp_parser_omp_construct. --- gcc/cp/parser.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Paul-Antoine Arras wrote: > This is a followup to > ed49709acda OpenMP: C++ front-end support for dispatch + adjust_args. > > The call to cp_parser_omp_dispatch only belongs in cp_parser_omp_construct. In > cp_parser_pragma, handle PRAGMA_OMP_DISPATCH by calling cp_parser_omp_construct. I think this change is good - but not sufficient. For instance, the following gives an ICE: void k(); struct t { #pragma omp dispatch k(); }; I think that's context == pragma_member. Tobias
Hi Tobias, On 07/01/2025 12:13, Tobias Burnus wrote: > Paul-Antoine Arras wrote: >> This is a followup to >> ed49709acda OpenMP: C++ front-end support for dispatch + adjust_args. >> >> The call to cp_parser_omp_dispatch only belongs in >> cp_parser_omp_construct. In >> cp_parser_pragma, handle PRAGMA_OMP_DISPATCH by calling >> cp_parser_omp_construct. > > I think this change is good - but not sufficient. For instance, > the following gives an ICE: > > void k(); > struct t { > #pragma omp dispatch > k(); > }; > > I think that's context == pragma_member. This amended patch checks the context and adds the suggested testcase. Thanks,
Hi PA, Paul-Antoine Arras wrote: > This amended patch checks the context and adds the suggested testcase. LGTM - thanks! > Do not call cp_parser_omp_dispatch directly in cp_parser_pragma > > This is a followup to > ed49709acda OpenMP: C++ front-end support for dispatch + adjust_args. > > The call to cp_parser_omp_dispatch only belongs in cp_parser_omp_construct. In > cp_parser_pragma, handle PRAGMA_OMP_DISPATCH by calling cp_parser_omp_construct. > > gcc/cp/ChangeLog: > > * parser.cc (cp_parser_pragma): Replace call to cp_parser_omp_dispatch > with cp_parser_omp_construct. > > gcc/testsuite/ChangeLog: > > * g++.dg/gomp/dispatch-8.C: New test. Tobias
diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc index f548dc31c2b..7434c1d91ba 100644 --- a/gcc/cp/parser.cc +++ b/gcc/cp/parser.cc @@ -53060,7 +53060,7 @@ cp_parser_pragma (cp_parser *parser, enum pragma_context context, bool *if_p) break; case PRAGMA_OMP_DISPATCH: - cp_parser_omp_dispatch (parser, pragma_tok); + cp_parser_omp_construct (parser, pragma_tok, if_p); return true; case PRAGMA_IVDEP: