Commit fa9f7c70 by Tobias Burnus Committed by Tobias Burnus

re PR fortran/48788 (ICE: SIGSEGV in resolve_global_procedure (resolve.c:2190)…

re PR fortran/48788 (ICE: SIGSEGV in resolve_global_procedure (resolve.c:2190) on invalid (?) fortran code)

2011-04-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/48788
        * resolve.c (resolve_global_procedure): Error recovery -
        avoid segfault for (non)character-returning functions.

2011-04-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/48788
        * gfortran.dg/whole_file_34.f90: New.

From-SVN: r173048
parent 1f428429
2011-04-27 Tobias Burnus <burnus@net-b.de>
PR fortran/48788
* resolve.c (resolve_global_procedure): Error recovery -
avoid segfault for (non)character-returning functions.
2011-04-26 Thomas Koenig <tkoenig@gcc.gnu.org>
* decl.c (gfc_match_end): Check that the block name starts
......
......@@ -2187,7 +2187,7 @@ resolve_global_procedure (gfc_symbol *sym, locus *where,
/* F2003, 12.3.1.1 (3c); F2008, 12.4.2.2 (3c) */
if (sym->ts.type == BT_CHARACTER && sym->attr.if_source != IFSRC_IFBODY
&& def_sym->ts.u.cl->length != NULL)
&& def_sym->ts.type == BT_CHARACTER && def_sym->ts.u.cl->length != NULL)
{
gfc_charlen *cl = sym->ts.u.cl;
......
2011-04-27 Tobias Burnus <burnus@net-b.de>
PR fortran/48788
* gfortran.dg/whole_file_34.f90: New.
2011-04-27 Jan Hubicka <jh@suse.cz>
* gcc.dg/tree-ssa/inline-9.c: New testcase.
......
! { dg-do compile }
!
! PR fortran/48788
!
! Contributed by Zdenek Sojka
!
function foo ()
end function foo
character(4), external :: foo ! { dg-error "Return type mismatch of function" }
character(4) :: x
x = foo ()
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