[Issue 13861] compiler segfault with nested struct, cannot access frame

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Dec 15 04:20:03 PST 2014


https://issues.dlang.org/show_bug.cgi?id=13861

--- Comment #6 from John Colvin <john.loughran.colvin at gmail.com> ---
(In reply to Vlad Levenfeld from comment #5)
> The second script is what I tried before, and it just seems to produce an
> unrelated segfault from definitely incorrect (and unrelated-looking) code.

Please submit that as a separate bug report. If you're lucky it might fix this
one too, you never know.

(In reply to Vlad Levenfeld from comment #4)
> I'm sorry but I can't get the first script to work. It either reduces the
> codebase to nothing or else I get "Initial Test fails"

Just to clarify, you should have a setup like this:

myFolder
| - projectFolder
    | - the code to reduce
| - dustmiteTest.sh

and you should be able to check your script like this:

$ cd myFolder/projectFolder
$ ../dustmiteTest.sh
$ echo $?
0

Obviously you have to be careful that your script isn't catching false
positives (e.g. if you only checked for failure to compile+link, then dustmite
will happily remove all your code).

An example of a test script for this bug would be

#!/bin/sh

# arguments to dmd
DMDARGS="file0.d file1.d"

OUTPUT=$(gdb --batch -ex "run $DMDARGS" dmd 2>&1)
echo "$OUTPUT" | fgrep -q 'in FuncDeclaration::hasNestedFrameRefs'
exit $?

--


More information about the Digitalmars-d-bugs mailing list