This is the mail archive of the java@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]

Re: Patch to allow Ada to work with tree-ssa


Richard Kenner wrote:
> This is the patch I spoke about this morning.  Much of it is mechanical, but
> a good part is not.
> 
> I've been working on an x86_64 target.  It's at the point where all languages
> except Ada (there's still some work to do there, as I said) bootstrap,
> everything builds, there are no C regressions and only the C++ regression I
> mentioned this morning.

Though I've not been able to fully analyse it, very likely
this is the patch that is causing 2 new FAILs for libjava
on i686-pc-linux-gnu. (If not, I apologise in advance.)

The testcase is "libjava/testsuite/libjava.lang/err6.java"
and is reproduced here for your reference:
----------------------------- 8< -----------------------------

/*--------------------------------------------------------------------------*/
/* File name  : err6.java                                              */
/*            :                                                             */
/* Cause      : Array evaluation order                                      */
/*            :                                                             */
/* Message    : NG:[1]-->[4]                                                */
/*            :                                                             */
/* Note       : JLS 15.9 Array Creation Expressions (p315--)                */
/*            :  p318 line3                                                 */
/*            :[Each dimension expression is fully evaluated                */
/*            : before any part of any dimension expression to its right.]  */
/*--------------------------------------------------------------------------*/

public class err6 {
  public static void main(String[] args) {
    int[] x = { 10, 11, 12, 1, 14 };
    int[] y = { 1, 2, 3, 4, 5, 6 };

    if ( x[(x=y)[2]] == 1 ) {
      System.out.println("OK");
    } else {
      System.out.println("NG:[1]-->[" +x[(x=y)[2]]+ "]");
    }
  }
}
----------------------------- 8< -----------------------------

Both at "-O3" and at normal optimisation levels, this
testcase now outputs "NG:[1]-->[4]" instead of the
expected "OK".

Thanks,
Ranjit.

-- 
Ranjit Mathew          Email: rmathew AT gmail DOT com

Bangalore, INDIA.      Web: http://ranjitmathew.tripod.com/


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