ldc
ldc copied to clipboard
LDC halt with `-w` and use of function _and_ parameter magic attributes.
When compiling a function with -w and @target attribute LDC will exit with a spurious warning: "ignoring unrecognized special parameter attribute ...".
Here's the program that elicited the warning and subsequent exit on godbolt using 1.39.0:
import core.attribute;
@target("arch=znver4") void f(size_t n, int* a, int* b, @restrict int* dst) {
foreach(i, ref x; dst[0 .. n])
x = a[i] + b[i];
}
This is not specific to @target. Test case fails for any LDC magic attribute (e.g. replace @target with @hidden)
Good to hear it's repeatable and somewhat "generic".
On Mon, Apr 14, 2025 at 2:02 PM Johan Engelen @.***> wrote:
This is not specific to @target. Test case fails for any LDC magic attribute (e.g. replace @target with @hidden)
— Reply to this email directly, view it on GitHub https://github.com/ldc-developers/ldc/issues/4907#issuecomment-2802982019, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASZLZVMSBKM64PE5RYEERPD2ZQO4ZAVCNFSM6AAAAAB3BUVMQWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMBSHE4DEMBRHE . You are receiving this because you authored the thread.Message ID: @.***> JohanEngelen left a comment (ldc-developers/ldc#4907) https://github.com/ldc-developers/ldc/issues/4907#issuecomment-2802982019
This is not specific to @target. Test case fails for any LDC magic attribute (e.g. replace @target with @hidden)
— Reply to this email directly, view it on GitHub https://github.com/ldc-developers/ldc/issues/4907#issuecomment-2802982019, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASZLZVMSBKM64PE5RYEERPD2ZQO4ZAVCNFSM6AAAAAB3BUVMQWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMBSHE4DEMBRHE . You are receiving this because you authored the thread.Message ID: @.***>