Commit 9281625b by Bud Davis Committed by Tobias Burnus

re PR fortran/50405 (allocation LOOP or SIGSEGV)

2013-05-27  Bud Davis  <jmdavis@link.com>

        PR fortran/50405
        * resolve.c (resolve_formal_arglist): Detect error when an
        * argument
        has the same name as the function.

2013-05-27  Bud Davis  <jmdavis@link.com>

        PR fortran/50405
        * gfortran.dg/stfunc_8.f90: New.

From-SVN: r199358
parent 5a892248
2013-05-27 Bud Davis <jmdavis@link.com>
PR fortran/50405
* resolve.c (resolve_formal_arglist): Detect error when an argument
has the same name as the function.
2013-05-27 Tobias Burnus <burnus@net-b.de>
* expr.c (gfc_build_intrinsic_call): Make symbol as attr.artificial.
......
......@@ -306,6 +306,14 @@ resolve_formal_arglist (gfc_symbol *proc)
&& !resolve_procedure_interface (sym))
return;
if (strcmp (proc->name, sym->name) == 0)
{
gfc_error ("Self-referential argument "
"'%s' at %L is not allowed", sym->name,
&proc->declared_at);
return;
}
if (sym->attr.if_source != IFSRC_UNKNOWN)
resolve_formal_arglist (sym);
......
2013-05-27 Bud Davis <jmdavis@link.com>
PR fortran/50405
* gfortran.dg/stfunc_8.f90: New.
2013-05-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/57343
......
! { dg-do compile }
! { dg-options "" }
!
! PR fortran/50405
!
! Submitted by zeccav@gmail.com
!
f(f) = 0 ! { dg-error "Self-referential argument" }
end
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