This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14448] Segfault in Boost indexed_set
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Mar 2004 15:37:18 -0000
- Subject: [Bug c++/14448] Segfault in Boost indexed_set
- References: <20040305152230.14448.giovannibajo@libero.it>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-05 15:37 -------
This non-tested (I did not bootstrap with it or test it on the testcase either):
Index: mangle.c
===============================================================
====
RCS file: /cvs/gcc/gcc/gcc/cp/mangle.c,v
retrieving revision 1.54.2.20
diff -u -p -r1.54.2.20 mangle.c
--- mangle.c 2 Mar 2004 18:42:47 -0000 1.54.2.20
+++ mangle.c 5 Mar 2004 15:36:28 -0000
@@ -1909,9 +1909,10 @@ write_expression (tree expr)
/* Skip NOP_EXPRs. They can occur when (say) a pointer argument
is converted (via qualification conversions) to another
- type. */
+ type. Also skip SAVE_EXPR as they are useless. */
while (TREE_CODE (expr) == NOP_EXPR
- || TREE_CODE (expr) == NON_LVALUE_EXPR)
+ || TREE_CODE (expr) == NON_LVALUE_EXPR
+ || TREE_CODE (expr) == SAVE_EXPR)
{
expr = TREE_OPERAND (expr, 0);
code = TREE_CODE (expr);
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14448