http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50149

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org
           Severity|major                       |normal

--- Comment #4 from kargl at gcc dot gnu.org 2011-09-02 23:00:54 UTC ---
(In reply to comment #3)
> Hello,
> 
> Thank you very much for your reply and help.
> 
> Your  example pointed me to the clue to find the error in my source:
> evidently, a /name/ block is required even when the "name" is empty,
> i.e., "common // ...", my source had "common i, j, k, ..." this is not
> allowed!

No, a /name/ block *IS NOT* required even when the name is empty.

troutmask:sgk[218] cat a.f90 b.f90 c.f90

! a.f90
subroutine foo
   common i
   i = 2
end subroutine foo

! b.f90
subroutine bar
   common j
   j = 1
end subroutine bar

! c.f90
program c
  common k
  call foo
  call bar
  print *, k
end program c

This compiles with gfortran 4.7.0 with all of the options
you specify.


> What is surprising is that no compiler error or warning was generated
> while the loader complained! I had expected to get a compiler error if
> the "common /name/ ..." format is strictly required. Perhaps you could
> make a note to cause a compiler error in your future distributions.

It's not required.  You have a broken loader, which is not
a gfortran problem.

Reply via email to