aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-11-272019-11-27 Richard Biener <rguenther@suse.de>Richard Biener
* target.def (TARGET_VECTORIZE_BUILTIN_CONVERSION): Remove. * targhooks.c (default_builtin_vectorized_conversion): Likewise. * targhooks.h (default_builtin_vectorized_conversion): Likewise. * optabs-tree.c (supportable_convert_operation): Do not call targetm.vectorize.builtin_conversion. Remove unused decl parameter. * optabs-tree.h (supportable_convert_operation): Adjust. * doc/tm.texi.in (TARGET_VECTORIZE_BUILTIN_CONVERSION): Remove. * doc/tm.texi: Regenerate. * tree-ssa-forwprop.c (simplify_vector_constructor): Adjust. * tree-vect-generic.c (expand_vector_conversion): Likewise. * tree-vect-stmts.c (vect_gen_widened_results_half): Remove unused decl parameter and adjust. (vect_create_vectorized_promotion_stmts): Likewise. (vectorizable_conversion): Adjust. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278765 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-272019-11-27 Richard Biener <rguenther@suse.de>Richard Biener
PR tree-optimization/92690 * tree-ssa-forwprop.c (simplify_vector_constructor): Avoid converting elements not originally converted. * gcc.dg/torture/pr92690.c: New testcase. * gcc.dg/tree-ssa/forwprop-35.c: Adjust. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278764 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-27 PR fortran/91944Jakub Jelinek
* simplify.c (gfc_simplify_spread): Check gfc_init_expr_flag instead of gfc_current_ns->sym_root->n.sym->attr.flavor == FL_PARAMETER. * gfortran.dg/spread_size_limit_2.f90: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278762 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-27PR 92463 - Cleanups due to minimum MPFR version bump to 3.1.0Tobias Burnus
PR middle-end/92463 * configure.ac: Use MPFR_RNDN instead of GMP's MP_RNDN. * configure: Regenerate gcc/ PR middle-end/92463 * builtins.c (do_mpfr_ckconv, do_mpc_ckconv, do_mpfr_remquo, do_mpfr_lgamma_r, do_mpc_arg2): Use MPFR_RNDx instead of GMP_RNDx, mpfr_rnd_t instead of mp_rnd_t. * fold-const-call.c (do_mpfr_ckconv, do_mpfr_arg1, do_mpfr_sincos, do_mpfr_arg2, do_mpfr_arg3, do_mpc_arg1, do_mpc_arg2): Likewise. * gimple-ssa-sprintf.c (format_floating_max, format_floating): Use mpfr_exp_t instead of mp_exp_t. * real.c (real_from_string, dconst_e_ptr, dconst_sqrt2_ptr): Use MPFR_RNDx instead of GMP_RNDx. * realmpfr.c (real_from_mpfr, mpfr_from_real): Use mpfr_rnd_t and mpfr_exp_t instead mp_rnd_t and mp_exp_t, respectively. * realmpfr.h (real_from_mpfr, mpfr_from_real): Use mpfr_rnd_t instead of mp_rnd_t and remove MPFR_RNDx poisoning. * ubsan.c (ubsan_instrument_float_cast): MPFR_RNDx instead of GMP_RNDx. fortran/ PR middle-end/92463 * arith.c (gfc_check_real_range): Replace mp_exp_t by mpfr_exp_t. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278761 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-27[PATCH] Fix PR91790 by considering different first_stmt_info for realignKewen Lin
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. gcc/ChangeLog 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278760 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-27 PR c++/92524Jakub Jelinek
* tree.c (replace_placeholders_r): Don't walk constructor elts with RANGE_EXPR indexes. * g++.dg/cpp0x/pr92524.C: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278759 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-272019-11-27 Richard Biener <rguenther@suse.de>Richard Biener
PR tree-optimization/92645 * tree-ssa-forwprop.c (simplify_vector_constructor): Handle CTORs with just a subset of the original vectors. * gcc.target/i386/pr92645-2.c: New testcase. * gcc.target/i386/pr92645-3.c: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278758 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-272019-11-27 Richard Biener <rguenther@suse.de>Richard Biener
PR middle-end/92674 * tree-inline.c (expand_call_inline): Delay purging EH/abnormal edges and instead record blocks in bitmap. (gimple_expand_calls_inline): Adjust. (fold_marked_statements): Delay EH cleanup until all folding is done. (optimize_inline_calls): Do EH/abnormal cleanup for calls after inlining finished. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278757 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-27Allow autoinc in jumps, but only when using reload.Bernd Schmidt
* auto-inc-dec.c (merge_in_block): Allow autoinc in jumps unless LRA is enabled. * combine.c (can_combine_p): Disallow autoinc in jumps unless LRA is disabled. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278756 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-27Remember the location of a variable template-id.Jason Merrill
I noticed that tsubst of a TEMPLATE_ID_EXPR was losing the location information from its EXPR_LOCATION. Then I noticed that cxx_eval_constant_expression was also throwing away location information for variable references. * pt.c (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Remember the location of a variable template-id. * constexpr.c (cxx_eval_constant_expression): Get expr location before stripping location wrappers. (non_const_var_error): Take location argument. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278755 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-27 PR debug/92664Jakub Jelinek
* dwarf2out.c (lookup_filename): Use "<stdin>" instead of "". git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278752 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-27Daily bump.GCC Administrator
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278751 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-27/cpPaolo Carlini
2019-11-26 Paolo Carlini <paolo.carlini@oracle.com> * typeck.c (cp_build_unary_op): Consistently use the accurate location in seven additional diagnostic messages. (cp_build_compound_expr): Use cp_expr_loc_or_input_loc in one place. /testsuite 2019-11-26 Paolo Carlini <paolo.carlini@oracle.com> * g++.dg/cpp1z/bool-increment1.C: Test location(s) too. * g++.dg/expr/bitfield3.C: Likewise. * g++.dg/expr/bitfield4.C: Likewise. * g++.dg/expr/bitfield5.C: Likewise. * g++.dg/expr/bitfield6.C: Likewise. * g++.dg/expr/bool1.C: Likewise. * g++.dg/expr/bool2.C: Likewise. * g++.dg/expr/bool3.C: Likewise. * g++.dg/expr/bool4.C: Likewise. * g++.dg/expr/lval3.C: Likewise. * g++.dg/other/error18.C: Likewise. * g++.dg/warn/Wpointer-arith-1.C: Likewise. * g++.old-deja/g++.bugs/900212_01.C: Likewise. * g++.old-deja/g++.bugs/900428_02.C: Likewise. * g++.old-deja/g++.jason/rfg14.C: Likewise. * g++.old-deja/g++.other/overload11.C: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278743 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-26PR tree-optimization/92683 - strncmp incorrect result with equal substrings ↵Martin Sebor
and non-const bound gcc/testsuite/ChangeLog: PR tree-optimization/92683 * gcc.dg/strcmpopt_8.c: New test. * gcc.dg/strcmpopt_9.c: New test. gcc/ChangeLog: PR tree-optimization/92683 * gimple-fold.c (gimple_fold_builtin_string_compare): Restore a test inadvertently removed in a previous change. Rename local variable for clarity. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278742 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-26Update vect_char_add target selector to use its own cacheJoel Hutton
This patch updates the vect_char_add target selector to use its own cache instead of the vect_int cache. This was causing a situation where bb-slp-40.c would fail on sparc when run after other tests that use the vect_int target selector, but pass when run on its own. 2019-11-26 Joel Hutton <Joel.Hutton@arm.com> gcc/testsuite/ PR testsuite/92391 * lib/target-supports.exp (check_effective_target_vect_char_add): Use a separate cache entry from vect_int. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278738 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-26 PR c++/92648Jakub Jelinek
* parser.c (cp_parser_std_attribute): For unknown attributes, skip balanced token seq instead of trying to parse attribute-argument-clause as expression list. Formatting fix. * g++.dg/cpp0x/gen-attrs-71.C: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278737 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-26 PR c++/61414Jakub Jelinek
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278736 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-26 Insert missed log entry.Jerry DeLisle
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278735 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-26 Remove entry committed to wrong log.Jerry DeLisle
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278734 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-26Unbreak objc build – with --enable-maintainer-modeTobias Burnus
* Makefile.in (aclocal_deps): Fix path to cet.m4. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278732 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-26libstdc++: Use C++98 syntax to instantiate input_iterator_tagFrançois Dumont
* include/debug/helper_functions.h (__valid_range_aux): Use C++98 std::input_iterator_tag default constructor invocation. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278731 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-26c++-coroutines - Address review comments, naming in coroutine header.Iain Sandoe
Use libstdc naming convention, also ensure a reserved identifier is used for comparison selection. 2019-11-26 Iain Sandoe <iain@sandoe.co.uk> libstdc++-v3/ * include/experimental/coroutine: Use GNU convention for naming. Use implementation-reserved identifiers. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/c++-coroutines@278724 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-262019-11-26 Richard Biener <rguenther@suse.de>Richard Biener
PR middle-end/92669 * cfganal.c (pre_and_rev_post_order_compute_fn): Deal with NULL pre_order. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278723 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-26 PR sanitizer/92154Jakub Jelinek
* sanitizer_common/sanitizer_platform_limits_posix.h: Cherry-pick llvm-project revision 947f9692440836dcb8d88b74b69dd379d85974ce. * sanitizer_common/sanitizer_platform_limits_posix.cpp: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278722 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-26S/390: Add undef for MUSL_DYNAMIC_LINKERxxRobin Dapp
This fixes the s390 bootstrap by undefining existing defines before redefining them. gcc/ChangeLog: 2019-11-26 Robin Dapp <rdapp@linux.ibm.com> * config/s390/linux.h: Add undef for MUSL_DYNAMIC_LINKERxx. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278721 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-26 PR tree-optimization/92644Jakub Jelinek
* tree-ssa-phiopt.c (minmax_replacement): Add INTEGRAL_TYPE_P check next to INTEGER_CST checks. * g++.dg/opt/pr92644.C: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278720 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-262019-11-26 Richard Biener <rguenther@suse.de>Richard Biener
PR tree-optimization/92645 * tree-vect-slp.c (vect_build_slp_tree_2): For unary ops do not build the operation from scalars if the operand is. * gcc.target/i386/pr92645.c: New testcase. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278719 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-26libstdc++: Add C++20 P1032 constexpr to _GLIBCXX_DEBUG arrayFrançois Dumont
* include/debug/array (array<>::fill): Add C++20 constexpr. (array<>::swap): Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278718 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-26libstdc++: Add _GLIBCXX_DEBUG safe iterator C++20 iterator conceptFrançois Dumont
* include/debug/safe_iterator.h [__cpp_lib_concepts](_Safe_iterator<>::iterator_concept): Define for C++20. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278717 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-26Daily bump.GCC Administrator
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278716 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-25 * gfortran.dg/dec-comparison.f90: Change dg-do from run to compile.Jakub Jelinek
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278713 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-25Fix typo in C++2a paper number - P1920R1 -> P1902R1Jakub Jelinek
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278707 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-252019-11-25 Harald Anlauf <anlauf@gmx.de>Harald Anlauf
PR fortran/92629 * simplify.c (convert_mpz_to_unsigned): Skip assert for argument range when -fno-range-check is specified. PR fortran/92629 * gfortran.dg/pr92629.f90: New testcase. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278699 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-25libstdc++: Add move_sentinel, common_iterator and counted_iteratorJonathan Wakely
This implements most of the remaining C++20 additions to the <iterator> header. * include/bits/iterator_concepts.h (ranges::iter_swap): Fix parameter types of poison pill overload. Use remove_reference_t when checking constraints. * include/bits/stl_iterator.h (move_sentinel): Define for C++20. (move_iterator): Adjust definitions of nested types for C++20. Add hidden friends for move_sentinel operations, iter_move and iter_swap. (common_iterator, counted_iterator): Define for C++20. * testsuite/24_iterators/move_iterator/cust.cc: New test. * testsuite/24_iterators/move_iterator/sentinel.cc: New test. * testsuite/24_iterators/common_iterator/1.cc: New test. * testsuite/24_iterators/counted_iterator/1.cc: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278698 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-25PR libstdc++/91786 fix compilation error with ClangJonathan Wakely
PR libstdc++/91786 * include/bits/fs_path.h (filesystem_error): Move definition before the use in u8path. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278697 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-25config/gcn/mkoffload.c – remove unused static varsTobias Burnus
* config/gcn/mkoffload.c (COMMENT_PREFIX, struct id_map, func_ids, funcs_tail, var_ids, vars_tail) Remove unused definitions. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278688 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-25Update dump message in IPA ICF.Martin Liska
2019-11-25 Martin Liska <mliska@suse.cz> * ipa-icf.c (sem_item_optimizer::dump_cong_classes): Clean up used dump message. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278687 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-25Comment too strict checking assert.Martin Liska
2019-11-25 Martin Liska <mliska@suse.cz> PR bootstrap/92653 * ipa-fnsummary.c (ipa_fn_summary::account_size_time): Comment out too strict checking assert. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278686 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-25/gccPaolo Carlini
2019-11-25 Paolo Carlini <paolo.carlini@oracle.com> * typeck.c (cp_build_indirect_ref_1): Add location_t parameter and use it in error messages. (build_x_indirect_ref): Adjust call. (build_indirect_ref): Likewise. (cp_build_fold_indirect_ref): Likewise. (cp_build_array_ref): Likewise. * call.c (build_new_op_1): Likewise. * semantics.c (finish_omp_clauses): Likewise. (finish_omp_depobj): Likewise. * typeck2.c (build_x_arrow): Likewise. * cp-tree.h (cp_build_indirect_ref): Update declaration. * call.c (build_new_op_1): Use location argument in warning_at. * typeck.c (cp_build_modify_expr): Consistently use the location_t argument. /libcc1 2019-11-25 Paolo Carlini <paolo.carlini@oracle.com> * libcp1plugin.cc (plugin_pragma_push_user_expression): Update cp_build_indirect_ref call. /gcc/testsuite 2019-11-25 Paolo Carlini <paolo.carlini@oracle.com> * g++.dg/diagnostic/base-operand-non-pointer-1.C: New. * g++.dg/pr53055.C: Check location too. * g++.old-deja/g++.bugs/900213_02.C: Likewise. * g++.old-deja/g++.bugs/900215_02.C: Likewise. * g++.old-deja/g++.other/badarrow.C: Likewise. * g++.old-deja/g++.other/deref1.C: Likewise. * g++.dg/warn/Wenum-compare.C: Check location too. * g++.dg/cpp0x/initlist26.C: Check location too. * g++.dg/cpp0x/initlist28.C: Likewise. * g++.dg/cpp0x/initlist29.C: Likewise. * g++.dg/cpp0x/initlist33.C: Likewise. * g++.dg/expr/string-2.C: Likewise. * g++.dg/other/ptrmem5.C: Likewise. * g++.old-deja/g++.benjamin/14664-1.C: Likewise. * g++.old-deja/g++.benjamin/14664-2.C: Likewise. * g++.old-deja/g++.brendan/init12.C: Likewise. * g++.old-deja/g++.bugs/900324_04.C: Likewise. * g++.old-deja/g++.ext/array1.C: Likewise. * g++.old-deja/g++.jason/rfg17.C: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278685 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-25Prevent all uses of DFP when unsupported (PR c/91985).Joseph Myers
Code that directly uses _Decimal* types on architectures not supporting DFP is properly diagnosed ("error: decimal floating-point not supported for this target"), via a call to targetm.decimal_float_supported_p, if the _Decimal32, _Decimal64 or _Decimal128 keywords are used to access it. Use via mode attributes is also diagnosed ("unable to emulate 'SD'"); so is use of the FLOAT_CONST_DECIMAL64 pragma. However, it is possible to access those types via typeof applied to constants or built-in functions without such an error. I expect that there are ways to get an ICE from this; certainly it uses a completely undefined ABI. This patch arranges for the types not to exist in the compiler at all when DFP is not supported. As is done with unsupported _FloatN / _FloatNx types, the global tree nodes are left as NULL_TREE, and the built-in function machinery is made to use error_mark_node for them in that case in builtin-types.def, so that the built-in functions are unavailable. Code handling constants is adjusted to give an error, and other code that might not work with the global tree nodes being NULL_TREE is also updated. Bootstrapped with no regressions for x86_64-pc-linux-gnu. Also tested with no regressions for cross to aarch64-linux-gnu, as a configuration without DFP support. PR c/91985 gcc: * builtin-types.def (BT_DFLOAT32, BT_DFLOAT64, BT_DFLOAT128) (BT_DFLOAT32_PTR, BT_DFLOAT64_PTR, BT_DFLOAT128_PTR): Define to error_mark_node if corresponding global tree node is NULL. * tree.c (build_common_tree_nodes): Do not initialize dfloat32_type_node, dfloat64_type_node or dfloat128_type_node if decimal floating-point not supported. gcc/c: * c-decl.c (finish_declspecs): Use int instead of decimal floating-point types if decimal floating-point not supported. gcc/c-family: * c-common.c (c_common_type_for_mode): Handle decimal floating-point types being NULL_TREE. * c-format.c (get_format_for_type_1): Handle specified types being NULL_TREE. * c-lex.c (interpret_float): Give an error for decimal floating-point constants when decimal floating-point not supported. gcc/lto: * lto-lang.c (lto_type_for_mode): Handle decimal floating-point types being NULL_TREE. gcc/testsuite: * gcc.dg/c2x-no-dfp-1.c, gcc.dg/gnu2x-builtins-no-dfp-1.c: New tests. * gcc.dg/fltconst-pedantic-dfp.c: Expect errors when decimal floating-point not supported. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278684 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-25Properly handle C2x attributes on types.Joseph Myers
attribs.c has code to ignore all scoped attributes appertaining to types except when they are part of the definition of that type. I think the premise of that code is incorrect, and its presence is a bug; such attributes are clearly valid in both C and C++, which explicitly specify that attributes in certain syntactic positions appertain to a particular type, only for that use of that type and not for other uses of the same type specifiers without that attribute specified, and while the standard attributes in C2x aren't relevant in such contexts, some gnu:: attributes certainly are. Where some attributes are invalid on some types in such contexts, that's a matter for the individual attribute handlers to diagnose (or the front end if the requirements on a standard attribute in the standard are more strict than those of a handler shared with a GNU attribute). Thus, this patch removes the bogus code to allow such attributes to be used. Doing so (and adding tests for attributes in such positions) shows up that the logic in the C front end for creating the c_declarator structures for such attributes put them in the wrong place relative to the structures for function and array types, and the logic for postfix attributes on a list of declaration specifiers failed to handle some cases, so those bugs are also fixed in this patch. Bootstrapped with no regressions for x86_64-pc-linux-gnu. gcc: * attribs.c (decl_attributes): Do not ignore C++11 attributes on types. gcc/c: * c-tree.h (struct c_declarator): Use a structure for id member. * c-decl.c (grokdeclarator): Extract attributes from cdk_id declarators at the start, not when handling individual declarators later. Use u.id.id instead of u.id. (grokfield): Use u.id.id instead of u.id. (build_id_declarator): Set u.id.id and u.id.attrs. (finish_declspecs): Handle postfix attributes in case of typedef name or typeof used. * c-parser.c (c_parser_direct_declarator) (c_parser_direct_declarator_inner): Place declarator for attributes inside that for function or array, not outside. Set u.id.attrs for identifiers. (c_parser_parameter_declaration): Use u.id.id instead of u.id. * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id instead of u.id. gcc/testsuite: * gcc.dg/gnu2x-attrs-1.c: Do not expect message about attributes appertaining to types. * gcc.dg/gnu2x-attrs-2.c: New test. * g++.dg/cpp0x/gen-attrs-1.C, g++.dg/cpp0x/gen-attrs-22.C, g++.dg/cpp0x/gen-attrs-4.C, g++.dg/cpp0x/lambda/lambda-attr1.C: Update expected diagnostics. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278683 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-25c++-coroutines - merge trunk 278677Iain Sandoe
2019-11-25 Iain Sandoe <iain@sandoe.co.uk> Merge trunk r278677. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/c++-coroutines@278682 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-25Convert m68k to not use cc0Bernd Schmidt
* config/m68k/m68k.c (output_move_himode, output_move_qimode): Replace code for non-CONST_INT constants with gcc_unreachable. * config/m68k/m68k.md (cbranchdi): Don't generate individual compare and test. (CMPMODE): New mode_iterator. (cbranchsi4, cbranchqi4, cbranchhi4): Replace expanders with cbranch<mode>4. (cstoresi4, cstoreqi4, cstorehi4): Replace expanders with cstore<mode>4. (cmp<mode>_68881): Remove 'F' constraint from first comparison operand. (bit test insns patterns): Use nonimmediate_operand, not register_operand, for source operands that allow memory in their constraints. (divmodsi4, udivmodsi4, divmodhi4 and related unnamed patterns): Use register_operand, not nonimmediate_operand, for the destinations. (DBCC): New mode_iterator. (dbcc peepholes): Use it to reduce duplication. (trap): Use const_true_rtx, not const1_rtx. * config/m68k/predicates.md (m68k_comparison_operand): Renamed from m68k_subword_comparison_operand and changed to handle SImode. PR target/91851 * config/m68k/m68k-protos.h (output-dbcc_and_branch): Adjust declaration. (m68k_init_cc): New declaration. (m68k_output_compare_di, m68k_output_compare_si) (m68k_output_compare_hi, m68k_output_compare_qi) (m68k_output_compare_fp, m68k_output_btst, m68k_output_bftst) (m68k_find_flags_value, m68k_output_scc, m68k_output_scc_float) (m68k_output_branch_integer, m68k_output_branch_integer_rev. m68k_output_branch_float, m68k_output_branch_float_rev): Likewise. (valid_dbcc_comparison_p_2, flags_in_68881) (output_btst): Remove declaration. * config/m68k/m68k.c (INCLDUE_STRING): Define. (TARGET_ASM_FINAL_POSTSCAN_INSN): Define. (valid_dbcc_comparison_p_2, flags_in_68881): Delete functions. (flags_compare_op0, flags_compare_op1, flags_operand1, flags_operand2, flags_valid): New static variables. (m68k_find_flags_value, m68k_init_cc): New functions. (handle_flags_for_move, m68k_asm_final_postscan_insn, remember_compare_flags): New static functions. (output_dbcc_and_branch): New argument CODE. Use it, and add PLUS and MINUS to the possible codes. All callers changed. (m68k_output_btst): Renamed from output_btst. Remove OPERANDS and INSN arguments, add CODE arg. Return the comparison code to use. All callers changed. Use CODE instead of next_insn_tests_no_inequality, and replace cc_status management with changing the return code. (m68k_rtx_costs): Instead of testing for COMPARE, test for RTX_COMPARE or RTX_COMM_COMPARE. (output_move_simode, output_move_qimode): Call handle_flags_for_move. (notice_update_cc): Delete function. (m68k_output_bftst, m68k_output_compare_di, m68k_output_compare_si, m68k_output_compare_hi, m68k_output_compare_qi, m68k_output_compare_fp, m68k_output_branch_integer, m68k_output_branch_integer_rev, m68k_output_scc, m68k_output_branch_float, m68k_output_branch_float_rev, m68k_output_scc_float): New functions. (output_andsi3, output_iorsi3, output_xorsi3): Call CC_STATUS_INIT once at the start, and set flags_valid and flags_operand1 if the flags are usable. * config/m68k/m68k.h (CC_IN_68881, NOTICE_UPDATE_CC, CC_OVERFLOW_UNUSABLE, CC_NO_CARRY, OUTPUT_JUMP): Remove definitions. (CC_STATUS_INIT): Define. * config/m68k/m68k.md (flags_valid): New define_attr. (tstdi, tstsi_internal_68020_cf, tstsi_internal, tsthi_internal, tstqi_internal, tst<mode>_68881, tst<mode>_cf, cmpdi_internal, cmpdi, unnamed cmpsi/cmphi/cmpqi patterns, cmpsi_cf, cmp<mode>_68881, cmp<mode>_cf, unnamed btst patterns, tst_bftst_reg, tst_bftst_reg, unnamed scc patterns, scc, sls, sordered_1, sunordered_1, suneq_1, sunge_1, sungt_1, sunle_1, sunlt_1, sltgt_1, fsogt_1, fsoge_1, fsolt_1, fsole_1, bge0_di, blt0_di, beq, bne, bgt, bgtu, blt, bltu, bge, bgeu, ble, bleu, bordered, bunordered, buneq, bunge, bungt, bunle, bunlt, bltgt, beq_rev, bne_rev, bgt_rev, bgtu_rev, blt_rev, bltu_rev, bge_rev, bgeu_rev, ble_rev, bleu_rev, bordered_rev, bunordered_rev, buneq_rev, bunge_rv, bungt_rev, bunle_rev, bunlt_rev, bltgt_rev, ctrapdi4, ctrapsi4, ctraphi4, ctrapqi4, conditional_trap): Delete patterns. (cbranchdi4_insn): New pattern. (cbranchdi4): Don't generate cc0 patterns. When testing LT or GE, test high part only. When testing EQ or NE, generate beq0_di and bne0_di patterns directly. (cstoredi4): When testing LT or GE, test high part only. (both sets of cbranch<mode>4, cstore<mode>4): Don't generate cc0 patterns. (scc0_constraints, cmp1_constraints, cmp2_constraints, scc0_cf_constraints, cmp1_cf_constraints, cmp2_cf_constraints, cmp2_cf_predicate): New define_mode_attrs. (cbranch<mode>4_insn, cbranch<mode>4_insn_rev, cbranch<mode>4_insn_cf, cbranch<mode>4_insn_cf_rev, cstore<mode>4_insn, cstore<mode>4_insn_cf for integer modes) New patterns. (cbranch<mode>4_insn_68881, cbranch<mode>4_insn_rev_68881): (cbranch<mode>4_insn_cf, cbranch<mode>4_insn_rev_cf, cstore<mode>4_insn_68881, cstore<mode>4_insn_cf for FP): New patterns. (cbranchsi4_btst_mem_insn, cbranchsi4_btst_reg_insn, cbranchsi4_btst_mem_insn_1, cbranchsi4_btst_reg_insn_1): Likewise. (BTST): New define_mode_iterator. (btst_predicate, btst_constraint, btst_range): New define_mode_attrs. (cbranch_bftst<mode>_insn, cstore_bftst<mode>_insn): New patterns. (movsi_m68k_movsi_m68k2, movsi_cf, unnamed movstrict patterns, unnamed movhi and movqi patterns, unnamed movsf, movdf and movxf patterns): Set attr "flags_valid". (truncsiqi2, trunchiqi2, truncsihi2): Remove manual CC_STATUS management. Set attr "flags_valid". (extendsidi2, extendplussidi, unnamed float_extendsfdf pattern, extendsfdf2_cf, fix_truncdfsi2, fix_truncdfhi2, fix_truncdfqi2, addi_sexthishl32, adddi_dilshr32, adddi_dilshr32_cf, addi_dishl32, subdi_sexthishl32, subdi_dishl32, subdi3): Remove manual CC_STATUS management. (addsi3_internal, addhi3, addqi3, subsi3, subhi3, subqi3, unnamed strict_lowpart subhi and subqi patterns): Set attr "flags_valid". (unnamed strict_lowpart addhi3 and addqi3 patterns): Likewise. Remove code to operate on address regs and assert the case does not occur. (unnamed mulsidi patterns, divmodhi4, udivmodhi4): Remove manual CC_STATUS_INIT. (andsi3_internal, andhi3, andqi3, iorsi3_internal, iorhi3, iorqi3, xorsi3_internal, xorhi3, xorqi3, negsi2_internal, negsi2_5200, neghi2, negqi2, one_cmplsi2_internal, one_cmplhi2, one_cmplqi2, unnamed strict_lowpart patterns for andhi, andqi, iorhi, iorqi, xorhi, xorqi, neghi, negqi, one_cmplhi and one_cmplqi): Set attr "flags_valid". (iorsi_zext_ashl16, iorsi_zext): Remove manual CC_STATUS_INIT. (ashldi_sexthi, ashlsi_16, ashlsi_17_24): Remove manual CC_STATUS_INIT. (ashlsi3, ashlhi3, ashlqi3, ashrsi3, ashrhi3, ashrqi3, lshrsi3, lshrhi3, shrqi3, rotlsi3, rotlhi3, rotlhi3_lowpart, rotlqi3, rotlqi3_lowpart, rotrsi3, rotrhi3, rotrhi_lowpart, rotrqi3, unnamed strict_low_part patterns for HI and QI versions): Set attr "flags_valid". (bsetmemqi, bsetmemqi_ext, bsetdreg, bchgdreg, bclrdreg, bclrmemqi, extzv_8_16_reg, extzv_bfextu_mem, insv_bfchg_mem, insv_bfclr_mem, insv_bfset_mem, extv_bfextu_reg, insv_bfclr_reg, insv_bfset_reg, dbne_hi, dbne_si, dbge_hi, dbge_si, extendsfxf2, extenddfxf2, ): Remove manual cc_status management. (various unnamed peepholes): Adjust compare/branch sequences for new cbranch patterns. (dbcc peepholes): Likewise, and output the comparison here as well. * config/m68k/predicates.md (valid_dbcc_comparison_p): Delete. (fp_src_operand): Allow constant zero. (address_reg_operand): New predicate. * rtl.h (inequality_comparisons_p): Remove declaration. * recog.h (next_insn_tests_no_inequality): Likewise. * rtlanal.c (inequality_comparisons_p): Delete function. * recog.c (next_insn_tests_no_inequality): Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278681 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-25Testsuite: Enable fp-int-convert-timode-1.c unconditionally when int128 ↵Tamar Christina
supported. This removes the call to fesetround as FE_TONEAREST is the default and so the guard can be removed as well. The test will then run as long as there's int128 support. gcc/testsuite/ChangeLog: * gcc.dg/torture/fp-int-convert-timode-1.c: Always run if int128. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278680 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-252019-11-25 Richard Biener <rguenther@suse.de>Richard Biener
* tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Add assertion. (vect_detect_hybrid_slp): Swap lane and instance iteration, properly re-building the visited hash-map for each lane. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278679 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-25[amdgcn] Silence warnings + add gcc_unreachable()Tobias Burnus
* config/gcn/gcn.c (gcn_expand_scalar_to_vector_address, gcn_md_reorg): Remove unused variables. (gcn_emutls_var_init): Add missing (but unreachable) return to silence warning. (gcn_hsa_declare_function_name): Add gcc_unreachable to ensure target != TARGET_GCN3 or TARGET_GCN3 will fail instead of use an uninitialized variable. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278678 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-25 PR ada/92362Eric Botcazou
* gcc-interface/trans.c (gnat_to_gnu) <N_Attribute_Definition_Clause>: Use a temporary instead of clobbering the result with a freeze node. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278675 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-25DEC comparisons - allow Hollerith constants in comparisons.Mark Eggleston
The -fdec option enables the use of Hollerith comparisons in comparisons with INTEGER, COMPLEX, REAL and CHARACTER expressions. Mark Eggleston <mark.eggleston@codethink.com> Jim MacArthur <jim.macarthur@codethink.co.uk> * gfortran.texi: Update Hollerith constants support for character types and use in comparisons. * invoke.texi: Tidy up list of options. Update description of -fdec-char-conversions. * resolve.c (is_character_based): New. (Convert_hollerith_to_character): New. (convert_to_numeric): New. (resolve_operator): If both sides are character based and -fdec is enabled convert Hollerith to character. If an operand is Hollerith, the other is numeric and -fdec is enabled convert to numeric. (resolve_ordinary_assign): Add check for -fdec-char-conversions for assignment of character literals. Mark Eggleston <mark.eggleston@codethink.com> Jim MacArthur <jim.macarthur@codethink.co.uk> * gfortran.dg/dec-comparison-character_1.f90: New test. * gfortran.dg/dec-comparison-character_2.f90: New test. * gfortran.dg/dec-comparison-character_3.f90: New test. * gfortran.dg/dec-comparison-complex_1.f90: New test. * gfortran.dg/dec-comparison-complex_2.f90: New test. * gfortran.dg/dec-comparison-complex_3.f90: New test. * gfortran.dg/dec-comparison-int_1.f90: New test. * gfortran.dg/dec-comparison-int_2.f90: New test. * gfortran.dg/dec-comparison-int_3.f90: New test. * gfortran.dg/dec-comparison-real_1.f90: New test. * gfortran.dg/dec-comparison-real_2.f90: New test. * gfortran.dg/dec-comparison-real_3.f90: New test. * gfortran.dg/dec-comparison.f90: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278674 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-25 PR ada/92575Eric Botcazou
* expect.c (__gnat_expect_poll [VMS, HPUX]): Fix typo. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278671 138bc75d-0d04-0410-961f-82ee72b054a4
2019-11-25ipa: Prevent materialization of clones with removed bodies (PR 92109)Martin Jambor
2019-11-25 Martin Jambor <mjambor@suse.cz> PR ipa/92109 * cgraph.h (cgraph_node::remove_from_clone_tree): Declare. * cgraphclones.c (cgraph_node::remove_from_clone_tree): New method. (cgraph_materialize_clone): Move removel from clone tree to the the new method and use it instead. * ipa.c (symbol_table::remove_unreachable_nodes): When removing bodies of clones, also remove it from the clone tree. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278670 138bc75d-0d04-0410-961f-82ee72b054a4