﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
3594	Bitwise operators in MetaModelica are broken	Per Östlund	Martin Sjölund	"The bitwise operators in MetaModelica seem to be completely broken, e.g.:
{{{#!mo
intBitLShift(1, 1))   // 1 << 1 = 2,   OMC says 2. ok!
intBitLShift(1, 2))   // 1 << 2 = 4,   OMC still says 2!
intBitLShift(32, 1))  // 32 << 1 = 64, OMC says 2^37!?
intBitRShift(1, 1))   // 1 >> 1 = 0,   OMC says 0. ok!
intBitRShift(2, 1))   // 2 >> 1 = 1,   OMC says 0.
intBitRShift(64, 5))  // 64 >> 5 = 2,  OMC says 0.
intBitOr(1, 2))       // 1 | 2 = 3,    OMC says 1.
intBitAnd(7, 4))      // 7 & 4 = 4,    OMC says 7.
}}}
The code generation just generates normal C operators for these, so I'm guessing the issue is due to some fun boxing/unboxing stuff. The operators are not actually used in the compiler at the moment, which would explain why noone's noticed before."	defect	closed	critical	1.9.4	MetaModelica		fixed		
