[Bug target/111522] Different code path for static initialization with flto

2023-10-16 Thread linkw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111522 Kewen Lin changed: What|Removed |Added Resolution|--- |INVALID CC|

[Bug target/111522] Different code path for static initialization with flto

2023-09-29 Thread malat at debian dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111522 --- Comment #11 from Mathieu Malaterre --- Here is a dead simple reduced version: ``` % cat pr111522.cc #include #include #pragma GCC push_options #pragma GCC target "cpu=power10" float BitCast(int in) { float out; memcpy(&out, &in, sizeo

[Bug target/111522] Different code path for static initialization with flto

2023-09-25 Thread malat at debian dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111522 --- Comment #10 from Mathieu Malaterre --- for reference: % c++ --verbose -O2 -flto base2.cc && ./a.out Using built-in specs. COLLECT_GCC=c++ COLLECT_LTO_WRAPPER=/usr/libexec/gcc/powerpc64le-linux-gnu/13/lto-wrapper OFFLOAD_TARGET_NAMES=nvp

[Bug target/111522] Different code path for static initialization with flto

2023-09-25 Thread malat at debian dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111522 --- Comment #9 from Mathieu Malaterre --- If you download pr111522.cc from comment #8, you should be able to reproduce exactly the original upstream issue. Steps: % c++ -O2 -flto pr111522.cc && ./a.out vs % c++ -O2 pr111522.cc && ./a.out

[Bug target/111522] Different code path for static initialization with flto

2023-09-25 Thread malat at debian dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111522 --- Comment #8 from Mathieu Malaterre --- Created attachment 55988 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55988&action=edit gcc -E -P

[Bug target/111522] Different code path for static initialization with flto

2023-09-25 Thread malat at debian dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111522 --- Comment #7 from Mathieu Malaterre --- Created attachment 55987 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55987&action=edit gcc -E -P

[Bug target/111522] Different code path for static initialization with flto

2023-09-25 Thread malat at debian dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111522 --- Comment #6 from Mathieu Malaterre --- (In reply to Andrew Pinski from comment #5) > (In reply to Mathieu Malaterre from comment #4) > > > So the original > > > (upstream) code is somewhat buggy as it rely on lazy init for global var. > > >

[Bug target/111522] Different code path for static initialization with flto

2023-09-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111522 --- Comment #5 from Andrew Pinski --- (In reply to Mathieu Malaterre from comment #4) > > So the original > > (upstream) code is somewhat buggy as it rely on lazy init for global var. > > Those global vars are in different namespace, I actually

[Bug target/111522] Different code path for static initialization with flto

2023-09-25 Thread malat at debian dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111522 --- Comment #4 from Mathieu Malaterre --- > So the original > (upstream) code is somewhat buggy as it rely on lazy init for global var. Those global vars are in different namespace, I actually fail to underwhat why the definition with ",cpu=pow

[Bug target/111522] Different code path for static initialization with flto

2023-09-25 Thread malat at debian dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111522 --- Comment #3 from Mathieu Malaterre --- For reference: * https://github.com/google/highway/commit/fea3dba9cfec3a74ddcd8ecac3a5d4d8429191e4

[Bug target/111522] Different code path for static initialization with flto

2023-09-25 Thread malat at debian dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111522 --- Comment #2 from Mathieu Malaterre --- (In reply to Andrew Pinski from comment #1) > I think this is just broken code. > > It does: > #define HWY_BEFORE_NAMESPACE() > \ > HWY_PUSH_ATTRIBUTES("a

[Bug target/111522] Different code path for static initialization with flto

2023-09-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111522 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |WAITING Ever confirmed|0