https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89724
Bug ID: 89724 Summary: Fortran diagnostics give wrong line number because of math-vector-fortran.h header file Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: sje at gcc dot gnu.org Target Milestone: --- I am seeing some Fortran regressions in my testing, but only when I build and test with the latest Glibc. The regressions are: FAIL: gfortran.dg/continuation_6.f -O (test for warnings, line 261) FAIL: gfortran.dg/continuation_9.f90 -O (test for warnings, line ) FAIL: gfortran.dg/continuation_9.f90 -O (test for warnings, line ) FAIL: gfortran.dg/continuation_9.f90 -O (test for warnings, line ) FAIL: gfortran.dg/continuation_9.f90 -O (test for excess errors) FAIL: gfortran.dg/tab_continuation.f -O Nonconforming tab (test for errors, line ) FAIL: gfortran.dg/tab_continuation.f -O Nonconforming tab (test for errors, line ) FAIL: gfortran.dg/tab_continuation.f -O Nonconforming tab (test for errors, line ) FAIL: gfortran.dg/tab_continuation.f -O Nonconforming tab (test for errors, line ) When I run continuation_9.f90 by hand I get: % install/usr/bin/gfortran -std=f95 -c continuation_9.f90 f951: Warning: ‘&’ not allowed by itself in line 23 f951: Warning: ‘&’ not allowed by itself in line 24 f951: Warning: ‘&’ not allowed by itself in line 25 Instead of % install/usr/bin/gfortran -std=f95 -c continuation_9.f90 f951: Warning: ‘&’ not allowed by itself in line 3 f951: Warning: ‘&’ not allowed by itself in line 4 f951: Warning: ‘&’ not allowed by itself in line 5 The reason for the line number changes is that the Fortran program is reading the file install/usr/include/finclude/math-vector-fortran.h and these lines are getting counted as part of the line numbers. This file is coming from glibc and was recently added. If I move it out of the way then I get the previous results.