kargl at gcc dot changed:

           What    |Removed                     |Added
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-02-15
                 CC|                            |kargl at gcc dot
     Ever confirmed|0                           |1

--- Comment #1 from kargl at gcc dot ---
Further reduced testcase 

module mod1
   implicit none
   type :: type1
      integer :: i1
   end type type1
end module

module mod2
   implicit none
      subroutine sub1
         integer vals
         common /block1/ vals(5)
         if (any(vals /= [1, 2, 3, 4, 5])) stop 1
      end subroutine
end module

block data blkdat
  use mod1
  integer vals
  common /block1/ vals(5)
  data vals/1, 2, 3, 4, 5/
end block data blkdat

program main
  use mod2, only: sub1
  implicit none
  call sub1
end program

Looking at
0x7f911f check_conflict

This is really odd.  gdb shows 

Breakpoint 1, check_conflict (attr=attr@entry=0x203caec38, 
    name=0x203c22430 "_deallocate", where=where@entry=0x203caec78)
    at ../../gcc/gcc/fortran/symbol.c:485
485               gfc_error("%s attribute not allowed in BLOCK DATA program "
(gdb) p *where
$1 = {nextc = 0x0, lb = 0x0}

So, gfortran is inserting a _deallocate (perhaps for a temporary array).
I suspect were can the conflict check for a name starting with an

Reply via email to