GNU bug report logs -
#76559
31.0.50; [-O3 + PGTK] Crash when 'copying as kill'/'killing word'
Previous Next
Full log
Message #110 received at 76559 <at> debbugs.gnu.org (full text, mbox):
"Po Lu" <luangruo <at> yahoo.com> writes:
> Pip Cet <pipcet <at> protonmail.com> writes:
>
>> My understanding is it is safe to access an entire union at once, as the
>> old code did, and that GCC concluded based on the undefined behavior
>> elsewhere that the only possible union members were those with the holes
>> in the right place.
>
> BTW, if so, how do you explain this reproducer? At no point in the
> code's execution is hold_quit ever read or written to.
That does seem to be an actual bug, where SRA does the wrong thing if a
function is marked with __attribute__ ((optimize (0))). At first glance
(-fdump-tree-sra-details) it seems like the whole-structure access in
that function is ignored, which makes sense if the SRA pass isn't run
for a non-optimized function but still assumes it has looked at all
accesses.
So we should definitely report this (after reducing to a single file and
fixing the prototypes), and any of our suspicions about wrong behavior
for other code.
Please let us know the GCC bug number(s).
Pip
This bug report was last modified 108 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.