This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: dg-error question


On Thu, Oct 26, 2006 at 06:08:01PM +0200, Tobias Burnus wrote:
> Hello,
> 
> I have a novice question to dg-error. The testcase if for Fortran, but I
> hope to find more dejagnu experts here

I'm not an expert, but as testsuite maintainer I need to continue
learning more about DejaGnu/Tcl/expect.

> I have:
> 
> > gcc/testsuite/gfortran.dg> cat -n namelist_internal2.f90 | grep dg-
>      1  ! { dg-do compile }
>      2  ! { dg-options "-fall-intrinsics -std=f95" }
>     16    write(str,nml=nam) ! { dg-error "Internal file at .* is incompatible with namelist" }
>     20    read(str,nml=nam) ! { dg-error "Internal file at .* is incompatible with namelist" }
> 
> 
> Now, if I run "make -k check" I get (from gfortran.sum):
> PASS: gfortran.dg/namelist_internal2.f90  -O   (test for errors, line 16)
> FAIL: gfortran.dg/namelist_internal2.f90  -O   (test for errors, line 20)
> PASS: gfortran.dg/namelist_internal2.f90  -O  (test for excess errors)
> 
> That is: The first test succeeds, but the second one fails.

I haven't verified this, but it looks like the '.*' is matching through
the second (or final identical) error message in the output.

I tried the version of this test in your patch; that one needs to replace
'(1)' with '\\(1\\)', and leave a space before the final '}'.

Janis


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