valid_gimple_expression_p claims validity of invalid gimple

Daniel Berlin
Sat Jul 14 02:16:00 GMT 2007

is really caused by a combination of two things

First is_gimple_min_invariant in try_to_simplify where it chooses
DECL_INITIAL should be valid_gimple_expression_p instead.

However, even if i fix this, the testcase still fails because
valid_gimple_expression says something that is clearly invalid is

(gdb) p valid_gimple_expression_p ($2)
$3 = 1 '\001'
(gdb) p debug_generic_stmt ($2)
&((struct RegisterLayout *) (char *) &SimulatedRegisters)->intmask;

This is not valid gimple by a longshot :)

If you fix this part, i'll happily fix the bug report with the first part.

More information about the Gcc mailing list