[Bug c++/117256] When initializing an object, padding bits are not set to zero

2024-11-28 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117256 Jakub Jelinek changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

[Bug c++/117256] When initializing an object, padding bits are not set to zero

2024-11-28 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117256 --- Comment #9 from GCC Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:fd62fdc5e1b3c4baf5218eedbc3c6d29861f027b commit r15-5747-gfd62fdc5e1b3c4baf5218eedbc3c6d29861f027b Author: Jakub Jelinek Date: T

[Bug c++/117256] When initializing an object, padding bits are not set to zero

2024-11-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117256 --- Comment #8 from Jonathan Wakely --- Oh sorry, I didn't notice that!

[Bug c++/117256] When initializing an object, padding bits are not set to zero

2024-11-08 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117256 --- Comment #7 from Jakub Jelinek --- I thought I've guarded that in main with if (__builtin_offsetof (A, c) == 0 && __builtin_offsetof (A, i) != 1 && __builtin_offsetof (B, a) == 0 && sizeof (A) == sizeof (B)) so the testing

[Bug c++/117256] When initializing an object, padding bits are not set to zero

2024-11-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117256 --- Comment #6 from Jonathan Wakely --- Or { target ! no_alignment_constraints } I'm not sure what's most appropriate.

[Bug c++/117256] When initializing an object, padding bits are not set to zero

2024-11-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117256 --- Comment #5 from Jonathan Wakely --- or just add { dg-require-effective-target natural_alignment_32 }

[Bug c++/117256] When initializing an object, padding bits are not set to zero

2024-11-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117256 --- Comment #4 from Jonathan Wakely --- B b1 (42, -42); __builtin_memcpy (buf, &b1, sizeof (b1)); if (buf[1]) __builtin_abort (); unsigned char m2 alignas (B) [sizeof (B)]; B *b2 = new (m2) B (1, 2); __builtin_memcpy (buf, b2, si

[Bug c++/117256] When initializing an object, padding bits are not set to zero

2024-11-07 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117256 --- Comment #3 from Jakub Jelinek --- Created attachment 59554 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59554&action=edit gcc15-pr117256.patch Untested fix on top of the above mentioned patch. This is just the start, I think for ful

[Bug c++/117256] When initializing an object, padding bits are not set to zero

2024-10-22 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117256 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #2

[Bug c++/117256] When initializing an object, padding bits are not set to zero

2024-10-22 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117256 Jonathan Wakely changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill