[Bug tree-optimization/19786] [4.0 Regression] Aliasing optimisation bug

jakub at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Feb 17 03:30:00 GMT 2005


------- Additional Comments From jakub at gcc dot gnu dot org  2005-02-16 20:04 -------
I wonder if this has something to do with the dereference done through
int * const &.
This is the read from r->v._M_impl._M_finish in the loop.
            D.16053 = &r.52D.16052->vD.11757;
            {
              struct vector<int,std::allocator<int> >D.11215 * const thisD.16479;
              thisD.16479 = D.16053;
              {
                  struct vector<int,std::allocator<int> >D.11215 * const
thisD.16488;
                  thisD.16488 = thisD.16479;
                  {
                    intD.2 * * D.16491;
                    D.16491 =
&thisD.16488->D.11755._M_implD.11232._M_finishD.11380;
                    {
                      intD.2 * const & __iD.16492;
                      __iD.16492 = D.16491;
                      {
                        intD.2 * const D.16494;
                        D.16494 = *__iD.16492;
And is changed within the same loop:
      struct vector<int,std::allocator<int> >D.11215 * D.16053;
            D.16053 = &r.52D.16052->vD.11757;
              struct vector<int,std::allocator<int> >D.11215 * const thisD.16430;
              thisD.16430 = D.16053;
              {
                intD.2 * D.16432;
                intD.2 * D.16433;
                D.16432 = thisD.16430->D.11755._M_implD.11232._M_finishD.11380;
                D.16433 = D.16432 - 4B;
                thisD.16430->D.11755._M_implD.11232._M_finishD.11380 = D.16433;
                D.16432 = thisD.16430->D.11755._M_implD.11232._M_finishD.11380;

But the pointer is really const only in the block that it defines, not in the
whole function.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at redhat dot com
         AssignedTo|jakub at gcc dot gnu dot org|unassigned at gcc dot gnu
                   |                            |dot org
             Status|ASSIGNED                    |NEW


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



More information about the Gcc-bugs mailing list