www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Problems with -checkaction=context

reply Per =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
Compiling


import std.experimental.all;

 safe pure nothrow  nogc unittest
{
     assert(1 == 3);
}

with ldmd2 version 1.15.0-beta2 as

     ldmd2 -vcolumns -checkaction=context -unittest foo.d

errors as

/home/per/.local/ldc2-1.15.0-beta2-linux-x86_64/bin/../impor
/object.d(4903,12): Error: cannot implicitly convert expression `buffer` of
type `char[]` to `string`
/home/per/.local/ldc2-1.15.0-beta2-linux-x86_64/bin/../import/st
/format.d(1246,16): Error: template instance `object._d_assert_fail!("==",
char[], string)` error instantiating
/home/per/.local/ldc2-1.15.0-beta2-linux-x86_64/bin/../import/s
d/bigint.d(924,70):        instantiated from here: `FormatSpec!char`
/home/per/.local/ldc2-1.15.0-beta2-linux-x86_64/bin/../import/s
d/complex.d(874,1): Error: template instance `std.complex.Complex!real` error
instantiating


And with dmd v2.085.1-beta.1 as

     dmd -vcolumns -checkaction=context -unittest foo.d

it errors in similar way

/usr/include/dmd/druntime/import/object.d(4845,12): Error: cannot 
implicitly convert expression `buffer` of type `char[]` to 
`string`
/usr/include/dmd/phobos/std/format.d(1246,16): Error: template 
instance `object._d_assert_fail!("==", char[], string)` error 
instantiating
/usr/include/dmd/phobos/std/bigint.d(924,70):        instantiated 
from here: `FormatSpec!char`
/usr/include/dmd/phobos/std/complex.d(874,1): Error: template 
instance `std.complex.Complex!real` error instantiating
Mar 26 2019
next sibling parent reply Per =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
On Tuesday, 26 March 2019 at 10:47:18 UTC, Per Nordlöw wrote:
 Compiling
Has anybody filed a bugzilla for this issue?
Mar 26 2019
parent reply Basile B. <b2.temp gmx.com> writes:
On Tuesday, 26 March 2019 at 10:54:29 UTC, Per Nordlöw wrote:
 On Tuesday, 26 March 2019 at 10:47:18 UTC, Per Nordlöw wrote:
 Compiling
Has anybody filed a bugzilla for this issue?
No, you should.
Mar 27 2019
parent reply Kagamin <spam here.lot> writes:
https://issues.dlang.org/show_bug.cgi?id=19764
Mar 27 2019
parent reply Per =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
On Wednesday, 27 March 2019 at 18:28:05 UTC, Kagamin wrote:
 https://issues.dlang.org/show_bug.cgi?id=19764
What about the missing return cast(string)castbuffer; Isn't that needed aswell?
Mar 27 2019
parent Per =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
On Wednesday, 27 March 2019 at 21:18:22 UTC, Per Nordlöw wrote:
 On Wednesday, 27 March 2019 at 18:28:05 UTC, Kagamin wrote:
 https://issues.dlang.org/show_bug.cgi?id=19764
What about the missing return cast(string)castbuffer; Isn't that needed aswell?
Fix at https://github.com/dlang/druntime/pull/2528
Mar 27 2019
prev sibling next sibling parent Per =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
On Tuesday, 26 March 2019 at 10:47:18 UTC, Per Nordlöw wrote:
 Compiling

 import std.experimental.all;

  safe pure nothrow  nogc unittest
 {
     assert(1 == 3);
 }
Note that code compiles and runs correctly if the import is removed.
Mar 26 2019
prev sibling parent reply Per =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
On Tuesday, 26 March 2019 at 10:47:18 UTC, Per Nordlöw wrote:
 errors as

 /home/per/.local/ldc2-1.15.0-beta2-linux-x86_64/bin/../impor
