multi-line errors in dejagnu?
Fritz Reese
fritzoreese@gmail.com
Wed Aug 31 21:39:00 GMT 2016
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
More information about the Fortran
mailing list