This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: armv4l bootstrap problem in libstdc++-v3
- To: jason at redhat dot com
- Subject: Re: armv4l bootstrap problem in libstdc++-v3
- From: Nick Clifton <nickc at redhat dot com>
- Date: Thu, 21 Dec 2000 09:55:50 -0800
- CC: stewart at netwinder dot org, rearnsha at arm dot com, mmitchel at codesourcery dot com, gcc-bugs at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
Hi Jason,
: I think that the bug is that we are setting TREE_PARMLIST on actual
: parameter lists; it is only useful to distinguish between semi-parsed
: parameter declarations and semi-parsed expressions. Once we have fully
: parsed the parm list, it serves no purpose.
:
: Other opinions?
This seems correct. I developed a patch yesterday that fixes the
problem, although I am not sure if it is the right solution:
Cheers
Nick
2000-12-20 Nick Clifton <nickc@redhat.com>
* tree.c (build_function_type): Detect the presence of
TREE_PARMLIST in C++ parameter lists and adjust the hash code
accordingly.
Index: tree.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/tree.c,v
retrieving revision 1.177
diff -p -r1.177 tree.c
*** tree.c 2000/11/27 07:09:19 1.177
--- tree.c 2000/12/20 20:25:22
*************** build_function_type (value_type, arg_typ
*** 3879,3886 ****
/* If we already have such a type, use the old one and free this one. */
hashcode = TYPE_HASH (value_type) + type_hash_list (arg_types);
- t = type_hash_canon (hashcode, t);
if (!COMPLETE_TYPE_P (t))
layout_type (t);
return t;
--- 3879,3895 ----
/* If we already have such a type, use the old one and free this one. */
hashcode = TYPE_HASH (value_type) + type_hash_list (arg_types);
+ if (arg_types && TREE_CHAIN (arg_types))
+ {
+ /* In C++ the TREE_UNSIGNED field is used to distinguish a parameter
+ list from a list of expressions. We must make sure that this bit
+ is preserved in whichever type we select. */
+ hashcode += TREE_UNSIGNED (TREE_CHAIN (arg_types)) ? 1 : 0;
+ }
+
+ t = type_hash_canon (hashcode, t);
+
if (!COMPLETE_TYPE_P (t))
layout_type (t);
return t;