Commit Graph

153864 Commits

Author SHA1 Message Date
H.J. Lu 0c198399c1 Update ChangeLog entries
From-SVN: r256733
2018-01-16 03:04:48 -08:00
H.J. Lu 7799a85590 x86: Add -mindirect-branch=
Add -mindirect-branch= option to convert indirect call and jump to call
and return thunks.  The default is 'keep', which keeps indirect call and
jump unmodified.  'thunk' converts indirect call and jump to call and
return thunk.  'thunk-inline' converts indirect call and jump to inlined
call and return thunk.  'thunk-extern' converts indirect call and jump to
external call and return thunk provided in a separate object file.  You
can control this behavior for a specific function by using the function
attribute indirect_branch.

2 kinds of thunks are geneated.  Memory thunk where the function address
is at the top of the stack:

__x86_indirect_thunk:
	call L2
L1:
	pause
	lfence
	jmp L1
L2:
	lea 8(%rsp), %rsp|lea 4(%esp), %esp
	ret

Indirect jmp via memory, "jmp mem", is converted to

	push memory
	jmp __x86_indirect_thunk

Indirect call via memory, "call mem", is converted to

	jmp L2
L1:
	push [mem]
	jmp __x86_indirect_thunk
L2:
	call L1

Register thunk where the function address is in a register, reg:

__x86_indirect_thunk_reg:
	call	L2
L1:
	pause
	lfence
	jmp	L1
L2:
	movq	%reg, (%rsp)|movl    %reg, (%esp)
	ret

where reg is one of (r|e)ax, (r|e)dx, (r|e)cx, (r|e)bx, (r|e)si, (r|e)di,
(r|e)bp, r8, r9, r10, r11, r12, r13, r14 and r15.

Indirect jmp via register, "jmp reg", is converted to

	jmp __x86_indirect_thunk_reg

Indirect call via register, "call reg", is converted to

	call __x86_indirect_thunk_reg

gcc/

	Backport from mainline
	* config/i386/i386-opts.h (indirect_branch): New.
	* config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
	* config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
	with local indirect jump when converting indirect call and jump.
	(ix86_set_indirect_branch_type): New.
	(ix86_set_current_function): Call ix86_set_indirect_branch_type.
	(indirectlabelno): New.
	(indirect_thunk_needed): Likewise.
	(indirect_thunk_bnd_needed): Likewise.
	(indirect_thunks_used): Likewise.
	(indirect_thunks_bnd_used): Likewise.
	(INDIRECT_LABEL): Likewise.
	(indirect_thunk_name): Likewise.
	(output_indirect_thunk): Likewise.
	(output_indirect_thunk_function): Likewise.
	(ix86_output_indirect_branch_via_reg): Likewise.
	(ix86_output_indirect_branch_via_push): Likewise.
	(ix86_output_indirect_branch): Likewise.
	(ix86_output_indirect_jmp): Likewise.
	(ix86_code_end): Call output_indirect_thunk_function if needed.
	(ix86_output_call_insn): Call ix86_output_indirect_branch if
	needed.
	(ix86_handle_fndecl_attribute): Handle indirect_branch.
	(ix86_attribute_table): Add indirect_branch.
	* config/i386/i386.h (machine_function): Add indirect_branch_type
	and has_local_indirect_jump.
	* config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
	to true.
	(tablejump): Likewise.
	(*indirect_jump): Use ix86_output_indirect_jmp.
	(*tablejump_1): Likewise.
	(simple_return_indirect_internal): Likewise.
	* config/i386/i386.opt (mindirect-branch=): New option.
	(indirect_branch): New.
	(keep): Likewise.
	(thunk): Likewise.
	(thunk-inline): Likewise.
	(thunk-extern): Likewise.
	* doc/extend.texi: Document indirect_branch function attribute.
	* doc/invoke.texi: Document -mindirect-branch= option.

