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