public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Harald Anlauf <anlauf@gmx.de>
To: Jakub Jelinek <jakub@redhat.com>, fortran@gcc.gnu.org
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] fortran: gfc_trans_subcomponent_assign fixes [PR113503]
Date: Sat, 17 Feb 2024 16:05:16 +0100	[thread overview]
Message-ID: <3da43bd3-82c8-45c8-9f88-3be17ef1d36c@gmx.de> (raw)
In-Reply-To: <ZdB2DPPaQdCCvEpD@tucnak>

Hi Jakub,

On 2/17/24 10:02, Jakub Jelinek wrote:
> Hi!
>
> The r14-870 changes broke xtb package tests (reduced testcase is the first
> one below) and caused ICEs on a test derived from that (the second one).
[...]

thanks for your detailed analysis and for the patch, which puts
things in straight order to actually fix two issues here!

> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

OK for trunk, except for the minor nit below.

> --- gcc/testsuite/gfortran.dg/pr113503_1.f90.jj	2024-02-16 14:16:17.937153094 +0100
> +++ gcc/testsuite/gfortran.dg/pr113503_1.f90	2024-02-16 14:16:10.124258815 +0100
> @@ -0,0 +1,18 @@
> +! PR fortran/113503
> +! { dg-do compile }
> +! { dg-options "-O2 -fno-inline -Wuninitialized" }
> +
> +program pr113503
> +  implicit none
> +  type :: T
> +    character(len=:), allocatable :: u
> +  end type
> +  character(len=20) :: us(1) = 'foobar'
> +  type(T) :: x
> +  x = T(u = trim (us(1)))	! { dg-bogus "is used uninitialized" }
                             ^^^^ tab here not allowed in Fortran

My newsreader shows a tab here, giving a warning when running the test.
Also, applying your patch on top of r14-9045 I do not see the
uninitialized warning, which could have been fixed by r14-8947.
Please recheck and adjust accordingly.

> +  call foo
> +contains
> +  subroutine foo
> +    if (x%u /= 'foobar') stop 1
> +  end subroutine
> +end

Thanks,
Harald



  reply	other threads:[~2024-02-17 15:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-17  9:02 Jakub Jelinek
2024-02-17 15:05 ` Harald Anlauf [this message]
2024-02-17 15:49   ` Jakub Jelinek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3da43bd3-82c8-45c8-9f88-3be17ef1d36c@gmx.de \
    --to=anlauf@gmx.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).