]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/blob
5491aa5eec6e4475440e012edab701bd621a873a
[thirdparty/openembedded/openembedded-core-contrib.git] /
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>
5
6 PR fortran/48291
7 * class.c (get_unique_hashed_string): Adjust maximum allowable length
8 for unique type string.
9
10 2011-04-04 Janus Weil <janus@gcc.gnu.org>
11
12 PR fortran/48291
13 * gfortran.dg/class_42.f03: New.
14
15
16 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@171950 138bc75d-0d04-0410-961f-82ee72b054a4
17
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)
22 {
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)
31 {
32 int h = gfc_hash_value (derived);
33 sprintf (string, "%X", h);
34 new file mode 100644
35 index 0000000..dd59835
36 --- /dev/null
37 +++ b/gcc/testsuite/gfortran.dg/class_42.f03
38 @@ -0,0 +1,16 @@
39 +! { dg-do compile }
40 +!
41 +! PR 48291: [4.6/4.7 Regression] [OOP] internal compiler error, new_symbol(): Symbol name too long
42 +!
43 +! Contributed by Adrian Prantl <adrian@llnl.gov>
44 +
45 +module Overload_AnException_Impl
46 + type :: Overload_AnException_impl_t
47 + end type
48 +contains
49 + subroutine ctor_impl(self)
50 + class(Overload_AnException_impl_t) :: self
51 + end subroutine
52 +end module
53 +
54 +! { dg-final { cleanup-modules "Overload_AnException_Impl" } }
55 --
56 1.7.0.4
57