From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) by sourceware.org (Postfix) with ESMTPS id 4EC0B3851C01 for ; Sat, 30 May 2020 07:40:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4EC0B3851C01 Received: by mail-io1-xd36.google.com with SMTP id d5so1773185ios.9 for ; Sat, 30 May 2020 00:40:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3guv53+/iOKud90b5uA8FTYVB95S5c+NGhnGeo8fQe8=; b=qN+EsQdNrNtz2JbFN8Z4qo3jJBR0ak6D47eESf6hOS164rT2bk2lMJUh9XXiBFVYXD NL6EwZIaBM7/cj0qknMlNFcgo/hRDlY39rql+AykmLlgQdkXHwbGE97SD7kdNzwAC7+x yFd2HDUWWhIGm2+kBnnmS1YcbcKAVqp9EnrH6N8xaij5W/GQvesuXO7hv9EBgfjCheuF blwZc3o3pBJbfHYUq1gz1K+zj/nZ41MwNhXtR+PrfcfzoNb0UpBEGGBJKohZfcpClAWm AbrUnVCYsJchzopAfUsStVxTGSq7wjwK6tccvVFDRj/Xwu867qK4OSmRG4Q52+mbNXpz rHWQ== X-Gm-Message-State: AOAM531PaggrDgOAzzeWm6wFVTKVb7COKnGX7Do+wP0PGNTLsxUpyHtW upxYZlW2irXu/tFfxE4KmoNfDZ/UnOmZe83i9yA= X-Google-Smtp-Source: ABdhPJxHtECmgCr6y/uKnBj/eHW4fdcUMxCuB0BmuUpF+WYTkOTjxMwCoTKoXU+5zDLap9qomFFxRjdeZjdcgeAc20M= X-Received: by 2002:a6b:c9cd:: with SMTP id z196mr10168963iof.172.1590824406440; Sat, 30 May 2020 00:40:06 -0700 (PDT) MIME-Version: 1.0 References: <61ade9a5-4252-9b6d-5aed-9451404111d4@gmx.ch> In-Reply-To: <61ade9a5-4252-9b6d-5aed-9451404111d4@gmx.ch> From: Jonathan Wakely Date: Sat, 30 May 2020 08:39:55 +0100 Message-ID: Subject: Re: Debugging ICE in GCC To: Manfred Schwarb Cc: gcc-help Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 May 2020 07:40:08 -0000 On Sat, 30 May 2020 at 02:01, Manfred Schwarb wrote: > > 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 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? There's a whole wiki page about that: https://gcc.gnu.org/wiki/DebuggingGCC You probably don't want to use -O2