This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/36112] Bounds-checking on character length not working for array-constructors
- From: "d at domob dot eu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 May 2008 13:35:07 -0000
- Subject: [Bug fortran/36112] Bounds-checking on character length not working for array-constructors
- References: <bug-36112-15965@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from d at domob dot eu 2008-05-03 13:35 -------
Just one more thought, for array-constructors with all constant
strings/components with length known at compile-time we should maybe give a
compiler error instead of a runtime-error? Or only a warning and no
runtime-checking?
I believe at least for those arrays at the moment
gfc_resolve_char_array_constructor changes the string lengths so they all match
which means this is because there's no runtime error (IIRC). If there should
be an error, we could do it there.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36112