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]
Other format: [Raw text]

[Bug ada/12761] New: [3.4 regression] Segmentation fault in gnat1 compiling a-except.adb


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12761

           Summary: [3.4 regression] Segmentation fault in gnat1 compiling
                    a-except.adb
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: danglin at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: hppa2.0w-hp-hpux11.00
  GCC host triplet: hppa2.0w-hp-hpux11.00
GCC target triplet: hppa2.0w-hp-hpux11.00

stage1/xgcc -Bstage1/ -B/opt/gnu/hppa2.0w-hp-hpux11.00/bin/ -c -g -O2      -gnat
pg -gnata -g -O1 -fno-inline \
 -I- -I. -Iada -I../../gcc/gcc/ada ../../gcc/gcc/ada/a-except.adb -o ada/a-excep
t.o
+===========================GNAT BUG DETECTED==============================+
| 3.4 20031024 (experimental) (hppa2.0w-hp-hpux11.00) Bus error            |
| No source file position information available                            |
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.            |
| Include the entire contents of this bug box in the report.               |
| Include the exact gcc or gnatmake command that you entered.              |
| Also include sources listed below in gnatchop format                     |
| (concatenated together with no headers between files).                   |
+==========================================================================+

Please include these source files with error report
Note that list may not be accurate in some cases, 
so please double check that the problem can still 
be reproduced with the set of files listed.

list may be incomplete
compilation abandoned

The fault is here:

Program received signal SIGBUS, Bus error.
0x00132d54 in exp_ch3__freeze_stream_operations (n=9154, typ=6067)
    at ../../gcc/gcc/ada/exp_ch3.adb:4023
4023             Stream_Op := TSS (Typ, Names (J));

Don't know much about ada but it appears that the fault occurs accessing
the array Names, the second time around the loop:

0x132d4c <exp_ch3__freeze_stream_operations+116>:       ldo -2(r19),r19
0x132d50 <exp_ch3__freeze_stream_operations+120>:       ldi 0,r20
0x132d54 <exp_ch3__freeze_stream_operations+124>:       ldw 0(sr0,r19),r19
0x132d58 <exp_ch3__freeze_stream_operations+128>:       extrw,u r19,15,16,r19
0x132d5c <exp_ch3__freeze_stream_operations+132>:       extrw,u r19,31,16,r19
0x132d60 <exp_ch3__freeze_stream_operations+136>:       depwi 0,31,16,r20
0x132d64 <exp_ch3__freeze_stream_operations+140>:       or r20,r19,r20

The fault occurs at 0x132d54 when %r19 isn't aligned to a word address.

(gdb) printf "0x%x\n",$r19
0x4000303a
(gdb) info addr names
Symbol "names" is static storage at address 0x40003030.
(gdb) info locals
j = 2
names = {"SI", "SO", "SR", "SW"}
stream_op = 0


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