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
* typeck2.c (process_init_constructor_record): Use
init_list_type_node for the CONSTRUCTOR around an anonymous union
designated initializer.
From-SVN: r258982
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 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 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
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
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
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
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
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
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
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
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