[patch, fortran] [4.2/4.3 Regression] PR32002, insufficient conformance check

Jerry DeLisle jvdelisle@verizon.net
Sun May 20 23:23:00 GMT 2007


Daniel Franke wrote:
> Currently, gfortran does not flag an error on code like this:
> 
>     real :: a(3), b(2) = 0.0
>     a = COS(b)
>     end
> 
> In primary.c (match_actual_arg) expressions of actuals arguements are set to 
> BT_PROCEDURE on default, to be changed later. In this case, this is done in 
> resolve.c (resolve_actual_arglist), but then the changed expression is not 
> resolved correctly. Hence, attached patch simply adds a call to 
> gfc_resolve_expr() when a variable was identified. 
> 
> FX, Paul could either of you double check this approach? Both of you worked on 
> PR27900, this might be an aftermath thereof?!
> 
> 
> :ADDPATCH fortran:
> 
> gcc/fortran:
> 2005-05-20  Jerry DeLisle  <jvdelisle@verizon.net>
>             Daniel Franke  <franke.daniel@gmail.com>
> 
> 	PR fortran/32002
> 	* resolve.c (resolve_actual_arglist): Resolve actual argument after 
> 	being identified as variable.
> 
> 
> gcc/testsuite:
> 2005-05-20  Daniel Franke  <franke.daniel@gmail.com>
> 
> 	PR fortran/32002
> 	* gfortran.dg/pr32002.f90: New test.
> 	
> 
> Regression tested on ?-?-? by Jerry and on i686-pc-linux-gnu by myself. 
> Ok for 4.2 and trunk?
> 
Regression tested on x86-64-gnu-linux.  The test case needs a descriptive name 
and the error message at line 40 should be "different shape".

OK for trunk.  OK for 4.2 only if this is a regression from 4.1

Regards,

Jerry



More information about the Gcc-patches mailing list