Results 218 comments of Johan Engelen
trafficstars

This issue is probably pervasive throughout LDC. ```d align(1) float float1; extern(C) auto fooglobalglobal() { return float1; // also does not create IR with align(1) } ``` For the struct...

Example lit test: ```d // RUN: %ldc -output-ll -of=%t.ll %s && FileCheck %s < %t.ll struct S { byte i; align(1) long data; } // CHECK-LABEL: define{{.*}} @foofoofoo extern(C) long...

FYI it is this unittest in core.thread.fiber that is causing trouble on AArch64 (both macOS, and linux-musl): https://github.com/ldc-developers/ldc/blob/40ad5f7583fe90a85fd675bfc0cfc287d565c94a/runtime/druntime/src/core/thread/fiber.d#L2303-L2350 ```d version(AArch64) return; ``` fixes things for me. (both on macOS and...

(btw, this prevents compilation of druntime with `-fsanitize=address` :()

Note: to get equal assembly output from `llc` as from `ldc2`, `llc` must be called with `-O0` explicit. Edit: and with the explicit `-O0`, I can reproduce it with `llc`....

Testcase without ASan: ```d void foo() { align(32) uint[4] a; asm pure nothrow @nogc { mov a+4, EBX; } } ```

LLVM needs some work to support it: https://lists.llvm.org/pipermail/llvm-dev/2017-August/116244.html

> Any tips on how to debug this issue to be able to provide more information or come up with a reduced test case? If it reproduces, you can use...

Unclear what the exact bug is, see this post by @ibuclaw https://forum.dlang.org/post/[email protected] Perhaps `a > b` is undefined/implementation-defined when evaluation of `a` or `b` changes the evaluation of the other.

@rikkimax Please submit an upstream bug report, to find out what the correct solution is here (e.g. improve the spec).