From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 120703 invoked by alias); 26 Nov 2015 11:56:42 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 120690 invoked by uid 89); 26 Nov 2015 11:56:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 26 Nov 2015 11:56:39 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1v9q-00073M-6l for gcc-patches@gcc.gnu.org; Thu, 26 Nov 2015 06:56:15 -0500 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37823) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1v9q-000736-32 for gcc-patches@gcc.gnu.org; Thu, 26 Nov 2015 06:56:14 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33856) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1a1v7m-000144-7O for gcc-patches@gnu.org; Thu, 26 Nov 2015 06:54:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1v7k-0005un-Th for gcc-patches@gnu.org; Thu, 26 Nov 2015 06:54:05 -0500 Received: from mail-ob0-x233.google.com ([2607:f8b0:4003:c01::233]:34111) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1v7k-0005ug-OY for gcc-patches@gnu.org; Thu, 26 Nov 2015 06:54:04 -0500 Received: by obbbj7 with SMTP id bj7so61144736obb.1 for ; Thu, 26 Nov 2015 03:54:04 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.182.88.165 with SMTP id bh5mr28175748obb.21.1448538844291; Thu, 26 Nov 2015 03:54:04 -0800 (PST) Received: by 10.202.95.213 with HTTP; Thu, 26 Nov 2015 03:54:04 -0800 (PST) In-Reply-To: References: <56524E0D.7000203@mentor.com> <56547D49.5040609@mentor.com> Date: Thu, 26 Nov 2015 11:57:00 -0000 Message-ID: Subject: Re: [PATCH] Improve verification of loop->latch in verify_loop_structure From: Alan Lawrence To: Richard Biener , Tom de Vries , "gcc-patches@gnu.org" , Jakub Jelinek Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg03215.txt.bz2 Here's a reduced testcase (reduced to the point of generating lots of warnings, I'm compiling with -O2 -w, on x86_64): struct __jmp_buf_tag { }; typedef struct __jmp_buf_tag sigjmp_buf[1]; extern struct cmd_list_element *showlist; struct internalvar { struct internalvar *next; }; static struct internalvar *internalvars; struct internalvar * create_internalvar (const char *name) { struct internalvar *var =3D ((struct internalvar *) xmalloc (sizeof (struct internalvar))); internalvars =3D var; } void show_convenience (char *ignore, int from_tty) { struct gdbarch *gdbarch =3D get_current_arch (); int varseen =3D 0; for (struct internalvar *var =3D internalvars; var; var =3D var->next) { if (!varseen) varseen =3D 1; sigjmp_buf *buf =3D exceptions_state_mc_init (); __sigsetjmp (); while (exceptions_state_mc_action_iter ()) while (exceptions_state_mc_action_iter_1 ()) ; } if (!varseen) printf_unfiltered (); } On 26 November 2015 at 11:33, Alan Lawrence wrote: > This caused an ICE compiling value.c from gdb on > aarch64-none-linux-gnu; the testcase, after preprocessing on aarch64, > ICEs on both aarch64 and x86_64, but is about 1MB - I'm working on > reducing that down to something small enough to post... > > $ ./gcc/xgcc -B ./gcc -O2 -g value.c > ../../binutils-gdb/gdb/value.c: In function =E2=80=98show_convenience=E2= =80=99: > ../../binutils-gdb/gdb/value.c:2615:1: error: loop 3=E2=80=99s latch is m= issing > ../../binutils-gdb/gdb/value.c:2615:1: internal compiler error: in > verify_loop_structure, at cfgloop.c:1669 > 0x71e653 verify_loop_structure() > /work/alalaw01/src2/gcc/gcc/cfgloop.c:1669 > 0x97c6ae checking_verify_loop_structure > /work/alalaw01/src2/gcc/gcc/cfgloop.h:325 > 0x97c6ae loop_optimizer_init(unsigned int) > /work/alalaw01/src2/gcc/gcc/loop-init.c:106 > 0x97c78a rtl_loop_init > /work/alalaw01/src2/gcc/gcc/loop-init.c:398 > 0x97c78a execute > /work/alalaw01/src2/gcc/gcc/loop-init.c:425 > > --Alan