[Bug middle-end/38509] Bogus "attempt to free a non-heap object" warning
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Dec 12 22:46:00 GMT 2008
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-12-12 22:42 -------
static int non_heap = 0;
<bb 2>:
if (non_heap != 0)
goto <bb 3>;
else
goto <bb 4>;
<bb 3>:
__builtin_free (&non_heap);
Hmm, since the address of non_heap is taken, we don't optimize away the
conditional.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c++ |middle-end
Keywords| |diagnostic, missed-
| |optimization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38509
More information about the Gcc-bugs
mailing list