aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorliuhongt <hongtao.liu@intel.com>2021-10-13 10:05:58 +0800
committerliuhongt <hongtao.liu@intel.com>2021-10-14 09:33:47 +0800
commitbd440a8c1c50b20b6eac028bca1fc682159787ba (patch)
treeb75ba13068afce8d9afe2cad7c12e1a2471f2d95 /gcc
parent4728afb9894bc94e48d78ee5dc45299ae8d8ad41 (diff)
downloadgcc-bd440a8c1c50b20b6eac028bca1fc682159787ba.zip
gcc-bd440a8c1c50b20b6eac028bca1fc682159787ba.tar.gz
gcc-bd440a8c1c50b20b6eac028bca1fc682159787ba.tar.bz2
Adjust testcase for O2 vectorization[Wuninitialized]
It looks like it's just the the location of the warning that's off, the warning itself is still issued but it's swallowed by the dg-prune-output directive. Since the test was added to verify the fix for an ICE without vectorization I think disabling vectorization should be fine. Ideally, we would understand why the location is wrong so let's keep this bug open and add a comment to the test referencing this bug. gcc/testsuite/ChangeLog: * g++.dg/warn/Wuninitialized-13.C: Add -fno-tree-vectorize.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.dg/warn/Wuninitialized-13.C7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/testsuite/g++.dg/warn/Wuninitialized-13.C b/gcc/testsuite/g++.dg/warn/Wuninitialized-13.C
index 210e74c..b74a2fa 100644
--- a/gcc/testsuite/g++.dg/warn/Wuninitialized-13.C
+++ b/gcc/testsuite/g++.dg/warn/Wuninitialized-13.C
@@ -1,11 +1,14 @@
/* PR c/98597 - ICE in -Wuninitialized printing a MEM_REF
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall -fno-tree-vectorize" } */
+/* After vectorization, the location of the warning that's off,
+ the warning itself is still issued but it's swallowed by
+ the dg-prune-output directive. Refer to pr102700. */
struct shared_count {
shared_count () { }
shared_count (shared_count &r)
- : pi (r.pi) { } // { dg-warning "\\\[-Wuninitialized" "" { xfail { i?86-*-* x86_64-*-* } } }
+ : pi (r.pi) { } // { dg-warning "\\\[-Wuninitialized" }
int pi;
};