Generating gimple code with gimple_build_assign
Steve Ellcey
sellcey@imgtec.com
Fri Apr 10 07:30:00 GMT 2015
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
More information about the Gcc
mailing list