This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH c/4.2] Fix PR c/27273
- From: Dirk Mueller <dmuell at gmx dot net>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 18 May 2006 01:40:34 +0200
- Subject: [PATCH c/4.2] Fix PR c/27273
Hi,
we were running into a tree check failure while due to passing all INTEGER_CST
expressions to TREE_CONSTANT_OVERFLOW, while it can only handle those that
match CONSTANT_CLASS_P.
Bootstrapped, regtested with no additional failures on i686-suse-linux.
2006-05-18 Dirk Mueller <dmueller@suse.de>
PR c/27273
* c-common.c (convert_and_check): Only track TREE_OVERFLOW
for CONSTANT_CLASS_P expressions.
--- c-common.c (revision 113869)
+++ c-common.c (working copy)
@@ -1077,7 +1077,7 @@ convert_and_check (tree type, tree expr)
tree t = convert (type, expr);
if (TREE_CODE (t) == INTEGER_CST)
{
- if (TREE_OVERFLOW (t))
+ if (TREE_OVERFLOW (t) && CONSTANT_CLASS_P (expr))
{
TREE_OVERFLOW (t) = 0;