aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2011-02-18 11:04:30 +0100
committerJanus Weil <janus@gcc.gnu.org>2011-02-18 11:04:30 +0100
commit6e2062b00f9270676ded3f8bfe16273843f449d6 (patch)
treef939ee5f342a8d69cc75d3718d60eb5ece79abb8 /gcc/testsuite
parent7f7d4b122b583abdbeb0681908da858ad7149d9f (diff)
downloadgcc-6e2062b00f9270676ded3f8bfe16273843f449d6.zip
gcc-6e2062b00f9270676ded3f8bfe16273843f449d6.tar.gz
gcc-6e2062b00f9270676ded3f8bfe16273843f449d6.tar.bz2
re PR fortran/47767 ([OOP] SELECT TYPE fails to execute correct TYPE IS block)
2011-02-18 Janus Weil <janus@gcc.gnu.org> PR fortran/47767 * gfortran.h (gfc_check_access): Removed prototype. (gfc_check_symbol_access): Added prototype. * module.c (gfc_check_access): Renamed to 'check_access', made static. (gfc_check_symbol_access): New function, basically a shortcut for 'check_access'. (write_dt_extensions,write_symbol0,write_generic,write_symtree): Use 'gfc_check_symbol_access'. (write_operator,write_module): Renamed 'gfc_check_access'. * resolve.c (resolve_fl_procedure,resolve_fl_derived, resolve_fl_namelist,resolve_symbol,resolve_fntype): Use 'gfc_check_symbol_access'. 2011-02-18 Janus Weil <janus@gcc.gnu.org> PR fortran/47767 * gfortran.dg/class_40.f03: New. From-SVN: r170269
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/class_40.f0336
2 files changed, 41 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 2b4e1fa..998cfc2 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-02-18 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/47767
+ * gfortran.dg/class_40.f03: New.
+
2011-02-18 Dodji Seketeli <dodji@redhat.com>
PR c++/47208
diff --git a/gcc/testsuite/gfortran.dg/class_40.f03 b/gcc/testsuite/gfortran.dg/class_40.f03
new file mode 100644
index 0000000..bd367df
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/class_40.f03
@@ -0,0 +1,36 @@
+! { dg-do run }
+!
+! PR 47767: [OOP] SELECT TYPE fails to execute correct TYPE IS block
+!
+! Contributed by Andrew Benson <abenson@caltech.edu>
+
+module Tree_Nodes
+ type treeNode
+ contains
+ procedure :: walk
+ end type
+contains
+ subroutine walk (thisNode)
+ class (treeNode) :: thisNode
+ print *, SAME_TYPE_AS (thisNode, treeNode())
+ end subroutine
+end module
+
+module Merger_Trees
+ use Tree_Nodes
+ private
+ type(treeNode), public :: baseNode
+end module
+
+module Merger_Tree_Build
+ use Merger_Trees
+end module
+
+program test
+ use Merger_Tree_Build
+ use Tree_Nodes
+ type(treeNode) :: node
+ call walk (node)
+end program
+
+! { dg-final { cleanup-modules "Tree_Nodes Merger_Trees Merger_Tree_Build" } }