This is the mail archive of the gcc@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: Generating gimple code with gimple_build_assign


On Tue, 2015-04-07 at 10:31 +0200, Richard Biener wrote:

> > Is ADDR_EXPR the right way to get the address of the array instead of
> > the value in a gimple_build_assign call?
> 
> ADDR_EXPR is one of the "single-rhs" tree codes so you need to build
> a GENERIC expression here:
> 
>   stmt = gimple_build_assing (ptr_var, build_fold_addr_expr (array_var));
> 
> Richard.
> 
> >
> > Steve Ellcey
> > sellcey@imgtec.com

Thanks for the help Richard, that worked.

Steve Ellcey
sellcey@imgtec.com


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