public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "bdavis9659 at comcast dot net" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/14067] New: [gfortran] ICE when character data statement overflows declared size Date: Sat, 07 Feb 2004 20:51:00 -0000 [thread overview] Message-ID: <20040207205100.14067.bdavis9659@comcast.net> (raw) 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
next reply other threads:[~2004-02-07 20:51 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-02-07 20:51 bdavis9659 at comcast dot net [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20040207205100.14067.bdavis9659@comcast.net \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).