public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Debugging ICE in GCC
@ 2020-05-29 23:55 Manfred Schwarb
  2020-05-30  2:01 ` Dan Kegel
  2020-05-30  7:39 ` Jonathan Wakely
  0 siblings, 2 replies; 7+ messages in thread
From: Manfred Schwarb @ 2020-05-29 23:55 UTC (permalink / raw)
  To: gcc-help

Hi,
I tried to debug fortran.dg/pr95090.f90, which showed

f951: internal compiler error: Segmentation fault
0x83cfe3c ???
        ../sysdeps/i386/start.S:117
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.


Using GDB (8.3.1), I got
#> f951="`$instdir/bin/gcc -print-prog-name=f951`"
#> gdb -ex run -ex bt --batch --args $f951 fortran.dg/pr95090.f90

Program received signal SIGSEGV, Segmentation fault.
0xf7aa5162 in __strlen_sse2_bsf () from /lib/libc.so.6
#0  0xf7aa5162 in __strlen_sse2_bsf () from /lib/libc.so.6
#1  0x083e7c3f in get_unique_hashed_string(char*, gfc_symbol*) ()
#2  0x083e85a4 in gfc_find_derived_vtab(gfc_symbol*) ()
#3  0x0847fde1 in resolve_fl_derived(gfc_symbol*) ()
#4  0x0847c717 in resolve_symbol(gfc_symbol*) ()
#5  0x084a78d0 in do_traverse_symtree(gfc_symtree*, void (*)(gfc_symtree*), void (*)(gfc_symbol*)) ()
#6  0x08487f77 in resolve_types(gfc_namespace*) ()
#7  0x0847b6e5 in gfc_resolve(gfc_namespace*) ()
#8  0x0846e9f6 in gfc_parse_file() ()
#9  0x084bebe7 in gfc_be_parse_file() ()
#10 0x08a3b59e in compile_file() ()
#11 0x083c98a5 in toplev::main(int, char**) ()
#12 0x083cd9b1 in main ()


So far so good, but there are no file locations shown, and I can't
switch frames and list code in GDB.
This although I built GCC with debug information and binaries are not stripped.

I built GCC with
#> ../configure --enable-checking=yes,extra i686-linux
#> make BOOT_CFLAGS="-O2 -ggdb" bootstrap2-lean

In desperation, I even tried
#> make BOOT_CFLAGS="-O2 -fanalyzer" bootstrap2-lean
and
#> make BOOT_CFLAGS="-O2 -fsanitize=address" bootstrap2-lean
but both compilation attempts failed.


Are there any magic knobs to make GDB output more useful?

Thanks,
Manfred


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-05-31 20:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-29 23:55 Debugging ICE in GCC Manfred Schwarb
2020-05-30  2:01 ` Dan Kegel
     [not found]   ` <77248fa9-0729-28a1-ea61-1ed2005f9b66@gmx.ch>
2020-05-30 23:48     ` Manfred Schwarb
2020-05-30  7:39 ` Jonathan Wakely
2020-05-30 23:46   ` Manfred Schwarb
2020-05-31 13:45     ` Manfred Schwarb
2020-05-31 20:30       ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).