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] Fix for PR c/57490



> -----Original Message-----
> From: Jason Merrill [mailto:jason@redhat.com]
> Sent: Monday, August 19, 2013 2:23 PM
> To: Iyer, Balaji V; Rainer Orth
> Cc: Jakub Jelinek; gcc-patches@gcc.gnu.org; Marek Polacek
> (polacek@redhat.com)
> Subject: Re: [PATCH] Fix for PR c/57490
> 
> On 08/19/2013 12:40 PM, Iyer, Balaji V wrote:
> > +  /* If it is a built-in array notation function, then the return type of
> > +     the function is the element type of the array passed in as array
> > +     notation (i.e. the first parameter of the function).  */  if
> > + (flag_enable_cilkplus && TREE_CODE (fn) == CALL_EXPR)
> ...
> 
> Let's move this a bit higher in the function, to...
> 
> >   /* Check that arguments to builtin functions match the expectations.  */
> >   if (fndecl
> >       && DECL_BUILT_IN (fndecl)
> >       && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL
> >       && !check_builtin_function_arguments (fndecl, nargs, argarray))
> >     return error_mark_node;
> 
> ...here.
> 

I made the change.

> >   /* Some built-in function calls will be evaluated at compile-time in
> >      fold ().  Set optimize to 1 when folding __builtin_constant_p inside
> >      a constexpr function so that fold_builtin_1 doesn't fold it to 0.
> > */
> 
> OK with that change.
> 

and committed the Change to trunk (SVN revision: r201867).

Thanks,

Balaji V. Iyer.

> Jason


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