From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by sourceware.org (Postfix) with ESMTPS id 2C4273858D32; Fri, 3 Nov 2023 07:01:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2C4273858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2C4273858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1034 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698994878; cv=none; b=uzp7O9r7jcRT3AtZ1yYai2OpdyEjtZb5YmSkrOTBA559r3pULra+DxfZjO/RFv7LEdLU8wVkJ/ZIw25ABVAejz0wjqVhzYX++S8u7Q82Fybyp+0POL6pObqw7UJKMMr0k4GYoRb8g7S/IkSsyQx7sHxZocu8IabQh+SnKpzeq68= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698994878; c=relaxed/simple; bh=iA6JL/he4ynGrbpa7fIug/Cpn/B5SPaCKJd+5jdRb7k=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=rVDtfZuHN0k8qkat9IKcW1XK6d7Njf2d854VI6D/ifFFWhQZGBR6DQBIWgzWrLjA3R3FG4jWEovDYTRnBUap42i6mCyKa/NfLXYQdaFvJr/1usQBC7NkpaIqbfQb5Kw624qAqp+vZbvOsU2GM1lZxH6ELa2dvCiZpzdf2TUcJb0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pj1-x1034.google.com with SMTP id 98e67ed59e1d1-280cc5f3fdcso1712425a91.1; Fri, 03 Nov 2023 00:01:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698994875; x=1699599675; darn=gcc.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Z59q86EngMvEjIV1vJP2hCMXN+8olaa3g+AFVcwbW1Q=; b=BuOA+iE2uzepNfxi0Fchr5RezFHXETx0cIGCiJaknWBk8dOQxeqc+tHwyYXWbJEJou F2wSUyORKj5GM+C1xoK81nNp5FvgQwAvQnz8u5KcZeBCWcGj8nWMOErorSZ9f90Z4IP8 Smel+XllOjYQLN68v3QPX1VsSr/aHm5AkKcmi3e8KeZ02DDbeswjpuiEe+j5M4uckuWE ayznwygM6zD9uWqHDTGZ9QwVdESs4oFC0W/UdmCGPLF11Cq+ynyyZoa/dPmyzs9sK010 4wnbsKKtzewrl26lwnU+2q0azmpXsP4maej4MHrOxj8F03F5SQYu/KpEX6CBwp803PSt +xGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698994875; x=1699599675; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Z59q86EngMvEjIV1vJP2hCMXN+8olaa3g+AFVcwbW1Q=; b=mu5YkXklr83OJOozwOC6arUoVaunTOhQOHiCRaCLTyzgi9Yuf86x9+D0g14C4FUM3r 8YJFB+0CT/ZOJkdysmy3YSkA6kuEIXjoRkJZZYdYbAXvDnuPzded9PcDgV2gP+5B0km6 pFE8D3818AwE4/ga+AzqG4L5iWx0LVREUqkpSHMM9CCloeq/S4gvoA2yzp46nN3tp/v8 sVIbPIgRrV1L6DYrXyacJiQJC+Dkvg6/W2RCVqJRYz2z2koEDWug0ILSUX+MOb1Utf0J 5SZybslxDIRBrCfcS5GVrKPEfk9w6QUThszjVE12P0S/RrhIaQojymuBxnOCzSXHPkSm Eqrw== X-Gm-Message-State: AOJu0Yy4TXZPRlwyU2XDWmwg9u1jbSLEjVkxsZNZ7Yrqs8qUlfJBmrwv MMrlLUiWdtblgdfcYbGDDkqqCTctAk9B1qoGnwA= X-Google-Smtp-Source: AGHT+IEpc2pEA5pilVSsPiV4ywye0rVaoWYATqPGoxNttNEqrUnllwl1aMqtDmE+bpsnjgM/wUGxPU8wj0erM+dEwM8= X-Received: by 2002:a17:90a:4922:b0:27d:5946:5e2c with SMTP id c31-20020a17090a492200b0027d59465e2cmr17469479pjh.12.1698994874972; Fri, 03 Nov 2023 00:01:14 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Paul Richard Thomas Date: Fri, 3 Nov 2023 07:01:03 +0000 Message-ID: Subject: Re: [PATCH] Fortran: passing of allocatable/pointer arguments to OPTIONAL+VALUE [PR92887] To: Harald Anlauf Cc: fortran , gcc-patches Content-Type: multipart/alternative; boundary="000000000000ff7ff906093a11f3" X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,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: --000000000000ff7ff906093a11f3 Content-Type: text/plain; charset="UTF-8" Hi Harald, This looks good to me. OK for mainline. Thanks for the patch. Paul On Wed, 1 Nov 2023 at 22:10, Harald Anlauf wrote: > Dear all, > > I've dusted off and cleaned up a previous attempt to fix the handling > of allocatable or pointer actual arguments to OPTIONAL+VALUE dummies. > The standard says that a non-allocated / non-associated actual argument > in that case shall be treated as non-present. > > However, gfortran's calling conventions demand that the presence status > for OPTIONAL+VALUE is passed as a hidden argument, while we need to > pass something on the stack which has the right type. The solution > is to conditionally create a temporary when needed. > > Testcase checked with NAG. > > Regtested on x86_64-pc-linux-gnu. OK for mainline? > > Thanks, > Harald > > --000000000000ff7ff906093a11f3--