Hi All,
Ok I found a problem in gcc/expr.c where fold_single_bit_test was returning NULL_TREE and
this was causing expand_expr_real to seg fault,
I put this patch into gcc/expr.c although I expect its a problem in
gcc/fold-expr.c
Any ideas from anyone?
I now have another problem to look into with compiling my code....
Regards,
--
Peter Jansen
STS
Australian Antarctic Division
--- gcc-3.4.3-orig/gcc/expr.c 2004-05-28 05:35:17.000000000 +1000
+++ gcc-3.4.3/gcc/expr.c 2004-11-19 12:30:30.702097064 +1100
@@ -9581,9 +9581,15 @@
&& integer_pow2p (TREE_OPERAND (arg0, 1)))
{
tree type = (*lang_hooks.types.type_for_mode) (mode, unsignedp);
- return expand_expr (fold_single_bit_test (code == NE ? NE_EXPR : EQ_EXPR,
- arg0, arg1, type),
- target, VOIDmode, EXPAND_NORMAL);
+
+ tem = fold_single_bit_test (code == NE ? NE_EXPR : EQ_EXPR, arg0, arg1,
type);
+
+ if (tem == NULL_TREE)
+ return 0;
+
+ result = expand_expr (tem, target, VOIDmode, EXPAND_NORMAL);
+
+ return result;
}
/* Now see if we are likely to be able to do this. Return if not. */