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 c/49233] Please un-deprecate rvalues in memory constraints


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-31 05:42:05 UTC ---
Yeah,
static inline int variable_test_bit(int nr, volatile const unsigned long *addr)
{
  int oldbit;
  asm volatile("bt %2,%1\n\tsbb %0,%0" : "=r" (oldbit) : "m" (*(unsigned long
*)addr), "Ir" (nr));
  return oldbit;
}

unsigned long *a;

int
foo (int n)
{
  return variable_test_bit (n, a);
}

doesn't warn, so we need a small self-contained preprocessed testcase that
reproduces it.


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