From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf2c.google.com (mail-qv1-xf2c.google.com [IPv6:2607:f8b0:4864:20::f2c]) by sourceware.org (Postfix) with ESMTPS id E57D43858C20; Wed, 9 Mar 2022 08:33:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E57D43858C20 Received: by mail-qv1-xf2c.google.com with SMTP id b12so1457579qvk.1; Wed, 09 Mar 2022 00:33:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Tv+ZgetBdlF7e4m/9753sD2m5RWdwWwboCLCUyaV5FM=; b=nEfbwgS7KlMmos4sYySVCpJSZkI0ggDVXTaTizT/9Fs7lkmYpOMSDXWxYV2Pn1XtYz /rMxoE6xvBc4ungRiZHhaneHZiqHcPlkPgFuAtEcbVWKZ6/9MqRpY5dJmbpz2ric/IAR hQmDN6e1fZa9CSgODpZz3G9bvFh+3WNZfWk23BVj/AhNVd70Q/HklxY42ttH4gDTD6kD sz30X71cR+w4I77tnVaCjPLBtImAkjw/xELgR6sRcO8RTtZnyoZN8GTtzHFoRAL6Ad2x YyljkuFr2Ppq0HE5lRHe6k5ACjUfyeDzgbLhNT6eKhF3tGFt94OuXaG/K+Ol5PhXqtCe NZUQ== X-Gm-Message-State: AOAM531oZVDlEGnOn4930Edk/qQw7r6ZoMwGhlrYCRIZ1GRDdKBFVI5b YG+OU9tFklAqLPFSyRgLP5+OdGAaWs9dJPeX8pBrpIr/ X-Google-Smtp-Source: ABdhPJxP9BXuYIpqT9KnVW9M9+JY9hyPON6woYO6RboH1jA6aoJtF16He/1WTXJotquVGXXFnpBwjZ9xiddJFDHQi5Q= X-Received: by 2002:a0c:c98c:0:b0:435:80f:8300 with SMTP id b12-20020a0cc98c000000b00435080f8300mr15248443qvk.84.1646814822392; Wed, 09 Mar 2022 00:33:42 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Paul Richard Thomas Date: Wed, 9 Mar 2022 08:33:31 +0000 Message-ID: Subject: Re: [Patch] Fortran: Fix CLASS handling in SIZEOF intrinsic To: Tobias Burnus Cc: gcc-patches , fortran X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Mar 2022 08:33:44 -0000 Hi Tobias, Thanks for the patch and the particularly comprehensive testcase. OK for mainline as far as I am concerned. Paul On Tue, 8 Mar 2022 at 20:06, Tobias Burnus wrote: > Fix SIZEOF handling. > > I have to admit that I do understand what the current code does, > but do not understand what the previous code did. However, it > still passes the testsuite - and also some code which did ICE > now compiles :-) > > While writing the testcase, I did find two issues: > * Passing a CLASS to TYPE(*),dimension(..) will have an > elem_len of the declared type and not of the dynamic type. > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104844 > * var%class_array(1,1)%array will have size(...) =3D=3D 0 > instead of size(... % array). > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104845 > > OK for mainline? (Unless you want to hold off until GCC 13) > > Tobias > > ----------------- > Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 2= 01, > 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: > Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaft: M=C3=BCnchen; > Registergericht M=C3=BCnchen, HRB 106955 > --=20 "If you can't explain it simply, you don't understand it well enough" - Albert Einstein