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 rtl-optimization/16536] [3.3 regression] Incorrect __restrict__ optimization in -O2


------- 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


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