public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/50700] New: [4.6/4.7 Regression] __builtin_object_size computed wrong
@ 2011-10-12  9:56 rguenth at gcc dot gnu.org
  2011-10-12  9:57 ` [Bug middle-end/50700] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-10-12  9:56 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50700
           Summary: [4.6/4.7 Regression] __builtin_object_size computed
                    wrong
    Classification: Unclassified
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: rguenth@gcc.gnu.org


extern void abort (void);
struct S {
    int len;
    char s[0];
};
int main()
{
  char buf[sizeof (struct S) + 32];
  if (__builtin_object_size (((struct S *)&buf[0])->s, 1) != 32)
    abort ();
  return 0;
}


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-10-12 14:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-12  9:56 [Bug middle-end/50700] New: [4.6/4.7 Regression] __builtin_object_size computed wrong rguenth at gcc dot gnu.org
2011-10-12  9:57 ` [Bug middle-end/50700] " rguenth at gcc dot gnu.org
2011-10-12 13:20 ` rguenth at gcc dot gnu.org
2011-10-12 13:22 ` rguenth at gcc dot gnu.org
2011-10-12 14:27 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).