[Patch, Fortran] PR34187 - Binding label got lost for private procedures of public generic procedures
Tobias Burnus
burnus@net-b.de
Thu Nov 22 16:08:00 GMT 2007
:ADDPATCH fortran:
The way modules were read, the information about the binding label of
BIND(C) was sometimes not included.
This happend when the symbol itself was not directly loaded (e.g.
because it is private), but only later via load_needed.
The bug was found by the coworkers of Chris. The fix is simple: Copy the
bind_label in load_needed. (The other attributes are set via
"mio_symbol (sym);".)
Build and regression tested on x86-64. OK for the trunk?
Tobias
PS: Would anyone mind if I changed the following of decl.c into a
"strcpy"? It should do exactly the same, is faster, looks less
complicated and is less error prone ("+1" is needed for strncpy).
strncpy (sym->binding_label, binding_label,
strlen (binding_label)+1);
This syntax occurs 5 times. If we want to use strncpy, I'd prefer a
"GFC_MAX_SYMBOL_LEN + 1" as third argument.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bind-c-label.diff
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20071122/b57b1a52/attachment.ksh>
More information about the Fortran
mailing list