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 43F2D3858C50 for ; Tue, 12 Sep 2023 07:15:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 43F2D3858C50 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=1694502911; 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=PLpiGxaQORMiMfrFl+b5/Xy+VLbcEd04nd4Ky9tzJCQ=; b=O4uKMTdstvUcYv68U5j19CfPrd+l8TaFbgl7tpULb7kjvs6AiawNRQP5NU7BqkBxqZn+al bUZaZ7ptupDebBWw//uyK+SsZnN4NOsM/adi2BqLf3Alch1gkXGisZOMaFR5PuSTB6Corv aKMwX1rhENMBKVV1nGy1PJhZTC15axA= 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-520-HNlaOmi4MECN5gw8kFFhzQ-1; Tue, 12 Sep 2023 03:15:10 -0400 X-MC-Unique: HNlaOmi4MECN5gw8kFFhzQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 557058A0721; Tue, 12 Sep 2023 07:15:10 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.225.209]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 183112904; Tue, 12 Sep 2023 07:15:09 +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 38C7F8Gw3696690 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 12 Sep 2023 09:15:08 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 38C7F70p3696689; Tue, 12 Sep 2023 09:15:07 +0200 Date: Tue, 12 Sep 2023 09:15:07 +0200 From: Jakub Jelinek To: Tobias Burnus Cc: gcc-patches Subject: Re: [Patch] OpenMP (C only): omp allocate - extend parsing support, improve diagnostic Message-ID: Reply-To: Jakub Jelinek References: <2b31f97f-22a4-3b47-c0d8-4fb01dea7c1c@codesourcery.com> <75657fba-3de3-067b-541b-448b90af2b04@codesourcery.com> <6083ff90-1bb2-41de-a353-369859a1a69b@codesourcery.com> MIME-Version: 1.0 In-Reply-To: <6083ff90-1bb2-41de-a353-369859a1a69b@codesourcery.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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.4 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 autolearn=ham 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, Sep 12, 2023 at 09:04:16AM +0200, Tobias Burnus wrote: > Done now. What's not caught is, e.g., a value change by calling a > function which modifies its parameter: > > omp_allocator_t a = ...; int v; foo(a); #pragma omp allocate(v) allocator(a) > > as the current check is only whether 'a' is declared before 'v' or > whether 'a' is assigned to between v's declaration and the pragma. > > Any additional comments or suggestions? As I said, we can't catch all the mistakes, the unfortunate thing is that the syntax allows them. I'll try to make omp::decl attribute working soon and that will make that problem less severe when using that syntax. Jakub