160708 Commits

Author SHA1 Message Date
Chung-Ju Wu
30feb954d0 [NDS32] Change enabled attribute to yes/no instead of 1/0.
gcc/
	* config/nds32/nds32.md (enabled): Use yes/no for this attribute.

From-SVN: r259066
2018-04-04 01:35:01 +00:00
Chung-Ju Wu
cc48a87f9d [NDS32] Refine implementation of sibcall patterns.
gcc/
	* config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
	* config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
	* config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
	(TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
	* config/nds32/nds32.md (sibcall_internal): New.
	(sibcall_register): Remove.
	(sibcall_immediate): Remove.
	(sibcall_value_internal): New.
	(sibcall_value_register): Remove.
	(sibcall_value_immediate): Remove.
	* config/nds32/predicates.md (nds32_general_register_operand): New.
	(nds32_call_address_operand): New.

Co-Authored-By: Kito Cheng <kito.cheng@gmail.com>

From-SVN: r259065
2018-04-04 00:56:16 +00:00
GCC Administrator
a1b81a0320 Daily bump.
From-SVN: r259064
2018-04-04 00:16:19 +00:00
Jonathan Wakely
c73847e77b PR libstdc++/85183 fix std::variant move-assignment
PR libstdc++/85183
	* include/std/variant (_Move_assign_base::operator=): Fix incorrect
	value categories.
	* testsuite/20_util/variant/85183.cc: New.

From-SVN: r259059
2018-04-04 00:03:07 +01:00
Jakub Jelinek
b6a7a294ce re PR rtl-optimization/85167 (shrink-wrap.c:333:15: runtime error with UBSAN)
PR rtl-optimization/85167
	* shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
	bb_defs if *split_p, instead preinitialize it to NULL.

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

From-SVN: r259058
2018-04-03 23:45:52 +02:00
Jakub Jelinek
0d2f7959f7 re PR tree-optimization/85156 (ICE with -O1 -g: gimplification failed)
PR tree-optimization/85156
	* builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
	evaluating the argument multiple times.

	* c-c++-common/pr85156.c: New test.
	* gcc.c-torture/execute/pr85156.c: New test.

From-SVN: r259057
2018-04-03 23:42:51 +02:00
Jason Merrill
8d0d49f8b4 PR c++/85092 - C++17 ICE with unused list constructor.
* call.c (conv_binds_ref_to_prvalue): Also count ck_identity
	from a TARGET_EXPR.

From-SVN: r259052
2018-04-03 15:13:42 -04:00
Jason Merrill
fe736ffd2f PR c++/85113 - ICE with constexpr and __builtin_constant_p.
* constexpr.c (cxx_eval_builtin_function_call): Only defer
	__builtin_constant_p if ctx->quiet.

From-SVN: r259051
2018-04-03 15:13:36 -04:00
Bill Schmidt
8ab30b9778 emmintrin.h (_mm_cvtpd_epi32): Use __vector rather than vector.
[gcc]

2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>

	* config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
	than vector.
	(_mm_cvtpd_ps): Likewise.
	(_mm_cvttpd_epi32): Likewise.
	* config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
	* config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
	vector, pixel, and bool following altivec.h include.

[gcc/testsuite]

2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>

	* gcc.target/powerpc/powerpc.exp: Add .C suffix for main loop.
	* gcc.target/powerpc/undef-bool-1.C: New file.
	* gcc.target/powerpc/undef-bool-2.c: New file.

From-SVN: r259050
2018-04-03 19:06:28 +00:00
Paolo Carlini
e52c093a9f re PR c++/84768 (ICE with failed class template argument deduction because of invalid template parameter)
/cp
2018-04-03  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/84768
	* pt.c (rewrite_template_parm): If the first argument is
	error_mark_node return it immediately.
	(build_deduction_guide): Check the return value of the
	latter for error_mark_node.
	(do_class_deduction): Check the return value of the latter.

/testsuite
2018-04-03  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/84768
	* g++.dg/cpp1z/class-deduction52.C: New.

From-SVN: r259049
2018-04-03 17:53:05 +00:00
Jason Merrill
83afe9b528 * semantics.c (finish_if_stmt_cond): Use instantiation_dependent_expression_p.
From-SVN: r259044
2018-04-03 13:41:17 -04:00
Jason Merrill
1456e76410 PR c++/85149 - generic lambda and constexpr if.
* pt.c (build_extra_args, add_extra_args): Split from
	tsubst_pack_expansion.
	(tsubst_expr) [IF_STMT]: Use them.
	* cp-tree.h (IF_STMT_EXTRA_ARGS): New.

From-SVN: r259043
2018-04-03 13:41:12 -04:00
Jason Merrill
3f759575d3 Fix noexcept merging with system headers.
* typeck.c (merge_types): Limit matching attribute shortcut to
	the default case.

From-SVN: r259042
2018-04-03 13:41:06 -04:00
Martin Sebor
b4231bf26e extend.texi (Common Function Attributes): Clarify.
gcc/ChangeLog:

	* doc/extend.texi (Common Function Attributes): Clarify.
	(const attribute): Likewise.
	(pure attribute): Likewise.

From-SVN: r259041
2018-04-03 11:35:14 -06:00
Jakub Jelinek
92c59b7466 re PR c++/85147 (ICE with invalid variadic template-template parameter)
PR c++/85147
	* pt.c (fixed_parameter_pack_p_1): Punt if parm is error_mark_node.

	* g++.dg/cpp0x/pr85147.C: New test.

From-SVN: r259040
2018-04-03 18:22:05 +02:00
Jakub Jelinek
93e544c102 re PR c++/85140 (ICE with invalid use of alignas)
PR c++/85140
	* name-lookup.c (handle_namespace_attrs): Return early if attributes
	is error_mark_node.

	* g++.dg/cpp0x/gen-attrs-64.C: New test.

From-SVN: r259039
2018-04-03 18:21:02 +02:00
Jakub Jelinek
b0493acbe6 re PR c++/85134 (ICE with invalid constexpr in 'shared' OpenMP clause)
PR c++/85134
	* decl.c (cp_finish_decl): If ensure_literal_type_for_constexpr_object
	fails, after clearing DECL_DECLARED_CONSTEXPR_P don't return early,
	instead for static data members clear init and set DECL_EXTERNAL.

	* g++.dg/gomp/pr85134.C: New test.
	* g++.dg/cpp0x/constexpr-ice19.C: Expect one further error.

From-SVN: r259038
2018-04-03 18:20:02 +02:00
Jakub Jelinek
4304d6180a re PR target/85169 (wrong code with vector member insert)
PR target/85169
	* config/i386/i386.c (ix86_expand_vector_set): Use
	HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.

	* gcc.c-torture/execute/pr85169.c: New test.
	* gcc.target/i386/avx512f-pr85169.c: New test.
	* gcc.target/i386/avx512bw-pr85169.c: New test.

From-SVN: r259037
2018-04-03 18:06:19 +02:00
Segher Boessenkool
86d13a05fd rs6000: Fix pr69946.c testcase (PR85126)
After middle-end changes combine now gets fed different input, from
which it makes different (but just as efficient) code.  So remove the
test for particular asm output.


gcc/testsuite/
	PR target/85126
	* gcc.target/powerpc/pr69946: Adjust comment.  Remove
	scan-assembler-times clause.

From-SVN: r259036
2018-04-03 17:38:43 +02:00
Uros Bizjak
3bbeebd4d1 i386.c (emit_i387_cw_initialization): Always use logic instructions when changing rounding bits to preserve precision...
* config/i386/i386.c (emit_i387_cw_initialization): Always use logic
	instructions when changing rounding bits to preserve precision bits
	in the x87 control word.

From-SVN: r259034
2018-04-03 16:59:21 +02:00
Christophe Lyon
d2d0710e1a [ARM,testsuite] Force hard-float on armv8_2-fp16-move-1.c
2018-04-03  Christophe Lyon  <christophe.lyon@linaro.org>

	* gcc.target/arm/armv8_2-fp16-move-1.c: Move -mfloat-abi=hard to
	dg-additional-options.

From-SVN: r259031
2018-04-03 16:01:52 +02:00
Martin Liska
a3dadf6107 Remove UBSAN in dwarf2out.c (PR tree-optimization/82491).
2018-04-03  Martin Liska  <mliska@suse.cz>

	PR tree-optimization/82491
	* rtl.h (strip_offset_and_add): Replace += suboffset with
	poly_uint64 () + suboffset.

From-SVN: r259030
2018-04-03 13:43:22 +00:00
Martin Liska
b93f25ad50 Bits propagation only for int and ptr types
2018-03-29  Martin Liska  <mliska@suse.cz>
	    Martin Jambor  <mjambor@suse.cz>

	PR ipa/84947
	* ipa-cp.c (propagate_bits_across_jump_function): Bail out if
	param_type is not an integral or pointer type.


Co-Authored-By: Martin Jambor <mjambor@suse.cz>

From-SVN: r259029
2018-04-03 15:27:26 +02:00
Segher Boessenkool
b79861dc95 rs6000: Fix testcase pr82015.c
It used "vector" but that is not defined.  Let's use __vector instead.


gcc/testsuite/
	* gcc.target/powerpc/pr82015.c: Use __vector instead of vector.

From-SVN: r259027
2018-04-03 14:21:12 +02:00
Richard Biener
7f89f8e58c sese.h (recompute_all_dominators): Remove.
2018-04-03  Richard Biener  <rguenther@suse.de>

	* sese.h (recompute_all_dominators): Remove.

From-SVN: r259026
2018-04-03 12:06:27 +00:00
Richard Biener
c23ecd7b27 re PR testsuite/85154 (gcc.dg/vect/vect-95.c fail)
2018-04-03  Richard Biener  <rguenther@suse.de>

	PR testsuite/85154
	* gcc.dg/vect/vect-95.c: Remove scan for alignment peeling.

From-SVN: r259025
2018-04-03 09:54:22 +00:00
GCC Administrator
c77e8945e8 Daily bump.
From-SVN: r259024
2018-04-03 00:16:26 +00:00
Martin Sebor
8b3b26f77c invoke.texi (-Wrestrict): Fix typos.
gcc/ChangeLog:

	* doc/invoke.texi (-Wrestrict): Fix typos.

From-SVN: r259020
2018-04-02 17:36:21 -06:00
Jim Wilson
b7ef9225f7 RISC-V: Fix for combine bug with shift and AND operations.
PR rtl-optimization/84660
	gcc/
	* config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
	* config/riscv/riscv.md (<optab>si3): Use QImode shift count.
	(<optab>di3, <optab>si3_extend): Likewise.
	(<optab>si3_mask, <optab>si3_mask_1): New.
	(<optab>di3_mask, <optab>di3_mask_1): New.
	(<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
	(lshrsi3_zero_extend_1): Use VOIDmode shift count.
	* config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
	gcc/testsuite/
	* gcc.target/riscv/pr84660.c: New.
	* gcc.target/riscv/shift-and-1.c: New.
	* gcc.target/riscv/shift-and-2.c: New.

From-SVN: r259019
2018-04-02 15:37:21 -07:00
Jason Merrill
82a926bf06 PR c++/64095 - auto... parameter pack.
* parser.c (cp_parser_parameter_declaration): Handle turning autos
	into packs here.
	(cp_parser_parameter_declaration_list): Not here.

From-SVN: r259015
2018-04-02 14:20:04 -04:00
Thomas Koenig
078c5aff5e re PR fortran/85102 (ICE in gfc_conv_intrinsic_dot_product, at fortran/trans-intrinsic.c:4464)
2018-04-02  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/85102
	* decl.c (variable_decl): If upper or lower bounds simplify
	to a constant, use that.

2018-04-02  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/85102
	* gfortran.dg/array_simplify_2.f90: New test.

From-SVN: r259014
2018-04-02 16:47:48 +00:00
Gerald Pfeifer
c54a138f84 cpp.texi (Variadic Macros): Fix line continuation in an example.
* doc/cpp.texi (Variadic Macros): Fix line continuation in an
	example.

From-SVN: r259012
2018-04-02 16:04:06 +00:00
Chung-Ju Wu
5b6f2bf3f6 [NDS32] Implement TARGET_CANONICALIZE_COMPARISON for specific cases.
gcc/
	* config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
	(nds32_canonicalize_comparison): New function.

From-SVN: r259004
2018-04-02 01:55:53 +00:00
Bill Schmidt
c602467242 MAINTAINERS: Remove redundant Write-After-Approval entry.
2018-04-02  Bill Schmidt  <wschmidt@linux.ibm.com>

	* MAINTAINERS: Remove redundant Write-After-Approval entry.

From-SVN: r259003
2018-04-02 01:31:19 +00:00
GCC Administrator
ef600decdd Daily bump.
From-SVN: r259002
2018-04-02 00:16:23 +00:00
Chung-Ju Wu
c4d8d0502e [NDS32] Add relax optimization as new pass.
gcc/
	* config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
	* config/nds32/constants.md (unspec_volatile_element): Add
	UNSPEC_VOLATILE_RELAX_GROUP.
	* config/nds32/nds32-relax-opt.c: New file.
	* config/nds32/nds32-predicates.c
	(nds32_symbol_load_store_p): New function.
	* config/nds32/nds32-protos.h
	(nds32_symbol_load_store_p): Declare function.
	(make_pass_nds32_relax_opt): Declare new rtl pass function.
	* config/nds32/nds32.c
	(nds32_register_pass): New function to register pass.
	(nds32_register_passes): New function to register passes.
	* config/nds32/nds32.md (relax_group): New pattern.
	* config/nds32/nds32.opt (mrelax-hint): New option.
	* config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.

Co-Authored-By: Kito Cheng <kito.cheng@gmail.com>
Co-Authored-By: Kuan-Lin Chen <kuanlinchentw@gmail.com>

From-SVN: r258998
2018-04-01 10:07:40 +00:00
Kito Cheng
af08e51d09 [NDS32] Correct the dependency in t-nds32.
gcc/
	* config/nds32/t-nds32: Modify files dependency.

From-SVN: r258997
2018-04-01 09:14:12 +00:00
Chung-Ju Wu
9e362bd034 [NDS32] Implement PROFILE_HOOK.
gcc/
	* config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
	(PROFILE_HOOK): Define its implementation.

From-SVN: r258996
2018-04-01 08:52:24 +00:00
Chung-Ju Wu
7f9833429c [NDS32] Change wchar type to unsinged int.
gcc/
	* config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
	type and 32-bit size.

From-SVN: r258995
2018-04-01 08:29:40 +00:00
Jakub Jelinek
7be6ee78d6 re PR middle-end/85090 (wrong code with -O2 -fno-tree-dominator-opts -mavx512f -fira-algorithm=priority)
PR middle-end/85090
	* config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
	(V_128_256): New mode iterator.
	(*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
	(*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
	(xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
	of V.
	* config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
	V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.

	* gcc.target/i386/avx512f-pr85090-1.c: New test.
	* gcc.target/i386/avx512f-pr85090-2.c: New test.
	* gcc.target/i386/avx512f-pr85090-3.c: New test.
	* gcc.target/i386/avx512bw-pr85090-2.c: New test.
	* gcc.target/i386/avx512bw-pr85090-3.c: New test.

From-SVN: r258994
2018-04-01 08:05:01 +02:00
GCC Administrator
0a4800de9f Daily bump.
From-SVN: r258993
2018-04-01 00:16:12 +00:00
Alexandre Oliva
fc8b674118 [PR c++/85027] deal with baselink in save_expr in instantiate_type
We use SAVE_EXPRs in conditional expressions without the middle
operand, to evaluate the first operand only once.  When the conversion
of the first operand fails, we may call instantiate_type get a better
error message.  We have code to peel off the SAVE_EXPR there, but then
we may end up with a BASELINK, and we're past the code that deals with
BASELINKs.  Reorder the tests so that we expose the saved expr first,
and then deal with BASELINKs.


for  gcc/cp/ChangeLog

	PR c++/85027
	* class.c (instantiate_type): Peel off SAVE_EXPR before
	BASELINK.

for  gcc/testsuite/ChangeLog

	PR c++/85027
	* g++.dg/pr85027.C: New.

From-SVN: r258989
2018-03-31 03:44:12 +00:00
Segher Boessenkool
ec8d8a5b5c rs6000: Fix _mm_min_ps and _mm_max_ps (PR83315)
This makes _mm_{min,max}_ps work correctly for QNaNs.


	PR target/83315
	* config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
	NaN inputs correctly.

gcc/testsuite/
	PR target/83315
	* gcc.target/powerpc/sse-maxps-2.c: New test.
	* gcc.target/powerpc/sse-minps-2.c: New test.

From-SVN: r258988
2018-03-31 05:05:35 +02:00
Peter Bergner
c321708801 re PR testsuite/80546 (FAIL: gcc.target/powerpc/bool3-p[78].c scan-assembler-not)
PR target/80546
	* config/rs6000/vsx.md (??r): New mode attribute.
	(*vsx_mov<mode>_64bit): Use it.
	(*vsx_mov<mode>_32bit): Likewise.

From-SVN: r258987
2018-03-30 19:52:01 -05:00
GCC Administrator
815b2fc444 Daily bump.
From-SVN: r258986
2018-03-31 00:16:14 +00:00
Martin Sebor
457442eb8a PR tree-optimization/84818 - integer_onep must not be used for i18n
gcc/ChangeLog:

	PR tree-optimization/84818
	* builtins.c (check_access): Use warning_n.

From-SVN: r258983
2018-03-30 15:04:06 -06:00
Jason Merrill
6d92f13104 Fix designated initializer for anonymous union.
* typeck2.c (process_init_constructor_record): Use
	init_list_type_node for the CONSTRUCTOR around an anonymous union
	designated initializer.

From-SVN: r258982
2018-03-30 16:08:51 -04:00
Jakub Jelinek
9d620422f5 re PR c++/84791 (ICE with broken OpenMP reduction clause)
PR c++/84791
	* semantics.c (finish_omp_reduction_clause): If
	OMP_CLAUSE_REDUCTION_PLACEHOLDER is error_mark_node, return true
	even if processing_template_decl.

	* g++.dg/gomp/pr84791.C: New test.

From-SVN: r258981
2018-03-30 20:38:36 +02:00
Bill Schmidt
85d367756d MAINTAINERS: Update my email address and disambiguate myself a bit from Will Schmidt.
2018-03-30  Bill Schmidt  <wschmidt@linux.ibm.com>

	* MAINTAINERS: Update my email address and disambiguate myself
	a bit from Will Schmidt.

From-SVN: r258980
2018-03-30 16:17:24 +00:00
Paul Thomas
0ada0dc0c6 re PR fortran/84931 (Expansion of array constructor with constant implied-do-object goes sideways)
2018-03-30  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/84931
	* simplify.c (gfc_convert_constant): Handle case of array
	constructors within an array that has no iterator and improve
	the conciseness of this section of code.

2018-03-30  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/84931
	* gfortran.dg/array_constructor_53.f90: New test.

From-SVN: r258977
2018-03-30 12:33:49 +00:00