Commit Graph

163467 Commits

Author SHA1 Message Date
Iain Sandoe
05c1e87adb Darwin - remove unnecessary target hook
gcc/

2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>

	* config/darwin.c
	 (darwin_function_switched_text_sections): Delete.
	* gcc/config/darwin.h
	 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.

From-SVN: r263555
2018-08-15 11:16:12 +00:00
Jonathan Wakely
25b030b85a Fix single-threaded build for targets without atomics
* src/c++17/memory_resource.cc [!_GLIBCXX_HAS_GTHREADS]
	(atomic_mem_res): Add unsynchronized definition for single-threaded.

From-SVN: r263554
2018-08-15 10:56:33 +01:00
Iain Sandoe
89bcf3fffe Update Darwin section names for DWARF5
gcc/

2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>

	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.

From-SVN: r263553
2018-08-15 09:19:39 +00:00
Martin Liska
7c8357def1 Fix merging of 2 predictors (PR tree-optimization/86925).
2018-08-15  Martin Liska  <mliska@suse.cz>

        PR tree-optimization/86925
	* predict.c (expr_expected_value_1): When taking
        later predictor, assign also probability.
        Use fold_build2_initializer_loc in order to fold
        the expression in -frounding-math.
2018-08-15  Martin Liska  <mliska@suse.cz>

        PR tree-optimization/86925
	* gcc.dg/predict-20.c: New test.
	* gcc.dg/predict-21.c: New test.

From-SVN: r263552
2018-08-15 08:55:15 +00:00
Paolo Carlini
0806181f23 decl.c (check_previous_goto_1): When decl_jump_unsafe returns 2 emit an error instead of a permerror.
/cp
2018-08-15  Paolo Carlini  <paolo.carlini@oracle.com>

	* decl.c (check_previous_goto_1): When decl_jump_unsafe returns 2
	emit an error instead of a permerror.

/testsuite
2018-08-15  Paolo Carlini  <paolo.carlini@oracle.com>

	* g++.dg/init/goto3.C: Adjust for error instead of permerror.

From-SVN: r263551
2018-08-15 08:20:21 +00:00
Andreas Schwab
68d235936b backport: ffi.c (ffi_call_go, [...]): New functions.
Backport of RISC-V support for libffi go closures
* src/riscv/ffi.c (ffi_call_go, ffi_prep_go_closure): New
functions.
(ffi_call_int): Renamed from ffi_call.
(ffi_call_asm, ffi_closure_inner): Adjust interface.
* src/riscv/ffitarget.h (FFI_GO_CLOSURES): Define.
* src/riscv/sysv.S (ffi_go_closure_asm): New function.
(ffi_closure_asm, ffi_call_asm): Update for adjusted interfaces.

From-SVN: r263550
2018-08-15 06:57:45 +00:00
Allan Sandfeld Jensen
107192f73e i386.c (expand_vec_perm_movs): New method matching movs patterns.
* config/i386/i386.c (expand_vec_perm_movs): New method matching movs
	patterns.
	(expand_vec_perm_1): Try the new method.

	* gcc.target/i386/sse2-movs.c: New test.

From-SVN: r263549
2018-08-14 22:33:12 -06:00
Ilya Leoshkevich
4720f4afba re PR target/86547 (s390x: Maximum number of LRA assignment passes is achieved (30) when compiling a small inline assembler snippet)
PR target/86547
	* lra-lives.c (remove_some_program_points_and_update_live_ranges):
        Check whether lra_live_max_point is 0 before dividing.

From-SVN: r263548
2018-08-14 22:09:45 -06:00
GCC Administrator
47f61a023f Daily bump.
From-SVN: r263547
2018-08-15 00:16:39 +00:00
Rainer Orth
864c28e135 Include <sys/random.h> for getentropy on Solaris
* configure.ac: Check for <sys/random.h>.
	* configure, config.h.in: Regenerate.
	* intrinsics/random.c [HAVE_SYS_RANDOM_H]: Include <sys/random.h>.

From-SVN: r263543
2018-08-14 22:51:36 +00:00
Jonathan Wakely
aa7df52e4f PR libstdc++/86954 use non-placement operator delete
As explained in the PR, there's no reason to call the nothrow delete,
we can just use the normal one.

	PR libstdc++/86954
	* include/bits/stl_tempbuf.h (return_temporary_buffer): Use
	non-placement delete.

