------- Comment #1 from rguenth at gcc dot gnu dot org 2009-12-31 16:50 ------- Hum. Looks like the C FE somehow munges the uLL constant.
c_parser_cast_expression (parser=0xb77b0b44, after=0x0) at /home/richard/src/trunk/gcc/c-parser.c:5000 (gdb) call c_parser_peek_token (parser) $8 = (c_token *) 0xb77b0b44 (gdb) p *$8 $9 = {type = CPP_NUMBER, id_kind = C_ID_NONE, keyword = RID_MAX, pragma_kind = PRAGMA_NONE, value = 0xb77a3750, location = 479} (gdb) p $8->value $10 = (tree) 0xb77a3750 (gdb) call debug_tree ($10) <integer_cst 0xb77a3750 type <integer_type 0xb7742480 long long unsigned int> constant 0x100000000> thus ok from the lexer, but Run till exit from #0 c_parser_binary_expression (parser=0xb77b0b44, after=0x0) at /home/richard/src/trunk/gcc/c-parser.c:4984 0x0818a327 in c_parser_conditional_expression (parser=0xb77b0b44, after=0x0) at /home/richard/src/trunk/gcc/c-parser.c:4645 4645 cond = c_parser_binary_expression (parser, after); Value returned is $16 = {value = 0xb7740740, original_code = GE_EXPR, original_type = 0x0} (gdb) call debug_tree ($16->value) <ge_expr 0xb7740740 type <integer_type 0xb77422a0 int public SI size <integer_cst 0xb772e258 constant 32> unit size <integer_cst 0xb772e090 constant 4> align 32 symtab 0 alias set -1 canonical type 0xb77422a0 precision 32 min <integer_cst 0xb772e210 -2147483648> max <integer_cst 0xb772e228 2147483647> pointer_to_this <pointer_type 0xb7742c00>> arg 0 <c_maybe_const_expr 0xb7740720 type <integer_type 0xb7742300 unsigned int public unsigned SI size <integer_cst 0xb772e258 32> unit size <integer_cst 0xb772e090 4> align 32 symtab 0 alias set -1 canonical type 0xb7742300 precision 32 min <integer_cst 0xb772e270 0> max <integer_cst 0xb772e240 4294967295> pointer_to_this <pointer_type 0xb774d360>> arg 1 <nop_expr 0xb77b0c08 type <integer_type 0xb7742300 unsigned int> arg 0 <var_decl 0xb77b1000 ffff8000>>> arg 1 <integer_cst 0xb77a37e0 type <integer_type 0xb7742300 unsigned int> constant 2147483648> t.c:4:18> here the constant is alrady munged and thus the promotion doesn't happen. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jsm28 at gcc dot gnu dot org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords| |wrong-code Last reconfirmed|0000-00-00 00:00:00 |2009-12-31 16:50:18 date| | Version|unknown |4.4.3 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42544