On Tue, Nov 14, 2017 at 07:34:54AM +0100, Richard Biener wrote: > On November 14, 2017 6:21:41 AM GMT+01:00, Jason Merrill <ja...@redhat.com> > wrote: > >On Mon, Nov 13, 2017 at 1:02 PM, Marek Polacek <pola...@redhat.com> > >> In the end I did two bootstraps with the patch, but modifed one of > >them > >> to always return false for ix86_is_empty_record. Then I compared all > >the > >> *.o in both dirs. The result is attached. Then I looked at > >DW_AT_producer > >> for all these .o that differ; all of them are C++. Is this enough to > >> clear our concerns? > > > >Hmm, a bunch of these are right at the beginning, bytes 41 and 65, in > >the header. > > > >Did you build them in the different trunk/trunk2 directories? I think > >Jakub was suggesting building them in the same directory. > >> And I also ran a bootstrap with --enable-cxx-flags=-Wabi=11, and > >didn't > >> see any warnings. > > > >If there's a codegen change, there ought to be a warning to go along > >with it. > > The question was of course also for unintended changes but yes (I was mainly > concerned by libstdc++ ABI changes).
Ok, I did two bootstraps in the same dir, one with ix86_is_empty_record always returning false. There were a few object files that differ in their assembly between those two bootstraps. Previously I didn't see any warnings because I hadn't thought of -Wsystem-headers. Also, we intentionally don't warn if the empty parameter is the last one: + bool seen_empty_type = false; + FOREACH_FUNCTION_ARGS (fntype, argtype, iter) + { + if (VOID_TYPE_P (argtype)) + break; + if (TYPE_EMPTY_P (argtype)) + seen_empty_type = true; + else if (seen_empty_type) + { + cum->warn_empty = true; + break; + } + } After enabling -Wsystem-headers and tweaking the code above so that we warn even if the empty parameter is trailing I can see the warnings that correspond to the assembly changes. Below is a summary of what I found. TL;DR: I don't see any unintended changes. gcc/gcov.o includes #define INCLUDE_ALGORITHM so we'll get bits/stl_algo.h with stuff like bits/stl_algo.h:1840:5: warning: empty class ‘__gnu_cxx::__ops::_Iter_comp_iter<function_line_start_cmp>’ __insertion_sort(_RandomAccessIterator __first, gcc/go/gogo.o includes bits/stl_vector.h: 1535 _M_range_insert(__pos, __first, __last, 1536 std::__iterator_category(__first)); warning: empty class ‘std::forward_iterator_tag’ gcc/go/expressions.o gcc/go/export.o includes bits/stl_algo.h: std::__insertion_sort(__first, __last, __comp); warning: empty class ‘__gnu_cxx::__ops::_Iter_less_iter’ gcc/go/types.o includes bits/stl_algo.h: std::__final_insertion_sort(__first, __last, __comp); warning: empty class ‘__gnu_cxx::__ops::_Iter_comp_iter<Typed_identifier_list_sort>’ gcc/go/statements.o bits/hashtable.h:2068:4: warning: empty class ‘std::integral_constant<bool, true>’ gcc/build/genrecog.o includes #define INCLUDE_ALGORITHM warning: empty class ‘__gnu_cxx::__ops::_Iter_less_iter’ 342 std::__adjust_heap(__first, __parent, __len, _GLIBCXX_MOVE(__value), 343 __comp); gcc/i386.o gcc/bb-reorder.o expected changes gcc/tree-loop-distribution.o uses std::stable_sort x86_64-pc-linux-gnu/libstdc++-v3/src/c++98/bitmap_allocator.o ./src/c++98/bitmap_allocator.cc 57 iterator __tmp = __lower_bound(__free_list.begin(), __free_list.end(), 58 __sz, _LT_pointer_compare()); warning: empty class ‘__gnu_cxx::free_list::_LT_pointer_compare’ x86_64-pc-linux-gnu/libstdc++-v3/src/c++98/messages_members.o x86_64-pc-linux-gnu/libstdc++-v3/src/c++11/sstream-inst.o x86_64-pc-linux-gnu/libstdc++-v3/src/c++11/cxx11-wlocale-inst.o includes bits/basic_string.h: 236 _M_construct(__beg, __end, _Tag()); warning: empty class ‘std::forward_iterator_tag’ x86_64-pc-linux-gnu/libstdc++-v3/src/c++11/cow-shim_facets.o includes c++11/cxx11-shim_facets.cc: 271 return __collate_compare(other_abi{}, _M_get(), 272 lo1, hi1, lo2, hi2); warning: empty class ‘std::integral_constant<bool, true>’ x86_64-pc-linux-gnu/libstdc++-v3/src/c++11/cow-string-inst.o x86_64-pc-linux-gnu/libstdc++-v3/src/c++11/string-inst.o x86_64-pc-linux-gnu/libstdc++-v3/src/c++11/cow-wstring-inst.o includes basic_string.tcc: 563 basic_string<_CharT, _Traits, _Alloc>:: 564 _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, 565 forward_iterator_tag) warning: empty class ‘std::forward_iterator_tag’ x86_64-pc-linux-gnu/libstdc++-v3/src/c++11/cxx11-shim_facets.o see above x86_64-pc-linux-gnu/libstdc++-v3/src/c++11/locale-inst.o x86_64-pc-linux-gnu/libstdc++-v3/src/c++11/wlocale-inst.o includes bits/basic_string.h: 5033 return _S_construct(__beg, __end, __a, _Tag()); warning: empty class ‘std::forward_iterator_tag’ x86_64-pc-linux-gnu/libstdc++-v3/src/c++11/wstring-inst.o includes bits/basic_string.tcc: 206 basic_string<_CharT, _Traits, _Alloc>:: 207 _M_construct(_InIterator __beg, _InIterator __end, 208 std::forward_iterator_tag) warning: empty class ‘std::forward_iterator_tag’ x86_64-pc-linux-gnu/libstdc++-v3/src/filesystem/ops.o includes bits/stl_deque.h: 2012 _M_range_insert_aux(__pos, __first, __last, 2013 std::__iterator_category(__first)); warning: empty class ‘std::forward_iterator_tag’ x86_64-pc-linux-gnu/libstdc++-v3/src/filesystem/cow-path.o includes bits/basic_string.tcc: 1104 basic_string<_CharT, _Traits, _Alloc>:: 1105 _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, 1106 _InputIterator __k2, __false_type) warning: empty class ‘std::__false_type’ x86_64-pc-linux-gnu/libstdc++-v3/src/filesystem/cow-std-ops.o x86_64-pc-linux-gnu/libstdc++-v3/src/filesystem/std-ops.o x86_64-pc-linux-gnu/libstdc++-v3/src/filesystem/cow-ops.o includes bits/deque.tcc: 586 _M_range_insert_aux(iterator __pos, 587 _ForwardIterator __first, _ForwardIterator __last, 588 std::forward_iterator_tag) warning: empty class ‘std::forward_iterator_tag’ x86_64-pc-linux-gnu/libstdc++-v3/src/filesystem/cow-std-path.o includes bits/basic_string.h: 4884 return _M_replace_dispatch(__i1, __i2, __k1, __k2, _Integral()); warning: empty class ‘std::__false_type’ x86_64-pc-linux-gnu/libsanitizer/asan/asan_memory_profile.o warning: empty class ‘__asan::HeapProfile::Print(__sanitizer::uptr, __sanitizer::uptr)::<lambda(const __asan::AllocationSite&, const __asan::AllocationSite&)>’ parameter passing ABI changes in -fabi-version=12 (GCC 8) [-Wabi] void InternalSort(Container *v, uptr size, Compare comp) { x86_64-pc-linux-gnu/libsanitizer/asan/asan_interceptors.o sanitizer_common_interceptors_ioctl.inc:477:15: warning: empty class ‘ioctl_desc_compare’ parameter passing ABI changes in -fabi-version=12 (GCC 8) [-Wabi] InternalSort(&ioctl_table, ioctl_table_size, ioctl_desc_compare()); x86_64-pc-linux-gnu/libsanitizer/asan/.libs/asan_memory_profile.o asan_memory_profile.cc:50:17: warning: empty class ‘__asan::HeapProfile::Print(__sanitizer::uptr, __sanitizer::uptr)::<lambda(const __asan::AllocationSite&, const __asan::AllocationSite&)>’ parameter passing ABI changes in -fabi-version=12 (GCC 8) [-Wabi] InternalSort(&allocations_, allocations_.size(), ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [](const AllocationSite &a, const AllocationSite &b) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ return a.total_size > b.total_size; x86_64-pc-linux-gnu/libsanitizer/asan/.libs/asan_interceptors.o sanitizer_common.h:573:6: warning: empty class ‘ioctl_desc_compare’ parameter passing ABI changes in -fabi-version=12 (GCC 8) [-Wabi] void InternalSort(Container *v, uptr size, Compare comp) { x86_64-pc-linux-gnu/libsanitizer/tsan/tsan_interceptors.o x86_64-pc-linux-gnu/libsanitizer/tsan/.libs/tsan_interceptors.o sanitizer_common_interceptors_ioctl.inc:477:15: warning: empty class ‘ioctl_desc_compare’ parameter passing ABI changes in -fabi-version=12 (GCC 8) [-Wabi] InternalSort(&ioctl_table, ioctl_table_size, ioctl_desc_compare()); Marek