public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/17474] New: [4.0 Regression] Compiling at -01 yields different results
@ 2004-09-14  5:48 ovidr at users dot sourceforge dot net
  2004-09-14  6:07 ` [Bug tree-optimization/17474] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: ovidr at users dot sourceforge dot net @ 2004-09-14  5:48 UTC (permalink / raw)
  To: java-prs

Thread model: win32
gcc version 4.0.0 20040913 (experimental)

gcj --main=codes codes.java  (works)
gcj -O1 --main=codes codes.java (gives different results)

class codes {

  static int[] lengths;
  static int[] codeValues;

  public static void main(String[] args) {

    lengths = new int[] {6,0,0,7,5,5,4,5,4,4,4,3,3,3,3,4,4,7,0};

    codeValues = new int[lengths.length];
    for (int i = 0; i < codeValues.length; i++) {
      codeValues[i] = i;
    }

    // Sort the values. Primary key is code size. Secondary key is value.
    for (int i = 0; i < lengths.length - 1; i++) {
      for (int j = i + 1; j < lengths.length; j++) {
        if (lengths[j] < lengths[i]
            || (lengths[j] == lengths[i]
              && codeValues[j] < codeValues[i]))
        {
          int tmp;
          tmp = lengths[j];
          lengths[j] = lengths[i];
          lengths[i] = tmp;
          tmp = codeValues[j];
          codeValues[j] = codeValues[i];
          codeValues[i] = tmp;
        }
      }
    }

    int[] codes = new int[lengths.length];
    int lastLength = 0;
    int code = 0;
    for (int i = 0; i < lengths.length; i++) {
      while (lastLength != lengths[i]) {
        lastLength++;
        code <<= 1;
        System.out.println("SET CODE: " + code);
      }
      if (lastLength != 0) {
        codes[i] = code;
        System.out.println("(Should be equal) SET CODES[" + i + "] = " + code 
+ " = " + codes[i]);
        code++;
      }
    }

  }

}

-- 
           Summary: [4.0 Regression] Compiling at -01 yields different
                    results
           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


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug tree-optimization/17474] [4.0 Regression] Compiling at -01 yields different results
  2004-09-14  5:48 [Bug java/17474] New: [4.0 Regression] Compiling at -01 yields different results ovidr at users dot sourceforge dot net
@ 2004-09-14  6:07 ` pinskia at gcc dot gnu dot org
  2004-09-15  3:41 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-14  6:07 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-14 06:07 -------
These all look wrong:
-  T.235_214 = codes_85->data[i_910];
+  codes_880 = T.291_849;
+  T.235_214 = *codes_880;

-  codes_85->data[i_910] = code_19;
+  T.287_876 = &codes_85->data[0];
+  T.288_873 = (<unnamed type>) i_910;
+  T.289_856 = (int *) T.288_873;
+  T.290_851 = T.289_856 * 4B;
+  T.291_849 = T.290_851 + T.287_876;
+  codes_847 = T.291_849;
+  codes_847->length = code_298;

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical
          Component|java                        |tree-optimization
           Keywords|                            |wrong-code
   Target Milestone|---                         |4.0.0


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug tree-optimization/17474] [4.0 Regression] Compiling at -01 yields different results
  2004-09-14  5:48 [Bug java/17474] New: [4.0 Regression] Compiling at -01 yields different results ovidr at users dot sourceforge dot net
  2004-09-14  6:07 ` [Bug tree-optimization/17474] " pinskia at gcc dot gnu dot org
@ 2004-09-15  3:41 ` pinskia at gcc dot gnu dot org
  2004-09-17  1:50 ` giovannibajo at libero dot it
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-15  3:41 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-15 03:41 -------
Confirmed, -fno-ivopts fixes the problem.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rakdver at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-09-15 03:41:02
               date|                            |


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug tree-optimization/17474] [4.0 Regression] Compiling at -01 yields different results
  2004-09-14  5:48 [Bug java/17474] New: [4.0 Regression] Compiling at -01 yields different results ovidr at users dot sourceforge dot net
  2004-09-14  6:07 ` [Bug tree-optimization/17474] " pinskia at gcc dot gnu dot org
  2004-09-15  3:41 ` pinskia at gcc dot gnu dot org
@ 2004-09-17  1:50 ` giovannibajo at libero dot it
  2004-09-19 21:53 ` rakdver at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: giovannibajo at libero dot it @ 2004-09-17  1:50 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From giovannibajo at libero dot it  2004-09-17 01:49 -------
Assigning to Zdenek, as ivopts is his beast.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rakdver at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug tree-optimization/17474] [4.0 Regression] Compiling at -01 yields different results
  2004-09-14  5:48 [Bug java/17474] New: [4.0 Regression] Compiling at -01 yields different results ovidr at users dot sourceforge dot net
                   ` (2 preceding siblings ...)
  2004-09-17  1:50 ` giovannibajo at libero dot it
@ 2004-09-19 21:53 ` rakdver at gcc dot gnu dot org
  2004-09-24 20:43 ` rakdver at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2004-09-19 21:53 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From rakdver at gcc dot gnu dot org  2004-09-19 21:53 -------
Patch:

http://gcc.gnu.org/ml/gcc-patches/2004-09/msg01897.html

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug tree-optimization/17474] [4.0 Regression] Compiling at -01 yields different results
  2004-09-14  5:48 [Bug java/17474] New: [4.0 Regression] Compiling at -01 yields different results ovidr at users dot sourceforge dot net
                   ` (3 preceding siblings ...)
  2004-09-19 21:53 ` rakdver at gcc dot gnu dot org
@ 2004-09-24 20:43 ` rakdver at gcc dot gnu dot org
  2004-09-25 11:07 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2004-09-24 20:43 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From rakdver at gcc dot gnu dot org  2004-09-24 20:43 -------
