This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/66707] New: Endless compilation on wrong usage of common


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

            Bug ID: 66707
           Summary: Endless compilation on wrong usage of common
           Product: gcc
           Version: 5.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gerhard.steinmetz.fortran@t-online.de
  Target Milestone: ---

After printing some correct and helpful error messages,
compilation of the following snippets (wrong code) will not end.
Tested with gfortran 5.1.1, 4.9.0, 4.8.3 (on SUSE Linux 13.2, 64 bit).


$ cat zlctc_1.f90
program p
   c = 1
   common // c
   common // c
end


$ cat zlctc_2.f90
program p
   integer, pointer :: a
   common a, a
   common a
end


$ cat zlctc_3.f90
program p
   integer, pointer :: a
   common a => null()
   common a => null()
end


$ time gfortran zlctc_1.f90
zlctc_1.f90:3.14:

   common // c
              1
Error: Unexpected COMMON statement at (1)
zlctc_1.f90:4.14:

   common // c
              1
Error: Unexpected COMMON statement at (1)

# ^C after a few minutes


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]