gcc/testsuite/

	Backport from mainline
	* gcc.target/i386/indirect-thunk-1.c: New test.
	* gcc.target/i386/indirect-thunk-2.c: Likewise.
	* gcc.target/i386/indirect-thunk-3.c: Likewise.
	* gcc.target/i386/indirect-thunk-4.c: Likewise.
	* gcc.target/i386/indirect-thunk-5.c: Likewise.
	* gcc.target/i386/indirect-thunk-6.c: Likewise.
	* gcc.target/i386/indirect-thunk-7.c: Likewise.
	* gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
	* gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
	* gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
	* gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
	* gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
	* gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
	* gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
	* gcc.target/i386/indirect-thunk-attr-8.c: Likewise.
	* gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
	* gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
	* gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
	* gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
	* gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
	* gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
	* gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
	* gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
	* gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
	* gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
	* gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
	* gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
	* gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
	* gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
	* gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
	* gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
	* gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
	* gcc.target/i386/indirect-thunk-inline-7.c: Likewise.

From-SVN: r256732
2018-01-16 02:59:42 -08:00
Richard Biener 30bd6019be backport: re PR target/81481 (Spills %xmm to stack in glibc strspn SSE 4.2 variant)
2018-01-16  Richard Biener  <rguenther@suse.de>

	Backport from mainline
	2017-09-29  Vladimir Makarov  <vmakarov@redhat.com>

	PR target/81481
	* ira-costs.c (scan_one_insn): Don't take into account PIC equiv
	with a symbol for LRA.

	* gcc.target/i386/pr81481.c: New.

From-SVN: r256731
2018-01-16 09:51:57 +00:00
GCC Administrator 31ba61a781 Daily bump.
From-SVN: r256718
2018-01-16 00:16:20 +00:00
Segher Boessenkool 8cd9e9f172 backport: re PR target/83629 (ICE: in decompose_normal_address, at rtlanal.c:6329 with -O2 -fPIC -frename-registers --param=sched-autopref-queue-depth=nnn)
Backport from mainline
	2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>

	PR target/83629
	* config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
	load_toc_v4_PIC_3c): Wrap const term in CONST RTL.

gcc/testsuite/
	Backport from mainline
	2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>

	PR target/83629
	* gcc.target/powerpc/pr83629.c: New testcase.

	2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>

	PR target/83629
	* gcc.target/powerpc/pr83629.c: Require ilp32.

From-SVN: r256711
2018-01-15 23:08:12 +01:00
H.J. Lu 1984fccf0b i386: Align stack frame if argument is passed on stack
When a function call is removed, it may become a leaf function.  But if
argument may be passed on stack, we need to align the stack frame when
there is no tail call.

Tested on Linux/i686 and Linux/x86-64.

gcc/

	Backport from mainline
	PR target/83330
	* config/i386/i386.c (ix86_function_arg_advance): Set
	outgoing_args_on_stack to true if there are outgoing arguments
	on stack.
	(ix86_function_arg): Likewise.
	(ix86_compute_frame_layout): Align stack frame if argument is
	passed on stack.
	* config/i386/i386.h (machine_function): Add
	outgoing_args_on_stack.

gcc/testsuite/

	Backport from mainline
	PR target/83330
	* gcc.target/i386/pr83330.c: New test.

From-SVN: r256703
2018-01-15 08:13:23 -08:00
H.J. Lu d031a3aaf5 i386: More use reference of struct ix86_frame to avoid copy
When there is no need to make a copy of ix86_frame, we can use reference
of struct ix86_frame to avoid copy.

	Backport from mainline
	* config/i386/i386.c (ix86_expand_prologue): Use reference of
	struct ix86_frame.
	(ix86_expand_epilogue): Likewise.

From-SVN: r256695
2018-01-15 03:33:42 -08:00
H.J. Lu ed493f2709 Move ChangeLog entries to gcc/ChangeLog
From-SVN: r256693
2018-01-15 03:32:23 -08:00
H.J. Lu b3bb6c435e i386: Use reference of struct ix86_frame to avoid copy
When there is no need to make a copy of ix86_frame, we can use reference
of struct ix86_frame to avoid copy.

	Backport from mainline
	* config/i386/i386.c (ix86_can_use_return_insn_p): Use reference
	of struct ix86_frame.
	(ix86_initial_elimination_offset): Likewise.
	(ix86_expand_split_stack_prologue): Likewise.

From-SVN: r256692
2018-01-15 03:28:44 -08:00
H.J. Lu 37d3afcae7 i386: Move struct ix86_frame to machine_function
Make ix86_frame available to i386 code generation.  This is needed to
backport the patch set of -mindirect-branch= to mitigate variant #2 of
the speculative execution vulnerabilities on x86 processors identified
by CVE-2017-5715, aka Spectre.

	Backport from mainline
	* config/i386/i386.c (ix86_frame): Moved to ...
	* config/i386/i386.h (ix86_frame): Here.
	(machine_function): Add frame.
	* config/i386/i386.c (ix86_compute_frame_layout): Repace the
	frame argument with &cfun->machine->frame.
	(ix86_can_use_return_insn_p): Don't pass &frame to
	ix86_compute_frame_layout.  Copy frame from cfun->machine->frame.
	(ix86_can_eliminate): Likewise.
	(ix86_expand_prologue): Likewise.
	(ix86_expand_epilogue): Likewise.
	(ix86_expand_split_stack_prologue): Likewise.

From-SVN: r256691
2018-01-15 03:27:24 -08:00
GCC Administrator b6294d3eab Daily bump.
From-SVN: r256679
2018-01-15 00:16:23 +00:00
Jerry DeLisle 6e3d1ae6e1 backport: re PR libfortran/83811 (fortran 'e' format broken for single digit exponents)
2018-01-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	Backport from trunk
	PR libgfortran/83811
	* gfortran.dg/fmt_e.f90: New test.

	* gfortran.dg/fmt_e.f90: New test.

From-SVN: r256675
2018-01-14 21:44:50 +00:00
Bill Schmidt ed402c475a backport: re PR target/83677 (PPC: The xxpermr instruction is not generated correctly)
[gcc]

2018-01-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	Backport from mainline
	2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR target/83677
	* config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
	Reverse order of second and third operands in first alternative.
	* config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
	of first and second elements in UNSPEC_VPERMR vector.
	(altivec_expand_vec_perm_le): Likewise.

[gcc/testsuite]

2018-01-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	Backport from mainline
	2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR target/83677
	* gcc.target/powerpc/pr83677.c: New file.

From-SVN: r256670
2018-01-14 17:47:30 +00:00
Uros Bizjak 38c84ba5d6 backport: re PR rtl-optimization/83628 (performance regression when accessing arrays on alpha)
Backport from mainline
	2018-01-12  Uros Bizjak  <ubizjak@gmail.com>

	PR target/83628
	* config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
	(*saddl_se_1): Ditto.
	(*ssubsi_1): Ditto.
	(*ssubl_se_1): Ditto.

	Backport from mainline
	2018-01-09  Uros Bizjak  <ubizjak@gmail.com>

	PR target/83628
	* combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
	op_mode in the force_to_mode call.

testsuite/ChangeLog:

	Backport from mainline
	2018-01-12  Uros Bizjak  <ubizjak@gmail.com>

	PR target/83628
	* gcc.target/alpha/pr83628-3.c: New test.

From-SVN: r256665
2018-01-14 16:45:38 +01:00
GCC Administrator 2d8d78a10d Daily bump.
From-SVN: r256652
2018-01-14 00:16:08 +00:00
Steven G. Kargl e2be496352 backport: re PR fortran/78814 (ICE in symbol_rank, at fortran/interface.c:1265)
2012-01-13  Steven G. Kargl  <kargl@gcc.gnu.org>

	Backport from mainline
        PR fortran/78814
        * interface.c (symbol_rank): Check for NULL pointer.

2012-01-13  Steven G. Kargl  <kargl@gcc.gnu.org>

	Backport from mainline
        PR fortran/78814
        * gfortran.dg/interface_40.f90: New testcase.

From-SVN: r256646
2018-01-13 18:58:56 +00:00
Jonathan Wakely f43b6a905e Fix type printers for Library Fundamentals types
* python/libstdcxx/v6/printers.py (register_type_printers): Remove
	printer for experimental::any. Fix printers for experimental::optional
	and experimental::basic_string_view.

From-SVN: r256604
2018-01-13 01:53:52 +00:00
Jonathan Wakely b520d0cffb PR libstdc++/83626 simplify filesystem::remove and filesystem::remove_all
Backport from mainline
2018-01-05  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/83626
	* src/filesystem/ops.cc (remove(const path&, error_code&)): Remove
	unnecessary symlink_status call.
	(remove_all(const path&, error_code&)): Use filesystem::remove.

