From bfb37fa4dd49ee775ae90355464265a2f60c1067 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Fri, 18 Dec 2020 12:05:20 -0800 Subject: [PATCH] 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. --- gcc/testsuite/g++.dg/gomp/declare-target-3.C | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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 } } } } -- 2.30.2