summaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2013-01-23 09:43:50 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2013-01-23 09:43:50 +0100
commitb39968989d6ae4289c01202c45268b5651d1c222 (patch)
tree37ea5f2a61404a12a6996175537607da56e7b4f8 /gcc/fortran
parenta70418fc91b353d0658b561aaf3990088cb47a8d (diff)
downloadgcc-b39968989d6ae4289c01202c45268b5651d1c222.tar.gz
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
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog7
-rw-r--r--gcc/fortran/trans-decl.c9
2 files changed, 15 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 144da72020b..6825ab11123 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,10 @@
+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>
PR fortran/55919
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index 1f51d6a90a5..26103a3b27e 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -1397,6 +1397,12 @@ gfc_get_symbol_decl (gfc_symbol * sym)
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. */
@@ -1496,7 +1502,8 @@ gfc_get_symbol_decl (gfc_symbol * sym)
&& 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