This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/23383] New: builtin array operator new is not marked with malloc attribute
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Aug 2005 05:39:16 -0000
- Subject: [Bug c++/23383] New: builtin array operator new is not marked with malloc attribute
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Testcase:
int f(void)
{
int t;
int *a = new int[1024];
int *b = new int[1024];
*a = 1;
*b = 2;
t = *a;
delete a;
delete b;
return t;
}
the return is not turned into 1 but still have "return t" in the final_cleanup.
--
Summary: builtin array operator new is not marked with malloc
attribute
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23383