This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, fortran] Fix PR 54033, problems with -I
- From: Thomas Koenig <tkoenig at netcologne dot de>
- To: janisjo at codesourcery dot com
- Cc: Janis Johnson <janis_johnson at mentor dot com>, "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 27 Jul 2012 22:06:07 +0200
- Subject: Re: [patch, fortran] Fix PR 54033, problems with -I
- References: <50117B5D.8030304@netcologne.de> <50118A67.2040702@mentor.com>
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