This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: dg-error question
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: gcc at gnu dot org
- Date: Thu, 26 Oct 2006 14:50:07 -0700
- Subject: Re: dg-error question
- References: <4540DD61.6000909@net-b.de>
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