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
Confirmed with 4.9.3 and 5.2. This seems to have been fixed on trunk between revision r226476 (2015-08-02, endless compilation) and r227016 (2015-08-19, tests compiled in a fraction of second).
> Confirmed with 4.9.3 and 5.2. This seems to have been fixed on trunk between > revision r226476 (2015-08-02, endless compilation) and r227016 (2015-08-19, > tests compiled in a fraction of second). Can someone confirms that the tests compile on recent trunk (post r227016)? A finer range would be nice too!
> > Confirmed with 4.9.3 and 5.2. This seems to have been fixed on trunk between > > revision r226476 (2015-08-02, endless compilation) and r227016 (2015-08-19, > > tests compiled in a fraction of second). > > Can someone confirms that the tests compile on recent trunk (post r227016)? > A finer range would be nice too! Back porting r226732 to the gcc5 branch "fixes" the issue.
Author: dominiq Date: Sat Jan 30 14:07:19 2016 New Revision: 233008 URL: https://gcc.gnu.org/viewcvs?rev=233008&root=gcc&view=rev Log: 2016-01-30 Dominique d'Humieres <dominiq@lps.ens.fr> PR fortran/66707 gfortran.dg/common_23.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/common_23.f90 Modified: trunk/gcc/testsuite/ChangeLog
Author: dominiq Date: Sat Jan 30 17:13:29 2016 New Revision: 233009 URL: https://gcc.gnu.org/viewcvs?rev=233009&root=gcc&view=rev Log: 2016-01-30 Bud Davis <jmdavis@link.com> Mikael Morin <mikael@gcc.gnu.org> Backport from trunk. PR fortran/59746 * symbol.c (gfc_restore_last_undo_checkpoint): Delete a common block symbol if it was put in the list. 2016-01-30 Dominique d'Humieres <dominiq@lps.ens.fr> PR fortran/66707 gfortran.dg/common_23.f90: New test. Backport from trunk. 2015-08-08 Bud Davis <jmdavis@link.com> Mikael Morin <mikael@gcc.gnu.org> PR fortran/59746 * gfortran.dg/common_22.f90: New. Added: branches/gcc-5-branch/gcc/testsuite/gfortran.dg/common_22.f90 branches/gcc-5-branch/gcc/testsuite/gfortran.dg/common_23.f90 Modified: branches/gcc-5-branch/gcc/fortran/ChangeLog branches/gcc-5-branch/gcc/fortran/symbol.c branches/gcc-5-branch/gcc/testsuite/ChangeLog
Closing as FIXED.