mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-22 20:01:22 -05:00
PR java/21540, PR java/13788:
gcc/java/: PR java/21540, PR java/13788: * parse.y (java_complete_lhs) <CASE_EXPR>: Use fold_constant_for_init. (patch_binop): Added 'folding' argument. Updated all callers. (patch_unaryop) <NOP_EXPR>: New case. (fold_constant_for_init) <NOP_EXPR>: Likewise. (fold_constant_for_init) <COND_EXPR>: Fix sense of test. libjava/: PR java/21540, PR java/13788: * testsuite/libjava.compile/pr21540.java: New file. * testsuite/libjava.compile/pr13788.java: New file. * testsuite/libjava.jacks/jacks.xfail: Updated. From-SVN: r101358
This commit is contained in:
8
libjava/testsuite/libjava.compile/pr13788.java
Normal file
8
libjava/testsuite/libjava.compile/pr13788.java
Normal file
@@ -0,0 +1,8 @@
|
||||
class pr13788 {
|
||||
private static final int DUMMY1 = 1 >>> 1;
|
||||
|
||||
public static void main(String [] args) {
|
||||
System.out.println(DUMMY1);
|
||||
}
|
||||
}
|
||||
|
||||
15
libjava/testsuite/libjava.compile/pr21540.java
Normal file
15
libjava/testsuite/libjava.compile/pr21540.java
Normal file
@@ -0,0 +1,15 @@
|
||||
public class pr21540
|
||||
{
|
||||
public static final long xxx = 555;
|
||||
|
||||
public boolean fn (int v)
|
||||
{
|
||||
switch (v)
|
||||
{
|
||||
case ((int) xxx >>> 32):
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user