Larry Morell (morell@cs.atu.edu) From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225 Description of problem: Compiling: class BugToken { public void oops () { final char eofSym; switch (7) { case eofSym : ; } } } yields: javac BugToken.java BugToken.java: In class `BugToken': BugToken.java: In method `BugToken.oops()': BugToken.java:4: internal error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions. Removing 'final' yields: BugToken.java: In class `BugToken': BugToken.java: In method `BugToken.oops()': BugToken.java:5: Constant expression required. case eofSym : ; ^ 1 error as hoped. Version-Release number of selected component (if applicable): gcc-3.2.2-5 How reproducible: Always Steps to Reproduce: 1. Using javac script supplied with Redhat 9 compile the program:class BugToken { public void oops () { assinal char eofSym; switch (7) { case eofSym : ; } } } Actual Results: javac BugToken.java BugToken.java: In class `BugToken': BugToken.java: In method `BugToken.oops()': BugToken.java:4: internal error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions. Expected Results: Should have compiled.
Confirmed, a regression from 3.0.4: tin:~/src/gnu/gcctest>~/ia32_linux_gcc3_0/bin/gcj BugToken.java BugToken.java: In class `BugToken': BugToken.java: In method `BugToken.oops()': BugToken.java:5: Constant expression required. case eofSym : ; ^ 1 error
Patch here: <http://gcc.gnu.org/ml/gcc/2004-03/msg00704.html>, looks like you posted it to the wrong lists.
Subject: Bug 14581 CVSROOT: /cvs/gcc Module name: gcc Changes by: aph@gcc.gnu.org 2004-03-15 17:56:15 Modified files: gcc/java : parse.y ChangeLog Log message: 2004-03-15 Andrew Haley <aph@redhat.com> PR java/14581 * parse.y (java_complete_lhs): Check that final variable has an initializer. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/parse.y.diff?cvsroot=gcc&r1=1.472&r2=1.473 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&r1=1.1339&r2=1.1340
.
Subject: Bug 14581 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_3-rhl-branch Changes by: jakub@gcc.gnu.org 2004-04-13 20:27:15 Modified files: gcc/java : ChangeLog parse.y Log message: PR java/14581 * parse.y (java_complete_lhs): Check that final variable has an initializer. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-rhl-branch&r1=1.1093.2.40.2.7&r2=1.1093.2.40.2.8 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/parse.y.diff?cvsroot=gcc&only_with_tag=gcc-3_3-rhl-branch&r1=1.405.2.10.2.2&r2=1.405.2.10.2.3
Subject: Bug 14581 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-rhl-branch Changes by: jakub@gcc.gnu.org 2004-04-22 17:40:58 Modified files: gcc/java : ChangeLog parse.y Log message: 2004-03-15 Andrew Haley <aph@redhat.com> PR java/14581 * parse.y (java_complete_lhs): Check that final variable has an initializer. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=1.1315.2.15&r2=1.1315.2.15.2.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/parse.y.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=1.464.4.2&r2=1.464.4.2.2.1