https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102823
Bug ID: 102823 Summary: glm-0.9.9.8 fails on gcc-11 and above (-fno-strict-aliasing) Product: gcc Version: 11.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at gcc dot gnu.org Target Milestone: --- Created attachment 51626 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51626&action=edit z.tar.gz On gcc-10 glm test suite worked successfully. On gcc-11 single test fails as: glm> The following tests FAILED: glm> 39 - test-core_func_integer (Failed) I extracted self-contained example that hopefully illustrates the problem: $ g++-10 -I. -O2 core_func_integer.cpp -o a && ./a; echo $? 0 $ g++-11 -I. -O2 core_func_integer.cpp -o a && ./a; echo $? 4 $ g++-12 -I. -O2 core_func_integer.cpp -o a && ./a; echo $? 4 Adding -fno-strict-aliasing makes the test pass. Can you help me understand where alaising violation happens? I tried adding -fopt-info, but there is not much difference in the output.