Skip to content

Subroutine name mismatch between caller and callee #2

Open
@ppenzin

Description

@ppenzin

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions