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, ARM] Fix PR45447


Richard Guenther wrote:
> On Thu, Sep 30, 2010 at 1:10 PM, Yao Qi <yao@codesourcery.com> wrote:
>> We created a struct type for va_list to follow ARM ABI, but TREE_CHAIN
>> (va_list_type) is *not* set properly.  This problem causes segmentation
>> fault reported in PR45447.
>>
>> This patch is to address this problem.  Regression test for
>> arm-none-linux-gnueabi is still running.  OK to trunk/4.5/4.4 if no
>> regression?
> 
> Err - why do you think assigning to TREE_CHAIN makes sense?

Because 1) TYPE_STUB_DECL and TREE_CHAIN is the same thing, defined in
tree.h,

  #define TYPE_STUB_DECL(NODE) TREE_CHAIN (NODE)

2) TREE_CHAIN is used also for the similar purpose in i386.c:
ix86_build_builtin_va_list_abi()
  TREE_CHAIN (record) = type_decl;

> I think you want to use TYPE_STUB_DECL instead.
> 

Are they different? or I may miss something.

-- 
Yao Qi
CodeSourcery
yao@codesourcery.com
(650) 331-3385 x739


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