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: Janis Johnson <janis_johnson at mentor dot com>
- To: Thomas Koenig <tkoenig at netcologne dot de>
- Cc: <janisjo at codesourcery 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 15:00:59 -0700
- Subject: Re: [patch, fortran] Fix PR 54033, problems with -I
- References: <50117B5D.8030304@netcologne.de> <50118A67.2040702@mentor.com> <5012F4AF.7050807@netcologne.de>
- Reply-to: <janisjo at codesourcery dot com>
On 07/27/2012 01:06 PM, Thomas Koenig wrote:
> 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
Use "{ target *-*-* }" instead of "target *-*-*".
Notice that the two warnings have the same text, so the directive
looking for "not a directory" will fail.
Janis