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]

gcc-2.95.2 problems on Solaris 7 + ultrasparc


I used Sun's freeware gcc-2.8.1 to build gcc-2.95.2 and pgcc-2.95.2 under
Solaris 7 of 11/99 on an E250 ultrasparc.

On the dhrystone test with various combinations of -mcpu and -mtune,
gcc and pgcc had similar values.  (On compile tests, I usually used
-O9 -fomit-frame-pointer -ffast-math -mcpu=ultrasparc -mtune=ultrasparc
when possible.)

Next, I timed bzip2.  "make check" failed for pgcc, so I stopped testing it.
gcc-2.95.2 made a faster bzip2 than gcc-2.8.1, I think part because it
optimizes better and part because it supports ultrasparcs.

Then I built my program with gcc-2.95.2, but it did not go so well...
First, I had a core dump inside a loop at a statement similar to
  x := a[i];
After I added
  if (i < 0 || i >= MAX) { fprintf(stderr, "error %d\n", i); break; }
before the assignment, the crash no longer happened, but also, nothing printed.
Next, it core dumped during the call to the routine below

Void reg_real_to_pix(real_row, real_col, real_len, real_wid,
		pix_row, pix_col, pix_len, pix_wid)
double real_row, real_col, real_len, real_wid;
int *pix_row, *pix_col, *pix_len, *pix_wid;
{
  ...
}

from this routine

Void reg_real_box(row, col, len, wid, bordercolor, innercolor, pattern)
double row, col, len, wid;
int bordercolor, innercolor, pattern;
{
  int pix_row, pix_col, pix_len, pix_wid;

  reg_real_to_pix(row, col, len, wid, &pix_row, &pix_col, &pix_len, &pix_wid);
  reg_pix_box(pix_row, pix_col, pix_len, pix_wid,
		bordercolor, innercolor, pattern);
}

gdb showed that reg_real_box had reasonable values for the four double
parameters, but in reg_real_to_pix, the parameters "real_col" and "real_wid"
in the argument list were both something X e-313 (or something like that).
The other parameters seemed OK.

At that point, I gave up, and switched back to gcc-2.8.1.

When I rebuilt the system with gcc-2.8.1, I used -O9 instead of -O2.
It did not crash, but moving objects with drags no longer worked.
I rebuilt everything again with -O2, and it worked fine.

William


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