From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by sourceware.org (Postfix) with ESMTPS id 4BF683858C32 for ; Tue, 28 May 2024 07:14:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4BF683858C32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=baylibre.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4BF683858C32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::62a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716880474; cv=none; b=WKnSFxRb9qSXelwmfLz4uZiCgwGMsn/xE10ytNyL6xByDfUCyNq6XMJtsznk3pT+g849SstfoKKMYancdeP5fdnwLLNF40nb4kuCX8Qg+VV6ZqrQL5Q2jIxCFKX5AhFQxo3Ra+ciLh92N+pjKeshE7lkjZoNsxQD0L3P9oqo2pI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716880474; c=relaxed/simple; bh=iPpt00egaudLDOh6EpErn11Sn95zzBcBKhib/MVf1O4=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=MmmofY14qI/O5ZaR9YKS1I3W+GglXbM5coZfKlzonpgMNT4JUEBY6TFg857pBbTFLHxaT6/x3uQ9F/UeX6a27zsr/Hgx/0CE9BHwrtpvE8EFriQ+FBnoqhplWN48JfOihNFfGKdTz4xHXfYobVHQEVKHYKpJ5r2ROe859g+x7TQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a5cec2c2981so22161766b.1 for ; Tue, 28 May 2024 00:14:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716880470; x=1717485270; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=gmcyjB4Wb3XwmueifMVy2Ev4zAczkYv+HeKicA4MWrk=; b=Jucy8860atzQy+9uLTaSB6eHcvJrFjTW1w2fb0VaZS0GY7siwpMFydLTcISc9Snx0X uQ++JatSWw0K/Hlll9DatMDNqj6WGC6v6ybSEVa7njI0f3EDEkpmAg44L13UAJBnTwYp AcSiLp/ZBi8ncYs3NVIBjF65bMjPLtr+vBHWCDU62yTBlx3FKtl3+FGEkCYoXCRu0lbw 3n1/s3Nx3Y9qs6oPPqefe5JK+XVhIxCJQR8ebBIEEt4XC4Qc+YdzRyeZGoOyQWy90k02 TluYp2LEQDY25Z95KlfzJonkCU+zIX4F94grcArnVcqu87aOrn2Uv12WcPRc8VGmDua0 ONPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716880470; x=1717485270; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gmcyjB4Wb3XwmueifMVy2Ev4zAczkYv+HeKicA4MWrk=; b=wqNq+vCOrXT/Uizkhdfk90vWoa6HG5wLcMuV0SyCyIcYqW+d6OQGqIIXCsTL55t1m6 6fEj3m1hUCcyX9gUN9hdfVJZjs/offyDtzog8U7svxf7RIzK6bPDoIDzTnijR3y+3nEH CirLcvuGT1WDDAnXOsuR9GvKgtK0/M0fD19fNN/BJmMxkrJUWBThQrWcOtoRunQskeIg L/l4oRMbUJeKWzrK5KIG6xdorN9AXqIDxoEFmlxLzTjIAQYR+cY/JQJU9CsMTn5OJBHD 8VsxRC+1+7/e+s8+iG2JrImgUuoXsAoqy6BCP2bpppbvzHf1cYFE3rk0C7+LTWj9SWan DUZQ== X-Forwarded-Encrypted: i=1; AJvYcCU0Hy4rA2+aPyAQRxTw8fpCFRaUK5PoEgP/dPassWtYmOoxUdBu+rA2Galj8prpYMr2VvrAqZrfeMGg+/Qp/7q7M4lGjx8iYA== X-Gm-Message-State: AOJu0Yw+wPUBFS1EmwhJCYq9ldCu4HkrUdLl8L6sFuvdw/8cXy5uSpeB kgd/JYXTRRtA5Y77vYEP7BH5masrz9g4Mr9sxI4EyZCc450U+/bjFBzorZoU4q8= X-Google-Smtp-Source: AGHT+IEMTBgzqmHrfEZM/VGRvZMaf1X7q9A3ZN/0jwRcWkbyYGkEztsJxC9pzfh9fssC2/1Wwtajig== X-Received: by 2002:a50:aad6:0:b0:579:cee4:9192 with SMTP id 4fb4d7f45d1cf-579cee49298mr4087909a12.30.1716880469727; Tue, 28 May 2024 00:14:29 -0700 (PDT) Received: from ?IPV6:2001:16b8:3f9f:db00:3021:7a1a:6c79:4db8? ([2001:16b8:3f9f:db00:3021:7a1a:6c79:4db8]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-579bfc697c6sm4198105a12.70.2024.05.28.00.14.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 May 2024 00:14:29 -0700 (PDT) Message-ID: <043633bd-be87-4267-8803-163d5a60e96d@baylibre.com> Date: Tue, 28 May 2024 09:14:28 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 6/7] OpenMP: Fortran front-end support for dispatch + adjust_args To: Paul-Antoine Arras , gcc-patches References: <20240527115439.3967217-1-parras@baylibre.com> <20240527115439.3967217-7-parras@baylibre.com> Content-Language: en-US From: Tobias Burnus In-Reply-To: <20240527115439.3967217-7-parras@baylibre.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 List-Id: Hi PA, hi all, two remarks while quickly browsing the code: Paul-Antoine Arras: > + if (n->sym->ts.type != BT_DERIVED > + || !n->sym->ts.u.derived->ts.is_iso_c) > + { > + gfc_error ("argument list item %qs in " > + "% at %L must be of " > + "TYPE(C_PTR)", > + n->sym->name, &n->where); I think you need to rule out 'c_funptr' as well, e.g. via: || (n->sym->ts.u.derived->intmod_sym_id != ISOCBINDING_PTR))) I do note that in openmp.cc, we have one check which checks explicitly for c_ptr and one existing one which only checks for (c_ptr or c_funptr); can you fix that one as well? * * * But I mainly miss an update to 'module.cc' for the 'declare variant' change; the 'adjust_args' (for 'need_device_ptr', only) list items have to be saved in the .mod file - otherwise the following will not work: -aux.f90 ! { dg-do compile { target skip-all-targets } } module my_mod ... !$omp declare variant ... adjust_args(need_device_ptr: ...) ... end module .f90 { dg-do ... ! { dg-additional-sources -aux.f90 } ... call ... !$omp displatch call end For C++ modules, it should be fine as those for those, the tree is dumped. Tobias