[patch, fortran] PR42354, alternative fix

Daniel Franke franke.daniel@gmail.com
Sun Dec 13 20:32:00 GMT 2009


Hi all.

The patch for PR42354 I proposed yesterday fixes the problem described in the 
PR, but is not the right approach. Actually, after a lengthy discussion with 
Tobias B. on IRC, we figured out that one should not check for specification 
functions when checking init expressions. Hence, instead of adding a 
workaround to expr.c (check_specification_function), on should remove the call 
of that function in expr.c (check_init_expr) instead. Attached patch does 
this. Other changes adjust a related error message and whitespace.

The remarks on C_SIZEOF still apply.


gcc/fortran/:
2009-12-13  Daniel Franke  <franke.daniel@gmail.com>

        PR fortran/42354
	* expr.c (check_init_expr): Do not check for specification functions.

gcc/testsuite/:
2009-12-13  Daniel Franke  <franke.daniel@gmail.com>

        PR fortran/42354
	* gfortran.dg/iso_c_binding_init_expr.f03: New.
	* gfortran.dg/intrinsic_std_1.f90: Fixed expected error message.
	* gfortran.dg/function_kinds_5.f90: Likewise.
	* gfortran.dg/selected_char_kind_3.f90: Likewise.


Regression tested on i686-pc-linux-gnu. Ok for trunk?

Cheers

	Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr42354-2.diff
Type: text/x-patch
Size: 4942 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20091213/2692ec22/attachment.bin>


More information about the Fortran mailing list