public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/102823] New: glm-0.9.9.8 fails on gcc-11 and above (-fno-strict-aliasing)
@ 2021-10-18 20:52 slyfox at gcc dot gnu.org
2021-10-18 20:54 ` [Bug middle-end/102823] [11/12 Regression] " pinskia at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: slyfox at gcc dot gnu.org @ 2021-10-18 20:52 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/102823] [11/12 Regression] glm-0.9.9.8 fails on gcc-11 and above (-fno-strict-aliasing)
2021-10-18 20:52 [Bug c++/102823] New: glm-0.9.9.8 fails on gcc-11 and above (-fno-strict-aliasing) slyfox at gcc dot gnu.org
@ 2021-10-18 20:54 ` pinskia at gcc dot gnu.org
2021-10-18 20:55 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-18 20:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102823
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|glm-0.9.9.8 fails on gcc-11 |[11/12 Regression]
|and above |glm-0.9.9.8 fails on gcc-11
|(-fno-strict-aliasing) |and above
| |(-fno-strict-aliasing)
Target Milestone|--- |11.3
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/102823] [11/12 Regression] glm-0.9.9.8 fails on gcc-11 and above (-fno-strict-aliasing)
2021-10-18 20:52 [Bug c++/102823] New: glm-0.9.9.8 fails on gcc-11 and above (-fno-strict-aliasing) slyfox at gcc dot gnu.org
2021-10-18 20:54 ` [Bug middle-end/102823] [11/12 Regression] " pinskia at gcc dot gnu.org
@ 2021-10-18 20:55 ` pinskia at gcc dot gnu.org
2021-10-19 7:47 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-18 20:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102823
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Hmm:
*reinterpret_cast<glm::vec<L, typename glm::detail::make_unsigned<T>::type, Q>
const *>(&v)
That seems like it could be a violation of C/C++ aliasing rules.
This is in:
template<glm::length_t L, typename T, glm::qualifier Q>
static glm::vec<L, int, Q> bitCount_bitfield(glm::vec<L, T, Q> const&
v)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/102823] [11/12 Regression] glm-0.9.9.8 fails on gcc-11 and above (-fno-strict-aliasing)
2021-10-18 20:52 [Bug c++/102823] New: glm-0.9.9.8 fails on gcc-11 and above (-fno-strict-aliasing) slyfox at gcc dot gnu.org
2021-10-18 20:54 ` [Bug middle-end/102823] [11/12 Regression] " pinskia at gcc dot gnu.org
2021-10-18 20:55 ` pinskia at gcc dot gnu.org
@ 2021-10-19 7:47 ` rguenth at gcc dot gnu.org
2021-10-19 7:48 ` rguenth at gcc dot gnu.org
2021-10-19 9:23 ` slyfox at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-19 7:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102823
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Yeah, I think I've seen this exact bug before. Note while 'int' and 'unsigned'
inter-operate wrt TBAA two structure types differing only in the signedness of
a _member_ do not.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/102823] [11/12 Regression] glm-0.9.9.8 fails on gcc-11 and above (-fno-strict-aliasing)
2021-10-18 20:52 [Bug c++/102823] New: glm-0.9.9.8 fails on gcc-11 and above (-fno-strict-aliasing) slyfox at gcc dot gnu.org
` (2 preceding siblings ...)
2021-10-19 7:47 ` rguenth at gcc dot gnu.org
@ 2021-10-19 7:48 ` rguenth at gcc dot gnu.org
2021-10-19 9:23 ` slyfox at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-19 7:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102823
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
dup
*** This bug has been marked as a duplicate of bug 98594 ***
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/102823] [11/12 Regression] glm-0.9.9.8 fails on gcc-11 and above (-fno-strict-aliasing)
2021-10-18 20:52 [Bug c++/102823] New: glm-0.9.9.8 fails on gcc-11 and above (-fno-strict-aliasing) slyfox at gcc dot gnu.org
` (3 preceding siblings ...)
2021-10-19 7:48 ` rguenth at gcc dot gnu.org
@ 2021-10-19 9:23 ` slyfox at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: slyfox at gcc dot gnu.org @ 2021-10-19 9:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102823
--- Comment #4 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
Thank you! Added a link to upstream issue report:
https://github.com/g-truc/glm/pull/1087
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-10-19 9:23 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-18 20:52 [Bug c++/102823] New: glm-0.9.9.8 fails on gcc-11 and above (-fno-strict-aliasing) slyfox at gcc dot gnu.org
2021-10-18 20:54 ` [Bug middle-end/102823] [11/12 Regression] " pinskia at gcc dot gnu.org
2021-10-18 20:55 ` pinskia at gcc dot gnu.org
2021-10-19 7:47 ` rguenth at gcc dot gnu.org
2021-10-19 7:48 ` rguenth at gcc dot gnu.org
2021-10-19 9:23 ` slyfox at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).