summaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/defined_assignment_7.f9029
2 files changed, 34 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 119a7648c7d..ea929e013d0 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2013-06-14 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57508
+ * gfortran.dg/defined_assignment_7.f90: New.
+
2013-06-14 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57599
diff --git a/gcc/testsuite/gfortran.dg/defined_assignment_7.f90 b/gcc/testsuite/gfortran.dg/defined_assignment_7.f90
new file mode 100644
index 00000000000..5f60f50e781
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/defined_assignment_7.f90
@@ -0,0 +1,29 @@
+! { dg-compile }
+!
+! PR fortran/57508
+!
+module ForTrilinos_ref_counter
+ type ref_counter
+ contains
+ procedure :: assign
+ generic :: assignment(=) => assign
+ end type
+contains
+ subroutine assign (lhs, rhs)
+ class (ref_counter), intent(inout) :: lhs
+ class (ref_counter), intent(in) :: rhs
+ end subroutine
+end module
+module FEpetra_BlockMap
+ use ForTrilinos_ref_counter, only : ref_counter
+ type :: Epetra_BlockMap
+ type(ref_counter) :: counter
+ end type
+contains
+ function from_struct() result(new_Epetra_BlockMap)
+ type(Epetra_BlockMap) :: new_Epetra_BlockMap
+ end function
+ type(Epetra_BlockMap) function create_arbitrary()
+ create_arbitrary = from_struct()
+ end function
+end module