Commit Graph

153416 Commits

Author SHA1 Message Date
Eric Botcazou
613ef8fec7 utils.c (unchecked_convert): When the result type is a non-biased integral type with size 0...
* gcc-interface/utils.c (unchecked_convert): When the result type is a
	non-biased integral type with size 0, set the result to 0 directly.

From-SVN: r251702
2017-09-05 09:15:50 +00:00
Eric Botcazou
437fe63c6d trans.c (Call_to_gnu): If this is a function call and there is no target...
* gcc-interface/trans.c (Call_to_gnu): If this is a function call and
	there is no target, do not create a temporary for the return value for
	an allocator either.

From-SVN: r251696
2017-09-05 08:29:05 +00:00
Eric Botcazou
d349b8ea75 trans.c (pos_to_constructor): Skip conversions to an unconstrained array type.
* gcc-interface/trans.c (pos_to_constructor): Skip conversions to an
	unconstrained array type.

From-SVN: r251693
2017-09-05 08:17:56 +00:00
GCC Administrator
f2ab7f7250 Daily bump.
From-SVN: r251688
2017-09-05 00:16:12 +00:00
Uros Bizjak
99f4d23fd0 mpx-os-support.h: New file.
* gcc.target/i386/mpx/mpx-os-support.h: New file.
	* gcc.target/i386/mpx/mpx-check.h: Include mpx-os-support.h.
	(check_osxsave): New function.
	(main): Use __get_cpuid_count and return NORUNRES on failure.
	Use check_osxsave.
	* gcc.target/i386/mpx/va-arg-pack-1-lbv.c (foo1): Use
	__builtin_va_arg_pack instead of __va_arg_pack.
	* gcc.target/i386/mpx/va-arg-pack-1-nov.c (foo1): Ditto.
	* gcc.target/i386/mpx/va-arg-pack-1-ubv.c (foo1): Ditto.
	* gcc.target/i386/mpx/va-arg-pack-2-lbv.c (foo1): Ditto.
	* gcc.target/i386/mpx/va-arg-pack-2-nov.c (foo1): Ditto.
	* gcc.target/i386/mpx/va-arg-pack-2-ubv.c (foo1): Ditto.

From-SVN: r251684
2017-09-04 20:43:44 +02:00
Jonathan Wakely
c3c6d737b6 PR c++/82039 suppress -Wzero-as-null-pointer-constant warning
Backport from mainline
2017-08-31  Jonathan Wakely  <jwakely@redhat.com>

	PR c++/82039
	* include/ext/new_allocator.h (__gnu_cxx::new_allocator::allocate):
	Adjust null pointer constant to avoid warning.

From-SVN: r251658
2017-09-04 13:24:57 +01:00
Jonathan Wakely
b121ffed0a PR libstdc++/81912 make std::__iterator_category constexpr
Backport from mainline
2017-08-21  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/81912
	* include/bits/stl_iterator_base_types.h (__iterator_category): Add
	constexpr for C++11 and later.
	* testsuite/24_iterators/container_access.cc: Add target selector.
	* testsuite/24_iterators/range_access.cc: Fix clause number in
	comment.
	* testsuite/24_iterators/range_access_cpp14.cc: Likewise.
	* testsuite/24_iterators/range_access_cpp17.cc: New.

From-SVN: r251657
2017-09-04 13:24:53 +01:00
Jonathan Wakely
6e85190f97 Fix test for __has_unique_object_representations support in Clang
Backport from mainline
2017-08-09  Jonathan Wakely  <jwakely@redhat.com>

	* include/std/type_traits (_GLIBCXX_NO_BUILTIN_HAS_UNIQ_OBJ_REP):
	Replace with _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP and use
	__is_identifier to set it.

From-SVN: r251656
2017-09-04 13:24:49 +01:00
Jonathan Wakely
ec5016c395 Fix test for __is_aggregate support in Clang
Backport from mainline
2017-08-09  Katsuhiko Nishimra  <ktns.87@gmail.com>

	* include/std/type_traits (_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE): Use
	__is_identifier instead of __has_builtin.

From-SVN: r251655
2017-09-04 13:24:45 +01:00
Jonathan Wakely
c825961aa1 PR libstdc++/81891 fix double-free in hashtable constructor
Backport from mainline
2017-08-18  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/81891
	* include/bits/hashtable.h (_Hashtable(_InputIterator, _InputIterator,
	size_type, const _H1&, const _H2&, const _Hash&, const _Equal&,
	const _ExtractKey&, const allocator_type&)): Let destructor do clean
	up if an exception is thrown.
	* testsuite/23_containers/unordered_map/cons/81891.cc: New.

