ICE for character function result length mismatch in len call
MRE
character(8) function text()
text = "abcdefgh"
end function text
program mismatch
character(4) :: text
print *, len(text())
end program mismatch
output
(base) opixdown@Unknown_ee:a0:8d:2a:05:f5 lfortran % lfortran t.f90
Segfault: Signal SIGSEGV (segmentation fault) received
gfortran behavior
(base) opixdown@Unknown_ee:a0:8d:2a:05:f5 lfortran % gfortran t.f90
Error: Interface mismatch in global procedure 'text' at (1): Character length mismatch in function result
Thanks for the bug @opixdown I am on it.
Hi @opixdown can you check the standard once and tell me that should i throw this error by default or when using implicit-interface flag.Currently i can see that using --implicit-interface this mre compiles and gives output as 4.
@Jatinagarwal24 It should throw error without the tag and compile with implicit-interface
Hi @opixdown I am pusing the pr but i was getting some issue in adding the test in continue_compilation_1.f90 . Can you help me with that.
Hi @opixdown I solved the issue of adding the test in continue_compilation_1.f90.
Thanks.