Commit 9998ef84 by Tobias Schlüter

re PR fortran/31144 (gfortran module symbol names are not standard compliant)

PR fortran/31144
fortran/
* decl.c (gfc_sym_mangled_identifier): Use capital letters in name
mangling.
(gfc_sym_mangled_function_id): Likewise.
testsuite/
* gfortran.dg/module_naming_1.f90: New.

From-SVN: r123904
parent 597cab4f
2007-04-17 Tobias Schlter <tobi@gcc.gnu.org>
PR fortran/31144
* decl.c (gfc_sym_mangled_identifier): Use capital letters in name
mangling.
(gfc_sym_mangled_function_id): Likewise.
2007-04-15 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31204
......
......@@ -299,7 +299,7 @@ gfc_sym_mangled_identifier (gfc_symbol * sym)
return gfc_sym_identifier (sym);
else
{
snprintf (name, sizeof name, "__%s__%s", sym->module, sym->name);
snprintf (name, sizeof name, "__%s_MOD_%s", sym->module, sym->name);
return get_identifier (name);
}
}
......@@ -335,7 +335,7 @@ gfc_sym_mangled_function_id (gfc_symbol * sym)
}
else
{
snprintf (name, sizeof name, "__%s__%s", sym->module, sym->name);
snprintf (name, sizeof name, "__%s_MOD_%s", sym->module, sym->name);
return get_identifier (name);
}
}
......
2007-04-17 Tobias Schlter <tobi@gcc.gnu.org>
PR fortran/31144
* gfortran.dg/module_naming_1.f90: New.
2007-04-16 Richard Sandiford <richard@codesourcery.com>
* lib/target-supports.exp (check_profiling_available): Return
! { dg-do assemble }
! PR 31144
! Makes sure that our name mangling scheme can't be outwitted
! old scheme
module m1
contains
subroutine m2__m3()
end subroutine m2__m3
end module m1
module m1__m2
contains
subroutine m3()
end subroutine m3
end module m1__m2
! New scheme, relies on capitalization
module m2
contains
subroutine m2_MOD_m3()
! mangled to __m2_MOD_m2_mod_m3
end subroutine m2_MOD_m3
end module m2
module m2_MOD_m2
contains
subroutine m3()
! mangled to __m2_mod_m2_MOD_m3
end subroutine m3
end module m2_MOD_m2
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment