Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include core.internal.* in druntime build. #770

Merged
merged 2 commits into from
Nov 13, 2014

Conversation

dnadlinger
Copy link
Member

No description provided.

@dnadlinger
Copy link
Member Author

Can anybody check out the unit testing failure? Will take me a few days to get to this. (Otherwise, we should probably just disable the test, as not compiling in the modules is even worse, see the NG.)

@andreiamatuni
Copy link

test that's failing:

private void testNumberConvert(string v)()
    {
        enum ctval = mixin(v);

        alias TYPE = typeof(ctval);
        auto rtval = ctval;
        auto rtbytes = *cast(ubyte[TYPE.sizeof]*)&rtval;

        enum ctbytes = toUbyte2(ctval);

        assert(rtbytes[] == ctbytes);
    }

the Travis build log doesn't seem to show which invocation of testNumberConvert() is the one that's failing, unless I'm missing something. There's a pretty large block of calls to this function.

@redstar
Copy link
Member

redstar commented Oct 27, 2014

It looks like that all test are failing which uses real data type. E.g.

testNumberConvert("0.0L")

is one of the failing tests.

@redstar
Copy link
Member

redstar commented Oct 27, 2014

On Linux/PPC64le I can't compile this class. Error:

../ldc/runtime/druntime/src/core/internal/convert.d(268): Error: assert(x > 0.00000F) failed
../ldc/runtime/druntime/src/core/internal/convert.d(97):        called from here: binLog2(x)
../ldc/runtime/druntime/src/core/internal/convert.d(28):        called from here: parse(val)
../ldc/runtime/druntime/src/core/internal/convert.d(315):        called from here: toUbyte(val)
../ldc/runtime/druntime/src/core/internal/convert.d(315):        called from here: dup(toUbyte(val))
../ldc/runtime/druntime/src/core/internal/convert.d(326):        called from here: toUbyte2(-0.00000F)
../ldc/runtime/druntime/src/core/internal/convert.d(336): Error: template instance core.internal.convert.testNumberConvert!"-0.0F" error instantiating

@redstar
Copy link
Member

redstar commented Nov 10, 2014

The Linux/PPC64 and Win64 MSVC error is fixed with pull #782.

@redstar
Copy link
Member

redstar commented Nov 10, 2014

The unit tests fail because the last 2 bytes of the runtime computed arrays (rtbytes) contain garbage but the last 2 bytes of the CTFE computed arrays (ctbytes) are zero. Looks like a padding issue with real type.

dnadlinger added a commit that referenced this pull request Nov 13, 2014
Include core.internal.* in druntime build.
@dnadlinger dnadlinger merged commit 93c43ff into ldc-developers:master Nov 13, 2014
@dnadlinger dnadlinger deleted the build-core-internal branch November 13, 2014 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants