Skip to content

LDC halt with -w and use of function _and_ parameter magic attributes. #4907

@bcarneal

Description

@bcarneal

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];
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions