-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flang] Don't emit debugging output to module file
When a constant array value has a non-default lower bound, the current expression formatting code uses a non-Fortran syntax to dump the lower bounds. (There's no way in Fortran to explicitly specify such a constant value, but they can be created through the use of named constants.) But we don't want this lower bounds syntax from expression dumping to show up in module files, since it can't be parsed back in. So disable that part of expression formatting by default. Fixes #64391. Differential Revision: https://reviews.llvm.org/D157330
- Loading branch information
Showing
2 changed files
with
20 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
! RUN: %python %S/test_modfile.py %s %flang_fc1 | ||
! Named constant array with non-default lower bound | ||
module m | ||
real, parameter :: x(0:0) = [0.] | ||
end | ||
|
||
!Expect: m.mod | ||
!module m | ||
!real(4),parameter::x(0_8:0_8)=[REAL(4)::0._4] | ||
!end |