[Bug middle-end/107498] Wrong optimization leads to unaligned access when compiling OpenLDAP

2022-11-13 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107498 --- Comment #11 from Eric Botcazou --- > FWIW, the issue does not show when compiling with clang. This probably means that GCC generates better/smaller code then.

[Bug middle-end/107498] Wrong optimization leads to unaligned access when compiling OpenLDAP

2022-11-13 Thread glaubitz at physik dot fu-berlin.de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107498 --- Comment #10 from John Paul Adrian Glaubitz --- (In reply to Eric Botcazou from comment #9) > > Program received signal SIGBUS, Bus error. > > 0x010ceda4 in mdb_node_add (mc=0x14327b8, indx=, > > key=0x7fee0a0,

[Bug middle-end/107498] Wrong optimization leads to unaligned access when compiling OpenLDAP

2022-11-13 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107498 Eric Botcazou changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|---

[Bug middle-end/107498] Wrong optimization leads to unaligned access when compiling OpenLDAP

2022-11-12 Thread glaubitz at physik dot fu-berlin.de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107498 --- Comment #8 from John Paul Adrian Glaubitz --- (In reply to Eric Botcazou from comment #5) > Can anyone print the value of mp in the debugger? glaubitz@gcc202:~/openldap/tests$ gdb --args /home/glaubitz/openldap/servers/slapd/slapd -Ta -d 0

[Bug middle-end/107498] Wrong optimization leads to unaligned access when compiling OpenLDAP

2022-11-01 Thread glaubitz at physik dot fu-berlin.de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107498 --- Comment #7 from John Paul Adrian Glaubitz --- Created attachment 53818 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53818=edit Pre-processed source of unmodified mdb.c (gzip-compressed) Here's the preprocessed source for mdb.c

[Bug middle-end/107498] Wrong optimization leads to unaligned access when compiling OpenLDAP

2022-11-01 Thread glaubitz at physik dot fu-berlin.de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107498 --- Comment #6 from John Paul Adrian Glaubitz --- (In reply to Eric Botcazou from comment #5) > Note that the fields are marked volatile in the source: > > union { > struct { >volatile indx_t pb_lower; >volatile indx_t pb_upper; >

[Bug middle-end/107498] Wrong optimization leads to unaligned access when compiling OpenLDAP

2022-11-01 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107498 Eric Botcazou changed: What|Removed |Added Last reconfirmed||2022-11-01

[Bug middle-end/107498] Wrong optimization leads to unaligned access when compiling OpenLDAP

2022-11-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107498 --- Comment #4 from Andrew Pinski --- I am suspecting the sub-allocator mdb_page_alloc is not doing the alignment correctly.

[Bug middle-end/107498] Wrong optimization leads to unaligned access when compiling OpenLDAP

2022-11-01 Thread glaubitz at physik dot fu-berlin.de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107498 --- Comment #3 from John Paul Adrian Glaubitz --- Created attachment 53814 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53814=edit Pre-processed source of mdb.c (gzip-compressed) Source code file in OpenLDAP git tree is

[Bug middle-end/107498] Wrong optimization leads to unaligned access when compiling OpenLDAP

2022-11-01 Thread jrtc27 at jrtc27 dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107498 --- Comment #2 from Jessica Clarke --- #define mp_lowermp_pb.pb.pb_lower #define mp_uppermp_pb.pb.pb_upper #define mp_pagesmp_pb.pb_pages union { struct { indx_t

[Bug middle-end/107498] Wrong optimization leads to unaligned access when compiling OpenLDAP

2022-11-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107498 --- Comment #1 from Andrew Pinski --- Can you attach the preprocessed source for the file which is failing? And give the exact commands you used to compile it? Note this could still be a bug in the sources of openldap where the alignment of