Bill Schmidt [Tue, 12 Sep 2017 21:07:30 +0000 (21:07 +0000)]
backport: re PR target/81833 (PowerPC: VSX: Miscompiles ffmpeg's scalarproduct_int16_vsx at -O1)
[gcc]
2017-09-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
2017-09-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/81833
* config/rs6000/altivec.md (altivec_vsum2sws): Convert from a
define_insn to a define_expand.
(altivec_vsum2sws_direct): New define_insn.
(altivec_vsumsws): Convert from a define_insn to a define_expand.
[gcc/testsuite]
2017-09-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
2017-09-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/81833
* gcc.target/powerpc/pr81833-1.c: New file.
* gcc.target/powerpc/pr81833-2.c: New file.
Max Filippov [Mon, 11 Sep 2017 21:53:38 +0000 (21:53 +0000)]
xtensa: fix PR target/82181
2017-09-11 Max Filippov <jcmvbkbc@gmail.com>
gcc/
Backport from mainline
* config/xtensa/xtensa.c (xtensa_mem_offset): Check that both
words of DImode object are reachable by xtensa_uimm8x4 access.
backport: re PR sanitizer/81066 (sanitizer_stoptheworld_linux_libcdep.cc:276:22: error: aggregate ‘sigaltstack handler_stack’ has incomplete type and cannot be defined)
2017-09-07 Matthias Klose <doko@ubuntu.com>
Backported from mainline
2017-07-14 Jakub Jelinek <jakub@redhat.com>
Bill Schmidt [Wed, 6 Sep 2017 18:48:50 +0000 (18:48 +0000)]
backport: re PR tree-optimization/81987 (ICE in verify_ssa with -O3 -march=skylake-avx512)
[gcc]
2017-09-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline:
2017-08-30 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/81987
* gimple-ssa-strength-reduction.c (insert_initializers): Don't
insert an initializer in a location not dominated by the stride
definition.
[gcc/testsuite]
2017-09-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline:
2017-08-30 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/81987
* g++.dg/torture/pr81987.C: New file.
Jonathan Wakely [Mon, 4 Sep 2017 17:09:05 +0000 (18:09 +0100)]
PR libstdc++/81751 don't call fflush(NULL)
Backport from mainline
2017-08-09 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/79820
PR libstdc++/81751
* config/io/basic_file_stdio.cc (sys_open(FILE*, ios_base::openmode)):
Call fflush on the stream instead of calling sync() while _M_cfile is
null. Restore original value of errno.
* testsuite/ext/stdio_filebuf/char/79820.cc: New.
* testsuite/ext/stdio_filebuf/char/81751.cc: New.
Jonathan Wakely [Fri, 1 Sep 2017 12:15:44 +0000 (13:15 +0100)]
Make std::scoped_allocator_adaptor's OUTERMOST recursive
Backport from mainline
2016-10-06 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/status_cxx2011.xml: Update status.
* doc/html/manual/status.html: Regenerate.
* include/std/scoped_allocator (__outer_allocator_t, __outermost_type):
New helpers for recursive OUTERMOST.
(__outermost): Use __outermost_type::_S_outermost.
(__do_outermost, scoped_allocator_adaptor::__outermost_type): Remove.
(scoped_allocator_adaptor::__outermost_alloc_traits): Use new
__outermost_type helper.
(scoped_allocator_adaptor::_Constructible): New alias template.
(scoped_allocator_adaptor::scoped_allocator_adaptor<_Outer2>):
Constrain template constructors.
* testsuite/20_util/scoped_allocator/3.cc: New test.
* testsuite/20_util/scoped_allocator/outermost.cc: New test.
Georg-Johann Lay [Tue, 22 Aug 2017 10:32:36 +0000 (10:32 +0000)]
backport: re PR lto/81487 ([mingw32] ld.exe: error: asprintf failed)
lto-plugin/
Backport from 2017-07-26 gcc-7-branch r250562.
PR lto/81487
* lto-plugin.c (claim_file_handler): Use xasprintf instead of
asprintf.
[hi!=0]: Swap hi and lo arguments supplied to xasprintf.
gcc/
Backport from 2017-07-26 gcc-7-branch r250562.
PR 81487
* tree-ssa-structalias.c (alias_get_name): Use xasprintf instead
of asprintf.
Georg-Johann Lay [Tue, 22 Aug 2017 09:48:48 +0000 (09:48 +0000)]
backport: re PR target/79883 (avr i18n: untranslated "interrupt" or "signal")
gcc/
Backport from 2016-06-15 trunk r237486.
Backport from 2017-07-12 trunk r250156.
PR target/79883
PR target/67353
* config/avr/avr.c (avr_set_current_function): Warn misspelled ISR
only if -Wmisspelled-isr is on. In diagnostic messages: Quote
keywords and (parts of) identifiers.
[WITH_AVRLIBC]: Warn functions named "ISR", "SIGNAL" or "INTERUPT".
* doc/invoke.texi (AVR Options) <-Wmisspelled-isr>: Document.
Georg-Johann Lay [Tue, 22 Aug 2017 09:29:30 +0000 (09:29 +0000)]
backport: re PR target/80462 ([avr] Incorrect "warning: uninitialized variable 'xxx' put into program memory area" for identical strings)
gcc/
Backport from 2017-04-19 trunk r246997.
PR target/80462
* config/avr/avr.c (tree.h): Include it.
(hash-table.h): Include it.
(hash-set.h): Include it.
(symtab.h): Include it.
(inchash.h): Include it.
(function.h): Include it.
(hash-map.h): Include it.
(plugin-api.h): Include it.
(ipa-ref.h): Include it.
(cgraph.h): Include it.
(avr_encode_section_info): Don't warn for uninitialized progmem
variable if it's just an alias.
Backport from 2017-07-12 trunk r250151.
PR target/81407
* config/avr/avr.c (avr_encode_section_info)
[progmem && !TREE_READONLY]: Error if progmem object needs
constructing.
Georg-Johann Lay [Tue, 22 Aug 2017 08:40:15 +0000 (08:40 +0000)]
backport: re PR target/81910 ([avr] ICE with "address" attribute on type)
gcc/
Backport from 2017-08-22 trunk r251256.
PR target/81910
* config/avr/avr.c (avr_handle_addr_attribute): Early return if
not VAR_P. Filter attribute warnings with OPT_Wattributes.
(avr_attribute_table) <io, io_low, address>: Initialize
.decl_required with true.
Jakub Jelinek [Mon, 31 Jul 2017 09:29:58 +0000 (11:29 +0200)]
re PR sanitizer/81604 (Ubsan type reporting can be bogus in some cases)
PR sanitizer/81604
* ubsan.c (ubsan_type_descriptor): For UBSAN_PRINT_ARRAY don't
change type to the element type, instead add eltype variable and
use it where we are interested in the element type.
Jakub Jelinek [Thu, 27 Jul 2017 09:43:01 +0000 (11:43 +0200)]
re PR tree-optimization/81555 (Wrong code at -O1)
PR tree-optimization/81555
PR tree-optimization/81556
* tree-ssa-reassoc.c (rewrite_expr_tree): Add NEXT_CHANGED argument,
if true, force CHANGED for the recursive invocation.
(reassociate_bb): Remember original length of ops array, pass
len != orig_len as NEXT_CHANGED in rewrite_expr_tree call.
* gcc.c-torture/execute/pr81555.c: New test.
* gcc.c-torture/execute/pr81556.c: New test.
Ian Lance Taylor [Thu, 20 Jul 2017 22:04:02 +0000 (22:04 +0000)]
re PR go/81393 (Bootstrap failure on s390x-linux while building libgo against recent glibc)
PR go/81393
syscall: don't use GETREGS/SETREGS on s390
They were removed in recent glibc.
This is a backport of https://golang.org/cl/48231 to earlier branches.
Define required type and constants in syscall package directly, don't
try to pull them from the system header files.
re PR target/81471 (internal compiler error: in curr_insn_transform, at lra-constraints.c:3495)
PR target/81471
* config/i386/i386.md (rorx_immediate_operand): New mode attribute.
(*bmi2_rorx<mode>3_1): Use rorx_immediate_operand as
operand 2 predicate.
(*bmi2_rorxsi3_1_zext): Use const_0_to_31_operand as
operand 2 predicate.
(ror,rol -> rorx splitters): Use const_int_operand as
operand 2 predicate.
testsuite/ChangeLog:
PR target/81471
* gcc.target/i386/pr81471.c: New test.