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/26258] [4.1 Regression] Wrong alias information for struct



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-02-13 15:32 -------
You can invoke the wrong aliasing before SRA:
typedef struct Foo { int a; int b; }Foo;

Foo foo(Foo first, Foo last, bool ret_first)
{
  Foo t;
  Foo *t1 = (ret_first ? &first : &last);
  t.a = t1->a;
  t.b = t1->b;
  return t;
}


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.1 Regression] Wrong alias|[4.1 Regression] Wrong alias
                   |information for SRAed struct|information for struct
                   |copy                        |


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


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