This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: multi-line errors in dejagnu?
- From: Fritz Reese <fritzoreese at gmail dot com>
- To: kargl at uw dot edu
- Cc: fortran at gcc dot gnu dot org
- Date: Wed, 31 Aug 2016 17:39:11 -0400
- Subject: Re: multi-line errors in dejagnu?
- Authentication-results: sourceware.org; auth=none
- References: <20160831212202.GA6013@troutmask.apl.washington.edu>
On Wed, Aug 31, 2016 at 5:22 PM, Steve Kargl
<sgk@troutmask.apl.washington.edu> wrote:
> Anyone know how to mark up an example that exposes 2 lines of
> code? I've changed an error message to something that I think
> is more informative. Consider,
I believe DG internally replicates a multi-line error on each line
involved, so that the following markup is correct:
> module m
> interface s
> subroutine s1(i) ! { dg-error "Ambiguous interfaces" }
> integer i
> end
> subroutine s2(j) ! {dg-error "Ambiguous interfaces" }
> integer j
> end
> end interface
> end
See for example gfortran.dg/dec_union_7.f90:
$ gfortran -fdec-structure dec_union_7.f90
...
dec_union_7.f90:24:23:
integer(4) :: x = 1600 ! { dg-error "Conflicting initializers" }
1
dec_union_7.f90:29:20:
integer :: e = 0 ! { dg-error "Conflicting initializers" }
2
Error: Conflicting initializers in union at (1) and (2)
---
Fritz Reese