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

            Bug ID: 118536
           Summary: G formatted printing of UNSIGNED fails
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libfortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: anlauf at gcc dot gnu.org
  Target Milestone: ---

I would expect this to be valid now:

  print '(g0)', 1   ! OK (of course...)
  print *, 1u       ! OK (list-directed)
  print '(g0)', 1u  ! crash
end

but I get:

% gfc-15 unsigned_write2.f90 -funsigned -static-libgfortran -g && ./a.out 
1
           1
At line 3 of file unsigned_write2.f90 (unit = 6, file = 'stdout')
Internal Error: formatted_transfer (): Bad type

Error termination. Backtrace:
#0  0x4088dd in formatted_transfer_scalar_write
        at ../../../gcc-trunk/libgfortran/io/transfer.c:2384
#1  0x409172 in formatted_transfer
        at ../../../gcc-trunk/libgfortran/io/transfer.c:2599
#2  0x402a3d in MAIN__
        at /home/anlauf/gcc-bugs/unsigned_write2.f90:3
#3  0x402a83 in main
        at /home/anlauf/gcc-bugs/unsigned_write2.f90:4

Reply via email to