diff mbox

[fortran,4.6,Regression] ICE: Segmentation fault in gfc_conv_procedure_call

Message ID 4CDDC563.1050203@frontier.com
State New
Headers show

Commit Message

Jerry DeLisle Nov. 12, 2010, 10:53 p.m. UTC
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
diff mbox

Patch

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