2013-01-23 Jakub Jelinek <jakub@redhat.com>
PR fortran/56052
* trans-decl.c (gfc_get_symbol_decl): Set DECL_ARTIFICIAL
and DECL_IGNORED_P on select_type_temporary and don't set
DECL_BY_REFERENCE.
* gfortran.dg/gomp/pr56052.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@195662
138bc75d-0d04-0410-961f-
82ee72b054a4
+2013-02-01 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2013-01-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/56052
+ * trans-decl.c (gfc_get_symbol_decl): Set DECL_ARTIFICIAL
+ and DECL_IGNORED_P on select_type_temporary and don't set
+ DECL_BY_REFERENCE.
+
2013-01-24 Janus Weil <janus@gcc.gnu.org>
PR fortran/56081
DECL_IGNORED_P (decl) = 1;
}
+ if (sym->attr.select_type_temporary)
+ {
+ DECL_ARTIFICIAL (decl) = 1;
+ DECL_IGNORED_P (decl) = 1;
+ }
+
if (sym->attr.dimension || sym->attr.codimension)
{
/* Create variables to hold the non-constant bits of array info. */
&& POINTER_TYPE_P (TREE_TYPE (decl))
&& !sym->attr.pointer
&& !sym->attr.allocatable
- && !sym->attr.proc_pointer)
+ && !sym->attr.proc_pointer
+ && !sym->attr.select_type_temporary)
DECL_BY_REFERENCE (decl) = 1;
if (sym->attr.vtab
Backported from mainline
2013-01-23 Jakub Jelinek <jakub@redhat.com>
+ PR fortran/56052
+ * gfortran.dg/gomp/pr56052.f90: New test.
+
+ 2013-01-23 Jakub Jelinek <jakub@redhat.com>
+
PR target/49069
* gcc.dg/pr49069.c: New test.
--- /dev/null
+! PR fortran/56052
+! { dg-do compile }
+! { dg-options "-fopenmp" }
+
+subroutine middle(args)
+ type args_t
+ end type
+ type, extends(args_t) :: scan_args_t
+ end type
+ class(args_t),intent(inout) :: args
+ !$omp single
+ select type (args)
+ type is (scan_args_t)
+ end select
+ !$omp end single
+end subroutine middle