Fortran: Use OpenACC's acc_on_device builtin, fix OpenMP' __builtin_is_initial_device: Revert 'gimple_fold_builtin_acc_on_device' change
The motivation of the 'gimple_fold_builtin_acc_on_device' change in
commit 3269a722b7
"Fortran: Use OpenACC's acc_on_device builtin, fix OpenMP' __builtin_is_initial_device"
is unclear, and it unnecessarily diverges GCC's (default)
'--disable-offload-targets' vs. '--enable-offload-targets=[...]'
configurations.
PR testsuite/82250
gcc/
* gimple-fold.cc (gimple_fold_builtin_acc_on_device): Revert last
change.
libgomp/
* testsuite/libgomp.oacc-c-c++-common/routine-nohost-1.c: Revert
last change.
This commit is contained in:
parent
3e14c126de
commit
ab5bd6ac68
2 changed files with 3 additions and 2 deletions
|
@ -4231,7 +4231,7 @@ static bool
|
|||
gimple_fold_builtin_acc_on_device (gimple_stmt_iterator *gsi, tree arg0)
|
||||
{
|
||||
/* Defer folding until we know which compiler we're in. */
|
||||
if (ENABLE_OFFLOADING && symtab->state != EXPANSION)
|
||||
if (symtab->state != EXPANSION)
|
||||
return false;
|
||||
|
||||
unsigned val_host = GOMP_DEVICE_HOST;
|
||||
|
|
|
@ -36,7 +36,8 @@ static int fact_nohost(int n)
|
|||
|
||||
return fact(n);
|
||||
}
|
||||
/* { dg-final { scan-tree-dump-times {(?n)^OpenACC routine 'fact_nohost' has 'nohost' clause\.$} 1 oaccloops { target { c && offloading_enabled } } } }
|
||||
/* { dg-final { scan-tree-dump-times {(?n)^OpenACC routine 'fact_nohost' has 'nohost' clause\.$} 1 oaccloops { target c } } }
|
||||
{ dg-final { scan-tree-dump-times {(?n)^OpenACC routine 'int fact_nohost\(int\)' has 'nohost' clause\.$} 1 oaccloops { target { c++ && { ! offloading_enabled } } } } }
|
||||
{ dg-final { scan-tree-dump-times {(?n)^OpenACC routine 'fact_nohost\(int\)' has 'nohost' clause\.$} 1 oaccloops { target { c++ && offloading_enabled } } } }
|
||||
TODO See PR101551 for 'offloading_enabled' differences. */
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue