From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by sourceware.org (Postfix) with ESMTPS id 725253858C36; Tue, 12 Mar 2024 21:28:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 725253858C36 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 725253858C36 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1031 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710278899; cv=none; b=CjSnFmWC6sQZ6fvygrvujlEn/zv7IS4vKSQiXp15FO0X4e4m+Fd3oOIBc+3LNKEch+JhxPugW0ssa6s4i6G0Ep6qJbF4QKG0stfXLcXqV3GobwFhxgYKML/XL1QKSSUea5+Y+oFpmCTeOjbK+u7Erb4fbTNat0nLqWMi9StF5Y4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710278899; c=relaxed/simple; bh=EITBL9ho0z0mQ4vxDX4bsVmrJUWigAr7kDTM6P44rnI=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=N5IYbdNXnyela37NF6ifQGavStTDBPZ5MGjh4qY4mWmvqKnkz2xtM8aqySDnGiW8Enem0nYIzn7MZZI0QWK+dGU34b6C+rG4y2DFd4ER2pp3es2qcVbdd7LaiWPUalVedugIBYEh3yqFBpoXzkGqhjJH9+emawVU2Zec0Uk3gTE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pj1-x1031.google.com with SMTP id 98e67ed59e1d1-29bb3d62949so3209314a91.1; Tue, 12 Mar 2024 14:28:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710278893; x=1710883693; 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=+DiJVUXSLVKJHp6Ln0KK48rWxY7Vw9hg8kOHMeiiOCE=; b=JUMttohDD01zg15HO8NYzX8ReiKXRmQw+599NyJ2s/UFpS4j/j98UnOlioJgwGNP4X FMZY7ggN9CQIvwqnO9xyH6AceCMog8V6KSEbdfukieoOZDOnKoCgo+BwDiUhohzjUAix WZnydnOFeJ98XuUA8w96QzUnhj3AWTS7TuMtebO+juzaes5DOE5vINH+hQDdknxyGAke I4oeDFDyZinfT6Bbsy9+xW1J7CnIzTojLnKOvS+48oSmqYRd8ijjnKIgxhCz6u2s6zc7 KVikK5qbJahMmVT+W+/yv3t3Vl32VReJy5PX4lpkVM9ITWxNLFza4mME3M10+/rPETs+ K6HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710278893; x=1710883693; 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=+DiJVUXSLVKJHp6Ln0KK48rWxY7Vw9hg8kOHMeiiOCE=; b=H80op8O4BjHEtFaiHFfwCCoExoKbyk/XdLWwfIAa42z/BjcdbWyKXwa3FG/XQj2zms S7ox2f8maotQMgp/HKYTNCT08xBPvZnKuVh4GP4KmkhcU9Q1v1bQ5rX6uKku29HxPalC 7z+U2xDYae8S4WJB+gex1G8VLcJLZldpeqyJuZ3ODe1aC00zVgdl5fwV4hvlBdzF+/8X LSFP0IKZQ5vOJLzpGoG4LmDJeAkWGcCDl7LpRipTS6ANyvbYT+AhZoF8PbJWUG0z/5if OENK35aFVWmQch1PPeSQuTTIrbDEhpetDHBdJJ7JIsAnZBwLPtoC6HbpzkeFYt1z3+y5 UfZA== X-Forwarded-Encrypted: i=1; AJvYcCVIs2CaLIM1i6Lddd5NVumuf9KEIKefSAj71rPz8gdRKfDa3n5MFoBQ6v3rjrlYK4nWyPYh1z27256nLgSQUX7Hd/1CfcjMVg== X-Gm-Message-State: AOJu0YwB1If9NRC8jt/WMgFda35run9Qg93FwGiuYgw9VmMmQ1Uzyrzn JfbdO19QNvgbz62a3PQRKrGJJkgcG41DduBdC9/AW3q83GTs0WOJBLI7m+4N99Uf4kDvmR8lEjL ArGudV1VQRdfjTFerc0mWGPm9nJE= X-Google-Smtp-Source: AGHT+IETOOCKt78rQ7BIRAhVWzw/1pg64GMc+4hP+w9XsBL3V50skxU1/B5tnh+Ott5uXerVBUvjjvGeYychDxUYRQk= X-Received: by 2002:a17:90a:390c:b0:29b:a509:30aa with SMTP id y12-20020a17090a390c00b0029ba50930aamr3230463pjb.14.1710278893448; Tue, 12 Mar 2024 14:28:13 -0700 (PDT) MIME-Version: 1.0 References: <674cfbf0-a95d-4433-a025-29e78dc0bcef@gmx.de> In-Reply-To: From: Paul Richard Thomas Date: Tue, 12 Mar 2024 21:28:02 +0000 Message-ID: Subject: Re: [Patch, fortran PR89645/99065 No IMPLICIT type error with: ASSOCIATE( X => function() ) To: Harald Anlauf Cc: "fortran@gcc.gnu.org" , gcc-patches , Steve Kargl , Damian Rouson Content-Type: multipart/alternative; boundary="000000000000e9388f06137d5508" X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,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: --000000000000e9388f06137d5508 Content-Type: text/plain; charset="UTF-8" Hi Harald, Roger that about the comments. The major part of my recent efforts has been to maximise comments - apparently not always successfully! The main reason that I want to "fix everything" is that this is it; I will not work on this approach anymore. The gfortran/g95 founder's approach was very clever but has found it's limit with the associate construct. The sad thing is that this is the only blocker that I know of. Thanks Paul On Tue, 12 Mar 2024 at 21:07, Harald Anlauf wrote: > Hi Paul, > > On 3/12/24 15:54, Paul Richard Thomas wrote: > > Hi All, > > > > This is the last posting of this patch before I push it. Harald is OK > with > > it on the grounds that the inferred_type flag guards the whole lot, > > except for the chunks in trans-stmt.cc. > > > > In spite of Harald's off-list admonition not to try to fix everything at > > once, this version fixes most of the inquiry reference bugs > > (associate_68.f90) with the exception of character(kind=4) function > > selectors. The reason for this is that I have some housekeeping to do > > before release on finalization and then I want to replace this patch in > > 15-branch with two pass parsing. My first attempts at the latter were a > > partial success. > > you wouldn't stop trying to fix everything, would you? ;-) > > > It regtests OK on x86_64. Unless there are objections, I will commit on > > Thursday evening. > > No objections, just one wish: could you improve the text of the > following comments so that mere mortals understand them? > > diff --git a/gcc/fortran/primary.cc b/gcc/fortran/primary.cc > index 12e7bf3c873..0ab69bb9dce 100644 > --- a/gcc/fortran/primary.cc > +++ b/gcc/fortran/primary.cc > [...] > + /* If there is a usable inquiry reference not there are no matching > + derived types, force the inquiry reference by setting unknown the > + type of the primary expression. */ > > > I have a hard time parsing the first part of that sentence. > > diff --git a/gcc/fortran/symbol.cc b/gcc/fortran/symbol.cc > index 5d9852c79e0..16adb2a7efb 100644 > --- a/gcc/fortran/symbol.cc > +++ b/gcc/fortran/symbol.cc > [...] > +/* Find all derived types in the uppermost namespace that have a component > + a component called name and stash them in the assoc field of an > + associate name variable. > > > "a component" too much? > > Thanks, > Harald > > > Cheers > > > > Paul > > --000000000000e9388f06137d5508--