public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/21568] New: [3.4 regression] Casts in folding *& omitted
@ 2005-05-14 14:09 rguenth at gcc dot gnu dot org
  2005-05-14 16:32 ` [Bug tree-optimization/21568] [4.0/4.1 " pinskia at gcc dot gnu dot org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-05-14 14:09 UTC (permalink / raw)
  To: gcc-bugs

For the testcase

int x;
int foo(void)
{
        x = 0;
        return *(volatile int *)&x;
}

the tree-optimizers omit the volatile cast and cprop 0 to the
return statement which is invalid.  This is a regression from
3.4 where we produced (with -O)

foo:
        pushl   %ebp
        movl    %esp, %ebp
        movl    $0, x
        movl    x, %eax
        popl    %ebp
        ret

and now

foo:
        pushl   %ebp
        movl    %esp, %ebp
        movl    $0, x
        movl    $0, %eax
        popl    %ebp
        ret

-- 
           Summary: [3.4 regression] Casts in folding *& omitted
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2005-07-08  9:18 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-14 14:09 [Bug tree-optimization/21568] New: [3.4 regression] Casts in folding *& omitted rguenth at gcc dot gnu dot org
2005-05-14 16:32 ` [Bug tree-optimization/21568] [4.0/4.1 " pinskia at gcc dot gnu dot org
2005-05-21 13:50 ` rguenth at gcc dot gnu dot org
2005-05-21 17:31 ` schlie at comcast dot net
2005-05-21 18:10 ` debian-gcc at lists dot debian dot org
2005-05-21 20:48 ` schlie at comcast dot net
2005-07-02 16:48 ` pinskia at gcc dot gnu dot org
2005-07-03  4:55 ` gcc2eran at tromer dot org
2005-07-03  5:52 ` pinskia at gcc dot gnu dot org
2005-07-03  6:50 ` gcc2eran at tromer dot org
2005-07-03 12:12 ` gcc2eran at tromer dot org
2005-07-03 17:33 ` schlie at comcast dot net
2005-07-06 18:42 ` gcc2eran at tromer dot org
2005-07-08  0:41 ` wilson at specifix dot com
2005-07-08  9:18 ` gcc2eran at tromer 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).