From-SVN: r263542
2018-08-14 21:19:20 +01:00
Martin Sebor
2b1aedf3ac PR tree-optimization/86650 - -Warray-bounds missing inlining context
gcc/ChangeLog:

	PR tree-optimization/86650
	* tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
	(vrp_prop::check_mem_ref): Same.

gcc/testsuite/ChangeLog:

	PR tree-optimization/86650
	* gcc.dg/Warray-bounds-34.c: New test.

From-SVN: r263541
2018-08-14 13:11:20 -06:00
Janus Weil
0ce0e6e865 re PR fortran/86116 (Ambiguous generic interface not recognised)
2018-08-14  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/86116
	* interface.c (compare_type): Remove a CLASS/TYPE check.
	(compare_type_characteristics): New function that behaves like the old
	'compare_type'.
	(gfc_check_dummy_characteristics, gfc_check_result_characteristics):
	Call 'compare_type_characteristics' instead of 'compare_type'.

2018-08-14  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/86116
	* gfortran.dg/generic_34.f90: New test case.

From-SVN: r263540
2018-08-14 21:09:33 +02:00
Jonathan Wakely
b8b5398cbd Simplify overflow checks in duration literals
* include/std/chrono (__check_overflow): Simplify definition.
	(_Checked_integral_constant): Remove.

From-SVN: r263537
2018-08-14 14:55:21 +01:00
Jonathan Wakely
26e130482e PR libstdc++/86846 Alternative to pointer-width atomics
Define a class using std::mutex for when std::atomic<memory_resource*>
cannot be used to implement the default memory resource.

When std::mutex constructor is not constexpr the constant_init trick
won't work, so just define a global and use init_priority for it. The
compiler warns about using reserved priority, so put the definition in a
header file using #pragma GCC system_header to suppress the warning.

	PR libstdc++/86846
	* src/c++17/default_resource.h: New file, defining default_res.
	* src/c++17/memory_resource.cc [ATOMIC_POINTER_LOCK_FREE != 2]
	(atomic_mem_res): Define alternative for atomic<memory_resource*>
	using a mutex instead of atomics.

From-SVN: r263536
2018-08-14 14:13:37 +01:00
Jonathan Wakely
484e936e88 PR libstdc++/85343 overload __throw_ios_failure to take errno
[ios::failure] p2: "When throwing ios_base::failure exceptions,
implementations should provide values of ec that identify the specific
reason for the failure."

This adds a new overload of __throw_ios_failure that can be passed
errno, to store error_code(errno, system_category()) in the exception
object.

	PR libstdc++/85343
	* acinclude.m4 (libtool_VERSION): Bump version.
	* config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add new symbol version.
	Export new symbol.
	* configure: Regenerate.
	* doc/xml/manual/abi.xml: Document new versions.
	* include/bits/fstream.tcc (basic_filebuf<C, T>::underflow)
	(basic_filebuf<C, T>::xsgetn): Pass errno to __throw_ios_failure.
	* include/bits/functexcept.h (__throw_ios_failure(const char*, int)):
	Declare new overload.
	* src/c++11/cxx11-ios_failure.cc (__ios_failure): Add new constructor
	and static member function.
	(__throw_ios_failure(const char*, int)): Define.
	* src/c++98/ios_failure.cc [!_GLIBCXX_USE_DUAL_ABI]
	(__throw_ios_failure(const char*, int)): Define.
	* testsuite/util/testsuite_abi.cc: Update known and latest versions.

From-SVN: r263535
2018-08-14 13:09:57 +01:00
Jeremy Sawicki
3ffa55de60 Rope iterators: don't retain pointers when copied
Rope iterators sometimes contain pointers to an internal buffer
inside the iterator itself.  When such an iterator is copied, the
copy incorrectly retains pointers to the original.

This patch takes the simple approach of not copying the cached
information when the internal buffer is being used, instead
requiring it to be recomputed when the copied iterator is
dereferenced.  An alternative would be to adjust the pointers so
they refer to the buffer in the copy.

2018-08-14  Jeremy Sawicki  <jeremy-gcc@sawicki.us>

	* include/ext/rope (_Rope_iterator_base(const _Rope_iterator_base&))
	(_Rope_const_iterator::operator=(const _Rope_const_iterator&))
	(_Rope_iterator::operator=(const _Rope_iterator&)): Ensure
	copied/assigned rope iterators don't retain pointers to the iterator
	they were copied/assigned from.
	* testsuite/ext/rope/7.cc: New.

From-SVN: r263534
2018-08-14 12:23:50 +01:00
Liu Hao
5d3083dde2 pretty-print.c (eat_esc_sequence): Swap the foreground and background colors if...
* gcc/pretty-print.c (eat_esc_sequence): Swap the foreground and background
colors if the COMMON_LVB_REVERSE_VIDEO flag is set, and clear it thereafter,
as it only works for DBCS.

From-SVN: r263531
2018-08-14 10:04:10 +00:00
Liu Hao
e99c19aae1 pretty-print.c (mingw_ansi_fputs): Do not call _close() on the handle returned by _get_osf_handle().
* gcc/pretty-print.c (mingw_ansi_fputs): Do not call _close() on the handle
returned by _get_osf_handle().

From-SVN: r263530
2018-08-14 10:02:09 +00:00
GCC Administrator
8e2f414cf4 Daily bump.
From-SVN: r263527
2018-08-14 00:16:39 +00:00
Marek Polacek
ed4f2c001a re PR c++/57891 (No diagnostic of narrowing conversion in non-type template argument)
PR c++/57891
	* call.c (struct conversion): Add check_narrowing_const_only.
	(build_converted_constant_expr): Set check_narrowing and
	check_narrowing_const_only.  Give error if expr is error node.
	(convert_like_real): Pass it to check_narrowing.
	* cp-tree.h (check_narrowing): Add a default parameter.
	* decl.c (compute_array_index_type): Use input_location instead of
	location_of.
	* pt.c (convert_nontype_argument): Return NULL_TREE if tf_error.
	* typeck2.c (check_narrowing): Don't warn for instantiation-dependent
	expressions.  Call maybe_constant_value instead of
	fold_non_dependent_expr.  Don't mention { } in diagnostic.  Only check
	narrowing for constants if CONST_ONLY.

	* g++.dg/cpp0x/Wnarrowing6.C: New test.
	* g++.dg/cpp0x/Wnarrowing7.C: New test.
	* g++.dg/cpp0x/Wnarrowing8.C: New test.
	* g++.dg/cpp0x/Wnarrowing9.C: New test.
	* g++.dg/cpp0x/Wnarrowing10.C: New test.
	* g++.dg/cpp0x/constexpr-47969.C: Adjust dg-error.
	* g++.dg/cpp0x/constexpr-ex2.C: Likewise.
	* g++.dg/cpp0x/constexpr-targ.C: Likewise.
	* g++.dg/cpp0x/scoped_enum2.C: Likewise.
	* g++.dg/ext/stmtexpr15.C: Likewise.
	* g++.dg/gomp/pr47963.C: Likewise.
	* g++.dg/init/new37.C: Likewise.
	* g++.dg/init/new43.C: Likewise.
	* g++.dg/other/fold1.C: Likewise.
	* g++.dg/parse/array-size2.C: Likewise.
	* g++.dg/template/dependent-name3.C: Likewise.
	* g++.dg/cpp0x/constexpr-data2.C: Add dg-error.
	* g++.dg/other/vrp1.C: Likewise.
	* g++.dg/template/char1.C: Likewise.

From-SVN: r263523
2018-08-13 23:12:11 +00:00
Janne Blomqvist
d66d6d15f1 Use getentropy() for seeding PRNG
The getentropy function, found on Linux, OpenBSD, and recently also
FreeBSD, can be used to get random bytes to initialize the PRNG.  It
is similar to the traditional way of reading from /dev/urandom, but
being a system call rather than a special file, it doesn't suffer from
problems like running out of file descriptors, or failure when running
in a container where /dev/urandom may not be available.

Regtested on x86_64-pc-linux-gnu, Ok for trunk?

