From patchwork Sat Feb 9 13:14:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Koenig X-Patchwork-Id: 219397 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id B91532C0084 for ; Sun, 10 Feb 2013 00:15:19 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1361020520; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=blROHIt698gb9RG61YzHah24tds=; b=nca97qYpGfv/JhA DCGpGxpjalzkAgEj5A3KkBUMDftZ9KqRM9ax+n3tQA+nFuYxaTivYzjg2ivgD4YB 5x0lnqUFeXUSRAhgrnMBBqfFYOdwgS9t8KA0YoCOVDXrRy3hZC97aUPvP6rU9wHA Ph9axC4yhIiXkCcIDY6HUVjD5EDQ= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=PXYwI14bSJnXO+wDW1e/ufGw+ySHoA7KY2DbcAI1u1Qxi77NlL/VuU/4cWxJMa joL2GqLzT5FSiuCR0yrrMPypyGImcIebKnLfVBnzADxpNs3F9Kf/46aggBfjMg91 PucEcT6+Bk8iPXcMzQQ/l5OK0Ghv1KPOucDnV0ezHw1No=; Received: (qmail 17395 invoked by alias); 9 Feb 2013 13:15:08 -0000 Received: (qmail 17358 invoked by uid 22791); 9 Feb 2013 13:15:06 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, TW_CP X-Spam-Check-By: sourceware.org Received: from cc-smtpout3.netcologne.de (HELO cc-smtpout3.netcologne.de) (89.1.8.213) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 09 Feb 2013 13:15:01 +0000 Received: from cc-smtpin1.netcologne.de (cc-smtpin1.netcologne.de [89.1.8.201]) by cc-smtpout3.netcologne.de (Postfix) with ESMTP id 2C2C312073; Sat, 9 Feb 2013 14:14:59 +0100 (CET) Received: from [192.168.0.104] (xdsl-84-44-176-175.netcologne.de [84.44.176.175]) by cc-smtpin1.netcologne.de (Postfix) with ESMTPSA id 31EB411D7B; Sat, 9 Feb 2013 14:14:54 +0100 (CET) Message-ID: <51164BCD.9080101@netcologne.de> Date: Sat, 09 Feb 2013 14:14:53 +0100 From: Thomas Koenig User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130105 Thunderbird/17.0.2 MIME-Version: 1.0 To: Tobias Burnus CC: Paul Richard Thomas , Jakub Jelinek , "fortran@gcc.gnu.org" , gcc-patches Subject: Re: [patch, Fortran] Fix PR 56224 References: <5115649D.4080808@netcologne.de> <5116235A.4040309@net-b.de> In-Reply-To: <5116235A.4040309@net-b.de> Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Am 09.02.2013 11:22, schrieb Tobias Burnus: > Why did you put a FIXME there? What's wrong with adding the directory here? I think module files are different enough from include files that I would like to have them in different directories. > "Seems to break testing, all testcases emit > Warning: Nonexistent include directory "finclude"^M" > I think those only occurred when the compiler is not installed. Will > they pop up again? This version of the patch should fix that particular issue, and also has no test cases. Regression-tested. OK? 2013-02-09 Thomas Koenig PR fortran/56224 * gfortran.h (gfc_add_include_path): Add boolean argument for warn. * scanner.c (gfc_add_include_path): Pass along warn argument to add_path_to_list. * options.c (gfc_post_options): Add true warn argument to gfc_add_include_path. (gfc_handle_module_path_options): Likewise. (gfc_handle_option): Also gfc_add_include_path for intrinsic modules, without warning. Index: gfortran.h =================================================================== --- gfortran.h (Revision 195686) +++ gfortran.h (Arbeitskopie) @@ -2378,7 +2378,7 @@ match gfc_match_char_spec (gfc_typespec *); void gfc_scanner_done_1 (void); void gfc_scanner_init_1 (void); -void gfc_add_include_path (const char *, bool, bool); +void gfc_add_include_path (const char *, bool, bool, bool); void gfc_add_intrinsic_modules_path (const char *); void gfc_release_include_path (void); FILE *gfc_open_included_file (const char *, bool, bool); Index: scanner.c =================================================================== --- scanner.c (Revision 195686) +++ scanner.c (Arbeitskopie) @@ -375,9 +375,9 @@ add_path_to_list (gfc_directorylist **list, const void -gfc_add_include_path (const char *path, bool use_for_modules, bool file_dir) +gfc_add_include_path (const char *path, bool use_for_modules, bool file_dir, bool warn) { - add_path_to_list (&include_dirs, path, use_for_modules, file_dir, true); + add_path_to_list (&include_dirs, path, use_for_modules, file_dir, warn); /* For '#include "..."' these directories are automatically searched. */ if (!file_dir) Index: options.c =================================================================== --- options.c (Revision 195686) +++ options.c (Arbeitskopie) @@ -337,10 +337,10 @@ gfc_post_options (const char **pfilename) source_path = (char *) alloca (i + 1); memcpy (source_path, canon_source_file, i); source_path[i] = 0; - gfc_add_include_path (source_path, true, true); + gfc_add_include_path (source_path, true, true, true); } else - gfc_add_include_path (".", true, true); + gfc_add_include_path (".", true, true, true); if (canon_source_file != gfc_source_file) free (CONST_CAST (char *, canon_source_file)); @@ -498,7 +498,7 @@ gfc_handle_module_path_options (const char *arg) gfc_option.module_dir = XCNEWVEC (char, strlen (arg) + 2); strcpy (gfc_option.module_dir, arg); - gfc_add_include_path (gfc_option.module_dir, true, false); + gfc_add_include_path (gfc_option.module_dir, true, false, true); strcat (gfc_option.module_dir, "/"); } @@ -844,6 +844,11 @@ gfc_handle_option (size_t scode, const char *arg, case OPT_fintrinsic_modules_path: case OPT_fintrinsic_modules_path_: + + /* FIXME: This is needed because omp_lib.h is in a + directory together with intrinsic modules. */ + gfc_add_include_path (arg, false, false, false); + gfc_add_intrinsic_modules_path (arg); break; @@ -978,7 +983,7 @@ gfc_handle_option (size_t scode, const char *arg, break; case OPT_I: - gfc_add_include_path (arg, true, false); + gfc_add_include_path (arg, true, false, true); break; case OPT_J: