mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-10 15:30:19 +08:00
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
This commit is contained in:
parent
597cab4f83
commit
9998ef84d3
@ -1,3 +1,10 @@
|
||||
2007-04-17 Tobias Schlüter <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);
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
2007-04-17 Tobias Schlüter <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
|
||||
|
31
gcc/testsuite/gfortran.dg/module_naming_1.f90
Normal file
31
gcc/testsuite/gfortran.dg/module_naming_1.f90
Normal file
@ -0,0 +1,31 @@
|
||||
! { 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
|
Loading…
Reference in New Issue
Block a user