! { dg-do run }
! { dg-options "-mcmodel=medium" }
      program bugmedium_model
      implicit none
      integer n
      parameter (n=400)
      double precision 
     >   a (0:n,0:n,0:n),
     >   b (5,0:n,0:n, 0:n)
      common /foo1/ a, b
      double precision tmpf
      integer tmpi4
      integer*8 tmpi8
      common /foo2/ tmpf, tmpi8, tmpi4
      tmpf = tmpf + 1
      tmpi4 = tmpi4 + 1
      tmpi8 = tmpi8 + 1
      if (tmpf .ne. 1) then
         call abort
      endif 
      if (tmpi4 .ne. 1) then
         call abort
      endif 
      if (tmpi8 .ne. 1) then
         call abort
      endif 
      end program bugmedium_model
