This is the mail archive of the gcc-patches@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: PATCH: Fix PR 30666 [4.3 Regression]


[The "empty message" bug returns. Argh!]

On 3/3/07, Richard Guenther <richard.guenther@gmail.com> wrote:
On 3/3/07, Doug Gregor <doug.gregor@gmail.com> wrote:
> This little patch fixes PR tree-optimization/20336, a 4.3 regression
> where the canonical types system was failing to keep the built-in
> complex types canonical. The problem shows up as a warning now, but
> would be a crash with --disable-checking.
>
> Tested i686-pc-linux-gnu; no regressions.
>
> Okay for mainline?

Is there a reason why simply calling build_complex_type is not enough?
It looks like that will invoke layout_type and set TYPE_NAME (which
is IMHO the right thing to do).

build_complex_type was placing IDENTIFIER_NODEs into TYPE_NAME, rather than TYPE_DECLs as it should have. The attached patch fixes this problem, and uses build_complex_type directly to build the predefined complex types. Much better!

Tested i686-pc-linux-gnu; no regressions.

 Cheers,
 Doug

:ADDPATCH c:

2007-03-29 Douglas Gregor <doug.gregor@gmail.com>

       PR tree-optimization/30666
       * tree.c (build_complex_type): When creating type names for DWARF2
       debug info, create TYPE_DECLs for TYPE_NAME instead of
       IDENTIFIER_NODEs.
       (build_common_tree_nodes_2): Use build_complex_type when building
       predefined complex types, to preserve canonical types.

Attachment: complex-canon.patch
Description: Binary data


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