public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/52430] New: [4.4 Regression] firefox miscompilation
Date: Wed, 29 Feb 2012 09:47:00 -0000	[thread overview]
Message-ID: <bug-52430-4@http.gcc.gnu.org/bugzilla/> (raw)

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

             Bug #: 52430
           Summary: [4.4 Regression] firefox miscompilation
    Classification: Unclassified
           Product: gcc
           Version: 4.4.6
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jakub@gcc.gnu.org
                CC: hubicka@gcc.gnu.org, jamborm@gcc.gnu.org


The following file is miscompiled on x86_64-linux with

-quiet -fPIC  -fno-rtti -pedantic -fno-exceptions -fstack-protector --param
ssp-buffer-size=4 -m64 -mtune=generic -fpermissive -fno-exceptions
-fno-strict-aliasing -fshort-wchar -ffunction-sections -fdata-sections -Os
-freorder-blocks -fomit-frame-pointer -fpreprocessed dombindings.ii

It was "fixed" or fixed for real, not clear, by a huge
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=147852
commit which I think is unlikely backportable, at least not in full.

The problem seems to be in IPA-CP/IPA-* decisions, the growStorageBy method is
called in several places in this TU with constant 1, so IPA-CP decides to clone
things, but in the end clones just calculateNewCapacity (with implied
lengthInc=1), but doesn't clone growStorageBy, eventhough the call to
calculateNewCapacity from it call the clone that assumes lengthInc is 1.
For that TU this isn't a problem, but growStorageBy is public linkonce
function,
and when mixing it with other TUs that call growStorageBy with other
parameters, if this one wins, they ignore their last parameter and grow just by
1 instead of the desired amount.
but ends up actually cloning just


             reply	other threads:[~2012-02-29  9:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-29  9:47 jakub at gcc dot gnu.org [this message]
2012-02-29  9:51 ` [Bug tree-optimization/52430] " jakub at gcc dot gnu.org
2012-02-29 10:11 ` rguenth at gcc dot gnu.org
2012-02-29 15:35 ` jamborm at gcc dot gnu.org
2012-02-29 17:02 ` jamborm at gcc dot gnu.org
2012-03-01 12:58 ` jamborm at gcc dot gnu.org
2012-03-05 12:50 ` jamborm at gcc dot gnu.org
2012-03-05 16:06 ` jamborm at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-52430-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).