Skip to content

[OpenMP] declare target does not work for inline functions #64185

@jdoerfert

Description

@jdoerfert

If an inline function is used in a target region we do not automatically compile it for the device (mark it as declare target):

https://godbolt.org/z/E4Y5dzsx5

inline void foo() {}

void test( ){
    #pragma omp target
    foo();
}

results in:

; Function Attrs: convergent
declare void @foo()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions