From patchwork Wed Jan 26 18:55:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 80540 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 1983FB70E0 for ; Thu, 27 Jan 2011 05:55:38 +1100 (EST) Received: (qmail 27881 invoked by alias); 26 Jan 2011 18:55:36 -0000 Received: (qmail 27862 invoked by uid 22791); 26 Jan 2011 18:55:35 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, TW_CP X-Spam-Check-By: sourceware.org Received: from mx02.qsc.de (HELO mx02.qsc.de) (213.148.130.14) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 26 Jan 2011 18:55:28 +0000 Received: from [192.168.178.22] (port-92-204-33-159.dynamic.qsc.de [92.204.33.159]) by mx02.qsc.de (Postfix) with ESMTP id 4E51A1EED5; Wed, 26 Jan 2011 19:55:25 +0100 (CET) Message-ID: <4D406E1C.2050900@net-b.de> Date: Wed, 26 Jan 2011 19:55:24 +0100 From: Tobias Burnus User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101206 SUSE/3.1.7 Thunderbird/3.1.7 MIME-Version: 1.0 To: gfortran , "gcc- >> gcc patches" Subject: [Patch, Fortran] PR 47472 Prevent double slash in gfortran -M dependeny output 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 Boring problem, trivial solution. With gfortran -cpp -E -J ModulePath there were two slashes, e.g. testuse.o: testuse.f90 obj//testmake.mod Solution is trivial, cf. attachment. Build on x86-64-linux. OK for the trunk? Tobias 2011-01-26 Tobias Burnus PR fortran/47472 * options.c (gfc_handle_module_path_options): Save module path without trailing slash as include path. diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index 1f1cdd1..c116103 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -463,9 +463,10 @@ gfc_handle_module_path_options (const char *arg) gfc_option.module_dir = (char *) gfc_getmem (strlen (arg) + 2); strcpy (gfc_option.module_dir, arg); - strcat (gfc_option.module_dir, "/"); gfc_add_include_path (gfc_option.module_dir, true, false); + + strcat (gfc_option.module_dir, "/"); }