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

            Bug ID: 69554
           Summary: Multi-location diagnostics writes too many lines
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tkoenig at gcc dot gnu.org
  Target Milestone: ---

When showing multiple diagnostics in one error message,
intermediate lines are shown (and some empty lines as well).

This can be shown with the attached patch, which has the
line

      gfc_error ("Symbol %qs at %C also declared as a type at %L", name,
                 &st->n.sym->declared_at);

With the test case

type X
end type

integer :: q
real :: a
integer, parameter :: h=3

type(X) :: X

end

the error message is

type.f90:8:12:

 type X
      2      
 end type



 integer :: q

 real :: a

 integer, parameter :: h=3



 type(X) :: X
            1
Error: Symbol »x« at (1) also declared as a type at (2)

Reply via email to