http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47197

--- Comment #2 from joseph at codesourcery dot com <joseph at codesourcery dot 
com> 2012-04-23 21:46:23 UTC ---
On Wed, 18 Apr 2012, wschmidt at gcc dot gnu.org wrote:

> Joseph, could you please take a look?  Or let me know if you think it's not a
> front end problem.

In rs6000-c.c, when you put an argument inside a CALL_EXPR or SAVE_EXPR as 
part of resolving an AltiVec built-in function, you need to use 
c_fully_fold because subsequent calls to c_fully_fold won't look inside 
that expression.  In such a case, you can do

  bool maybe_const = true;
  if (!c_dialect_cxx ())
    expr = c_fully_fold (expr, false, &maybe_const);

before using the new value of expr (and ignore whatever value maybe_const 
may have been set to).

Reply via email to