# HG changeset patch
# User mjsousa
# Date 1376562294 -3600
# Node ID 691e1cc38d3a3a29ca57cd8e596bb5b6cb63aec1
# Parent  6f45ec6ed011eddc7a3bc4d21d5723484273e1c7
Do lvalue check of function output parameters (since they may contain expressions inside array subscripts!)

diff -r 6f45ec6ed011 -r 691e1cc38d3a stage3/lvalue_check.cc
--- a/stage3/lvalue_check.cc	Sat Aug 10 09:10:06 2013 +0100
+++ b/stage3/lvalue_check.cc	Thu Aug 15 11:24:54 2013 +0100
@@ -292,9 +292,9 @@
 			/* If the parameter is either OUT or IN_OUT, we check if 'call_param_value' is a valid lvalue */
 			if ((function_param_iterator_c::direction_out == param_direction) || (function_param_iterator_c::direction_inout == param_direction)) 
 				verify_is_lvalue(call_param_value);
-			/* parameter values to IN parameters may be expressions with function invocations that must also be checked! */
-			if (function_param_iterator_c::direction_in == param_direction) 
-				call_param_value->accept(*this);  
+			/* parameter values to IN  parameters may be expressions with function invocations that must also be checked! */
+			/* parameter values to OUT or IN_OUT parameters may contain arrays, whose subscripts contain expressions that must be checked! */
+			call_param_value->accept(*this);  
 		}
 	}
 }
@@ -332,10 +332,9 @@
 			/* If the parameter is either OUT or IN_OUT, we check if 'call_param_value' is a valid lvalue */
 			if ((function_param_iterator_c::direction_out == param_direction) || (function_param_iterator_c::direction_inout == param_direction)) 
 				verify_is_lvalue(call_param_value);
-			/* parameter values to IN parameters may be expressions with function invocations that must also be checked! */
-			if (function_param_iterator_c::direction_in == param_direction) 
-				call_param_value->accept(*this);  
-		
+			/* parameter values to IN  parameters may be expressions with function invocations that must also be checked! */
+			/* parameter values to OUT or IN_OUT parameters may contain arrays, whose subscripts contain expressions that must be checked! */
+			call_param_value->accept(*this);  
  		}
 	}
 }