This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32179] New: Ensure that ss->string_length is always set [TODO item]
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Jun 2007 15:29:49 -0000
- Subject: [Bug fortran/32179] New: Ensure that ss->string_length is always set [TODO item]
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Just to now forget ...
To the patch to PR 32156, Paul Thomas wrote in
http://gcc.gnu.org/ml/fortran/2007-05/msg00531.html :
"There is something not right with string concatenation
in the front-end that fails to transmit the string length correctly.
I have made several attempts to get to the bottom of this and have
completely failed. "
Test case, see PR 32156 and revert the "hack" (see urls and patch at the
bottom) .
Commits:
http://gcc.gnu.org/ml/gcc-cvs/2007-05/msg00956.html
http://gcc.gnu.org/ml/gcc-cvs/2007-05/msg00955.html
Comment in the patch:
- ss->expr->ts.cl->backend_decl = ss->string_length;
+ /* It is surprising but still possible to wind up with expressions that
+ lack a character length.
+ TODO Find the offending part of the front end and cure this properly.
+ Concatenation involving arrays is the main culprit. */
+ if (!ss->expr->ts.cl)
+ {
+ ss->expr->ts.cl = gfc_get_charlen ();
+ ss->expr->ts.cl->next = gfc_current_ns->cl_list;
+ gfc_current_ns->cl_list = ss->expr->ts.cl->next;
+ }
--
Summary: Ensure that ss->string_length is always set [TODO item]
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32179