From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 8E86A3858D39 for ; Wed, 17 Aug 2022 12:13:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8E86A3858D39 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-642-Dpz06iPLMqOtxJnIklD82w-1; Wed, 17 Aug 2022 08:13:35 -0400 X-MC-Unique: Dpz06iPLMqOtxJnIklD82w-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E03AB3C0ED58; Wed, 17 Aug 2022 12:13:33 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.41]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A1C0540CFD0A; Wed, 17 Aug 2022 12:13:33 +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 27HCDUTE3133359 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 17 Aug 2022 14:13:31 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 27HCDTc03133358; Wed, 17 Aug 2022 14:13:29 +0200 Date: Wed, 17 Aug 2022 14:13:28 +0200 From: Jakub Jelinek To: Tobias Burnus Cc: gcc-patches Subject: Re: [PATCH, OpenMP, C++] Allow classes with static members to be mappable Message-ID: Reply-To: Jakub Jelinek References: <45836136-ada7-500e-8fd1-c4f2b4ae515b@codesourcery.com> <4e5632ec-d25a-445e-2c74-5b54a8d145ea@codesourcery.com> MIME-Version: 1.0 In-Reply-To: <4e5632ec-d25a-445e-2c74-5b54a8d145ea@codesourcery.com> X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Aug 2022 12:13:39 -0000 On Wed, Jul 27, 2022 at 01:45:30PM +0200, Tobias Burnus wrote: > OpenMP/C++: Allow classes with static members to be mappable > > As this is the last lang-specific user of the omp_mappable_type hook, > the hook is removed, keeping only a generic omp_mappable_type for > incomplete types (or error_node). > > gcc/c/ChangeLog: > > * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type > instead of removed langhook. > * c-typeck.cc (c_finish_omp_clauses): Likewise. > > gcc/cp/ChangeLog: > > * cp-objcp-common.h (LANG_HOOKS_OMP_MAPPABLE_TYPE): Remove. > * cp-tree.h (cp_omp_mappable_type, cp_omp_emit_unmappable_type_notes): > Remove. > * decl2.cc (cp_omp_mappable_type_1, cp_omp_mappable_type, > cp_omp_emit_unmappable_type_notes): Remove. > (cplus_decl_attributes): Call omp_mappable_type instead of > removed langhook. > * decl.cc (cp_finish_decl): Likewise; call cxx_incomplete_type_inform > in lieu of cp_omp_emit_unmappable_type_notes. > * semantics.cc (finish_omp_clauses): Likewise. > > gcc/ChangeLog: > > * gimplify.cc (omp_notice_variable): Call omp_mappable_type > instead of removed langhook. > * omp-general.h (omp_mappable_type): New prototype. > * omp-general.cc (omp_mappable_type): New; moved from ... > * langhooks.cc (lhd_omp_mappable_type): ... here. > * langhooks-def.h (lhd_omp_mappable_type, > LANG_HOOKS_OMP_MAPPABLE_TYPE): Remove. > (LANG_HOOKS_FOR_TYPES_INITIALIZER): Remote the latter. > * langhooks.h (struct lang_hooks_for_types): Remove > omp_mappable_type. > > gcc/testsuite/ChangeLog: > > * g++.dg/gomp/unmappable-1.C: Remove dg-error; remove dg-note no > longer shown as TYPE_MAIN_DECL is NULL. > * c-c++-common/gomp/map-incomplete-type.c: New test. > > Co-authored-by: Chung-Lin Tang Ok, thanks. Jakub