This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/36043] gcc reads 8 bytes for a struct of size 6 which leads to sigsegv
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Apr 2008 14:59:27 -0000
- Subject: [Bug target/36043] gcc reads 8 bytes for a struct of size 6 which leads to sigsegv
- References: <bug-36043-5874@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from rguenth at gcc dot gnu dot org 2008-04-25 14:59 -------
Ahm, not exactly a dup of PR31309.
Shorter (non-runtime) testcase:
struct colour
{
unsigned short red;
unsigned short green;
unsigned short blue;
};
void print_colour(struct colour col);
void foo(struct colour *c)
{
print_colour(*c);
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36043