diff options
author | Bernhard Reutner-Fischer <aldot@gcc.gnu.org> | 2017-10-19 09:55:43 +0200 |
---|---|---|
committer | Bernhard Reutner-Fischer <aldot@gcc.gnu.org> | 2017-10-19 09:55:43 +0200 |
commit | 439d2350251a050f4d00ae4af1d2dff5c569d52e (patch) | |
tree | 371791beb5d0d6f34969f8034c25d0f6bfa0025b /gcc/fortran/interface.c | |
parent | cf64af861f869cf40217a1d45eb0ba9f7add7d37 (diff) | |
download | gcc-439d2350251a050f4d00ae4af1d2dff5c569d52e.zip gcc-439d2350251a050f4d00ae4af1d2dff5c569d52e.tar.gz gcc-439d2350251a050f4d00ae4af1d2dff5c569d52e.tar.bz2 |
Derive interface buffers from max name length
2017-10-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
* interface.c (check_sym_interfaces, check_uop_interfaces,
gfc_check_interfaces): Base interface_name buffer off
GFC_MAX_SYMBOL_LEN.
From-SVN: r253881
Diffstat (limited to 'gcc/fortran/interface.c')
-rw-r--r-- | gcc/fortran/interface.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index b4f5a4d..9f0fcc8 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -1918,7 +1918,7 @@ check_interface1 (gfc_interface *p, gfc_interface *q0, static void check_sym_interfaces (gfc_symbol *sym) { - char interface_name[100]; + char interface_name[GFC_MAX_SYMBOL_LEN + sizeof("generic interface ''")]; gfc_interface *p; if (sym->ns != gfc_current_ns) @@ -1955,7 +1955,7 @@ check_sym_interfaces (gfc_symbol *sym) static void check_uop_interfaces (gfc_user_op *uop) { - char interface_name[100]; + char interface_name[GFC_MAX_SYMBOL_LEN + sizeof("operator interface ''")]; gfc_user_op *uop2; gfc_namespace *ns; @@ -2032,7 +2032,7 @@ void gfc_check_interfaces (gfc_namespace *ns) { gfc_namespace *old_ns, *ns2; - char interface_name[100]; + char interface_name[GFC_MAX_SYMBOL_LEN + sizeof("intrinsic '' operator")]; int i; old_ns = gfc_current_ns; |