public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/14092] New: fold strips conversion from pointer to integer
@ 2004-02-10  9:26 bonzini at gnu dot org
  2004-02-10  9:27 ` [Bug middle-end/14092] " bonzini at gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: bonzini at gnu dot org @ 2004-02-10  9:26 UTC (permalink / raw)
  To: gcc-bugs

In the attached test case, fold invalidly changes this tree: 
 
---- 
 <negate_expr 0x402012e4 
    type <integer_type 0x401604a4 int SI 
        size <integer_cst 0x4015e21c constant 32> 
        unit size <integer_cst 0x4015e2a8 constant 4> 
        align 32 symtab 0 alias set -1 precision 32 min <integer_cst 
0x4015e280 -2147483648> max <integer_cst 0x4015e294 2147483647> 
        pointer_to_this <pointer_type 0x40166ca8>> 
 
    arg 0 <nop_expr 0x402012a8 type <integer_type 0x401604a4 int> 
 
        arg 0 <plus_expr 0x40168300 type <pointer_type 0x4020206c> 
 
            arg 0 <nop_expr 0x4020126c type <pointer_type 0x4020206c> 
 
                arg 0 <non_lvalue_expr 0x4020121c type <pointer_type 
0x401ffd80> 
                    arg 0 <parm_decl 0x401ffdec plci>>> 
            arg 1 <integer_cst 0x40201258 constant 1>>>> 
---- 
 
to this tree: 
 
---- 
<minus_expr 0x40168318 
    type <pointer_type 0x4020206c 
        type <array_type 0x401ffbd0 type <integer_type 0x401602f4 unsigned 
char> 
            QI 
            size <integer_cst 0x4015e8fc constant 8> 
            unit size <integer_cst 0x4015e7d0 constant 1> 
            align 8 symtab 0 alias set -1 domain <integer_type 0x4016a360> 
            pointer_to_this <pointer_type 0x4020206c>> 
        unsigned SI 
        size <integer_cst 0x4015e7e4 constant 32> 
        unit size <integer_cst 0x4015e834 constant 4> 
        align 32 symtab 0 alias set -1> 
 
    arg 0 <integer_cst 0x402012f8 type <pointer_type 0x4020206c> constant 
4294967295> 
    arg 1 <nop_expr 0x4020126c type <pointer_type 0x4020206c> 
 
        arg 0 <non_lvalue_expr 0x4020121c type <pointer_type 0x401ffd80> 
            arg 0 <parm_decl 0x401ffdec plci>>>> 
---- 
 
the type is wrong: the former is an integer, the latter is a pointer. 
 
I'm CCing Roger because I suspect it is caused by his fold_convert changes 
(did not try it though).

-- 
           Summary: fold strips conversion from pointer to integer
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bonzini at gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,roger at eyesopen dot
                    com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14092


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-02-16  5:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-10  9:26 [Bug middle-end/14092] New: fold strips conversion from pointer to integer bonzini at gnu dot org
2004-02-10  9:27 ` [Bug middle-end/14092] " bonzini at gnu dot org
2004-02-10  9:31 ` bonzini at gnu dot org
2004-02-10 11:31 ` [Bug middle-end/14092] [3.5 Regression] " pinskia at gcc dot gnu dot org
2004-02-10 13:41 ` cvs-commit at gcc dot gnu dot org
2004-02-10 15:52 ` pinskia at gcc dot gnu dot org
2004-02-16  5:15 ` cvs-commit at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).