From patchwork Sun Nov 5 17:37:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 161739 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp2235672vqu; Sun, 5 Nov 2023 09:38:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IGDYHfYoD/DYh9mPhxwoHZwSllasNBvbBhrLZ0kyPyjOuQO7NXA97eGwktVdRQURjJITFDb X-Received: by 2002:a05:6871:800c:b0:1d6:439d:d04e with SMTP id sk12-20020a056871800c00b001d6439dd04emr30247525oab.53.1699205903152; Sun, 05 Nov 2023 09:38:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699205903; cv=pass; d=google.com; s=arc-20160816; b=mwUlfrVp8CWisfRefb6+t9lpz0qsUDxw9j27licY706V2v7DZk0DrGXPrDMZ46RLID oSX+3k4KWOkNQg1uVyg5JnoirSd6nbefopzRoCYrgtdxGlRnmMCv749rtYkOmfeduS8L kxFQroY1gK7bpB6WyR+30NNeF2RzKWXwTi3Px+u48Ax3iYl8OaZ8LFfq8H6W7NiGf76m +/Jn+Jdunj+97hyud6pvlbYM+sxEMtG2kUoWaD9vdTREoswtiZ0z8WFZ0H5wjC/PXQEM haLW23cuRPoJUHYR7MQrCMCPq5ngS4nPTvfrPwuw+04/rO68cye91ZdAWv9dNTJhrupK sSKQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:reply-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=fZHTR5L6dEjERoc6PcvdXjLkUxZzgV9aFvpGhChZPio=; fh=hPrbWPhweUx4V0GV9uXJqbyAzg2ABmTz7kczrAQqMmM=; b=J1YkoL0wRs9/0CZFRXZnLM6hySQjJEdxe9Lcztbf6oeshfoNshP+0cqrGv39HCkm+J 7ljVUai6MAUFMHbN6h/KKYiaDghh9gXF7SIRug07ta6694j7Vrtbn2/OVyU0PisX2/D0 r0ICcGay+NDLdK+dN0B+kciMPJiZ9GxOxMSilBbKdweYcf7c7tT1A+Fq2y/xkAtKROe/ B/kxmyT6tv+Tf8KiOts+37+1oXpFg7DA7XmceXv87FrHEovYnOePJGi8KmcCeny2YIPL QNd5VyaxCrYVs+AA+g1vmCFc/YHLNb77xciudQnbDge64OrvNvKwQtp/gWedqmpbOPNP H55A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=U2xdYzaw; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id v5-20020a05622a130500b0040cebdb7b38si4697583qtk.176.2023.11.05.09.38.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 09:38:23 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=U2xdYzaw; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DC73E3858C30 for ; Sun, 5 Nov 2023 17:38:22 +0000 (GMT) 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 2D3363858CDA for ; Sun, 5 Nov 2023 17:37:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2D3363858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2D3363858CDA Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699205880; cv=none; b=DzHQOFYZRSkIqK+ld2FlLeotsGusbd30qfvYXZJqYyXxM8h0uFZSI7mDh0bbe1b/zpD9kpPdzYWvJBYaU0wQGTGg+mC3rHUiGq7+sywRPKy3K/ZNPBzZjtgWmjwPRwTeaIiUg/bIKWCy4vzVJ4u97tKtswQdlyMWO9h7Am0KoLo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699205880; c=relaxed/simple; bh=ZUwdAGaOaW8CPJZ61+vt7Bdckmtz409/TiLTF7Dj3Yw=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=fJtRqNy66sqlX71qitXNuReQSC1WC7wqygUgOoODy/t+e6ppu6FuQms8rx1TVUV9/mpHkZCEf3Mm993IP4aboBSSO+SUAg5fuZzzbN7xzy2CG5czi0P+Fbbweebr1idyLvqBPrTgMS5Doy67iSxgwbsobMe7Nh38ItPrLCx3j40= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699205877; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type; bh=fZHTR5L6dEjERoc6PcvdXjLkUxZzgV9aFvpGhChZPio=; b=U2xdYzawkZfHtN5rCX+uAqxJe2XpJgbpqueFRiE03Fh/A4T79nw7YiURdtSUfyfGTcLZU+ I/Zi/wkyxCAyrg8ObNlb4b48JiwwXDmVo1CXcXUUcnfuoTeQtOhxMOiJrAO/k6e6O2WrbF jLj5Ze1XxT3P75ZuVXGGZb1zGFlINKs= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-568-65MZ6IZ-O9-tHjtcDuijUg-1; Sun, 05 Nov 2023 12:37:56 -0500 X-MC-Unique: 65MZ6IZ-O9-tHjtcDuijUg-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1C33B811E7B for ; Sun, 5 Nov 2023 17:37:56 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.81]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B4213492BE0 for ; Sun, 5 Nov 2023 17:37:55 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 3A5HbrQZ1794235 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Sun, 5 Nov 2023 18:37:53 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 3A5HbrIe1794234 for gcc-patches@gcc.gnu.org; Sun, 5 Nov 2023 18:37:53 +0100 Date: Sun, 5 Nov 2023 18:37:52 +0100 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [committed] openmp: Adjust handling of __has_attribute (omp::directive)/sequence and add omp::decl Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781746529032026934 X-GMAIL-MSGID: 1781746529032026934 Hi! I forgot to tweak c_common_has_attribute for the C++ omp::decl addition and now also for the C omp::{directive,sequence,decl} addition. Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk. 2023-11-05 Jakub Jelinek * c-lex.cc (c_common_has_attribute): Return 1 for omp::directive and omp::sequence with -fopenmp or -fopenmp-simd also for C, not just for C++. Return 1 for omp::decl with -fopenmp or -fopenmp-simd for both C and C++. * c-c++-common/gomp/attrs-1.c: Adjust for omp::directive and omp::sequence being supported also in C and add tests for omp::decl. * c-c++-common/gomp/attrs-2.c: Likewise. * c-c++-common/gomp/attrs-3.c: Add tests for omp::decl. Jakub --- gcc/c-family/c-lex.cc.jj 2023-10-08 16:37:31.301279702 +0200 +++ gcc/c-family/c-lex.cc 2023-11-04 09:19:58.739016364 +0100 @@ -367,15 +367,13 @@ c_common_has_attribute (cpp_reader *pfil = get_identifier ((const char *) cpp_token_as_text (pfile, nxt_token)); attr_id = canonicalize_attr_name (attr_id); - if (c_dialect_cxx ()) - { - /* OpenMP attributes need special handling. */ - if ((flag_openmp || flag_openmp_simd) - && is_attribute_p ("omp", attr_ns) - && (is_attribute_p ("directive", attr_id) - || is_attribute_p ("sequence", attr_id))) - result = 1; - } + /* OpenMP attributes need special handling. */ + if ((flag_openmp || flag_openmp_simd) + && is_attribute_p ("omp", attr_ns) + && (is_attribute_p ("directive", attr_id) + || is_attribute_p ("sequence", attr_id) + || is_attribute_p ("decl", attr_id))) + result = 1; if (result) attr_name = NULL_TREE; else --- gcc/testsuite/c-c++-common/gomp/attrs-1.c.jj 2021-07-23 09:50:02.429080908 +0200 +++ gcc/testsuite/c-c++-common/gomp/attrs-1.c 2023-11-04 09:39:37.770503402 +0100 @@ -1,144 +1,96 @@ /* { dg-do compile } */ /* { dg-options "-fopenmp" } */ -#if __has_attribute(omp::directive) -#ifndef __cplusplus -#error omp::directive supported in C -#endif -#else -#ifdef __cplusplus -#error omp::directive not supported in C++ -#endif +#if !__has_attribute(omp::directive) +#error omp::directive not supported in C/C++ #endif -#if __has_attribute(omp::sequence) -#ifndef __cplusplus -#error omp::sequence supported in C -#endif -#else -#ifdef __cplusplus -#error omp::sequence not supported in C++ +#if !__has_attribute(omp::sequence) +#error omp::sequence not supported in C/C++ #endif + +#if !__has_attribute(omp::decl) +#error omp::decl not supported in C/C++ #endif #if __has_attribute(omp::unknown) #error omp::unknown supported #endif -#if __has_cpp_attribute(omp::directive) -#ifndef __cplusplus -#error omp::directive supported in C -#endif -#else -#ifdef __cplusplus -#error omp::directive not supported in C++ -#endif +#if !__has_cpp_attribute(omp::directive) +#error omp::directive not supported in C/C++ #endif -#if __has_cpp_attribute(omp::sequence) -#ifndef __cplusplus -#error omp::sequence supported in C -#endif -#else -#ifdef __cplusplus -#error omp::sequence not supported in C++ +#if !__has_cpp_attribute(omp::sequence) +#error omp::sequence not supported in C/C++ #endif + +#if !__has_cpp_attribute(omp::decl) +#error omp::sequence not supported in C/C++ #endif #if __has_cpp_attribute(omp::unknown) #error omp::unknown supported #endif -#if __has_attribute(__omp__::__directive__) -#ifndef __cplusplus -#error __omp__::__directive__ supported in C -#endif -#else -#ifdef __cplusplus -#error __omp__::__directive__ not supported in C++ -#endif +#if !__has_attribute(__omp__::__directive__) +#error __omp__::__directive__ not supported in C/C++ #endif -#if __has_attribute(__omp__::__sequence__) -#ifndef __cplusplus -#error __omp__::__sequence__ supported in C -#endif -#else -#ifdef __cplusplus -#error __omp__::__sequence__ not supported in C++ +#if !__has_attribute(__omp__::__sequence__) +#error __omp__::__sequence__ not supported in C/C++ #endif + +#if !__has_attribute(__omp__::__decl__) +#error __omp__::__decl__ not supported in C/C++ #endif #if __has_attribute(__omp__::__unknown__) #error __omp__::__unknown__ supported #endif -#if __has_cpp_attribute(__omp__::__directive__) -#ifndef __cplusplus -#error __omp__::__directive__ supported in C -#endif -#else -#ifdef __cplusplus -#error __omp__::__directive__ not supported in C++ -#endif +#if !__has_cpp_attribute(__omp__::__directive__) +#error __omp__::__directive__ not supported in C/C++ #endif -#if __has_cpp_attribute(__omp__::__sequence__) -#ifndef __cplusplus -#error __omp__::__sequence__ supported in C -#endif -#else -#ifdef __cplusplus -#error __omp__::__sequence__ not supported in C++ +#if !__has_cpp_attribute(__omp__::__sequence__) +#error __omp__::__sequence__ not supported in C/C++ #endif + +#if !__has_cpp_attribute(__omp__::__decl__) +#error __omp__::__decl__ not supported in C/C++ #endif #if __has_cpp_attribute(__omp__::__unknown__) #error __omp__::__unknown__ supported #endif -#if __has_attribute(omp::__directive__) -#ifndef __cplusplus -#error omp::__directive__ supported in C -#endif -#else -#ifdef __cplusplus -#error omp::__directive__ not supported in C++ -#endif +#if !__has_attribute(omp::__directive__) +#error omp::__directive__ not supported in C/C++ #endif -#if __has_attribute(__omp__::sequence) -#ifndef __cplusplus -#error __omp__::sequence supported in C -#endif -#else -#ifdef __cplusplus -#error __omp__::sequence not supported in C++ +#if !__has_attribute(__omp__::sequence) +#error __omp__::sequence not supported in C/C++ #endif + +#if !__has_attribute(omp::__decl__) +#error omp::__decl__ not supported in C/C++ #endif #if __has_attribute(omp::__unknown__) #error omp::__unknown__ supported #endif -#if __has_cpp_attribute(__omp__::directive) -#ifndef __cplusplus -#error __omp__::directive supported in C -#endif -#else -#ifdef __cplusplus -#error __omp__::directive not supported in C++ -#endif +#if !__has_cpp_attribute(__omp__::directive) +#error __omp__::directive not supported in C/C++ #endif -#if __has_cpp_attribute(omp::__sequence__) -#ifndef __cplusplus -#error omp::__sequence__ supported in C -#endif -#else -#ifdef __cplusplus -#error omp::__sequence__ not supported in C++ +#if !__has_cpp_attribute(omp::__sequence__) +#error omp::__sequence__ not supported in C/C++ #endif + +#if !__has_cpp_attribute(__omp__::decl) +#error __omp__::decl not supported in C/C++ #endif #if __has_cpp_attribute(__omp__::unknown) --- gcc/testsuite/c-c++-common/gomp/attrs-2.c.jj 2021-07-23 09:50:02.429080908 +0200 +++ gcc/testsuite/c-c++-common/gomp/attrs-2.c 2023-11-04 09:39:43.542421872 +0100 @@ -1,144 +1,96 @@ /* { dg-do compile } */ /* { dg-options "-fno-openmp -fopenmp-simd" } */ -#if __has_attribute(omp::directive) -#ifndef __cplusplus -#error omp::directive supported in C -#endif -#else -#ifdef __cplusplus -#error omp::directive not supported in C++ -#endif +#if !__has_attribute(omp::directive) +#error omp::directive not supported in C/C++ #endif -#if __has_attribute(omp::sequence) -#ifndef __cplusplus -#error omp::sequence supported in C -#endif -#else -#ifdef __cplusplus -#error omp::sequence not supported in C++ +#if !__has_attribute(omp::sequence) +#error omp::sequence not supported in C/C++ #endif + +#if !__has_attribute(omp::decl) +#error omp::decl not supported in C/C++ #endif #if __has_attribute(omp::unknown) #error omp::unknown supported #endif -#if __has_cpp_attribute(omp::directive) -#ifndef __cplusplus -#error omp::directive supported in C -#endif -#else -#ifdef __cplusplus -#error omp::directive not supported in C++ -#endif +#if !__has_cpp_attribute(omp::directive) +#error omp::directive not supported in C/C++ #endif -#if __has_cpp_attribute(omp::sequence) -#ifndef __cplusplus -#error omp::sequence supported in C -#endif -#else -#ifdef __cplusplus -#error omp::sequence not supported in C++ +#if !__has_cpp_attribute(omp::sequence) +#error omp::sequence not supported in C/C++ #endif + +#if !__has_cpp_attribute(omp::decl) +#error omp::sequence not supported in C/C++ #endif #if __has_cpp_attribute(omp::unknown) #error omp::unknown supported #endif -#if __has_attribute(__omp__::__directive__) -#ifndef __cplusplus -#error __omp__::__directive__ supported in C -#endif -#else -#ifdef __cplusplus -#error __omp__::__directive__ not supported in C++ -#endif +#if !__has_attribute(__omp__::__directive__) +#error __omp__::__directive__ not supported in C/C++ #endif -#if __has_attribute(__omp__::__sequence__) -#ifndef __cplusplus -#error __omp__::__sequence__ supported in C -#endif -#else -#ifdef __cplusplus -#error __omp__::__sequence__ not supported in C++ +#if !__has_attribute(__omp__::__sequence__) +#error __omp__::__sequence__ not supported in C/C++ #endif + +#if !__has_attribute(__omp__::__decl__) +#error __omp__::__decl__ not supported in C/C++ #endif #if __has_attribute(__omp__::__unknown__) #error __omp__::__unknown__ supported #endif -#if __has_cpp_attribute(__omp__::__directive__) -#ifndef __cplusplus -#error __omp__::__directive__ supported in C -#endif -#else -#ifdef __cplusplus -#error __omp__::__directive__ not supported in C++ -#endif +#if !__has_cpp_attribute(__omp__::__directive__) +#error __omp__::__directive__ not supported in C/C++ #endif -#if __has_cpp_attribute(__omp__::__sequence__) -#ifndef __cplusplus -#error __omp__::__sequence__ supported in C -#endif -#else -#ifdef __cplusplus -#error __omp__::__sequence__ not supported in C++ +#if !__has_cpp_attribute(__omp__::__sequence__) +#error __omp__::__sequence__ not supported in C/C++ #endif + +#if !__has_cpp_attribute(__omp__::__decl__) +#error __omp__::__decl__ not supported in C/C++ #endif #if __has_cpp_attribute(__omp__::__unknown__) #error __omp__::__unknown__ supported #endif -#if __has_attribute(omp::__directive__) -#ifndef __cplusplus -#error omp::__directive__ supported in C -#endif -#else -#ifdef __cplusplus -#error omp::__directive__ not supported in C++ -#endif +#if !__has_attribute(omp::__directive__) +#error omp::__directive__ not supported in C/C++ #endif -#if __has_attribute(__omp__::sequence) -#ifndef __cplusplus -#error __omp__::sequence supported in C -#endif -#else -#ifdef __cplusplus -#error __omp__::sequence not supported in C++ +#if !__has_attribute(__omp__::sequence) +#error __omp__::sequence not supported in C/C++ #endif + +#if !__has_attribute(omp::__decl__) +#error omp::__decl__ not supported in C/C++ #endif #if __has_attribute(omp::__unknown__) #error omp::__unknown__ supported #endif -#if __has_cpp_attribute(__omp__::directive) -#ifndef __cplusplus -#error __omp__::directive supported in C -#endif -#else -#ifdef __cplusplus -#error __omp__::directive not supported in C++ -#endif +#if !__has_cpp_attribute(__omp__::directive) +#error __omp__::directive not supported in C/C++ #endif -#if __has_cpp_attribute(omp::__sequence__) -#ifndef __cplusplus -#error omp::__sequence__ supported in C -#endif -#else -#ifdef __cplusplus -#error omp::__sequence__ not supported in C++ +#if !__has_cpp_attribute(omp::__sequence__) +#error omp::__sequence__ not supported in C/C++ #endif + +#if !__has_cpp_attribute(__omp__::decl) +#error __omp__::decl not supported in C/C++ #endif #if __has_cpp_attribute(__omp__::unknown) --- gcc/testsuite/c-c++-common/gomp/attrs-3.c.jj 2021-07-23 09:50:02.429080908 +0200 +++ gcc/testsuite/c-c++-common/gomp/attrs-3.c 2023-11-04 09:31:02.993715546 +0100 @@ -9,6 +9,10 @@ #error omp::sequence supported even when -fno-openmp{,-simd} #endif +#if __has_attribute(omp::decl) +#error omp::decl supported even when -fno-openmp{,-simd} +#endif + #if __has_attribute(omp::unknown) #error omp::unknown supported #endif @@ -21,6 +25,10 @@ #error omp::sequence supported even when -fno-openmp{,-simd} #endif +#if __has_cpp_attribute(omp::decl) +#error omp::decl supported even when -fno-openmp{,-simd} +#endif + #if __has_cpp_attribute(omp::unknown) #error omp::unknown supported #endif @@ -33,6 +41,10 @@ #error __omp__::__sequence__ supported even when -fno-openmp{,-simd} #endif +#if __has_attribute(__omp__::__decl__) +#error __omp__::__decl__ supported even when -fno-openmp{,-simd} +#endif + #if __has_attribute(__omp__::__unknown__) #error __omp__::__unknown__ supported #endif @@ -45,6 +57,10 @@ #error __omp__::__sequence__ supported even when -fno-openmp{,-simd} #endif +#if __has_cpp_attribute(__omp__::__decl__) +#error __omp__::__decl__ supported even when -fno-openmp{,-simd} +#endif + #if __has_cpp_attribute(__omp__::__unknown__) #error __omp__::__unknown__ supported #endif @@ -57,6 +73,10 @@ #error __omp__::sequence supported even when -fno-openmp{,-simd} #endif +#if __has_attribute(omp::__decl__) +#error omp::__decl__ supported even when -fno-openmp{,-simd} +#endif + #if __has_attribute(omp::__unknown__) #error omp::__unknown__ supported #endif @@ -69,6 +89,10 @@ #error omp::__sequence__ supported even when -fno-openmp{,-simd} #endif +#if __has_cpp_attribute(__omp__::decl) +#error __omp__::decl supported even when -fno-openmp{,-simd} +#endif + #if __has_cpp_attribute(__omp__::unknown) #error __omp__::unknown supported #endif