[LTO][PATCH] Fix for random memory corruption

Diego Novillo dnovillo@google.com
Tue Sep 2 21:40:00 GMT 2008


On Tue, Sep 2, 2008 at 08:02, Simon Baldwin <simonb@google.com> wrote:

> gcc/lto/ChangeLog
> 2008-09-02  Simon Baldwin  <simonb@google.com>
>
>        * lto-lang.c (signed_and_unsigned_types): Split into two separate
>        and distinct growable vectors.
>        (lto_type_for_size): Use new vectors to cache types.

Thanks, though I think we don't really need these vectors.  This was
originally modeled after the treelang interface, but we really are
better served by what the C front end does (the type system will be
initially modeled after C/C++).  I've committed this variant that
simply returns common nodes for each supported size.

This fixes these tests in the x86_64 testsuite:

         FAIL: gcc.c-torture/execute/20020108-1.c compilation
         FAIL: gcc.c-torture/execute/20030323-1.c compilation
         FAIL: gcc.c-torture/execute/20040629-1.c compilation
         FAIL: gcc.c-torture/execute/20040705-1.c compilation
         FAIL: gcc.c-torture/execute/20040705-2.c compilation
         FAIL: gcc.c-torture/execute/20040709-1.c compilation
         FAIL: gcc.c-torture/execute/20040709-2.c compilation
         FAIL: gcc.c-torture/execute/builtin-bitops-1.c compilation
         FAIL: gcc.dg/torture/builtin-attr-1.c  -O2 -flto  (test for
excess errors)

It also fixes a large number of regressions in the i686 testsuite.
The patch also initializes libcpp's linemap so that we can call
gcc_assert during LTO initialization.

Bootstrapped and tested on x86 and i686.


Diego
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 20080902-fix-lto_type_for_size.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080902/3dadd52d/attachment.txt>


More information about the Gcc-patches mailing list