]> gcc.gnu.org Git - gcc.git/commitdiff
Add -Wstrict-aliasing to vector-struct-1.C testcase
authorAndrew Pinski <quic_apinski@quicinc.com>
Fri, 16 Feb 2024 21:26:30 +0000 (13:26 -0800)
committerAndrew Pinski <quic_apinski@quicinc.com>
Fri, 16 Feb 2024 21:57:42 +0000 (13:57 -0800)
As noticed by Marek Polacek in https://gcc.gnu.org/pipermail/gcc-patches/2024-February/645836.html,
this testcase was not failing before without -Wstrict-aliasing so let's add that option.

Committed as obvious after testing to make sure the test is now testing with `-Wstrict-aliasing` and `-flto`.

gcc/testsuite/ChangeLog:

* g++.dg/torture/vector-struct-1.C: Add -Wstrict-aliasing.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/testsuite/g++.dg/torture/vector-struct-1.C

index e2747417e2d52b31a70814874f33f66b90ea3340..969a801e680714befe8c75c2006a838a2055780a 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-options "-Wstrict-aliasing" } */
 /* PR c++/97990 */
 /* This used to crash with lto and strict aliasing enabled as the
    vector type variant still had TYPE_ALIAS_SET set on it. */
This page took 0.069454 seconds and 5 git commands to generate.