[Patch, Fortran] attribute declaration outside of INTERFACE body (PR36361)

Janus Weil jaydub66@googlemail.com
Sat May 31 00:03:00 GMT 2008


Hi all,
here is my patch for PR36361, including test cases, regtested on
i686-pc-linux-gnu with no
failures. It also includes the one-line fix from PR36275 comment #3.

There is just one thing I need someone's opinion on: The new test case
interface_24.f90 has some slight issues regarding error recovery. For
"f2" and "f5" I commented out some lines of (normally valid) code, to
get rid of excess errors:


  dimension :: f2(4)
  interface
    real function f2()  ! { dg-error "outside its INTERFACE body" }
    !end function
  end interface

Otherwise I get an additional error like:

    end function
      1
Error: Expecting END INTERFACE statement at (1)

Is this acceptable for a test case? Or should I rather use additional
dg-errors to catch all of the excess errors? Right now I see no easy
way to completely get rid of these recovery issues.

Otherwise ok?
Janus


2008-05-31  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/36361
	PR fortran/36275
	* symbol.c (gfc_add_allocatable,gfc_add_dimension,
	gfc_add_explicit_interface): Added checks.
	* decl.c (attr_decl1): Added missing "var_locus".
	* resolve.c (resolve_symbol): Fix handling of bind(c) interfaces.
	* parse.c (parse_interface): Checking for errors.


2008-05-31  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/36361
	PR fortran/36275
	* gfortran.dg/interface_24.f90: New.
	* gfortran.dg/proc_decl_2.f90: Extended.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr36361.diff
Type: text/x-patch
Size: 6154 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080531/8c735479/attachment.bin>


More information about the Gcc-patches mailing list