[PR fortran/82865] Fix PDT declarations being parsed as PRINT statements with -fdec
Fritz Reese
fritzoreese@gmail.com
Wed Jun 27 21:07:00 GMT 2018
One extension enabled by -fdec is the ability to interpret TYPE ....
as a PRINT statement for compatibility purposes. When PDTs were
introduced, the code that handles -fde TYPE matching was not updated.
This patch fixes TYPE matching to no longer interpret <TYPE
name(parameter)> as a PRINT statement when -fdec is asserted. Passes
regression tests as well.
The patch is attached. OK for trunk and 7/8-branch?
0dd08cefc2476014487b3eeab059784ab21bb41b Mon Sep 17 00:00:00 2001
From: Fritz Reese <fritzoreese@gmail.com>
Date: Wed, 27 Jun 2018 15:43:45 -0400
Subject: [PATCH 3/3] PR fortran/82865
Do not override PDT declarations from gfc_match_type with -fdec.
gcc/fortran/
* decl.c (gfc_match_type): Refactor and check for PDT declarations.
gcc/testsuite/
* gfortran.dg/dec_type_print_2.f03: New testcase.
---
gcc/fortran/decl.c | 66 +++++++++++++-------------
gcc/testsuite/gfortran.dg/dec_type_print_2.f03 | 59 +++++++++++++++++++++++
2 files changed, 93 insertions(+), 32 deletions(-)
create mode 100644 gcc/testsuite/gfortran.dg/dec_type_print_2.f03
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-PR-fortran-82865.patch
Type: text/x-patch
Size: 5624 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180627/37e015db/attachment.bin>
More information about the Gcc-patches
mailing list