mirror of git://gcc.gnu.org/git/gcc.git
Remove incorrect warning for parallel implicit firstprivate clause
2016-04-08 Tom de Vries <tom@codesourcery.com> * omp-low.c (lower_omp_target): Set TREE_NO_WARNING for oacc implicit firstprivate clause. * c-c++-common/goacc/uninit-firstprivate-clause.c: New test. * gfortran.dg/goacc/uninit-firstprivate-clause.f95: New test. From-SVN: r234826
This commit is contained in:
parent
bae7adda10
commit
9f1b833bc3
|
|
@ -1,3 +1,8 @@
|
||||||
|
2016-04-08 Tom de Vries <tom@codesourcery.com>
|
||||||
|
|
||||||
|
* omp-low.c (lower_omp_target): Set TREE_NO_WARNING for oacc
|
||||||
|
implicit firstprivate clause.
|
||||||
|
|
||||||
2016-04-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
|
2016-04-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
|
||||||
|
|
||||||
PR target/70566
|
PR target/70566
|
||||||
|
|
|
||||||
|
|
@ -16077,7 +16077,12 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx)
|
||||||
{
|
{
|
||||||
gcc_assert (is_gimple_omp_oacc (ctx->stmt));
|
gcc_assert (is_gimple_omp_oacc (ctx->stmt));
|
||||||
if (!is_reference (var))
|
if (!is_reference (var))
|
||||||
var = build_fold_addr_expr (var);
|
{
|
||||||
|
if (is_gimple_reg (var)
|
||||||
|
&& OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT (c))
|
||||||
|
TREE_NO_WARNING (var) = 1;
|
||||||
|
var = build_fold_addr_expr (var);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
talign = TYPE_ALIGN_UNIT (TREE_TYPE (TREE_TYPE (ovar)));
|
talign = TYPE_ALIGN_UNIT (TREE_TYPE (TREE_TYPE (ovar)));
|
||||||
gimplify_assign (x, var, &ilist);
|
gimplify_assign (x, var, &ilist);
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
2016-04-08 Tom de Vries <tom@codesourcery.com>
|
||||||
|
|
||||||
|
* c-c++-common/goacc/uninit-firstprivate-clause.c: New test.
|
||||||
|
* gfortran.dg/goacc/uninit-firstprivate-clause.f95: New test.
|
||||||
|
|
||||||
2016-04-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
|
2016-04-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
|
||||||
|
|
||||||
PR target/70566
|
PR target/70566
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
/* { dg-do compile } */
|
||||||
|
/* { dg-additional-options "-Wuninitialized" } */
|
||||||
|
|
||||||
|
void
|
||||||
|
foo (void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
#pragma acc parallel
|
||||||
|
{
|
||||||
|
i = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
foo2 (void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
#pragma acc parallel firstprivate (i) /* { dg-warning "is used uninitialized in this function" } */
|
||||||
|
{
|
||||||
|
i = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
! { dg-do compile }
|
||||||
|
! { dg-additional-options "-Wuninitialized" }
|
||||||
|
|
||||||
|
subroutine test
|
||||||
|
INTEGER :: i
|
||||||
|
|
||||||
|
!$acc parallel
|
||||||
|
i = 1
|
||||||
|
!$acc end parallel
|
||||||
|
end subroutine test
|
||||||
|
|
||||||
|
subroutine test2
|
||||||
|
INTEGER :: i
|
||||||
|
|
||||||
|
!$acc parallel firstprivate (i) ! { dg-warning "is used uninitialized in this function" }
|
||||||
|
i = 1
|
||||||
|
!$acc end parallel
|
||||||
|
end subroutine test2
|
||||||
Loading…
Reference in New Issue