[Bug rtl-optimization/16536] [3.3 regression] Incorrect __restrict__ optimization in -O2
reichelt at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Jul 15 12:43:00 GMT 2004
------- 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
More information about the Gcc-bugs
mailing list