This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/4926] Segmentation Fault on Legal Code
- From: "giovannibajo at libero dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Jul 2003 18:18:24 -0000
- Subject: [Bug c++/4926] Segmentation Fault on Legal Code
- References: <20011122020600.4926.anthwil@nortelnetworks.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4926
giovannibajo at libero dot it changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |SUSPENDED
------- Additional Comments From giovannibajo at libero dot it 2003-07-01 18:18 -------
The C++ ABI does not specify how to mangle function names which contains
template parameters like sizeof(complex_expression). Thus, this bug is
suspended until the ABI committee takes a decision.
The situation is a bit better now though, on mainline the reduced testcase will
produce a "sorry, unimplemented" message, and then crash (component_ref has
exactly the same problem). The crash can be fixed with this patch:
Index: mangle.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cp/mangle.c,v
retrieving revision 1.79
diff -c -p -w -r1.79 mangle.c
*** mangle.c 30 Jun 2003 19:02:04 -0000 1.79
--- mangle.c 1 Jul 2003 18:14:22 -0000
*************** write_expression (tree expr)
*** 2023,2028 ****
--- 2023,2032 ----
write_expression (TREE_OPERAND (expr, 0));
break;
+ case COMPONENT_REF:
+ write_expression (TREE_OPERAND (expr, 0));
+ write_source_name (TREE_OPERAND (expr, 1));
+ break;
/* Handle pointers-to-members specially. */
case SCOPE_REF:
which is correct per-se, but it's part of this "mangle.c can't handle complex
expressions" stuff which needs clarifications from the C++ ABI committee. So,
I'll keep this around for later.