Re: [Patch, Fortran] dec comparisons - for approval
On Fri, Nov 22, 2019 at 12:33:47PM +0100, Tobias Burnus wrote: > > Mark Eggleston > > Jim MacArthur > > > > * gfortran.dg/dec-comparison.f90: New test. This test is UNRESOLVED everywhere, a test which expects dg-error diagnostic really can't be dg-do run, as for erroneous sources no executable is produced. Fixed thusly, tested on x86_64-linux, committed to trunk as obvious: 2019-11-26 Jakub Jelinek * gfortran.dg/dec-comparison.f90: Change dg-do from run to compile. --- gcc/testsuite/gfortran.dg/dec-comparison.f90.jj 2019-11-25 22:44:22.187388294 +0100 +++ gcc/testsuite/gfortran.dg/dec-comparison.f902019-11-26 00:23:08.669581035 +0100 @@ -1,4 +1,4 @@ -! { dg-do run } +! { dg-do compile } ! { dg-options "-fdec" } ! ! Test case contributed by Mark Eggleston @@ -38,4 +38,3 @@ program convert if (a.ne.d) stop 17 ! { dg-error "Operands of comparison" } if (d.eq.a) stop 18 ! { dg-error "Operands of comparison" } end program - Jakub
Re: [Patch, Fortran] dec comparisons - for approval
On 11/25/19 11:57 AM, Mark Eggleston wrote: On 22/11/2019 11:33, Tobias Burnus wrote: First, can you also create some news quip for your GCC 10 changes for https://gcc.gnu.org/gcc-10/changes.html ? See https://gcc.gnu.org/about.html#git for the repository to diff against. As I right in thinking that items should be added to the list of Fortran changes in the file gcc-wwwdocs/htdocs/gcc-10/changes.html? Yes – at least I assume that all your (relevant, user-visible) changes are for gfortran. Is there any procedure for checking changes to this repository? I think the usual – you create a diff, submit it, asking for comments/approval and then commit it. As with document changes, the bar is a bit lower than for code changes. You could/should also added Gerald Pfeifer in CC, who looks after the web pages; he often has some syntax remarks (like not ) or points-out typos or odd grammar :-) Cheers, Tobias
Re: [Patch, Fortran] dec comparisons - for approval
Commited https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=278674 On 22/11/2019 11:33, Tobias Burnus wrote: First, can you also create some news quip for your GCC 10 changes for https://gcc.gnu.org/gcc-10/changes.html ? See https://gcc.gnu.org/about.html#git for the repository to diff against. As I right in thinking that items should be added to the list of Fortran changes in the file gcc-wwwdocs/htdocs/gcc-10/changes.html? Is there any procedure for checking changes to this repository? regards, Mark On 11/21/19 12:05 PM, Mark Eggleston wrote: Please find attached an updated version of the patch originally submitted on 15th November. The comparisons with Holleriths are no only possible when using -fdec. s/no/now/ The test cases have been revised to check for errors when -fdec is not used. OK to commit in stage 3 or delay until stage 1 in the new year? LGTM – The first version of the patch has been posted before Stage 3, which also has just started, and is very restricted – all are good reasons that GCC 10 trunk is fine. Cheers, Tobias Change logs: gcc/fortran Mark Eggleston Jim MacArthur * gfortran.texi: Update Hollerith constants support for character types and use in comparisons. * invoke.texi: Tidy up list of options. Update description of -fdec-char-conversions. * resolve.c (is_character_based): New. (Convert_hollerith_to_character): New. (convert_to_numeric): New. (resolve_operator): If both sides are character based and -fdec is enabled convert Hollerith to character. If an operand is Hollerith, the other is numeric and -fdec is enabled convert to numeric. (resolve_ordinary_assign): Add check for -fdec-char-conversions for assignment of character literals. gcc/testsuite Mark Eggleston Jim MacArthur * gfortran.dg/dec-comparison-character_1.f90: New test. * gfortran.dg/dec-comparison-character_2.f90: New test. * gfortran.dg/dec-comparison-character_3.f90: New test. * gfortran.dg/dec-comparison-complex_1.f90: New test. * gfortran.dg/dec-comparison-complex_2.f90: New test. * gfortran.dg/dec-comparison-complex_3.f90: New test. * gfortran.dg/dec-comparison-int_1.f90: New test. * gfortran.dg/dec-comparison-int_2.f90: New test. * gfortran.dg/dec-comparison-int_3.f90: New test. * gfortran.dg/dec-comparison-real_1.f90: New test. * gfortran.dg/dec-comparison-real_2.f90: New test. * gfortran.dg/dec-comparison-real_3.f90: New test. * gfortran.dg/dec-comparison.f90: New test. -- https://www.codethink.co.uk/privacy.html 0001-dec-comparisons.patch From 2fc6d83614d7f58620a9a9662e9972b5d4018ed1 Mon Sep 17 00:00:00 2001 From: Mark Eggleston Date: Thu, 23 May 2019 09:42:26 +0100 Subject: [PATCH] dec comparisons Allow comparison of Hollerith constants with numeric and character expressions. Also allow comparison of character literalsa with numeric expressions. Enable using -fdec-comparisons or -fdec --- gcc/fortran/gfortran.texi | 32 + gcc/fortran/invoke.texi | 24 +- gcc/fortran/resolve.c | 54 +- .../gfortran.dg/dec-comparison-character_1.f90 | 18 .../gfortran.dg/dec-comparison-character_2.f90 | 18 .../gfortran.dg/dec-comparison-character_3.f90 | 26 +++ .../gfortran.dg/dec-comparison-complex_1.f90 | 17 +++ .../gfortran.dg/dec-comparison-complex_2.f90 | 14 ++ .../gfortran.dg/dec-comparison-complex_3.f90 | 18 gcc/testsuite/gfortran.dg/dec-comparison-int_1.f90 | 22 + gcc/testsuite/gfortran.dg/dec-comparison-int_2.f90 | 18 gcc/testsuite/gfortran.dg/dec-comparison-int_3.f90 | 26 +++ .../gfortran.dg/dec-comparison-real_1.f90 | 22 + .../gfortran.dg/dec-comparison-real_2.f90 | 18 .../gfortran.dg/dec-comparison-real_3.f90 | 26 +++ gcc/testsuite/gfortran.dg/dec-comparison.f90 | 41 16 files changed, 371 insertions(+), 23 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-character_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-character_2.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-character_3.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-complex_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-complex_2.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-complex_3.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-int_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-int_2.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-int_3.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-real_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-real_2
Re: [Patch, Fortran] dec comparisons - for approval
First, can you also create some news quip for your GCC 10 changes for https://gcc.gnu.org/gcc-10/changes.html ? See https://gcc.gnu.org/about.html#git for the repository to diff against. On 11/21/19 12:05 PM, Mark Eggleston wrote: Please find attached an updated version of the patch originally submitted on 15th November. The comparisons with Holleriths are no only possible when using -fdec. s/no/now/ The test cases have been revised to check for errors when -fdec is not used. OK to commit in stage 3 or delay until stage 1 in the new year? LGTM – The first version of the patch has been posted before Stage 3, which also has just started, and is very restricted – all are good reasons that GCC 10 trunk is fine. Cheers, Tobias Change logs: gcc/fortran Mark Eggleston Jim MacArthur * gfortran.texi: Update Hollerith constants support for character types and use in comparisons. * invoke.texi: Tidy up list of options. Update description of -fdec-char-conversions. * resolve.c (is_character_based): New. (Convert_hollerith_to_character): New. (convert_to_numeric): New. (resolve_operator): If both sides are character based and -fdec is enabled convert Hollerith to character. If an operand is Hollerith, the other is numeric and -fdec is enabled convert to numeric. (resolve_ordinary_assign): Add check for -fdec-char-conversions for assignment of character literals. gcc/testsuite Mark Eggleston Jim MacArthur * gfortran.dg/dec-comparison-character_1.f90: New test. * gfortran.dg/dec-comparison-character_2.f90: New test. * gfortran.dg/dec-comparison-character_3.f90: New test. * gfortran.dg/dec-comparison-complex_1.f90: New test. * gfortran.dg/dec-comparison-complex_2.f90: New test. * gfortran.dg/dec-comparison-complex_3.f90: New test. * gfortran.dg/dec-comparison-int_1.f90: New test. * gfortran.dg/dec-comparison-int_2.f90: New test. * gfortran.dg/dec-comparison-int_3.f90: New test. * gfortran.dg/dec-comparison-real_1.f90: New test. * gfortran.dg/dec-comparison-real_2.f90: New test. * gfortran.dg/dec-comparison-real_3.f90: New test. * gfortran.dg/dec-comparison.f90: New test. -- https://www.codethink.co.uk/privacy.html 0001-dec-comparisons.patch From 2fc6d83614d7f58620a9a9662e9972b5d4018ed1 Mon Sep 17 00:00:00 2001 From: Mark Eggleston Date: Thu, 23 May 2019 09:42:26 +0100 Subject: [PATCH] dec comparisons Allow comparison of Hollerith constants with numeric and character expressions. Also allow comparison of character literalsa with numeric expressions. Enable using -fdec-comparisons or -fdec --- gcc/fortran/gfortran.texi | 32 + gcc/fortran/invoke.texi| 24 +- gcc/fortran/resolve.c | 54 +- .../gfortran.dg/dec-comparison-character_1.f90 | 18 .../gfortran.dg/dec-comparison-character_2.f90 | 18 .../gfortran.dg/dec-comparison-character_3.f90 | 26 +++ .../gfortran.dg/dec-comparison-complex_1.f90 | 17 +++ .../gfortran.dg/dec-comparison-complex_2.f90 | 14 ++ .../gfortran.dg/dec-comparison-complex_3.f90 | 18 gcc/testsuite/gfortran.dg/dec-comparison-int_1.f90 | 22 + gcc/testsuite/gfortran.dg/dec-comparison-int_2.f90 | 18 gcc/testsuite/gfortran.dg/dec-comparison-int_3.f90 | 26 +++ .../gfortran.dg/dec-comparison-real_1.f90 | 22 + .../gfortran.dg/dec-comparison-real_2.f90 | 18 .../gfortran.dg/dec-comparison-real_3.f90 | 26 +++ gcc/testsuite/gfortran.dg/dec-comparison.f90 | 41 16 files changed, 371 insertions(+), 23 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-character_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-character_2.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-character_3.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-complex_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-complex_2.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-complex_3.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-int_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-int_2.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-int_3.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-real_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-real_2.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-real_3.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison.f90 diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi index a34ac5aa1bf..96be58b992d 100644 --- a/gcc/fortran/gfortran.texi +++ b/gcc/fortran/gfortran.texi @@ -1916,14 +1916,14 @@ in I/O
[Patch, Fortran] dec comparisons - for approval
Please find attached an updated version of the patch originally submitted on 15th November. The comparisons with Holleriths are no only possible when using -fdec. The test cases have been revised to check for errors when -fdec is not used. OK to commit in stage 3 or delay until stage 1 in the new year? Change logs: gcc/fortran Mark Eggleston Jim MacArthur * gfortran.texi: Update Hollerith constants support for character types and use in comparisons. * invoke.texi: Tidy up list of options. Update description of -fdec-char-conversions. * resolve.c (is_character_based): New. (Convert_hollerith_to_character): New. (convert_to_numeric): New. (resolve_operator): If both sides are character based and -fdec is enabled convert Hollerith to character. If an operand is Hollerith, the other is numeric and -fdec is enabled convert to numeric. (resolve_ordinary_assign): Add check for -fdec-char-conversions for assignment of character literals. gcc/testsuite Mark Eggleston Jim MacArthur * gfortran.dg/dec-comparison-character_1.f90: New test. * gfortran.dg/dec-comparison-character_2.f90: New test. * gfortran.dg/dec-comparison-character_3.f90: New test. * gfortran.dg/dec-comparison-complex_1.f90: New test. * gfortran.dg/dec-comparison-complex_2.f90: New test. * gfortran.dg/dec-comparison-complex_3.f90: New test. * gfortran.dg/dec-comparison-int_1.f90: New test. * gfortran.dg/dec-comparison-int_2.f90: New test. * gfortran.dg/dec-comparison-int_3.f90: New test. * gfortran.dg/dec-comparison-real_1.f90: New test. * gfortran.dg/dec-comparison-real_2.f90: New test. * gfortran.dg/dec-comparison-real_3.f90: New test. * gfortran.dg/dec-comparison.f90: New test. -- https://www.codethink.co.uk/privacy.html >From 2fc6d83614d7f58620a9a9662e9972b5d4018ed1 Mon Sep 17 00:00:00 2001 From: Mark Eggleston Date: Thu, 23 May 2019 09:42:26 +0100 Subject: [PATCH] dec comparisons Allow comparison of Hollerith constants with numeric and character expressions. Also allow comparison of character literalsa with numeric expressions. Enable using -fdec-comparisons or -fdec --- gcc/fortran/gfortran.texi | 32 + gcc/fortran/invoke.texi| 24 +- gcc/fortran/resolve.c | 54 +- .../gfortran.dg/dec-comparison-character_1.f90 | 18 .../gfortran.dg/dec-comparison-character_2.f90 | 18 .../gfortran.dg/dec-comparison-character_3.f90 | 26 +++ .../gfortran.dg/dec-comparison-complex_1.f90 | 17 +++ .../gfortran.dg/dec-comparison-complex_2.f90 | 14 ++ .../gfortran.dg/dec-comparison-complex_3.f90 | 18 gcc/testsuite/gfortran.dg/dec-comparison-int_1.f90 | 22 + gcc/testsuite/gfortran.dg/dec-comparison-int_2.f90 | 18 gcc/testsuite/gfortran.dg/dec-comparison-int_3.f90 | 26 +++ .../gfortran.dg/dec-comparison-real_1.f90 | 22 + .../gfortran.dg/dec-comparison-real_2.f90 | 18 .../gfortran.dg/dec-comparison-real_3.f90 | 26 +++ gcc/testsuite/gfortran.dg/dec-comparison.f90 | 41 16 files changed, 371 insertions(+), 23 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-character_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-character_2.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-character_3.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-complex_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-complex_2.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-complex_3.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-int_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-int_2.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-int_3.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-real_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-real_2.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison-real_3.f90 create mode 100644 gcc/testsuite/gfortran.dg/dec-comparison.f90 diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi index a34ac5aa1bf..96be58b992d 100644 --- a/gcc/fortran/gfortran.texi +++ b/gcc/fortran/gfortran.texi @@ -1916,14 +1916,14 @@ in I/O operations. @subsection Hollerith constants support @cindex Hollerith constants -GNU Fortran supports Hollerith constants in assignments, function -arguments, and @code{DATA} statements. A Hollerith constant is written -as a string of characters preceded by an integer constant indicating the -character count, and the letter @code{H} or @code{h}, and stored in -bytewise fashion in a numeric (@code{INTEGER}, @code{REAL}, or -@code{COMPLEX}) or @code{LOGICAL} variable. The constant will be