From-SVN: r256603
2018-01-13 01:53:47 +00:00
GCC Administrator ab1c0a5d9c Daily bump.
From-SVN: r256601
2018-01-13 00:16:10 +00:00
Oleg Endo 22ec74897c backport: re PR target/81819 ([RX] internal compiler error: in rx_is_restricted_memory_address, at config/rx/rx.c:311)
gcc/
	Backport from mainline
	2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>

	PR target/81819
	* config/rx/rx.c (rx_is_restricted_memory_address):
	Handle SUBREG case.

From-SVN: r256579
2018-01-12 12:12:38 +00:00
Eric Botcazou 951346c205 re PR rtl-optimization/83565 (RTL combine pass yields wrong rotate result)
PR rtl-optimization/83565
	* rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
	not extend the result to a larger mode for rotate operations.
	(num_sign_bit_copies1): Likewise.

From-SVN: r256573
2018-01-12 10:20:42 +00:00
Rainer Orth 28b93b9304 Avoid Solaris/SPARC comparison failures with Solaris as (PR bootstrap/81926)
Backport from mainline
	2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	PR bootstrap/81926
	* cgraphunit.c (symbol_table::compile): Switch to text_section
	before calling assembly_start debug hook.

From-SVN: r256562
2018-01-12 05:32:31 +00:00
GCC Administrator e1521062de Daily bump.
From-SVN: r256560
2018-01-12 00:16:09 +00:00
Oleg Endo 05d34c633d backport: re PR target/81821 ([RX] xchg_mem<mode> uses wrong memory operand size)
gcc/
	Backport from mainline
	2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>

	PR target/81821
	* config/rx/rx.md (BW): New mode attribute.
	(sync_lock_test_and_setsi): Add mode suffix to insn output.

From-SVN: r256538
2018-01-11 15:18:38 +00:00
GCC Administrator 4bf06d991a Daily bump.
From-SVN: r256471
2018-01-11 00:16:09 +00:00
Steven G. Kargl 91716fe0dd re PR fortran/82367 (ICE with deferred length string allocate on non-deferred length argument)
2018-01-10  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/82367
	* resolve.c (resolve_allocate_expr): Check for NULL pointer.

2018-01-10  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/82367
	* gfortran.dg/deferred_character_18.f90: New test.

From-SVN: r256466
2018-01-10 23:41:48 +00:00
Steven G. Kargl 7a760f1977 backport: re PR fortran/83093 (ICE in fold_convert_loc, at fold-const.c:2266)
2018-01-10 Steven G. Kargl  <kargl@gcc.gnu.org>

	Backport from trunk
	PR fortran/83093
	* resolve.c (resolve_charlen): Check the type of cl->length
	after resolution.

2018-01-10  Steven G. Kargl  <kargl@gcc.gnu.org>

	Backport from trunk
	PR fortran/83093
	* gfortran.dg/allocate_with_typespec_7.f90: New test.

From-SVN: r256459
2018-01-10 22:35:00 +00:00
Steven G. Kargl ee30b822e5 backport: re PR fortran/82841 (Segfault in gfc_simplify_transfer)
2018-01-10  Steven G. Kargl  <kargl@kgcc.gnu.org>

	Backport r254555 from trunk
	PR Fortran/82841
	* gfortran.dg/transfer_simplify_11.f90: New test.


2018-01-10  Steven G. Kargl  <kargl@kgcc.gnu.org>

	Backport r254555 from trunk
	PR Fortran/82841
	* simplify.c(gfc_simplify_transfer): Do not dereference a NULL pointer.
	Unwrap a short line.

From-SVN: r256445
2018-01-10 18:47:44 +00:00
GCC Administrator df18d5afa6 Daily bump.
From-SVN: r256414
2018-01-10 00:16:13 +00:00
Joseph Myers 8c90c237aa * es.po: Update.
From-SVN: r256409
2018-01-09 23:36:24 +00:00
Richard Biener d8d1029d8e backport: re PR c++/83713 (ICE in do_narrow at gcc/convert.c:474)
2018-01-09  Richard Biener  <rguenther@suse.de>

	Backport from mainline
	2018-01-08  Richard Biener  <rguenther@suse.de>

	PR middle-end/83713
	* convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.

	* g++.dg/torture/pr83713.C: New testcase.

From-SVN: r256371
2018-01-09 08:53:14 +00:00
Jim Wilson 603ceb882d RISC-V: Fix -msave-restore bug with sibcalls.
2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
		    Kito Cheng  <kito.cheng@gmail.com>
	gcc/
	* config/riscv/riscv.c (machine_function::is_leaf): Remove field.
	(riscv_leaf_function_p): Delete.
	(riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.

	2018-01-08  Chih-Mao Chen <pkmx.tw@gmail.com>
		    Monk Chiang  <sh.chiang04@gmail.com>
	gcc/testsuite/
	* gcc.target/riscv/save-restore-1.c: New.

	2017-11-29  Jim Wilson  <jimw@sifive.com>
	gcc/testsuite/
	* gcc.target/riscv/riscv.exp: New.

From-SVN: r256363
2018-01-08 17:01:45 -08:00
GCC Administrator c9af7ef850 Daily bump.
From-SVN: r256360
2018-01-09 00:16:15 +00:00
Kyrylo Tkachov 9192145f0b [arm] PR target/82975: Guard against reg_renumber being NULL in arm.h
Backport from mainline
	2017-12-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	PR target/82975
	* config/arm/arm.h (TEST_REGNO): Adjust comment as expected in r255830.

	* gcc.dg/pr82975.c: New test.

From-SVN: r256350
2018-01-08 18:42:50 +00:00
Sebastian Huber 2fc75a03b0 RTEMS/EPIPHANY: Add RTEMS support
gcc/
	* config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
	* config/epiphany/rtems.h: New file.

libgcc/
	* config.host (epiphany-*-elf*): Add (epiphany-*-rtems*)
	configuration.

From-SVN: r256342
2018-01-08 13:39:11 +00:00
GCC Administrator 871fb7e343 Daily bump.
From-SVN: r256326
2018-01-08 00:16:12 +00:00
Uros Bizjak 71cacd0b5c alpha.md (*sadd<modesuffix>): Use ASHIFT instead of MULT rtx.
* config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
	instead of MULT rtx.  Update all corresponding splitters.
	(*saddl_se): Ditto.
	(*ssub<modesuffix>): Ditto.
	(*ssubl_se): Ditto.
	(*cmp_sadd_di): Update split patterns.
	(*cmp_sadd_si): Ditto.
	(*cmp_sadd_sidi): Ditto.
	(*cmp_ssub_di): Ditto.
	(*cmp_ssub_si): Ditto.
	(*cmp_ssub_sidi): Ditto.
	* config/alpha/predicates.md (const23_operand): New predicate.
	* config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
	Look for ASHIFT, not MULT inner operand.
	(alpha_split_conditional_move): Update for *sadd<modesuffix> change.

testsuite/ChangeLog:

	* gcc.target/alpha/pr83628-1.c: New test.
	* gcc.target/alpha/pr83628-2.c: Ditto.

From-SVN: r256324
2018-01-07 20:14:55 +01:00
GCC Administrator 7f40e113d0 Daily bump.
From-SVN: r256316
2018-01-07 00:16:12 +00:00
GCC Administrator 7203d58a46 Daily bump.
From-SVN: r256303
2018-01-06 00:16:14 +00:00
Jonathan Wakely f8e2a3f31e Improve tests for error reporting in Filesystem TS
Backport from mainline
2017-10-19  Jonathan Wakely  <jwakely@redhat.com>

	* testsuite/experimental/filesystem/iterators/
	recursive_directory_iterator.cc: Ensure that error_code arguments are
	cleared when required.
	* testsuite/experimental/filesystem/operations/create_directory.cc:
	Remove redundant check.
	* testsuite/experimental/filesystem/operations/temp_directory_path.cc:
	Ensure that error_code argument is cleared when required.

From-SVN: r256293
2018-01-05 22:22:33 +00:00
Jonathan Wakely 7a2b2be984 PR libstdc++/83600 fix end iterator for unready std::match_results
Backport from mainline
2017-12-27  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/83600
	* include/bits/regex.h (match_results::end()): Return valid iterator
	when not ready.
	* testsuite/28_regex/match_results/ctors/char/default.cc: Check that
	unready objects are empty and have equal begin and end iterators.
	* testsuite/28_regex/match_results/ctors/wchar_t/default.cc: Likewise.

From-SVN: r256292
2018-01-05 22:22:28 +00:00
Jonathan Wakely a6d46487f3 PR libstdc++/83598 don't modify flags passed to std::basic_regex constructors
Backport from mainline
2017-12-27  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/83598
	* include/bits/regex.h (basic_regex): Don't modify flags passed to
	constructors.
	* testsuite/28_regex/basic_regex/ctors/83598.cc: New test.

From-SVN: r256291
2018-01-05 22:22:17 +00:00
Jonathan Wakely 0070e3297e PR libstdc++/83279 handle sendfile not copying entire file
Backport from mainline
2017-12-14  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/83279
	* src/filesystem/std-ops.cc (do_copy_file): Handle sendfile not
	copying entire file.

From-SVN: r256290
2018-01-05 22:22:12 +00:00
Jonathan Wakely 826137607d Avoid redundant calls to filesystem::status_known
Backport from mainline
2018-01-04  Jonathan Wakely  <jwakely@redhat.com>

	* include/experimental/fs_ops.h (exists(const path&, error_code&))):
        Only check status_known once.

