From c03e6b5279af591a5d4307212c1d1983515f3588 Mon Sep 17 00:00:00 2001 From: Janus Weil Date: Mon, 1 Apr 2013 17:11:01 +0200 Subject: re PR fortran/56500 ([OOP] "IMPLICIT CLASS(...)" wrongly rejected) 2013-04-01 Janus Weil PR fortran/56500 * symbol.c (gfc_set_default_type): Build class container for IMPLICIT CLASS. 2013-04-01 Janus Weil PR fortran/56500 * gfortran.dg/implicit_class_1.f90: New. From-SVN: r197306 --- gcc/testsuite/ChangeLog | 5 ++++ gcc/testsuite/gfortran.dg/implicit_class_1.f90 | 35 ++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/implicit_class_1.f90 (limited to 'gcc/testsuite') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 48bebd0..c1fc14d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-04-01 Janus Weil + + PR fortran/56500 + * gfortran.dg/implicit_class_1.f90: New. + 2013-03-31 Jerry DeLisle PR fortran/56786 diff --git a/gcc/testsuite/gfortran.dg/implicit_class_1.f90 b/gcc/testsuite/gfortran.dg/implicit_class_1.f90 new file mode 100644 index 0000000..329f57a --- /dev/null +++ b/gcc/testsuite/gfortran.dg/implicit_class_1.f90 @@ -0,0 +1,35 @@ +! { dg-do run } +! +! PR 56500: [OOP] "IMPLICIT CLASS(...)" wrongly rejected +! +! Contributed by Reinhold Bader + +program upimp + implicit class(foo) (a-b) + implicit class(*) (c) + type :: foo + integer :: i + end type + allocatable :: aaf, caf + + allocate(aaf, source=foo(2)) + select type (aaf) + type is (foo) + if (aaf%i /= 2) call abort + class default + call abort + end select + + allocate(caf, source=foo(3)) + select type (caf) + type is (foo) + if (caf%i /= 3) call abort + class default + call abort + end select + +contains + subroutine gloo(x) + implicit class(*) (a-z) + end +end program -- cgit v1.1