Open
Description
Migrated from llvm-flang/flang#2
To reproduce:
$ cat bug_name.f90
subroutine mysub(x,y)
character :: x, y
y = x
end
program p
external mysub
character c,d
c = 'a'
call mysub(c,d)
print *, d
end
$ fort bug_name.f90
bug_name.o: In function `main':
bug_name.f90:(.text+0x7b): undefined reference to `mysub_.1'
collect2: error: ld returned 1 exit status
If you use -S -emit-llvm
you can see that callee is produced as mysub_
and caller is tying to invoke mysub_.1
.