public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/106065] New: Crash when reading extended derived type array in namelist
@ 2022-06-23 13:31 philippe.wautelet at aero dot obs-mip.fr
2022-06-24 2:03 ` [Bug fortran/106065] " jvdelisle at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: philippe.wautelet at aero dot obs-mip.fr @ 2022-06-23 13:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106065
Bug ID: 106065
Summary: Crash when reading extended derived type array in
namelist
Product: gcc
Version: 12.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: philippe.wautelet at aero dot obs-mip.fr
Target Milestone: ---
Created attachment 53195
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53195&action=edit
Reproducer
I get a crash when using an array of extended derived types.
If I define an other type containing the same information but not extended, the
problem disappears.
See the attached source:
> gfortran type_extends_nml.f90 ;./a.out
&NAM_BAL_NE
DATE_TIME_NE(1)%NYEAR= 2022,
DATE_TIME_NE(1)%NMONTH= 0,
DATE_TIME_NE(1)%NDAY= 0,
DATE_TIME_NE(1)%XTIME= 0.00000000 ,
DATE_TIME_NE(2)%NYEAR= 0,
DATE_TIME_NE(2)%NMONTH= 0,
DATE_TIME_NE(2)%NDAY= 0,
DATE_TIME_NE(2)%XTIME= 1.23399997 ,
/
At line 36 of file type_extends_nml.f90
Fortran runtime error: Cannot match namelist object name 2022
I tested with several versions of gfortran from version 5.5.0 to 12.1.0. All
failed.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/106065] Crash when reading extended derived type array in namelist
2022-06-23 13:31 [Bug fortran/106065] New: Crash when reading extended derived type array in namelist philippe.wautelet at aero dot obs-mip.fr
@ 2022-06-24 2:03 ` jvdelisle at gcc dot gnu.org
2022-07-02 17:22 ` jvdelisle at gcc dot gnu.org
2023-08-31 13:07 ` philippe.wautelet at aero dot obs-mip.fr
2 siblings, 0 replies; 4+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2022-06-24 2:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106065
Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2022-06-24
CC| |jvdelisle at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
Well, its not really a 'crash', but certainly not correct.
Comment out the READ statements and look at the result:
$ ./a.out
&NAM_BAL_NE
DATE_TIME_NE(1)%NYEAR=0 ,
DATE_TIME_NE(1)%NMONTH=0 ,
DATE_TIME_NE(1)%NDAY=0 ,
DATE_TIME_NE(1)%XTIME= 0.00000000 ,
DATE_TIME_NE(2)%NYEAR=0 ,
DATE_TIME_NE(2)%NMONTH=0 ,
DATE_TIME_NE(2)%NDAY=0 ,
DATE_TIME_NE(2)%XTIME= 0.00000000 ,
/
&NAM_BAL_E
DATE_TIME_E%TDATE%NYEAR=0 ,
DATE_TIME_E%TDATE%NMONTH=0 ,
DATE_TIME_E%TDATE%NDAY=0 ,
DATE_TIME_E%YTIME= 0.00000000 ,
/
The extended type is not even being seen as an array
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/106065] Crash when reading extended derived type array in namelist
2022-06-23 13:31 [Bug fortran/106065] New: Crash when reading extended derived type array in namelist philippe.wautelet at aero dot obs-mip.fr
2022-06-24 2:03 ` [Bug fortran/106065] " jvdelisle at gcc dot gnu.org
@ 2022-07-02 17:22 ` jvdelisle at gcc dot gnu.org
2023-08-31 13:07 ` philippe.wautelet at aero dot obs-mip.fr
2 siblings, 0 replies; 4+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2022-07-02 17:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106065
--- Comment #2 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
I was a bit curious to see what flang would do with the test case. It gives
the exact same error message as gfortran, word for word.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/106065] Crash when reading extended derived type array in namelist
2022-06-23 13:31 [Bug fortran/106065] New: Crash when reading extended derived type array in namelist philippe.wautelet at aero dot obs-mip.fr
2022-06-24 2:03 ` [Bug fortran/106065] " jvdelisle at gcc dot gnu.org
2022-07-02 17:22 ` jvdelisle at gcc dot gnu.org
@ 2023-08-31 13:07 ` philippe.wautelet at aero dot obs-mip.fr
2 siblings, 0 replies; 4+ messages in thread
From: philippe.wautelet at aero dot obs-mip.fr @ 2023-08-31 13:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106065
philippe.wautelet at aero dot obs-mip.fr changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|12.1.0 |13.2.0
--- Comment #3 from philippe.wautelet at aero dot obs-mip.fr ---
Hello,
The problem is still there in the 13.2.0 version. Any update?
Thanks,
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-08-31 13:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-23 13:31 [Bug fortran/106065] New: Crash when reading extended derived type array in namelist philippe.wautelet at aero dot obs-mip.fr
2022-06-24 2:03 ` [Bug fortran/106065] " jvdelisle at gcc dot gnu.org
2022-07-02 17:22 ` jvdelisle at gcc dot gnu.org
2023-08-31 13:07 ` philippe.wautelet at aero dot obs-mip.fr
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).