Backported from mainline
2019-11-27 Jakub Jelinek <jakub@redhat.com>
PR c++/92524
* tree.c (replace_placeholders_r): Don't walk constructor elts with
RANGE_EXPR indexes.
* g++.dg/cpp0x/pr92524.C: New test.
From-SVN: r279659
Backported from mainline
2019-11-27 Jakub Jelinek <jakub@redhat.com>
PR debug/92664
* dwarf2out.c (lookup_filename): Use "<stdin>" instead of "".
From-SVN: r279658
Backported from mainline
2019-11-26 Jakub Jelinek <jakub@redhat.com>
PR c++/92648
* parser.c (cp_parser_std_attribute): For unknown attributes,
skip balanced token seq instead of trying to parse
attribute-argument-clause as expression list.
* g++.dg/cpp0x/gen-attrs-71.C: New test.
From-SVN: r279655
Backported from mainline
2019-11-26 Jakub Jelinek <jakub@redhat.com>
PR c++/61414
* c-attribs.c (handle_mode_attribute): Add mode attribute to
ENUMERAL_TYPEs.
* class.c (enum_to_min_precision): New hash_map.
(enum_min_precision): New function.
(check_bitfield_decl): Use it.
* g++.dg/cpp0x/enum23.C: Remove xfail.
* g++.dg/cpp0x/enum28.C: New test.
From-SVN: r279654
Backported from mainline
2019-11-26 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/92644
* tree-ssa-phiopt.c (minmax_replacement): Add INTEGRAL_TYPE_P check
next to INTEGER_CST checks.
* g++.dg/opt/pr92644.C: New test.
From-SVN: r279652
Backported from mainline
2019-11-23 Jakub Jelinek <jakub@redhat.com>
PR target/92615
* config/i386/i386.c (ix86_md_asm_adjust): If dest_mode is
GET_MODE (dest), is not QImode, using ZERO_EXTEND and dest is not
register_operand, force x into register before storing it into dest.
Formatting fix.
* gcc.target/i386/pr92615.c: New test.
From-SVN: r279651
Backported from mainline
2019-11-21 Jakub Jelinek <jakub@redhat.com>
Jason Merrill <jason@redhat.com>
PR c++/90842
* parser.c (cp_parser_decl_specifier_seq): For concept or typedef
break early if CP_PARSER_FLAGS_ONLY_MUTABLE_OR_CONSTEXPR.
For type specifiers, set CP_PARSER_FLAGS_NO_TYPE_DEFINITIONS
if CP_PARSER_FLAGS_ONLY_MUTABLE_OR_CONSTEXPR is set.
* g++.dg/cpp1y/lambda-generic-90842.C: New test.
From-SVN: r279649
The backend emits 16 bit memory loads for single element character
vector. As a result the character will not be right justified in the
GPR.
gcc/ChangeLog:
2019-12-17 Andreas Krebbel <krebbel@linux.ibm.com>
Backport from mainline
2019-12-16 Andreas Krebbel <krebbel@linux.ibm.com>
PR target/92950
* config/s390/vector.md ("mov<mode>" for V_8): Replace lh, lhy,
and lhrl with llc.
gcc/testsuite/ChangeLog:
2019-12-17 Andreas Krebbel <krebbel@linux.ibm.com>
Backport from mainline
2019-12-16 Andreas Krebbel <krebbel@linux.ibm.com>
PR target/92950
* gcc.target/s390/vector/pr92950.c: New test.
From-SVN: r279453
build_new_1 already passes tf_no_cleanup to build_value_init, but in this
testcase we end up calling build_value_init by way of
build_special_member_call, so we need to pass it to that function as well.
* init.c (build_new_1): Also pass tf_no_cleanup to
build_special_member_call.
From-SVN: r279335
Another place we need to look through the VIEW_CONVERT_EXPR we add to make a
use of a class NTTP have const type.
* pt.c (deducible_expression): Look through VIEW_CONVERT_EXPR.
From-SVN: r279333
Here unify was getting confused by the VIEW_CONVERT_EXPR we add in
finish_id_expression_1 to make class NTTP const when they're used in an
expression.
Tested x86_64-pc-linux-gnu, applying to trunk.
* pt.c (unify): Handle VIEW_CONVERT_EXPR.
From-SVN: r279332
Backport from mainline
2019-11-25 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/91786
* include/bits/fs_path.h (filesystem_error): Move definition before
the use in u8path.
From-SVN: r279223
* include/pstl/glue_numeric_defs.h: Restore enable_if lost during original
import of pstl.
* include/pstl/glue_numeric_impl.h: Likewise.
From-SVN: r279213
As PR91790 exposed, when we have one slp node whose first_stmt_info_for_drptr
is different from first_stmt_info, it's possible that the first_stmt DR isn't
initialized yet before stmt SLP_TREE_SCALAR_STMTS[0] of slp node. So we
shouldn't use first_stmt_info for vect_setup_realignment, instead we can use
the one based on first_stmt_info_for_drptr DR with additional adjustment by
bumping the distance from first_stmt DR.
2019-12-10 Kewen Lin <linkw@gcc.gnu.org>
Backport from mainline
2019-11-27 Kewen Lin <linkw@gcc.gnu.org>
PR tree-optimization/91790
* gcc/tree-vect-stmts.c (vectorizable_load): Use the adjusted DR for
vect_setup_realignment when first_stmt_info is different from
first_stmt_info_for_drptr.
From-SVN: r279166
* tree.c (build_array_type_1): Add SET_CANONICAL parameter and compute
TYPE_CANONICAL from the element type only if it is true. Remove a few
obsolete lines and adjust recursive call.
(fld_process_array_type): Adjust call to build_array_type_1.
(build_array_type): Likewise.
(build_nonshared_array_type): Likewise.
From-SVN: r279134
When concatenating a path ending in a root-directory onto another path,
we added an empty filename to the end of the path twice, but only
reserved space for one. That meant the second write went past the end of
the allocated buffer.
PR libstdc++/92853
* src/c++17/fs_path.cc (filesystem::path::operator+=(const path&)):
Do not process a trailing directory separator twice.
* testsuite/27_io/filesystem/path/concat/92853.cc: New test.
* testsuite/27_io/filesystem/path/concat/path.cc: Test more cases.
* testsuite/27_io/filesystem/path/concat/strings.cc: Test more cases.
From-SVN: r279115
2019-12-02 Sandra Loosemore <sandra@codesourcery.com>
Fix bugs relating to flexibly-sized objects in nios2 backend.
PR target/92499
gcc/c/
* c-decl.c (flexible_array_type_p): Move to common code.
gcc/
* config/nios2/nios2.c (nios2_in_small_data_p): Do not consider
objects of flexible types to be small if they have internal linkage
or are declared extern.
* config/nios2/nios2.h (ASM_OUTPUT_ALIGNED_LOCAL): Replace with...
(ASM_OUTPUT_ALIGNED_DECL_LOCAL): ...this. Use targetm.in_small_data_p
instead of the size of the object initializer.
* tree.c (flexible_array_type_p): Move from C front end, and
generalize to handle fields in non-C structures.
* tree.h (flexible_array_type_p): Declare.
gcc/testsuite/
* gcc.target/nios2/pr92499-1.c: New.
* gcc.target/nios2/pr92499-2.c: New.
* gcc.target/nios2/pr92499-3.c: New.
From-SVN: r278919
As PR92132 added vec_cmp_* and vcond_mask_* supports on trunk. This is a
partial backport of vec_{cmp,cmpu}<mode><mode> interface and related expand
to gcc-9-branch to fix PR92098.
gcc/ChangeLog
2019-12-02 Li Jia He <helijia@linux.ibm.com>
Partial backport from mainline
PR target/92098
2019-11-08 Kewen Lin <linkw@gcc.gnu.org>
PR target/92132
* config/rs6000/predicates.md
(signed_or_equality_comparison_operator): New predicate.
(unsigned_or_equality_comparison_operator): Likewise.
* config/rs6000/rs6000.md (one_cmpl<mode>2): Remove expand.
(one_cmpl<mode>3_internal): Rename to one_cmpl<mode>2.
* config/rs6000/vector.md
(vcond_mask_<mode><mode> for VEC_I and VEC_I): New expand.
(vec_cmp<mode><mode> for VEC_I and VEC_I): Likewise.
(vec_cmpu<mode><mode> for VEC_I and VEC_I): Likewise.
gcc/testsuite/ChangeLog
2019-12-02 Li Jia He <helijia@linux.ibm.com>
Partial backport from trunk
PR target/92098
2019-11-08 Kewen Lin <linkw@gcc.gnu.org>
PR target/92132
* gcc.target/powerpc/pr92132-fp-1.c: New test.
* gcc.target/powerpc/pr92132-fp-2.c: New test.
From-SVN: r278892