uabelho added a comment.

Hi,

I noticed this produces broken code:
clang -cc1 -triple amdgcn-- -emit-llvm -o - -x c op.c

with op.c being

  void bar();
  
  void foo() {
    bar();
  }

The result is

  define dso_local void @foo() #0 {
  entry:
    call void @bar(i32 noundef 42)
    ret void
  }
  
  declare void @bar(...) #1

and feeding it to e.g. opt we get

  build-all-builtins/bin/opt: <stdin>:9:13: error: invalid forward reference to 
function 'bar' with wrong type: expected 'void (...)*' but was 'void ()*'
    call void @bar()
              ^

Probably the same for several targets.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123300/new/

https://reviews.llvm.org/D123300

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to