This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
fix 23312
- From: Richard Henderson <rth at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 11 Aug 2005 10:14:24 -0700
- Subject: fix 23312
We use gimplify_one_sizepos for TYPE_MIN/MAX_VALUE as well,
which may have ENUMERAL_TYPE.
r~
* gimplify.c (gimplify_one_sizepos): Check for INTEGER_TYPE
before using TYPE_IS_SIZETYPE.
Index: gimplify.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gimplify.c,v
retrieving revision 2.144
diff -u -p -d -r2.144 gimplify.c
--- gimplify.c 8 Aug 2005 21:38:24 -0000 2.144
+++ gimplify.c 11 Aug 2005 17:11:32 -0000
@@ -4634,7 +4634,9 @@ gimplify_one_sizepos (tree *expr_p, tree
type-stripping code with this knowledge because it doesn't matter
for the bulk of GENERIC/GIMPLE. It only matters that TYPE_SIZE_UNIT
and friends retain their "sizetype-ness". */
- if (TREE_TYPE (expr) != type && TYPE_IS_SIZETYPE (type))
+ if (TREE_TYPE (expr) != type
+ && TREE_CODE (type) == INTEGER_TYPE
+ && TYPE_IS_SIZETYPE (type))
{
tree tmp;