What wrong?

Fyodor Ustinov via Digitalmars-d digitalmars-d at puremagic.com
Mon May 4 09:19:49 PDT 2015


On Monday, 4 May 2015 at 12:19:27 UTC, anonymous wrote:
> On Monday, 4 May 2015 at 08:48:47 UTC, Fyodor Ustinov wrote:
>> Simple code:
>>
>> http://pastebin.com/raw.php?i=7jVeMFXQ
>>
>> This code works compiled by DMD v2.066.1 and LDC2 (0.15.1) 
>> based
>> on DMD v2.066.1 and LLVM 3.5.0.
>>
>> $ ./z
>> TUQLUE
>> 42
>> 11
>>
>> Compiled by DMD v2.067.1 the program crashes:
>> $ ./aa
>> TUQLUE
>> Segmentation fault
>>
>> What I'm doing wrong?
>

>     ~this() {
>         fptr();
>     }
     ~this() {
         writeln(fptr);
         fptr();
     }

$ ./aa
TUQLUE
464E70
464E70
464E70
464E70
464E70
464E70
464E70
464E70
464E70
464E70
464E70
6C2AD0
Segmentation fault

OMG.


More information about the Digitalmars-d mailing list