platform/upstream/gcc.git
6 years agoPR c++/85133 - ICE with missing concept initializer.
Jason Merrill [Wed, 4 Apr 2018 16:42:50 +0000 (12:42 -0400)]
PR c++/85133 - ICE with missing concept initializer.

* decl.c (cp_finish_decl): If a concept initializer is missing, use
true.

From-SVN: r259091

6 years agoPR c++/85118 - wrong error with generic lambda and std::bind.
Jason Merrill [Wed, 4 Apr 2018 16:42:44 +0000 (12:42 -0400)]
PR c++/85118 - wrong error with generic lambda and std::bind.

* call.c (add_template_conv_candidate): Disable if there are any
call operators.

From-SVN: r259090

6 years agoPR c++/85141 - ICE with compound assignment and static member fn.
Jason Merrill [Wed, 4 Apr 2018 16:42:39 +0000 (12:42 -0400)]
PR c++/85141 - ICE with compound assignment and static member fn.

* typeck.c (cp_build_modify_expr): Call decay_conversion for RHS of
compound assignment.

From-SVN: r259089

6 years agoPR c++/85148 - ICE with 'this' in array NSDMI.
Jason Merrill [Wed, 4 Apr 2018 16:42:33 +0000 (12:42 -0400)]
PR c++/85148 - ICE with 'this' in array NSDMI.

* tree.c (replace_placeholders_r): Use handled_component_p.

From-SVN: r259088

6 years agore PR c++/65923 (False positive for warning about literal operator suffix and using)
Ville Voutilainen [Wed, 4 Apr 2018 16:05:11 +0000 (19:05 +0300)]
re PR c++/65923 (False positive for warning about literal operator suffix and using)

PR c++/65923

gcc/cp

PR c++/65923
* decl.c (grokfndecl): Handle standard UDL diagnostics here..
* parser.c (cp_parser_unqualified_id): ..not here.

testsuite/

PR c++/65923
* g++.dg/diagnostic/pr65923.C: New.

From-SVN: r259087

6 years agore PR rtl-optimization/84878 (ICE: Segmentation fault (in add_cross_iteration_registe...
Peter Bergner [Wed, 4 Apr 2018 15:35:03 +0000 (10:35 -0500)]
re PR rtl-optimization/84878 (ICE: Segmentation fault (in add_cross_iteration_register_deps))

gcc/
PR rtl-optimization/84878
* ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
the basic block.  Assert the use reference is not artificial and that
it has an associated insn.

gcc/testsuite/
PR rtl-optimization/84878
* gcc.target/powerpc/pr84878.c: New test.

From-SVN: r259085

6 years agoFix -Wstringop-overflow regression
Michael Matz [Wed, 4 Apr 2018 14:49:06 +0000 (14:49 +0000)]
Fix -Wstringop-overflow regression

we shouldn't claim string overflows for character arrays at
end of structures; the code that tries to avoid these
accidentally passed the address of the accessed member to
array_at_struct_end_p(), but that one wants the component_ref
or array_ref itself.  Needs updating of one testcase that
incorrectly expected warning to occur in this situation.

From-SVN: r259083

6 years agore PR testsuite/85189 (g++.dg/inherit/override-attribs.C FAILs on 32-bit x86)
Jakub Jelinek [Wed, 4 Apr 2018 14:14:08 +0000 (16:14 +0200)]
re PR testsuite/85189 (g++.dg/inherit/override-attribs.C FAILs on 32-bit x86)

PR testsuite/85189
* g++.dg/inherit/override-attribs.C: Use dg-message instead of dg-error
for the diagnostics of overridden functions.  Adjust for new wording.

From-SVN: r259082

6 years agore PR debug/85176 (ICE in force_decl_die, at dwarf2out.c:25910)
Richard Biener [Wed, 4 Apr 2018 14:11:39 +0000 (14:11 +0000)]
re PR debug/85176 (ICE in force_decl_die, at dwarf2out.c:25910)

2018-04-04  Richard Biener  <rguenther@suse.de>

PR lto/85176
* dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
from contexts for DINFO_LEVEL_TERSE and below.

* g++.dg/lto/pr85176_0.C: New testcase.

From-SVN: r259080

6 years ago[NDS32] Restrict mov pattern that has at least one register operand.
Kito Cheng [Wed, 4 Apr 2018 12:38:04 +0000 (12:38 +0000)]
[NDS32] Restrict mov pattern that has at least one register operand.

gcc/
* config/nds32/nds32-doubleword.md (move_<mode>): Require
resiter_operand condition.
* config/nds32/nds32.md (*move<mode>): Ditto.

From-SVN: r259077

6 years agore PR tree-optimization/85191 (gcc.dg/vect/slp-perm-9.c FAILs)
Richard Biener [Wed, 4 Apr 2018 12:16:21 +0000 (12:16 +0000)]
re PR tree-optimization/85191 (gcc.dg/vect/slp-perm-9.c FAILs)

2018-04-04  Richard Biener  <rguenther@suse.de>

PR testsuite/85191
* lib/target-supports.exp (check_effective_target_vect_perm_short):
Fix typo.

From-SVN: r259075

6 years agoDisable anchors and msdata for ASAN test-case (PR sanirizer/85174).
Martin Liska [Wed, 4 Apr 2018 10:40:57 +0000 (12:40 +0200)]
Disable anchors and msdata for ASAN test-case (PR sanirizer/85174).

2018-04-04  Martin Liska  <mliska@suse.cz>

PR sanitizer/85174
* c-c++-common/asan/pointer-compare-1.c: Disable section anchors
and msdata as a workaround for powerpc.

From-SVN: r259074

6 years ago[NDS32] Implement movmisalignsi and movmisaligndi pattern.
Kito Cheng [Wed, 4 Apr 2018 09:32:31 +0000 (09:32 +0000)]
[NDS32] Implement movmisalignsi and movmisaligndi pattern.

gcc/
* config/nds32/nds32.md (movmisalign<mode>): New pattern.

Co-Authored-By: Monk Chiang <sh.chiang04@gmail.com>
From-SVN: r259073

6 years agore PR libfortran/85166 ([nvptx, libgfortran] Libgomp fortran tests using stop in...
Thomas Koenig [Wed, 4 Apr 2018 09:26:13 +0000 (09:26 +0000)]
re PR libfortran/85166 ([nvptx, libgfortran] Libgomp fortran tests using stop in offloaded fns fail to compile)

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

PR libfortran/85166
* runtime/minimal.c (stop_numeric): Add new function in order to
implement numeric stop on minimal targets.

From-SVN: r259072

6 years ago[NDS32] Merge movqi and movhi patterns.
Chung-Ju Wu [Wed, 4 Apr 2018 09:19:39 +0000 (09:19 +0000)]
[NDS32] Merge movqi and movhi patterns.

gcc/
* config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.

From-SVN: r259071

6 years ago[NDS32] Refine movcc, cmov, cstore and cbranch patterns.
Chung-Ju Wu [Wed, 4 Apr 2018 08:48:56 +0000 (08:48 +0000)]
[NDS32] Refine movcc, cmov, cstore and cbranch patterns.

gcc/
* config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
nds32_cond_code_str, output_cond_branch,
output_cond_branch_compare_zero, nds32_expand_cbranch,
nds32_expand_cstore, nds32_expand_movcc,
nds32_output_cbranchsi4_equality_zero,
nds32_output_cbranchsi4_equality_reg,
nds32_output_cbranchsi4_equality_reg_or_const_int,
nds32_output_cbranchsi4_greater_less_zero: New functions.
* config/nds32/nds32-protos.h (nds32_expand_cbranch,
nds32_expand_cstore, nds32_expand_movcc,
nds32_output_cbranchsi4_equality_zero,
nds32_output_cbranchsi4_equality_reg,
nds32_output_cbranchsi4_equality_reg_or_const_int,
nds32_output_cbranchsi4_greater_less_zero): Declare.
* config/nds32/predicates.md (nds32_movecc_comparison_operator,
nds32_rimm11s_operand): New predicates.
* config/nds32/nds32.h (nds32_expand_result_type): New enum type.
* config/nds32/nds32.md: Rewrite all the branch and conditional move
patterns.

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

6 years ago[NDS32] Refine instruction type attribute.
Kito Cheng [Wed, 4 Apr 2018 08:25:36 +0000 (08:25 +0000)]
[NDS32] Refine instruction type attribute.

gcc/
* config/nds32/nds32-doubleword.md: Refine all the instruction type.
* config/nds32/nds32.md: Ditto.
* config/nds32/pipelines.md: Ditto.

From-SVN: r259069

6 years agore PR tree-optimization/85168 (ICE in tree-ssa-coalesce.c: SSA corruption: Unable...
Richard Biener [Wed, 4 Apr 2018 07:52:20 +0000 (07:52 +0000)]
re PR tree-optimization/85168 (ICE in tree-ssa-coalesce.c: SSA corruption: Unable to coalesce ssa_names which are marked as MUST COALESCE when -O2 is used)

2018-04-04  Richard Biener  <rguenther@suse.de>

PR tree-optimization/85168
* tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
propagating abnormals.

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

From-SVN: r259068

6 years ago[PR c++/84943] mark function as used when taking its address
Alexandre Oliva [Wed, 4 Apr 2018 03:40:29 +0000 (03:40 +0000)]
[PR c++/84943] mark function as used when taking its address

fn[0]() ICEd because we would fold the INDIRECT_REF used for the
array indexing while building the address for the call, after not
finding the decl hiding there at first.  But the decl would be exposed
by the folding, and then lower layers would complain we had the decl,
after all, but it wasn't one of the artificial or special functions
that could be called without being marked as used.

This patch arranges for a FUNCTION_DECL to be marked as used when
taking its address, just like we already did when taking the address
of a static function to call it as a member function (i.e. using the
obj.fn() notation).  However, we shouldn't mark functions as used when
just performing overload resolution, lest we might instantiate
templates we shouldn't, as in g++.dg/overload/template1.C, so we
adjust mark_used to return early when testing conversions.

for  gcc/cp/ChangeLog

PR c++/84943
* typeck.c (cp_build_addr_expr_1): Mark FUNCTION_DECL as
used.
* decl2.c (mark_used): Return without effects if tf_conv.

for  gcc/testsuite/ChangeLog

PR c++/84943
* g++.dg/pr84943.C: New.
* g++.dg/pr84943-2.C: New.

From-SVN: r259067

6 years ago[NDS32] Change enabled attribute to yes/no instead of 1/0.
Chung-Ju Wu [Wed, 4 Apr 2018 01:35:01 +0000 (01:35 +0000)]
[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

6 years ago[NDS32] Refine implementation of sibcall patterns.
Chung-Ju Wu [Wed, 4 Apr 2018 00:56:16 +0000 (00:56 +0000)]
[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

6 years agoDaily bump.
GCC Administrator [Wed, 4 Apr 2018 00:16:19 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r259064

6 years agoPR libstdc++/85183 fix std::variant move-assignment
Jonathan Wakely [Tue, 3 Apr 2018 23:03:07 +0000 (00:03 +0100)]
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

6 years agore PR rtl-optimization/85167 (shrink-wrap.c:333:15: runtime error with UBSAN)
Jakub Jelinek [Tue, 3 Apr 2018 21:45:52 +0000 (23:45 +0200)]
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

6 years agore PR tree-optimization/85156 (ICE with -O1 -g: gimplification failed)
Jakub Jelinek [Tue, 3 Apr 2018 21:42:51 +0000 (23:42 +0200)]
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

6 years agoPR c++/85092 - C++17 ICE with unused list constructor.
Jason Merrill [Tue, 3 Apr 2018 19:13:42 +0000 (15:13 -0400)]
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

6 years agoPR c++/85113 - ICE with constexpr and __builtin_constant_p.
Jason Merrill [Tue, 3 Apr 2018 19:13:36 +0000 (15:13 -0400)]
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

6 years agoemmintrin.h (_mm_cvtpd_epi32): Use __vector rather than vector.
Bill Schmidt [Tue, 3 Apr 2018 19:06:28 +0000 (19:06 +0000)]
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

6 years agore PR c++/84768 (ICE with failed class template argument deduction because of invalid...
Paolo Carlini [Tue, 3 Apr 2018 17:53:05 +0000 (17:53 +0000)]
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

6 years ago* semantics.c (finish_if_stmt_cond): Use instantiation_dependent_expression_p.
Jason Merrill [Tue, 3 Apr 2018 17:41:17 +0000 (13:41 -0400)]
* semantics.c (finish_if_stmt_cond): Use instantiation_dependent_expression_p.

From-SVN: r259044

6 years agoPR c++/85149 - generic lambda and constexpr if.
Jason Merrill [Tue, 3 Apr 2018 17:41:12 +0000 (13:41 -0400)]
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

6 years agoFix noexcept merging with system headers.
Jason Merrill [Tue, 3 Apr 2018 17:41:06 +0000 (13:41 -0400)]
Fix noexcept merging with system headers.

* typeck.c (merge_types): Limit matching attribute shortcut to
the default case.

From-SVN: r259042

6 years agoextend.texi (Common Function Attributes): Clarify.
Martin Sebor [Tue, 3 Apr 2018 17:35:14 +0000 (17:35 +0000)]
extend.texi (Common Function Attributes): Clarify.

gcc/ChangeLog:

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

From-SVN: r259041

6 years agore PR c++/85147 (ICE with invalid variadic template-template parameter)
Jakub Jelinek [Tue, 3 Apr 2018 16:22:05 +0000 (18:22 +0200)]
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

6 years agore PR c++/85140 (ICE with invalid use of alignas)
Jakub Jelinek [Tue, 3 Apr 2018 16:21:02 +0000 (18:21 +0200)]
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

6 years agore PR c++/85134 (ICE with invalid constexpr in 'shared' OpenMP clause)
Jakub Jelinek [Tue, 3 Apr 2018 16:20:02 +0000 (18:20 +0200)]
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

6 years agore PR target/85169 (wrong code with vector member insert)
Jakub Jelinek [Tue, 3 Apr 2018 16:06:19 +0000 (18:06 +0200)]
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

6 years agors6000: Fix pr69946.c testcase (PR85126)
Segher Boessenkool [Tue, 3 Apr 2018 15:38:43 +0000 (17:38 +0200)]
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

6 years agoi386.c (emit_i387_cw_initialization): Always use logic instructions when changing...
Uros Bizjak [Tue, 3 Apr 2018 14:59:21 +0000 (16:59 +0200)]
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

6 years ago[ARM,testsuite] Force hard-float on armv8_2-fp16-move-1.c
Christophe Lyon [Tue, 3 Apr 2018 14:01:52 +0000 (14:01 +0000)]
[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

6 years agoRemove UBSAN in dwarf2out.c (PR tree-optimization/82491).
Martin Liska [Tue, 3 Apr 2018 13:43:22 +0000 (15:43 +0200)]
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

6 years agoBits propagation only for int and ptr types
Martin Liska [Tue, 3 Apr 2018 13:27:26 +0000 (15:27 +0200)]
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

6 years agors6000: Fix testcase pr82015.c
Segher Boessenkool [Tue, 3 Apr 2018 12:21:12 +0000 (14:21 +0200)]
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

6 years agosese.h (recompute_all_dominators): Remove.
Richard Biener [Tue, 3 Apr 2018 12:06:27 +0000 (12:06 +0000)]
sese.h (recompute_all_dominators): Remove.

2018-04-03  Richard Biener  <rguenther@suse.de>

* sese.h (recompute_all_dominators): Remove.

From-SVN: r259026

6 years agore PR testsuite/85154 (gcc.dg/vect/vect-95.c fail)
Richard Biener [Tue, 3 Apr 2018 09:54:22 +0000 (09:54 +0000)]
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

6 years agoDaily bump.
GCC Administrator [Tue, 3 Apr 2018 00:16:26 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r259024

6 years agoinvoke.texi (-Wrestrict): Fix typos.
Martin Sebor [Mon, 2 Apr 2018 23:36:21 +0000 (23:36 +0000)]
invoke.texi (-Wrestrict): Fix typos.

gcc/ChangeLog:

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

From-SVN: r259020

6 years agoRISC-V: Fix for combine bug with shift and AND operations.
Jim Wilson [Mon, 2 Apr 2018 22:37:21 +0000 (22:37 +0000)]
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

6 years agoPR c++/64095 - auto... parameter pack.
Jason Merrill [Mon, 2 Apr 2018 18:20:04 +0000 (14:20 -0400)]
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

6 years agore PR fortran/85102 (ICE in gfc_conv_intrinsic_dot_product, at fortran/trans-intrinsi...
Thomas Koenig [Mon, 2 Apr 2018 16:47:48 +0000 (16:47 +0000)]
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

6 years agocpp.texi (Variadic Macros): Fix line continuation in an example.
Gerald Pfeifer [Mon, 2 Apr 2018 16:04:06 +0000 (16:04 +0000)]
cpp.texi (Variadic Macros): Fix line continuation in an example.

* doc/cpp.texi (Variadic Macros): Fix line continuation in an
example.

From-SVN: r259012

6 years ago[NDS32] Implement TARGET_CANONICALIZE_COMPARISON for specific cases.
Chung-Ju Wu [Mon, 2 Apr 2018 01:55:53 +0000 (01:55 +0000)]
[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

6 years agoMAINTAINERS: Remove redundant Write-After-Approval entry.
Bill Schmidt [Mon, 2 Apr 2018 01:31:19 +0000 (01:31 +0000)]
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

6 years agoDaily bump.
GCC Administrator [Mon, 2 Apr 2018 00:16:23 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r259002

6 years ago[NDS32] Add relax optimization as new pass.
Chung-Ju Wu [Sun, 1 Apr 2018 10:07:40 +0000 (10:07 +0000)]
[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

6 years ago[NDS32] Correct the dependency in t-nds32.
Kito Cheng [Sun, 1 Apr 2018 09:14:12 +0000 (09:14 +0000)]
[NDS32] Correct the dependency in t-nds32.

gcc/
* config/nds32/t-nds32: Modify files dependency.

From-SVN: r258997

6 years ago[NDS32] Implement PROFILE_HOOK.
Chung-Ju Wu [Sun, 1 Apr 2018 08:52:24 +0000 (08:52 +0000)]
[NDS32] Implement PROFILE_HOOK.

gcc/
* config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
(PROFILE_HOOK): Define its implementation.

From-SVN: r258996

6 years ago[NDS32] Change wchar type to unsinged int.
Chung-Ju Wu [Sun, 1 Apr 2018 08:29:40 +0000 (08:29 +0000)]
[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

6 years agore PR middle-end/85090 (wrong code with -O2 -fno-tree-dominator-opts -mavx512f -fira...
Jakub Jelinek [Sun, 1 Apr 2018 06:05:01 +0000 (08:05 +0200)]
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

6 years agoDaily bump.
GCC Administrator [Sun, 1 Apr 2018 00:16:12 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r258993

6 years ago[PR c++/85027] deal with baselink in save_expr in instantiate_type
Alexandre Oliva [Sat, 31 Mar 2018 03:44:12 +0000 (03:44 +0000)]
[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

6 years agors6000: Fix _mm_min_ps and _mm_max_ps (PR83315)
Segher Boessenkool [Sat, 31 Mar 2018 03:05:35 +0000 (05:05 +0200)]
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

6 years agore PR testsuite/80546 (FAIL: gcc.target/powerpc/bool3-p[78].c scan-assembler-not)
Peter Bergner [Sat, 31 Mar 2018 00:52:01 +0000 (19:52 -0500)]
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

6 years agoDaily bump.
GCC Administrator [Sat, 31 Mar 2018 00:16:14 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r258986

6 years agoPR tree-optimization/84818 - integer_onep must not be used for i18n
Martin Sebor [Fri, 30 Mar 2018 21:04:06 +0000 (21:04 +0000)]
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

6 years agoFix designated initializer for anonymous union.
Jason Merrill [Fri, 30 Mar 2018 20:08:51 +0000 (16:08 -0400)]
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

6 years agore PR c++/84791 (ICE with broken OpenMP reduction clause)
Jakub Jelinek [Fri, 30 Mar 2018 18:38:36 +0000 (20:38 +0200)]
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

6 years agoMAINTAINERS: Update my email address and disambiguate myself a bit from Will Schmidt.
Bill Schmidt [Fri, 30 Mar 2018 16:17:24 +0000 (16:17 +0000)]
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

6 years agore PR fortran/84931 (Expansion of array constructor with constant implied-do-object...
Paul Thomas [Fri, 30 Mar 2018 12:33:49 +0000 (12:33 +0000)]
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

6 years agore PR fortran/85130 (Substrings out of range are not rejected)
Thomas Koenig [Fri, 30 Mar 2018 12:18:30 +0000 (12:18 +0000)]
re PR fortran/85130 (Substrings out of range are not rejected)

2018-03-30  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/85130
* gfortran.dg/substr_6.f90: Remove illegal test for
out-of-bounds substring.

From-SVN: r258976

6 years agore PR target/83822 (trunk/gcc/config/rs6000/rs6000-string.c:970]: (style) Redundant...
Aaron Sawdey [Fri, 30 Mar 2018 12:17:31 +0000 (12:17 +0000)]
re PR target/83822 (trunk/gcc/config/rs6000/rs6000-string.c:970]: (style) Redundant condition)

2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>

PR target/83822
* config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
condition.
* config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
condition.

From-SVN: r258975

6 years agore PR fortran/85111 (ICE in min_max_choose, at fortran/simplify.c:4884 (and others))
Thomas Koenig [Fri, 30 Mar 2018 09:58:35 +0000 (09:58 +0000)]
re PR fortran/85111 (ICE in min_max_choose, at fortran/simplify.c:4884 (and others))

2017-03-30  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/85111
* array.c (gfc_resolve_character_array_constructor): Early
exit for zero-size arrays.
* simplify.c (simplify_transformation_to_array): Exit early
if the result size is zero.
(simplify_minmaxloc_to_array): Likewise.

2017-03-30  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/85111
* gfortran.dg/zero_sized_10.f90: New test.

Add ChangeLog entries for r258973.

From-SVN: r258974

6 years agore PR fortran/85111 (ICE in min_max_choose, at fortran/simplify.c:4884 (and others))
Thomas Koenig [Fri, 30 Mar 2018 09:56:46 +0000 (09:56 +0000)]
re PR fortran/85111 (ICE in min_max_choose, at fortran/simplify.c:4884 (and others))

2017-03-30  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/85111
* array.c (gfc_resolve_character_array_constructor): Early
exit for zero-size arrays.
* simplify.c (simplify_transformation_to_array): Exit early
if the result size is zero.
(simplify_minmaxloc_to_array): Likewise.

2017-03-30  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/85111
* gfortran.dg/zero_sized_10.f90: New test.

From-SVN: r258973

6 years agoEnable tuning options for skylake-avx512.
Julia Koval [Fri, 30 Mar 2018 07:04:55 +0000 (09:04 +0200)]
Enable tuning options for skylake-avx512.

gcc/
PR target/84413
* x86-tune.def (movx, partial_reg_dependency): Enable for
m_SKYLAKE_AVX512.

From-SVN: r258972

6 years agoDaily bump.
GCC Administrator [Fri, 30 Mar 2018 00:16:24 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r258970

6 years ago* gcc.pot: Regenerate.
Joseph Myers [Thu, 29 Mar 2018 23:06:47 +0000 (00:06 +0100)]
* gcc.pot: Regenerate.

From-SVN: r258967

6 years agoMore #include suggestions (PR c++/84269)
David Malcolm [Thu, 29 Mar 2018 20:43:48 +0000 (20:43 +0000)]
More #include suggestions (PR c++/84269)

PR c++/84269 reports a number of names in the C and C++ standard
libraries for which we don't yet offer #include fix-it hints.

This patch adds them (up to comment #9).

gcc/c-family/ChangeLog:
PR c++/84269
* known-headers.cc (get_stdlib_header_for_name): Add various names
from <assert.h>, <string.h>, and <memory.h>; add more names from
<stdio.h>.

gcc/cp/ChangeLog:
PR c++/84269
* name-lookup.c (get_std_name_hint): Add names from <memory>,
<tuple>, and <utility>.

gcc/testsuite/ChangeLog:
PR c++/84269
* g++.dg/lookup/missing-std-include-6.C: New test.
* g++.dg/lookup/missing-std-include.C: Add std::pair and
std::tuple tests.
* g++.dg/spellcheck-reswords.C: Expect a hint about <cstring>.
* g++.dg/spellcheck-stdlib.C: Add tests for names in <cstdio>,
<cstring>, <cassert>, and <cstdlib>.

From-SVN: r258966

6 years agoPR c++/85093 - too many template args with pack expansion.
Jason Merrill [Thu, 29 Mar 2018 19:38:41 +0000 (15:38 -0400)]
PR c++/85093 - too many template args with pack expansion.

* pt.c (coerce_template_parms): Keep pack expansion args that will
need to be empty.

From-SVN: r258964

6 years ago* pt.c (build_non_dependent_expr): Propagate expr location.
Jason Merrill [Thu, 29 Mar 2018 19:38:35 +0000 (15:38 -0400)]
* pt.c (build_non_dependent_expr): Propagate expr location.

From-SVN: r258963

6 years agoPR c++/85060 - wrong-code with call to base member in template.
Jason Merrill [Thu, 29 Mar 2018 19:38:29 +0000 (15:38 -0400)]
PR c++/85060 - wrong-code with call to base member in template.

* search.c (any_dependent_bases_p): Check uses_template_parms
rather than processing_template_decl.

From-SVN: r258962

6 years agore PR inline-asm/84985 (ICE in match_reload, at lra-constraints.c:1068)
Vladimir Makarov [Thu, 29 Mar 2018 18:29:12 +0000 (18:29 +0000)]
re PR inline-asm/84985 (ICE in match_reload, at lra-constraints.c:1068)

2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>

PR inline-asm/84985
* lra-constraints.c (process_alt_operands): Move setting
this_alternative_matches below.

2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>

PR inline-asm/84985
* gcc.target/i386/pr84985.c: New.

From-SVN: r258961

6 years agoMore underlining of bad arguments (PR c++/85110)
David Malcolm [Thu, 29 Mar 2018 14:43:01 +0000 (14:43 +0000)]
More underlining of bad arguments (PR c++/85110)

As of r256448, the C++ frontend underlines many bad arguments in its
diagnostics; those where perform_overload_resolution returns a
non-NULL candidate, but there's a failure in convert_like_real.

However, for the case where perform_overload_resolution fails, but
there's a single non-viable candidate, the error is diagnosed by
cp_build_function_call_vec, and that currently doesn't underline
the bad argument:

$ cat test.cc
void callee (int one, const char **two, int three);

void
caller (const char *fmt)
{
  callee (1, fmt, 3);
}

We emit:

$ g++ test.cc
test.cc: In function 'void caller(const char*)':
test.cc:6:20: error: cannot convert 'const char*' to 'const char**' for argument '2' to 'void callee(int, const char**, int)'
   callee (1, fmt, 3);
                    ^

It's going through convert_for_assignment, and
implicitly using input_location.

This patch updates convert_for_assignment for this case, using
an EXPR_LOCATION if there is one, or falling back to input_location
otherwise, underlining the argument in question:

test.cc: In function 'void caller(const char*)':
test.cc:6:14: error: cannot convert 'const char*' to 'const char**' for argument '2' to 'void callee(int, const char**, int)'
   callee (1, fmt, 3);
              ^~~

gcc/cp/ChangeLog:
PR c++/85110
* typeck.c (convert_for_assignment): When complaining due to
conversions for an argument, attempt to use the location of the
argument.

gcc/testsuite/ChangeLog:
PR c++/85110
* g++.dg/diagnostic/param-type-mismatch-2.C: New test.

From-SVN: r258957

6 years agoi386: Enable AVX/AVX512 features only if supported by OSXSAVE
H.J. Lu [Thu, 29 Mar 2018 13:14:06 +0000 (13:14 +0000)]
i386: Enable AVX/AVX512 features only if supported by OSXSAVE

Enable AVX and AVX512 features only if their states are supported by
OSXSAVE.

PR target/85100
* config/i386/cpuinfo.c (XCR_XFEATURE_ENABLED_MASK): New.
(XSTATE_FP): Likewise.
(XSTATE_SSE): Likewise.
(XSTATE_YMM): Likewise.
(XSTATE_OPMASK): Likewise.
(XSTATE_ZMM): Likewise.
(XSTATE_HI_ZMM): Likewise.
(XCR_AVX_ENABLED_MASK): Likewise.
(XCR_AVX512F_ENABLED_MASK): Likewise.
(get_available_features): Enable AVX and AVX512 features only
if their states are supported by OSXSAVE.

From-SVN: r258954

6 years agoDocumentation tweaks.
Martin Liska [Thu, 29 Mar 2018 13:02:23 +0000 (15:02 +0200)]
Documentation tweaks.

2018-03-29  Martin Liska  <mliska@suse.cz>

        PR lto/84995.
        * doc/invoke.texi: Document how LTO works with debug info.
        Describe auto-load support of binutils.  Mention 'x86-64'
        as valid option value of -march option.

From-SVN: r258953

6 years agore PR c++/85108 (Incorrect warning for constexpr lambda with -Wunused-but-set-variable)
Jakub Jelinek [Thu, 29 Mar 2018 11:18:04 +0000 (13:18 +0200)]
re PR c++/85108 (Incorrect warning for constexpr lambda with -Wunused-but-set-variable)

PR c++/85108
* g++.dg/warn/Wunused-var-31.C: New test.

From-SVN: r258952

6 years ago* config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
Jakub Jelinek [Thu, 29 Mar 2018 10:38:51 +0000 (12:38 +0200)]
* config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.

From-SVN: r258951

6 years agore PR c/85094 (-g with any optimization suppresses -Wduplicated-branches)
Jakub Jelinek [Thu, 29 Mar 2018 10:37:58 +0000 (12:37 +0200)]
re PR c/85094 (-g with any optimization suppresses -Wduplicated-branches)

PR c/85094
* fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
OEP_NO_HASH_CHECK for recursive call, to avoid exponential
checking.

* c-c++-common/Wduplicated-branches-14.c: New test.

From-SVN: r258950

6 years agore PR c++/84606 (internal compiler error: Segmentation fault (enclosing_instantiation...
Paolo Carlini [Thu, 29 Mar 2018 08:43:43 +0000 (08:43 +0000)]
re PR c++/84606 (internal compiler error: Segmentation fault (enclosing_instantiation_of()))

2018-03-29  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/84606
* g++.dg/cpp0x/pr84606.C: New.

From-SVN: r258947

6 years agoDaily bump.
GCC Administrator [Thu, 29 Mar 2018 00:16:22 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r258946

6 years agore PR target/84912 (__builtin_divde* produce Internal Compiler Error when compiled...
Peter Bergner [Thu, 29 Mar 2018 00:06:31 +0000 (19:06 -0500)]
re PR target/84912 (__builtin_divde* produce Internal Compiler Error when compiled -m32)

PR target/84912
* config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
(RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
* config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
for RS6000_BTM_POWERPC64.
(rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
(rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
* config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
definition.
(DIVDE): Use it.
(DIVDEU): Likewise.

From-SVN: r258943

6 years agorevert: rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
Carl Love [Wed, 28 Mar 2018 23:08:16 +0000 (23:08 +0000)]
revert: rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.

gcc/ChangeLog:

2018-03-20 Carl Love  <cel@us.ibm.com>

Revert
2017-09-27  Carl Love  <cel@us.ibm.com>

* config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
(FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
* config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
fctiw instruction.

gcc/testsuite/ChangeLog:

2018-03-20  Carl Love  <cel@us.ibm.com>

Revert
2017-09-27  Carl Love  <cel@us.ibm.com>

* gcc.target/powerpc/builtin-fctid-fctiw-runnable.c: New test file
for the __builtin_fctid and __builtin_fctiw.

From-SVN: r258942

6 years agoxmmintrin.h (_mm_max_pi16): Use __vector __bool instead of __vector bool.
Bill Schmidt [Wed, 28 Mar 2018 20:40:36 +0000 (20:40 +0000)]
xmmintrin.h (_mm_max_pi16): Use __vector __bool instead of __vector bool.

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

* config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
instead of __vector bool.
(_mm_max_pu8): Likewise.
(_mm_min_pi16): Likewise.

From-SVN: r258936

6 years agore PR fortran/69497 (ICE in gfc_free_namespace, at fortran/symbol.c:3701)
Mikael Morin [Wed, 28 Mar 2018 20:12:55 +0000 (20:12 +0000)]
re PR fortran/69497 (ICE in gfc_free_namespace, at fortran/symbol.c:3701)

PR fortran/69497
* symbol.c (gfc_symbol_done_2): Start freeing namespaces
from the root.
(gfc_free_namespace): Restore assert (revert r258839).

From-SVN: r258935

6 years agoFix typo in last ChangeLog entry
Peter Bergner [Wed, 28 Mar 2018 20:10:18 +0000 (15:10 -0500)]
Fix typo in last ChangeLog entry

From-SVN: r258934

6 years agore PR target/84912 (__builtin_divde* produce Internal Compiler Error when compiled...
Peter Bergner [Wed, 28 Mar 2018 20:09:02 +0000 (15:09 -0500)]
re PR target/84912 (__builtin_divde* produce Internal Compiler Error when compiled -m32)

gcc/
PR target/84912
* config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
(DIVWEUO): Likewise.
(DIVDEO): Likewise.
(DIVDEUO): Likewise.
* config/rs6000/rs6000.c (builtin_function_type): Remove support for
DIVWEUO and DIVDEUO.
* config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
(UNSPEC_DIV_EXTEND): Remove deleted unspecs.
(div_extend): Likewise.
* doc/extend.texi (__builtin_divweo): Remove documention for deleted
builtin function.
(__builtin_divweuo): Likewise.
(__builtin_divdeo): Likewise.
(__builtin_divdeuo): Likewise.

gcc/testsuite/
PR target/84912
* gcc.target/powerpc/extend-divide-1.c (div_weo): Remove test for
deleted builtin function.
(div_weuo): Likewise.
* gcc.target/powerpc/extend-divide-2.c (div_deo): Likewise.
(div_deuo): Likewise.

From-SVN: r258933

6 years agore PR c++/85028 (ICE on invalid C++ code: in tsubst_default_argument, at cp/pt.c...
Paolo Carlini [Wed, 28 Mar 2018 19:21:41 +0000 (19:21 +0000)]
re PR c++/85028 (ICE on invalid C++ code: in tsubst_default_argument, at cp/pt.c:12340)

/cp
2018-03-28  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/85028
* pt.c (tsubst_default_argument): Early return if the type of the
parameter is erroneous.

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

PR c++/85028
* g++.dg/other/default13.C: New.

From-SVN: r258932

6 years agore PR target/85095 (worse code generated)
Jakub Jelinek [Wed, 28 Mar 2018 19:16:50 +0000 (21:16 +0200)]
re PR target/85095 (worse code generated)

PR target/85095
* config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
*sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.

* gcc.target/i386/pr85095-1.c: New test.
* gcc.target/i386/pr85095-2.c: New test.
* gcc.c-torture/execute/pr85095.c: New test.

From-SVN: r258931

6 years agore PR middle-end/82004 (SPEC CPU2017 628.pop2_s miscompare)
Jakub Jelinek [Wed, 28 Mar 2018 19:15:39 +0000 (21:15 +0200)]
re PR middle-end/82004 (SPEC CPU2017 628.pop2_s miscompare)

PR tree-optimization/82004
* gimple-match-head.c (optimize_pow_to_exp): New function.
* match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
Don't fold to exp if optimize_pow_to_exp is false.

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

From-SVN: r258930

6 years agoFix typos (PR other/84819).
Martin Liska [Wed, 28 Mar 2018 14:51:09 +0000 (16:51 +0200)]
Fix typos (PR other/84819).

2018-03-28  Martin Liska  <mliska@suse.cz>

PR other/84819
* calls.c (initialize_argument_information): Fix trailing space.
* common.opt: Fix typo and provide better explanation for
-fsanitize-coverage option.
* config/i386/i386.opt: Fix typo.

From-SVN: r258925

6 years agoFix wrong use-after-scope sanitization for omp variable (PR sanitizer/85081).
Jakub Jelinek [Wed, 28 Mar 2018 14:45:21 +0000 (16:45 +0200)]
Fix wrong use-after-scope sanitization for omp variable (PR sanitizer/85081).

2018-03-28  Jakub Jelinek  <jakub@redhat.com>
    Martin Liska  <mliska@suse.cz>

PR sanitizer/85081
* gimplify.c (asan_poison_variable): Don't do the check for
gimplify_omp_ctxp here.
(gimplify_decl_expr): Do it here.
(gimplify_target_expr): Likewise.
2018-03-28  Jakub Jelinek  <jakub@redhat.com>
    Martin Liska  <mliska@suse.cz>

PR sanitizer/85081
* g++.dg/asan/pr85081.C: New test.

Co-Authored-By: Martin Liska <mliska@suse.cz>
From-SVN: r258924