From-SVN: r256288
2018-01-05 21:27:29 +00:00
Jonathan Wakely 72eaf75b30 PR libstdc++/83626 Don't report errors when removing non-existent files
Backport from mainline
2018-01-05  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/83626
	* src/filesystem/ops.cc (remove(const path&, error_code&)): Do not
	report an error for ENOENT.
	(remove_all(const path&)): Fix type of result variable.
	(remove_all(const path&, error_code&)): Use non-throwing increment
	for directory iterator. Call POSIX remove directly to avoid redundant
	calls to symlink_status. Do not report errors for ENOENT.
	* testsuite/experimental/filesystem/operations/remove_all.cc: Test
        throwing overload.

Backport from mainline
2018-01-04  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/83626
	* src/filesystem/ops.cc (remove(const path&, error_code&))): Remove
	redundant call to ec.clear().
	(remove_all(const path&, error_code&))): Do not return an error for
	non-existent paths.
	* testsuite/experimental/filesystem/operations/remove.cc: New test.
	* testsuite/experimental/filesystem/operations/remove_all.cc: Fix
	expected results for non-existent paths.

From-SVN: r256287
2018-01-05 21:27:25 +00:00
Jonathan Wakely df7dd7127c PR libstdc++/79283 fix filesystem::read_symlink for /proc
Backport from mainline
2017-10-25  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/79283
	* src/filesystem/ops.cc (read_symlink): Handle st_size being zero.

From-SVN: r256286
2018-01-05 21:27:20 +00:00
Michael Weiser d7e9a32ab0 [PATCH, PR83492] Fix selection of aarch64 big-endian shift parameters based on __AARCH64EB__
2018-01-05  Michael Weiser  <michael.weiser@gmx.de>

	Backport from trunk
	2017-12-20  Michael Weiser  <michael.weiser@gmx.de>

	PR preprocessor/83492
	* lex.c (search_line_fast) [__ARM_NEON && __ARM_64BIT_STATE]:
	Fix selection of big-endian shift parameters by using
	__ARM_BIG_ENDIAN.

From-SVN: r256278
2018-01-05 13:58:54 +00:00
GCC Administrator 30833826aa Daily bump.
From-SVN: r256271
2018-01-05 00:16:14 +00:00
Steven G. Kargl 58929d71e1 re PR fortran/83679 (r256113 causes regression on pr77942.f90)
2018-01-04  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR Fortran/83679
	* simplify.c (gfc_simplify_cshift): Restore early return for zero-sized
	array.  Update Copyright year while here.

From-SVN: r256263
2018-01-04 20:16:23 +00:00
Ville Voutilainen 166d8f080c Protect optional's deduction guide with the feature macro
Backport from mainline
2018-01-03  Ville Voutilainen  <ville.voutilainen@gmail.com>

Protect optional's deduction guide with the feature macro
* include/std/optional: Use the feature macro.

From-SVN: r256261
2018-01-04 20:58:29 +02:00