Commit Graph

153320 Commits

Author SHA1 Message Date
Richard Biener
d90e0fb9ae re PR tree-optimization/71752 (ICE in compute_live_loop_exits, at tree-ssa-loop-manip.c:229 w/ -O1 -ftree-vectorize)
2017-08-01  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/71752
	PR tree-optimization/81633
	* tree-vect-slp.c (vect_get_slp_defs): Handle null operands
	in the original suggested way.

	* gcc.dg/vect/pr81633.c: New testcase.

From-SVN: r250779
2017-08-01 13:58:13 +00:00
Richard Sandiford
2d55c24f77 Backport fix for PR 80769
2017-08-01  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
	PR tree-optimization/80769
	* tree-ssa-strlen.c (strinfo): Document that "stmt" is also used
	for malloc and calloc.  Document the new invariant that all related
	strinfos have delayed lengths or none do.
	(get_next_strinfo): New function.
	(verify_related_strinfos): Move earlier in file.
	(set_endptr_and_length): New function, split out from...
	(get_string_length): ...here.  Also set the lengths of related
	strinfos.

gcc/testsuite/
	PR tree-optimization/80769
	* gcc.dg/strlenopt-31.c: New test.
	* gcc.dg/strlenopt-31g.c: Likewise.

From-SVN: r250772
2017-08-01 12:22:03 +00:00
Jakub Jelinek
fb700fcbf0 re PR tree-optimization/81588 (Wrong code at -O2)
PR tree-optimization/81588
	* tree-ssa-reassoc.c (optimize_range_tests_var_bound): If
	ranges[i].in_p, invert comparison code ccode.  For >/>=,
	swap rhs1 and rhs2 and comparison code unconditionally,
	for </<= don't do that.  Don't swap rhs1/rhs2 again if
	ranges[i].in_p, instead invert comparison code ccode if
	opcode or oe->rank is BIT_IOR_EXPR.

	* gcc.dg/tree-ssa/pr81588.c: New test.
	* gcc.dg/pr81588.c: New test.
	* gcc.c-torture/execute/pr81588.c: New test.

From-SVN: r250761
2017-08-01 10:43:45 +02:00
GCC Administrator
6277010eca Daily bump.
From-SVN: r250755
2017-08-01 00:16:26 +00:00
Joseph Myers
5fd0db72ef * es.po, uk.po: Update.
From-SVN: r250748
2017-07-31 16:51:07 +01:00
Andreas Krebbel
8a9a2371a7 [Committed] S/390: Support z14 as CPU name.
With IBM z14 officially announced we can add support for z14 as
preferred CPU name.  We still pass arch12 to Binutils in order to keep
older Binutils versions supported.

gcc/ChangeLog:

2017-07-31  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	Backport from mainline
	2017-07-31  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* config.gcc: Add z14.
	* config/s390/driver-native.c (s390_host_detect_local_cpu): Add
	CPU model numbers for z13s and z14.
	* config/s390/s390-c.c (s390_resolve_overloaded_builtin): Replace
	arch12 with z14.
	* config/s390/s390-opts.h (enum processor_type): Rename
	PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
	* config/s390/s390.c (processor_table): Add field for CPU name to
	be passed to Binutils.
	(s390_asm_output_machine_for_arch): Use the new field in
	processor_table for Binutils.
	(s390_expand_builtin): Replace arch12 with z14.
	(s390_issue_rate): Rename PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
	(s390_get_sched_attrmask): Likewise.
	(s390_get_unit_mask): Likewise.
	* config/s390/s390.opt: Add z14 to processor_type enum.

From-SVN: r250740
2017-07-31 11:33:18 +00:00
Jakub Jelinek
9e4de329b1 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.

	* c-c++-common/ubsan/pr81604.c: New test.

