From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by sourceware.org (Postfix) with ESMTPS id 326533858D32; Wed, 12 Apr 2023 06:56:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 326533858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-x1036.google.com with SMTP id c10-20020a17090abf0a00b0023d1bbd9f9eso13669577pjs.0; Tue, 11 Apr 2023 23:56:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681282585; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=5vKFObxW7j+2VWBpffC4pVsP726Rm2sIS1lZy3AF+V0=; b=cslVSiPzP0RgyeeEYG2OFw8Gvcbat13nJVa9CnZYxODop/tKMRgpWyIEobm9KcYvz7 mEh42oN2BsGR+a4swamFVr6kiTKjLfHM3IHNj9HZuB+zFFWg78Ovj5tsZdoDIbgqqueZ /itpRfB5cKctQiPPphbUHMjrKsq8BXv8JosK9vhCcg14VFWlLLomo3bwtTKDZlhCuGwO Vl+8kHylW6MFdpg/qwyOgEggUCPMC1XUFqkTMh8xNPVvQeunHWaVQlV+/05m4KgQDNdP NYNMpP5ecbV9zg7xt5WgK9XOKvAzP591DF9cdxRJqJUMnPX8SOpppwpRhkrwSobDoFUH qW6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681282585; 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=5vKFObxW7j+2VWBpffC4pVsP726Rm2sIS1lZy3AF+V0=; b=V06A9/cowjzhdG+QZQqOs5Rk8Eks9OzUif702wEZDKnIe4A0W49buCINJxW6IkG9eG LCxZwH2s7+LiExCLcmgnQhWxQu24nIellv/KLGjS++V3vJwniBws1dSquflOe6DrMRt1 52c5psDcDO5/joW7fu/AjhuDLyfPNNAwPflto7L1vJLiab5xqZ7fxnt2Q4tSP0NFStJJ rXpLgJIcnm12vEyvaJIbZuv88I/QEUbt+grVvrFu4cuO1Z8BDsmuC3xeWa8hYck1INrh 0OsLIFKsHoDG1DebfW9DooQRrm9rNpb8PSghTWOLNg4DPO/5yrx9WvHqdjDEaNO6eF+b cK+Q== X-Gm-Message-State: AAQBX9eVKhAtx9f3YMzRmxWK4X4y3bacLijOuBYhweKHeLdYKsQTKbe+ cuxm0O6g9krZPWTanLZseoQ/aQkptmuRydgEJUo= X-Google-Smtp-Source: AKy350ZG+ohantv755rUAioPYCgbfPW8BVBJhu/FxMrSeuVVQ5LAdeyIlQzhvLQ+8gLJYU2dZgLS923zSPoG6xn5/0c= X-Received: by 2002:a17:90a:6985:b0:246:b42b:696 with SMTP id s5-20020a17090a698500b00246b42b0696mr365926pjj.2.1681282585099; Tue, 11 Apr 2023 23:56:25 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Paul Richard Thomas Date: Wed, 12 Apr 2023 07:56:14 +0100 Message-ID: Subject: Re: [PATCH] Fortran: fix functions with entry and pointer/allocatable result [PR104312] To: Harald Anlauf Cc: fortran , gcc-patches Content-Type: multipart/alternative; boundary="00000000000040837905f91e1b68" 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 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: --00000000000040837905f91e1b68 Content-Type: text/plain; charset="UTF-8" Hi Harald, The patch looks good to me - OK for mainline. Thanks Paul On Tue, 11 Apr 2023 at 21:12, Harald Anlauf via Fortran wrote: > Dear all, > > the testcase in the PR by Gerhard exhibited a mis-treatment of > the function decl of the entry master if the function result > had a pointer attribute and the translation unit was compiled > with -ff2c. We actually should not use the peculiar special > treatment for default-real functions in that case, as -ff2c is > reserved for function results that can be expressed in Fortran77, > and POINTER was not allowed in that standard. Same for complex. > > Furthermore, it turned out that ALLOCATABLE function results > were not yet handled for functions with entries, even without > -ff2c. Adding support for this was straightforward. > > I also fixed a potential buffer overflow for a generated > internal symbol. > > Regtested on x86_64-pc-linux-gnu. OK for mainline? > > Thanks, > Harald > > -- "If you can't explain it simply, you don't understand it well enough" - Albert Einstein --00000000000040837905f91e1b68--