This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch, fortran] [4.6 Regression] ICE: Segmentation fault in gfc_conv_procedure_call
- From: Jerry DeLisle <jvdelisle at frontier dot com>
- To: gfortran <fortran at gcc dot gnu dot org>
- Cc: gcc patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 12 Nov 2010 14:53:23 -0800
- Subject: [patch, fortran] [4.6 Regression] ICE: Segmentation fault in gfc_conv_procedure_call
Hi folks,
This patch is obvious and simple. I will commit to trunk shortly with ChangeLog
and test case.
Segfault occurs because fsym->as was NULL. Regression tests OK on x86-64-linux-gnu.
Regards,
Jerry
Index: trans-expr.c
===================================================================
--- trans-expr.c (revision 166672)
+++ trans-expr.c (working copy)
@@ -3121,8 +3121,10 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol *
&& ((e->rank > 0 && sym->attr.elemental)
|| e->representation.length || e->ts.type == BT_CHARACTER
|| (e->rank > 0
- && (fsym == NULL || fsym->as->type == AS_ASSUMED_SHAPE
- || fsym->as->type == AS_DEFERRED))))
+ && (fsym == NULL
+ || (fsym-> as
+ && (fsym->as->type == AS_ASSUMED_SHAPE
+ || fsym->as->type == AS_DEFERRED))))))
gfc_conv_missing_dummy (&parmse, e, fsym ? fsym->ts : e->ts,
e->representation.length);
}