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]

hpux20 pointer optimization bug




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


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