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/2480] aliasing problem with global structures


------- Additional Comments From dann at godzilla dot ics dot uci dot edu  2004-01-19 19:42 -------
No, tree-ssa does not help.

RTL optimizers can optimize the "foo" function in the testcase, 
the tree-ssa optimizers don't, here is the .optimized dump: 

foo (ex2)
{
<bb 0>:
  ex2->a = 1;
  ex2->b = 2;
  ex2->c = 3;
  if (ex2->a != 1) goto <L0>; else goto <L1>;

<L0>:;
  link_error ();

<L1>:;
  if (ex2->b != 2) goto <L2>; else goto <L3>;

<L2>:;
  link_error ();

<L3>:;
  if (ex2->c != 3) goto <L4>; else goto <L5>;

<L4>:;
  link_error ();

<L5>:;
  return;

}

The x86 aseembly: 

foo:
        movl    4(%esp), %eax
        movb    $1, (%eax)
        movl    $2, 4(%eax)
        movb    $3, 8(%eax)
        ret




-- 


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


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