And one more patch:

http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02591.html

-- 


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug tree-optimization/17474] [4.0 Regression] Compiling at -01 yields different results
  2004-09-14  5:48 [Bug java/17474] New: [4.0 Regression] Compiling at -01 yields different results ovidr at users dot sourceforge dot net
                   ` (4 preceding siblings ...)
  2004-09-24 20:43 ` rakdver at gcc dot gnu dot org
@ 2004-09-25 11:07 ` cvs-commit at gcc dot gnu dot org
  2004-11-27  2:14 ` neroden at gcc dot gnu dot org
  2004-12-05 21:02 ` pinskia at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-09-25 11:07 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-09-25 11:07 -------
Subject: Bug 17474

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rakdver@gcc.gnu.org	2004-09-25 11:06:46

Modified files:
	gcc            : ChangeLog tree-ssa-ccp.c 

Log message:
	PR tree-optimization/17474
	* tree-ssa-ccp.c (maybe_fold_offset_to_component_ref): Determine
	offset of the field correctly when DECL_FIELD_BIT_OFFSET != 0.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5618&r2=2.5619
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-ccp.c.diff?cvsroot=gcc&r1=2.44&r2=2.45



-- 


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug tree-optimization/17474] [4.0 Regression] Compiling at -01 yields different results
  2004-09-14  5:48 [Bug java/17474] New: [4.0 Regression] Compiling at -01 yields different results ovidr at users dot sourceforge dot net
                   ` (5 preceding siblings ...)
  2004-09-25 11:07 ` cvs-commit at gcc dot gnu dot org
@ 2004-11-27  2:14 ` neroden at gcc dot gnu dot org
  2004-12-05 21:02 ` pinskia at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: neroden at gcc dot gnu dot org @ 2004-11-27  2:14 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From neroden at gcc dot gnu dot org  2004-11-27 02:14 -------
One of the patches is in; the other one generated a lot of debate and is 
apparently not sufficient, so removing patch tag. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|patch                       |


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug tree-optimization/17474] [4.0 Regression] Compiling at -01 yields different results
  2004-09-14  5:48 [Bug java/17474] New: [4.0 Regression] Compiling at -01 yields different results ovidr at users dot sourceforge dot net
                   ` (6 preceding siblings ...)
  2004-11-27  2:14 ` neroden at gcc dot gnu dot org
@ 2004-12-05 21:02 ` pinskia at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-05 21:02 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-05 21:02 -------
The testcase has already been fixed so closing.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-12-05 21:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-14  5:48 [Bug java/17474] New: [4.0 Regression] Compiling at -01 yields different results ovidr at users dot sourceforge dot net
2004-09-14  6:07 ` [Bug tree-optimization/17474] " pinskia at gcc dot gnu dot org
2004-09-15  3:41 ` pinskia at gcc dot gnu dot org
2004-09-17  1:50 ` giovannibajo at libero dot it
2004-09-19 21:53 ` rakdver at gcc dot gnu dot org
2004-09-24 20:43 ` rakdver at gcc dot gnu dot org
2004-09-25 11:07 ` cvs-commit at gcc dot gnu dot org
2004-11-27  2:14 ` neroden at gcc dot gnu dot org
2004-12-05 21:02 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).