From-SVN: r250729
2017-07-31 10:46:29 +02:00
GCC Administrator
6c9d51255d Daily bump.
From-SVN: r250724
2017-07-31 00:16:42 +00:00
GCC Administrator
ac02624698 Daily bump.
From-SVN: r250717
2017-07-30 00:16:30 +00:00
GCC Administrator
dfb1c7274f Daily bump.
From-SVN: r250692
2017-07-29 00:16:35 +00:00
Peter Bergner
7a4b10a14f backport: ppc-auxv.h (PPC_FEATURE2_DARN): New define.
gcc/
	Backport from mainline
	2017-07-28  Peter Bergner  <bergner@vnet.ibm.com>

	* config/rs6000/ppc-auxv.h (PPC_FEATURE2_DARN): New define.
	(PPC_FEATURE2_SCV): Likewise.
	* config/rs6000/rs6000.c (cpu_supports_info): Use them.

gcc/testsuite/
	Backport from mainline
	2017-07-28  Peter Bergner  <bergner@vnet.ibm.com>

	* gcc.target/powerpc/cpu-builtin-1.c (darn, scv): Add tests.

From-SVN: r250688
2017-07-28 17:29:31 -05:00
David Edelsohn
fc626ac32f backport: dwarf2asm.c (dw2_asm_output_nstring): Encode double quote character for AIX.
Backport from mainline
2017-07-25  David Edelsohn  <dje.gcc@gmail.com>

        * dwarf2asm.c (dw2_asm_output_nstring): Encode double quote
        character for AIX.
        * dwarf2out.c (output_macinfo): Copy debug_line_section_label
        to dl_section_ref.  On AIX, append an expression to subtract
        the size of the section length to dl_section_ref.

From-SVN: r250663
2017-07-28 09:25:40 -04:00
Bin Cheng
c2ca7b74ce backport: re PR target/81414 (ICE in fma steering on AArch64/cortex-a57)
Backport from mainline r250496
	2017-07-25  Bin Cheng  <bin.cheng@arm.com>

	PR target/81414
	* config/aarch64/cortex-a57-fma-steering.c (analyze): Skip fmul/fmac
	instructions if no du chain is found.

	* gcc.target/aarch64/pr81414.C: New.

From-SVN: r250657
2017-07-28 11:13:45 +00:00
Sebastian Huber
3df4b03a37 [PowerPC/RTEMS] Add 64-bit support using ELFv2 ABI
Add 64-bit support for RTEMS using the ELFv2 ABI with 64-bit long
double.

