[Bug middle-end/50700] New: [4.6/4.7 Regression] __builtin_object_size computed wrong
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Oct 12 09:56:00 GMT 2011
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;
}
More information about the Gcc-bugs
mailing list