------- Comment #8 from szir at sch dot bme dot hu  2009-03-31 12:05 -------
(In reply to comment #7)
> For convenience, here is the testcase reduced (I didn't verify it still
> "fails", but it obviously should).
No it should not, the junk code is necessary to produce the error. As I said
before if I remove any more lines from the code, it won't produce the bug.
I suspect it's because it's massive register usage.

> Can you check if that causes a runtime failure?  It indeed looks like a
> target issue related to loading constants.
I tried your testcase, it uses r24 as a temp reg. (won't corrupt the value)
I inserted the junk code into your testcase, and the bug rearreared, but only
if it is inserted before InitTF.

#include "junk.i.c"  ///BUG
unsigned long key32[8];
//#include "junk.i.c" ///BUG 
void __attribute__((noinline)) InitTF(void)
{
  key32[0]=0x00010203;
  key32[1]=0x04050607;
  key32[2]=0x08091011;
  key32[3]=0x12131415;
  key32[4]=0x00010203;
  key32[5]=0x04050607;
  key32[6]=0x08091011;
  key32[7]=0x12131415;
}
//#include "junk.i.c"  ///r24
void abort (void);
int main()
{
  InitTF();
  if (key32[1] != 0x04050607 || key32[5] != 0x04050607)
    abort ();
  return 0;
}
//#include "junk.i.c"   ///r24


-- 


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

Reply via email to