[Patch, fortran] PR34784 and PR34785 - array constructor "F95" problems

Paul Richard Thomas paul.richard.thomas@gmail.com
Sat Jan 19 21:21:00 GMT 2008


Tobias,

I got to the bottom of the character typing issue. The matcher was
trying to match a substring after a function reference.  If the type
was unknown, it was made character.  However, if the substring match
failed, it did not clear the character typing.

The other wrinkle is fixed, as shown in the ChangeLog - I encountered
this one before.

The testcases now reflect the extra issues that have been dealt with.

Bootstrapped and regtested on x86_ia64/FC8 - OK for trunk?

Cheers

Paul

2008-01-19  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/34784
	* array.c (gfc_check_constructor_type): Clear the expression ts
	so that the checking starts from the deepest level of array
	constructor.
	* primary.c (match_varspec): If an unknown type is changed to
	default character and the attempt to match a substring fails,
	change it back to unknown.

	PR fortran/34785
	* trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
	NULL for an array constructor, use the cl.length expression to
	build it.
	(gfc_conv_array_parameter): Change call to gfc_evaluate_now to
	a tree assignment.


2008-01-19  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/34784
	* gfortran.dg/array_constructor_20.f90: New test.
	* gfortran.dg/mapping_2.f90: Correct ubound expression for h4.

	PR fortran/34785
	* gfortran.dg/array_constructor_21.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: submit.diff
Type: text/x-patch
Size: 4890 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080119/1d55516c/attachment.bin>


More information about the Fortran mailing list