aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/dtio_11.f90
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2016-09-20 21:49:12 +0000
committerTobias Burnus <burnus@net-b.de>2016-09-20 21:49:12 +0000
commitabf704d05073530028336551d8565aca6403e985 (patch)
tree0ac440db6513ee01deb5e5dc6142769d1e5b7b2d /gcc/testsuite/gfortran.dg/dtio_11.f90
parentc720aaa3bf123cbfabe14016711f3683d840b6a5 (diff)
parent168ff71ac9c1c9ad651456fc6350b3ab43e6aa2a (diff)
Merge from trunk (r239915 to r240230)fortran-dev
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/fortran-dev@240290 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gfortran.dg/dtio_11.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/dtio_11.f9039
1 files changed, 39 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/dtio_11.f90 b/gcc/testsuite/gfortran.dg/dtio_11.f90
new file mode 100644
index 00000000000..cf8dd365d3c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/dtio_11.f90
@@ -0,0 +1,39 @@
+! { dg-do compile }
+!
+! Test fixes for PRs77532-4.
+!
+! Contributed by Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de>
+!
+! PR77532 - used to ICE
+module m1
+ type t
+ end type
+ interface read(unformatted)
+ end interface
+end
+
+! PR77533 - used to ICE after error
+module m2
+ type t
+ type(unknown), pointer :: next ! { dg-error "is a type that has not been declared" }
+ contains
+ procedure :: s
+ generic :: write(formatted) => s
+ end type
+contains
+ subroutine s(x)
+ end
+end
+
+! PR77533 comment #1 - gave warning that
+module m3
+ type t
+ contains
+ procedure :: s ! { dg-error "Non-polymorphic passed-object" }
+ generic :: write(formatted) => s
+ end type
+contains
+ subroutine s(x) ! { dg-error "must be of type CLASS" }
+ class(t), intent(in) : x ! { dg-error "Invalid character in name" }
+ end
+end