optimize_mode_switching SEGV'ing on SH (again)

Jason R Thorpe thorpej@wasabisystems.com
Tue May 28 20:58:00 GMT 2002


So, all was well after the "basic block renumbering removal" patch
was reverted a couple of weeks ago.  But now that it's back in the
tree, the problem I described in this message:

	http://gcc.gnu.org/ml/gcc-bugs/2002-05/msg00596.html

...is back:

dr-evil:thorpej 246$ gdb ./cc1 cc1.core
GNU gdb 5.0nb1
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386--netbsdelf"...
Core was generated by `cc1'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/libexec/ld.elf_so...done.
Loaded symbols for /usr/libexec/ld.elf_so
Reading symbols from /usr/lib/libintl.so.0...done.
Loaded symbols for /usr/lib/libintl.so.0
Reading symbols from /usr/lib/libc.so.12...done.
Loaded symbols for /usr/lib/libc.so.12
#0  0x8225d3d in optimize_mode_switching (file=0x0)
    at ../../../gcc/gcc/lcm.c:1166
1166                info[bb->index].seginfo->mode = mode;
Breakpoint 1 at 0x80ab62b: file ../../../gcc/gcc/diagnostic.c, line 1446.
Breakpoint 2 at 0x482a7829
Breakpoint 3 at 0x482a8164
(gdb) where
#0  0x8225d3d in optimize_mode_switching (file=0x0)
    at ../../../gcc/gcc/lcm.c:1166
#1  0x81a0975 in rest_of_compilation (decl=0x48512bb8)
    at ../../../gcc/gcc/toplev.c:3118
#2  0x80583a0 in c_expand_body (fndecl=0x48512bb8, nested_p=0, can_defer_p=1)
    at ../../../gcc/gcc/c-decl.c:6898
#3  0x80581d5 in finish_function (nested=0, can_defer_p=1)
    at ../../../gcc/gcc/c-decl.c:6765
#4  0x804a716 in yyparse () at c-parse.y:399
#5  0x804eeb5 in c_common_parse_file (set_yydebug=0)
    at ../../../gcc/gcc/c-lex.c:160
#6  0x819edfb in compile_file () at ../../../gcc/gcc/toplev.c:2089
#7  0x81a4ef2 in do_compile () at ../../../gcc/gcc/toplev.c:5188
#8  0x81a4f60 in toplev_main (argc=44, argv=0xbfbfc9a0)
    at ../../../gcc/gcc/toplev.c:5220
#9  0x807ebf0 in main (argc=44, argv=0xbfbfc9a0) at ../../../gcc/gcc/main.c:35
#10 0x8049609 in ___start ()

Again, this is turning up just on SH, because it's the only target that
defines NORMAL_MODE.

The problem showed up when building the -m4 multilib for sh-netbsdelf
(which I was trying to get ready to commit how that the other SH changes
I needed are in).  You should be able to reproduce the problem with an
sh-linux compiler, since the configurations are quite similar.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>



More information about the Gcc-bugs mailing list