This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/16721] [4.0 Regression] Accesses to volatile objects optimized away
- From: "dnovillo at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Sep 2004 16:13:57 -0000
- Subject: [Bug tree-optimization/16721] [4.0 Regression] Accesses to volatile objects optimized away
- References: <20040726181156.16721.macro@linux-mips.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From dnovillo at gcc dot gnu dot org 2004-09-22 16:13 -------
I still see the load from p->addr in the .optimized dump. And the load seems to
be there in the assembly output.
Is this still a problem?
$ gcc/cc1 -O2 -fdump-tree-all-vops 16721.c
$ diff -y -W 80 16721.c.t03.generic 16721.c.t62.vars
test () test ()
{ {
struct data * p.0; <
volatile long unsigned int * D.1470 <
long unsigned int vol.1; long unsigned int vol.1;
int D.1472; | volatile long unsigned int * D.1470
p.0 = p; | <bb 0>:
D.1470 = p.0->addr; | # VUSE <TMT.2_7>;
> D.1470 = p->addr;
vol.1 = *D.1470; vol.1 = *D.1470;
D.1472 = 0; | return 0;
return D.1472; |
} }
$ gcc/cc1 --version
GNU C version 4.0.0 20040920 (experimental) (x86_64-unknown-linux-gnu)
compiled by GNU C version 4.0.0 20040920 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16721