* [Patch, fortran] PR97612 [F08] Structure constructor of type with nested allocatable array components fails to compile
[not found] ` <CAGkQGiL-E9qGWcks-z=5zGbXx1CThfqsoDOmxXQOiWX3ozHDqQ@mail.gmail.com>
@ 2020-12-28 17:03 ` Paul Richard Thomas
2020-12-29 9:06 ` Thomas Koenig
0 siblings, 1 reply; 3+ messages in thread
From: Paul Richard Thomas @ 2020-12-28 17:03 UTC (permalink / raw)
To: fortran, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 541 bytes --]
Hi All,
Another one bites the dust! The patch is commented such that it is
self-explanatory.
Regtests on FC33/x86_64 - OK for master?
Paul
Fortran: Correct missing structure constructor comps. [PR97612].
2020-12-27 Paul Thomas <pault@gcc.gnu.org>
gcc/fortran
PR fortran/97612
* primary.c (build_actual_constructor): Missing allocatable
components are set unallocated using EXPR_NULL. Then missing
components are tested for a default initializer.
gcc/testsuite/
PR fortran/97612
* gfortran.dg/structure_constructor_17.f90: New test.
[-- Attachment #2: submit.diff --]
[-- Type: application/x-patch, Size: 2134 bytes --]
[-- Attachment #3: structure_constructor_17.f90 --]
[-- Type: application/octet-stream, Size: 378 bytes --]
! { dg-do compile }
!
! Test the fix for PR97612.
!
! Contributed by Martin Stein <mscfd@gmx.net>
!
program constructor_allocatable
implicit none
type :: s
integer, dimension(:), allocatable :: u
end type s
type :: t
type(s), dimension(:), allocatable :: x
end type t
type(t) :: a = t()
if (allocated (a%x)) stop 1
end program constructor_allocatable
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Patch, fortran] PR97612 [F08] Structure constructor of type with nested allocatable array components fails to compile
2020-12-28 17:03 ` [Patch, fortran] PR97612 [F08] Structure constructor of type with nested allocatable array components fails to compile Paul Richard Thomas
@ 2020-12-29 9:06 ` Thomas Koenig
2020-12-29 17:53 ` Paul Richard Thomas
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Koenig @ 2020-12-29 9:06 UTC (permalink / raw)
To: Paul Richard Thomas, fortran, gcc-patches
Hi Paul,
> Regtests on FC33/x86_64 - OK for master?
OK. Thanks for the patch!
Best regards
Thomas
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Patch, fortran] PR97612 [F08] Structure constructor of type with nested allocatable array components fails to compile
2020-12-29 9:06 ` Thomas Koenig
@ 2020-12-29 17:53 ` Paul Richard Thomas
0 siblings, 0 replies; 3+ messages in thread
From: Paul Richard Thomas @ 2020-12-29 17:53 UTC (permalink / raw)
To: Thomas Koenig; +Cc: fortran, gcc-patches
Hi Thomas,
Thanks - applied to master in
r11-6365-geeb145317b42d5203056851435457d9189a7303d .
I wonder if this one deserves backporting?
Cheers
Paul
On Tue, 29 Dec 2020 at 09:06, Thomas Koenig <tkoenig@netcologne.de> wrote:
>
> Hi Paul,
>
> > Regtests on FC33/x86_64 - OK for master?
>
> OK. Thanks for the patch!
>
> Best regards
>
> Thomas
>
--
"If you can't explain it simply, you don't understand it well enough" -
Albert Einstein
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-29 17:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-97612-10374@http.gcc.gnu.org/bugzilla/>
[not found] ` <bug-97612-10374-RcFInEkIt4@http.gcc.gnu.org/bugzilla/>
[not found] ` <CAGkQGiL-E9qGWcks-z=5zGbXx1CThfqsoDOmxXQOiWX3ozHDqQ@mail.gmail.com>
2020-12-28 17:03 ` [Patch, fortran] PR97612 [F08] Structure constructor of type with nested allocatable array components fails to compile Paul Richard Thomas
2020-12-29 9:06 ` Thomas Koenig
2020-12-29 17:53 ` Paul Richard Thomas
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).