This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/16721] [4.0 Regression] Accesses to volatile objects optimized away


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]