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.129.124]) by sourceware.org (Postfix) with ESMTPS id 5CB71384E3BD for ; Fri, 25 Nov 2022 13:22:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5CB71384E3BD Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669382557; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=aNtgfT35Wb2tLuc+0W1wY4lbGGVw8ZhnfAa9h+oLl+g=; b=BJt4YuuotQD9mOHXGNp2B+R4jiZcbtKVRwpgPtxrNr3RRFQQKW//oyaWNI4yM6vnDFaPeV 3625/2J+TutjX1pm6P0RiYEZ91nsF2s5m6qNRbdTV1IiINxoDCtBR7r2eP81YCizU9C+vc OVSai4Z7nz7Y0lwJk0ETuprbTmCpc4o= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-613-rWwTv1NfOfeGbZTDQkS1yQ-1; Fri, 25 Nov 2022 08:22:33 -0500 X-MC-Unique: rWwTv1NfOfeGbZTDQkS1yQ-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2EDF1185A794; Fri, 25 Nov 2022 13:22:33 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.194.202]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E48B54B3FC6; Fri, 25 Nov 2022 13:22:32 +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 2APDMSAp355301 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 25 Nov 2022 14:22:28 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 2APDMRQ7355300; Fri, 25 Nov 2022 14:22:27 +0100 Date: Fri, 25 Nov 2022 14:22:26 +0100 From: Jakub Jelinek To: Julian Brown Cc: Jakub Jelinek via Fortran , Tobias Burnus , gcc-patches@gcc.gnu.org, Thomas Schwinge Subject: Re: [PATCH v2 06/11] OpenMP: lvalue parsing for map clauses (C++) Message-ID: Reply-To: Jakub Jelinek References: <62e4e371468638d2f155c528a5c1e597558a56ac.1647619144.git.julian@codesourcery.com> <20221101215038.08a688e1@squid.athome> <20221108142954.6f68267e@squid.athome> MIME-Version: 1.0 In-Reply-To: <20221108142954.6f68267e@squid.athome> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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=-3.5 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_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, Nov 08, 2022 at 02:36:17PM +0000, Julian Brown wrote: > @@ -3258,6 +3273,7 @@ c_omp_address_inspector::get_origin (tree t) > || TREE_CODE (t) == SAVE_EXPR) > t = TREE_OPERAND (t, 0); > else if (TREE_CODE (t) == INDIRECT_REF > + && TREE_TYPE (TREE_OPERAND (t, 0)) > && TREE_CODE (TREE_TYPE (TREE_OPERAND (t, 0))) == REFERENCE_TYPE) > t = TREE_OPERAND (t, 0); > else > @@ -3274,7 +3290,9 @@ c_omp_address_inspector::get_origin (tree t) > tree > c_omp_address_inspector::maybe_unconvert_ref (tree t) > { > + /* The TREE_TYPE can be null if we had an earlier error. */ > if (TREE_CODE (t) == INDIRECT_REF > + && TREE_TYPE (TREE_OPERAND (t, 0)) > && TREE_CODE (TREE_TYPE (TREE_OPERAND (t, 0))) == REFERENCE_TYPE) > return TREE_OPERAND (t, 0); > I'd prefer avoiding changes like the above. If we had an earlier error, it should be error_mark_node or have error_mark_node type, not NULL. NULL type means something different in the C++ FE, in particular that something is type dependent and the type will be only figured out after instantiation. Other than that LGTM. Jakub