2018-08-13  Janne Blomqvist  <jb@gcc.gnu.org>

	* configure.ac: Check for getentropy.
	* intrinsics/random.c (getosrandom): Use getentropy if available.
	* config.h.in: Regenerated.
	* configure: Regenerated.

From-SVN: r263522
2018-08-13 23:21:50 +03:00
Segher Boessenkool
72217988ca rs6000: Fix pr56605.c
After the combine 2-2 changes, this testcase does not have a ZERO_EXTEND
in the intermediate code, but an AND instead.


gcc/testsuite/
	* gcc.target/powerpc/pr56605.c: The generated code can have an AND
	instead of a ZERO_EXTEND.

From-SVN: r263521
2018-08-13 21:27:56 +02:00
Will Schmidt
d20d6e550c rs6000.c (rs6000_gimple_fold_builtin): Add support for folding vec_perm.
[gcc]

2018-07-06  Will Schmidt  <will_schmidt@vnet.ibm.com>

	* gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
	for folding vec_perm.

From-SVN: r263520
2018-08-13 19:23:38 +00:00
Will Schmidt
67bfa03ad1 rs6000.c (rs6000_gimple_fold_builtin): Add support for gimple-folding of vec_pack() and vec_unpack() intrinsics.
[gcc]

2018-08-13 Will Schmidt  <will_schmidt@vnet.ibm.com>

	* config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
	Add support for gimple-folding of vec_pack() and vec_unpack()
	intrinsics.

From-SVN: r263519
2018-08-13 19:18:53 +00:00
Jonathan Wakely
ca086dda97 PR libstdc++/45093 avoid warnings for _M_destroy_node
PR libstdc++/45093
	* include/bits/stl_tree.h (_Rb_tree::_M_destroy_node(_Link_type)):
	Combine definitions to avoid --detect-odr-violations warning.

From-SVN: r263516
2018-08-13 19:54:43 +01:00
Jonathan Wakely
2383ed0269 Minor optimisations in operator new(size_t, align_val_t)
* libsupc++/new_opa.cc (operator new(size_t, align_val_t)): Use
	__is_pow2 to check for valid alignment. Avoid branching when rounding
	size to multiple of alignment.

From-SVN: r263515
2018-08-13 19:54:38 +01:00
Jonathan Wakely
7997ede243 Add <bit> and <version> to freestanding headers
* include/Makefile.am: Install <bit> and <version> for freestanding.
	* include/Makefile.in: Regenerate.
	* testsuite/17_intro/freestanding.cc: Check for <bit> and <version>.

From-SVN: r263514
2018-08-13 19:54:34 +01:00
Jonathan Wakely
9db03bee15 Revert "libstdc++-v3: Have aligned_alloc() on Newlib"
This reverts commit r263461 / 2e920cd849b3cf0a72df4f172e27676a3e70b73f
because aligned_alloc is not defined for baremetal newlib targets, see
https://gcc.gnu.org/ml/libstdc++/2018-08/msg00065.html

Revert
2018-08-10  Sebastian Huber  <sebastian.huber@embedded-brains.de>

	PR target/85904
	* configure.ac: Define HAVE_ALIGNED_ALLOC if building for
	Newlib.
	* configure: Regenerate.

From-SVN: r263513
2018-08-13 19:54:21 +01:00
Will Schmidt
3f7a77cd20 rs6000.c (rs6000_builtin_valid_without_lhs): Add vec_xst variants to the list.
[gcc]

2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>

	* config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
	vec_xst variants to the list.
	(rs6000_gimple_fold_builtin): Add support for folding unaligned
	vector loads and stores.

From-SVN: r263512
2018-08-13 18:13:20 +00:00
Martin Sebor
23aa9f7c46 PR tree-optimization/71625 - missing strlen optimization on different array initialization style
gcc/c/ChangeLog:

	PR tree-optimization/71625
	* c-parser.c (c_parser_declaration_or_fndef): Call
	braced_list_to_string.

gcc/c-family/ChangeLog:

	PR tree-optimization/71625
	* c-common.c (braced_list_to_string): New function.
	* c-common.h (braced_list_to_string): Declare it.

gcc/cp/ChangeLog:

	PR tree-optimization/71625
	* decl.c (check_initializer):  Call braced_list_to_string.
	(eval_check_narrowing): New function.
	* gcc/cp/typeck2.c (digest_init_r): Accept strings literals
	as initilizers for all narrow character types.

gcc/testsuite/ChangeLog:

	PR tree-optimization/71625

	* g++.dg/init/string2.C: New test.
	* g++.dg/init/string3.C: New test.
	* g++.dg/init/string4.C: New test.
	* gcc.dg/init-string-3.c: New test.
	* gcc.dg/strlenopt-55.c: New test.
	* gcc.dg/strlenopt-56.c: New test.

From-SVN: r263511
2018-08-13 11:57:51 -06:00
Marek Polacek
e6a1e5fe73 P0806R2 - Deprecate implicit capture of this via [=]
P0806R2 - Deprecate implicit capture of this via [=]
	* lambda.c (add_default_capture): Formatting fixes.  Warn about
	deprecated implicit capture of this via [=].

	* g++.dg/cpp2a/lambda-this1.C: New test.
	* g++.dg/cpp2a/lambda-this2.C: New test.
	* g++.dg/cpp2a/lambda-this3.C: New test.

From-SVN: r263508
2018-08-13 15:46:42 +00:00
Marek Polacek
27a98312c5 re PR c++/86915 (Segmentation fault for an array of auto in template parameter)
PR c++/86915
	* decl.c (create_array_type_for_decl): Handle null name.

	* g++.dg/diagnostic/auto1.C: New test.

From-SVN: r263507
2018-08-13 15:36:30 +00:00
David Edelsohn
116c7f320e config.gcc (rs6000-ibm-aix4.x): Delete.
* config.gcc (rs6000-ibm-aix4.x): Delete.
        (rs6000-ibm-aix5.1): Delete.
        (rs6000-ibm-aix5.2): Delete.
        (rs6000-ibm-aix5.3): Delete.
        * config/rs6000/aix43.h: Delete.
        * config/rs6000/aix51.h: Delete.
        * config/rs6000/aix52.h: Delete.
        * config/rs6000/t-aix43: Delete.

From-SVN: r263506
2018-08-13 09:37:19 -04:00
Cesar Philippidis
bd9b3d3d1a [nvptx] Use CUDA driver API to select default runtime launch geometry
The CUDA driver API starting version 6.5 offers a set of runtime functions to
calculate several occupancy-related measures, as a replacement for the occupancy
calculator spreadsheet.

This patch adds a heuristic for default runtime launch geometry, based on the
new runtime function cuOccupancyMaxPotentialBlockSize.

Build on x86_64 with nvptx accelerator and ran libgomp testsuite.

2018-08-13  Cesar Philippidis  <cesar@codesourcery.com>
	    Tom de Vries  <tdevries@suse.de>

	PR target/85590
	* plugin/cuda/cuda.h (CUoccupancyB2DSize): New typedef.
	(cuOccupancyMaxPotentialBlockSize): Declare.
	* plugin/cuda-lib.def (cuOccupancyMaxPotentialBlockSize): New
	CUDA_ONE_CALL_MAYBE_NULL.
	* plugin/plugin-nvptx.c (CUDA_VERSION < 6050): Define
	CUoccupancyB2DSize and declare
	cuOccupancyMaxPotentialBlockSize.
	(nvptx_exec): Use cuOccupancyMaxPotentialBlockSize to set the
	default num_gangs and num_workers when the driver supports it.

Co-Authored-By: Tom de Vries <tdevries@suse.de>

From-SVN: r263505
2018-08-13 12:04:24 +00:00
Ilya Leoshkevich
cdf899781c S/390: Factor out constant pool ref decomposition
gcc/ChangeLog:

2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>

	* config/s390/s390.c (s390_decompose_constant_pool_ref):
        New function.
	(s390_decompose_address): Factor out constant pool ref
        decomposition.

From-SVN: r263504
2018-08-13 11:33:38 +00:00
GCC Administrator
5a3b69f94b Daily bump.
From-SVN: r263503
2018-08-13 00:16:33 +00:00
Paul Thomas
9a8013d112 re PR fortran/66679 ([OOP] ICE with class(*) and transfer)
2018-08-12  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/66679
	* trans-intrinsic.c (gfc_conv_intrinsic_transfer): Class array
	elements are returned as references to the data element. Get
	the class expression by stripping back the references. Use this
	for the element size.

2018-08-12  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/66679
	* gfortran.dg/transfer_class_3.f90: New test.

From-SVN: r263499
2018-08-12 17:19:09 +00:00
Chung-Ju Wu
5b774d92b0 [NDS32] Change return type of predicator to bool.
gcc/
	* config/nds32/nds32-predicates.c
	(nds32_can_use_bclr_p): Change return type as bool.
	(nds32_can_use_bset_p): Ditto.
	(nds32_can_use_btgl_p): Ditto.
	(nds32_can_use_bitci_p): Ditto.
	* config/nds32/nds32-protos.h
	(nds32_can_use_bclr_p): Change declaration.
	(nds32_can_use_bset_p): Ditto.
	(nds32_can_use_btgl_p): Ditto.
	(nds32_can_use_bitci_p): Ditto.

From-SVN: r263497
2018-08-12 15:21:02 +00:00
Chung-Ju Wu
d057a470d3 [NDS32] Add new option: -msched-prolog-epilog
gcc/
	* config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
	Support -msched-prolog-epilog option.
	* config/nds32/nds32.opt (msched-prolog-epilog): New option.

From-SVN: r263496
2018-08-12 13:41:22 +00:00
Chung-Ju Wu
68acadb1ff [NDS32] Enable -malways-align by default at -O1 and above.
gcc/
	* common/config/nds32/nds32-common.c
	(nds32_option_optimization_table): Enalbe -malways-align.

From-SVN: r263495
2018-08-12 13:26:05 +00:00
Paul Thomas
8532a010b6 re PR fortran/86906 (erroneous name clash with renaming in use statement)
2018-08-12  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/86906
	* resolve.c (resolve_fl_variable_derived): Check if the derived
	type is use associated before checking for the host association
	error.

2018-08-12  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/86906
	* gfortran.dg/use_rename_9.f90: New test.

From-SVN: r263494
2018-08-12 10:55:13 +00:00
Chung-Ju Wu
a493174524 [NDS32] Implement more C ISR extension.
gcc/
	* config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
	extra_headers.
	* common/config/nds32/nds32-common.c (nds32_handle_option): Handle
	OPT_misr_secure_ case.
	* config/nds32/nds32-isr.c: Implementation of backward compatibility.
	* config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
	* config/nds32/nds32.c (nds32_attribute_table): Add critical and
	secure attribute.
	* config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
	(nds32_isr_info): New field security_level.
	(TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
	* config/nds32/nds32.md (return_internal): Consider critical attribute.
	* config/nds32/nds32.opt (misr-secure): New option.
	* config/nds32/nds32_init.inc: New file.
	* config/nds32/nds32_isr.h: New file.

libgcc/
	* config/nds32/t-nds32-isr: Rearrange object dependency.
	* config/nds32/initfini.c: Add dwarf2 unwinding support.
	* config/nds32/isr-library/adj_intr_lvl.inc: Consider new extensions
	and registers usage.
	* config/nds32/isr-library/excp_isr.S: Ditto.
	* config/nds32/isr-library/intr_isr.S: Ditto.
	* config/nds32/isr-library/reset.S: Ditto.
	* config/nds32/isr-library/restore_all.inc: Ditto.
	* config/nds32/isr-library/restore_mac_regs.inc: Ditto.
	* config/nds32/isr-library/restore_partial.inc: Ditto.
	* config/nds32/isr-library/restore_usr_regs.inc: Ditto.
	* config/nds32/isr-library/save_all.inc: Ditto.
	* config/nds32/isr-library/save_mac_regs.inc: Ditto.
	* config/nds32/isr-library/save_partial.inc: Ditto.
	* config/nds32/isr-library/save_usr_regs.inc: Ditto.
	* config/nds32/isr-library/vec_vid*.S: Consider 4-byte vector size.

From-SVN: r263493
2018-08-12 07:38:40 +00:00
GCC Administrator
39d2c7ed9f Daily bump.
From-SVN: r263492
2018-08-12 00:16:29 +00:00
John David Anglin
2b1969f635 pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
gcc
	* config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
	Update comment for atomic instructions.
	(atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
	atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
	Remove.
	(atomic_loaddi): Revise fence expansion to only emit fence prior to
	load for __ATOMIC_SEQ_CST model.
	(atomic_loaddi_1): Remove float register target.
	(atomic_storedi): Handle CONST_INT values.
	(atomic_storedi_1): Remove float register source.  Add special case
	for zero value.
	(memory_barrier): New expander and insn.

	libgcc
	* config/pa/linux-atomic.c: Update comment.
	(FETCH_AND_OP_2, OP_AND_FETCH_2, FETCH_AND_OP_WORD, OP_AND_FETCH_WORD,
	COMPARE_AND_SWAP_2, __sync_val_compare_and_swap_4,
	SYNC_LOCK_TEST_AND_SET_2, __sync_lock_test_and_set_4): Use
	__ATOMIC_RELAXED for atomic loads.
	(SYNC_LOCK_RELEASE_1): New define.  Use __sync_synchronize() and
	unordered store to release lock.
	(__sync_lock_release_8): Likewise.
	(SYNC_LOCK_RELEASE_2): Remove define.

From-SVN: r263488
2018-08-11 21:37:55 +00:00
Jakub Jelinek
8be591a9cd re PR tree-optimization/86835 (Bogus "is used uninitialized" warning with -ffast-math)
PR tree-optimization/86835
	* tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
	new_stmt after def_gsi, make sure to insert new_square_stmt after
	that stmt, not 2 stmts before it.

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

From-SVN: r263487
2018-08-11 13:29:12 +02:00
Jason Merrill
fc186cbd1c PR c++/86728 - C variadic generic lambda.
* parser.c (cp_parser_parameter_declaration): Don't turn 'auto' into
	a pack if it's followed by a declarator-id.

From-SVN: r263484
2018-08-11 06:47:03 -04:00
GCC Administrator
1d03ff3ff1 Daily bump.
From-SVN: r263483
2018-08-11 00:16:30 +00:00
Jonathan Wakely
b66e5a95c0 PR libstdc++/68210 adjust operator new and delete for LWG 206
Ensure that nothrow versions of new and delete call the ordinary
versions of new or delete, instead of calling malloc or free directly.

These files are all compiled with -std=gnu++14 so can use noexcept and
nullptr to make the code more readable.

	PR libstdc++/68210
	* doc/xml/manual/intro.xml: Document LWG 206 change.
	* libsupc++/del_op.cc: Replace _GLIBCXX_USE_NOEXCEPT with noexcept.
	* libsupc++/del_opa.cc: Likewise.
	* libsupc++/del_opant.cc: Likewise.
	* libsupc++/del_opnt.cc: Likewise. Call operator delete(ptr) instead
	of free(ptr).
	* libsupc++/del_ops.cc: Replace _GLIBCXX_USE_NOEXCEPT with noexcept.
	* libsupc++/del_opsa.cc: Likewise.
	* libsupc++/del_opva.cc: Likewise.
	* libsupc++/del_opvant.cc: Likewise.
	* libsupc++/del_opvnt.cc: Likewise. Call operator delete[](ptr)
	instead of operator delete(ptr).
	* libsupc++/del_opvs.cc: Replace _GLIBCXX_USE_NOEXCEPT with noexcept.
	* libsupc++/del_opvsa.cc: Likewise.
	* libsupc++/new_op.cc: Use __builtin_expect in check for zero size.
	* libsupc++/new_opa.cc: Use nullptr instead of literal 0.
	* libsupc++/new_opant.cc: Likewise. Replace _GLIBCXX_USE_NOEXCEPT
	with noexcept.
	* libsupc++/new_opnt.cc: Likewise. Call operator new(sz) instead of
	malloc(sz).
	* libsupc++/new_opvant.cc: Use nullptr and noexcept.
	* libsupc++/new_opvnt.cc: Likewise. Call operator new[](sz) instead of
	operator new(sz, nothrow).
	* testsuite/18_support/new_nothrow.cc: New test.

From-SVN: r263478
2018-08-10 21:20:27 +01:00
Jonathan Wakely
6894c57b1e Fix formatting in ChangeLog
From-SVN: r263476
2018-08-10 20:04:01 +01:00