This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

Re: Compiling GOLD with GCC 7 fails with compiler errors


On Wed, Jun 08, 2016 at 10:32:00AM +0200, Tobias Burnus wrote:
> ../../gold/mips.cc:6146:8: error: conversion from
> 
>    âstd::unordered_set<{anonymous}::Mips_symbol<64>*, {anonymous}::Mips_symbol_hash<64>, std::equal_to<{anonymous}::Mips_symbol<64>*>, std::allocator<{anonymous}::Mips_symbol<64>*> >::iterator {aka std::__detail::_Node_iterator<{anonymous}::Mips_symbol<64>*, true, true>}â
> 
> to non-scalar type
> 
>    âstd::unordered_set<{anonymous}::Mips_symbol<64>*, std::hash<{anonymous}::Mips_symbol<64>*>, std::equal_to<{anonymous}::Mips_symbol<64>*>, std::allocator<{anonymous}::Mips_symbol<64>*> >::iterator {aka std::__detail::_Node_iterator<{anonymous}::Mips_symbol<64>*, true, false>}â
> 
> requested
> ---------------------------------------------------------------
> 
> I have not yet investigated since which binutils or GCC change it fails
> and whose fault it is.

I can't reproduce this with gcc rev 237240, but I wonder if using the
Global_got_entry_set typedef fixes the problem for you?

diff --git a/gold/mips.cc b/gold/mips.cc
index b8c74d0..c1c1ee1 100644
--- a/gold/mips.cc
+++ b/gold/mips.cc
@@ -6159,7 +6159,7 @@ Mips_output_data_got<size, big_endian>::do_write(Output_file* of)
     }
 
   // Add +1 to GGA_NONE nonzero MIPS16 and microMIPS entries.
-  for (typename Unordered_set<Mips_symbol<size>*>::iterator
+  for (typename Unordered_set<Mips_symbol<size>*, Mips_symbol_hash<size> >::iterator
        p = this->master_got_info_->global_got_symbols().begin();
        p != this->master_got_info_->global_got_symbols().end();
        ++p)

-- 
Alan Modra
Australia Development Lab, IBM


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