Bug 190320 - [compiler] conditional expression can lead to dead bytecodes
Summary: [compiler] conditional expression can lead to dead bytecodes
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-31 15:06 EDT by Olivier Thomann CLA
Modified: 2022-10-12 14:57 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2007-05-31 15:06:41 EDT
Another example that can lead to dead bytecodes:

public class X {
    public static void main(String[] args) {
        if ((null==null ? null:null) == (null==null ? null:null))
        	System.out.print("2");
    }
}

  public static void main(String[] args);
     0  aconst_null
     1  goto 5
     4  aconst_null
     5  aconst_null
     6  goto 10
     9  aconst_null
    10  if_acmpne 21
    13  getstatic System.out : PrintStream [16]
    16  ldc <String "2"> [22]
    18  invokevirtual PrintStream.print(String) : void [24]
    21  return

Bytecodes at pc 4 and 9 are dead.
Comment 1 Eclipse Genie CLA 2020-08-21 06:53:12 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Eclipse Genie CLA 2022-10-12 14:57:57 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.