gcc/
	* config.gcc (powerpc-*-rtems*): Remove rs6000/eabi.h.  Add
	rs6000/biarch64.h.
	* config/rs6000/rtems.h (ASM_DECLARE_FUNCTION_SIZE): New macro.
	(ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise.
	(CRT_CALL_STATIC_FUNCTION): Likewise.
	(ASM_DEFAULT_SPEC): New define.
	(ASM_SPEC32): Likewise.
	(ASM_SPEC64): Likewise.
	(ASM_SPEC_COMMON): Likewise.
	(ASM_SPEC): Likewise.
	(INVALID_64BIT): Likewise.
	(LINK_OS_DEFAULT_SPEC): Likewise.
	(LINK_OS_SPEC32): Likewise.
	(LINK_OS_SPEC64): Likewise.
	(POWERPC_LINUX): Likewise.
	(PTRDIFF_TYPE): Likewise.
	(RESTORE_FP_PREFIX): Likewise.
	(RESTORE_FP_SUFFIX): Likewise.
	(SAVE_FP_PREFIX): Likewise.
	(SAVE_FP_SUFFIX): Likewise.
	(SIZE_TYPE): Likewise.
	(SUBSUBTARGET_OVERRIDE_OPTIONS): Likewise.
	(TARGET_64BIT): Likewise.
	(TARGET_64BIT): Likewise.
	(TARGET_AIX): Likewise.
	(WCHAR_TYPE_SIZE): Likewise.
	(WCHAR_TYPE): Undefine.
	(TARGET_OS_CPP_BUILTINS): Add 64-bit PowerPC defines.
	(CPP_OS_DEFAULT_SPEC): Use previous CPP_OS_RTEMS_SPEC.
	(CPP_OS_RTEMS_SPEC): Delete.
	(SUBSUBTARGET_EXTRA_SPECS): Remove cpp_os_rtems.  Add
	asm_spec_common, asm_spec32, asm_spec64, link_os_spec32, and
	link_os_spec64.
	* config/rs6000/t-rtems: Add mcpu=e6500/m64 multilibs.

libgcc/
	* config/rs6000/ibm-ldouble.c: Disable if defined __rtems__.

From-SVN: r250654
2017-07-28 08:20:50 +00:00
Sebastian Huber
438c40546f [RISC-V] Add RTEMS support
gcc/
	* config.gcc (riscv*-*-elf*): Add (riscv*-*-rtems*).
	* config/riscv/rtems.h: New file.

From-SVN: r250649
2017-07-28 06:06:37 +00:00
GCC Administrator
e5180504c2 Daily bump.
From-SVN: r250646
2017-07-28 00:16:29 +00:00
Eric Botcazou
31722be4ad sparc.c (sparc_option_override): Set MASK_FSMULD flag earlier and only if MASK_FPU is set.
* config/sparc/sparc.c (sparc_option_override): Set MASK_FSMULD flag
	earlier and only if MASK_FPU is set.  Adjust formatting.

From-SVN: r250624
2017-07-27 12:57:23 +00:00
Andreas Krebbel
3c8aa2bdcb S/390: Fix PR81534
The HI/QI atomic_fetch_<atomic><mode>" expander accepted symbolic
references and emitted CAS patterns whose insn predicates rejected them.

Fixed by allowing symbolic references there as well.  Reload will get
rid of them due to the constraint letter.

Regression tested on s390x.

gcc/ChangeLog:

2017-07-27  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	Backport from mainline
	2017-07-27  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	PR target/81534
	* config/s390/s390.md ("*atomic_compare_and_swap<mode>_1")
	("*atomic_compare_and_swapdi_2", "*atomic_compare_and_swapsi_3"):
	Change s_operand to memory_operand.

gcc/testsuite/ChangeLog:

2017-07-27  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	Backport from mainline
	2017-07-27  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	PR target/81534
	* gcc.target/s390/pr81534.c: New test.

From-SVN: r250618
2017-07-27 10:42:22 +00:00
Paolo Carlini
f5e245835a re PR c++/71570 (ICE on invalid variable capture in cxx_incomplete_type_diagnostic, at cp/typeck2.c:55)
/cp
2017-07-27  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/71570
	* lambda.c (add_capture): Early return if we cannot capture by
	reference.

/testsuite
2017-07-27  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/71570
	* g++.dg/cpp0x/lambda/lambda-ice17.C: New.

From-SVN: r250614
2017-07-27 09:36:37 +00:00
Jakub Jelinek
26590fc68b 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.

From-SVN: r250610
2017-07-27 11:06:08 +02:00
Martin Liska
01cee97570 Subject: Backport r250271
2017-07-27  Martin Liska  <mliska@suse.cz>

	Backport from mainline
	2017-07-17  Martin Liska  <mliska@suse.cz>

	PR sanitizer/81302
	* opts.c (finish_options): Do not allow -fgnu-tm
	w/ -fsanitize={kernel-,}address.  Say sorry.

From-SVN: r250608
2017-07-27 08:38:35 +00:00
Martin Liska
4dad7c1d13 Backport r250561
2017-07-27  Martin Liska  <mliska@suse.cz>

	Backport from mainline
	2017-07-26  Martin Liska  <mliska@suse.cz>

	PR sanitize/81186
	* function.c (expand_function_start): Make expansion of
	nonlocal_goto_save_area after parm_birth_insn.
2017-07-27  Martin Liska  <mliska@suse.cz>

	Backport from mainline
	2017-07-26  Martin Liska  <mliska@suse.cz>

	PR sanitize/81186
	* gcc.dg/asan/pr81186.c: New test.

From-SVN: r250605
2017-07-27 07:32:53 +00:00
Martin Liska
da7b783895 Backport r249833
2017-07-27  Martin Liska  <mliska@suse.cz>

	Backport from mainline
	2017-06-30  Martin Liska  <mliska@suse.cz>

	PR sanitizer/81021
	* tree-eh.c (lower_resx): Call BUILT_IN_ASAN_HANDLE_NO_RETURN
	before BUILT_IN_UNWIND_RESUME when ASAN is used.
2017-07-27  Martin Liska  <mliska@suse.cz>

	Backport from mainline
	2017-06-30  Martin Liska  <mliska@suse.cz>

	PR sanitizer/81021
	* g++.dg/asan/pr81021.C: New test.

From-SVN: r250604
2017-07-27 07:32:15 +00:00
Martin Liska
7d3d0ac762 Backport r249728
2017-07-27  Martin Liska  <mliska@suse.cz>

	Backport from mainline
	2017-06-28  Martin Liska  <mliska@suse.cz>

	PR sanitizer/81224
	* asan.c (instrument_derefs): Bail out inner references
	that are hard register variables.
2017-07-27  Martin Liska  <mliska@suse.cz>

	Backport from mainline
	2017-06-28  Martin Liska  <mliska@suse.cz>

	PR sanitizer/81224
	* gcc.dg/asan/pr81224.c: New test.

From-SVN: r250603
2017-07-27 07:31:19 +00:00
GCC Administrator
ec2af726ed Daily bump.
From-SVN: r250600
2017-07-27 00:16:23 +00:00
Sebastian Huber
2582725929 [SPARC] Add -mfsmuld option
Add the -mfsmuld option to control the generation of the FsMULd
instruction.  In general, this instruction is available in architecture
version V8 and V9 CPUs with FPU.  Some CPUs of this category do not
support this instruction properly, e.g. AT697E, AT697F and UT699.  Some
CPUs of this category do not implement it in hardware, e.g. LEON3/4 with
GRFPU-lite.

gcc/
	* config/sparc/sparc.c (dump_target_flag_bits): Dump MASK_FSMULD.
	(sparc_option_override): Honour MASK_FSMULD.
	* config/sparc/sparc.h (MASK_FEATURES): Add MASK_FSMULD.
	* config/sparc/sparc.md (muldf3_extend): Use TARGET_FSMULD.
	* config/sparc/sparc.opt (mfsmuld): New option.
	* doc/invoke.texi (mfsmuld): Document option.

From-SVN: r250571
2017-07-26 12:42:03 +00:00
Wilco Dijkstra
ead42435e7 Disable pr79041-2.c with -mabi=ilp32.
gcc/testsuite/
	PR target/79041
	* gcc.target/aarch64/pr79041-2.c: Don't run in ILP32.

From-SVN: r250569
2017-07-26 11:57:57 +00:00
Georg-Johann Lay
1f80d8f1c2 Typo.
From-SVN: r250563
2017-07-26 09:01:53 +00:00
Georg-Johann Lay
cb42c9b08e backport: re PR lto/81487 ([mingw32] ld.exe: error: asprintf failed)
lto-plugin/
	Backport from 2017-07-21 trunk r250428.
	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-25 trunk r250499.
	PR 81487
	* hsa-brig.c (brig_init): Use xasprintf instead of asprintf.
	* gimple-pretty-print.c (dump_probability): Same.
	* tree-ssa-structalias.c (alias_get_name): Same.

From-SVN: r250562
2017-07-26 08:58:37 +00:00
Richard Biener
259828e6c7 Backport PRs 80721, 81175, 81410, 81455, 81505
2017-07-26  Richard Biener  <rguenther@suse.de>

	Backport from mainline
	2017-06-02  Richard Biener  <rguenther@suse.de>
		Markus Eisenmann  <meisenmann.lba@fh-salzburg.ac.at>

	PR libstdc++/80721
	* libsupc++/eh_alloc.cc (pool::free): Keep list properly
	sorted and add missing freelist item merging cases.

	2017-06-18  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/81410
	* tree-vect-stmts.c (vectorizable_load): Properly adjust for
	the gap in the ! slp_perm SLP case after each group.

	* gcc.dg/vect/pr81410.c: New testcase.

	2017-07-25  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/81455
	* tree-ssa-loop-unswitch.c (find_loop_guard): Make sure to
	not walk in cycles when looking for guards.

	* gcc.dg/pr81455.c: New testcase.

	2017-07-25  Richard Biener  <rguenther@suse.de>

	PR middle-end/81505
	* fold-const.c (fold_negate_const): TREE_OVERFLOW should be
	sticky.

	* gcc.dg/ubsan/pr81505.c: New testcase.

	2017-07-04  Jakub Jelinek  <jakub@redhat.com>

	PR target/81175
	* gcc.target/i386/pr69255-2.c (foo): Use the return value of the
	gather.

	2017-06-28  Jakub Jelinek  <jakub@redhat.com>

	PR target/81175
	* config/i386/i386.c (ix86_init_mmx_sse_builtins): Use def_builtin
	rather than def_builtin_pure for __builtin_ia32_gatherpf*.

	2017-06-26  Richard Biener  <rguenther@suse.de>

	PR target/81175
	* config/i386/i386.c (ix86_init_mmx_sse_builtins):
	Use def_builtin_pure for all gather builtins.

	* gfortran.dg/pr81175.f: New testcase.

	2017-06-21  Marc Glisse  <marc.glisse@inria.fr>
 
	* config/i386/i386.c (struct builtin_isa): New field pure_p.
	Reorder for compactness.
	(def_builtin, def_builtin2, ix86_add_new_builtins): Handle pure_p.
	(def_builtin_pure, def_builtin_pure2): New functions.
	(ix86_init_mmx_sse_builtins) [__builtin_ia32_stmxcsr]: Mark as pure.

 	* gcc.dg/tree-ssa/addadd.c: Un-XFAIL.
 	* gcc.dg/tree-ssa/addadd-2.c: New file.

From-SVN: r250560
2017-07-26 08:36:34 +00:00
Sebastian Huber
2c88b546bc [SPARC] Drop superfluous MASK_FPU enable
All TARGET_DEFAULT defines set MASK_FPU.  There is no need to set it in
some CPU target flags enable.

gcc/
	* config/sparc/sparc.c (sparc_option_override): Remove MASK_FPU
	from all CPU target flags enable members.

From-SVN: r250559
2017-07-26 08:32:41 +00:00
Sebastian Huber
145e8bfade [RTEMS] Add GCC Runtime Library Exception
gcc/
	PR libgcc/61152
	* config/aarch64/rtems.h: Add GCC Runtime Library Exception.
	Format changes.
	* config/arm/rtems.h: Likewise.
	* config/bfin/rtems.h: Likewise.
	* config/i386/rtemself.h: Likewise.
	* config/lm32/rtems.h: Likewise.
	* config/m32c/rtems.h: Likewise.
	* config/m68k/rtemself.h: Likewise.
	* config/microblaze/rtems.h: Likewise.
	* config/mips/rtems.h: Likewise.
	* config/moxie/rtems.h: Likewise.
	* config/nios2/rtems.h: Likewise.
	* config/rs6000/rtems.h: Likewise.
	* config/rtems.h: Likewise.
	* config/sh/rtems.h: Likewise.
	* config/sh/rtemself.h: Likewise.
	* config/sparc/rtemself.h: Likewise.

From-SVN: r250558
2017-07-26 08:31:09 +00:00
GCC Administrator
6e8da31609 Daily bump.
From-SVN: r250553
2017-07-26 00:16:17 +00:00
Bill Schmidt
db1f03b6f7 backport: re PR tree-optimization/81162 (UBSAN switch triggers incorrect optimization in SLSR)
[gcc]

2016-07-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	Backport from mainline
	2016-07-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR tree-optimization/81162
	* gimple-ssa-strength-reduction.c (replace_mult_candidate): Don't
	replace a negate with an add.

[gcc/testsuite]

2016-07-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	Backport from mainline
	2016-07-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR tree-optimization/81162
	* gcc.dg/ubsan/pr81162.c: New file.

From-SVN: r250542
2017-07-25 19:40:50 +00:00
Jonathan Wakely
371868a847 Support move-only deleters in std::shared_ptr (LWG 2802)
Backport from mainline
2017-06-09  Jonathan Wakely  <jwakely@redhat.com>

	* doc/xml/manual/intro.xml: Document LWG 2802, 2873 and 2942 changes.
	* include/bits/shared_ptr.h (shared_ptr): Use rvalues for deleters
	(LWG 2802).
	* include/bits/shared_ptr_base.h (_Sp_ebo_helper, _Sp_counted_deleter
	(_Sp_counted_deleter::_Impl, __shared_count, __shared_ptr): Likewise.
	* testsuite/20_util/shared_ptr/cons/lwg2802.cc: New.

From-SVN: r250541
2017-07-25 19:05:25 +01:00
Jonathan Wakely
dea4c7435c Add noexcept to shared_ptr owner comparisons (LWG 2873)
Backport from mainline
2017-06-05  Jonathan Wakely  <jwakely@redhat.com>

	* include/bits/shared_ptr_base.h (__shared_ptr::owner_before)
	(__weak_ptr::owner_before, _Sp_owner_less::operator()): Add noexcept
	specifiers as per LWG 2873 and LWG 2942.
	* testsuite/20_util/owner_less/noexcept.cc: New.
	* testsuite/20_util/shared_ptr/observers/owner_before.cc: Test
	noexcept guarantees.
	* testsuite/20_util/weak_ptr/observers/owner_before.cc: Likewise.

From-SVN: r250540
2017-07-25 19:05:19 +01:00
Jonathan Wakely
b65b227362 PR libstdc++/80553 don't allow destroying non-destructible types
Backport from mainline
2017-04-28  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/80553
	* include/bits/stl_construct.h (_Destroy, _Destroy_n): Add static
	assertions to ensure type is destructible.
	(destroy_at, destroy, destroy_n): Move from stl_uninitialized.h.
	* include/bits/stl_uninitialized.h (destroy_at, destroy, destroy_n):
	Move to stl_construct.h.
	* testsuite/20_util/specialized_algorithms/memory_management_tools/
	destroy_neg.cc: New test.
	* testsuite/23_containers/vector/cons/destructible_neg.cc: New test.

From-SVN: r250539
2017-07-25 19:05:13 +01:00
Jonathan Wakely
0182e8bb7b Implement std::experimental::source_location (N4519)
Backport from mainline
2017-05-16  Jonathan Wakely  <jwakely@redhat.com>

	* configure: Regenerate.
	* doc/xml/manual/status_cxx2017.xml: Update status table.
	* doc/html/*: Regenerate.
	* include/Makefile.am: Add new header.
	* include/Makefile.in: Regenerate.
	* include/experimental/source_location: New header implementing N4519.
	* testsuite/experimental/source_location/1.cc: New test.

From-SVN: r250538
2017-07-25 19:05:07 +01:00
Jonathan Wakely
6c018e95a4 Prevent __uses_alloc from holding dangling references
Backport from mainline
2017-07-06  Jonathan Wakely  <jwakely@redhat.com>

	* include/bits/uses_allocator.h (__use_alloc(const _Alloc&&)): Add
	deleted overload to prevent dangling references to rvalues.
	* include/experimental/memory_resource
	(polymorphic_allocator::construct): Do not call __use_alloc with
	rvalue arguments.

From-SVN: r250537
2017-07-25 19:04:59 +01:00
Jonathan Wakely
2f484ee274 PR libstdc++/81017 add noexcept to std::function move operations
Backport from mainline
2017-06-08  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/81017
	* include/bits/std_function.h (function::function(function&&))
	(function::operator=(funtion&&)): Add noexcept.
	* testsuite/20_util/function/assign/move.cc: Check for noexcept.
	* testsuite/20_util/function/cons/move.cc: Likewise.

From-SVN: r250536
2017-07-25 19:04:54 +01:00
Jonathan Wakely
efafffd056 Reorder std::scoped_lock parameters as per P0739R0 DR status
Backport from mainline
2017-07-15  Jonathan Wakely  <jwakely@redhat.com>

	* include/std/mutex (scoped_lock): Reorder std::adopt_lock_t parameter
	as per P0739R0.
	* testsuite/30_threads/scoped_lock/cons/1.cc: Reorder arguments.
	* testsuite/30_threads/scoped_lock/cons/deduction.cc: Test deduction
	with std::adopt_lock_t.
	* testsuite/30_threads/scoped_lock/requirements/typedefs.cc: Check
	feature-test macro.

From-SVN: r250535
2017-07-25 19:04:44 +01:00
Jonathan Wakely
8b6fb0e81f Constrain std::variant constructor for class template argument deduction
Backport from mainline
2017-07-14  Jason Merrill  <jason@redhat.com>
    Jonathan Wakely  <jwakely@redhat.com>

	* include/std/variant (variant::variant(_Tp&&)): Constrain to remove
	the constructor for empty variants from the candidate functions
	during class template argument deduction.
	* testsuite/20_util/variant/deduction.cc: New.

From-SVN: r250534
2017-07-25 19:04:38 +01:00
Jonathan Wakely
65cc957365 PR libstdc++/80939 Remove unmeetable constexpr specifiers
Backport from mainline
2017-06-02  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/80939
	* include/std/variant (__erased_ctor, __erased_assign, __erased_swap)
	(__erased_hash): Remove constexpr specifier and qualify calls to
	__ref_cast.
	(__erased_dtor): Remove constexpr specifier and use _Destroy.

From-SVN: r250533
2017-07-25 19:04:32 +01:00
Jonathan Wakely
e83fef1f15 PR libstdc++/80737 backport std::variant fix from mainline
Backport from mainline
2017-05-20  Tim Shen  <timshen@google.com>

	PR libstdc++/80737
	* include/std/variant(variant::variant): SFINAE on is_same first.
	* testsuite/20_util/variant/any.cc: test case.

From-SVN: r250532
2017-07-25 19:04:27 +01:00
Georg-Johann Lay
1e0bc91345 backport: re PR target/81407 ([avr] Diagnose if a variable in progmem needs constructing.)
gcc/
	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.

From-SVN: r250522
2017-07-25 14:32:30 +00:00
Wilco Dijkstra
ca73e1b3d3 re PR target/79041 (aarch64 backend emits R_AARCH64_ADR_PREL_PG_HI21 relocation despite -mpc-relative-literal-loads option being used)
Fix PR79041

As described in PR79041, -mcmodel=large -mpc-relative-literal-loads
may be used to avoid generating ADRP/ADD or ADRP/LDR.  However both
trunk and GCC7 may still emit ADRP for some constant pool literals.
Fix this by adding a aarch64_pcrelative_literal_loads check.

    gcc/
	PR target/79041
	* config/aarch64/aarch64.c (aarch64_classify_symbol):
	Avoid SYMBOL_SMALL_ABSOLUTE for literals with pc-relative literals.
    gcc/testsuite/
	* gcc.target/aarch64/pr79041-2.c: New test.

From-SVN: r250514
2017-07-25 12:08:59 +00:00
Georg-Johann Lay
7db1c40d36 backport: re PR rtl-optimization/75964 (insn combiner removes comparison after ABS)
gcc/
	Backport from 2017-05-06 trunk r247719.
	PR rtl-optimization/75964
	* simplify-rtx.c (simplify_const_relational_operation): Remove
	invalid handling of comparisons of integer ABS.
gcc/testsuite/
	Backport from 2017-05-06 trunk r247719.
	PR rtl-optimization/75964
	* gcc.dg/torture/pr75964.c: New test.

From-SVN: r250509
2017-07-25 11:39:23 +00:00
Bin Cheng
16ac9369b0 backport: re PR tree-optimization/81388 (Incorrect code generation with -O1)
Backport from 2017-07-20 trunk r250384.

	PR tree-optimization/81388
	Revert r238585:
	2016-07-21  Bin Cheng  <bin.cheng@arm.com>

	* tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Clean up
	by removing computation of may_be_zero.

	gcc/testsuite
	PR tree-optimization/81388
	* gcc.dg/tree-ssa/pr81388-1.c: New test.
	* gcc.dg/tree-ssa/pr81388-2.c: New test.

From-SVN: r250497
2017-07-25 08:56:26 +00:00
GCC Administrator
cc30cfd553 Daily bump.
From-SVN: r250492
2017-07-25 00:16:13 +00:00
GCC Administrator
a5855a06f1 Daily bump.
From-SVN: r250469
2017-07-24 00:16:43 +00:00