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 middle-end/20934] New: [4.1 Regression] Segmentation fault in gnat1


stage1/xgcc -Bstage1/ -B/home/dave/opt/gnu/gcc/gcc-4.1.0/hppa-linux/bin/ -c -g -
O2      -gnatpg -gnata -I- -I. -Iada -I../../gcc/gcc/ada ../../gcc/gcc/ada/ada.a
ds -o ada/ada.o
+===========================GNAT BUG DETECTED==============================+
| 4.1.0 20050410 (experimental) (hppa-unknown-linux-gnu) Segmentation fault|
| Error detected at ada.ads:17:1                                           |
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.            |
| Use a subject line meaningful to you and us to track the bug.            |
| 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).                   |
+==========================================================================+

This is the backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x008bdd88 in in_unlikely_text_section () at ../../gcc/gcc/varasm.c:309
309           ret_val = ((in_section == in_unlikely_executed_text)
(gdb) bt
#0  0x008bdd88 in in_unlikely_text_section () at ../../gcc/gcc/varasm.c:309
#1  0x008be220 in named_section_real (name=0xaa8900 ".debug_info", flags=1024,
    decl=0x0) at ../../gcc/gcc/varasm.c:444
#2  0x0060a640 in output_comp_unit (die=0x4000b150, output_if_empty=0)
    at ../../gcc/gcc/dwarf2out.c:7108
#3  0x0062229c in dwarf2out_finish (
    filename=0xbff0007c "../../gcc/gcc/ada/ada.ads")
    at ../../gcc/gcc/dwarf2out.c:13916
#4  0x00880d78 in compile_file () at ../../gcc/gcc/toplev.c:1038
#5  0x00883c1c in do_compile () at ../../gcc/gcc/toplev.c:2120
#6  0x00883cc0 in toplev_main (argc=15, argv=0xbff005d4)
    at ../../gcc/gcc/toplev.c:2152
#7  0x003ff3dc in main (argc=15, argv=0xbff005d4) at ../../gcc/gcc/main.c:35

0x008bdd84 <in_unlikely_text_section+160>:      ldw c(,r3),r19
0x008bdd88 <in_unlikely_text_section+164>:      ldw ec(,r19),r19
0x008bdd8c <in_unlikely_text_section+168>:      cmpib,=,n 0,r19,0x8bddbc <
in_unlikely_text_section+216>

(gdb) p/x $r19
$4 = 0x0
(gdb) p cfun
$5 = (struct function *) 0x0
(gdb) p in_section
$6 = in_named

It looks as if we need a check on cfun:

309           ret_val = ((in_section == in_unlikely_executed_text)
310                      || (in_section == in_named
311                          && cfun->unlikely_text_section_name
312                          && strcmp (in_named_name,
313                                     cfun->unlikely_text_section_name) == 0));

-- 
           Summary: [4.1 Regression] Segmentation fault in gnat1
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: middle-end
        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: hppa-unknown-linux-gnu
  GCC host triplet: hppa-unknown-linux-gnu
GCC target triplet: hppa-unknown-linux-gnu


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


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