------- Comment #7 from rguenth at gcc dot gnu dot org 2005-10-21 12:11 ------- The problem is we didn't fold
arg 0 <nop_expr 0x4025a3ac type <integer_type 0x40027654 unsigned int> readonly arg 0 <integer_cst 0x4025a154 constant 1>> which originates from build_binary_op() where default_conversion converts <parm_decl 0x40251c3c i type <integer_type 0x40251bd0 unsigned int readonly unsigned SI size <integer_cst 0x40025208 constant 32> unit size <integer_cst 0x40025294 constant 4> align 32 symtab 0 alias set -1 precision 32 min <integer_cst 0x400252d0 0> max <integer_cst 0x400252e4 4294967295>> readonly unsigned used SI file bug.cpp line 8 size <integer_cst 0x40025208 32> unit size <integer_cst 0x40025294 4> align 32 context <function_decl 0x40251d80 f> initial <integer_type 0x40251bd0 unsigned int> arg-type <integer_type 0x40251bd0 unsigned int>> to <nop_expr 0x402567e4 type <integer_type 0x40027654 unsigned int unsigned SI size <integer_cst 0x40025208 constant 32> unit size <integer_cst 0x40025294 constant 4> align 32 symtab 0 alias set -1 precision 32 min <integer_cst 0x400252d0 0> max <integer_cst 0x400252e4 4294967295>> readonly arg 0 <parm_decl 0x40251c3c i type <integer_type 0x40251bd0 unsigned int readonly unsigned SI size <integer_cst 0x40025208 32> unit size <integer_cst 0x40025294 4> align 32 symtab 0 alias set -1 precision 32 min <integer_cst 0x400252d0 0> max <integer_cst 0x400252e4 4294967295>> readonly unsigned used SI file bug.cpp line 8 size <integer_cst 0x40025208 32> unit size <integer_cst 0x40025294 4> align 32 context <function_decl 0x40251d80 f> initial <integer_type 0x40251bd0 unsigned int> arg-type <integer_type 0x40251bd0 unsigned int>>> i.e. (const unsigned int)i where i is already unsigned int. We later don't fold after inlining and parameter substitution. I'll test the papering-over. Not worth a real fix. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24470