This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
java/4070: Bad switch code for PowerPC gcj -fPIC
- To: gcc-gnats at gcc dot gnu dot org
- Subject: java/4070: Bad switch code for PowerPC gcj -fPIC
- From: green at peach dot cygnus dot co dot uk
- Date: Tue, 21 Aug 2001 11:40:33 -0400
>Number: 4070
>Category: java
>Synopsis: Bad switch code for PowerPC gcj -fPIC
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Tue Aug 21 08:46:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:
>Release: 3.1 20010811 (experimental)
>Organization:
>Environment:
System: Linux peach.cygnus.co.uk 2.2.17pre20-ben3 #2 Wed Sep 6 01:14:01 CEST 2000 ppc unknown
Architecture: ppc
host: powerpc-unknown-linux-gnu
build: powerpc-unknown-linux-gnu
target: powerpc-unknown-linux-gnu
configured with: /peach/green/net/trunk/gcc/configure --prefix=/peach/green/net/trunk/i --enable-threads --enable-language=c,c++,java --enable-languages=c,c++,java --disable-multilibs --disable-multilib : (reconfigured) : (reconfigured) : (reconfigured) : (reconfigured)
>Description:
Compiling the following with -fPIC -O2 produces code which
refers to non-existant labels. Specifically, .L7 and .8 do not exist.
This is preventing a shared version of xerces from building and
running.
.section .rodata
.align 4
.align 2
.L10:
.long .L8-.L10
.long .L8-.L10
.long .L8-.L10
.long .L8-.L10
.long .L8-.L10
.long .L7-.L10
.long .L8-.L10
public class DTDGrammar {
public String addAttDef(int attType)
throws Exception {
// find the dataTypeValidator associcated with this attType
String attTypeString = "";
switch (attType) {
case 0:
attTypeString = "string";
case 1:
attTypeString = "ENTITY";;
case 2:
attTypeString = "ENUMERATION";;
case 3:
attTypeString = "ID";;
case 4:
attTypeString = "IDREF";;
case 5:
attTypeString = "NMTOKEN";;
case 6:
attTypeString = "NOTATION";;
default:
;
}
return attTypeString;
}
}
>How-To-Repeat:
Compile the above code with -fPIC -O2 (-O2 may not be necessary).
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: