We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Version of flang-new : 17.0.0(633146093c4ea78dc8f56a27006fe4eed84be370)
The character array a1(1) is initialized with uppercase letters, but printed with lowercase letters. a2(1) and a3(1) are correct.
a1(1)
a2(1)
a3(1)
The following are the test program, results of Flang-new, GFortran and ifort compilation and execution.
z01.f90:
z01.f90
program main character(len=30),parameter:: a1(1)=(/& "ABCDEFGHIJKLMNOPQRSTUVWXYZ"/) character(len=30),parameter:: a2(1)=(/& &"ABCDEFGHIJKLMNOPQRSTUVWXYZ"/) character(len=30),parameter:: a3(1)=(/"ABCDEFGHIJKLMNOPQRSTUVWXYZ"/) write(6,*) "a1(1) = ", a1(1) write(6,*) "a2(1) = ", a2(1) write(6,*) "a3(1) = ", a3(1) end program main
$ flang-new -flang-experimental-exec z01.f90; ./a.out a1(1) = abcdefghijklmnopqrstuvwxyz a2(1) = ABCDEFGHIJKLMNOPQRSTUVWXYZ a3(1) = ABCDEFGHIJKLMNOPQRSTUVWXYZ $
$ gfortran z01.f90; ./a.out a1(1) = ABCDEFGHIJKLMNOPQRSTUVWXYZ a2(1) = ABCDEFGHIJKLMNOPQRSTUVWXYZ a3(1) = ABCDEFGHIJKLMNOPQRSTUVWXYZ $
$ ifort z01.f90; ./a.out a1(1) = ABCDEFGHIJKLMNOPQRSTUVWXYZ a2(1) = ABCDEFGHIJKLMNOPQRSTUVWXYZ a3(1) = ABCDEFGHIJKLMNOPQRSTUVWXYZ $
The text was updated successfully, but these errors were encountered:
Reduced test:
program main character(len=3) :: a =& "ABC" print *, a end program main
Interestingly, if a space is added between = and & or before the string literal then the issue doesn't occur.
=
&
Sorry, something went wrong.
Patch: https://reviews.llvm.org/D151885
@llvm/issue-subscribers-flang-frontend
0e1fa91
luporl
No branches or pull requests
The character array
a1(1)
is initialized with uppercase letters, but printed with lowercase letters.a2(1)
anda3(1)
are correct.The following are the test program, results of Flang-new, GFortran and ifort compilation and execution.
z01.f90
:The text was updated successfully, but these errors were encountered: