diff -u gcc-8-8.2.0/debian/changelog gcc-8-8.2.0/debian/changelog --- gcc-8-8.2.0/debian/changelog +++ gcc-8-8.2.0/debian/changelog @@ -1,3 +1,37 @@ +gcc-8 (8.2.0-12ubuntu1) disco; urgency=medium + + * Merge with Debian; remaining changes: + - Build from upstream sources. + + -- Matthias Klose Sun, 09 Dec 2018 11:08:44 +0100 + +gcc-8 (8.2.0-12) unstable; urgency=medium + + * Update to SVN 20181209 (r266918) from the gcc-8-branch. + - Fix PR fortran/88048, PR fortran/88025. + * Back-out the fix for PR c++/87531. Closes: #915980. + + -- Matthias Klose Sun, 09 Dec 2018 11:02:40 +0100 + +gcc-8 (8.2.0-11ubuntu1) disco; urgency=medium + + * Merge with Debian; remaining changes: + - Build from upstream sources. + + -- Matthias Klose Fri, 07 Dec 2018 00:15:55 +0100 + +gcc-8 (8.2.0-11) unstable; urgency=medium + + * Update to SVN 20181206 (r266855) from the gcc-8-branch. + - Fix PR libstdc++/70694, PR libstdc++/88199, PR tree-optimization/87288, + PR target/81685, PR target/87496 (PPC), PR tree-optimization/79351, + PR tree-optimization/88229, PR target/84711 (ARM), PR c++/88120, + PR c++/87531, PR fortran/88073, PR fortran/88143, PR libfortran/88137, + PR libfortran/88137. + * Back-out the gcc-search-prefixed-as-ld patch. See #915194. + + -- Matthias Klose Fri, 07 Dec 2018 00:06:23 +0100 + gcc-8 (8.2.0-10ubuntu1) disco; urgency=medium * Merge with Debian; remaining changes: diff -u gcc-8-8.2.0/debian/patches/svn-updates.diff gcc-8-8.2.0/debian/patches/svn-updates.diff --- gcc-8-8.2.0/debian/patches/svn-updates.diff +++ gcc-8-8.2.0/debian/patches/svn-updates.diff @@ -1,10 +1,10 @@ -# DP: updates from the 8 branch upto 20181123 (r266402). +# DP: updates from the 8 branch upto 20181209 (r266918). last_update() { cat > ${dir}LAST_UPDATED (std::allocator<_Tp_nc>(), std::forward<_Args>(__args)...); } +Index: libstdc++-v3/include/bits/hashtable.h +=================================================================== +--- a/src/libstdc++-v3/include/bits/hashtable.h (.../tags/gcc_8_2_0_release) ++++ b/src/libstdc++-v3/include/bits/hashtable.h (.../branches/gcc-8-branch) +@@ -1222,6 +1222,9 @@ + _M_assign(__ht, + [&__roan](__node_type* __n) + { return __roan(std::move_if_noexcept(__n->_M_v())); }); ++ ++ if (__former_buckets) ++ _M_deallocate_buckets(__former_buckets, __former_bucket_count); + __ht.clear(); + } + __catch(...) Index: libstdc++-v3/include/bits/stl_list.h =================================================================== --- a/src/libstdc++-v3/include/bits/stl_list.h (.../tags/gcc_8_2_0_release) @@ -2645,7 +2697,25 @@ =================================================================== --- a/src/libstdc++-v3/ChangeLog (.../tags/gcc_8_2_0_release) +++ b/src/libstdc++-v3/ChangeLog (.../branches/gcc-8-branch) -@@ -1,3 +1,422 @@ +@@ -1,3 +1,440 @@ ++2018-12-06 Iain Sandoe ++ ++ Backport from mainline ++ 2018-08-25 Iain Sandoe ++ ++ PR libstdc++/70694 ++ * configure.host (OPT_LDFLAGS): Don't append ++ -fvisibility-inlines-hidden for newer Darwin. ++ ++2018-11-28 François Dumont ++ ++ PR libstdc++/88199 ++ * include/bits/hashtable.h ++ (_Hashtable<>::_M_move_assign(_Hashtable&&, false_type)): Deallocate ++ former buckets after assignment. ++ * testsuite/23_containers/unordered_set/allocator/move_assign.cc ++ (test03): New. ++ +2018-11-22 Jonathan Wakely + + Backport from mainline @@ -3943,6 +4013,178 @@ + +constexpr bool b + = std::is_default_constructible>>::value; +Index: libstdc++-v3/testsuite/23_containers/unordered_set/allocator/move_assign.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/23_containers/unordered_set/allocator/move_assign.cc (.../tags/gcc_8_2_0_release) ++++ b/src/libstdc++-v3/testsuite/23_containers/unordered_set/allocator/move_assign.cc (.../branches/gcc-8-branch) +@@ -18,6 +18,7 @@ + // { dg-do run { target c++11 } } + + #include ++ + #include + #include + #include +@@ -24,65 +25,126 @@ + + using __gnu_test::propagating_allocator; + using __gnu_test::counter_type; ++using __gnu_test::tracker_allocator; ++using __gnu_test::tracker_allocator_counter; + + void test01() + { +- typedef propagating_allocator alloc_type; +- typedef __gnu_test::counter_type_hasher hash; +- typedef std::unordered_set, +- alloc_type> test_type; ++ tracker_allocator_counter::reset(); ++ { ++ typedef propagating_allocator> alloc_type; ++ typedef __gnu_test::counter_type_hasher hash; ++ typedef std::unordered_set, ++ alloc_type> test_type; + +- test_type v1(alloc_type(1)); +- v1.emplace(0); ++ test_type v1(alloc_type(1)); ++ v1.emplace(0); + +- test_type v2(alloc_type(2)); +- v2.emplace(1); ++ test_type v2(alloc_type(2)); ++ v2.emplace(1); + +- counter_type::reset(); ++ counter_type::reset(); + +- v2 = std::move(v1); ++ v2 = std::move(v1); + +- VERIFY( 1 == v1.get_allocator().get_personality() ); +- VERIFY( 2 == v2.get_allocator().get_personality() ); ++ VERIFY( 1 == v1.get_allocator().get_personality() ); ++ VERIFY( 2 == v2.get_allocator().get_personality() ); + +- VERIFY( counter_type::move_count == 1 ); +- VERIFY( counter_type::destructor_count == 2 ); ++ VERIFY( counter_type::move_count == 1 ); ++ VERIFY( counter_type::destructor_count == 2 ); ++ } ++ ++ // Check there's nothing left allocated or constructed. ++ VERIFY( tracker_allocator_counter::get_construct_count() ++ == tracker_allocator_counter::get_destruct_count() ); ++ VERIFY( tracker_allocator_counter::get_allocation_count() ++ == tracker_allocator_counter::get_deallocation_count() ); + } + + void test02() + { +- typedef propagating_allocator alloc_type; +- typedef __gnu_test::counter_type_hasher hash; +- typedef std::unordered_set, +- alloc_type> test_type; ++ tracker_allocator_counter::reset(); ++ { ++ typedef propagating_allocator> alloc_type; ++ typedef __gnu_test::counter_type_hasher hash; ++ typedef std::unordered_set, ++ alloc_type> test_type; + +- test_type v1(alloc_type(1)); +- v1.emplace(0); ++ test_type v1(alloc_type(1)); ++ v1.emplace(0); + +- auto it = v1.begin(); ++ auto it = v1.begin(); + +- test_type v2(alloc_type(2)); +- v2.emplace(0); ++ test_type v2(alloc_type(2)); ++ v2.emplace(0); + +- counter_type::reset(); ++ counter_type::reset(); + +- v2 = std::move(v1); ++ v2 = std::move(v1); + +- VERIFY(0 == v1.get_allocator().get_personality()); +- VERIFY(1 == v2.get_allocator().get_personality()); ++ VERIFY(0 == v1.get_allocator().get_personality()); ++ VERIFY(1 == v2.get_allocator().get_personality()); + +- VERIFY( counter_type::move_count == 0 ); +- VERIFY( counter_type::copy_count == 0 ); +- VERIFY( counter_type::destructor_count == 1 ); ++ VERIFY( counter_type::move_count == 0 ); ++ VERIFY( counter_type::copy_count == 0 ); ++ VERIFY( counter_type::destructor_count == 1 ); + +- VERIFY( it == v2.begin() ); ++ VERIFY( it == v2.begin() ); ++ } ++ ++ // Check there's nothing left allocated or constructed. ++ VERIFY( tracker_allocator_counter::get_construct_count() ++ == tracker_allocator_counter::get_destruct_count() ); ++ VERIFY( tracker_allocator_counter::get_allocation_count() ++ == tracker_allocator_counter::get_deallocation_count() ); + } + ++void test03() ++{ ++ tracker_allocator_counter::reset(); ++ { ++ typedef propagating_allocator> alloc_type; ++ typedef __gnu_test::counter_type_hasher hash; ++ typedef std::unordered_set, ++ alloc_type> test_type; ++ ++ test_type v1(alloc_type(1)); ++ v1.emplace(0); ++ ++ test_type v2(alloc_type(2)); ++ int i = 0; ++ v2.emplace(i++); ++ for (; v2.bucket_count() == v1.bucket_count(); ++i) ++ v2.emplace(i); ++ ++ counter_type::reset(); ++ ++ v2 = std::move(v1); ++ ++ VERIFY( 1 == v1.get_allocator().get_personality() ); ++ VERIFY( 2 == v2.get_allocator().get_personality() ); ++ ++ VERIFY( counter_type::move_count == 1 ); ++ VERIFY( counter_type::destructor_count == i + 1 ); ++ } ++ ++ // Check there's nothing left allocated or constructed. ++ VERIFY( tracker_allocator_counter::get_construct_count() ++ == tracker_allocator_counter::get_destruct_count() ); ++ VERIFY( tracker_allocator_counter::get_allocation_count() ++ == tracker_allocator_counter::get_deallocation_count() ); ++} ++ + int main() + { + test01(); + test02(); ++ test03(); + return 0; + } Index: libstdc++-v3/testsuite/23_containers/list/cons/87809.cc =================================================================== --- a/src/libstdc++-v3/testsuite/23_containers/list/cons/87809.cc (.../tags/gcc_8_2_0_release) @@ -6448,7 +6690,7 @@ +++ b/src/gcc/DATESTAMP (.../branches/gcc-8-branch) @@ -1 +1 @@ -20180726 -+20181123 ++20181209 Index: gcc/defaults.h =================================================================== --- a/src/gcc/defaults.h (.../tags/gcc_8_2_0_release) @@ -6896,7 +7138,15 @@ bool res = false; switch (TREE_CODE_LENGTH ((tree_code) rcode)) { -@@ -3979,7 +3963,6 @@ +@@ -1992,6 +1976,7 @@ + base2 = get_ref_base_and_extent (gimple_assign_lhs (def_stmt), + &offset2, &size2, &maxsize2, &reverse); + if (known_size_p (maxsize2) ++ && known_eq (maxsize2, size2) + && operand_equal_p (base, base2, 0) + && known_subrange_p (offset, maxsize, offset2, size2)) + { +@@ -3979,7 +3964,6 @@ /* First try constant folding based on our current lattice. */ mprts_hook = vn_lookup_simplify_result; @@ -6908,7 +7158,96 @@ =================================================================== --- a/src/gcc/ChangeLog (.../tags/gcc_8_2_0_release) +++ b/src/gcc/ChangeLog (.../branches/gcc-8-branch) -@@ -1,3 +1,949 @@ +@@ -1,3 +1,1038 @@ ++2018-12-05 Richard Biener ++ ++ Backport from mainline ++ 2018-09-20 Richard Sandiford ++ ++ PR tree-optimization/87288 ++ * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS ++ into account when determining PEELING_FOR_NITERS. ++ ++2018-12-05 Iain Sandoe ++ ++ Backport from mainline ++ 2018-08-18 Iain Sandoe ++ ++ * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set, ++ emit a diagnostic that it is not supported and reset the option. ++ * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not ++ supported and consume the option. (ASM_FINAL_SPEC): New. ++ ++2018-12-04 Iain Sandoe ++ ++ Backport from mainline ++ 2018-08-15 Iain Sandoe ++ ++ PR target/81685 ++ * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION, ++ DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION, ++ DEBUG_PUBTYPES_SECTION) update to include GNU variant. ++ ++2018-11-29 Peter Bergner ++ ++ Backport from mainline ++ 2018-11-29 Peter Bergner ++ ++ PR target/87496 ++ * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow ++ -mabi=ieeelongdouble without both -mpopcntd and -mvsx. ++ ++2018-11-28 Aaron Sawdey ++ ++ Backport from mainline ++ 2018-10-25 Aaron Sawdey ++ ++ * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to ++ a shorter sequence with fewer branches. ++ (emit_final_str_compare_gpr): Ditto. ++ ++ Backport from mainline to allow the above code to go in: ++ 2018-06-14 Aaron Sawdey ++ ++ * config/rs6000/rs6000-string.c (do_and3, do_and3_mask, ++ do_cmpb3, do_rotl3): New functions. ++ ++2018-11-28 Richard Biener ++ ++ PR tree-optimization/79351 ++ * tree-ssa-sccvn.c (vn_reference_lookup_3): For assignments from ++ empty CONSTRUCTORs ensure the store is at a constant position. ++ ++2018-11-28 Richard Biener ++ ++ PR tree-optimization/88229 ++ * tree-ssa.c (non_rewritable_mem_ref_base): Check DECL_SIZE_UNIT ++ is an INTEGER_CST before accessing it so. ++ ++2018-11-26 Andreas Krebbel ++ ++ Backport from mainline ++ 2018-11-20 Andreas Krebbel ++ ++ * config/s390/s390.md ("clztidi2"): Swap the RTX's written to the ++ DImode parts of the target operand. ++ ++2018-11-26 Andreas Krebbel ++ ++ Backport from mainline ++ 2018-11-26 Andreas Krebbel ++ ++ * doc/invoke.texi: Document z14/arch12 -march option. ++ ++2018-11-23 Tamar Christina ++ ++ Backported from mainline. ++ 2018-08-16 Tamar Christina ++ ++ PR target/84711 ++ * config/arm/neon.md (movv4hf, movv8hf): Refactored to.. ++ (mov): ..this and enable unconditionally. ++ +2018-11-22 Uros Bizjak + + Backport from mainline @@ -7858,7 +8197,7 @@ 2018-07-26 Release Manager * GCC 8.2.0 released. -@@ -647,8 +1595,8 @@ +@@ -647,8 +1684,8 @@ 2018-06-11 Jason Merrill @@ -7869,7 +8208,7 @@ 2018-06-11 Peter Bergner -@@ -941,7 +1889,7 @@ +@@ -941,7 +1978,7 @@ Backport from mainline 2018-05-11 Martin Liska @@ -7878,7 +8217,7 @@ * doc/extend.texi: Document LLVM style format for no_sanitize attribute. -@@ -1369,9 +2317,9 @@ +@@ -1369,9 +2406,9 @@ 2018-04-20 Carl Love @@ -7891,7 +8230,7 @@ 2018-04-20 Nathan Sidwell Tom de Vries -@@ -1733,7 +2681,7 @@ +@@ -1733,7 +2770,7 @@ PR ipa/85329 * multiple_target.c (create_dispatcher_calls): Set apostrophes for target_clone error message. Make default implementation @@ -7900,7 +8239,7 @@ (separate_attrs): Add new argument and check for an empty string. (expand_target_clones): Handle it. -@@ -1835,7 +2783,7 @@ +@@ -1835,7 +2872,7 @@ * cfgloopanal.c (expected_loop_iterations_unbounded): Add by_profile_only parameter. * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile @@ -7909,7 +8248,7 @@ * cfgloop.h (expected_loop_iterations_unbounded): Update prototype 2018-04-13 Jan Hubicka -@@ -4949,7 +5897,7 @@ +@@ -4949,7 +5986,7 @@ 2018-02-26 Ramana Radhakrishnan @@ -7918,6 +8257,19 @@ * common/config/aarch64/aarch64-common.c (aarch_option_optimization_table[]): Switch off fomit-frame-pointer +Index: gcc/testsuite/jit.dg/test-long-names.c +=================================================================== +--- a/src/gcc/testsuite/jit.dg/test-long-names.c (.../tags/gcc_8_2_0_release) ++++ b/src/gcc/testsuite/jit.dg/test-long-names.c (.../branches/gcc-8-branch) +@@ -24,7 +24,7 @@ + int i; + + /* Begin with the given prefix: */ +- sprintf (buffer, prefix); ++ sprintf (buffer, "%s", prefix); + + /* Populate the rest of the buffer with 0123456789 repeatedly: */ + for (i = strlen (prefix); i < NAME_LENGTH - 1; i++) Index: gcc/testsuite/gcc.target/powerpc/pr86731-nogimplefold.c =================================================================== --- a/src/gcc/testsuite/gcc.target/powerpc/pr86731-nogimplefold.c (.../tags/gcc_8_2_0_release) @@ -8025,6 +8377,21 @@ } } if (tcr->nLJ) +Index: gcc/testsuite/gcc.target/powerpc/pr87496.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/powerpc/pr87496.c (.../tags/gcc_8_2_0_release) ++++ b/src/gcc/testsuite/gcc.target/powerpc/pr87496.c (.../branches/gcc-8-branch) +@@ -0,0 +1,10 @@ ++/* PR target/87496.c */ ++/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } } */ ++/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */ ++/* { dg-require-effective-target longdouble128 } */ ++/* { dg-options "-O2 -mcpu=power7 -mabi=ieeelongdouble -mno-popcntd -Wno-psabi" } */ ++ ++int i; ++ ++/* { dg-error "'-mabi=ieeelongdouble' requires full ISA 2.06 support" "PR87496" { target *-*-* } 0 } */ Index: gcc/testsuite/gcc.target/powerpc/pr86731.c =================================================================== --- a/src/gcc/testsuite/gcc.target/powerpc/pr86731.c (.../tags/gcc_8_2_0_release) @@ -8308,6 +8675,58 @@ + y.M0 ?: bar(0); + bar(__builtin_alloca(8)); +} +Index: gcc/testsuite/gcc.target/s390/flogr-1.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/s390/flogr-1.c (.../tags/gcc_8_2_0_release) ++++ b/src/gcc/testsuite/gcc.target/s390/flogr-1.c (.../branches/gcc-8-branch) +@@ -0,0 +1,47 @@ ++/* { dg-do run } */ ++/* { dg-options "-O2 -funroll-loops -march=z9-109" } */ ++/* { dg-require-effective-target stdint_types } */ ++ ++/* Folding of the FLOGR caused a wrong value to be returned by ++ __builtin_clz becuase of a problem in the RTX we emit for FLOGR. ++ The problematic folding can only be triggered with constants inputs ++ introduced on RTL level. In this case it happens with loop ++ unrolling. */ ++ ++#include ++#include ++ ++static inline uint32_t pow2_ceil_u32(uint32_t x) { ++ if (x <= 1) { ++ return x; ++ } ++ int msb_on_index; ++ msb_on_index = (31 ^ __builtin_clz(x - 1)); ++ assert(msb_on_index < 31); ++ return 1U << (msb_on_index + 1); ++} ++ ++void __attribute__((noinline,noclone)) ++die (int a) ++{ ++ if (a) ++ __builtin_abort (); ++} ++ ++void test_pow2_ceil_u32(void) { ++ unsigned i; ++ ++ for (i = 0; i < 18; i++) { ++ uint32_t a_ = (pow2_ceil_u32(((uint32_t)1) << i)); ++ if (!(a_ == (((uint32_t)1) << i))) { ++ die(1); ++ } ++ } ++} ++ ++int ++main(void) { ++ test_pow2_ceil_u32(); ++ ++ return 0; ++} Index: gcc/testsuite/gcc.target/s390/dfp_to_bfp_rounding.c =================================================================== --- a/src/gcc/testsuite/gcc.target/s390/dfp_to_bfp_rounding.c (.../tags/gcc_8_2_0_release) @@ -9130,6 +9549,18 @@ + END IF + END PROGRAM MFE +! { dg-final { scan-tree-dump-times "it_objs->_vptr->_size" 1 "original" } } +Index: gcc/testsuite/gfortran.dg/pr88048.f90 +=================================================================== +--- a/src/gcc/testsuite/gfortran.dg/pr88048.f90 (.../tags/gcc_8_2_0_release) ++++ b/src/gcc/testsuite/gfortran.dg/pr88048.f90 (.../branches/gcc-8-branch) +@@ -0,0 +1,7 @@ ++! { dg-do compile } ++! PR fortran/88048 ++program p ++ integer, parameter :: a(2) = 1 ++ data a(2) /a(1)/ ! { dg-error "definable entity" } ++ print *, a ++end Index: gcc/testsuite/gfortran.dg/array_constructor_type_23.f90 =================================================================== --- a/src/gcc/testsuite/gfortran.dg/array_constructor_type_23.f90 (.../tags/gcc_8_2_0_release) @@ -9273,6 +9704,18 @@ + end do + if (j .ne. 64) stop 2 +end program pr86421 +Index: gcc/testsuite/gfortran.dg/pr88025.f90 +=================================================================== +--- a/src/gcc/testsuite/gfortran.dg/pr88025.f90 (.../tags/gcc_8_2_0_release) ++++ b/src/gcc/testsuite/gfortran.dg/pr88025.f90 (.../branches/gcc-8-branch) +@@ -0,0 +1,7 @@ ++! { dg-do compile } ++! PR fortran/88025 ++program p ++ type t ++ character(('')) :: c = 'c' ! { dg-error "must be of INTEGER type" } ++ end type ++end Index: gcc/testsuite/gfortran.dg/generic_34.f90 =================================================================== --- a/src/gcc/testsuite/gfortran.dg/generic_34.f90 (.../tags/gcc_8_2_0_release) @@ -9481,6 +9924,36 @@ + integer :: c = all(modulo([2,3],0) == 0) ! { dg-error "shall not be zero" } + integer :: d = any(modulo([2,3],0) == 0) ! { dg-error "shall not be zero" } +end program +Index: gcc/testsuite/gfortran.dg/where_7.f90 +=================================================================== +--- a/src/gcc/testsuite/gfortran.dg/where_7.f90 (.../tags/gcc_8_2_0_release) ++++ b/src/gcc/testsuite/gfortran.dg/where_7.f90 (.../branches/gcc-8-branch) +@@ -0,0 +1,25 @@ ++! { dg-do compile } ++! { dg-options "-ffrontend-optimize" } ++! PR fortran/88073 - this used to ICE with front-end optimization ++! Original test case by 'mecej4' ++Subroutine tfu (n, x, f) ++ Implicit None ++ Integer, Parameter :: double = Kind (0.d0) ++ Integer, Intent (In) :: n ++ Real (double), Intent (Out) :: f ++ Real (double), Intent (In) :: x (n) ++ Integer :: j ++ Logical, Dimension(n) :: l1v, l2v, l3v ++! ++ l3v = .False. ++ l2v = .False. ++ l1v = (/ (j, j=1, n) /) == 1 ++ Where ( .Not. (l1v)) ++ l2v = (/ (j, j=1, n) /) == n ++ End Where ++ Where ( .Not. l1v) ++ l3v = .Not. l2v ++ End Where ++ f = sum (x(1:n), mask=l3v) ++ Return ++end subroutine tfu Index: gcc/testsuite/gfortran.dg/inline_matmul_24.f90 =================================================================== --- a/src/gcc/testsuite/gfortran.dg/inline_matmul_24.f90 (.../tags/gcc_8_2_0_release) @@ -10380,6 +10853,37 @@ + + return 0; +} +Index: gcc/testsuite/gcc.dg/torture/pr79351.c +=================================================================== +--- a/src/gcc/testsuite/gcc.dg/torture/pr79351.c (.../tags/gcc_8_2_0_release) ++++ b/src/gcc/testsuite/gcc.dg/torture/pr79351.c (.../branches/gcc-8-branch) +@@ -0,0 +1,26 @@ ++/* { dg-do run } */ ++ ++static struct state { ++ int k; ++ int dummy; ++} states[256]; ++ ++__attribute((noipa)) ++static void ++ismatch(int n) ++{ ++ for (int j=0; j ++ ++ PR fortran/88048 ++ * gfortran.dg/pr88048.f90: New test. ++ ++2018-12-08 Steven G. Kargl ++ ++ PR fortran/88025 ++ * gfortran.dg/pr88025.f90: New test. ++ ++2018-12-06 Iain Sandoe ++ ++ Backport from mainline ++ 2018-08-16 Iain Sandoe ++ ++ PR testsuite/78544 ++ * gcc.dg/tree-prof/section-attr-1.c: Add Darwin-specific section ++ attributes and matching. ++ * gcc.dg/tree-prof/section-attr-2.c: Likewise. ++ * gcc.dg/tree-prof/section-attr-3.c: Likewise. ++ ++2018-12-05 Richard Biener ++ ++ Backport from mainline ++ 2018-09-20 Richard Sandiford ++ ++ PR tree-optimization/87288 ++ * gcc.dg/vect/pr87288-1.c: New test. ++ * gcc.dg/vect/pr87288-2.c: Likewise, ++ * gcc.dg/vect/pr87288-3.c: Likewise. ++ ++2018-12-05 Iain Sandoe ++ ++ Backport from mainline ++ 2018-08-18 Iain Sandoe ++ ++ * g++.dg/debug/dwarf2/pr85302.C: Skip unsupported split DWARF ++ test on Darwin. ++ * g++.dg/debug/dwarf2/pr85302.C: Likewise. ++ * gcc.dg/lto/pr83719_0.c: Likewise. ++ ++2018-11-29 Peter Bergner ++ ++ Backport from mainline ++ 2018-11-29 Peter Bergner ++ ++ PR target/87496 ++ * gcc.target/powerpc/pr87496.c: New test. ++ ++2018-11-29 Nathan Sidwell ++ ++ PR c++/87531 ++ * g++.dg/lookup/pr87531.C: New. ++ ++2018-11-28 Richard Biener ++ ++ PR tree-optimization/79351 ++ * gcc.dg/torture/pr79351.c: New testcase. ++ ++2018-11-26 Andreas Krebbel ++ ++ Backport from mainline ++ 2018-11-20 Andreas Krebbel ++ ++ * gcc.target/s390/flogr-1.c: New test. ++ ++2018-11-26 Matthias Klose ++ ++ * jit.dg/test-long-names.c: Fix build with -Wformat-security. ++ ++2018-11-25 Thomas Koenig ++ ++ Backport from trunk ++ PR fortran/88073 ++ * gfortran.dg/where_7.f90: New test. ++ ++2018-11-24 Paul Thomas ++ ++ Backport from trunk ++ PR fortran/88143 ++ * gfortran.dg/associate_46.f90: New test. ++ +2018-11-22 Eric Botcazou + + Backport from mainline @@ -11548,7 +12409,7 @@ 2018-07-26 Release Manager * GCC 8.2.0 released. -@@ -8,10 +668,10 @@ +@@ -8,10 +750,10 @@ 2018-07-16 Carl Love PR target/86414 @@ -11561,7 +12422,7 @@ * gcc.target/powerpc/mulkc3-3.c: Ditto. * gcc.target/powerpc/fold-vec-mergehl-double.c: Update counts. * gcc.target/powerpc/pr85456.c: Make check Linux and AIX specific. -@@ -743,7 +1403,7 @@ +@@ -743,7 +1485,7 @@ Backport from mainline 2018-05-11 Martin Liska @@ -11570,7 +12431,7 @@ * c-c++-common/ubsan/attrib-6.c: New test. 2018-05-22 Martin Sebor -@@ -1443,11 +2103,11 @@ +@@ -1443,11 +2185,11 @@ 2018-04-13 Andreas Krebbel @@ -11587,7 +12448,7 @@ 2018-04-13 Jan Hubicka -@@ -2780,7 +3440,7 @@ +@@ -2780,7 +3522,7 @@ * g++.dg/cpp2a/desig7.C: New test. 2018-03-16 Mark Doffman @@ -11596,7 +12457,7 @@ * gfortran.dg/automatic_1.f90: New test. * gfortran.dg/automatic_repeat.f90: New test -@@ -4015,9 +4675,9 @@ +@@ -4015,9 +4757,9 @@ 2018-02-20 Jeff Law @@ -11609,7 +12470,7 @@ * gcc.dg/pr81592.c: New test. * gcc.dg/pr82123.c: New test. * gcc.dg/builtin-unreachable-6.c: Turn off VRP. -@@ -6741,7 +7401,7 @@ +@@ -6741,7 +7483,7 @@ 2018-02-14 Carl Love @@ -11655,6 +12516,84 @@ + C c; + return 0; +} +Index: gcc/testsuite/g++.dg/lookup/pr87531.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/lookup/pr87531.C (.../tags/gcc_8_2_0_release) ++++ b/src/gcc/testsuite/g++.dg/lookup/pr87531.C (.../branches/gcc-8-branch) +@@ -0,0 +1,73 @@ ++// PR c+/87531 lookup of operator= in templates ++// { dg-do run } ++ ++struct Base { ++ void operator= (Base const&); ++}; ++ ++void Base::operator= (Base const &) ++{ ++} ++ ++template ++struct Derived : Base ++{ ++ T v; ++ ++ Derived() : v (0) {} ++ Derived(T v_) : v (v_) {} ++ ++ T &assign1 (Derived const& rhs) ++ { ++ operator=(rhs); // erroneously bound to Base::operator= ++ return v; ++ } ++ ++ T &assign2 (Derived const& rhs) ++ { ++ this->operator=(rhs); // erroneously bound to Base::operator= ++ return v; ++ } ++}; ++ ++template ++struct Single ++{ ++ T v; ++ ++ Single () : v (0) {} ++ Single (T v_) : v (v_) {} ++ ++ T &assign1 (Single const& rhs) ++ { ++ operator=(rhs); // lookup failed ++ return v; ++ } ++ ++ T &assign2 (Single const& rhs) ++ { ++ this->operator=(rhs); // Marked as dependent, happened to work ++ return v; ++ } ++}; ++ ++int main() ++{ ++ Derived a, b(123); ++ ++ if (a.assign1 (b) != 123) ++ return 1; ++ ++ if (a.assign2 (b) != 123) ++ return 2; ++ ++ Single c, d(123); ++ ++ if (c.assign1 (d) != 123) ++ return 3; ++ ++ if (c.assign2 (d) != 123) ++ return 4; ++ ++ return 0; ++} Index: gcc/testsuite/g++.dg/warn/pr86881.C =================================================================== --- a/src/gcc/testsuite/g++.dg/warn/pr86881.C (.../tags/gcc_8_2_0_release) @@ -11952,6 +12891,17 @@ + + Callable<&Foo::mfun> bm; +}; +Index: gcc/testsuite/g++.dg/debug/dwarf2/pr85302.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/debug/dwarf2/pr85302.C (.../tags/gcc_8_2_0_release) ++++ b/src/gcc/testsuite/g++.dg/debug/dwarf2/pr85302.C (.../branches/gcc-8-branch) +@@ -1,5 +1,6 @@ + // PR debug/85302 + // { dg-do compile } ++// { dg-skip-if "split DWARF unsupported" { *-*-darwin* } } + // { dg-options "-std=c++11 -gsplit-dwarf -O1" } + // { dg-additional-options "-fPIE" { target pie } } + Index: gcc/testsuite/g++.dg/debug/dwarf2/pr87462.C =================================================================== --- a/src/gcc/testsuite/g++.dg/debug/dwarf2/pr87462.C (.../tags/gcc_8_2_0_release) @@ -12042,6 +12992,34 @@ +{ + __builtin_ia32_rdrand32_step (b); +} +Index: gcc/testsuite/g++.dg/cpp0x/pr88120.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/cpp0x/pr88120.C (.../tags/gcc_8_2_0_release) ++++ b/src/gcc/testsuite/g++.dg/cpp0x/pr88120.C (.../branches/gcc-8-branch) +@@ -0,0 +1,23 @@ ++// PR c++/88120 ++// { dg-do compile { target c++11 } } ++ ++typedef int a; ++enum b : a; ++class c { ++ enum f { d }; ++ c(f); ++ friend c operator&(c, c); ++ typedef void (c::*e)(); ++ operator e(); ++}; ++class g { ++ template b h(); ++ struct k { ++ c i; ++ }; ++}; ++template b g::h() { ++ k j; ++ &j || j.i &c::d; ++ return b(); ++} Index: gcc/testsuite/g++.dg/cpp0x/gen-attrs-66.C =================================================================== --- a/src/gcc/testsuite/g++.dg/cpp0x/gen-attrs-66.C (.../tags/gcc_8_2_0_release) @@ -12992,6 +13970,15 @@ { dependent: return build_min_nt_loc (UNKNOWN_LOCATION, COMPONENT_REF, +@@ -4826,7 +4831,7 @@ + tree pfn0, delta0, e1, e2; + + if (TREE_SIDE_EFFECTS (op0)) +- op0 = save_expr (op0); ++ op0 = cp_save_expr (op0); + + pfn0 = pfn_from_ptrmemfunc (op0); + delta0 = delta_from_ptrmemfunc (op0); @@ -5353,6 +5358,7 @@ otherwise, it will be given type RESULT_TYPE. */ if (! converted) @@ -13058,6 +14045,26 @@ /* Copy the non-static data members of T. This will include its direct non-virtual bases & vtable. */ +@@ -7031,6 +7035,19 @@ + else if (DECL_DECLARES_FUNCTION_P (x)) + DECL_IN_AGGR_P (x) = false; + ++ /* Also add a USING_DECL for operator=. We know there'll be (at ++ least) one, but we don't know the signature(s). We want name ++ lookup not to fail or recurse into bases. This isn't added ++ to the template decl list so we drop this at instantiation ++ time. */ ++ tree ass_op = build_lang_decl (USING_DECL, assign_op_identifier, ++ NULL_TREE); ++ USING_DECL_SCOPE (ass_op) = t; ++ DECL_DEPENDENT_P (ass_op) = true; ++ DECL_ARTIFICIAL (ass_op) = true; ++ DECL_CHAIN (ass_op) = TYPE_FIELDS (t); ++ TYPE_FIELDS (t) = ass_op; ++ + TYPE_SIZE (t) = bitsize_zero_node; + TYPE_SIZE_UNIT (t) = size_zero_node; + /* COMPLETE_TYPE_P is now true. */ Index: gcc/cp/decl.c =================================================================== --- a/src/gcc/cp/decl.c (.../tags/gcc_8_2_0_release) @@ -13157,7 +14164,22 @@ =================================================================== --- a/src/gcc/cp/ChangeLog (.../tags/gcc_8_2_0_release) +++ b/src/gcc/cp/ChangeLog (.../branches/gcc-8-branch) -@@ -1,3 +1,152 @@ +@@ -1,3 +1,167 @@ ++2018-12-04 Marek Polacek ++ ++ Backported from mainline ++ 2018-11-26 Marek Polacek ++ ++ PR c++/88120 - ICE when calling save_expr in a template. ++ * typeck.c (cp_build_binary_op): Call cp_save_expr instead of ++ save_expr. ++ ++2018-11-29 Nathan Sidwell ++ ++ PR c++/87531 ++ * class.c (finish_struct): In a template, add artificial using ++ decl for operator=. ++ +2018-11-15 Nathan Sidwell + + PR c++/86246 @@ -14994,7 +16016,33 @@ =================================================================== --- a/src/gcc/fortran/ChangeLog (.../tags/gcc_8_2_0_release) +++ b/src/gcc/fortran/ChangeLog (.../branches/gcc-8-branch) -@@ -1,3 +1,149 @@ +@@ -1,3 +1,175 @@ ++2018-12-08 Steven G. Kargl ++ ++ PR fortran/88048 ++ * resolve.c (check_data_variable): Named constant cannot be a ++ data object. ++ ++2018-12-08 Steven G. Kargl ++ ++ PR fortran/88025 ++ * expr.c (gfc_apply_init): Remove asserts that cannot trigger. ++ Check for a NULL pointer. ++ ++2018-11-25 Thomas Koenig ++ ++ Backport from trunk ++ PR fortran/88073 ++ * frontend-passes.c (combine_array_constructor): Do not do ++ anything if in a WHERE statement. ++ ++2018-11-24 Paul Thomas ++ ++ Backport from trunk ++ PR fortran/88143 ++ * resolve.c (resolve_variable): Check for associate names with ++ NULL target. ++ +2018-11-05 Jakub Jelinek + + Backported from mainline @@ -15190,7 +16238,23 @@ if (!gfc_simplify_expr (ap->expr, type)) return false; -@@ -5360,16 +5374,13 @@ +@@ -4273,12 +4287,10 @@ + { + if (ts->type == BT_CHARACTER && !attr->pointer && init + && ts->u.cl +- && ts->u.cl->length && ts->u.cl->length->expr_type == EXPR_CONSTANT) ++ && ts->u.cl->length ++ && ts->u.cl->length->expr_type == EXPR_CONSTANT ++ && ts->u.cl->length->ts.type == BT_INTEGER) + { +- gcc_assert (ts->u.cl && ts->u.cl->length); +- gcc_assert (ts->u.cl->length->expr_type == EXPR_CONSTANT); +- gcc_assert (ts->u.cl->length->ts.type == BT_INTEGER); +- + HOST_WIDE_INT len = gfc_mpz_get_hwi (ts->u.cl->length->value.integer); + + if (init->expr_type == EXPR_CONSTANT) +@@ -5360,16 +5372,13 @@ return expr->value.function.esym->result->attr.contiguous; else { @@ -15327,10 +16391,30 @@ return false; } } +@@ -1691,6 +1716,10 @@ + if (iterator_level > 0) + return false; + ++ /* WHERE also doesn't work. */ ++ if (in_where > 0) ++ return false; ++ + op1 = e->value.op.op1; + op2 = e->value.op.op2; + Index: gcc/fortran/resolve.c =================================================================== --- a/src/gcc/fortran/resolve.c (.../tags/gcc_8_2_0_release) +++ b/src/gcc/fortran/resolve.c (.../branches/gcc-8-branch) +@@ -5329,7 +5329,7 @@ + the ts' type of the component refs is still array valued, which + can't be translated that way. */ + if (sym->assoc && e->rank == 0 && e->ref && sym->ts.type == BT_CLASS +- && sym->assoc->target->ts.type == BT_CLASS ++ && sym->assoc->target && sym->assoc->target->ts.type == BT_CLASS + && CLASS_DATA (sym->assoc->target)->as) + { + gfc_ref *ref = e->ref; @@ -8658,6 +8658,14 @@ if (!sym->ts.u.cl) sym->ts.u.cl = target->ts.u.cl; @@ -15373,6 +16457,26 @@ { gfc_error ("ELEMENTAL function %qs at %L must have a scalar " "result", sym->name, &sym->declared_at); +@@ -15350,7 +15360,10 @@ + e = e->value.function.actual->expr; + + if (e->expr_type != EXPR_VARIABLE) +- gfc_internal_error ("check_data_variable(): Bad expression"); ++ { ++ gfc_error ("Expecting definable entity near %L", where); ++ return false; ++ } + + sym = e->symtree->n.sym; + +@@ -15358,6 +15371,7 @@ + { + gfc_error ("BLOCK DATA element %qs at %L must be in COMMON", + sym->name, &sym->declared_at); ++ return false; + } + + if (e->ref == NULL && sym->as) Index: gcc/fortran/trans-decl.c =================================================================== --- a/src/gcc/fortran/trans-decl.c (.../tags/gcc_8_2_0_release) @@ -15661,7 +16765,33 @@ =================================================================== --- a/src/gcc/tree-vect-loop.c (.../tags/gcc_8_2_0_release) +++ b/src/gcc/tree-vect-loop.c (.../branches/gcc-8-branch) -@@ -5558,6 +5558,9 @@ +@@ -2391,14 +2391,22 @@ + /* The main loop handles all iterations. */ + LOOP_VINFO_PEELING_FOR_NITER (loop_vinfo) = false; + else if (LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo) +- && LOOP_VINFO_PEELING_FOR_ALIGNMENT (loop_vinfo) > 0) ++ && LOOP_VINFO_PEELING_FOR_ALIGNMENT (loop_vinfo) >= 0) + { +- if (!multiple_p (LOOP_VINFO_INT_NITERS (loop_vinfo) +- - LOOP_VINFO_PEELING_FOR_ALIGNMENT (loop_vinfo), ++ /* Work out the (constant) number of iterations that need to be ++ peeled for reasons other than niters. */ ++ unsigned int peel_niter = LOOP_VINFO_PEELING_FOR_ALIGNMENT (loop_vinfo); ++ if (LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo)) ++ peel_niter += 1; ++ if (!multiple_p (LOOP_VINFO_INT_NITERS (loop_vinfo) - peel_niter, + LOOP_VINFO_VECT_FACTOR (loop_vinfo))) + LOOP_VINFO_PEELING_FOR_NITER (loop_vinfo) = true; + } + else if (LOOP_VINFO_PEELING_FOR_ALIGNMENT (loop_vinfo) ++ /* ??? When peeling for gaps but not alignment, we could ++ try to check whether the (variable) niters is known to be ++ VF * N + 1. That's something of a niche case though. */ ++ || LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo) + || !LOOP_VINFO_VECT_FACTOR (loop_vinfo).is_constant (&const_vf) + || ((tree_ctz (LOOP_VINFO_NITERS (loop_vinfo)) + < (unsigned) exact_log2 (const_vf)) +@@ -5558,6 +5566,9 @@ if (STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info) == INTEGER_INDUC_COND_REDUCTION) code = induc_code; @@ -638792,6 +639922,18 @@ default: gcc_unreachable (); } +Index: gcc/tree-ssa.c +=================================================================== +--- a/src/gcc/tree-ssa.c (.../tags/gcc_8_2_0_release) ++++ b/src/gcc/tree-ssa.c (.../branches/gcc-8-branch) +@@ -1446,6 +1446,7 @@ + return NULL_TREE; + /* For integral typed extracts we can use a BIT_FIELD_REF. */ + if (DECL_SIZE (decl) ++ && TREE_CODE (DECL_SIZE_UNIT (decl)) == INTEGER_CST + && (known_subrange_p + (mem_ref_offset (base), + wi::to_poly_offset (TYPE_SIZE_UNIT (TREE_TYPE (base))), Index: gcc/rtl.h =================================================================== --- a/src/gcc/rtl.h (.../tags/gcc_8_2_0_release) @@ -639554,6 +640696,32 @@ operands[2] = GEN_INT (flags); }) +@@ -8861,17 +8881,17 @@ + DONE; + }) + ++; CLZ result is in hard reg op0 - this is the high part of the target operand ++; The source with the left-most one bit cleared is in hard reg op0 + 1 - the low part + (define_insn "clztidi2" + [(set (match_operand:TI 0 "register_operand" "=d") + (ior:TI +- (ashift:TI +- (zero_extend:TI +- (xor:DI (match_operand:DI 1 "register_operand" "d") +- (lshiftrt (match_operand:DI 2 "const_int_operand" "") +- (subreg:SI (clz:DI (match_dup 1)) 4)))) +- +- (const_int 64)) +- (zero_extend:TI (clz:DI (match_dup 1))))) ++ (ashift:TI (zero_extend:TI (clz:DI (match_operand:DI 1 "register_operand" "d"))) ++ (const_int 64)) ++ (zero_extend:TI ++ (xor:DI (match_dup 1) ++ (lshiftrt (match_operand:DI 2 "const_int_operand" "") ++ (subreg:SI (clz:DI (match_dup 1)) 4)))))) + (clobber (reg:CC CC_REGNUM))] + "UINTVAL (operands[2]) == HOST_WIDE_INT_1U << 63 + && TARGET_EXTIMM && TARGET_ZARCH" Index: gcc/config/s390/s390.c =================================================================== --- a/src/gcc/config/s390/s390.c (.../tags/gcc_8_2_0_release) @@ -640211,6 +641379,448 @@ /* FIXME: this misses some which is considered simple arthematic instructions for ThunderX. Simple shifts are missed here. */ if (prev_type == TYPE_ALUS_SREG +Index: gcc/config/rs6000/rs6000-string.c +=================================================================== +--- a/src/gcc/config/rs6000/rs6000-string.c (.../tags/gcc_8_2_0_release) ++++ b/src/gcc/config/rs6000/rs6000-string.c (.../branches/gcc-8-branch) +@@ -408,6 +408,54 @@ + emit_insn (gen_addsi3 (dest, src1, src2)); + } + ++/* Emit an and of the proper mode for DEST. ++ ++ DEST is the destination register for the and. ++ SRC1 is the first and input. ++ SRC2 is the second and input. ++ ++ Computes DEST = SRC1&SRC2. */ ++static void ++do_and3 (rtx dest, rtx src1, rtx src2) ++{ ++ if (GET_MODE (dest) == DImode) ++ emit_insn (gen_anddi3 (dest, src1, src2)); ++ else ++ emit_insn (gen_andsi3 (dest, src1, src2)); ++} ++ ++/* Emit an cmpb of the proper mode for DEST. ++ ++ DEST is the destination register for the cmpb. ++ SRC1 is the first input. ++ SRC2 is the second input. ++ ++ Computes cmpb of SRC1, SRC2. */ ++static void ++do_cmpb3 (rtx dest, rtx src1, rtx src2) ++{ ++ if (GET_MODE (dest) == DImode) ++ emit_insn (gen_cmpbdi3 (dest, src1, src2)); ++ else ++ emit_insn (gen_cmpbsi3 (dest, src1, src2)); ++} ++ ++/* Emit a rotl of the proper mode for DEST. ++ ++ DEST is the destination register for the and. ++ SRC1 is the first and input. ++ SRC2 is the second and input. ++ ++ Computes DEST = SRC1 rotated left by SRC2. */ ++static void ++do_rotl3 (rtx dest, rtx src1, rtx src2) ++{ ++ if (GET_MODE (dest) == DImode) ++ emit_insn (gen_rotldi3 (dest, src1, src2)); ++ else ++ emit_insn (gen_rotlsi3 (dest, src1, src2)); ++} ++ + /* Generate rtl for a load, shift, and compare of less than a full word. + + LOAD_MODE is the machine mode for the loads. +@@ -640,7 +688,7 @@ + { + if (GET_MODE_SIZE (GET_MODE (bytes_rtx)) > GET_MODE_SIZE (word_mode)) + /* Do not expect length longer than word_mode. */ +- return false; ++ return false; + else if (GET_MODE_SIZE (GET_MODE (bytes_rtx)) < GET_MODE_SIZE (word_mode)) + { + bytes_rtx = force_reg (GET_MODE (bytes_rtx), bytes_rtx); +@@ -684,7 +732,7 @@ + rtx j; + + /* Example of generated code for 35 bytes aligned 1 byte. +- ++ + mtctr 8 + li 6,0 + li 5,8 +@@ -712,7 +760,7 @@ + popcntd 9,9 + subfe 10,10,10 + or 9,9,10 +- ++ + Compiled with -fno-reorder-blocks for clarity. */ + + /* Structure of what we're going to do: +@@ -955,7 +1003,7 @@ + if (!bytes_is_const) + { + /* If we're dealing with runtime length, we have to check if +- it's zero after the loop. When length is known at compile ++ it's zero after the loop. When length is known at compile + time the no-remainder condition is dealt with above. By + doing this after cleanup_label, we also deal with the + case where length is 0 at the start and we bypass the +@@ -1325,7 +1373,7 @@ + rtx tmp_reg_src1 = gen_reg_rtx (word_mode); + rtx tmp_reg_src2 = gen_reg_rtx (word_mode); + /* P7/P8 code uses cond for subfc. but P9 uses +- it for cmpld which needs CCUNSmode. */ ++ it for cmpld which needs CCUNSmode. */ + rtx cond; + if (TARGET_P9_MISC) + cond = gen_reg_rtx (CCUNSmode); +@@ -1578,7 +1626,7 @@ + emit_label (convert_label); + + /* We need to produce DI result from sub, then convert to target SI +- while maintaining <0 / ==0 / >0 properties. This sequence works: ++ while maintaining <0 / ==0 / >0 properties. This sequence works: + subfc L,A,B + subfe H,H,H + popcntd L,L +@@ -1847,6 +1895,9 @@ + rtx tmp_reg_src1 = gen_reg_rtx (word_mode); + rtx tmp_reg_src2 = gen_reg_rtx (word_mode); + ++ rtx src1_addr = force_reg (Pmode, XEXP (orig_src1, 0)); ++ rtx src2_addr = force_reg (Pmode, XEXP (orig_src2, 0)); ++ + /* Generate sequence of ld/ldbrx, cmpb to compare out + to the length specified. */ + unsigned HOST_WIDE_INT bytes_to_compare = compare_length; +@@ -1853,12 +1904,9 @@ + while (bytes_to_compare > 0) + { + /* Compare sequence: +- check each 8B with: ld/ld cmpd bne +- If equal, use rldicr/cmpb to check for zero byte. ++ check each 8B with: ld/ld/cmpb/cmpb/orc./bne ++ + cleanup code at end: +- cmpb get byte that differs +- cmpb look for zero byte +- orc combine + cntlzd get bit of first zero/diff byte + subfic convert for rldcl use + rldcl rldcl extract diff/zero byte +@@ -1895,64 +1943,54 @@ + rid of the extra bytes. */ + cmp_bytes = bytes_to_compare; + +- src1 = adjust_address (orig_src1, load_mode, offset); +- src2 = adjust_address (orig_src2, load_mode, offset); ++ rtx offset_rtx; ++ if (BYTES_BIG_ENDIAN || TARGET_AVOID_XFORM) ++ offset_rtx = GEN_INT (offset); ++ else ++ { ++ offset_rtx = gen_reg_rtx (Pmode); ++ emit_move_insn (offset_rtx, GEN_INT (offset)); ++ } ++ rtx addr1 = gen_rtx_PLUS (Pmode, src1_addr, offset_rtx); ++ rtx addr2 = gen_rtx_PLUS (Pmode, src2_addr, offset_rtx); ++ do_load_for_compare_from_addr (load_mode, tmp_reg_src1, addr1, orig_src1); ++ do_load_for_compare_from_addr (load_mode, tmp_reg_src2, addr2, orig_src2); + +- if (!REG_P (XEXP (src1, 0))) +- { +- rtx src1_reg = copy_addr_to_reg (XEXP (src1, 0)); +- src1 = replace_equiv_address (src1, src1_reg); +- } +- set_mem_size (src1, load_mode_size); +- +- if (!REG_P (XEXP (src2, 0))) +- { +- rtx src2_reg = copy_addr_to_reg (XEXP (src2, 0)); +- src2 = replace_equiv_address (src2, src2_reg); +- } +- set_mem_size (src2, load_mode_size); +- +- do_load_for_compare (tmp_reg_src1, src1, load_mode); +- do_load_for_compare (tmp_reg_src2, src2, load_mode); +- + /* We must always left-align the data we read, and + clear any bytes to the right that are beyond the string. + Otherwise the cmpb sequence won't produce the correct +- results. The beginning of the compare will be done +- with word_mode so will not have any extra shifts or +- clear rights. */ ++ results. However if there is only one byte left, we ++ can just subtract to get the final result so the shifts ++ and clears are not needed. */ + +- if (load_mode_size < word_mode_size) +- { +- /* Rotate left first. */ +- rtx sh = GEN_INT (BITS_PER_UNIT * (word_mode_size - load_mode_size)); +- if (word_mode == DImode) +- { +- emit_insn (gen_rotldi3 (tmp_reg_src1, tmp_reg_src1, sh)); +- emit_insn (gen_rotldi3 (tmp_reg_src2, tmp_reg_src2, sh)); +- } +- else +- { +- emit_insn (gen_rotlsi3 (tmp_reg_src1, tmp_reg_src1, sh)); +- emit_insn (gen_rotlsi3 (tmp_reg_src2, tmp_reg_src2, sh)); +- } +- } ++ unsigned HOST_WIDE_INT remain = bytes_to_compare - cmp_bytes; + +- if (cmp_bytes < word_mode_size) ++ /* Loading just a single byte is a special case. If we are ++ loading more than that, we have to check whether we are ++ looking at the entire chunk of data. If not, rotate left and ++ clear right so that bytes we aren't supposed to look at are ++ zeroed, and the first byte we are supposed to compare is ++ leftmost. */ ++ ++ if (load_mode_size != 1) + { +- /* Now clear right. This plus the rotate can be +- turned into a rldicr instruction. */ +- HOST_WIDE_INT mb = BITS_PER_UNIT * (word_mode_size - cmp_bytes); +- rtx mask = GEN_INT (HOST_WIDE_INT_M1U << mb); +- if (word_mode == DImode) ++ if (load_mode_size < word_mode_size) + { +- emit_insn (gen_anddi3_mask (tmp_reg_src1, tmp_reg_src1, mask)); +- emit_insn (gen_anddi3_mask (tmp_reg_src2, tmp_reg_src2, mask)); ++ /* Rotate left first. */ ++ rtx sh = GEN_INT (BITS_PER_UNIT ++ * (word_mode_size - load_mode_size)); ++ do_rotl3 (tmp_reg_src1, tmp_reg_src1, sh); ++ do_rotl3 (tmp_reg_src2, tmp_reg_src2, sh); + } +- else ++ ++ if (cmp_bytes < word_mode_size) + { +- emit_insn (gen_andsi3_mask (tmp_reg_src1, tmp_reg_src1, mask)); +- emit_insn (gen_andsi3_mask (tmp_reg_src2, tmp_reg_src2, mask)); ++ /* Now clear right. This plus the rotate can be ++ turned into a rldicr instruction. */ ++ HOST_WIDE_INT mb = BITS_PER_UNIT * (word_mode_size - cmp_bytes); ++ rtx mask = GEN_INT (HOST_WIDE_INT_M1U << mb); ++ do_and3 (tmp_reg_src1, tmp_reg_src1, mask); ++ do_and3 (tmp_reg_src2, tmp_reg_src2, mask); + } + } + +@@ -1967,8 +2005,6 @@ + A == B: branch to result 0. + A != B: cleanup code to compute result. */ + +- unsigned HOST_WIDE_INT remain = bytes_to_compare - cmp_bytes; +- + rtx dst_label; + if (remain > 0 || equality_compare_rest) + { +@@ -1982,69 +2018,89 @@ + /* Branch to end and produce result of 0. */ + dst_label = final_move_label; + +- rtx lab_ref = gen_rtx_LABEL_REF (VOIDmode, dst_label); +- rtx cond = gen_reg_rtx (CCmode); ++ if (load_mode_size == 1) ++ { ++ /* Special case for comparing just single byte. */ ++ if (equality_compare_rest) ++ { ++ /* Use subf./bne to branch to final_move_label if the ++ byte differs, otherwise fall through to the strncmp ++ call. We must also check for a zero byte here as we ++ must not make the library call if this is the end of ++ the string. */ + +- /* Always produce the 0 result, it is needed if +- cmpb finds a 0 byte in this chunk. */ +- rtx tmp = gen_rtx_MINUS (word_mode, tmp_reg_src1, tmp_reg_src2); +- rs6000_emit_dot_insn (result_reg, tmp, 1, cond); ++ rtx lab_ref = gen_rtx_LABEL_REF (VOIDmode, final_move_label); ++ rtx cond = gen_reg_rtx (CCmode); ++ rtx diff_rtx = gen_rtx_MINUS (word_mode, ++ tmp_reg_src1, tmp_reg_src2); ++ rs6000_emit_dot_insn (result_reg, diff_rtx, 2, cond); ++ rtx cmp_rtx = gen_rtx_NE (VOIDmode, cond, const0_rtx); + +- rtx cmp_rtx; +- if (remain == 0 && !equality_compare_rest) +- cmp_rtx = gen_rtx_EQ (VOIDmode, cond, const0_rtx); +- else +- cmp_rtx = gen_rtx_NE (VOIDmode, cond, const0_rtx); ++ rtx ifelse = gen_rtx_IF_THEN_ELSE (VOIDmode, cmp_rtx, ++ lab_ref, pc_rtx); ++ rtx j = emit_jump_insn (gen_rtx_SET (pc_rtx, ifelse)); ++ JUMP_LABEL (j) = final_move_label; ++ LABEL_NUSES (final_move_label) += 1; + +- rtx ifelse = gen_rtx_IF_THEN_ELSE (VOIDmode, cmp_rtx, +- lab_ref, pc_rtx); +- rtx j = emit_jump_insn (gen_rtx_SET (pc_rtx, ifelse)); +- JUMP_LABEL (j) = dst_label; +- LABEL_NUSES (dst_label) += 1; ++ /* Check for zero byte here before fall through to ++ library call. This catches the case where the ++ strings are equal and end in a zero byte at this ++ position. */ + +- if (remain > 0 || equality_compare_rest) +- { +- /* Generate a cmpb to test for a 0 byte and branch +- to final result if found. */ +- rtx cmpb_zero = gen_reg_rtx (word_mode); +- rtx lab_ref_fin = gen_rtx_LABEL_REF (VOIDmode, final_move_label); +- rtx condz = gen_reg_rtx (CCmode); +- rtx zero_reg = gen_reg_rtx (word_mode); +- if (word_mode == SImode) +- { +- emit_insn (gen_movsi (zero_reg, GEN_INT (0))); +- emit_insn (gen_cmpbsi3 (cmpb_zero, tmp_reg_src1, zero_reg)); +- if (cmp_bytes < word_mode_size) +- { +- /* Don't want to look at zero bytes past end. */ +- HOST_WIDE_INT mb = +- BITS_PER_UNIT * (word_mode_size - cmp_bytes); +- rtx mask = GEN_INT (HOST_WIDE_INT_M1U << mb); +- emit_insn (gen_andsi3_mask (cmpb_zero, cmpb_zero, mask)); +- } ++ rtx cond0 = gen_reg_rtx (CCmode); ++ emit_move_insn (cond0, gen_rtx_COMPARE (CCmode, tmp_reg_src1, ++ const0_rtx)); ++ ++ rtx cmp0eq_rtx = gen_rtx_EQ (VOIDmode, cond0, const0_rtx); ++ ++ rtx ifelse0 = gen_rtx_IF_THEN_ELSE (VOIDmode, cmp0eq_rtx, ++ lab_ref, pc_rtx); ++ rtx j0 = emit_jump_insn (gen_rtx_SET (pc_rtx, ifelse0)); ++ JUMP_LABEL (j0) = final_move_label; ++ LABEL_NUSES (final_move_label) += 1; + } + else + { +- emit_insn (gen_movdi (zero_reg, GEN_INT (0))); +- emit_insn (gen_cmpbdi3 (cmpb_zero, tmp_reg_src1, zero_reg)); +- if (cmp_bytes < word_mode_size) +- { +- /* Don't want to look at zero bytes past end. */ +- HOST_WIDE_INT mb = +- BITS_PER_UNIT * (word_mode_size - cmp_bytes); +- rtx mask = GEN_INT (HOST_WIDE_INT_M1U << mb); +- emit_insn (gen_anddi3_mask (cmpb_zero, cmpb_zero, mask)); +- } ++ /* This is the last byte to be compared so we can use ++ subf to compute the final result and branch ++ unconditionally to final_move_label. */ ++ ++ do_sub3 (result_reg, tmp_reg_src1, tmp_reg_src2); ++ ++ rtx fin_ref = gen_rtx_LABEL_REF (VOIDmode, final_move_label); ++ rtx j = emit_jump_insn (gen_rtx_SET (pc_rtx, fin_ref)); ++ JUMP_LABEL (j) = final_move_label; ++ LABEL_NUSES (final_move_label) += 1; ++ emit_barrier (); + } ++ } ++ else ++ { ++ rtx cmpb_zero = gen_reg_rtx (word_mode); ++ rtx cmpb_diff = gen_reg_rtx (word_mode); ++ rtx zero_reg = gen_reg_rtx (word_mode); ++ rtx lab_ref = gen_rtx_LABEL_REF (VOIDmode, dst_label); ++ rtx cond = gen_reg_rtx (CCmode); + +- emit_move_insn (condz, gen_rtx_COMPARE (CCmode, cmpb_zero, zero_reg)); +- rtx cmpnz_rtx = gen_rtx_NE (VOIDmode, condz, const0_rtx); +- rtx ifelse = gen_rtx_IF_THEN_ELSE (VOIDmode, cmpnz_rtx, +- lab_ref_fin, pc_rtx); +- rtx j2 = emit_jump_insn (gen_rtx_SET (pc_rtx, ifelse)); +- JUMP_LABEL (j2) = final_move_label; +- LABEL_NUSES (final_move_label) += 1; ++ emit_move_insn (zero_reg, GEN_INT (0)); ++ do_cmpb3 (cmpb_diff, tmp_reg_src1, tmp_reg_src2); ++ do_cmpb3 (cmpb_zero, tmp_reg_src1, zero_reg); ++ rtx not_diff = gen_rtx_NOT (word_mode, cmpb_diff); ++ rtx orc_rtx = gen_rtx_IOR (word_mode, not_diff, cmpb_zero); + ++ rs6000_emit_dot_insn (result_reg, orc_rtx, 2, cond); ++ ++ rtx cmp_rtx; ++ if (remain == 0 && !equality_compare_rest) ++ cmp_rtx = gen_rtx_EQ (VOIDmode, cond, const0_rtx); ++ else ++ cmp_rtx = gen_rtx_NE (VOIDmode, cond, const0_rtx); ++ ++ rtx ifelse = gen_rtx_IF_THEN_ELSE (VOIDmode, cmp_rtx, ++ lab_ref, pc_rtx); ++ rtx j = emit_jump_insn (gen_rtx_SET (pc_rtx, ifelse)); ++ JUMP_LABEL (j) = dst_label; ++ LABEL_NUSES (dst_label) += 1; + } + + offset += cmp_bytes; +@@ -2106,9 +2162,6 @@ + byte and generates the final result, taking into account + zero bytes: + +- cmpb cmpb_result1, src1, src2 +- cmpb cmpb_result2, src1, zero +- orc cmpb_result1, cmp_result1, cmpb_result2 + cntlzd get bit of first zero/diff byte + addi convert for rldcl use + rldcl rldcl extract diff/zero byte +@@ -2115,10 +2168,7 @@ + subf subtract for final result + */ + +- rtx cmpb_diff = gen_reg_rtx (word_mode); +- rtx cmpb_zero = gen_reg_rtx (word_mode); + rtx rot_amt = gen_reg_rtx (word_mode); +- rtx zero_reg = gen_reg_rtx (word_mode); + + rtx rot1_1 = gen_reg_rtx (word_mode); + rtx rot1_2 = gen_reg_rtx (word_mode); +@@ -2127,12 +2177,7 @@ + + if (word_mode == SImode) + { +- emit_insn (gen_cmpbsi3 (cmpb_diff, tmp_reg_src1, tmp_reg_src2)); +- emit_insn (gen_movsi (zero_reg, GEN_INT (0))); +- emit_insn (gen_cmpbsi3 (cmpb_zero, tmp_reg_src1, zero_reg)); +- emit_insn (gen_one_cmplsi2 (cmpb_diff,cmpb_diff)); +- emit_insn (gen_iorsi3 (cmpb_diff, cmpb_diff, cmpb_zero)); +- emit_insn (gen_clzsi2 (rot_amt, cmpb_diff)); ++ emit_insn (gen_clzsi2 (rot_amt, result_reg)); + emit_insn (gen_addsi3 (rot_amt, rot_amt, GEN_INT (8))); + emit_insn (gen_rotlsi3 (rot1_1, tmp_reg_src1, + gen_lowpart (SImode, rot_amt))); +@@ -2144,12 +2189,7 @@ + } + else + { +- emit_insn (gen_cmpbdi3 (cmpb_diff, tmp_reg_src1, tmp_reg_src2)); +- emit_insn (gen_movdi (zero_reg, GEN_INT (0))); +- emit_insn (gen_cmpbdi3 (cmpb_zero, tmp_reg_src1, zero_reg)); +- emit_insn (gen_one_cmpldi2 (cmpb_diff,cmpb_diff)); +- emit_insn (gen_iordi3 (cmpb_diff, cmpb_diff, cmpb_zero)); +- emit_insn (gen_clzdi2 (rot_amt, cmpb_diff)); ++ emit_insn (gen_clzdi2 (rot_amt, result_reg)); + emit_insn (gen_adddi3 (rot_amt, rot_amt, GEN_INT (8))); + emit_insn (gen_rotldi3 (rot1_1, tmp_reg_src1, + gen_lowpart (SImode, rot_amt))); Index: gcc/config/rs6000/xmmintrin.h =================================================================== --- a/src/gcc/config/rs6000/xmmintrin.h (.../tags/gcc_8_2_0_release) @@ -640299,7 +641909,38 @@ =================================================================== --- a/src/gcc/config/rs6000/rs6000.c (.../tags/gcc_8_2_0_release) +++ b/src/gcc/config/rs6000/rs6000.c (.../branches/gcc-8-branch) -@@ -8519,7 +8519,9 @@ +@@ -4640,16 +4640,22 @@ + if (!global_options_set.x_rs6000_ieeequad) + rs6000_ieeequad = TARGET_IEEEQUAD_DEFAULT; + +- else if (rs6000_ieeequad != TARGET_IEEEQUAD_DEFAULT && TARGET_LONG_DOUBLE_128) ++ else + { +- static bool warned_change_long_double; +- if (!warned_change_long_double) ++ if (!TARGET_POPCNTD || !TARGET_VSX) ++ error ("%qs requires full ISA 2.06 support", "-mabi=ieeelongdouble"); ++ ++ if (rs6000_ieeequad != TARGET_IEEEQUAD_DEFAULT && TARGET_LONG_DOUBLE_128) + { +- warned_change_long_double = true; +- if (TARGET_IEEEQUAD) +- warning (OPT_Wpsabi, "Using IEEE extended precision long double"); +- else +- warning (OPT_Wpsabi, "Using IBM extended precision long double"); ++ static bool warned_change_long_double; ++ if (!warned_change_long_double) ++ { ++ warned_change_long_double = true; ++ if (TARGET_IEEEQUAD) ++ warning (OPT_Wpsabi, "Using IEEE extended precision long double"); ++ else ++ warning (OPT_Wpsabi, "Using IBM extended precision long double"); ++ } + } + } + +@@ -8519,7 +8525,9 @@ *tocrel_offset_ret = tocrel_offset; return (GET_CODE (tocrel_base) == UNSPEC @@ -640310,7 +641951,7 @@ } /* Return true if X is a constant pool address, and also for cmodel=medium -@@ -16453,16 +16455,44 @@ +@@ -16453,16 +16461,44 @@ case ALTIVEC_BUILTIN_VSLH: case ALTIVEC_BUILTIN_VSLW: case P8V_BUILTIN_VSLD: @@ -640365,7 +642006,7 @@ /* Flavors of vector shift right. */ case ALTIVEC_BUILTIN_VSRB: case ALTIVEC_BUILTIN_VSRH: -@@ -25226,6 +25256,12 @@ +@@ -25226,6 +25262,12 @@ { tree fntype; @@ -640616,7 +642257,22 @@ =================================================================== --- a/src/gcc/config/darwin.c (.../tags/gcc_8_2_0_release) +++ b/src/gcc/config/darwin.c (.../branches/gcc-8-branch) -@@ -3711,19 +3711,4 @@ +@@ -3176,6 +3176,14 @@ + if (!global_options_set.x_dwarf_version) + dwarf_version = 2; + ++ if (global_options_set.x_dwarf_split_debug_info) ++ { ++ inform (input_location, ++ "-gsplit-dwarf is not supported on this platform, ignored"); ++ dwarf_split_debug_info = 0; ++ global_options_set.x_dwarf_split_debug_info = 0; ++ } ++ + /* Do not allow unwind tables to be generated by default for m32. + fnon-call-exceptions will override this, regardless of what we do. */ + if (generating_for_darwin_version < 10 +@@ -3711,19 +3719,4 @@ : text_section; } @@ -640640,7 +642296,76 @@ =================================================================== --- a/src/gcc/config/darwin.h (.../tags/gcc_8_2_0_release) +++ b/src/gcc/config/darwin.h (.../branches/gcc-8-branch) -@@ -711,10 +711,6 @@ +@@ -125,7 +125,9 @@ + "%{gfull:-g -fno-eliminate-unused-debug-symbols} %" ++ [(set (match_operand:VH 0 "s_register_operand") ++ (match_operand:VH 1 "s_register_operand"))] ++ "TARGET_NEON" + { +- /* We need to use force_reg to avoid TARGET_CAN_CHANGE_MODE_CLASS +- causing an ICE on big-endian because it cannot extract subregs in +- this case. */ + if (can_create_pseudo_p ()) + { + if (!REG_P (operands[0])) +- operands[1] = force_reg (V4HFmode, operands[1]); ++ operands[1] = force_reg (mode, operands[1]); + } + }) + +-(define_expand "movv8hf" +- [(set (match_operand:V8HF 0 "") +- (match_operand:V8HF 1 ""))] +- "TARGET_NEON && TARGET_FP16" +-{ +- /* We need to use force_reg to avoid TARGET_CAN_CHANGE_MODE_CLASS +- causing an ICE on big-endian because it cannot extract subregs in +- this case. */ +- if (can_create_pseudo_p ()) +- { +- if (!REG_P (operands[0])) +- operands[1] = force_reg (V8HFmode, operands[1]); +- } +-}) +- + (define_insn "*neon_mov" + [(set (match_operand:VSTRUCT 0 "nonimmediate_operand" "=w,Ut,w") + (match_operand:VSTRUCT 1 "general_operand" " w,w, Ut"))] Index: gcc/config/pa/pa.md =================================================================== --- a/src/gcc/config/pa/pa.md (.../tags/gcc_8_2_0_release) @@ -641220,11 +643005,58 @@ if (t1_dim > 65536) t1_dim = 65536; +Index: libgfortran/runtime/backtrace.c +=================================================================== +--- a/src/libgfortran/runtime/backtrace.c (.../tags/gcc_8_2_0_release) ++++ b/src/libgfortran/runtime/backtrace.c (.../branches/gcc-8-branch) +@@ -135,14 +135,23 @@ + void + show_backtrace (bool in_signal_handler) + { ++ /* Note that libbacktrace allows the state to be accessed from ++ multiple threads, so we don't need to use a TLS variable for the ++ state here. */ ++ static struct backtrace_state *lbstate_saved; + struct backtrace_state *lbstate; + struct mystate state = { 0, false, in_signal_handler }; +- +- lbstate = backtrace_create_state (NULL, __gthread_active_p (), +- error_callback, NULL); + +- if (lbstate == NULL) +- return; ++ lbstate = __atomic_load_n (&lbstate_saved, __ATOMIC_RELAXED); ++ if (!lbstate) ++ { ++ lbstate = backtrace_create_state (NULL, __gthread_active_p (), ++ error_callback, NULL); ++ if (lbstate) ++ __atomic_store_n (&lbstate_saved, lbstate, __ATOMIC_RELAXED); ++ else ++ return; ++ } + + if (!BACKTRACE_SUPPORTED || (in_signal_handler && BACKTRACE_USES_MALLOC)) + { Index: libgfortran/ChangeLog =================================================================== --- a/src/libgfortran/ChangeLog (.../tags/gcc_8_2_0_release) +++ b/src/libgfortran/ChangeLog (.../branches/gcc-8-branch) -@@ -1,3 +1,56 @@ +@@ -1,3 +1,70 @@ ++2018-12-02 Janne Blomqvist ++ ++ Backport from trunk ++ PR libfortran/88137 ++ * runtime/backtrace.c (show_backtrace): Use atomic load/store to ++ access the static lbstate pointer. ++ ++2018-11-30 Janne Blomqvist ++ ++ Backport from trunk ++ PR libfortran/88137 ++ * runtime/backtrace.c (show_backtrace): Make lbstate a static ++ variable, initialize once. ++ +2018-11-09 Jerry DeLisle + + Backport from trunk diff -u gcc-8-8.2.0/debian/rules.parameters gcc-8-8.2.0/debian/rules.parameters --- gcc-8-8.2.0/debian/rules.parameters +++ gcc-8-8.2.0/debian/rules.parameters @@ -2,14 +2,14 @@ GCC_VERSION := 8.2.0 NEXT_GCC_VERSION := 8.2.1 BASE_VERSION := 8 -SOURCE_VERSION := 8.2.0-10ubuntu1 -DEB_VERSION := 8.2.0-10ubuntu1 -DEB_EVERSION := 1:8.2.0-10ubuntu1 -DEB_GDC_VERSION := 8.2.0-10ubuntu1 +SOURCE_VERSION := 8.2.0-12ubuntu1 +DEB_VERSION := 8.2.0-12ubuntu1 +DEB_EVERSION := 1:8.2.0-12ubuntu1 +DEB_GDC_VERSION := 8.2.0-12ubuntu1 DEB_SOVERSION := 5 DEB_SOEVERSION := 1:5 DEB_LIBGCC_SOVERSION := -DEB_LIBGCC_VERSION := 1:8.2.0-10ubuntu1 +DEB_LIBGCC_VERSION := 1:8.2.0-12ubuntu1 DEB_STDCXX_SOVERSION := 5 DEB_GOMP_SOVERSION := 5 GCC_SONAME := 1 diff -u gcc-8-8.2.0/debian/rules.patch gcc-8-8.2.0/debian/rules.patch --- gcc-8-8.2.0/debian/rules.patch +++ gcc-8-8.2.0/debian/rules.patch @@ -73,9 +73,12 @@ gcc-alpha-bs-ignore \ libffi-riscv \ gcc-force-cross-layout \ - gcc-search-prefixed-as-ld \ kfreebsd-decimal-float \ powerpcspe_remove_many \ + pr87531-revert \ + +# FIXME: see #915194 +# gcc-search-prefixed-as-ld \ ifeq (,$(filter $(distrelease),trusty stretch jessie wheezy)) debian_patches += gcc-as-needed-push-pop only in patch2: unchanged: --- gcc-8-8.2.0.orig/debian/patches/pr87531-revert.diff +++ gcc-8-8.2.0/debian/patches/pr87531-revert.diff @@ -0,0 +1,115 @@ +# DP: Revert the fix for PR c++/87531, causing rejects-valid + +gcc/cp/ + +2018-11-29 Nathan Sidwell + + PR c++/87531 + * class.c (finish_struct): In a template, add artificial using + decl for operator=. + +gcc/testsuite/ + +2018-11-29 Nathan Sidwell + + PR c++/87531 + * g++.dg/lookup/pr87531.C: New. + +--- a/src/gcc/testsuite/g++.dg/lookup/pr87531.C ++++ b/src/gcc/testsuite/g++.dg/lookup/pr87531.C +@@ -1,73 +0,0 @@ +-// PR c+/87531 lookup of operator= in templates +-// { dg-do run } +- +-struct Base { +- void operator= (Base const&); +-}; +- +-void Base::operator= (Base const &) +-{ +-} +- +-template +-struct Derived : Base +-{ +- T v; +- +- Derived() : v (0) {} +- Derived(T v_) : v (v_) {} +- +- T &assign1 (Derived const& rhs) +- { +- operator=(rhs); // erroneously bound to Base::operator= +- return v; +- } +- +- T &assign2 (Derived const& rhs) +- { +- this->operator=(rhs); // erroneously bound to Base::operator= +- return v; +- } +-}; +- +-template +-struct Single +-{ +- T v; +- +- Single () : v (0) {} +- Single (T v_) : v (v_) {} +- +- T &assign1 (Single const& rhs) +- { +- operator=(rhs); // lookup failed +- return v; +- } +- +- T &assign2 (Single const& rhs) +- { +- this->operator=(rhs); // Marked as dependent, happened to work +- return v; +- } +-}; +- +-int main() +-{ +- Derived a, b(123); +- +- if (a.assign1 (b) != 123) +- return 1; +- +- if (a.assign2 (b) != 123) +- return 2; +- +- Single c, d(123); +- +- if (c.assign1 (d) != 123) +- return 3; +- +- if (c.assign2 (d) != 123) +- return 4; +- +- return 0; +-} +--- a/src/gcc/cp/class.c ++++ b/src/gcc/cp/class.c +@@ -7035,19 +7035,6 @@ + else if (DECL_DECLARES_FUNCTION_P (x)) + DECL_IN_AGGR_P (x) = false; + +- /* Also add a USING_DECL for operator=. We know there'll be (at +- least) one, but we don't know the signature(s). We want name +- lookup not to fail or recurse into bases. This isn't added +- to the template decl list so we drop this at instantiation +- time. */ +- tree ass_op = build_lang_decl (USING_DECL, assign_op_identifier, +- NULL_TREE); +- USING_DECL_SCOPE (ass_op) = t; +- DECL_DEPENDENT_P (ass_op) = true; +- DECL_ARTIFICIAL (ass_op) = true; +- DECL_CHAIN (ass_op) = TYPE_FIELDS (t); +- TYPE_FIELDS (t) = ass_op; +- + TYPE_SIZE (t) = bitsize_zero_node; + TYPE_SIZE_UNIT (t) = size_zero_node; + /* COMPLETE_TYPE_P is now true. */