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]

[C++ PATCH] to reshape_init


Hello,

this patch makes reshape_init avoid using TREE_CHAIN on CONSTRUCTORs (part of
Steven's work to pull CHAINs from 'e' nodes). Basically, the input of
reshape_init can either be a CONSTRUCTOR or a TREE_LIST, and in the first case
the node is the full initializer, so there is no "next". The code was working
before because TREE_CHAIN of a CONSTRUCTOR is always NULL.

Fixed by doing an explicit check, much like reshape_init does everywhere else.
Tested on i686-pc-linux-gnu, OK for mainline?

Giovanni Bajo

cp/
        * decl.c (reshape_init): Avoid using TREE_CHAIN on CONSTRUCTORs.

Attachment: patch-reshape-init.txt
Description: Text document


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