This is the mail archive of the java-prs@gcc.gnu.org mailing list for the Java 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 java/22299] New: Even length strings (not odd) placed in .section .rodata.jutf8.# at -O1 or above.


Compiling with -O1 or above.

All even length strings go to ".section  .rodata.jutf8.#", odd length strings 
do not.

class small {
public static void main(String[] a) {
  String S2 = "XX";
  String S3 = "ODD";
  String S4 = "XXXX";
  String S5 = "ODD55";
  String S6 = "XXXXXX";
  String S8 = "XXXXXXXX";
  String S10 = "XXXXXXXXXX";
  String S12 = "XXXXXXXXXXXX";
  String S14 = "XXXXXXXXXXXXXX";
  String S16 = "XXXXXXXXXXXXXXXX";
  String S18 = "XXXXXXXXXXXXXXXXXX";
  String S20 = "XXXXXXXXXXXXXXXXXXXX";
  String S22 = "XXXXXXXXXXXXXXXXXXXXXX";
  String S24 = "XXXXXXXXXXXXXXXXXXXXXXXX";
  String S26 = "XXXXXXXXXXXXXXXXXXXXXXXXXX";
  String S28 = "XXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  String S30 = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  System.out.println("OK");
}}

Compile:

gcj small.java -S -o small.s -O1

Result:

<snip>

_Utf20:
  .value  22016
  .value  4
  .ascii  "XXXX"
  .zero 1
  .section  .rodata.jutf8.8
  .align 2
  .type _Utf21, @object
  .size _Utf21, 4

_Utf21:
  .value  12559
  .value  3
  .ascii  "ODD"
  .zero 1
  .align 2
  .type _Utf22, @object
  .size _Utf22, 4

-- 
           Summary: Even length strings (not odd) placed in .section
                    .rodata.jutf8.# at -O1 or above.
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ovidr at users dot sourceforge dot net
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org
  GCC host triplet: linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22299


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