public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/14067] New: [gfortran] ICE when character data statement overflows declared size
@ 2004-02-07 20:51 bdavis9659 at comcast dot net
2004-02-07 22:17 ` [Bug fortran/14067] " pinskia at gcc dot gnu dot org
` (7 more replies)
0 siblings, 8 replies; 13+ messages in thread
From: bdavis9659 at comcast dot net @ 2004-02-07 20:51 UTC (permalink / raw)
To: gcc-bugs
A character string provided in a data statement that is larger than declared
variable size causes an ICE.
This code is not standard conforming.
gfortran should either:
a> Issue an error that the character string in the data statement cannot be
larger than the variable size. { is smaller OK? or does it have to be exact for
character variables ? i dunno but it seems reasonable }
b> Issue a warning and truncate the string.
g77 does half of option (b). g77 misses the warning, but does not do any harm.
To duplicate:
$ cat bigstring.f
PROGRAM GNEXDATA
CHARACTER*31 GNCRMESS
C 1 2 3 4
C 1234567890123456789012345678901234567890
DATA GNCRMESS/' *** COASTAL RADAR NOT LOADED *** '/
PRINT*,GNCRMESS
RETURN
END
$ /usr/local/bin/gfortran -static bigstring.f
f951: ../../gcc/gcc/fortran/trans-const.c:109: gfc_conv_string_init: Assertion
`len >= slen' failed.
bigstring.f: In function `MAIN__':
bigstring.f:8: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
$ g77 bigstring.f
$ ./a.out
*** COASTAL RADAR NOT LOA
$ /usr/local/bin/gfortran --version
GNU Fortran 95 (GCC 3.5-tree-ssa 20040207 (merged 20040126))
Copyright (C) 2003 Free Software Foundation, Inc.
--
Summary: [gfortran] ICE when character data statement overflows
declared size
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bdavis9659 at comcast dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14067
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/14067] [gfortran] ICE when character data statement overflows declared size
2004-02-07 20:51 [Bug fortran/14067] New: [gfortran] ICE when character data statement overflows declared size bdavis9659 at comcast dot net
@ 2004-02-07 22:17 ` pinskia at gcc dot gnu dot org
2004-05-26 11:48 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-07 22:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-02-07 22:17 -------
Confirmed,
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |ice-on-invalid-code
Last reconfirmed|0000-00-00 00:00:00 |2004-02-07 22:17:34
date| |
Target Milestone|--- |tree-ssa
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14067
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/14067] [gfortran] ICE when character data statement overflows declared size
2004-02-07 20:51 [Bug fortran/14067] New: [gfortran] ICE when character data statement overflows declared size bdavis9659 at comcast dot net
2004-02-07 22:17 ` [Bug fortran/14067] " pinskia at gcc dot gnu dot org
@ 2004-05-26 11:48 ` pinskia at gcc dot gnu dot org
2004-05-31 16:45 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-26 11:48 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.5.0 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14067
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/14067] [gfortran] ICE when character data statement overflows declared size
2004-02-07 20:51 [Bug fortran/14067] New: [gfortran] ICE when character data statement overflows declared size bdavis9659 at comcast dot net
2004-02-07 22:17 ` [Bug fortran/14067] " pinskia at gcc dot gnu dot org
2004-05-26 11:48 ` pinskia at gcc dot gnu dot org
@ 2004-05-31 16:45 ` pinskia at gcc dot gnu dot org
2004-05-31 17:09 ` tobi at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-31 16:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-30 15:07 -------
http://gcc.gnu.org/ml/gcc-patches/2004-05/msg01988.html
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14067
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/14067] [gfortran] ICE when character data statement overflows declared size
2004-02-07 20:51 [Bug fortran/14067] New: [gfortran] ICE when character data statement overflows declared size bdavis9659 at comcast dot net
` (2 preceding siblings ...)
2004-05-31 16:45 ` pinskia at gcc dot gnu dot org
@ 2004-05-31 17:09 ` tobi at gcc dot gnu dot org
2004-05-31 17:58 ` cvs-commit at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-05-31 17:09 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Last reconfirmed|2004-05-10 16:58:15 |2004-05-30 15:24:28
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14067
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/14067] [gfortran] ICE when character data statement overflows declared size
2004-02-07 20:51 [Bug fortran/14067] New: [gfortran] ICE when character data statement overflows declared size bdavis9659 at comcast dot net
` (3 preceding siblings ...)
2004-05-31 17:09 ` tobi at gcc dot gnu dot org
@ 2004-05-31 17:58 ` cvs-commit at gcc dot gnu dot org
2004-05-31 18:32 ` [Bug fortran/14067] [gfortran] no warning " tobi at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-05-31 17:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-05-30 16:33 -------
Subject: Bug 14067
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: tobi@gcc.gnu.org 2004-05-30 16:33:29
Modified files:
gcc/fortran : ChangeLog trans-const.c
Log message:
PR fortran/14067
* trans-const.c (gfc_conv_string_init): Allow variable string
length lower than initialization string length.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.53&r2=1.54
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-const.c.diff?cvsroot=gcc&r1=1.4&r2=1.5
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14067
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/14067] [gfortran] no warning when character data statement overflows declared size
2004-02-07 20:51 [Bug fortran/14067] New: [gfortran] ICE when character data statement overflows declared size bdavis9659 at comcast dot net
` (4 preceding siblings ...)
2004-05-31 17:58 ` cvs-commit at gcc dot gnu dot org
@ 2004-05-31 18:32 ` tobi at gcc dot gnu dot org
2005-01-06 14:40 ` [Bug fortran/14067] " tobi at gcc dot gnu dot org
2005-03-26 17:48 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 13+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-05-31 18:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2004-05-30 16:36 -------
The ICE is fixed, but this could still do with a warning.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|tobi at gcc dot gnu dot org |bdavis9659 at comcast dot
| |net
Severity|normal |enhancement
Keywords|ice-on-invalid-code, patch |diagnostic
Summary|[gfortran] ICE when |[gfortran] no warning when
|character data statement |character data statement
|overflows declared size |overflows declared size
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14067
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/14067] no warning when character data statement overflows declared size
2004-02-07 20:51 [Bug fortran/14067] New: [gfortran] ICE when character data statement overflows declared size bdavis9659 at comcast dot net
` (5 preceding siblings ...)
2004-05-31 18:32 ` [Bug fortran/14067] [gfortran] no warning " tobi at gcc dot gnu dot org
@ 2005-01-06 14:40 ` tobi at gcc dot gnu dot org
2005-03-26 17:48 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 13+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-01-06 14:40 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |19292
nThis| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14067
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/14067] no warning when character data statement overflows declared size
2004-02-07 20:51 [Bug fortran/14067] New: [gfortran] ICE when character data statement overflows declared size bdavis9659 at comcast dot net
` (6 preceding siblings ...)
2005-01-06 14:40 ` [Bug fortran/14067] " tobi at gcc dot gnu dot org
@ 2005-03-26 17:48 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-26 17:48 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Last reconfirmed|2004-12-15 04:44:48 |2005-03-26 17:48:40
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14067
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/14067] no warning when character data statement overflows declared size
[not found] <bug-14067-5725@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2006-06-05 10:15 ` pault at gcc dot gnu dot org
@ 2006-06-05 10:22 ` pault at gcc dot gnu dot org
3 siblings, 0 replies; 13+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-06-05 10:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from pault at gcc dot gnu dot org 2006-06-05 10:22 -------
Fixed on trunk and 4.1
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14067
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/14067] no warning when character data statement overflows declared size
[not found] <bug-14067-5725@http.gcc.gnu.org/bugzilla/>
2006-06-02 20:15 ` patchapp at dberlin dot org
2006-06-05 7:45 ` pault at gcc dot gnu dot org
@ 2006-06-05 10:15 ` pault at gcc dot gnu dot org
2006-06-05 10:22 ` pault at gcc dot gnu dot org
3 siblings, 0 replies; 13+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-06-05 10:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pault at gcc dot gnu dot org 2006-06-05 10:14 -------
Subject: Bug 14067
Author: pault
Date: Mon Jun 5 10:14:32 2006
New Revision: 114387
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114387
Log:
2006-06-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/14067
* data.c (create_character_intializer): Add warning message
for truncated string.
PR fortran/16943
* symbol.c : Include flags.h.
(gfc_add_type): If a procedure and types are the same do not
throw an error unless standard is less than gnu or pedantic.
PR fortran/20838
* parse.c (parse_do_block): Error if named block do construct
does not have a named enddo.
PR fortran/27655
* check.c (gfc_check_associated): Pick up EXPR_NULL for pointer
as well as target and put error return at end of function.
2006-06-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/14067
* gfortran.dg/data_char_1.f90: Add messages for truncated
strings.
PR fortran/16943
* gfortran.dg/func_decl_2.f90: New test.
PR fortran/20838
* gfortran.dg/do_2.f90: New test.
PR fortran/27655
* gfortran.dg/associated_3.f90: New test.
Added:
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/associated_3.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/do_2.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/func_decl_2.f90
Modified:
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/fortran/check.c
branches/gcc-4_1-branch/gcc/fortran/data.c
branches/gcc-4_1-branch/gcc/fortran/parse.c
branches/gcc-4_1-branch/gcc/fortran/symbol.c
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/data_char_1.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14067
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/14067] no warning when character data statement overflows declared size
[not found] <bug-14067-5725@http.gcc.gnu.org/bugzilla/>
2006-06-02 20:15 ` patchapp at dberlin dot org
@ 2006-06-05 7:45 ` pault at gcc dot gnu dot org
2006-06-05 10:15 ` pault at gcc dot gnu dot org
2006-06-05 10:22 ` pault at gcc dot gnu dot org
3 siblings, 0 replies; 13+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-06-05 7:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pault at gcc dot gnu dot org 2006-06-05 07:45 -------
Subject: Bug 14067
Author: pault
Date: Mon Jun 5 07:45:03 2006
New Revision: 114385
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114385
Log:
2006-06-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/14067
* data.c (create_character_intializer): Add warning message
for truncated string.
PR fortran/16943
* symbol.c : Include flags.h.
(gfc_add_type): If a procedure and types are the same do not
throw an error unless standard is less than gnu or pedantic.
PR fortran/20838
* parse.c (parse_do_block): Error if named block do construct
does not have a named enddo.
PR fortran/27655
* check.c (gfc_check_associated): Pick up EXPR_NULL for pointer
as well as target and put error return at end of function.
2006-06-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/14067
* gfortran.dg/data_char_1.f90: Add messages for truncated
strings.
PR fortran/16943
* gfortran.dg/func_decl_2.f90: New test.
PR fortran/20838
* gfortran.dg/do_2.f90: New test.
PR fortran/27655
* gfortran.dg/associated_3.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/associated_3.f90
trunk/gcc/testsuite/gfortran.dg/do_2.f90
trunk/gcc/testsuite/gfortran.dg/func_decl_2.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/check.c
trunk/gcc/fortran/data.c
trunk/gcc/fortran/parse.c
trunk/gcc/fortran/symbol.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/data_char_1.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14067
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/14067] no warning when character data statement overflows declared size
[not found] <bug-14067-5725@http.gcc.gnu.org/bugzilla/>
@ 2006-06-02 20:15 ` patchapp at dberlin dot org
2006-06-05 7:45 ` pault at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 13+ messages in thread
From: patchapp at dberlin dot org @ 2006-06-02 20:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from patchapp at dberlin dot org 2006-06-02 20:15 -------
Subject: Bug number PR14067
A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-06/msg00093.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14067
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2006-06-05 10:22 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-07 20:51 [Bug fortran/14067] New: [gfortran] ICE when character data statement overflows declared size bdavis9659 at comcast dot net
2004-02-07 22:17 ` [Bug fortran/14067] " pinskia at gcc dot gnu dot org
2004-05-26 11:48 ` pinskia at gcc dot gnu dot org
2004-05-31 16:45 ` pinskia at gcc dot gnu dot org
2004-05-31 17:09 ` tobi at gcc dot gnu dot org
2004-05-31 17:58 ` cvs-commit at gcc dot gnu dot org
2004-05-31 18:32 ` [Bug fortran/14067] [gfortran] no warning " tobi at gcc dot gnu dot org
2005-01-06 14:40 ` [Bug fortran/14067] " tobi at gcc dot gnu dot org
2005-03-26 17:48 ` pinskia at gcc dot gnu dot org
[not found] <bug-14067-5725@http.gcc.gnu.org/bugzilla/>
2006-06-02 20:15 ` patchapp at dberlin dot org
2006-06-05 7:45 ` pault at gcc dot gnu dot org
2006-06-05 10:15 ` pault at gcc dot gnu dot org
2006-06-05 10:22 ` pault 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).