Commit f4256439 by Janus Weil

re PR fortran/38289 ("procedure( ), pointer" rejected)

2008-11-29  Janus Weil  <janus@gcc.gnu.org>
	    Mikael Morin <mikael@gcc.gnu.org>

	PR fortran/38289
	PR fortran/38290
	* decl.c (match_procedure_decl): Handle whitespaces.
	* resolve.c (resolve_specific_s0): Bugfix in check for intrinsic
	interface.


2008-11-29  Janus Weil  <janus@gcc.gnu.org>
	    Tobias Burnus <burnus@gcc.gnu.org>

	PR fortran/38289
	PR fortran/38290
	* gfortran.dg/proc_decl_1.f90: Extended test case.

Co-Authored-By: Mikael Morin <mikael@gcc.gnu.org>
Co-Authored-By: Tobias Burnus <burnus@gcc.gnu.org>

From-SVN: r142276
parent cc955282
2008-11-29 Janus Weil <janus@gcc.gnu.org>
Mikael Morin <mikael@gcc.gnu.org>
PR fortran/38289
PR fortran/38290
* decl.c (match_procedure_decl): Handle whitespaces.
* resolve.c (resolve_specific_s0): Bugfix in check for intrinsic
interface.
2008-11-25 H.J. Lu <hongjiu.lu@intel.com> 2008-11-25 H.J. Lu <hongjiu.lu@intel.com>
* module.c (gfc_dump_module): Report error on unlink only if * module.c (gfc_dump_module): Report error on unlink only if
......
...@@ -4094,6 +4094,7 @@ match_procedure_decl (void) ...@@ -4094,6 +4094,7 @@ match_procedure_decl (void)
/* Get the type spec. for the procedure interface. */ /* Get the type spec. for the procedure interface. */
old_loc = gfc_current_locus; old_loc = gfc_current_locus;
m = gfc_match_type_spec (&current_ts, 0); m = gfc_match_type_spec (&current_ts, 0);
gfc_gobble_whitespace ();
if (m == MATCH_YES || (m == MATCH_NO && gfc_peek_ascii_char () == ')')) if (m == MATCH_YES || (m == MATCH_NO && gfc_peek_ascii_char () == ')'))
goto got_ts; goto got_ts;
......
...@@ -2748,7 +2748,8 @@ resolve_specific_s0 (gfc_code *c, gfc_symbol *sym) ...@@ -2748,7 +2748,8 @@ resolve_specific_s0 (gfc_code *c, gfc_symbol *sym)
/* See if we have an intrinsic interface. */ /* See if we have an intrinsic interface. */
if (sym->ts.interface != NULL && !sym->ts.interface->attr.abstract if (sym->ts.interface != NULL && !sym->ts.interface->attr.abstract
&& !sym->ts.interface->attr.subroutine) && !sym->ts.interface->attr.subroutine
&& sym->ts.interface->attr.intrinsic)
{ {
gfc_intrinsic_sym *isym; gfc_intrinsic_sym *isym;
......
2008-11-29 Janus Weil <janus@gcc.gnu.org>
Tobias Burnus <burnus@gcc.gnu.org>
PR fortran/38289
PR fortran/38290
* gfortran.dg/proc_decl_1.f90: Extended test case.
2008-11-29 Joseph Myers <joseph@codesourcery.com> 2008-11-29 Joseph Myers <joseph@codesourcery.com>
* g++.dg/cpp/stringop-1.C: New test. * g++.dg/cpp/stringop-1.C: New test.
......
...@@ -51,6 +51,11 @@ program prog ...@@ -51,6 +51,11 @@ program prog
procedure(f) :: q ! { dg-error "may not be a statement function" } procedure(f) :: q ! { dg-error "may not be a statement function" }
procedure(oo) :: p ! { dg-error "must be explicit" } procedure(oo) :: p ! { dg-error "must be explicit" }
procedure ( ) :: r
procedure ( up ) :: s ! { dg-error "must be explicit" }
call s
contains contains
subroutine foo(a,c) ! { dg-error "PROCEDURE attribute conflicts with INTENT attribute" } subroutine foo(a,c) ! { dg-error "PROCEDURE attribute conflicts with INTENT attribute" }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment