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:
parent
d994b336c8
commit
4ebe7d9317
6 changed files with 64 additions and 33 deletions
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;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue