Issue 126010
Summary [flang] issue in using iso_c_binding functions
Labels flang
Assignees
Reporter shivaramaarao
    consider the following testcase
program main
use iso_c_binding
integer,target :: w,x

  print *, c_associated(c_loc(w), c_loc(x))

end program

this program compiles fine when used this way.
$flang test.f90

but when used by specifying the include path it throws error.

$flang -I<compiler_path>/include/flang test.f90
error: Semantic errors in test.f90
./test.f90:5:12: error: No specific function of generic 'c_associated' matches the actual arguments
    print *, c_associated(c_loc(w), c_loc(x))
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

e.g usage:
 /home/shivaram/stg_builds/clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04/bin/flang-new -v -I /home/shivaram/stg_builds/clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04/include/flang test.f90

The issue is reproducible with flang-21 as well.


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

Reply via email to