This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: multi-line errors in dejagnu?


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]