This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/16536] [3.3 regression] Incorrect __restrict__ optimization in -O2
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Jul 2004 12:42:59 -0000
- Subject: [Bug rtl-optimization/16536] [3.3 regression] Incorrect __restrict__ optimization in -O2
- References: <20040714132218.16536.jeremy.denise@libertysurf.fr>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From reichelt at gcc dot gnu dot org 2004-07-15 12:42 -------
This seems to be fixed in gcc 3.4.1.
Btw, here's something even shorter:
=============================================
extern "C" void abort ();
struct S {
float u, dummy;
};
inline S add (const S& a,const S& b)
{ return (S) { a.u+b.u, 0 }; }
void foo(S * __restrict__ v0)
{
(*v0) = add(*v0, *v0);
if (v0->u != 2)
abort ();
}
int main()
{
S v0={1};
foo(&v0);
}
=============================================
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
Keywords| |monitored
Known to fail|3.3.4 3.4.0 |3.3 3.3.4 3.4.0
Known to work|3.2.3 3.5.0 |3.2.3 3.5.0 3.4.1
Summary|[3.3/3.4 regression] |[3.3 regression] Incorrect
|Incorrect __restrict__ |__restrict__ optimization in
|optimization in -O2 |-O2
Target Milestone|3.4.2 |3.3.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16536