public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/40662] New: gfortran 4.5 segfaults when specific FORMAT is invoked twice
@ 2009-07-06 17:58 michael dot a dot richmond at nasa dot gov
2009-07-06 18:08 ` [Bug fortran/40662] " dominiq at lps dot ens dot fr
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: michael dot a dot richmond at nasa dot gov @ 2009-07-06 17:58 UTC (permalink / raw)
To: gcc-bugs
When I compile and run the following program under gfortran 4.5 I get a
segfault. It does not segfault under gfortran 4.3 or 4.4. The problem occurs on
any platform.
PROGRAM astap
ARLXCA = 0.0
WRITE(6,40) ARLXCA
WRITE(6,40) ARLXCA
40 FORMAT(T4,"ARLXCA = ",1PG13.6,T27,"ARLXCC = ",G13.6,T53,
. "ATMPCA = ",G13.6,T79,"ATMPCC = ",G13.6,T105,
. "BACKUP = ",G13.6,/,
. T4,"CSGFAC = ",G13.6,T27,"CSGMAX = ",G13.6,T53,
. "CSGMIN = ",G13.6,T79,"DRLXCA = ",G13.6,T105,
. "DRLXCC = ",G13.6,/,
. T4,"DTIMEH = ",G13.6,T27,"DTIMEI = ",G13.6,T53,
. "DTIMEL = ",G13.6,T79,"DTIMEU = ",G13.6,T105,
. "DTMPCA = ",G13.6,/,
. T4,"DTMPCC = ",G13.6,T27,"EBALNA = ",G13.6,T53,
. "EBALNC = ",G13.6,T79,"EBALSA = ",G13.6,T105,
. "EBALSC = ",G13.6)
END PROGRAM astap
--
Summary: gfortran 4.5 segfaults when specific FORMAT is invoked
twice
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: michael dot a dot richmond at nasa dot gov
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40662
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/40662] gfortran 4.5 segfaults when specific FORMAT is invoked twice
2009-07-06 17:58 [Bug fortran/40662] New: gfortran 4.5 segfaults when specific FORMAT is invoked twice michael dot a dot richmond at nasa dot gov
@ 2009-07-06 18:08 ` dominiq at lps dot ens dot fr
2009-07-06 18:12 ` jvdelisle at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: dominiq at lps dot ens dot fr @ 2009-07-06 18:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from dominiq at lps dot ens dot fr 2009-07-06 18:07 -------
This seems to be fixed by the patch in comment #33 of pr40330.
--
dominiq at lps dot ens dot fr changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jvdelisle at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40662
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/40662] gfortran 4.5 segfaults when specific FORMAT is invoked twice
2009-07-06 17:58 [Bug fortran/40662] New: gfortran 4.5 segfaults when specific FORMAT is invoked twice michael dot a dot richmond at nasa dot gov
2009-07-06 18:08 ` [Bug fortran/40662] " dominiq at lps dot ens dot fr
@ 2009-07-06 18:12 ` jvdelisle at gcc dot gnu dot org
2009-07-06 18:18 ` kargl at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-07-06 18:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jvdelisle at gcc dot gnu dot org 2009-07-06 18:12 -------
Yes indeed it is fixed with my patch of this morning. This is the reduced test
case we can use for the test suite.
Thanks for the report Michael!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40662
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/40662] gfortran 4.5 segfaults when specific FORMAT is invoked twice
2009-07-06 17:58 [Bug fortran/40662] New: gfortran 4.5 segfaults when specific FORMAT is invoked twice michael dot a dot richmond at nasa dot gov
2009-07-06 18:08 ` [Bug fortran/40662] " dominiq at lps dot ens dot fr
2009-07-06 18:12 ` jvdelisle at gcc dot gnu dot org
@ 2009-07-06 18:18 ` kargl at gcc dot gnu dot org
2009-07-09 1:20 ` jvdelisle at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: kargl at gcc dot gnu dot org @ 2009-07-06 18:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from kargl at gcc dot gnu dot org 2009-07-06 18:18 -------
(In reply to comment #1)
> This seems to be fixed by the patch in comment #33 of pr40330.
>
Removing the 1st occurrence of T27 in the format is sufficient to
remove the segfault.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40662
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/40662] gfortran 4.5 segfaults when specific FORMAT is invoked twice
2009-07-06 17:58 [Bug fortran/40662] New: gfortran 4.5 segfaults when specific FORMAT is invoked twice michael dot a dot richmond at nasa dot gov
` (2 preceding siblings ...)
2009-07-06 18:18 ` kargl at gcc dot gnu dot org
@ 2009-07-09 1:20 ` jvdelisle at gcc dot gnu dot org
2009-07-09 1:55 ` jvdelisle at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-07-09 1:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jvdelisle at gcc dot gnu dot org 2009-07-09 01:20 -------
Subject: Bug 40662
Author: jvdelisle
Date: Thu Jul 9 01:20:23 2009
New Revision: 149398
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149398
Log:
2009-07-08 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/40330
PR libfortran/40662
* io/io.h (st_parameter_dt): Define format_not_saved bit used to signal
whether the parsed format data was previously saved. Used to determine
if the current format data should be freed or not.
* io/transfer.c (st_read_done): Use the format_not_saved bit.
(st_write_done): Likewise.
* io/format.c (parse_format_list): Add boolean pointer to arg list.
This
pointer is used to return status to the caller regarding whether it is
safe to cache the parsed format data. Currently, if a FMT_STRING token
is encounetered, it is not safe to cache. Also, added a local boolean
variable to hold this information as recursive calls to
parse_format_list are made. Remove previous save_format logic.
(parse_format): Do not use the format caching facility if the current
unit is an internal unit or if it is not safe to save parsed format
data.
Modified:
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/format.c
trunk/libgfortran/io/io.h
trunk/libgfortran/io/transfer.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40662
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/40662] gfortran 4.5 segfaults when specific FORMAT is invoked twice
2009-07-06 17:58 [Bug fortran/40662] New: gfortran 4.5 segfaults when specific FORMAT is invoked twice michael dot a dot richmond at nasa dot gov
` (3 preceding siblings ...)
2009-07-09 1:20 ` jvdelisle at gcc dot gnu dot org
@ 2009-07-09 1:55 ` jvdelisle at gcc dot gnu dot org
2009-07-09 2:01 ` jvdelisle at gcc dot gnu dot org
2009-07-23 17:52 ` hjl at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-07-09 1:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jvdelisle at gcc dot gnu dot org 2009-07-09 01:55 -------
Subject: Bug 40662
Author: jvdelisle
Date: Thu Jul 9 01:54:47 2009
New Revision: 149399
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149399
Log:
2009-07-08 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/40330
PR libfortran/40662
* gfortran.dg/fmt_cache_1.f: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/fmt_cache_1.f
Modified:
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40662
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/40662] gfortran 4.5 segfaults when specific FORMAT is invoked twice
2009-07-06 17:58 [Bug fortran/40662] New: gfortran 4.5 segfaults when specific FORMAT is invoked twice michael dot a dot richmond at nasa dot gov
` (4 preceding siblings ...)
2009-07-09 1:55 ` jvdelisle at gcc dot gnu dot org
@ 2009-07-09 2:01 ` jvdelisle at gcc dot gnu dot org
2009-07-23 17:52 ` hjl at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-07-09 2:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jvdelisle at gcc dot gnu dot org 2009-07-09 02:01 -------
Fixed on trunk.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40662
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/40662] gfortran 4.5 segfaults when specific FORMAT is invoked twice
2009-07-06 17:58 [Bug fortran/40662] New: gfortran 4.5 segfaults when specific FORMAT is invoked twice michael dot a dot richmond at nasa dot gov
` (5 preceding siblings ...)
2009-07-09 2:01 ` jvdelisle at gcc dot gnu dot org
@ 2009-07-23 17:52 ` hjl at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: hjl at gcc dot gnu dot org @ 2009-07-23 17:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from hjl at gcc dot gnu dot org 2009-07-23 17:51 -------
Subject: Bug 40662
Author: hjl
Date: Thu Jul 23 17:50:56 2009
New Revision: 150020
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150020
Log:
2009-07-23 H.J. Lu <hongjiu.lu@intel.com>
Backport from mainline:
2009-07-22 Richard Guenther <rguenther@suse.de>
PR c++/40799
* g++.dg/lookup/using21.C: New testcase.
2009-07-19 Jan Hubicka <jh@suse.cz>
PR tree-optimization/40676
* gcc.c-torture/compile/pr40676.c: New testcase.
2009-07-15 Richard Guenther <rguenther@suse.de>
PR middle-end/40753
* gcc.c-torture/compile/pr40753.c: New testcase.
2009-07-14 Dodji Seketeli <dodji@redhat.com>
PR debug/40705
* g++.dg/debug/dwarf2/typedef1.C: New test.
PR c++/40357
* g++.dg/other/typedef3.C: New test.
2009-07-10 Richard Guenther <rguenther@suse.de>
PR tree-optimization/40496
* g++.dg/opt/pr40496.C: New testcase.
2009-07-09 Jakub Jelinek <jakub@redhat.com>
PR middle-end/40692
* gcc.c-torture/compile/pr40692.c: New test.
2009-07-08 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/40330
PR libfortran/40662
* gfortran.dg/fmt_cache_1.f: New test.
Added:
branches/gcc-4_4-branch/gcc/testsuite/g++.dg/debug/dwarf2/typedef1.C
- copied unchanged from r150018,
trunk/gcc/testsuite/g++.dg/debug/dwarf2/typedef1.C
branches/gcc-4_4-branch/gcc/testsuite/g++.dg/lookup/using21.C
- copied unchanged from r150018,
trunk/gcc/testsuite/g++.dg/lookup/using21.C
branches/gcc-4_4-branch/gcc/testsuite/g++.dg/opt/pr40496.C
- copied unchanged from r150018, trunk/gcc/testsuite/g++.dg/opt/pr40496.C
branches/gcc-4_4-branch/gcc/testsuite/g++.dg/other/typedef3.C
- copied unchanged from r150018,
trunk/gcc/testsuite/g++.dg/other/typedef3.C
branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr40676.c
- copied unchanged from r150018,
trunk/gcc/testsuite/gcc.c-torture/compile/pr40676.c
branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr40692.c
- copied unchanged from r150018,
trunk/gcc/testsuite/gcc.c-torture/compile/pr40692.c
branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr40753.c
- copied unchanged from r150018,
trunk/gcc/testsuite/gcc.c-torture/compile/pr40753.c
branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/fmt_cache_1.f
- copied unchanged from r150018,
trunk/gcc/testsuite/gfortran.dg/fmt_cache_1.f
Modified:
branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40662
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-07-23 17:52 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-06 17:58 [Bug fortran/40662] New: gfortran 4.5 segfaults when specific FORMAT is invoked twice michael dot a dot richmond at nasa dot gov
2009-07-06 18:08 ` [Bug fortran/40662] " dominiq at lps dot ens dot fr
2009-07-06 18:12 ` jvdelisle at gcc dot gnu dot org
2009-07-06 18:18 ` kargl at gcc dot gnu dot org
2009-07-09 1:20 ` jvdelisle at gcc dot gnu dot org
2009-07-09 1:55 ` jvdelisle at gcc dot gnu dot org
2009-07-09 2:01 ` jvdelisle at gcc dot gnu dot org
2009-07-23 17:52 ` hjl at gcc dot gnu dot org
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).