This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47519] Deferred-length string wrong results with character intrinsic functions
- From: "pault at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 29 Jan 2011 16:30:22 +0000
- Subject: [Bug fortran/47519] Deferred-length string wrong results with character intrinsic functions
- Auto-submitted: auto-generated
- References: <bug-47519-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47519
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.01.29 16:30:00
AssignedTo|unassigned at gcc dot |pault at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #3 from Paul Thomas <pault at gcc dot gnu.org> 2011-01-29 16:30:00 UTC ---
(In reply to comment #2)
> Paul, do you think one should do something alike in gfc_trans_allocate and in
> the intrinsic scalar/array assignment block?
>
> gfc_conv_intrinsic_len has:
>
> default:
> /* Anybody stupid enough to do this deserves inefficient code. */
> ss = gfc_walk_expr (arg);
> gfc_init_se (&argse, se);
> if (ss == gfc_ss_terminator)
> gfc_conv_expr (&argse, arg);
> else
> gfc_conv_expr_descriptor (&argse, arg, ss);
> gfc_add_block_to_block (&se->pre, &argse.pre);
> gfc_add_block_to_block (&se->post, &argse.post);
> len = argse.string_length;
This is the only way to go. The ss is not needed, though.
I'll take this one.
Cheers
Paul