From: Andrew Pinski Date: Fri, 16 Feb 2024 21:26:30 +0000 (-0800) Subject: Add -Wstrict-aliasing to vector-struct-1.C testcase X-Git-Tag: basepoints/gcc-15~1098 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd503b0616462445381a8232fb753239d319af76;p=thirdparty%2Fgcc.git Add -Wstrict-aliasing to vector-struct-1.C testcase 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 --- diff --git a/gcc/testsuite/g++.dg/torture/vector-struct-1.C b/gcc/testsuite/g++.dg/torture/vector-struct-1.C index e2747417e2d5..969a801e6807 100644 --- a/gcc/testsuite/g++.dg/torture/vector-struct-1.C +++ b/gcc/testsuite/g++.dg/torture/vector-struct-1.C @@ -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. */