This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/65408] powerpc64 function argument passing may access invalid memory
- From: "amodra at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 18 Mar 2015 11:07:27 +0000
- Subject: [Bug target/65408] powerpc64 function argument passing may access invalid memory
- Auto-submitted: auto-generated
- References: <bug-65408-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65408
--- Comment #6 from Alan Modra <amodra at gmail dot com> ---
Code quality for both powerpc64le and x86_64 looks passable for the testcase
here and other structs with at least one int field (ie. when the struct size is
a multiple of 4, and alignment is 4). You get DImode loads followed by an
SImode load if the struct isn't a multiple of 8 in size.
Code quality does suffer a little for big-endian since any SImode load at the
end of the struct needs to be shifted, whereas a DImode loading past the end of
the struct needs no shifting.
For cases where the struct size isn't a multiple of 4, code quality certainly
does suffer, worst case being a struct of size 7 that would now be loaded by 7
byte loads.. Should we care more about that than a segfault in real-world user
code? Hmm. Answering my own question, I guess that since pr36043 is nearly
seven years old, we don't care too much about segfaults!