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]

dg-error question


Hello,

I have a novice question to dg-error. The testcase if for Fortran, but I
hope to find more dejagnu experts here

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.


In gfortran.log I find the following:
output is:
 In file /home/tob/projects/gcc/gcc/testsuite/gfortran.dg/namelist_internal2.f90:16

  write(str,nml=nam) ! { dg-error "Internal file at .* is incompatible with nam
       1
Error: Internal file at (1) is incompatible with namelist
 In file /home/tob/projects/gcc/gcc/testsuite/gfortran.dg/namelist_internal2.f90:20

  read(str,nml=nam) ! { dg-error "Internal file at .* is incompatible with name
      1
Error: Internal file at (1) is incompatible with namelist


I don't see any reason why it is working with the first one, but failing with the second one?


Analogously, I get:

PASS: gfortran.dg/write_check2.f90  -O   (test for errors, line 5)
FAIL: gfortran.dg/write_check2.f90  -O   (test for errors, line 6)
FAIL: gfortran.dg/write_check2.f90  -O   (test for errors, line 7)
PASS: gfortran.dg/write_check2.f90  -O  (test for excess errors)

That is: First works, others fail. For:
> cat -n write_check2.f90 | grep 'dg-error'
     5    write(13,'(a)',advance='y')    'Hello:' ! { dg-error "ADVANCE=specifier at .* must have value = YES or NO." }
     6    write(13,'(a)',advance='yet')  'Hello:' ! { dg-error "ADVANCE=specifier at .* must have value = YES or NO." }
     7    write(13,'(a)',advance='yess') 'Hello:' ! { dg-error "ADVANCE=specifier at .* must have value = YES or NO." }

And again I have:
output is:
 In file /home/tob/projects/gcc/gcc/testsuite/gfortran.dg/write_check2.f90:5

  write(13,'(a)',advance='y')    'Hello:' ! { dg-error "ADVANCE=specifier at .*
                        1
Error: ADVANCE=specifier at (1) must have value = YES or NO.
 In file /home/tob/projects/gcc/gcc/testsuite/gfortran.dg/write_check2.f90:6

  write(13,'(a)',advance='yet')  'Hello:' ! { dg-error "ADVANCE=specifier at .*
                        1
Error: ADVANCE=specifier at (1) must have value = YES or NO.
 In file /home/tob/projects/gcc/gcc/testsuite/gfortran.dg/write_check2.f90:7

  write(13,'(a)',advance='yess') 'Hello:' ! { dg-error "ADVANCE=specifier at .*
                        1
Error: ADVANCE=specifier at (1) must have value = YES or NO.


Any ideas?

Tobias


PS: Cross link (contains not more information):
http://gcc.gnu.org/ml/gcc-patches/2006-10/msg01337.html


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