public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/54954] New: malloc optimizations not disabled by -fno-builtin
@ 2012-10-17 16:10 swalter at lexmark dot com
  2012-10-17 16:10 ` [Bug c/54954] " swalter at lexmark dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: swalter at lexmark dot com @ 2012-10-17 16:10 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54954

             Bug #: 54954
           Summary: malloc optimizations not disabled by -fno-builtin
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: swalter@lexmark.com


Consider the code:

static int foo;

void bar ()
{
    foo = 0;
    malloc();
    assert(foo);
}

foo is not reloaded after the call to malloc, even when -fno-builtin is thrown.
 This is incorrect behavior because malloc() could call back into the current
module, where foo is modified.  A full example is attached.

(Assume that malloc calls increment_count() if I can't get a second file to
attach...)


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-11-21 12:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-17 16:10 [Bug c/54954] New: malloc optimizations not disabled by -fno-builtin swalter at lexmark dot com
2012-10-17 16:10 ` [Bug c/54954] " swalter at lexmark dot com
2012-10-17 16:14 ` swalter at lexmark dot com
2012-10-18 10:12 ` rguenth at gcc dot gnu.org
2012-10-18 11:53 ` bren at ragh dot us
2012-10-18 13:41 ` swalter at lexmark dot com
2013-11-20  0:58 ` pinskia at gcc dot gnu.org
2013-11-20 13:46 ` swalter at lexmark dot com
2013-11-20 18:06 ` pinskia at gcc dot gnu.org
2013-11-21 12:05 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).