diff options
author | Janus Weil <janus@gcc.gnu.org> | 2013-04-01 17:11:01 +0200 |
---|---|---|
committer | Janus Weil <janus@gcc.gnu.org> | 2013-04-01 17:11:01 +0200 |
commit | c03e6b5279af591a5d4307212c1d1983515f3588 (patch) | |
tree | 114a4fb74107b03a1e46eef2f68c14b30ce7aae9 /gcc/testsuite | |
parent | 5717a8d48e4d4e28d22b4a69b7f86965cc2cc5c2 (diff) | |
download | gcc-c03e6b5279af591a5d4307212c1d1983515f3588.zip gcc-c03e6b5279af591a5d4307212c1d1983515f3588.tar.gz gcc-c03e6b5279af591a5d4307212c1d1983515f3588.tar.bz2 |
re PR fortran/56500 ([OOP] "IMPLICIT CLASS(...)" wrongly rejected)
2013-04-01 Janus Weil <janus@gcc.gnu.org>
PR fortran/56500
* symbol.c (gfc_set_default_type): Build class container for
IMPLICIT CLASS.
2013-04-01 Janus Weil <janus@gcc.gnu.org>
PR fortran/56500
* gfortran.dg/implicit_class_1.f90: New.
From-SVN: r197306
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/implicit_class_1.f90 | 35 |
2 files changed, 40 insertions, 0 deletions
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 <janus@gcc.gnu.org> + + PR fortran/56500 + * gfortran.dg/implicit_class_1.f90: New. + 2013-03-31 Jerry DeLisle <jvdelisle@gcc.gnu.org> 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 <Reinhold.Bader@lrz.de> + +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 |