Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4758647

REGRESSION: reachability bug exposed by j2se build

XMLWordPrintable

    • mantis
    • generic
    • solaris_8

      The following bug in reachability analysis was exposed by the j2se build.

      ==========> cat -n T.java
           1 class T {
           2 int f(int a) {
           3 for (int ix = 0; ; ix++) {
           4 if (ix == a)
           5 break;
           6 try {
           7 return 10;
           8 } catch (Error ex) {
           9 }
          10 }
          11 return a;
          12 }
          13 }
      ==========> newjavac T.java
      /usr/java1.4/bin/javac -J-Xbootclasspath/p:/net/frog/gafter/gjc-work/generics/build/bootstrap2 -J-Xfuture -J-ea:com.sun.tools... -J-Xint -bootclasspath /net/frog/gafter/gjc-work/generics/build/collections2:/usr/java1.4/jre/lib/stubs.jar:/usr/java1.4/jre/lib/rt.jar -classpath . T.java
      T.java:11: unreachable statement
      return a;
              ^
      1 error
      ==========>


      ###@###.### 2002-10-06

            gafter Neal Gafter (Inactive)
            gafter Neal Gafter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: