This is the mail archive of the gcc-patches@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: [patch, fortran] Fix PR 54033, problems with -I


Hi Janis,

On 07/26/2012 10:16 AM, Thomas Koenig wrote:

No test case because I couldn't figure out how to test for a
warning with no line number.

Try using line number 0.

That didn't work for me. Using


! { dg-do compile }
! { dg-options "-I include_6.f90 -I missing_dir" }
! { dg-warning "not a directory" "missing directory" target *-*-* 0 }
! { dg-warning "does not exist" "nonexisting directory" target *-*-* 0 }
end

got me

Warning: Include directory "include_6.f90" does not exist^M
Warning: Include directory "missing_dir" does not exist^M
output is:
Warning: Include directory "include_6.f90" does not exist^M
Warning: Include directory "missing_dir" does not exist^M

FAIL: gfortran.dg/include_6.f90  -O  (test for excess errors)
Excess errors:
:0:0: Warning: Include directory "include_6.f90" does not exist
:0:0: Warning: Include directory "missing_dir" does not exist

and

! { dg-do compile }
! { dg-options "-I include_6.f90 -I missing_dir" }
! { dg-warning "not a directory" "missing directory" target *-*-* 0 }
! { dg-warning "does not exist" "nonexisting directory" target *-*-* 0 }
! { dg-excess-errors "Include directory" }
end

resulted in an XFAIL:

Warning: Include directory "include_6.f90" does not exist^M
Warning: Include directory "missing_dir" does not exist^M
output is:
Warning: Include directory "include_6.f90" does not exist^M
Warning: Include directory "missing_dir" does not exist^M

XFAIL: gfortran.dg/include_6.f90  -O  (test for excess errors)
Excess errors:
:0:0: Warning: Include directory "include_6.f90" does not exist
:0:0: Warning: Include directory "missing_dir" does not exist

so dg-excess-errors seems to imply XFAIL.

The problem may be related to the fact that, when we process the
options, we do not yet have a file name, so dejagnu may have trouble
parsing the warning.

Any other ideas?

Thomas


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