This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
hpux20 pointer optimization bug
- To: egcs-bugs at cygnus dot com, tprince at computer dot org
- Subject: hpux20 pointer optimization bug
- From: tprince at cat dot e-mail dot com
- Date: Thu, 04 Jun 1998 00:32:51 EDT
The following test case is meant to reproduce in gcc a bug which occurs
more frequently with -O in g77. Run on egcs-19980517. Same problem
occurs whether or not --with-gnu-as is chosen (although it's not
trackable without gdb).
This bug is seen in gcc only with the combination -O -funroll-loops. It
results in a SIGSEGV when run under gdb 4.17. It goes away if any of
the following is done:
reduce level of loop nesting (apparently the pointers are trashed when
leaving the middle level loop)
use saner notation, replacing e.g. aj[i] by a[j][i]. This notation was used in
order to simulate the treatment of the corresponding Fortran code.
put offending code in main()
This code has been run on a number of compilers and architectures, and
runs incorrectly only with gnu compilers on hppa. It's worse in
gcc-0.5.23 (not restricted to triple nested or unrolled loops).
To: INTERNET - IBMMAIL