This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix ICE in fold-const.c
- From: "Joseph S. Myers" <jsm at polyomino dot org dot uk>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: Andrew Pinski <pinskia at physics dot uc dot edu>, gcc-patches at gcc dot gnu dot org
- Date: Sun, 30 May 2004 20:41:55 +0000 (UTC)
- Subject: Re: [PATCH] Fix ICE in fold-const.c
- References: <Pine.LNX.4.44.0405170743150.707-100000@www.eyesopen.com>
On Mon, 17 May 2004, Roger Sayle wrote:
> If this doesn't also fix Joseph Myer's problems with single bit fields,
> I'd be inclined to suggest that we might also consider removing the
>
> if (TREE_CODE (TREE_TYPE (arg)) != BOOLEAN_TYPE)
> abort ();
>
> from invert_truthvalue. The middle-end rarely checks for precise
> tree types, and if the value has the correct mode that should often
> be sufficient. Indeed the above abort conflicts with the intention
> of STRIP_NOPS et al., so there may be additional ICEs still lurking
> in fold-const.c.
FWIW this ICE still occurs with the bit-field patch with Andrew's patch
now in. The current ICE has invert_truthvalue being called from
gimplify_cond_expr's /* Rewrite "if (a); else b" to "if (!a) b" */
on an expression of the form
<cond_expr 0x40b95ce4
type <void_type 0x4013c5e4 void asm_written VOID
align 8 symtab 0 alias set -1
pointer_to_this <pointer_type 0x4013c658>>
side-effects
arg 0 <var_decl 0x40ba0570 T.6621
type <integer_type 0x405b9000 unsigned QI
size <integer_cst 0x401921f8 constant invariant 8>
unit size <integer_cst 0x40192090 constant invariant 1>
...
--
Joseph S. Myers
jsm@polyomino.org.uk