[Bug fortran/60483] [4.7/4.8/4.9 Regression] No IMPLICIT type error with: ASSOCIATE( X => derived_type() ) [i.e. w/ structure constructor]

janus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Mar 10 18:30:00 GMT 2014


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60483

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-03-10
                 CC|                            |janus at gcc dot gnu.org
            Summary|No IMPLICIT type error      |[4.7/4.8/4.9 Regression] No
                   |with: ASSOCIATE( X =>       |IMPLICIT type error with:
                   |derived_type() ) [i.e. w/   |ASSOCIATE( X =>
                   |structure constructor]      |derived_type() ) [i.e. w/
                   |                            |structure constructor]
     Ever confirmed|0                           |1

--- Comment #1 from janus at gcc dot gnu.org ---
This is a carry-over from PR 60458.

Reduced test case:

  implicit none
  Type T
    integer :: val = 2
  end type

  associate(X => T())
    print *, X%val
  end associate

end


The error with 4.8 and trunk is:

    print *, X%val
               1
Error: Symbol 'x' at (1) has no IMPLICIT type


With 4.7 it is:

    print *, X%val
              1
Error: Syntax error in PRINT statement at (1)


And with 4.6 it compiles cleanly, which makes it a regression.



More information about the Gcc-bugs mailing list