Allow CHARACTER literals in assignments and data statements.
authorMark Eggleston <mark.eggleston@codethink.com>
Fri, 8 Nov 2019 14:28:57 +0000 (14:28 +0000)
committerMark Eggleston <markeggleston@gcc.gnu.org>
Fri, 8 Nov 2019 14:28:57 +0000 (14:28 +0000)
commit2afeb1ca38dbb7c8708272452417426e46b4d6ed
tree64a5d856971870bc05da3d569128a278bcffa3a5
parent4e9d58d16767b1bc686f0c4b3bd2da25dc71e8f3
Allow CHARACTER literals in assignments and data statements.

Allows character literals to used to assign values to non-character variables
in the same way that Hollerith constants are used. In addition character
literals can be used in data statements just like Hollerith constants.

Warnings of such use are output to discourage this usage as it is a non-standard
legacy feature and must be explicitly enabled.

Enabled by -fdec and -fdec-char-conversions.

Co-Authored-By: Jim MacArthur <jim.macarthur@codethink.co.uk>
From-SVN: r277975
31 files changed:
gcc/fortran/ChangeLog
gcc/fortran/arith.c
gcc/fortran/arith.h
gcc/fortran/expr.c
gcc/fortran/gfortran.texi
gcc/fortran/intrinsic.c
gcc/fortran/invoke.texi
gcc/fortran/lang.opt
gcc/fortran/options.c
gcc/fortran/resolve.c
gcc/fortran/simplify.c
gcc/fortran/trans-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/dec_char_conversion_in_assignment_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/dec_char_conversion_in_assignment_2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/dec_char_conversion_in_assignment_3.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/dec_char_conversion_in_assignment_4.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/dec_char_conversion_in_assignment_5.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/dec_char_conversion_in_assignment_6.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/dec_char_conversion_in_assignment_7.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/dec_char_conversion_in_assignment_8.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/dec_char_conversion_in_data_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/dec_char_conversion_in_data_2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/dec_char_conversion_in_data_3.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/dec_char_conversion_in_data_4.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/dec_char_conversion_in_data_5.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/dec_char_conversion_in_data_6.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/dec_char_conversion_in_data_7.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/hollerith5.f90
gcc/testsuite/gfortran.dg/hollerith_legacy.f90
gcc/testsuite/gfortran.dg/no_char_to_numeric_assign.f90 [new file with mode: 0644]