This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/4926] Segmentation Fault on Legal Code


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]