https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65173

Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gerhard.steinmetz.fortran@t
                   |                            |-online.de

--- Comment #3 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> 
---
Several more examples.
The dimension attribute may be placed this way or that way.


gfortran-6 (release) aborts with ...
(null):0: confused by earlier errors, bailing out


gfortran-7 (experimental) aborts in one of ...
gfc_is_constant_expr
gfc_get_default_type
gfc_resolve_expr


... with one of these messages :
Error: Allocatable component of structure at (1) must have a deferred shape
Error: Array component of structure at (1) must have an explicit shape
Error: Expression at (1) must be of INTEGER type, found PROCEDURE
Error: Syntax error in data declaration at (1)



$ cat z0.f90
program p
   type t
      character(1), allocatable :: names(256)
   end type
end


$ cat z1.f90
program p
   type t
      character(:), allocatable :: x(n)
   end type
end


$ cat z2.f90
program p
   type t
      character(*), allocatable :: x(*)
   end type
end


$ cat z3.f90
program p
   type t
      character(*) :: x y
   end type
end


$ cat z4.f90
program p
   type t
      character(*) :: x+1
   end type
end


$ cat z5.f90
program p
   type t
   end type
   type, extends(t) :: t2
      character x =
   end type
end


$ cat z6.f90
program p
   type t
   end type
   type, extends(t) :: t2
      character x 'x'
   end type
end


$ cat z7.f90
program p
   type t
   end type
   type, extends(t) :: t2
      character x(:)
   end type
end


$ cat z8.f90
program p
   type t
      character(:), allocatable :: x(y)1
   end type
end


...

Reply via email to