From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2086 invoked by alias); 27 Jul 2012 20:06:33 -0000 Received: (qmail 2066 invoked by uid 22791); 27 Jul 2012 20:06:31 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_NO,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cc-smtpout2.netcologne.de (HELO cc-smtpout2.netcologne.de) (89.1.8.212) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 27 Jul 2012 20:06:14 +0000 Received: from cc-smtpin3.netcologne.de (cc-smtpin3.netcologne.de [89.1.8.203]) by cc-smtpout2.netcologne.de (Postfix) with ESMTP id E0BE8124FA; Fri, 27 Jul 2012 22:06:12 +0200 (CEST) Received: from [192.168.0.108] (xdsl-78-35-185-59.netcologne.de [78.35.185.59]) by cc-smtpin3.netcologne.de (Postfix) with ESMTPSA id 3385811DB7; Fri, 27 Jul 2012 22:06:08 +0200 (CEST) Message-ID: <5012F4AF.7050807@netcologne.de> Date: Fri, 27 Jul 2012 20:31:00 -0000 From: Thomas Koenig User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120601 Thunderbird/13.0 MIME-Version: 1.0 To: janisjo@codesourcery.com CC: Janis Johnson , "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> In-Reply-To: <50118A67.2040702@mentor.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed 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/msg01431.txt.bz2 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