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/57823] restrict qualifier non effective with pointer returned by new


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

--- Comment #3 from vincenzo Innocente <vincenzo.innocente at cern dot ch> ---
indeed

float * bar3() {
  const float * a = (float*) malloc(4*128);
  const float * b = (float*) malloc(4*128);
  float *  c = (float*) malloc(4*128);

  a = (const float*)__builtin_assume_aligned (a, 16, 0);
  b = (const float*)__builtin_assume_aligned (b, 16, 0);
  c = (float*)__builtin_assume_aligned (c, 16, 0);

    for (int iat=0; iat<128; ++iat)
    c[iat] = a[iat]+b[iat];

  return c;

}

produces no aliases


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