This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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]

strchr broken on SPU with non 16byte aligned argument


Hi,
  I noticed that the GCC testcase gcc.c-torture/execute/string-opt-5.c
is failing on the spu and was debugging it and it looks like strchr does 
not handle correctly a non 16byte aligned agrument.
Here is the reduced testcase which is failing:

extern void abort (void);
extern char *strchr (const char *, int);
int main()
{
  const char *const foo = "hello world";
  char dst [64];

  char *a = strchr (foo+4, 'l');
  if (a != foo + 9)
    abort ();
  return 0;
}

Thanks,
Andrew Pinski


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