summaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-openmp.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2006-10-29 10:27:39 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2006-10-29 10:27:39 +0000
commit6b9696405bb3994f11514e82ca9f3fbd29f48b05 (patch)
tree59c440f9db09227ba377e82b3faec95f9cd560ba /gcc/fortran/trans-openmp.c
parent26ac986ec95a37e2f8f6f8dff75e77179cf4e590 (diff)
PR fortran/29629
* trans-openmp.c (gfc_trans_omp_array_reduction): Set attr.flavor of init_val_sym and outer_sym to FL_VARIABLE. * testsuite/libgomp.fortran/pr29629.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118134 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/trans-openmp.c')
-rw-r--r--gcc/fortran/trans-openmp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c
index 32020cc433a6..fa8be1d72ecf 100644
--- a/gcc/fortran/trans-openmp.c
+++ b/gcc/fortran/trans-openmp.c
@@ -300,6 +300,7 @@ gfc_trans_omp_array_reduction (tree c, gfc_symbol *sym, locus where)
init_val_sym.ts = sym->ts;
init_val_sym.attr.referenced = 1;
init_val_sym.declared_at = where;
+ init_val_sym.attr.flavor = FL_VARIABLE;
backend_decl = omp_reduction_init (c, gfc_sym_type (&init_val_sym));
init_val_sym.backend_decl = backend_decl;
@@ -308,6 +309,7 @@ gfc_trans_omp_array_reduction (tree c, gfc_symbol *sym, locus where)
outer_sym.as = gfc_copy_array_spec (sym->as);
outer_sym.attr.dummy = 0;
outer_sym.attr.result = 0;
+ outer_sym.attr.flavor = FL_VARIABLE;
outer_sym.backend_decl = create_tmp_var_raw (TREE_TYPE (decl), NULL);
/* Create fake symtrees for it. */