From: Bernhard Reutner-Fischer Date: Thu, 19 Oct 2017 07:55:43 +0000 (+0200) Subject: Derive interface buffers from max name length X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=439d2350251a050f4d00ae4af1d2dff5c569d52e;p=gcc.git Derive interface buffers from max name length 2017-10-19 Bernhard Reutner-Fischer * interface.c (check_sym_interfaces, check_uop_interfaces, gfc_check_interfaces): Base interface_name buffer off GFC_MAX_SYMBOL_LEN. From-SVN: r253881 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 11c8ef0f59e..962dbe888f6 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2017-10-19 Bernhard Reutner-Fischer + + * interface.c (check_sym_interfaces, check_uop_interfaces, + gfc_check_interfaces): Base interface_name buffer off + GFC_MAX_SYMBOL_LEN. + 2017-10-19 Jakub Jelinek PR fortran/82568 diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index b4f5a4dcce1..9f0fcc82f24 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;