doh cagney@nettle$ cat frysk-imports/tests/EnumClass.java class EnumClass { static public final EnumClass x = new EnumClass (); } cagney@nettle$ cat frysk-imports/tests/ClassSwitch.java class ClassSwitch { public static void main (String[] args) { switch (args.length) { case EnumClass.x: return; } System.out.println ("Switched"); } } cagney@nettle$ gcj -I frysk-imports/tests frysk-imports/tests/ClassSwitch.java frysk-imports/tests/ClassSwitch.java:5: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
Upstream tracker: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27400
Index: frysk-imports/tests/ChangeLog 2006-05-02 Andrew Cagney <cagney@redhat.com> * Makefile.am (frysk2630/noerror.sh, frysk2631/ice.sh): Add rules. * frysk2630/ClassIndex.java: New. * frysk2631/EnumClass.java: New. * frysk2631/ClassSwitch.java: New.
This doesn't crash the compiler anymore with gcc version 4.1.2 20070222 (Red Hat 4.1.2-3) Note however that it is invalid code: $ gcj -I ../../../frysk/frysk-imports/tests/frysk2631 -d . ../../../frysk/frysk-imports/tests/frysk2631/ClassSwitch.java ../../../frysk/frysk-imports/tests/frysk2631/ClassSwitch.java:6: error: Type mismatch: cannot convert from EnumClass to int case EnumClass.x: return; ^^^^^^^^^^^ 1 problem (1 error) $ echo $? 1 So this testcase will never PASS. Since there is no way to distinquish between the two exit states I think this test should just be removed.
2>&1 | grep internal compiler error gives the status you need
(In reply to comment #4) > 2>&1 | grep internal compiler error > > gives the status you need Good idea. Checked in: 2007-03-08 Mark Wielaard <mark@klomp.org> * Makefile.am (frysk2631/ice.sh): Grep for 'internal compiler error:'. Which makes frysk2631/ice.sh XFAIL with FC5/6 gcj, but now XPASSes with rawhide gcj.