From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19398 invoked by alias); 31 Oct 2012 21:56:00 -0000 Received: (qmail 18953 invoked by uid 48); 31 Oct 2012 21:55:31 -0000 From: "gary at intrepid dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/55158] New: ICE: [4.8 Regreesion] [IA64] segv in schedule_region Date: Wed, 31 Oct 2012 21:56:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gary at intrepid dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-10/txt/msg03001.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D55158 Bug #: 55158 Summary: ICE: [4.8 Regreesion] [IA64] segv in schedule_region Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization AssignedTo: unassigned@gcc.gnu.org ReportedBy: gary@intrepid.com Created attachment 28587 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=3D28587 Test case: gcc segv when compiled at -O3 on IA64 See attached test case. $ bld/gcc/cc1 -O3 gcc-ice-schedule-region.c -o gcc-ice-schedule-region.o gasneti_check_node_list Analyzing compilation unit Performing interprocedural optimizations <*free_lang_data> <*free_inline_summar= y> Assembling functions: gasneti_check_node_list gcc-ice-schedule-region.c: In function =E2=80=98gasneti_check_node_list=E2= =80=99: gcc-ice-schedule-region.c:53:1: internal compiler error: Segmentation fault } ^ 0x4000000000b7b22f crash_signal src/gcc/toplev.c:333 0x4000000000ac2aaf schedule_region src/gcc/sched-rgn.c:2998 0x4000000000ac2aaf schedule_insns() src/gcc/sched-rgn.c:3343 Here is the schedule_region source at that location. 2993 f =3D find_fallthru_edge (last_bb->succs); 2994 if (f && f->probability * 100 / REG_BR_PROB_BASE >=3D 2995 PARAM_VALUE (PARAM_SCHED_STATE_EDGE_PROB_CUTOFF)) 2996 { 2997 memcpy (bb_state[f->dest->index], curr_state, 2998 dfa_state_size); 2999 if (sched_verbose >=3D 5) 3000 fprintf (sched_dump, "saving state for edge %d->%d\= n", 3001 f->src->index, f->dest->index); 3002 } Here is the value of f->dest->index at the pointed and the value of the selected element of bb_state. (gdb) p f->dest->index $1 =3D 23 (gdb) p bb_state[23] $2 =3D (state_t) 0x431 Clearly not a valid address. (gdb) p bb_state[22] $3 =3D (state_t) 0x60000000002f3d58 While the element before it looks OK. This issue seemed to be introduced by this check in. 2012-10-08 Bernd Schmidt * sched-int.h (schedule_block): Adjust declaration. * sched-rgn.c (bb_state_array, bb_state): New static variables. (sched_rgn_init): Initialize them. (sched_rgn_free): Free them. (schedule_region): Save scheduling state for future blocks, and which is svn revision 192203.