[Bug fortran/37411] ICE (segfault) in trans-array.c
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Sep 7 20:10:00 GMT 2008
------- Comment #2 from burnus at gcc dot gnu dot org 2008-09-07 20:09 -------
==17304== Invalid read of size 4
==17304== at 0x49F779: gfc_conv_array_parameter (trans-array.c:5179)
==17304== by 0x4B05C0: gfc_conv_function_call (trans-expr.c:2582)
==17304== by 0x4B1A7D: gfc_conv_function_expr (trans-expr.c:3252)
==17304== by 0x4B62F9: gfc_apply_interface_mapping (trans-expr.c:2036)
The following seems to fix it (not extensively tested):
--- trans-array.c (revision 140091)
+++ trans-array.c (working copy)
@@ -5176,7 +5176,7 @@ gfc_conv_array_parameter (gfc_se * se, g
if (sym->ts.type == BT_CHARACTER)
se->string_length = sym->ts.cl->backend_decl;
- if (!sym->attr.pointer && sym->as->type != AS_ASSUMED_SHAPE
+ if (!sym->attr.pointer && sym->as && sym->as->type != AS_ASSUMED_SHAPE
&& !sym->attr.allocatable)
{
/* Some variables are declared directly, others are declared as
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2008-09-07 20:09:05
date| |
Summary|gfortran internal error |ICE (segfault) in trans-
| |array.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37411
More information about the Gcc-bugs
mailing list