This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32937] segfault with string and -fdefault-integer-8
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Aug 2007 11:17:39 -0000
- Subject: [Bug fortran/32937] segfault with string and -fdefault-integer-8
- References: <bug-32937-10391@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from fxcoudert at gcc dot gnu dot org 2007-08-11 11:17 -------
Hurray! It's been my wildest gdb session since a very long time (two sessions
of two hours each), but I've made it at last! My analysis in the previous
comment was right, we are generating a charlen's backend_decl with a wrong
type, which is fixed by:
Index: trans-array.c
===================================================================
--- trans-array.c (revision 127334)
+++ trans-array.c (working copy)
@@ -4547,9 +4547,7 @@ gfc_conv_expr_descriptor (gfc_se * se, g
else if (expr->ts.cl->length
&& expr->ts.cl->length->expr_type == EXPR_CONSTANT)
{
- expr->ts.cl->backend_decl
- = gfc_conv_mpz_to_tree (expr->ts.cl->length->value.integer,
- expr->ts.cl->length->ts.kind);
+ gfc_conv_const_charlen (expr->ts.cl);
loop.temp_ss->data.temp.type
= gfc_typenode_for_spec (&expr->ts);
loop.temp_ss->string_length
(we even have a function ready for that case, mind you). I'm regtesting, and
I'll commit as obvious shortly after.
/me goes for a shower and an afternoon far away from gdb
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32937