From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28610 invoked by alias); 27 Jul 2012 22:00:38 -0000 Received: (qmail 28590 invoked by uid 22791); 27 Jul 2012 22:00:36 -0000 X-SWARE-Spam-Status: No, hits=-4.4 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 27 Jul 2012 22:00:23 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1Susa4-00064p-K7 from Janis_Johnson@mentor.com ; Fri, 27 Jul 2012 15:00:20 -0700 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Fri, 27 Jul 2012 15:00:20 -0700 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.1.289.1; Fri, 27 Jul 2012 15:00:19 -0700 Message-ID: <50130F9B.1010300@mentor.com> Date: Fri, 27 Jul 2012 22:15:00 -0000 From: Janis Johnson Reply-To: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.28) Gecko/20120313 Thunderbird/3.1.20 MIME-Version: 1.0 To: Thomas Koenig CC: , "fortran@gcc.gnu.org" , gcc-patches Subject: Re: [patch, fortran] Fix PR 54033, problems with -I References: <50117B5D.8030304@netcologne.de> <50118A67.2040702@mentor.com> <5012F4AF.7050807@netcologne.de> In-Reply-To: <5012F4AF.7050807@netcologne.de> Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-07/txt/msg01435.txt.bz2 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