Thread overview | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
October 21, 2010 [dmd-internals] runnable/interpret.d + -O == failure | ||||
---|---|---|---|---|
| ||||
I switched the linux auto-tester over to run the full test suite rather than just the quick version (just the no-args version of every test). I figured it's automated and the box is idle 99% of the time anyway.. so it's worth spending the extra cycles to get more test coverage instead of cycling faster. Good thing I did. :) It's failing (reliably) on runnable/interpret.d when building with -O. It ran successfully with a bunch of other combinations. first failed: ../src/dmd -Irunnable -O -odtest_results/runnable -oftest_results/runnable/interpret runnable/interpret.d passed: <none> -inline -release -inline -release -gc -inline -gc -release -gc -inline -release -gc I'll go spend a little time narrowing down exactly which test fails and do a bit of regression hunting through the dmd changes since the last full release. But, something's currently not perfect. Later, Brad |
October 21, 2010 [dmd-internals] runnable/interpret.d + -O == failure | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brad Roberts | reduced down to this subset of the file: ==================== struct S { int x; } int badfoo2(){ S[] c; c[7].x=6; // uninitialized error return 7; } template Compileable(int z) { bool OK;} static assert(!is(typeof(Compileable!(badfoo2()).OK))); int main() { return 0; } ==================== |
October 21, 2010 [dmd-internals] runnable/interpret.d + -O == failure | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brad Roberts | The compiler has just got better at detecting errors! There's something wrong with the tests in that file (there are multiple instances of Compileable, and they're all wrong!). Here's a fixed one. -------------- next part -------------- A non-text attachment was scrubbed... Name: interpret.d Type: application/octet-stream Size: 44200 bytes Desc: not available URL: <http://lists.puremagic.com/pipermail/dmd-internals/attachments/20101021/a02ba162/attachment-0001.obj> |
October 21, 2010 [dmd-internals] runnable/interpret.d + -O == failure | ||||
---|---|---|---|---|
| ||||
Posted in reply to Don Clugston | On 10/21/2010 1:18 AM, Don Clugston wrote:
> The compiler has just got better at detecting errors!
> There's something wrong with the tests in that file (there are
> multiple instances of Compileable, and they're all wrong!). Here's a
> fixed one.
Walter changed it to run with -O with his recent change, it used to be excluded (no idea why, it started that way with the oldest version of the dmd test suite I have a copy of). I tromped back through dmd svn history quite a ways and it doesn't look like -O and that test have ever gotten along (I stopped at around r500 as old enough to not care if it's a regression or not).
Did you intend this new version of interpret.d to be checked in or just as a demo of what's wrong with it. I'm mostly asking about the manual inlining of badfoo2 into the static assert.
I can confirm that this change to the test fixes that specific problem, though it just moves a little further into the file and dies on:
runnable/interpret.d(2109): Error: variable w used before set
int goodfoo3()
{
S[4] w = void; // uninitialized array of structs
w[$-2].x = 217; // initialize one member
return w[2].x; // <-- line 2109
}
static assert(goodfoo3()==217);
Same scenario, passes everything up to the first time -O is included in the compiler args.
Walter, this is one of the reasons I groaned when you told me you hadn't actually TESTED the change you made to the new test suite. Shame shame shame on you.
|
October 21, 2010 [dmd-internals] runnable/interpret.d + -O == failure | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brad Roberts | On 21 October 2010 10:32, Brad Roberts <braddr at puremagic.com> wrote:
> On 10/21/2010 1:18 AM, Don Clugston wrote:
>> The compiler has just got better at detecting errors!
>> There's something wrong with the tests in that file (there are
>> multiple instances of Compileable, and they're all wrong!). Here's a
>> fixed one.
>
> Walter changed it to run with -O with his recent change, it used to be excluded (no idea why, it started that way with the oldest version of the dmd test suite I have a copy of). ?I tromped back through dmd svn history quite a ways and it doesn't look like -O and that test have ever gotten along (I stopped at around r500 as old enough to not care if it's a regression or not).
>
> Did you intend this new version of interpret.d to be checked in or just as a demo of what's wrong with it. ?I'm mostly asking about the manual inlining of badfoo2 into the static assert.
To be checked in. Manual inlining prevents it from ever getting compiled.
|
October 21, 2010 [dmd-internals] runnable/interpret.d + -O == failure | ||||
---|---|---|---|---|
| ||||
Posted in reply to Don Clugston | On 10/21/2010 1:34 AM, Don Clugston wrote:
> On 21 October 2010 10:32, Brad Roberts <braddr at puremagic.com> wrote:
>> On 10/21/2010 1:18 AM, Don Clugston wrote:
>>> The compiler has just got better at detecting errors!
>>> There's something wrong with the tests in that file (there are
>>> multiple instances of Compileable, and they're all wrong!). Here's a
>>> fixed one.
>>
>> Walter changed it to run with -O with his recent change, it used to be excluded (no idea why, it started that way with the oldest version of the dmd test suite I have a copy of). I tromped back through dmd svn history quite a ways and it doesn't look like -O and that test have ever gotten along (I stopped at around r500 as old enough to not care if it's a regression or not).
>>
>> Did you intend this new version of interpret.d to be checked in or just as a demo of what's wrong with it. I'm mostly asking about the manual inlining of badfoo2 into the static assert.
>
> To be checked in. Manual inlining prevents it from ever getting compiled.
Ok.. looks odd with just 1 of the 8 failure tests inlined like that.
Feel free to submit it. :)
I'm going to leave the linux auto-tester running the full dmd test suite, so it'll continue to break until it's fixed fully. I need to hit the sack (it's 2am here) so can't look at the rest of the brokenness tonight.
Later,
Brad
|
October 21, 2010 [dmd-internals] runnable/interpret.d + -O == failure | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brad Roberts | On 21 October 2010 10:48, Brad Roberts <braddr at puremagic.com> wrote:
> On 10/21/2010 1:34 AM, Don Clugston wrote:
>> On 21 October 2010 10:32, Brad Roberts <braddr at puremagic.com> wrote:
>>> On 10/21/2010 1:18 AM, Don Clugston wrote:
>>>> The compiler has just got better at detecting errors!
>>>> There's something wrong with the tests in that file (there are
>>>> multiple instances of Compileable, and they're all wrong!). Here's a
>>>> fixed one.
>>>
>>> Walter changed it to run with -O with his recent change, it used to be excluded (no idea why, it started that way with the oldest version of the dmd test suite I have a copy of). ?I tromped back through dmd svn history quite a ways and it doesn't look like -O and that test have ever gotten along (I stopped at around r500 as old enough to not care if it's a regression or not).
>>>
>>> Did you intend this new version of interpret.d to be checked in or just as a demo of what's wrong with it. ?I'm mostly asking about the manual inlining of badfoo2 into the static assert.
>>
>> To be checked in. Manual inlining prevents it from ever getting compiled.
>
> Ok.. looks odd with just 1 of the 8 failure tests inlined like that.
>
> Feel free to submit it. :)
I can't. Only you and Walter have write access.
|
October 21, 2010 [dmd-internals] runnable/interpret.d + -O == failure | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brad Roberts | On 21 October 2010 10:32, Brad Roberts <braddr at puremagic.com> wrote:
> I can confirm that this change to the test fixes that specific problem, though it just moves a little further into the file and dies on:
>
> runnable/interpret.d(2109): Error: variable w used before set
It compiles correctly on Windows.
|
October 21, 2010 [dmd-internals] runnable/interpret.d + -O == failure | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brad Roberts | On Oct 21, 2010, at 4:32 AM, Brad Roberts <braddr at puremagic.com> wrote:
> Walter, this is one of the reasons I groaned when you told me you hadn't actually TESTED the change you made to the new test suite. Shame shame shame on you.
That seems a little harsh. One of the benefits to continuous integration is that it frees you from having to run every test under the sun with every checkin. Sure, problems will get checked in, but they should be caught quickly. If only a small subset of checkins cause a failure and any failures are fixed quickly, then it should be considered ok to checkin with only basic testing.
|
October 21, 2010 [dmd-internals] runnable/interpret.d + -O == failure | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brad Roberts |
Brad Roberts wrote:
> Walter, this is one of the reasons I groaned when you told me you hadn't actually TESTED the change you made to the new test suite. Shame shame shame on you.
>
>
>
Actually, I did test it, just with my runner, which doesn't run with -O.
|
Copyright © 1999-2021 by the D Language Foundation