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: "Steven G. Kargl" <kargl at troutmask dot apl dot washington dot edu>
- To: Fritz Reese <fritzoreese at gmail dot com>
- Cc: kargl at uw dot edu, fortran at gcc dot gnu dot org
- Date: Wed, 31 Aug 2016 14:42:21 -0700
- Subject: Re: multi-line errors in dejagnu?
- Authentication-results: sourceware.org; auth=none
- References: <20160831212202.GA6013@troutmask.apl.washington.edu> <CAE4aFAnWiE8pmfOjiCPD4egTAEMa=ENETKC0taxB0jEMRjygqw@mail.gmail.com>
- Reply-to: kargl at uw dot edu
On Wed, Aug 31, 2016 at 05:39:11PM -0400, Fritz Reese wrote:
> 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)
>
Thanks! I'll give it a try. Changing the error has
led to a few regressions that need to be fixed.
--
Steve
http://troutmask.apl.washington.edu/~kargl/