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] Overhaul __builtin_constant_p processing (take 2)


> extern void foo (int b)
> {
>   int c = 0;
>   int a = 10;
>   while (c++ < b)
>     ((a) > 20000 ? undef () : bar (a));
> }
> 
> i.e. the failure has absolutely nothing to do with __builtin_constant_p,
> but is caused by GCC's inability to propagate the constant "a" into the
> comparison.  This is triggered on PA and H8300 because the backend,
> doesn't provide patterns that have comparison against immediate constant.

Shouldn't this be turned into a testcase?

Thanks for the detailed explanation,
Dave
-- 
J. David Anglin                                  dave dot anglin at nrc-cnrc dot gc dot ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)


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