[Bug target/105251] static assert sizeof(decltype(_together)) <= hardware_constructive_interference_size fails with gcc12

2022-04-14 Thread raj.khem at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105251 --- Comment #11 from Khem Raj --- yes thanks. I have done so https://jira.mongodb.org/browse/SERVER-65664

[Bug target/105251] static assert sizeof(decltype(_together)) <= hardware_constructive_interference_size fails with gcc12

2022-04-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105251 --- Comment #10 from Andrew Pinski --- No. The issue is the two constants and cache line size are different. Basically the whole code should not say cache line aligned but rather use them based on what they mean. Report the issue to the mongodb

[Bug target/105251] static assert sizeof(decltype(_together)) <= hardware_constructive_interference_size fails with gcc12

2022-04-14 Thread raj.khem at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105251 --- Comment #9 from Khem Raj --- how does something like this look ? #include #include #include #include #ifdef __cpp_lib_hardware_interference_size using std::hardware_constructive_interference_size; using

[Bug target/105251] static assert sizeof(decltype(_together)) <= hardware_constructive_interference_size fails with gcc12

2022-04-14 Thread raj.khem at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105251 --- Comment #8 from Khem Raj --- So in this case if I change static_assert(sizeof(decltype(_together)) <= hardware_constructive_interference_size, "cache line spill"); to static_assert(sizeof(decltype(_together))

[Bug target/105251] static assert sizeof(decltype(_together)) <= hardware_constructive_interference_size fails with gcc12

2022-04-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105251 --- Comment #7 from Andrew Pinski --- mongodb is using these two values incorrectly and even misunderstanding what they mean. hardware_constructive_interference_size means the Minimum offset between two objects which will avoid false sharing.

[Bug target/105251] static assert sizeof(decltype(_together)) <= hardware_constructive_interference_size fails with gcc12

2022-04-13 Thread raj.khem at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105251 --- Comment #6 from Khem Raj --- this is from mongodb.

[Bug target/105251] static assert sizeof(decltype(_together)) <= hardware_constructive_interference_size fails with gcc12

2022-04-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105251 --- Comment #5 from Andrew Pinski --- (In reply to Khem Raj from comment #4) > I dont think its a bug per-se, I am looking for fixing it right way. Should > I pass a non-default value via gcc cmdline or adjust the size expectations > in code.

[Bug target/105251] static assert sizeof(decltype(_together)) <= hardware_constructive_interference_size fails with gcc12

2022-04-13 Thread raj.khem at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105251 --- Comment #4 from Khem Raj --- I dont think its a bug per-se, I am looking for fixing it right way. Should I pass a non-default value via gcc cmdline or adjust the size expectations in code.

[Bug target/105251] static assert sizeof(decltype(_together)) <= hardware_constructive_interference_size fails with gcc12

2022-04-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105251 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug target/105251] static assert sizeof(decltype(_together)) <= hardware_constructive_interference_size fails with gcc12

2022-04-12 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105251 --- Comment #2 from Jonathan Wakely --- (In reply to Khem Raj from comment #0) > This testcase below fails to compile with gcc12 on aarch64 but works ok with > gcc11 [...] > #ifdef __cpp_lib_hardware_interference_size > using

[Bug target/105251] static assert sizeof(decltype(_together)) <= hardware_constructive_interference_size fails with gcc12

2022-04-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105251 Andrew Pinski changed: What|Removed |Added Component|c++ |target --- Comment #1 from Andrew