[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-bugs
Subject:    [Bug fortran/103312] [11/12/13/14/15 Regression] ICE in gfc_find_component since r9-1098-g3cf89a7b99
From:       "pault at gcc dot gnu.org via Gcc-bugs" <gcc-bugs () gcc ! gnu ! org>
Date:       2024-05-18 8:09:03
Message-ID: bug-103312-4-2fRzWAZIeg () http ! gcc ! gnu ! org/bugzilla/
[Download RAW message or body]

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103312

--- Comment #9 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to Paul Thomas from comment #7)
> Created attachment 58231 [details]
> Preliminary fix for this PR
> 
> I went back to the beginning on this problem, having realised that it is far
> too early to resolve the compcall of a class argument in
> gfc_reduce_init_expr. Hence the chunk in expr.cc. The second chunk is
> (possibly) a bit of a kludge and, I would have thought, should be checked,
> at very least by checking that the class extends an abstract type. I will
> come back to this - yard duty calls!
> 
> A reduced test case, without the module 'example' and no type extension also
> failed and is now fixed. Also failing in this reduced testcase was:
>     function func (this) result (string)
>       class(bar) :: this
>       character (:), allocatable :: string
>       allocate (character(this%size()) :: string)
>       string = repeat ("x", len (string))
>     end function
> 
> Again, this is fixed.
> 
> Finally, the patch even regression tests OK :-)
> 
> Enough for now.
> 
> Paul

I just noticed that the version on my tree has expr guarded in the additional
condition in gfc_reduce_init_expr. Otherwise gfortran.dg/pr103588.f90
segfaults.

Paul=
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic