[Bug middle-end/49671] [4.6/4.7 Regression] volatile goes missing after inlining

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jul 7 22:49:00 GMT 2011


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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011.07.07 22:48:48
         AssignedTo|unassigned at gcc dot       |pinskia at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-07-07 22:48:48 UTC ---
Note the following is also broken:
int t;
static inline int cvmx_atomic_get32(int *ptr)
{
    return *(volatile int*)ptr;
}
void f(void)
{
  while (!cvmx_atomic_get32(&t))
    ;
}
--- CUT ----
But that is caused by IPA-SRA.
I have a fix for both issues.



More information about the Gcc-bugs mailing list