This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/38509] Bogus "attempt to free a non-heap object" warning



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]