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
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
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
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
[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
/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
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
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
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
* 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-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
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-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
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
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
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