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]

Re: optimization/5040: g++-3.0.2: -O causes variables from differentstack frames to overlap


On 4 Apr 2002 rth@gcc.gnu.org wrote:

>     Can't reproduce with unpatched 3.0.3 or 3.1; as yet, the
>     bug can only be shown vs Mandrake rpms.

OK, on the Mandrake side I could isolate the problem to the following
patch:

  - Patch604: Change heuristic for inlining of functions in C++:
    Rather than allowing one single function to exhaust the limit,
    allow only half way. Afterwards don't cut abruptly, but get more
    and more restrictive until a minimum size. This gives better
    runtime and compiletime results than the old heuristic.
    (Kurt Garloff, SuSE release 3.0.X-34)

However, the problem is also reproductible with the unpatched FSF gcc
3.0.5 20020404 (prerelease) as follows:

Jeremy's second test case will crash if compiled as
-O<X> -finline-limit=399, with X = { 1, 2 }

But will succeed with -finline-limit >= 400.

Jakub, hadn't you encountered a glibc miscompilation with gcc-3.1 when the
-finline-limit was too low and the tree inliner used? Could it be related
to this problem?

>     Re-open or create a new PR when you get a chance to try
>     your complete application vs gcc 3.1.

Is the new data enough to re-open or create a new PR?

Bye,
Gwenole.


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