This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
ICE on gcc 3.4.3 mips64-elf
- From: Khem Raj <raj dot khem at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 27 Apr 2005 11:30:13 -0700
- Subject: ICE on gcc 3.4.3 mips64-elf
- Reply-to: Khem Raj <raj dot khem at gmail dot com>
Hi
mips64-elf GCC built from gcc-3_4-branch ICEed on the following testcase
static void foo ( int arg){
unsigned long long int __attribute__ ((aligned (4))) aligned_array[arg];
unsigned long long int *bak = aligned_array;
}
It seems that the alignment of aligned_array is less than required by its type
so while creating a local copy of operand it fails because the
expression is not of type INTEGER_CST
I did a fix to do the copy only if it is of type INTEGER_CST.
tested on mips64-sim with no regressions.
Same ICE happens on arm-eabi. I think it will happen for target having
HOST_WIDE_INT=64. The ICE does not happen on mainline or gcc4.0
Is this problem fixed already or is there any other fix for the same
Thanks and regards
Khem
Index: expr.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/expr.c,v
retrieving revision 1.615.4.19
diff -u -r1.615.4.19 expr.c
--- expr.c 19 Dec 2004 20:01:27 -0000 1.615.4.19
+++ expr.c 27 Apr 2005 17:19:17 -0000
@@ -8885,7 +8885,8 @@
if (STRICT_ALIGNMENT && GET_MODE (op0) == BLKmode
&& (TYPE_ALIGN (TREE_TYPE (TREE_OPERAND (exp, 0)))
> MEM_ALIGN (op0))
- && MEM_ALIGN (op0) < BIGGEST_ALIGNMENT)
+ && MEM_ALIGN (op0) < BIGGEST_ALIGNMENT
+ && TREE_CODE ( TREE_TYPE (TREE_OPERAND (exp, 0))) == INTEGER_CST)
{
tree inner_type = TREE_TYPE (TREE_OPERAND (exp, 0));
rtx new;