diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/fortran/match.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/select_type_16.f03 | 41 |
4 files changed, 55 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 669d9b4..9dab697 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,4 +1,10 @@ -2010-07-21 Steven G. Kargl <kargl@gcc.gnu.org> +2010-08-29 Janus Weil <janus@gcc.gnu.org> + + PR fortran/45439 + * match.c (gfc_match_select_type): Give the associate-name the + FL_VARIABLE attribute. + +2010-07-28 Steven G. Kargl <kargl@gcc.gnu.org> * simplify.c (gfc_simplify_bessel_n2): Fix indention and argument type. diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 47cd8d6..14f2417 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -4532,6 +4532,7 @@ gfc_match_select_type (void) expr1->symtree->n.sym->attr.untyped = 1; else expr1->symtree->n.sym->ts = expr2->ts; + expr1->symtree->n.sym->attr.flavor = FL_VARIABLE; expr1->symtree->n.sym->attr.referenced = 1; expr1->symtree->n.sym->attr.class_ok = 1; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 931dfb7f..5a9f38a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,4 +1,9 @@ -2010-07-21 Steven G. Kargl <kargl@gcc.gnu.org> +2010-08-29 Janus Weil <janus@gcc.gnu.org> + + PR fortran/45439 + * gfortran.dg/select_type_16.f03: New. + +2010-07-28 Steven G. Kargl <kargl@gcc.gnu.org> Tobias Burnus <burnus@net-b.de> * gfortran.dg/bessel_7.f90: Decrease required precision. diff --git a/gcc/testsuite/gfortran.dg/select_type_16.f03 b/gcc/testsuite/gfortran.dg/select_type_16.f03 new file mode 100644 index 0000000..29d1930 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/select_type_16.f03 @@ -0,0 +1,41 @@ +! { dg-do compile } +! +! PR 45439: [OOP] SELECT TYPE bogus complaint about INTENT +! +! Contributed by Salvatore Filippone <sfilippone@uniroma2.it> + + +module d_base_mat_mod + + implicit none + + type :: d_base_sparse_mat + contains + procedure, pass(a) :: mv_to_coo => d_base_mv_to_coo + end type d_base_sparse_mat + + interface + subroutine d_base_mv_to_coo(a) + import d_base_sparse_mat + class(d_base_sparse_mat), intent(inout) :: a + end subroutine d_base_mv_to_coo + end interface + + type :: d_sparse_mat + class(d_base_sparse_mat), allocatable :: a + end type d_sparse_mat + +contains + + subroutine bug21(ax) + type(d_sparse_mat), intent(inout) :: ax + select type(aa=> ax%a) + class default + call aa%mv_to_coo() + end select + end subroutine bug21 + +end module d_base_mat_mod + + +! { dg-final { cleanup-modules "d_base_mat_mod" } } |