Hi Jerry,

I note that you have not written that testcase and I am still half
aspleep, but I fail to see what's wrong with the following program
(before and after your change):

f2 looks like a local and implicitly typed real variable. At least ifort
compiles this program successfully.

F2018 has: "A namelist group object shall either be accessed by use or
host association or shall have its declared type, kind type parameters
of the declared type, and rank specified by previous specification
statements or the procedure heading in the same scoping unit or by the
implicit typing rules in effect for the scoping unit. If a namelist
group object is typed by the implicit typing rules, its appearance in
any subsequent type declaration statement shall confirm the implied type
and type parameters."

Tobias

On 17.02.21 04:02, Jerry DeLisle wrote:
index 538bceaa4b6..4e021253f01 100644
--- a/gcc/testsuite/gfortran.dg/namelist_4.f90
+++ b/gcc/testsuite/gfortran.dg/namelist_4.f90
@@ -27,14 +27,14 @@ END module M1
  program P1
  CONTAINS
  ! This has the additional wrinkle of a reference to the object.
+  INTEGER FUNCTION F2()
+    F2=1
+  END FUNCTION
    INTEGER FUNCTION F1()
      NAMELIST /NML3/ F2 ! { dg-error "PROCEDURE attribute conflicts" }
  ! Used to ICE here
-    f2 = 1             ! { dg-error "is not a VALUE" }
+    f2 = 1             ! { dg-error "is not a variable" }
      F1=1
    END FUNCTION
-  INTEGER FUNCTION F2()
-    F2=1
-  END FUNCTION
  END
-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München 
Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank 
Thürauf

Reply via email to