## digitalmars.D.learn - long problems

• Ellery Newcomer (5/5) Dec 22 2010 quick question - will the following code do as I expect?
• Ellery Newcomer (6/11) Dec 22 2010 nevermind, it's failing with
• Jonathan M Davis (7/16) Dec 22 2010 That would depend on what you expect. If you expect x to be equal 42, yo...
• Ellery Newcomer (3/6) Dec 22 2010 try this on your machine:
• Jonathan M Davis (4/13) Dec 22 2010 Without optimizations on, it works just fine, but it does fail on my mac...
Ellery Newcomer <ellery-newcomer utulsa.edu> writes:
```quick question - will the following code do as I expect?

long x;

x = -1;

assert(x == -1);

cuz I've hit a spot where the optimizer isn't loading the high dword into x
```
Dec 22 2010
Ellery Newcomer <ellery-newcomer utulsa.edu> writes:
```On 12/22/2010 11:04 PM, Ellery Newcomer wrote:
quick question - will the following code do as I expect?

long x;

x = -1;

assert(x == -1);

cuz I've hit a spot where the optimizer isn't loading the high dword into x

nevermind, it's failing with
x = cast(long) -1

and

x = -1L

also
```
Dec 22 2010
Jonathan M Davis <jmdavisProg gmx.com> writes:
```On Wednesday 22 December 2010 21:04:37 Ellery Newcomer wrote:
quick question - will the following code do as I expect?

long x;

x = -1;

assert(x == -1);

cuz I've hit a spot where the optimizer isn't loading the high dword into x

That would depend on what you expect. If you expect x to be equal 42, you're
likely to be dissapointed. ;)

That said, it's definitely a bug if that assertion fails - an _enormous_ bug
really. Regardless, it works just fine on my machine. So, whatever the
optimizer
does or doesn't do, the assertion doesn't fail.

- Jonathan M Davis
```
Dec 22 2010
Ellery Newcomer <ellery-newcomer utulsa.edu> writes:
```On 12/22/2010 11:10 PM, Jonathan M Davis wrote:
That said, it's definitely a bug if that assertion fails - an _enormous_ bug
really. Regardless, it works just fine on my machine.

http://d.puremagic.com/issues/show_bug.cgi?id=5364

- Jonathan M Davis

```
Dec 22 2010
Jonathan M Davis <jmdavisProg gmx.com> writes:
```On Wednesday 22 December 2010 21:57:06 Ellery Newcomer wrote:
On 12/22/2010 11:10 PM, Jonathan M Davis wrote:
That said, it's definitely a bug if that assertion fails - an _enormous_
bug really. Regardless, it works just fine on my machine.