Someone broke darwin?

Mike Stump mrs@apple.com
Tue Jul 11 02:40:00 GMT 2006


On Jul 10, 2006, at 6:20 PM, Mike Stump wrote:
> The next problem after that one is that:
>
> ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:235: internal  
> compiler error: Bus error
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
> make[4]: *** [powerpc-apple-darwin8.5.0/bits/extc++.h.gch/O2g.gch]  
> Error 1

Curious, not caused by changes in gcc/cp since 113399, so the  
regression appears to be a libstdc++ issue.  Anyway, I've tracked the  
issue down to mangling the type for pch, and with this change:

Doing diffs in .:
--- ./mangle.c.~1~      2006-07-10 18:56:25.000000000 -0700
+++ ./mangle.c  2006-07-10 19:16:52.000000000 -0700
@@ -2306,7 +2306,8 @@ write_template_arg (tree node)
      /* A template appearing as a template arg is a template  
template arg.  */
      write_template_template_arg (node);
    else if ((TREE_CODE_CLASS (code) == tcc_constant && code !=  
PTRMEM_CST)
-          || (abi_version_at_least (2) && code == CONST_DECL))
+          || (abi_version_at_least (2) && code == CONST_DECL
+              && TREE_CODE (DECL_INITIAL (node)) != SCOPE_REF))
      write_template_arg_literal (node);
    else if (DECL_P (node))
      {
--------------

it then encodes:

(gdb) pt
<const_decl 0x39d7480 simple_value
     type <enumeral_type 0x39d7420 $_134 type_0 type_6 VOID
         align 8 symtab 0 alias set -1 precision 0
         values <tree_list 0x39d6a80
             purpose <identifier_node 0xc63d00 simple_value
             bindings <0x0>
             local bindings <0x2e72438>> value <const_decl 0x39d7480  
simple_value>> context <record_type 0x39d7240 binary_\
heap_<Value_Type,Cmp_Fn,Allocator>>
         chain <type_decl 0x39d1a80 $_134>>
     readonly constant invariant private VOID file /Volumes/mrs3/net/ 
gcc-darwin/powerpc-apple-darwin8.5.0/libstdc++-v3/inc\
lude/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp line 117
     align 1 context <record_type 0x39d7240  
binary_heap_<Value_Type,Cmp_Fn,Allocator>> initial <scope_ref 0x39d8540>
     chain <type_decl 0x39d1930 binary_heap_>>

<scope_ref 0x39d8540
     arg 0 <record_type 0x2ee1120 is_simple<Key> type_0 type_5 type_6  
VOID
         align 8 symtab 0 alias set -1 context <namespace_decl  
0x2d83930 detail>
         no-binfo use_template=1 interface-unknown
         chain <type_decl 0x2ee2310 is_simple<Key>>>
     arg 1 <identifier_node 0x41eee800 value
     bindings <0x0>
     local bindings <0x0>>>

as something like:

LZNS5_12simple_valueEE

I've not had a chance to think about it, so don't know if that is  
right or not.  Someone else care to let me know if I'm on the right  
track?

If so, someone wanna approve it for mainline to get us bootstrapping  
again?



More information about the Gcc mailing list