[PR fortran/89266, patch] - ICE with TRANSFER of len=0 character array constructor

Dominique d'Humières dominiq@lps.ens.fr
Sat Feb 23 19:57:00 GMT 2019


Hi!

Please hold on!

With the patch, compiling the test from 34202

program bug4a
   implicit none
   type bug4
! Intentionally left empty
   end type bug4
   type compound
      integer a
      type(bug4) b
      type(bug4) c
      integer d
      type(bug4) e
   end type compound
   type(bug4) t
   type(compound) c
   type(bug4), parameter :: f = bug4()
   type(compound), parameter :: g = compound(1,f,bug4(),4,f)
   type other
      real x(0)
   end type other

   c = compound(1,t,t,4,t)
   write(*,*) c
   write(*,*) g%d
   write(*,*) size(transfer(1,[bug4()]))
   write(*,*) size(transfer(1,['']))
   write(*,*) size(transfer(1,[other()]))
   write(*,*) transfer(transfer([1],[bug4()]),[1],size[1])
end program bug4a

start something weird after emitting the error

% time gfcp pr34202.f90
pr34202.f90:27:54:

   27 |    write(*,*) transfer(transfer([1],[bug4()]),[1],size[1])
      |                                                      1
Error: Function 'size' requires an argument list at (1)
^C0.003u 0.005s 0:12.66 0.0%	0+0k 0+0io 0pf+0w

TIA

Dominique



More information about the Gcc-patches mailing list