https://issues.apache.org/ooo/show_bug.cgi?id=63614

hanya <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #11 from hanya <[email protected]> ---
I found the strange difference among the following in disassembled optree.

- Original
Sub Main
IIf(true, 1.0, "")
End Sub

-- Disassembled
Position Op Op1      Op2        OpStr   
-----------------------------------------
00000000                            Lbl00000000:
00000000 45 00000000              JUMP    Lbl0000  // Label
; Sub Main
00000005                            Main:
00000005 87 00000003 00000000     STMNT    3,0 (For-Level: 0)
; IIf(true, 1.0, "")
0000000E 87 00000004 00000000     STMNT    4,0 (For-Level: 0)
00000017 18                       ARGC         // new argv
00000018 80 00000002 0000000C     RTL    true    ; Variant
00000021 19                       ARGV    
00000022 40 00000004              NUMBER    "1"
00000027 19                       ARGV    
00000028 41 00000005              STRING    ""
0000002D 19                       ARGV    
0000002E 80 00008003 00000000     RTL    IIf    ; Empty, Args
00000037 1C                       GET    
; End Sub
00000038 87 00000005 00000000     STMNT    5,0 (For-Level: 0)
00000041 2B                       LEAVE    

Execute the code above in the Basic IDE and then change like the following.

- Second argument is modified
Sub Main
IIf(true, "", "")
End Sub

Execute the code to be compiled -> error.

-- Disassembled
Only position 2E shows important difference from the original.
Position Op Op1      Op2        OpStr   
-----------------------------------------
0000002E 80 00008003 00000002     RTL    IIf    ; Integer, Args

Op2 is type information. It was changed from Empty to Integer.

- After restarting the office
The same code above gave correct opcode.
0000002E 80 00008003 00000000     RTL    IIf    ; Empty, Args


The wrong Op2 code gives the error message because impossible to assign the
value. Type miss match between desired type and real return value from the
function call.

-- 
You are receiving this mail because:
You are on the CC list for the issue.
You are watching all issue changes.

Reply via email to