[Bug rtl-optimization/20359] [3.3/3.4 regression] Incorrect code with global register variables

belyshev at depni dot sinp dot msu dot ru gcc-bugzilla@gcc.gnu.org
Mon Mar 7 17:28:00 GMT 2005


------- Additional Comments From belyshev at depni dot sinp dot msu dot ru  2005-03-07 17:28 -------
Confirmed.

-------------------------------------------------------------------------------
/* { dg-do run { targets i?86-*-* || x86_64-*-* || powerpc*-*-* } } */
/* { dg-options "-O1" } */

void abort (void);
void exit (int);

#if defined __x86_64__ || defined __powerpc__
register void (*r)(void) asm("%r13");
#elif defined __i386__
register void (*r)(void) asm("%esi");
#endif

void g ()
{
  if (r != g)
    abort ();
  else
    exit (0);
}

int main ()
{
  r = g;
  goto *r;
}
-------------------------------------------------------------------------------

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
  GCC build triplet|x86_64-*-linux              |
   GCC host triplet|x86_64-*-linux              |
 GCC target triplet|x86_64-*-linux              |
      Known to fail|                            |3.3.5 3.4.4
      Known to work|4.0.0                       |4.0.0 3.2.3
   Last reconfirmed|0000-00-00 00:00:00         |2005-03-07 17:28:46
               date|                            |
            Summary|Incorrect code with global  |[3.3/3.4 regression]
                   |register variables          |Incorrect code with global
                   |                            |register variables
   Target Milestone|---                         |3.4.4


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



More information about the Gcc-bugs mailing list