[Bug target/109585] Carla/sord miscompiled with -O2 on ARM64 (inlining issue)

2023-04-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109585 --- Comment #7 from Andrew Pinski --- -fno-strict-aliasing also fixes the issue ...

[Bug target/109585] Carla/sord miscompiled with -O2 on ARM64 (inlining issue)

2023-04-21 Thread hector at marcansoft dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109585 --- Comment #6 from Hector Martin --- Cleaned it up into a self-contained repro. Simply compiling with `gcc -O2 -o test test.c && test` gives a segfault. -O1 or -fno-schedule-insns -fno-schedule-insns2 avoids the issue. Looking at assembly

[Bug target/109585] Carla/sord miscompiled with -O2 on ARM64 (inlining issue)

2023-04-21 Thread hector at marcansoft dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109585 --- Comment #5 from Hector Martin --- Created attachment 54904 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54904=edit self-contained reproducer

[Bug target/109585] Carla/sord miscompiled with -O2 on ARM64 (inlining issue)

2023-04-21 Thread hector at marcansoft dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109585 --- Comment #4 from Hector Martin --- This whole codebase is complex, and the problem is in btree code which is hard to simplify down. Best I can do right now is this. First grab the lv2.tar.gz attachment and extract it into /tmp. Then: $ git

[Bug target/109585] Carla/sord miscompiled with -O2 on ARM64 (inlining issue)

2023-04-21 Thread hector at marcansoft dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109585 --- Comment #3 from Hector Martin --- Created attachment 54903 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54903=edit lv2 plugin bundle for testing