https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934

--- Comment #18 from Iain Sandoe <iains at gcc dot gnu.org> ---
I needed two small additions to build (c-family+Ada+fortran+lto)
** Go and D not tested.

diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index 93b6eb5bb45..af6b6bd14d4 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -171,7 +171,7 @@ gt_pch_nx (Entity_Id &)
 void
 gt_pch_nx (Entity_Id *x, gt_pointer_operator op, void *cookie)
 {
-  op (x, cookie);
+  op (x, NULL, cookie);
 }

 struct dummy_type_hasher : ggc_cache_ptr_hash<tree_entity_vec_map>
diff --git a/gcc/config/host-darwin.h b/gcc/config/host-darwin.h
index 4acae9cf341..f3a477e8837 100644
--- a/gcc/config/host-darwin.h
+++ b/gcc/config/host-darwin.h
@@ -18,7 +18,7 @@
    <http://www.gnu.org/licenses/>.  */

 extern void * darwin_gt_pch_get_address (size_t sz, int fd);
-extern int darwin_gt_pch_use_address (void *addr, size_t sz, int fd, 
+extern int darwin_gt_pch_use_address (void *&addr, size_t sz, int fd, 
                                      size_t off);

 #undef HOST_HOOKS_GT_PCH_GET_ADDRESS

======

I fixed up host-darwin.c in the same way as you did for host-linux (and
disabled some of the extra checks I've got in place at the moment).

======

It looks like it adds around 10M to the largest libstdc++ case for x86_64
(151=>161Mb) so not too bad (6.6%).

1. C and C++ pch.exp seem OK

2. libstdc++ seems OK (some of the tests will use the PCH).

3. I have one failing ObjC test...

(possibly a missing or incorrectly specified GTY(()) - will investigate when I
have a chance).

FAIL: objc.dg/pch/interface-1.m -fnext-runtime -Wno-objc-root-class -O0 -g -I.
-Dwith_PCH (internal compiler error)
FAIL: objc.dg/pch/interface-1.m -fnext-runtime -Wno-objc-root-class -O0 -g -I.
-Dwith_PCH (test for excess errors)
Excess errors:
<built-in>: internal compiler error: tree check: expected identifier_node, have
error_mark in private_lookup_attribute, at attribs.c:1971

Reply via email to