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]

false passes for c-torture bf64-1.c



I was playing around with some sparc mov pattern rewrites, and killing
all the regressions I created in the process, and was left with 2
straggler cases.  Of note was the bfd64-1.c execute test in
c-torture.

It turns out this thing passes eroneously in the current cvs tree
without my changes in there, yet my changes expose the problem and
cause the failure.  It passed eroneously due to values that "happened"
by chance to be in the incoming argument registers to main on my
sparc-linux devel machine.

I believe it will show up on any target which is 32-bit and utilizes
post reload SI mode splits to perform operations on DI mode objects.

Can someone on such an existing target (rs6000 32bit, hint hint)
compile the following with what is in cvs right now and check the
output for sanity?

static __inline__ int frob_di(unsigned long long a,
			      unsigned long long b)
{
  return (int) ((a >> 24) | (b << 18));
}

extern unsigned long long x, y;

int main(void)
{
  int x = frob_di(x, y);
  exit(x);
}

I believe the bad case is any inline function which gets expanded and
takes a DI mode argument of some sort, yet is passed an SI mode value,
on a 32bit target.

Later,
David S. Miller
davem@dm.cobaltmicro.com


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