{"id":2233045,"url":"http://patchwork.ozlabs.org/api/1.2/covers/2233045/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/cover/20260505151030.1749548-1-waffl3x@baylibre.com/","project":{"id":17,"url":"http://patchwork.ozlabs.org/api/1.2/projects/17/?format=json","name":"GNU Compiler Collection","link_name":"gcc","list_id":"gcc-patches.gcc.gnu.org","list_email":"gcc-patches@gcc.gnu.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260505151030.1749548-1-waffl3x@baylibre.com>","list_archive_url":null,"date":"2026-05-05T15:01:53","name":"[00/12] OpenMP/C++: 'allocate' directive","submitter":{"id":90070,"url":"http://patchwork.ozlabs.org/api/1.2/people/90070/?format=json","name":"Waffl3x","email":"waffl3x@baylibre.com"},"mbox":"http://patchwork.ozlabs.org/project/gcc/cover/20260505151030.1749548-1-waffl3x@baylibre.com/mbox/","series":[{"id":502853,"url":"http://patchwork.ozlabs.org/api/1.2/series/502853/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/list/?series=502853","date":"2026-05-05T15:01:54","name":"OpenMP/C++: 'allocate' directive","version":1,"mbox":"http://patchwork.ozlabs.org/series/502853/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/covers/2233045/comments/","headers":{"Return-Path":"<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":["incoming@patchwork.ozlabs.org","gcc-patches@gcc.gnu.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","gcc-patches@gcc.gnu.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=baylibre-com.20251104.gappssmtp.com\n header.i=@baylibre-com.20251104.gappssmtp.com header.a=rsa-sha256\n header.s=20251104 header.b=N5c0xd2g;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=2620:52:6:3111::32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)","sourceware.org;\n\tdkim=pass (2048-bit key,\n unprotected) header.d=baylibre-com.20251104.gappssmtp.com\n header.i=@baylibre-com.20251104.gappssmtp.com header.a=rsa-sha256\n header.s=20251104 header.b=N5c0xd2g","sourceware.org;\n dmarc=none (p=none dis=none) header.from=baylibre.com","sourceware.org; spf=pass smtp.mailfrom=baylibre.com","server2.sourceware.org;\n arc=none smtp.remote-ip=2607:f8b0:4864:20::435"],"Received":["from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g929k0BDFz1yJ0\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 06 May 2026 01:14:34 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 346824BA902A\n\tfor <incoming@patchwork.ozlabs.org>; Tue,  5 May 2026 15:14:32 +0000 (GMT)","from mail-pf1-x435.google.com (mail-pf1-x435.google.com\n [IPv6:2607:f8b0:4864:20::435])\n by sourceware.org (Postfix) with ESMTPS id CB9C54BA5439\n for <gcc-patches@gcc.gnu.org>; Tue,  5 May 2026 15:10:36 +0000 (GMT)","by mail-pf1-x435.google.com with SMTP id\n d2e1a72fcca58-8270edc7e2eso185025b3a.2\n for <gcc-patches@gcc.gnu.org>; Tue, 05 May 2026 08:10:36 -0700 (PDT)","from waffl3x-prestige.lan ([2001:56a:f98a:b800:1f67:ce08:3cbd:86b8])\n by smtp.gmail.com with ESMTPSA id\n d2e1a72fcca58-83965645140sm2674956b3a.12.2026.05.05.08.10.34\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 05 May 2026 08:10:34 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 346824BA902A","OpenDKIM Filter v2.11.0 sourceware.org CB9C54BA5439"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org CB9C54BA5439","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org CB9C54BA5439","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777993837; cv=none;\n b=Bj1tloJjXmdp2iGwbJi9AI3PPrY+JEDfY7JdQVRA5NdUWMQ8o2gIw5PmG8gVqht47yqL+ALXxrEktcUNlLi0agvMF3g7Rkvrxl0vRoFRauNHF406YReuQvpX3kIryYEZsv4jgLFFsxg3TrQHlj9a4ajRl3kFyjroqA5lb7i6Lyw=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1777993837; c=relaxed/simple;\n bh=YkTW6e4EwAjEfJzw+rTzBFtNXhyMkTdqcRKdYIXKH/A=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=rNPM9vvpAwGMl09icEUPfSlS6WMe1kooR+BMRHmCdGUiO3xfmGMeBYYtp1wfgNk6JzWoOn7eoorIDbudlcXeDP8b8Ak9p82r2RCuDHC+gY5UiIBlUOx89a5M6+EVZ7fjOCekw7ckyKtYwgC/EB+hZw//7tZ1MCGD8z5gppA2jOk=","ARC-Authentication-Results":"i=1; server2.sourceware.org","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=baylibre-com.20251104.gappssmtp.com; s=20251104; t=1777993835;\n x=1778598635;\n darn=gcc.gnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=8tK5touAlOQXzqL2W3nmErw6rQmN4JGmkgCJhwEgb9M=;\n b=N5c0xd2g/NOdlgNO2Xv1V4gMH7B3B9kSDb1EOWwcTyUF+P2pspzedeg0wlJffW/7U9\n BvVXs5M4Cy3Zr2JXfD/PzQyWeItNmhwjglenVdmWRbcOQZ85pdpAp/vo8h1wOpbKkrAo\n bKufDgm2FcDnO+mlm4hVW3vlNrhRe57MFMFZxowhozLjSaQG2Jjv2bL+DB4w/WaY/m0V\n LprA2PTl0JBkTJ30vzfKAhgkqObzDPm36hB4RFOWuYl/+DIw4mEr6nKRU0N8f9EiLxf7\n u+cbkoOUsPeGOiY1RKTIsCR08Av5MOJHV1+KdkgHTcFBRGKP19lLuz2Fh7QFS3qpuz+d\n OUvQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777993835; x=1778598635;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=8tK5touAlOQXzqL2W3nmErw6rQmN4JGmkgCJhwEgb9M=;\n b=CZZSlQKekVxsrP7cegETNjUCvS3BxZO7aFTUC08+Dn3PWN7c533nvveGiV1asXl/wf\n LWs1CRtpVKJg3Cw95GMOs3RJ9FnEF5b8sxzzWyceCyAIBb5pqAwgdNhsUeRbWqgNN3sS\n PzPiPucsjcu8w61asgshLWE3iunWhxqo1afxa1tTYsvfctuFqQFUJ7fL4ae1IzD2eRI7\n mjrNCAiORjbI2yaE0swGyNC2sJIdIVJNgZ+Ti3OxR2AfyhESEw1Gqg+4SBNNGfLAwvDB\n DZl4ULa4XMpaSx5ruC3oEBaJfTkmgWaZG/DdG/Yu9QBhMC14FEFkFnbHaabqM4SuJQBR\n H1mw==","X-Gm-Message-State":"AOJu0Yy20V4I8rz2fQxiTG/GKddK4/npj0ocGJ6sjY2cJvdfxZylgFUM\n PVoS2le6qRmR0ffwRCz6sA3eVLdTdhdvXOmewGxjAlrETwzDXJ0k20mX3r62M+JXqp4M0W9Tagr\n 2iUJp","X-Gm-Gg":"AeBDieutV0O0CbEubYoAhmI1CbWPCC2SqUzGhcrX7JnZaH1xzkgq9VbH08iJl5HF/vX\n CytwvQ0gnBTvU1gdhAzM2gj6Cv1YM4a870hQNIE5s/vUxSS47JqVSo/e0WX29DObP+Gk33dpzUq\n JrrPtl0VnRIHSBz2FzdfXxubr047vlFyYpgIZOwhAS7kn65obqo9bk6Q22rA0XpmRC97LHXrGSF\n 3ZYphBM4z+6Qq6KSmTpiNPEU03+7no7ersfUWOKXHM1jdUm3RmN8PGVwQqnGhNTCGGsxbV732Lm\n ZuBymYzL+S9C/eO1sZe8MoUWudt3yrfqN3OdfCgfQ2Qo5cUUVUjSqBtVi7HDXA713lL60MEGVEs\n y/YKTAJd1gn/kWs2BBWHJ1nc6zuifNpCZ+bm6W/J9NGIDuLA98IKJ8bSySF0qac5ETlvOk+UoNt\n 5DnkNvo3STVL/cOikD2IlM19+q5y7SE5TDRiNz6lkVVwuvWefsl/KIGBBzX1uP","X-Received":"by 2002:a05:6a00:21ca:b0:836:3faa:9693 with SMTP id\n d2e1a72fcca58-8393dc6e457mr1923612b3a.3.1777993835389;\n Tue, 05 May 2026 08:10:35 -0700 (PDT)","From":"Waffl3x <waffl3x@baylibre.com>","To":"gcc-patches@gcc.gnu.org","Cc":"Waffl3x <waffl3x@baylibre.com>","Subject":"[PATCH 00/12] OpenMP/C++: 'allocate' directive","Date":"Tue,  5 May 2026 09:01:53 -0600","Message-ID":"<20260505151030.1749548-1-waffl3x@baylibre.com>","X-Mailer":"git-send-email 2.54.0","In-Reply-To":"\n <CAH+W3Ppbho4pj6W-rWk4mMssrttOjt7aNco-oWW5Sw5f5Yx2GA@mail.gmail.com>","References":"\n <CAH+W3Ppbho4pj6W-rWk4mMssrttOjt7aNco-oWW5Sw5f5Yx2GA@mail.gmail.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","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>,\n <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>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>","Errors-To":"gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"},"content":"This patchset implements support for OpenMP allocate directive support\nin C++. This version splits the patch up into a significantly more coherent and\nreviewable set of patches. I ran into many issues during this, as a result this\nversion gains a few features, and loses some early diagnostics in templates.\nHowever, it should also be significantly more polished.\n\nBootstrapped and regtested on x86_64-linux-gnu.\n\nWaffl3x (12):\n  libgomp.c: Change _Alignof to alignof for C++ in test\n  OpenMP/C: Change repetitive allocator clause diagnostic wording\n  OpenMP/C++: Remove case PRAGMA_OMP_ALLOCATE from\n    cp_parser_omp_construct\n  OpenMP/C++: Add support for 'omp allocate' directive\n  OpenMP/C++: Enhance diagnostics of 'omp allocate' directive\n  OpenMP/C++: Force location wrapper on 'omp allocate' directive clauses\n  OpenMP/C++: Don't do NRVO on vars used in an 'omp allocate' directive\n  OpenMP/C++: Add static analysis of allocate directive allocator clause\n  OpenMP/C++: Diagnose constexpr vars in an allocate directive\n  OpenMP/C++: Sorry for static vars in implicit constexpr functions\n  OpenMP/C++: Sorry for allocate directive in omp::decl attribute\n  OpenMP/C++: Avoid quadratic complexity in diagnostic\n\n gcc/c/c-parser.cc                             |    2 +-\n gcc/cp/constexpr.cc                           |    2 +\n gcc/cp/cp-tree.def                            |   11 +\n gcc/cp/cp-tree.h                              |   17 +\n gcc/cp/parser.cc                              |  405 ++++++-\n gcc/cp/pt.cc                                  |   40 +\n gcc/cp/semantics.cc                           |  414 +++++++\n gcc/cp/typeck.cc                              |    5 +-\n gcc/gimplify.cc                               |   10 +-\n gcc/testsuite/c-c++-common/gomp/allocate-10.c |    5 +-\n gcc/testsuite/c-c++-common/gomp/allocate-11.c |   29 +-\n gcc/testsuite/c-c++-common/gomp/allocate-12.c |   33 +-\n gcc/testsuite/c-c++-common/gomp/allocate-14.c |    3 -\n gcc/testsuite/c-c++-common/gomp/allocate-15.c |    3 -\n gcc/testsuite/c-c++-common/gomp/allocate-16.c |   20 +-\n gcc/testsuite/c-c++-common/gomp/allocate-17.c |    2 +-\n gcc/testsuite/c-c++-common/gomp/allocate-18.c |   18 +-\n gcc/testsuite/c-c++-common/gomp/allocate-19.c |   25 +-\n gcc/testsuite/c-c++-common/gomp/allocate-20.c |  343 ++++++\n gcc/testsuite/c-c++-common/gomp/allocate-5.c  |   32 +-\n gcc/testsuite/c-c++-common/gomp/allocate-9.c  |   94 +-\n .../gomp/allocate-allocator-handle.h          |   19 +\n gcc/testsuite/c-c++-common/gomp/directive-1.c |    1 -\n .../c-c++-common/gomp/uses_allocators-1.c     |    4 +-\n gcc/testsuite/g++.dg/gomp/allocate-10.C       |  111 ++\n gcc/testsuite/g++.dg/gomp/allocate-11.C       |   18 +\n gcc/testsuite/g++.dg/gomp/allocate-12.C       |   38 +\n gcc/testsuite/g++.dg/gomp/allocate-13.C       |   28 +\n gcc/testsuite/g++.dg/gomp/allocate-14.C       | 1037 +++++++++++++++++\n gcc/testsuite/g++.dg/gomp/allocate-15.C       |   92 ++\n gcc/testsuite/g++.dg/gomp/allocate-16.C       |  251 ++++\n gcc/testsuite/g++.dg/gomp/allocate-17.C       |  557 +++++++++\n gcc/testsuite/g++.dg/gomp/allocate-18.C       |  274 +++++\n gcc/testsuite/g++.dg/gomp/allocate-19.C       |  128 ++\n gcc/testsuite/g++.dg/gomp/allocate-20.C       |   96 ++\n gcc/testsuite/g++.dg/gomp/allocate-21.C       |   88 ++\n gcc/testsuite/g++.dg/gomp/allocate-22.C       |   31 +\n gcc/testsuite/g++.dg/gomp/allocate-23.C       |   24 +\n gcc/testsuite/g++.dg/gomp/allocate-24.C       |   26 +\n gcc/testsuite/g++.dg/gomp/allocate-5.C        |  410 +++++++\n gcc/testsuite/g++.dg/gomp/allocate-6.C        |  391 +++++++\n gcc/testsuite/g++.dg/gomp/allocate-7.C        |  224 ++++\n gcc/testsuite/g++.dg/gomp/allocate-8.C        |   48 +\n gcc/testsuite/g++.dg/gomp/allocate-9.C        |   78 ++\n .../g++.dg/gomp/allocate-allocator-handle.h   |   18 +\n .../g++.dg/gomp/allocate-handles-1.C          |   61 +\n .../g++.dg/gomp/allocate-handles-2.C          |   45 +\n gcc/testsuite/g++.dg/gomp/omp-constexpr.C     |    3 +-\n libgomp/testsuite/libgomp.c++/allocate-2.C    |  329 ++++++\n .../allocate-4.c                              |    3 -\n .../allocate-5.c                              |    3 -\n .../allocate-6.c                              |    3 -\n .../allocate-7.c                              |    8 +-\n 53 files changed, 5752 insertions(+), 208 deletions(-)\n create mode 100644 gcc/testsuite/c-c++-common/gomp/allocate-20.c\n create mode 100644 gcc/testsuite/c-c++-common/gomp/allocate-allocator-handle.h\n create mode 100644 gcc/testsuite/g++.dg/gomp/allocate-10.C\n create mode 100644 gcc/testsuite/g++.dg/gomp/allocate-11.C\n create mode 100644 gcc/testsuite/g++.dg/gomp/allocate-12.C\n create mode 100644 gcc/testsuite/g++.dg/gomp/allocate-13.C\n create mode 100644 gcc/testsuite/g++.dg/gomp/allocate-14.C\n create mode 100644 gcc/testsuite/g++.dg/gomp/allocate-15.C\n create mode 100644 gcc/testsuite/g++.dg/gomp/allocate-16.C\n create mode 100644 gcc/testsuite/g++.dg/gomp/allocate-17.C\n create mode 100644 gcc/testsuite/g++.dg/gomp/allocate-18.C\n create mode 100644 gcc/testsuite/g++.dg/gomp/allocate-19.C\n create mode 100644 gcc/testsuite/g++.dg/gomp/allocate-20.C\n create mode 100644 gcc/testsuite/g++.dg/gomp/allocate-21.C\n create mode 100644 gcc/testsuite/g++.dg/gomp/allocate-22.C\n create mode 100644 gcc/testsuite/g++.dg/gomp/allocate-23.C\n create mode 100644 gcc/testsuite/g++.dg/gomp/allocate-24.C\n create mode 100644 gcc/testsuite/g++.dg/gomp/allocate-5.C\n create mode 100644 gcc/testsuite/g++.dg/gomp/allocate-6.C\n create mode 100644 gcc/testsuite/g++.dg/gomp/allocate-7.C\n create mode 100644 gcc/testsuite/g++.dg/gomp/allocate-8.C\n create mode 100644 gcc/testsuite/g++.dg/gomp/allocate-9.C\n create mode 100644 gcc/testsuite/g++.dg/gomp/allocate-allocator-handle.h\n create mode 100644 gcc/testsuite/g++.dg/gomp/allocate-handles-1.C\n create mode 100644 gcc/testsuite/g++.dg/gomp/allocate-handles-2.C\n create mode 100644 libgomp/testsuite/libgomp.c++/allocate-2.C\n rename libgomp/testsuite/{libgomp.c => libgomp.c-c++-common}/allocate-4.c (95%)\n rename libgomp/testsuite/{libgomp.c => libgomp.c-c++-common}/allocate-5.c (96%)\n rename libgomp/testsuite/{libgomp.c => libgomp.c-c++-common}/allocate-6.c (98%)\n rename libgomp/testsuite/{libgomp.c => libgomp.c-c++-common}/allocate-7.c (84%)"}