From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30280 invoked by alias); 31 Oct 2003 21:23:27 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 30206 invoked by uid 48); 31 Oct 2003 21:23:25 -0000 Date: Fri, 31 Oct 2003 21:31:00 -0000 From: "danglin at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20031031212321.12863.danglin@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug optimization/12863] New: [3.4 regression] basic block reordering fails for fallthru of casesi X-Bugzilla-Reason: CC X-SW-Source: 2003-10/txt/msg02863.txt.bz2 List-Id: PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12863 Summary: [3.4 regression] basic block reordering fails for fallthru of casesi Product: gcc Version: 3.4 Status: UNCONFIRMED Severity: normal Priority: P2 Component: optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: danglin at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org,jh at suse dot cz GCC build triplet: hppa1.1-hp-hpux10.20 GCC host triplet: hppa1.1-hp-hpux10.20 GCC target triplet: vax-dec-ultrix4.3 The following error occurs in a native build on vax-dec-ultrix4.3: stage1/xgcc -Bstage1/ -B/usr/local/vax-dec-ultrix4.3/bin/ -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-l ong-long -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../. ./gcc/gcc/. -I../../gcc/gcc/../include -c insn-recog.c \ -o insn-recog.o /usr/tmp//ccIivLi7.s: Assembler messages: /usr/tmp//ccIivLi7.s:5966: Error: can't resolve `L1074' {unknown section} - `L10 86' {text section} Looking at this problem with a cross compiler built on hppa1.1-hp-hpux10.20, I see exactly the same problem and find that the code label for L1074 disappears in bbro pass. Looking at the assembler output with and without basic block reordering, I see: With basic block reordering: movzwl (r6),r0 casel r0,$114,$5 L1086: .word L1084-L1086 .word L1074-L1086 .word L1078-L1086 .word L1076-L1086 .word L1082-L1086 .word L1080-L1086 .stabd 68,0,4406 movl 4(r7),r8 jbr L1392 Without basic block reordering: movzwl (r6),r0 casel r0,$114,$5 L1086: .word L1084-L1086 .word L1074-L1086 .word L1078-L1086 .word L1076-L1086 .word L1082-L1086 .word L1080-L1086 L1074: jbr L1385 L1076: .stabd 68,0,3809 movl 4(r6),r10 .stabd 68,0,3810 ... L1385: .stabd 68,0,4406 movl 4(r7),r8 .stabd 68,0,4407 jbr L1062 We have lost the label at the end of the address difference table when basic block reordering is in effect. Either it should remain as L1074, or it should change to L1385 and the table updated. The right code appears to have been placed in the fallthru.