[patch,fortran]PR25057 default initialization and DATA statement conflict

Jerry DeLisle jvdelisle@verizon.net
Sun Dec 10 20:23:00 GMT 2006


The attached patch fixes this bug by providing an appropriate error message. 
This is related to pr24978, but needs to be handled a little differently to give 
a better error message.  This is round one of probably several patches to catch 
these invalid cases.

Regression tested on x86-64-linux.  OK for trunk?

Regards,

Jerry


2006-12-10  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/25057
	* gfortran.h (gfc_assign_data_value): Return TRY instead of void.
	* data.c (gfc_assign_data_value): Add check for already initialized.
	* resolve.c (check_data_variable): If assignment fails, return FAILURE
	to avoid repeated error messages.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr25057.diff
Type: text/x-patch
Size: 4179 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20061210/8f0a9484/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: data_constraints_3.f90
Type: text/x-fortran
Size: 286 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20061210/8f0a9484/attachment-0001.bin>


More information about the Fortran mailing list