Commit b3996898 by Jakub Jelinek Committed by Jakub Jelinek

re PR fortran/56052 ([OOP] ICE in omp_add_variable, at gimplify.c:5606)

	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.

From-SVN: r195399
parent a70418fc
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-21 Thomas Koenig <tkoenig@gcc.gnu.org> 2013-01-21 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/55919 PR fortran/55919
......
...@@ -1397,6 +1397,12 @@ gfc_get_symbol_decl (gfc_symbol * sym) ...@@ -1397,6 +1397,12 @@ gfc_get_symbol_decl (gfc_symbol * sym)
DECL_IGNORED_P (decl) = 1; 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) if (sym->attr.dimension || sym->attr.codimension)
{ {
/* Create variables to hold the non-constant bits of array info. */ /* Create variables to hold the non-constant bits of array info. */
...@@ -1496,7 +1502,8 @@ gfc_get_symbol_decl (gfc_symbol * sym) ...@@ -1496,7 +1502,8 @@ gfc_get_symbol_decl (gfc_symbol * sym)
&& POINTER_TYPE_P (TREE_TYPE (decl)) && POINTER_TYPE_P (TREE_TYPE (decl))
&& !sym->attr.pointer && !sym->attr.pointer
&& !sym->attr.allocatable && !sym->attr.allocatable
&& !sym->attr.proc_pointer) && !sym->attr.proc_pointer
&& !sym->attr.select_type_temporary)
DECL_BY_REFERENCE (decl) = 1; DECL_BY_REFERENCE (decl) = 1;
if (sym->attr.vtab if (sym->attr.vtab
......
2013-01-23 Jakub Jelinek <jakub@redhat.com> 2013-01-23 Jakub Jelinek <jakub@redhat.com>
PR fortran/56052
* gfortran.dg/gomp/pr56052.f90: New test.
PR target/49069 PR target/49069
* gcc.dg/pr49069.c: New test. * gcc.dg/pr49069.c: New test.
......
! 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment