This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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);
 	}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]