Commit 15f12d96 by Nicolas Koenig Committed by Nicolas Koenig

[multiple changes]


2017-03-18  Nicolas Koenig  <koenigni@student.ethz.ch> 
		PR fortran/69498
		* symbol.c (gfc_delete_symtree): If there is a period in the name, ignore
		everything before it.

2017-03-18  Nicolas Koenig  <koenigni@student.ethz.ch>
		PR fortran/69498
		* gfortran.dg/submodule_unexp.f90: New test.

From-SVN: r246679
parent d90175a4
2017-03-18 Nicolas Koenig <koenigni@student.ethz.ch>
PR fortran/69498
* symbol.c (gfc_delete_symtree): If there is a period in the name, ignore
everything before it.
2017-03-28 Janus Weil <janus@gcc.gnu.org>
PR fortran/78661
......
......@@ -2782,10 +2782,20 @@ void
gfc_delete_symtree (gfc_symtree **root, const char *name)
{
gfc_symtree st, *st0;
const char *p;
st0 = gfc_find_symtree (*root, name);
/* Submodules are marked as mod.submod. When freeing a submodule
symbol, the symtree only has "submod", so adjust that here. */
st.name = gfc_get_string ("%s", name);
p = strrchr(name, '.');
if (p)
p++;
else
p = name;
st0 = gfc_find_symtree (*root, p);
st.name = gfc_get_string ("%s", p);
gfc_delete_bbt (root, &st, compare_symtree);
free (st0);
......
2017-04-04 Nicolas Koenig <koenigni@student.ethz.ch>
PR fortran/69498
* gfortran.dg/submodule_unexp.f90: New test.
2017-04-04 Jakub Jelinek <jakub@redhat.com>
PR target/80286
......
! { dg-do compile }
! PR fortran/69498
! This used to ICE
program p
type t
submodule (m) sm ! { dg-error "Unexpected SUBMODULE statement at" }
end type
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