I'm not sure if it's due more to doubles or unions, but the bug was found via double. It seems the dags code generator doesn't see that the assignment to the union's double field kills the two int fields. The test passes when NOT optimizing.