+2006-10-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/29629
+ * trans-openmp.c (gfc_trans_omp_array_reduction): Set attr.flavor
+ of init_val_sym and outer_sym to FL_VARIABLE.
+
2006-10-29 Kazu Hirata <kazu@codesourcery.com>
* intrinsic.texi: Fix a typo.
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;
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. */
+2006-10-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/29629
+ * testsuite/libgomp.fortran/pr29629.f90: New test.
+
2006-10-24 Eric Botcazou <ebotcazou@libertysurf.fr>
PR libgomp/29494
--- /dev/null
+! PR fortran/29629
+! { dg-do run }
+
+program pr29629
+ integer :: n
+ n = 10000
+ if (any (func(n).ne.10000)) call abort
+ contains
+ function func(n)
+ integer, intent(in) :: n
+ integer, dimension(n) :: func
+ integer :: k
+ func = 0
+!$omp parallel do private(k), reduction(+:func), num_threads(4)
+ do k = 1, n
+ func = func + 1
+ end do
+!$omp end parallel do
+ end function
+end program