1 Upstream-Status: Inappropriate [Backport]
2 From ca7759868733b4570e496b889e711523640fc582 Mon Sep 17 00:00:00 2001
3 From: janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4>
4 Date: Mon, 4 Apr 2011 18:53:34 +0000
5 Subject: [PATCH 064/200] 2011-04-04 Janus Weil <janus@gcc.gnu.org>
8 * class.c (get_unique_hashed_string): Adjust maximum allowable length
9 for unique type string.
11 2011-04-04 Janus Weil <janus@gcc.gnu.org>
14 * gfortran.dg/class_42.f03: New.
17 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@171950 138bc75d-0d04-0410-961f-82ee72b054a4
19 index 85da3cb..b99930a 100644
20 --- a/gcc/fortran/class.c
21 +++ b/gcc/fortran/class.c
22 @@ -137,9 +137,9 @@ get_unique_hashed_string (char *string, gfc_symbol *derived)
24 char tmp[2*GFC_MAX_SYMBOL_LEN+2];
25 get_unique_type_string (&tmp[0], derived);
26 - /* If string is too long, use hash value in hex representation
27 - (allow for extra decoration, cf. gfc_build_class_symbol)*/
28 - if (strlen (tmp) > GFC_MAX_SYMBOL_LEN - 10)
29 + /* If string is too long, use hash value in hex representation (allow for
30 + extra decoration, cf. gfc_build_class_symbol & gfc_find_derived_vtab). */
31 + if (strlen (tmp) > GFC_MAX_SYMBOL_LEN - 11)
33 int h = gfc_hash_value (derived);
34 sprintf (string, "%X", h);
36 index 0000000..dd59835
38 +++ b/gcc/testsuite/gfortran.dg/class_42.f03
42 +! PR 48291: [4.6/4.7 Regression] [OOP] internal compiler error, new_symbol(): Symbol name too long
44 +! Contributed by Adrian Prantl <adrian@llnl.gov>
46 +module Overload_AnException_Impl
47 + type :: Overload_AnException_impl_t
50 + subroutine ctor_impl(self)
51 + class(Overload_AnException_impl_t) :: self
55 +! { dg-final { cleanup-modules "Overload_AnException_Impl" } }