From-SVN: r251654
2017-09-04 13:24:42 +01:00
Jonathan Wakely
9584ad529f PR libstdc++/81599 fix typo in Doxygen comments
Backport from mainline
2017-07-31  Marek Polacek  <polacek@redhat.com>

	PR libstdc++/81599
	* include/bits/stl_stack.h: Fix typo.

From-SVN: r251653
2017-09-04 13:24:37 +01:00
Jonathan Wakely
16c067fa4a PR libstdc++/81338 correctly manage string capacity
Backport from mainline
2017-07-10  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/81338
	* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI] (basic_string):
	Declare basic_stringbuf to be a friend.
	* include/bits/sstream.tcc (basic_stringbuf::overflow)
	[_GLIBCXX_USE_CXX11_ABI]: Use unused capacity before reallocating.
	* include/std/sstream (basic_stringbuf::__xfer_bufptrs): Update string
	length to buffer length.
	* testsuite/27_io/basic_stringstream/assign/81338.cc: New.

From-SVN: r251652
2017-09-04 13:24:33 +01:00
GCC Administrator
075e2a50ff Daily bump.
From-SVN: r251632
2017-09-04 00:16:20 +00:00
GCC Administrator
5e4f96c5f5 Daily bump.
From-SVN: r251623
2017-09-03 00:16:18 +00:00
Janus Weil
ef28b00460 backport: re PR fortran/81770 (Bogus warning: Pointer in pointer assignment might outlive the pointer target)
2017-09-02  Janus Weil  <janus@gcc.gnu.org>

	Backport from trunk
	PR fortran/81770
	* expr.c (gfc_check_pointer_assign): Improve the check whether pointer
	may outlive pointer target.


2017-09-02  Janus Weil  <janus@gcc.gnu.org>

	Backport from trunk
	PR fortran/81770
	* gfortran.dg/warn_target_lifetime_3.f90: Fix a typo.
	* gfortran.dg/warn_target_lifetime_4.f90: New testcase.

From-SVN: r251618
2017-09-02 21:04:08 +02:00
GCC Administrator
cfe5b1dbea Daily bump.
From-SVN: r251616
2017-09-02 00:16:14 +00:00
Marek Polacek
71a835084a re PR c++/82040 (ICE with -Wbool-operation and ~)
PR c++/82040
	* typeck.c (cp_build_unary_op): Avoid re-entering reporting routines.

	* g++.dg/warn/Wbool-operation-1.C: New test.

From-SVN: r251582
2017-09-01 09:24:54 +00:00
GCC Administrator
2525ae2ebd Daily bump.
From-SVN: r251579
2017-09-01 00:16:12 +00:00
Bill Schmidt
38babcc9c2 backport: re PR target/81504 (gcc-7 regression: vec_st in loop misoptimized)
2017-08-31  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

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

	PR target/81504
	* config/rs6000/rs6000.c (find_alignment_op): Add reference
	parameter and_insn and return it.
	(recombine_lvx_pattern): Insert a copy to ensure availability of
	the base register of the copied masking operation at the point of
	the instruction replacement.
	(recombine_stvx_pattern): Likewise.

From-SVN: r251575
2017-08-31 20:28:17 +00:00
GCC Administrator
967320300d Daily bump.
From-SVN: r251552
2017-08-31 00:16:16 +00:00
Michael Meissner
b0aa433921 backport: re PR target/81593 (Optimize PowerPC vector set from vector extract)
2017-08-29  Michael Meissner  <meissner@linux.vnet.ibm.com>

	Back port from trunk
	2017-08-07  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/81593
	* gcc.target/powerpc/vsx-extract-6.c: New tests for optimzing
	vector inserts from vector extracts.
	* gcc.target/powerpc/vsx-extract-7.c: Likewise.

From-SVN: r251446
2017-08-30 01:14:05 +00:00
Michael Meissner
5eebe567c3 backport: re PR target/81593 (Optimize PowerPC vector set from vector extract)
[gcc]
2017-08-29  Michael Meissner  <meissner@linux.vnet.ibm.com>

	Back port from trunk
	2017-08-07  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/81593
	* config/rs6000/vsx.md (vsx_concat_<mode>_1): New combiner insns
	to recognize inserting into a vector from a double word element
	that was extracted from another vector, and eliminate extra
	XXPERMDI instructions.
	(vsx_concat_<mode>_2): Likewise.
	(vsx_concat_<mode>_3): Likewise.
	(vsx_set_<mode>, VSX_D): Rewrite vector set in terms of vector
	concat to allow optimizing inserts from previous extracts.

[gcc/testsuite]
2017-08-29  Michael Meissner  <meissner@linux.vnet.ibm.com>

	Back port from trunk
	2017-08-07  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/81593
	* gcc.target/powerpc/vec-setup.h: New tests to test various
	combinations of setting up vectors of 2 double word elements.
	* gcc.target/powerpc/vec-setup-long.c: Likewise.
	* gcc.target/powerpc/vec-setup-double.c: Likewise.
	* gcc.target/powerpc/vec-setup-be-long.c: Likewise.
	* gcc.target/powerpc/vec-setup-be-double.c: Likewise.

From-SVN: r251445
2017-08-30 01:12:21 +00:00
GCC Administrator
c2a251cd90 Daily bump.
From-SVN: r251443
2017-08-30 00:16:14 +00:00
Alan Modra
f3235b72ec [RS6000] linux startfile/endfile
These need to match the gnu-user.h definitions to support
--enable-default-pie.  Otherwise we end up linking the wrong startup
files when defaulting to PIE.

	PR target/81170
	PR target/81295
	* config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to
	match gnu-user.h startfile.
	(ENDFILE_LINUX_SPEC): Similarly.

From-SVN: r251403
2017-08-29 17:53:44 +09:30
Alan Modra
82cd399fbe PR driver/81523: Make -static override -pie
-static and -pie together behave differently depending on whether GCC is
configured with --enable-default-pie.  On x86, "-static -pie" fails to
create executable when --enable-default-pie isn't used, but creates a
static executable when --enable-default-pie is used.  This patch makes
-static completely override -pie to create a static executable, regardless
if --enable-default-pie is used to configure GCC.

	PR target/81170
	PR target/81295
	PR driver/81523
	* gcc.c (NO_PIE_SPEC): Delete.
	(PIE_SPEC): Define as !no-pie/pie.  Move static|shared|r
	exclusion..
	(LINK_PIE_SPEC): ..to here.
	(LINK_COMMAND_SPEC): Support -no-pie.
	* config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Correct
	chain of crtbegin*.o selection, update for PIE_SPEC changes and
	format.
	(GNU_USER_TARGET_ENDFILE_SPEC): Similarly.
	* config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Similarly.
	(ENDFILE_CRTEND_SPEC): Similarly.

From-SVN: r251402
2017-08-29 17:52:44 +09:30
Richard Biener
897c0169ea backport: re PR tree-optimization/81977 (Issue with inline memcpy with optimizations enabled)
2017-08-29  Richard Biener  <rguenther@suse.de>

	Backport from mainline
	2017-08-28  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/81977
	* tree-ssa-sccvn.c (vn_reference_lookup_3): Fix look through
	memcpy.

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

	2017-08-28  Richard Biener  <rguenther@suse.de>

	PR debug/81993
	* dwarf2out.c (gen_remaining_tmpl_value_param_die_attributes):
	Do nothing for removed DIEs.

From-SVN: r251399
2017-08-29 07:06:46 +00:00
GCC Administrator
cf496a34a3 Daily bump.
From-SVN: r251394
2017-08-29 00:16:35 +00:00
Richard Biener
8dc7f6cba5 backport: [multiple changes]
2017-08-28  Richard Biener  <rguenther@suse.de>

	Backport from mainline
	2017-06-14  Richard Biener  <rguenther@suse.de>

	PR middle-end/81088
	* fold-const.c (split_tree): Drop TREE_OVERFLOW flag from
	literal constants.
	(fold_binary_loc): When associating do not treat pre-existing
	TREE_OVERFLOW on literal constants as a reason to allow
	TREE_OVERFLOW on associated literal constants.

	* c-c++-common/ubsan/pr81088.c: New testcase.

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

	PR middle-end/81065
	* fold-const.c (extract_muldiv_1): Remove bogus distribution
	case of C * (x * C2 + C3).
	(fold_addr_of_array_ref_difference): Properly fold index difference.

	* c-c++-common/ubsan/pr81065.c: New testcase.

	2017-06-08  Marek Polacek  <polacek@redhat.com>

	PR sanitize/80932
	* c-c++-common/ubsan/pr80932.c: Test with ints, not with long ints.

	2017-06-07  Marek Polacek  <polacek@redhat.com>

	PR sanitizer/80932
	* fold-const.c (extract_muldiv_1) <case MINUS_EXPR>: Add
	TYPE_OVERFLOW_WRAPS check. 

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

From-SVN: r251381
2017-08-28 12:49:55 +00:00
Richard Biener
9563a3d30a backport: [multiple changes]
2017-08-28  Richard Biener  <rguenther@suse.de>

	Backport from mainline
	2017-08-21  Richard Biener  <rguenther@suse.de>

	PR middle-end/81884
	* tree-ssa-alias.c (stmt_kills_ref_p): Handle array accesses
	at struct end conservatively when comparing common bases.

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

	2017-05-04  Richard Biener  <rguenther@suse.de>
 
	* tree.c (array_at_struct_end_p): Handle arrays at struct
	end with flexarrays more conservatively.  Refactor and treat
	arrays of arrays or aggregates more strict.  Fix
	VIEW_CONVERT_EXPR handling.  Remove allow_compref argument.
	* tree.h (array_at_struct_end_p): Adjust prototype.
	* gimple-fold.c (get_range_strlen): Likewise.
	* tree-chkp.c (chkp_may_narrow_to_field): Likewise.

From-SVN: r251379
2017-08-28 12:16:06 +00:00
Richard Biener
2377f9833d backport: [multiple changes]
2017-08-28  Richard Biener  <rguenther@suse.de>

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

	PR tree-optimization/81181
	* tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
	(compute_antic): ... end of iteration here.

	* gcc.dg/torture/pr81181.c: New testcase.

	2017-08-08  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/81723
	* tree-vect-slp.c (struct bst_traits): New hash traits.
	(bst_fail): New global.
	(vect_build_slp_tree_2): New worker, split out from ...
	(vect_build_slp_tree): ... this now wrapping it with using
	bst_fail set to cache SLP tree build fails.  Properly handle
	max_tree_size.
	(vect_analyze_slp_instance): Allocate and free bst_fail.

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

	2017-08-24  Richard Biener  <rguenther@suse.de>

	PR target/81921
	* config/i386/i386.c: Include symbol-summary.h, ipa-prop.h
	and ipa-inline.h.
	(ix86_can_inline_p): When ix86_fpmath flags do not match
	check whether the callee uses FP math at all.

	* gcc/testsuite/gcc.target/i386/pr81921.c: New testcase.

From-SVN: r251376
2017-08-28 10:19:17 +00:00
GCC Administrator
bf5f5dd0f1 Daily bump.
From-SVN: r251372
2017-08-28 00:16:24 +00:00
GCC Administrator
451123e448 Daily bump.
From-SVN: r251366
2017-08-27 00:16:37 +00:00
GCC Administrator
621482e770 Daily bump.
From-SVN: r251361
2017-08-26 00:16:42 +00:00
Marek Polacek
9bdbbf52ac re PR c++/81607 (Conditional operator: "type mismatch in shift expression" error)
PR c++/81607
	* cp-gimplify.c (cp_fold): If folding exposed a branch of
	a COND_EXPR, convert it to the original type of the COND_EXPR, if
	they differ.

From-SVN: r251358
2017-08-25 16:31:50 +00:00
GCC Administrator
55f4f24476 Daily bump.
From-SVN: r251345
2017-08-25 00:16:29 +00:00
Uros Bizjak
9c1c75946f backport: target-supports.exp (check_avx2_hw_available): Fix breakage due NULL being undefined.
Backport from mainline
	2017-08-23  Daniel Santos  <daniel.santos@pobox.com>

	* lib/target-supports.exp (check_avx2_hw_available):
	Fix breakage due NULL being undefined.

