re PR fortran/47730 ([OOP] ICE on invalid source in connection with SELECT TYPE)

2011-02-14  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/47730
	* parse.c (gfc_build_block_ns): Commit 'block@' symbol.

2011-02-14  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/47730
	* gfortran.dg/select_type_22.f03: New.

From-SVN: r170157
This commit is contained in:
Janus Weil 2011-02-14 23:17:44 +01:00
parent c9e71b36cf
commit 01efe923a3
4 changed files with 28 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2011-02-14 Janus Weil <janus@gcc.gnu.org>
PR fortran/47730
* parse.c (gfc_build_block_ns): Commit 'block@' symbol.
2011-02-14 Janus Weil <janus@gcc.gnu.org>
PR fortran/47728

View File

@ -3154,6 +3154,7 @@ gfc_build_block_ns (gfc_namespace *parent_ns)
t = gfc_add_flavor (&my_ns->proc_name->attr, FL_LABEL,
my_ns->proc_name->name, NULL);
gcc_assert (t == SUCCESS);
gfc_commit_symbol (my_ns->proc_name);
}
if (parent_ns->proc_name)

View File

@ -1,3 +1,8 @@
2011-02-14 Janus Weil <janus@gcc.gnu.org>
PR fortran/47730
* gfortran.dg/select_type_22.f03: New.
2011-02-14 Jason Merrill <jason@redhat.com>
* g++.dg/cpp0x/regress/enum1.C: New.

View File

@ -0,0 +1,17 @@
! { dg-do compile }
!
! PR 47330: [OOP] ICE on invalid source in connection with SELECT TYPE
!
! Contributed by Andrew Benson <abenson@its.caltech.edu>
type treeNode
end type
contains
subroutine proc1 (thisNode)
class (treeNode), target :: thisNode
select type (thisNode)
type is (treeNode)
workNode => thisNode ! { dg-error "Non-POINTER in pointer association context" }
end select
end subroutine
end