From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by sourceware.org (Postfix) with ESMTPS id 57EF83858D20; Wed, 21 Feb 2024 21:20:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 57EF83858D20 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmx.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 57EF83858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=212.227.17.21 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708550453; cv=none; b=EllrDr5xonOqAPqGUIKUWSxb2woYekGLP6bGLuIATlW5IIkoMNM/TVTvFMUF+hUo/+1pK0uPUvneMI6/BGYT5M3gKFWg/LlR0haNgOsEOkqVPfaJqfwu0TxnvJOWj4Fb+Z1b2Y+0ym/czY9J8PZmNrrPZVP1mGFC53j2083WYfs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708550453; c=relaxed/simple; bh=B/9B+myrAjj4kqHW6h9iJOm/DCVUhUP8KVmapd48WaQ=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=u08E6apONHWr6SPDqJZVoMpwSq+xaobVyYFqQxjJaCty67vlzyS3Xt9HIFyhO9bq9xy8FXBGBqlQI3+qaNrRB+KoTFqwLEUDQOB57xXhQhobHl3NvR7yDTHrEfZRU2TQbkk72ZdddGpAVGczq3j+IaV2KWQRmesayoXPSRHt6Hs= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1708550444; x=1709155244; i=anlauf@gmx.de; bh=B/9B+myrAjj4kqHW6h9iJOm/DCVUhUP8KVmapd48WaQ=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From: In-Reply-To; b=nbv/HwVJwbCuHRU7ZchX0MlNiHwnP/56451efN1RF2iHgUB6J6MTqRPl0WwViM6u xQgzxCu5wKJ868rjzQYPDABv0WQSnaKJFdonHybOu+GM91bveQH8cE6xIRSJ8WQzS zzOlShMZGrXvTQ2J/GsnJoQSVXKXtNCmfF7tN+htogQqHwIaVYv2HCElQad8IU91P S6uuXlwtwU97NF8Ayts2wKx8mzinIb0gct4INmuQIl/H9iwtWjaKxd+mNjU9xsZGl MLcBJm4/O3ILGdFNRzXm/HyM0NIeMIhdCiUL3pRBFaaxO4X9k7cPhyE7dCRP9EF78 wcNicDiyd3IFxVucpg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.178.29] ([79.232.145.107]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MbzyJ-1r4fGF2DpH-00dYjP; Wed, 21 Feb 2024 22:20:44 +0100 Message-ID: Date: Wed, 21 Feb 2024 22:20:43 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Fix fortran/PR114024 To: sgk@troutmask.apl.washington.edu Cc: Jerry D , fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org Newsgroups: gmane.comp.gcc.patches,gmane.comp.gcc.fortran References: <29ba08a7-8218-4591-8c3f-36c17090e497@gmail.com> <3444d912-2e79-4e16-a425-79810d161ebb@gmx.de> Content-Language: en-US From: Harald Anlauf In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:c1zBQLdJXgSMVn9VzTakEY0hWYts6CMZMbhB+LI0epDZRUAxvsx xHUQmZ2f+H8Qt1y5LLMMz34JFIt45wybAtsq2cHSenLwNK6Flu6JcNguk0mLohT8UexLdMf mFcU3zAAjEYt+ueD5L1ISow5WGB+diurJaAeORx9eb/YIsjhFMU34uo4kRu0AtG+D4mYh+J OS9qM/LFWCOmjBh82CYYg== UI-OutboundReport: notjunk:1;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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: On 2/21/24 22:00, Steve Kargl wrote: > Unfortunately, valgrind does not work on AMD FX-8350 cpu. Do you mean valgrind does not work at all? For gcc, you need to configure --enable-valgrind-annotations to not get bogus warnings. > memleak vs ICE. I think I'll take one over the other. > Probably need to free code->expr3 before the copy. Yep. > I tried gfc_replace_expr in an earlier patch. It did not > work. >> - it still fails on the following code, because the traversal >> of the refs is incomplete / wrong: >> >> program foo >> implicit none >> complex :: cmp(3) >> real, pointer :: pp(:) >> class(*), allocatable :: uu(:) >> type t >> real :: re >> real :: im >> end type t >> type u >> type(t) :: tt(3) >> end type u >> type(u) :: cc >> >> cmp =3D (3.45,6.78) >> cc% tt% re =3D cmp% re >> cc% tt% im =3D cmp% im >> allocate (pp, source =3D cc% tt% im) ! ICE > > cc%tt%im isn't a complex-part-ref, so this seems to > be a different (maybe related) issue. Does the code > compile with 'source =3D (cc%tt%im)'? If so, perhaps, > detecting a component reference and doing the simply > wrapping with parentheses can be done. Yes, that's why I tried to make up the above example. I think %re and %im are not too special, they work here pretty much like component refs elsewhere. > >> print *, pp >> allocate (uu, source =3D cc% tt% im) ! ICE > > Ditto. Not to mention I know nothing about the implementation > of CLASS in gfortran. > You can ignore this one for now. It works if one places parens around the source expr as for the other cases. Harald