[PATCH] PR fortran/46152 -- fix namespace pollution in type-spec matching

Steve Kargl sgk@troutmask.apl.washington.edu
Sun Oct 31 14:37:00 GMT 2010


See the PR for a thorough discussion of the problem and
the fix.  The attached patch has been tested on i686-*-freebsd
without regression.  I plan to commit this within the next 
24 hours.

2010-10-30  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/46152
	* gfortran.dg/select_type_11.f03: Update dg-error phrase.
	* gfortran.dg/allocate_with_typespec_4.f90: New test.
	* gfortran.dg/allocate_with_typespec_1.f90: New test.
	* gfortran.dg/allocate_with_typespec_2.f: New test.
	* gfortran.dg/allocate_with_typespec_3.f90: New test.
	* gfortran.dg/allocate_derived_1.f90: Delete an obselescent test.
	* gfortran.dg/select_type_1.f03: Update dg-error phrase.

2010-10-30  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/46152
	* fortran/match.c (match_derived_type_spec): Reoplace gfc_match_symbol
	with a gfc_find_symbol to prevent namespace pollution.  Remove dead
	code.
	(match_type_spec): Remove parsing of '::'.  Collapse character
	kind checking to one location.
	(gfc_match_allocate): Use correct locus in error message.

-- 
Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alloc_typespec.diff
Type: text/x-diff
Size: 17342 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20101031/bdbea825/attachment.bin>


More information about the Fortran mailing list