https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67936
Bug ID: 67936 Summary: Off-by-one columns in caret Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: dmalcolm at gcc dot gnu.org Target Milestone: --- In gcc/testsuite/gfortran.dg/associate_5.f03, if we enable -fdiagnostics-show-caret, we get this diagnostic (amongst others): associate_5.f03:33:6: y = 5 ! { dg-error "variable definition context" } 1 associate_5.f03:32:20: ASSOCIATE (y => x) ! { dg-error "variable definition context" } 2 Error: Associate-name ‘y’ can not appear in a variable definition context (assignment) at (1) because its target at (2) can not, either Note how the carets 1 and 2 appear one column before the "y" and the "x" that they refer to; I would have expected them to be one column to the right, directly under the "y" and "x". Noticed when porting Fortran to use a new implementation of diagnostic_show_locus; this seems to be a pre-existing bug in the Fortran FE; am updating my printer to faithfully print the (apparently erroneous) locations.