From: Kwok Cheung Yeung Date: Fri, 18 Dec 2020 20:05:20 +0000 (-0800) Subject: openmp: Fix g++.dg/gomp/declare-target-3.C testcase when offloading is disabled X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bfb37fa4dd49ee775ae90355464265a2f60c1067;p=gcc.git openmp: Fix g++.dg/gomp/declare-target-3.C testcase when offloading is disabled 2020-12-18 Kwok Cheung Yeung gcc/testsuite/ * g++.dg/gomp/declare-target-3.C: Only check .offload_var_table entries if offloading is enabled. --- diff --git a/gcc/testsuite/g++.dg/gomp/declare-target-3.C b/gcc/testsuite/g++.dg/gomp/declare-target-3.C index d2dedaf21ab..1e23c8633ac 100644 --- a/gcc/testsuite/g++.dg/gomp/declare-target-3.C +++ b/gcc/testsuite/g++.dg/gomp/declare-target-3.C @@ -22,10 +22,10 @@ int *g = &f; // Explicitly marked // { dg-final { scan-tree-dump "__attribute__\\\(\\\(omp declare target\\\)\\\)\\\nint bar \\\(\\\)" "gimple" } } // { dg-final { scan-tree-dump "__attribute__\\\(\\\(omp declare target\\\)\\\)\\\nint baz \\\(\\\)" "gimple" } } // { dg-final { scan-tree-dump "__attribute__\\\(\\\(omp declare target\\\)\\\)\\\nint qux \\\(\\\)" "gimple" } } -// { dg-final { scan-assembler-not "\\\.offload_var_table:\\n.+\\\.quad\\s+a" } } -// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.quad\\s+b" } } -// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.quad\\s+c" } } -// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.quad\\s+d" } } -// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.quad\\s+e" } } -// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.quad\\s+f" } } -// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.quad\\s+g" } } +// { dg-final { scan-assembler-not "\\\.offload_var_table:\\n.+\\\.quad\\s+a" { target { offloading_enabled } } } } +// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.quad\\s+b" { target { offloading_enabled } } } } +// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.quad\\s+c" { target { offloading_enabled } } } } +// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.quad\\s+d" { target { offloading_enabled } } } } +// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.quad\\s+e" { target { offloading_enabled } } } } +// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.quad\\s+f" { target { offloading_enabled } } } } +// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.quad\\s+g" { target { offloading_enabled } } } }