This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/38789] [4.4 Regression] __builtin_constant_p appears to eveluate to true for non-constant arguments.
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jan 2009 21:51:12 -0000
- Subject: [Bug tree-optimization/38789] [4.4 Regression] __builtin_constant_p appears to eveluate to true for non-constant arguments.
- References: <bug-38789-7151@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from rguenth at gcc dot gnu dot org 2009-01-09 21:51 -------
I wouldn't consider this a bug. It's similar to
inline void foo(int i) { if (__builtin_constant_p (i)) you_loose(); }
void bar()
{
foo (1);
foo (2);
}
where the code is duplicated twice and both cases are constant.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38789