Discussion:
[PR fortran/82865] Fix PDT declarations being parsed as PRINT statements with -fdec
Fritz Reese
2018-06-27 21:07:37 UTC
Permalink
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 <***@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
Janne Blomqvist
2018-06-28 06:33:42 UTC
Permalink
Post by Fritz Reese
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?
Ok, thanks.
--
Janne Blomqvist
Loading...