This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug optimization/12863] New: [3.4 regression] basic block reordering fails for fallthru of casesi


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]