This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/42821] New: [4.5 Regression] TCL is miscompiled
- 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: 21 Jan 2010 10:54:31 -0000
- Subject: [Bug tree-optimization/42821] New: [4.5 Regression] TCL is miscompiled
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
TCL is miscompiled in TraceVariableObjCmd wrt fortification. Testcase:
struct X {
void *p;
struct {
char s[4];
} y;
};
void * __attribute__((noinline,noclone))
myalloc (unsigned int sz)
{
return __builtin_malloc (sz);
}
int main()
{
struct X *p = myalloc (sizeof (struct X)
+ sizeof ("Hello World") + 1 - sizeof (p->y.s));
__builtin___strcpy_chk (p->y.s, "Hello World",
__builtin_object_size (p->y.s, 1));
return 0;
}
GCC 4.4 accepted growing the tail buffer just fine.
--
Summary: [4.5 Regression] TCL is miscompiled
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42821