From-SVN: r251336
2017-08-24 16:30:51 +02:00
GCC Administrator
6de5fdb3d8 Daily bump.
From-SVN: r251324
2017-08-24 00:16:23 +00:00
Peter Bergner
cd53429f1d backport: re PR target/72804 (Poor code gen with -mvsx-timode)
gcc/
	Backport from mainline
	2017-08-17  Peter Bergner  <bergner@vnet.ibm.com>

	PR target/72804
	* config/rs6000/vsx.md (*vsx_le_permute_<mode>): Add support for
	operands residing in integer registers.
	(*vsx_le_perm_load_<mode>): Likewise.
	(*vsx_le_perm_store_<mode>): Likewise.
	(define_peephole2): Add peepholes to optimize the above.

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

	PR target/72804
	* gcc.target/powerpc/pr72804.c: New test.

From-SVN: r251318
2017-08-23 15:03:46 -05:00
Jerry DeLisle
d684a9bb4b backport: re PR fortran/81296 (derived type I/o problem)
2017-08-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	Backport from trunk
	PR fortran/81296
	* trans-io.c (get_dtio_proc): Add check for format label and set
	formatted flag accordingly. Reorganize the code a little.

	* gfortran.dg/dtio_12.f90: Update test.

From-SVN: r251301
2017-08-23 00:41:10 +00:00
GCC Administrator
f4abc808dc Daily bump.
From-SVN: r251299
2017-08-23 00:16:18 +00:00
Peter Bergner
8bd5889eaa backport: re PR target/80210 (ICE in in extract_insn, at recog.c:2311 on ppc64 for with __builtin_pow)
gcc/
	Backport from mainline
	2017-08-17  Peter Bergner  <bergner@vnet.ibm.com>

	PR target/80210
	* config/rs6000/rs6000.c (rs6000_activate_target_options): New function.
	(rs6000_set_current_function): Rewrite function to use it.

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

	PR target/80210
	* gcc.target/powerpc/pr80210.c: New test.

From-SVN: r251293
2017-08-22 15:13:11 -05:00
Sebastian Huber
70f0aa4d6d [PowerPC/RTEMS] Enable -mcmodel option
gcc/
	* config.gcc (powerpc-*-rtems*): Add rs6000/linux64.opt.
	* config/rs6000/rtems.h (ASM_PREFERRED_EH_DATA_FORMAT): New define.
	(DOT_SYMBOLS): Likewise.
	(MINIMAL_TOC_SECTION_ASM_OP): Likewise.
	(RELOCATABLE_NEEDS_FIXUP): Likewise.
	(RS6000_ABI_NAME): Likewise.
	(TARGET_CMODEL): Likewise.
	(TOC_SECTION_ASM_OP): Likewise.
	(SET_CMODEL): New macro.
	(SUBSUBTARGET_OVERRIDE_OPTIONS): Evaluate cmodel options.

From-SVN: r251277
2017-08-22 13:59:37 +00:00
Yvan Roux
ae34027b9a backport: re PR c++/80287 (C++ crash with __attribute((may_alias)))
2017-08-22  Yvan Roux  <yvan.roux@linaro.org>

	Backport from mainline
	2017-08-22  Yvan Roux  <yvan.roux@linaro.org>

        PR c++/80287
        * g++.dg/pr80287.C: New test.

From-SVN: r251273
2017-08-22 10:51:52 +00:00
Georg-Johann Lay
4525932d39 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.

From-SVN: r251257
2017-08-22 07:55:34 +00:00
Sebastian Huber
170edbf6e6 [RISC-V/RTEMS] Add missing file
Forgot "svn add".

From-SVN: r251255
2017-08-22 06:16:51 +00:00
GCC Administrator
8ff869f714 Daily bump.
From-SVN: r251252
2017-08-22 00:16:25 +00:00
Joseph Myers
0f813c9bd7 * de.po: Update.
From-SVN: r251229
2017-08-21 15:08:42 +01:00
Georg-Johann Lay
5d6744e9e4 re PR target/79883 (avr i18n: untranslated "interrupt" or "signal")
PR target/79883
	* config/avr/avr.c (avr_set_current_function): Typo in diagnostic.

From-SVN: r251224
2017-08-21 12:42:47 +00:00
GCC Administrator
707bcd1b4f Daily bump.
From-SVN: r251214
2017-08-21 00:16:50 +00:00
John David Anglin
2f9e7a343f re PR testsuite/81056 (FAIL: 17_intro/names.cc (test for excess errors))
PR testsuite/81056
	* testsuite/17_intro/names.cc: Undef 'd' and 'r' on __hpux__.

From-SVN: r251209
2017-08-20 19:00:59 +00:00