/object.d(4903,12): Error: cannot implicitly convert expression `buffer` of
type `char[]` to `string`
Code compiles when I qualify `_d_assert_fail` as ` trusted` and replace its return statement with return cast(string)castbuffer; But then ldmd2 crashes as /home/per/.local/ldc2-1.15.0-beta2-linux-x86_64/bin/ldc2(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x2a)[0x2d619ca] /home/per/.local/ldc2-1.15.0-beta2-linux-x86_64/bin/ldc2(_ZN4llvm3sys17RunSignalHandlersEv+0x4c)[0x2d5f94c] /home/per/.local/ldc2-1.15.0-beta2-linux-x86_64/bin/ldc2[0x2d5fab7] /lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7fc9d4f45890] /home/per/.local/ldc2-1.15.0-beta2-linux-x86_64/bin/ldc2(_ZN25ExpressionSemanticVisitor5visitEP9AssertExp+0x44e)[0xcc67fe] /home/per/.local/ldc2-1.15.0-beta2-linux-x86_64/bin/ldc2(_ZN24StatementSemanticVisitor5visitEP12ExpStatement+0x62)[0xb911b2] /home/per/.local/ldc2-1.15.0-beta2-linux-x86_64/bin/ldc2(_ZN24StatementSemanticVisitor5visitEP17CompoundStatement+0x130)[0xb91b30] /home/per/.local/ldc2-1.15.0-beta2-linux-x86_64/bin/ldc2(_ZN24StatementSemanticVisitor5visitEP19TryFinallyStatement+0x3d)[0xbb14fd] /home/per/.local/ldc2-1.15.0-beta2-linux-x86_64/bin/ldc2(_ZN24StatementSemanticVisitor5visitEP17CompoundStatement+0xc4c)[0xb9264c] /home/per/.local/ldc2-1.15.0-beta2-linux-x86_64/bin/ldc2(_ZN16Semantic3Visitor5visitEP15FuncDeclaration+0x1832)[0xbc7752] /home/per/.local/ldc2-1.15.0-beta2-linux-x86_64/bin/ldc2(_ZN16Semantic3Visitor5visitEP17AttribDeclaration+0x7e)[0xbd029e] /home/per/.local/ldc2-1.15.0-beta2-linux-x86_64/bin/ldc2(_ZN16Semantic3Visitor5visitEP17AttribDeclaration+0x7e)[0xbd029e] /home/per/.local/ldc2-1.15.0-beta2-linux-x86_64/bin/ldc2(_ZN16Semantic3Visitor5visitEP17AttribDeclaration+0x7e)[0xbd029e] /home/per/.local/ldc2-1.15.0-beta2-linux-x86_64/bin/ldc2(_ZN16Semantic3Visitor5visitEP20AggregateDeclaration+0x8d)[0xbd036d] /home/per/.local/ldc2-1.15.0-beta2-linux-x86_64/bin/ldc2(_ZN16Semantic3Visitor5visitEP16TemplateInstance+0x142)[0xbc52a2] /home/per/.local/ldc2-1.15.0-beta2-linux-x86_64/bin/ldc2(_ZN16Semantic3Visitor5visitEP6Module+0x95)[0xbc5b05] /home/per/.local/ldc2-1.15.0-beta2-linux-x86_64/bin/ldc2(_Z13mars_mainBodyR5ParamR5ArrayIPKcES5_+0xdf7)[0xc3cbd7] /home/per/.local/ldc2-1.15.0-beta2-linux-x86_64/bin/ldc2(_Z7cppmainiPPc+0x17d6)[0xe52676] /home/per/.local/ldc2-1.15.0-beta2-linux-x86_64/bin/ldc2(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll()+0x50)[0x2fa46a0] /home/per/.local/ldc2-1.15.0-beta2-linux-x86_64/bin/ldc2(_d_run_main+0x218)[0x2fa44b8] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7fc9d41ecb97] /home/per/.local/ldc2-1.15.0-beta2-linux-x86_64/bin/ldc2(_start+0x29)[0xb51939] Error: Error executing /home/per/.local/ldc2-1.15.0-beta2-linux-x86_64/bin/ldc2: Segmentation fault (core dumped)
Mar 27 2019
parent kinke <noone nowhere.com> writes:
On Wednesday, 27 March 2019 at 14:01:38 UTC, Per Nordlöw wrote:
 But then ldmd2 crashes as
The frontend crashes, i.e., DMD too: https://issues.dlang.org/show_bug.cgi?id=19768
Mar 27 2019