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/20188] [4.0 Regression] asm and memory operands does not add a V_MAY_DEF


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-25 05:15 -------
I think the patch for PR 19633 caused this bug.
For the code below which is just a modifed version:
void link_error();
struct aa
{
  char a[10];
};
void f(char *a)
{
  struct aa *a1 = (struct aa *)a;
  if (*a == 0)
   asm("":"=m"(*a1));
  if (*a ==0)
   link_error ();
}
int main(void)
{
  char a = 0;
  f(&a);
}

We get before (20050113):
a1_2, is dereferenced, points-to anything

After:
a1_2, its value escapes, points-to anything


This is wrong, its value does not escape but is dereferenced in the asm.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical
           Priority|P2                          |P1


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


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