[Bug c/15438] [3.5 Regression] miscompilation with attribute (__malloc__)
belyshev at lubercy dot com
gcc-bugzilla@gcc.gnu.org
Sun May 16 19:03:00 GMT 2004
------- Additional Comments From belyshev at lubercy dot com 2004-05-15 16:25 -------
Created an attachment (id=6305)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6305&action=view)
testcase (223 bytes)
I think this one clarifies situation:
cat > bug.i << EOF
int a;
void __attribute__ ((malloc)) *foo ()
{
a = 1;
}
int main (void)
{
int *p = &a;
*p = 0;
foo ();
if (!*p)
abort ();
return 0;
}
EOF
gcc bug.i -O
./a.out
Aborted
--
What |Removed |Added
----------------------------------------------------------------------------
Attachment #6287 is|0 |1
obsolete| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15438
More information about the Gcc-bugs
mailing list