This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Overhaul __builtin_constant_p processing (take 2)
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: roger at www dot eyesopen dot com (Roger Sayle)
- Cc: gcc-patches at gcc dot gnu dot org, rth at redhat dot com, kazu at cs dot umass dot edu
- Date: Wed, 26 Feb 2003 17:57:58 -0500 (EST)
- Subject: 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)