Created attachment 1902
Full "project" including dub.json
Having a file with this piece of code in sources crashes compiler with -4 exit code. Reduced with dustmite.
Names and imports don't matter (import std; crashes also).
------------------------------------------------
import std.math: sin, acos;
struct ErrorStruct {
float[] data;
this(float[] vals...) { data = [vals[0]]; }
ErrorStruct doMath(double a) {
double d;
float hth = acos(d);
float ra = sin(-a * hth);
float rb = a * hth;
return ErrorStruct(ra + rb);
}
}
------------------------------------------------
Also I'm sorry about issue name but I genuenly have no idea why it does that here
Comment #1 by b2.temp — 2023-12-06T15:10:09Z
You need to compile -O to get the dmd SIGILL.
---
Program received signal SIGILL, Illegal instruction.
0x000055555596f8c6 in comsub(CodeBuilder&, elem*, unsigned int*) ()
Missing separate debuginfos, use: dnf debuginfo-install dmd-2.104.0-0.x86_64
(gdb) bt
#0 0x000055555596f8c6 in comsub(CodeBuilder&, elem*, unsigned int*) ()
#1 0x000055555596df78 in codelem(CodeBuilder&, elem*, unsigned int*, unsigned int) ()
#2 0x00005555559b6893 in orthxmm(CodeBuilder&, elem*, unsigned int*) ()
#3 0x000055555596e022 in codelem(CodeBuilder&, elem*, unsigned int*, unsigned int) ()
#4 0x00005555559b3e6d in xmmcnvt(CodeBuilder&, elem*, unsigned int*) ()
#5 0x000055555596e022 in codelem(CodeBuilder&, elem*, unsigned int*, unsigned int) ()
#6 0x000055555597986d in scodelem(CodeBuilder&, elem*, unsigned int*, unsigned int, bool) ()
#7 0x00005555559af218 in xmmeq(CodeBuilder&, elem*, unsigned int, elem*, elem*, unsigned int*) ()
#8 0x000055555596e022 in codelem(CodeBuilder&, elem*, unsigned int*, unsigned int) ()
--Type <RET> for more, q to quit, c to continue without paging--
#9 0x00005555559c3abb in outblkexitcode(CodeBuilder&, block*, int&, char const*, Symbol**, unsigned int) ()
#10 0x00005555559d5be1 in blcodgen(block*) ()
#11 0x00005555559cd17d in codgen(Symbol*) ()
#12 0x00005555559e69ab in writefunc2(Symbol*) ()
#13 0x00005555557d2634 in toObjFile::ToObjFile::visit(FuncDeclaration*) ()
#14 0x00005555557d3961 in toObjFile::ToObjFile::visit(StructDeclaration*) ()
#15 0x00005555558d688e in genObjFile(Module*, bool) ()
#16 0x00005555558d2cba in dmd.glue.generateCodeAndWrite(dmd.dmodule.Module[], const(char)*[], const(char)[], const(char)[], bool, bool, bool, bool, bool) ()
#17 0x00005555558f5e08 in dmd.mars.tryMain(ulong, const(char)**, ref dmd.globals.Param) ()
#18 0x00005555558ff801 in D main ()
---