diff mbox

[Fortran] PR 47472 Prevent double slash in gfortran -M dependeny output

Message ID 4D406E1C.2050900@net-b.de
State New
Headers show

Commit Message

Tobias Burnus Jan. 26, 2011, 6:55 p.m. UTC
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

Comments

Jerry DeLisle Jan. 27, 2011, 3:30 a.m. UTC | #1
On 01/26/2011 10:55 AM, Tobias Burnus wrote:
> 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
OK, thanks.

Jerry
diff mbox

Patch

2011-01-26  Tobias Burnus  <burnus@net-b.de>

	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, "/");
 }