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/25737] ACATS tests c974001 and c974013 do not terminate with struct aliasing enabled



------- Comment #2 from ebotcazou at gcc dot gnu dot org  2006-03-22 09:53 -------
s-taasde.adb:Time_Enqueue is miscompiled at -O2, more specifically:

      Q := Timer_Queue.Succ;

      while Q.Resume_Time < T loop
         Q := Q.Succ;
      end loop;

      --  Q is the block that has Resume_Time equal to or greater than
      --  T. After the insertion we want Q to be the successor of D.

      D.Succ := Q;
      D.Pred := Q.Pred;
      D.Pred.Succ := D;
      Q.Pred := D;

      --  If the new element became the head of the queue,
      --  signal the Timer_Server to wake up.

      if Timer_Queue.Succ = D then
         Timer_Attention := True;
         STPO.Wakeup (Timer_Server_ID, ST.Timer_Server_Sleep);
      end if;

FRE thinks that it can propagate the value Timer_Queue.Succ has at the top of
the code down to the conditional of the test at the bottom.  Of course that's
not true since the assignment game in the middle can clobber it.

I'm further digging but does this ring a bell to you, Richard?  TIA.


-- 

ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |ebotcazou at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2006-02-05 10:28:53         |2006-03-22 09:53:52
               date|                            |


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


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