forked from gcc-mirror/gcc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2019-11-06 Jerry DeLisle <[email protected]>
PR fortran/90374 * io.c (check_format): Allow zero width for D, E, EN, and ES specifiers as default and when -std=F2018 is given. Retain existing errors when using the -fdec family of flags. * libgfortran/io/format.c (parse_format_list): Relax format checking for zero width as default and when -std=f2018. io/format.h (format_token): Move definition to io.h. io/io.h (format_token): Add definition here to allow access to this definition at higher levels. Rename the declaration of write_real_g0 to write_real_w0 and add a new format_token argument, allowing higher level functions to pass in the token for handling of g0 vs the other zero width specifiers. io/transfer.c (formatted_transfer_scalar_write): Add checks for zero width and call write_real_w0 to handle it. io/write.c (write_real_g0): Remove. (write_real_w0): Add new, same as previous write_real_g0 except check format token to handle the g0 case. * gfortran.dg/fmt_error_10.f: Modify for new constraints. * gfortran.dg/fmt_error_7.f: Add dg-options "-std=f95". * gfortran.dg/fmt_error_9.f: Modify for new constraints. * gfortran.dg/fmt_zero_width.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@277905 138bc75d-0d04-0410-961f-82ee72b054a4
- Loading branch information
jvdelisle
committed
Nov 7, 2019
1 parent
fb3741c
commit e77fa95
Showing
13 changed files
with
152 additions
and
48 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
2019-11-06 Jerry DeLisle <[email protected]> | ||
|
||
PR fortran/90374 | ||
* io.c (check_format): Allow zero width for D, E, EN, and ES | ||
specifiers as default and when -std=F2018 is given. Retain | ||
existing errors when using the -fdec family of flags. | ||
|
||
2019-11-03 Thomas Koenig <[email protected]> | ||
|
||
PR fortran/92113 | ||
|
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 |
---|---|---|
@@ -1,3 +1,11 @@ | ||
2019-11-06 Jerry DeLisle <[email protected]> | ||
|
||
PR fortran/90374 | ||
* gfortran.dg/fmt_error_10.f: Modify for new constraints. | ||
* gfortran.dg/fmt_error_7.f: Add dg-options "-std=f95". | ||
* gfortran.dg/fmt_error_9.f: Modify for new constraints. | ||
* gfortran.dg/fmt_zero_width.f90: New test. | ||
|
||
2019-11-07 Joseph Myers <[email protected]> | ||
|
||
* gcc.dg/asm-wide-1.c, gcc.dg/diagnostic-token-ranges.c, | ||
|
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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
! { dg-do compile } | ||
! { dg-options "-std=f95" } | ||
|
||
! PR37446 Diagnostic of edit descriptors, esp. EN | ||
character(40) :: fmt_string | ||
write(*, '(1P,2E12.4)') 1.0 | ||
write(*,'(EN)') 5.0 ! { dg-error "Positive width required" } | ||
write(*,'(EN)') 5.0 ! { dg-error "positive width required" } | ||
write(*,'("abcdefg",EN6,"hjjklmnop")') 5.0 ! { dg-error "Period required" } | ||
end |
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,36 @@ | ||
! { dg-do run } | ||
! PR90374 "5.5 d0.d, e0.d, es0.d, en0.d, g0.d and ew.d edit descriptors | ||
program pr90374 | ||
real(4) :: rn | ||
character(32) :: afmt, aresult | ||
real(8) :: one = 1.0D0, zero = 0.0D0, nan, pinf, minf | ||
|
||
nan = zero/zero | ||
rn = 0.00314_4 | ||
afmt = "(D0.3)" | ||
write (aresult,fmt=afmt) rn | ||
if (aresult /= "0.314D-02") stop 12 | ||
afmt = "(E0.10)" | ||
write (aresult,fmt=afmt) rn | ||
if (aresult /= "0.3139999928E-02") stop 15 | ||
afmt = "(ES0.10)" | ||
write (aresult,fmt=afmt) rn | ||
if (aresult /= "3.1399999280E-03") stop 18 | ||
afmt = "(EN0.10)" | ||
write (aresult,fmt=afmt) rn | ||
if (aresult /= "3.1399999280E-03") stop 21 | ||
afmt = "(G0.10)" | ||
write (aresult,fmt=afmt) rn | ||
if (aresult /= "0.3139999928E-02") stop 24 | ||
write (aresult,fmt="(D0.3)") rn | ||
if (aresult /= "0.314D-02") stop 26 | ||
write (aresult,fmt="(E0.10)") rn | ||
if (aresult /= "0.3139999928E-02") stop 28 | ||
write (aresult,fmt="(ES0.10)") rn | ||
if (aresult /= "3.1399999280E-03") stop 30 | ||
write (aresult,fmt="(EN0.10)") rn | ||
if (aresult /= "3.1399999280E-03") stop 32 | ||
write (aresult,fmt="(G0.10)") rn | ||
if (aresult /= "0.3139999928E-02") stop 34 | ||
|
||
end |
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 |
---|---|---|
@@ -1,3 +1,20 @@ | ||
2019-11-06 Jerry DeLisle <[email protected]> | ||
|
||
PR fortran/90374 | ||
io/format.c (parse_format_list): Relax format checking for | ||
zero width as default and when -std=f2018. | ||
io/format.h (format_token): Move definition to io.h. | ||
io/io.h (format_token): Add definition here to allow access to | ||
this definition at higher levels. Rename the declaration of | ||
write_real_g0 to write_real_w0 and add a new format_token | ||
argument, allowing higher level functions to pass in the | ||
token for handling of g0 vs the other zero width specifiers. | ||
io/transfer.c (formatted_transfer_scalar_write): Add checks for | ||
zero width and call write_real_w0 to handle it. | ||
io/write.c (write_real_g0): Remove. | ||
(write_real_w0): Add new, same as previous write_real_g0 except | ||
check format token to handle the g0 case. | ||
|
||
2019-10-31 Tobias Burnus <[email protected]> | ||
|
||
PR fortran/92284. | ||
|
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
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
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