This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, Fortran] Allow CHARACTER literals in assignments and DATA statements
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Tobias Burnus <tobias at codesourcery dot com>, Mark Eggleston <mark dot eggleston at codethink dot co dot uk>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, fortran <fortran at gcc dot gnu dot org>, Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- Date: Sat, 9 Nov 2019 01:00:13 +0100
- Subject: Re: [PATCH, Fortran] Allow CHARACTER literals in assignments and DATA statements
- References: <6ef3c9e9-0c3c-d860-4589-cb0be4f3333a@codethink.co.uk> <b7af35f6-5484-2826-2536-a905b48b827e@codesourcery.com> <831ed2ee-ecea-a668-352b-bab15aa6f1e3@codethink.co.uk> <30b736e1-ac80-65c1-3fa2-1d120522296a@codesourcery.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Nov 08, 2019 at 11:17:21AM +0100, Tobias Burnus wrote:
> > Jim MacArthur <jim.macarthur@codethink.co.uk>
> > Mark Eggleston <mark.eggleston@codethink.com>
> >
> > PR fortran/89103
> > * gfortran.dg/dec_char_conversion_in_assignment_1.f90: New test.
> > * gfortran.dg/dec_char_conversion_in_assignment_2.f90: New test.
> > * gfortran.dg/dec_char_conversion_in_assignment_3.f90: New test.
> > * gfortran.dg/dec_char_conversion_in_assignment_4.f90: New test.
> > * gfortran.dg/dec_char_conversion_in_assignment_5.f90: New test.
> > * gfortran.dg/dec_char_conversion_in_assignment_6.f90: New test.
> > * gfortran.dg/dec_char_conversion_in_assignment_7.f90: New test.
> > * gfortran.dg/dec_char_conversion_in_assignment_8.f90: New test.
> > * gfortran.dg/dec_char_conversion_in_data_1.f90: New test.
> > * gfortran.dg/dec_char_conversion_in_data_2.f90: New test.
> > * gfortran.dg/dec_char_conversion_in_data_3.f90: New test.
> > * gfortran.dg/dec_char_conversion_in_data_4.f90: New test.
> > * gfortran.dg/dec_char_conversion_in_data_5.f90: New test.
> > * gfortran.dg/dec_char_conversion_in_data_6.f90: New test.
> > * gfortran.dg/dec_char_conversion_in_data_7.f90: New test.
> > * gfortran.dg/hollerith5.f90: Add -Wsurprising to options.
> > * gfortran.dg/hollerith_legacy.f90: Add -Wsurprising to options.
> > * gfortran.dg/no_char_to_numeric_assign.f90: New test.
After full bootstrap/regtest, I've also noticed:
+UNRESOLVED: gfortran.dg/dec_char_conversion_in_assignment_4.f90 -O0 compilation failed to produce executable
+UNRESOLVED: gfortran.dg/dec_char_conversion_in_assignment_4.f90 -O1 compilation failed to produce executable
+UNRESOLVED: gfortran.dg/dec_char_conversion_in_assignment_4.f90 -O2 compilation failed to produce executable
+UNRESOLVED: gfortran.dg/dec_char_conversion_in_assignment_4.f90 -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions compilation failed to produce executable
+UNRESOLVED: gfortran.dg/dec_char_conversion_in_assignment_4.f90 -O3 -g compilation failed to produce executable
+UNRESOLVED: gfortran.dg/dec_char_conversion_in_assignment_4.f90 -Os compilation failed to produce executable
+UNRESOLVED: gfortran.dg/dec_char_conversion_in_data_3.f90 -O0 compilation failed to produce executable
+UNRESOLVED: gfortran.dg/dec_char_conversion_in_data_3.f90 -O1 compilation failed to produce executable
+UNRESOLVED: gfortran.dg/dec_char_conversion_in_data_3.f90 -O2 compilation failed to produce executable
+UNRESOLVED: gfortran.dg/dec_char_conversion_in_data_3.f90 -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions compilation failed to produce executable
+UNRESOLVED: gfortran.dg/dec_char_conversion_in_data_3.f90 -O3 -g compilation failed to produce executable
+UNRESOLVED: gfortran.dg/dec_char_conversion_in_data_3.f90 -Os compilation failed to produce executable
Tests with dg-error are expected to fail compilation, so won't produce
executable and thus can't be run.
Fixed thusly, tested on x86_64-linux, committed to trunk as obvious.
2019-11-09 Jakub Jelinek <jakub@redhat.com>
* gfortran.dg/dec_char_conversion_in_assignment_4.f90: Use
dg-do compile instead of dg-do run.
* gfortran.dg/dec_char_conversion_in_data_3.f90: Likewise.
--- testsuite/gfortran.dg/dec_char_conversion_in_assignment_4.f90 (revision 277993)
+++ testsuite/gfortran.dg/dec_char_conversion_in_assignment_4.f90 (working copy)
@@ -1,4 +1,4 @@
-! { dg-do run }
+! { dg-do compile }
! { dg-options "-fdec -fno-dec-char-conversions" }
!
! Modified by Mark Eggleston <mark.eggleston@codethink.com>
@@ -17,4 +17,3 @@ include "dec_char_conversion_in_assignme
! { dg-error "Cannot convert" " " { target *-*-* } 47 }
! { dg-error "Cannot convert" " " { target *-*-* } 48 }
! { dg-error "Cannot convert" " " { target *-*-* } 49 }
-
--- testsuite/gfortran.dg/dec_char_conversion_in_data_3.f90 (revision 277993)
+++ testsuite/gfortran.dg/dec_char_conversion_in_data_3.f90 (working copy)
@@ -1,4 +1,4 @@
-! { dg-do run }
+! { dg-do compile }
! { dg-options "-fdec -fno-dec-char-conversions" }
!
! Modified by Mark Eggleston <mark.eggleston@codethink.com>
@@ -17,4 +17,3 @@ include "dec_char_conversion_in_data_1.f
! { dg-error "Incompatible types" " " { target *-*-* } 68 }
! { dg-error "Incompatible types" " " { target *-*-* } 69 }
! { dg-error "Incompatible types" " " { target *-*-* } 70 }
-
Jakub