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]

2.95: Alpha ev6 float compare problem


The following program dumps core when compiled with

gcc -mieee -mcpu=ev6

with or without -O1 (it bombs later with -O1).

#include <stdio.h>

int main() {
  double x = 0.0, y = 0.0;
  double z;
  z = x/y;
  if (z != z)
    printf("!= is OK\n");
  else
    printf("!= is bad\n");
  if (z > z)
    printf("> is bad\n");
  else
    printf("> is OK\n");
  if (z >= z)
    printf(">= is bad\n");
  else
    printf(">= is OK\n");
}

The problem is that the compare instructions are not issued with the
su suffix. (I was wrong before when I said a following trapb was
needed on the ev6, sorry.)  I tried to go through gcc/config/alpha
to find out what the problem is, but I guess that's not a task for
amateurs ;-).  It generates correct code with -mcpu=ev5.

Brad Lucier    lucier@math.purdue.edu


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