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 target/61949] [4.10 regression] SEGV compiling gcc.dg/pch/import-[12].c


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61949

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Reduced testcase, compile with -m32 -msse -O2 -fno-omit-frame-pointer
(works on a x86_64-linux host, no 32bit host available right now):

struct md5_ctx
{
  unsigned int A;
  unsigned int B;
  unsigned int C;
  unsigned int D;

  unsigned int total[2];
  unsigned int buflen;
  char buffer[128] __attribute__ ((__aligned__ (__alignof__ (unsigned int))));
};

void * __attribute__((noinline,noclone))
md5_read_ctx (const struct md5_ctx *ctx, void *resbuf)
{
  unsigned int buffer[4];

  buffer[0] = (ctx->A);
  buffer[1] = (ctx->B);
  buffer[2] = (ctx->C);
  buffer[3] = (ctx->D);

  __builtin_memcpy (resbuf, buffer, 16);

  return resbuf;
}


int main()
{
  char resbuf[16];
  struct md5_ctx c;
  md5_read_ctx (&c, resbuf);
  return 0;
}

Does this testcase fail on Solaris 10?


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