This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/36043] gcc reads 8 bytes for a struct of size 6 which leads to sigsegv


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36043

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|x86_64-unknown-linux-gnu    |x86_64-unknown-linux-gnu,
                   |                            |i?86-*-*
          Component|target                      |middle-end
      Known to fail|                            |2.95.2

--- Comment #16 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-28 11:57:36 UTC ---
Also broken at least since GCC 2.95 on i?86 with

struct colour
{
  unsigned char red;
  unsigned char green;
  unsigned char blue;
};

void print_colour(struct colour col) __attribute__((regparm(3)));

void
foo(struct colour *c)
{
  print_colour(*c);
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]