This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/26258] [4.1 Regression] Wrong alias information for struct
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Feb 2006 15:32:48 -0000
- Subject: [Bug tree-optimization/26258] [4.1 Regression] Wrong alias information for struct
- References: <bug-26258-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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