digitalmars.D.bugs - [Issue 23056] New: importC: dmd asserts for missing return statement
- d-bugmail puremagic.com (64/64) Apr 24 2022 https://issues.dlang.org/show_bug.cgi?id=23056
https://issues.dlang.org/show_bug.cgi?id=23056 Issue ID: 23056 Summary: importC: dmd asserts for missing return statement in CTFE function Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: CTFE, ImportC Severity: minor Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: duser neet.fi CC: duser neet.fi affects C files only, maybe they have some error turned off int test(void){} _Static_assert(test(), ""); core.exception.AssertError src/dmd/dinterpret.d(698): Assertion failure ---------------- ??:? _d_assertp [0x90fba1] src/dmd/dinterpret.d:698 dmd.expression.Expression dmd.dinterpret.interpretFunction(dmd.expression.UnionExp*, dmd.func.FuncDeclaration, dmd.dinterpret.InterState*, dmd.root.array.Array!(dmd.expression.Expression).Array*, dmd.expression.Expression) [0x66160e] src/dmd/dinterpret.d:4922 _ZN11Interpreter5visitEP7CallExp [0x66da82] src/dmd/expression.d:5152 _ZN7CallExp6acceptEP7Visitor [0x6de081] src/dmd/dinterpret.d:6380 dmd.expression.Expression dmd.dinterpret.interpret(dmd.expression.UnionExp*, dmd.expression.Expression, dmd.dinterpret.InterState*, dmd.dinterpret.CTFEGoal) [0x6725bc] src/dmd/dinterpret.d:6390 dmd.expression.Expression dmd.dinterpret.interpret(dmd.expression.Expression, dmd.dinterpret.InterState*, dmd.dinterpret.CTFEGoal) [0x672615] src/dmd/dinterpret.d:100 dmd.expression.Expression dmd.dinterpret.ctfeInterpret(dmd.expression.Expression) [0x65f482] src/dmd/expression.d:1602 _ZN10Expression13ctfeInterpretEv [0x6d5998] src/dmd/staticcond.d:109 bool dmd.staticcond.evalStaticCondition(dmd.dscope.Scope*, dmd.expression.Expression, dmd.expression.Expression, out bool, dmd.root.array.Array!(dmd.expression.Expression).Array*).impl(dmd.expression.Expression) [0x79a694] src/dmd/staticcond.d:123 bool dmd.staticcond.evalStaticCondition(dmd.dscope.Scope*, dmd.expression.Expression, dmd.expression.Expression, out bool, dmd.root.array.Array!(dmd.expression.Expression).Array*) [0x79a443] src/dmd/semantic2.d:103 _ZN16Semantic2Visitor5visitEP12StaticAssert [0x77d139] src/dmd/staticassert.d:69 _ZN12StaticAssert6acceptEP7Visitor [0x79a3f6] src/dmd/semantic2.d:79 _Z9semantic2P7DsymbolP5Scope [0x77d069] src/dmd/semantic2.d:525 _ZN16Semantic2Visitor5visitEP17AttribDeclaration [0x77e21a] src/dmd/parsetimevisitor.d:71 _ZN16ParseTimeVisitorI10ASTCodegenE5visitEP15LinkDeclaration [0x779c9e] src/dmd/attrib.d:433 _ZN15LinkDeclaration6acceptEP7Visitor [0x61ed99] src/dmd/semantic2.d:79 _Z9semantic2P7DsymbolP5Scope [0x77d069] src/dmd/semantic2.d:339 _ZN16Semantic2Visitor5visitEP6Module [0x77db3e] src/dmd/dmodule.d:1452 _ZN6Module6acceptEP7Visitor [0x67d239] src/dmd/semantic2.d:79 _Z9semantic2P7DsymbolP5Scope [0x77d069] src/dmd/mars.d:460 int dmd.mars.tryMain(ulong, const(char)**, ref dmd.globals.Param) [0x607e78] src/dmd/mars.d:958 _Dmain [0x609abd] line numbers at commit 035a9efa1c404c90e5c0140f939cb02d02f1cc15 --
Apr 24 2022