Skip to content

[flang] Intrinsic SELECTED_CHAR_KIND returns a different value from other compilers when there is a heading space in NAME #139156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
DanielCChen opened this issue May 8, 2025 · 2 comments
Labels
flang:frontend question A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!

Comments

@DanielCChen
Copy link
Contributor

Consider the following code:

program main
print *,selected_char_kind(" ascii")      ! heading space test
end

All gfortran, ifort and XLF returns -1 because of the heading space. Flang returns 1 however.
Is this different behavior intentional?

@llvmbot
Copy link
Member

llvmbot commented May 8, 2025

@llvm/issue-subscribers-flang-frontend

Author: Daniel Chen (DanielCChen)

Consider the following code: ``` program main print *,selected_char_kind(" ascii") ! heading space test end ```

All gfortran, ifort and XLF returns -1 because of the heading space. Flang returns 1 however.
Is this different behavior intentional?

@klausler
Copy link
Contributor

klausler commented May 9, 2025

Yes, it is intentional.

@klausler klausler closed this as completed May 9, 2025
@EugeneZelenko EugeneZelenko added the question A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead! label May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang:frontend question A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Projects
None yet
Development

No branches or pull requests

4 participants