libstdc++ bootstrap failure after r261525

François Dumont frs.dumont@gmail.com
Wed Jun 13 20:26:00 GMT 2018


Here is the missing part of the can_advance patch.

     * include/debug/helper_functions.h
     (__gnu_debug::_Safe_iterator<>): Add declaration.
     (__can_advance(_Ite, _Size)): New.
     (__can_advance(const _Safe_iterator<>&, _Size)): Overload declaration.
     * include/debug/functions.h
     (__gnu_debug::_Safe_iterator<>): Remove declaration.
     * include/debug/stl_iterator.h
     (__can_advance(const _Safe_iterator<>&)): New definition.
     * include/debug/stl_iterator.h
     (__can_advance(const std::reverse_iterator<>&, _Size)): New.
     (__can_advance(const std::move_iterator<>&, _Size)): New.
     * include/debug/macros.h (__glibcxx_check_can_increment): New.
     * include/debug/debug.h (__glibcxx_requires_can_increment): New.
     * include/bits/stl_algobase.h (fill_n): Use latter.
     * testsuite/25_algorithms/fill_n/2.cc: New.
     * testsuite/25_algorithms/fill_n/debug/1_neg.cc: New.
     * testsuite/25_algorithms/fill_n/debug/2_neg.cc: New.
     * testsuite/25_algorithms/fill_n/debug/3_neg.cc: New.
     * testsuite/25_algorithms/fill_n/debug/4_neg.cc: New.

Tested under linux x86_64, normal and debug modes.

Now I understand why applying the patch in the first place failed.

François

On 13/06/2018 15:24, Jonathan Wakely wrote:
> On 13/06/18 13:42 +0200, Paolo Carlini wrote:
>> Hi,
>>
>> On 13/06/2018 08:11, François Dumont wrote:
>>> On 12/06/2018 23:26, Martin Sebor wrote:
>>>> Bootstrap fails in libstdc++ with the following error.
>>>> I haven't investigated it much except to take a peek
>>>> at recent libstdc++ commits where r261525 looks like it
>>>> introduced __glibcxx_check_can_increment_range, so it
>>>> seems like it might have something to do with it.  I don't
>>>> see a __glibcxx_requires_can_increment_range macro defined
>>>> anywhere in the patch so maybe it's a typo?  Francois, can
>>>> you please see what's going on?
>>>>
>>>> /opt/notnfs/msebor/build/gcc-86114/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/stl_algobase.h:452:45: 
>>>> error: ‘__glibcxx_requires_can_increment_range’ was not declared in 
>>>> this scope
>>>>        __glibcxx_requires_can_increment_range(__first, __last, 
>>>> __result);
>>>>
>>>> Thanks
>>>> Martin
>>>> .
>>>>
>>> I had missed the fact that the patch didn't apply correctly on 
>>> include/debug/debug.h as stated in the ChangeLog entry.
>>>
>>> It is fixed now.
>> But even after r261537 we are seeing the regressions:
>>
>> FAIL: g++.dg/warn/pr31246.C -std=gnu++11 (test for excess errors)
>> FAIL: g++.dg/warn/pr31246.C -std=gnu++14 (test for excess errors)
>> FAIL: g++.dg/warn/pr31246.C -std=gnu++98 (test for excess errors)
>>
>> Which definitely are related.
>
> And failing Debug Mode tests:
>
> FAIL: 20_util/hash/84998.cc (test for excess errors)
> FAIL: 23_containers/vector/cons/destructible_debug_neg.cc (test for 
> excess errors)
> FAIL: 25_algorithms/binary_search/partitioned.cc (test for excess errors)
> FAIL: 25_algorithms/equal_range/partitioned.cc (test for excess errors)
> FAIL: 25_algorithms/lexicographical_compare/71545.cc (test for excess 
> errors)
> FAIL: 25_algorithms/lower_bound/partitioned.cc (test for excess errors)
> FAIL: 25_algorithms/upper_bound/partitioned.cc (test for excess errors)
> FAIL: ext/profile/mutex_extensions_neg.cc (test for excess errors)
>
> The logs show:
>
> /home/jwakely/src/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/stl_algobase.h:452: 
> error: '__can_advance' is not a member of '__gnu_debug'
> /home/jwakely/src/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/stl_algobase.h:484: 
> error: '__can_advance' is not a member of '__gnu_debug'
> /home/jwakely/src/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/stl_algobase.h:629: 
> error: '__can_advance' is not a member of '__gnu_debug'
> /home/jwakely/src/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/stl_algobase.h:664: 
> error: '__can_advance' is not a member of '__gnu_debug'
>
>
>
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: can_advance.patch
Type: text/x-patch
Size: 12658 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180613/6576a9e3/attachment.bin>


More information about the Gcc-patches mailing list