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.
Joseph Myers [Tue, 4 Jul 2017 10:25:10 +0000 (11:25 +0100)]
Use ucontext_t not struct ucontext in linux-unwind.h files.
Current glibc no longer gives the ucontext_t type the tag struct
ucontext, to conform with POSIX namespace rules. This requires
various linux-unwind.h files in libgcc, that were previously using
struct ucontext, to be fixed to use ucontext_t instead. This is
similar to the removal of the struct siginfo tag from siginfo_t some
years ago.
This patch changes those files to use ucontext_t instead. As the
standard name that should be unconditionally safe, so this is not
restricted to architectures supported by glibc, or conditioned on the
glibc version.
Tested compilation together with current glibc with glibc's
build-many-glibcs.py.
Those two changes aren't actually applicable to 5. Sorry for the noise.
Revert:
Backports from trunk:
2017-04-12 Segher Boessenkool <segher@kernel.crashing.org>
PR target/80382
* config/rs6000/sync.md (atomic_load<mode>, atomic_store<mode): Test
for quad_address_p for TImode, instead of just not indexed_address.
2017-06-09 Segher Boessenkool <segher@kernel.crashing.org>
PR target/80966
* config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
gen_add3_insn did not fail.
* config/rs6000/rs6000.md (add<mode>3): If asked to add a constant to
r0, construct that number in a temporary reg and add that reg to r0.
If asked to put the result in r0 as well, fail.
Revert:
Backport from trunk:
2017-06-09 Segher Boessenkool <segher@kernel.crashing.org>
PR target/80966
* gcc.target/powerpc/stack-limit.c: New testcase.
2016-08-15 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/73650
* lra-constraints.c (simple_move_p): If the insn is multiple_sets
it is not a simple move.
2017-01-20 Segher Boessenkool <segher@kernel.crashing.org>
PR target/61729
PR target/77850
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
read from, for big endian.
2017-04-12 Segher Boessenkool <segher@kernel.crashing.org>
PR target/80382
* config/rs6000/sync.md (atomic_load<mode>, atomic_store<mode): Test
for quad_address_p for TImode, instead of just not indexed_address.
2017-05-17 Segher Boessenkool <segher@kernel.crashing.org>
PR middle-end/80692
* real.c (do_compare): Give decimal_do_compare preference over
comparing just the signs.
2017-05-31 Segher Boessenkool <segher@kernel.crashing.org>
PR target/80618
* config/rs6000/vector.md (*vector_uneq<mode>): Write the nor in the
splitter result in the canonical way.
2017-06-09 Segher Boessenkool <segher@kernel.crashing.org>
PR target/80966
* config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
gen_add3_insn did not fail.
* config/rs6000/rs6000.md (add<mode>3): If asked to add a constant to
r0, construct that number in a temporary reg and add that reg to r0.
If asked to put the result in r0 as well, fail.
2017-06-23 Segher Boessenkool <segher@kernel.crashing.org>
PR middle-end/80902
* builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
a call, force the call to not be a tail call.
gcc/testsuite/
Backports from trunk:
2017-05-17 Segher Boessenkool <segher@kernel.crashing.org>
PR middle-end/80692
* gcc.c-torture/execute/pr80692.c: New testcase.
2017-06-09 Segher Boessenkool <segher@kernel.crashing.org>
PR target/80966
* gcc.target/powerpc/stack-limit.c: New testcase.
2017-06-23 Thomas Preud'homme <thomas.preudhomme@arm.com>
Backport from mainline
2017-05-04 Prakhar Bahuguna <prakhar.bahuguna@arm.com>
gcc/
* gcc/config/arm/arm-builtins.c (arm_init_builtins): Rename
__builtin_arm_ldfscr to __builtin_arm_get_fpscr, and rename
__builtin_arm_stfscr to __builtin_arm_set_fpscr.
gcc/testsuite/
* gcc.target/arm/fpscr.c: New file.
Backport from mainline
2017-05-26 Martin Liska <mliska@suse.cz>
PR ipa/80663
* g++.dg/ipa/pr80212.C: Remove the test as it does not longer
split at the problematic spot.
* gcc.dg/ipa/pr48195.c: Change 101 to 100 as 101 is no longer
a valid value of the param.