Bug ID: 41776
           Summary: Using __attribute__((weak,dllimport)) results in clang
                    generating invalid IR
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend


int __attribute__((weak, dllimport)) my_weak(int x); // { return x; }
int main() {
  if (my_weak)
  return 13;

$ clang -cc1 -triple x86_64-windows-msvc t.c -S -o t.s
Global is marked as dllimport, but not external
i32 (i32)* @my_weak
fatal error: error in backend: Broken module found, compilation aborted!
Stack dump:
0.      Program arguments: C:\src\llvm-project\build\bin\clang.exe -cc1 -triple
x86_64-windows-msvc t.c -S -o t.s
1.      <eof> parser at end of file
2.      Per-function optimization

You are receiving this mail because:
You are on the CC list for the bug.
llvm-bugs mailing list

Reply via email to