mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-29 07:00:24 +08:00
re PR ipa/78027 (ICE in new_oacc_loop_routine, at omp-low.c:19000)
PR ipa/78027 gcc/ * ipa-icf.c (sem_function::parse): Don't process functions with oacc decl attributes, as they may be OpenACC routines. gcc/testsuite/ * c-c++-common/goacc/acc-icf.c: New test. * gfortran.dg/goacc/pr78027.f90: New test. From-SVN: r243488
This commit is contained in:
parent
6bd8a5c78f
commit
97ad3aef45
gcc
@ -1,3 +1,9 @@
|
||||
2016-12-09 Cesar Philippidis <cesar@codesourcery.com>
|
||||
|
||||
PR ipa/78027
|
||||
* ipa-icf.c (sem_function::parse): Don't process functions with
|
||||
oacc decl attributes, as they may be OpenACC routines.
|
||||
|
||||
2016-12-09 David Malcolm <dmalcolm@redhat.com>
|
||||
|
||||
* rtl.h (get_mem_attrs): Add "const" qualifier to returned
|
||||
|
@ -1689,6 +1689,10 @@ sem_function::parse (cgraph_node *node, bitmap_obstack *stack)
|
||||
if (lookup_attribute_by_prefix ("omp ", DECL_ATTRIBUTES (node->decl)) != NULL)
|
||||
return NULL;
|
||||
|
||||
if (lookup_attribute_by_prefix ("oacc ",
|
||||
DECL_ATTRIBUTES (node->decl)) != NULL)
|
||||
return NULL;
|
||||
|
||||
/* PR ipa/70306. */
|
||||
if (DECL_STATIC_CONSTRUCTOR (node->decl)
|
||||
|| DECL_STATIC_DESTRUCTOR (node->decl))
|
||||
|
@ -1,3 +1,9 @@
|
||||
2016-12-09 Cesar Philippidis <cesar@codesourcery.com>
|
||||
|
||||
PR ipa/78027
|
||||
* c-c++-common/goacc/acc-icf.c: New test.
|
||||
* gfortran.dg/goacc/pr78027.f90: New test.
|
||||
|
||||
2015-12-09 Wilco Dijkstra <wdijkstr@arm.com>
|
||||
|
||||
PR target/78733
|
||||
|
49
gcc/testsuite/c-c++-common/goacc/acc-icf.c
Normal file
49
gcc/testsuite/c-c++-common/goacc/acc-icf.c
Normal file
@ -0,0 +1,49 @@
|
||||
/* Ensure that IPA-ICF is disabled on OpenACC routines. */
|
||||
|
||||
/* { dg-additional-options "-fopenacc -O2 -fdump-ipa-icf" } */
|
||||
|
||||
#pragma acc routine gang
|
||||
int
|
||||
routine1 (int n)
|
||||
{
|
||||
int i;
|
||||
|
||||
#pragma acc loop
|
||||
for (i = 0; i < n; i++)
|
||||
;
|
||||
|
||||
return n + 1;
|
||||
}
|
||||
|
||||
#pragma acc routine gang
|
||||
int
|
||||
routine2 (int n)
|
||||
{
|
||||
int i;
|
||||
|
||||
#pragma acc loop
|
||||
for (i = 0; i < n; i++)
|
||||
;
|
||||
|
||||
return n + 1;
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int i;
|
||||
|
||||
#pragma acc parallel loop
|
||||
for (i = 0; i < 8; i++)
|
||||
;
|
||||
|
||||
#pragma acc parallel loop
|
||||
for (i = 0; i < 8; i++)
|
||||
;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-ipa-dump-times "Not parsed function:" 4 "icf" } } */
|
||||
/* { dg-final { scan-ipa-dump "Parsed function:main" "icf" } } */
|
||||
|
20
gcc/testsuite/gfortran.dg/goacc/pr78027.f90
Normal file
20
gcc/testsuite/gfortran.dg/goacc/pr78027.f90
Normal file
@ -0,0 +1,20 @@
|
||||
! { dg-additional-options "-fopenmp -O2 -fdump-ipa-icf" }
|
||||
|
||||
real function f()
|
||||
!$omp declare target(f)
|
||||
f = 1.
|
||||
!$acc parallel
|
||||
!$acc loop
|
||||
do i = 1, 8
|
||||
end do
|
||||
!$acc end parallel
|
||||
!$acc parallel
|
||||
!$acc loop
|
||||
do i = 1, 8
|
||||
end do
|
||||
!$acc end parallel
|
||||
end
|
||||
|
||||
! { dg-final { scan-ipa-dump "Not parsed function:f_._omp_fn.1" "icf" } }
|
||||
! { dg-final { scan-ipa-dump "Not parsed function:f_._omp_fn.0" "icf" } }
|
||||
! { dg-final { scan-ipa-dump "Not parsed function:f_" "icf" } }
|
Loading…
x
Reference in New Issue
Block a user