- 06 Oct, 2019 4 commits
-
-
* include/bits/stl_iterator_base_types.h (__iterator_category_t): Define for C++11. (_RequireInputIte): Likewise and use __enable_if_t. * include/std/numeric (__is_random_access_iter): Use __iterator_category_t. From-SVN: r276637
François Dumont committed -
* include/bits/stl_algo.h (copy_n): Add __glibcxx_requires_can_increment debug checks. * testsuite/25_algorithms/copy_n/debug/1_neg.cc: New. * testsuite/25_algorithms/copy_n/debug/2_neg.cc: New. From-SVN: r276636
François Dumont committed -
This fixes two error messages to avoid punctuation and contracted negations. gcc/ChangeLog: 2019-10-06 Iain Sandoe <iain@sandoe.co.uk> * config/darwin.c (darwin_override_options): Adjust objective-c ABI version error messages to avoid punctuation and contracted negations. From-SVN: r276635
Iain Sandoe committed -
From-SVN: r276634
GCC Administrator committed
-
- 05 Oct, 2019 9 commits
-
-
In my previous commit, I managed to include a duplicate copy of the ChangeLog file. This commit removes the duplicate portion. From-SVN: r276630
Steven G. Kargl committed -
* ipa-inline.c: Fix type; compute size rather than self_size for size of caller function. From-SVN: r276629
Jan Hubicka committed -
re PR fortran/47054 (Compilation error when cray pointers are declared in both host and internal subroutines) 2019-10-05 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/47045 * decl.c (variable_decl): Do not search parent namespace for symbol. 2019-10-05 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/47045 * gfortran.dg/pr47054_1.f90: New test * gfortran.dg/pr47054_2.f90: Ditto. From-SVN: r276627
Steven G. Kargl committed -
2019-10-05 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/91497 * gfortran.dg/pr91497.f90: Run on i?86-*-* and x86_64-*-* only. From-SVN: r276626
Steven G. Kargl committed -
2019-10-05 Paul Thomas <pault@gcc.gnu.org> PR fortran/91926 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Correct the assignment of the attribute field to account correctly for an assumed shape dummy. Assign separately to the gfc and cfi descriptors since the atribute can be different. Add btanch to correctly handle missing optional dummies. 2019-10-05 Paul Thomas <pault@gcc.gnu.org> PR fortran/91926 * gfortran.dg/ISO_Fortran_binding_13.f90 : New test. * gfortran.dg/ISO_Fortran_binding_13.c : Additional source. * gfortran.dg/ISO_Fortran_binding_14.f90 : New test. 2019-10-05 Paul Thomas <pault@gcc.gnu.org> PR fortran/91926 * runtime/ISO_Fortran_binding.c (cfi_desc_to_gfc_desc): Do not modify the bounds and offset for CFI_other. From-SVN: r276624
Paul Thomas committed -
Darwin's linker doesn't like text section relocations (they require special enabling). At least, the Fortran FE seems to generate cases where the initialiser for a pointer constant can need a relocation. We can handle this by special-casing SECCAT_RODATA when the relocation is present by placing the constant in the .const_data section. gcc/ChangeLog: 2019-10-05 Iain Sandoe <iain@sandoe.co.uk> PR target/59888 * config/darwin.c (darwin_rodata_section): Add relocation flag, choose const_data section for constants with relocations. (machopic_select_section): Pass relocation flag to darwin_rodata_section (). From-SVN: r276623
Iain Sandoe committed -
PR c++/91369 - Implement P0784R7: constexpr new c-family/ * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a. cp/ * cp-tree.h (enum cp_tree_index): Add CPTI_HEAP_UNINIT_IDENTIFIER, CPTI_HEAP_IDENTIFIER and CPTI_HEAP_DELETED_IDENTIFIER. (heap_uninit_identifier, heap_identifier, heap_deleted_identifier): Define. (type_has_constexpr_destructor, build_new_constexpr_heap_type, cxx_constant_dtor): Declare. * class.c (type_maybe_constexpr_default_constructor): Make static. (type_maybe_constexpr_destructor, type_has_constexpr_destructor): New functions. (finalize_literal_type_property): For c++2a, don't clear CLASSTYPE_LITERAL_P for types without trivial destructors unless they have non-constexpr destructors. (explain_non_literal_class): For c++2a, complain about non-constexpr destructors rather than about non-trivial destructors. * constexpr.c: Include stor-layout.h. (struct constexpr_global_ctx): New type. (struct constexpr_ctx): Add global field, remove values and constexpr_ops_count. (cxx_replaceable_global_alloc_fn): New inline function. (cxx_eval_call_expression): For c++2a allow calls to replaceable global allocation functions, for new return address of a heap uninit var, for delete record its deletion. Change ctx->values->{get,put} to ctx->global->values.{get,put}. (non_const_var_error): Add auto_diagnostic_group sentinel. Emit special diagnostics for heap variables. (cxx_eval_store_expression): Change ctx->values->{get,put} to ctx->global->values.{get,put}. (cxx_eval_loop_expr): Initialize jump_target if NULL. Change new_ctx.values->remove to ctx->global->values.remove. (cxx_eval_constant_expression): Change *ctx->constexpr_ops_count to ctx->global->constexpr_ops_count. Change ctx->values->{get,put} to ctx->global->values.{get,put}. <case NOP_EXPR>: Formatting fix. On cast of replaceable global allocation function to some pointer type, adjust the type of the heap variable and change name from heap_uninit_identifier to heap_identifier. (find_heap_var_refs): New function. (cxx_eval_outermost_constant_expr): Add constexpr_dtor argument, handle evaluation of constexpr dtors and add tracking of heap variables. Use tf_no_cleanup for get_target_expr_with_sfinae. (cxx_constant_value): Adjust cxx_eval_outermost_constant_expr caller. (cxx_constant_dtor): New function. (maybe_constant_value, fold_non_dependent_expr_template, maybe_constant_init_1): Adjust cxx_eval_outermost_constant_expr callers. (potential_constant_expression_1): Ignore clobbers. Allow COND_EXPR_IS_VEC_DELETE for c++2a. * decl.c (initialize_predefined_identifiers): Add heap identifiers. (decl_maybe_constant_destruction): New function. (cp_finish_decl): Don't clear TREE_READONLY for constexpr variables with non-trivial, but constexpr destructors. (register_dtor_fn): For constexpr variables with constexpr non-trivial destructors call cxx_maybe_build_cleanup instead of adding destructor calls at runtime. (expand_static_init): For constexpr variables with constexpr non-trivial destructors call cxx_maybe_build_cleanup. (grokdeclarator): Allow constexpr destructors for c++2a. Formatting fix. (cxx_maybe_build_cleanup): For constexpr variables with constexpr non-trivial destructors call cxx_constant_dtor instead of adding destructor calls at runtime. * init.c: Include stor-layout.h. (build_new_constexpr_heap_type, maybe_wrap_new_for_constexpr): New functions. (build_new_1): For c++2a and new[], add cast around the alloc call to help constexpr evaluation figure out the type of the heap storage. (build_vec_delete_1): Set DECL_INITIAL of tbase and emit a DECL_EXPR for it instead of initializing an uninitialized variable. * method.c: Include intl.h. (SFK_CTOR_P, SFK_DTOR_P, SFK_ASSIGN_P, SFK_COPY_P, SFK_MOVE_P): Move definitions earlier. (process_subob_fn): Add sfk argument, adjust non-constexpr call diagnostics based on it. (walk_field_subobs): Formatting fixes. Adjust process_subob_fn caller. (synthesized_method_base_walk): Likewise. (synthesized_method_walk): Set *constexpr_p to true for dtors in c++2a. Fix up DR number in comment. (implicitly_declare_fn): Formatting fix. * typeck2.c (store_init_value): Don't call cp_fully_fold_init on initializers of automatic non-constexpr variables in constexpr functions. testsuite/ * g++.dg/cpp0x/constexpr-delete2.C: Adjust expected diagnostics for c++2a. * g++.dg/cpp0x/locations1.C: Only expect constexpr ~S() diagnostics in c++17_down, adjust expected wording. * g++.dg/cpp1y/constexpr-new.C: Only expect diagnostics in c++17_down. * g++.dg/cpp2a/constexpr-dtor1.C: New test. * g++.dg/cpp2a/constexpr-dtor2.C: New test. * g++.dg/cpp2a/constexpr-dtor3.C: New test. * g++.dg/cpp2a/constexpr-new1.C: New test. * g++.dg/cpp2a/constexpr-new2.C: New test. * g++.dg/cpp2a/constexpr-new3.C: New test. * g++.dg/cpp2a/constexpr-new4.C: New test. * g++.dg/cpp2a/feat-cxx2a.C: Add __cpp_constinit and __cpp_constexpr_dynamic_alloc tests. Tweak __cpp_* tests for c++2a features to use style like older features, including #ifdef test. * g++.dg/ext/is_literal_type3.C: New test. From-SVN: r276622
Jakub Jelinek committed -
PR tree-optimization/91734 * generic-match-head.c: Include fold-const-call.h. * match.pd (sqrt(x) cmp c): Check the boundary value and in case inexact computation of c*c affects comparison of the boundary, turn LT_EXPR into LE_EXPR, GE_EXPR into GT_EXPR, LE_EXPR into LT_EXPR or GT_EXPR into GE_EXPR. Punt for sqrt comparisons against NaN and for -frounding-math. For c2, try the next smaller or larger floating point constant depending on comparison code and if it has the same sqrt as c2, use it instead of c2. * gcc.dg/pr91734.c: New test. From-SVN: r276621
Jakub Jelinek committed -
From-SVN: r276618
GCC Administrator committed
-
- 04 Oct, 2019 27 commits
-
-
C2x adds strftime %OB and %Ob formats, for alternative forms of month names (for mainly Slavic languages where a month name on its own is declined differently from a month name together with a date within that month). This patch adds corresponding format checking support. (glibc support for these formats was added in glibc 2.27.) Bootstrapped with no regressions on x86_64-pc-linux-gnu. PR c/82752 gcc/c-family: * c-format.c (C_STD_VER): Handle C2x. (C_STD_NAME): Likewise. (strftime_flag_specs): Add 'O' modifier with 'p' flag. (time_char_table): Use separate entry for 'B' and 'b', with 'O' modifier allowed and 'p' flag. * c-format.h (enum format_std_version): Add STD_C2X. (struct format_char_info): Mention 'p' in comment on flags2. gcc/testsuite: * gcc.dg/format/c2x-strftime-1.c: New test. From-SVN: r276605
Joseph Myers committed -
gcc/ChangeLog: PR middle-end/91977 * tree-ssa-strlen.c (count_nonzero_bytes): Handle assignments with MEM_REF right operand. Avoid failing for MEM_REF assignments from uninitialized objects. gcc/testsuite/ChangeLog: PR middle-end/91977 * gcc.dg/Wstringop-overflow-18.c: New test. From-SVN: r276603
Martin Sebor committed -
gcc/ChangeLog: * builtins.c (compute_objsize): Add an argument. * tree-object-size.c (addr_object_size): Same. (compute_builtin_object_size): Same. * tree-object-size.h (compute_builtin_object): Same. gcc/testsuite/ChangeLog: * gcc.dg/Wstringop-overflow-17.c: New test. From-SVN: r276602
Martin Sebor committed -
2019-10-04 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran.91959 * fortran/decl.c (variable_decl): Re-arrange code for matching %FILL. 2019-10-04 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran.91959 * gfortran.dg/pr91959.f90: New test. From-SVN: r276601
Steven G. Kargl committed -
* include/debug/forward_list (_Sequence_traits<__debug::forward_list<>>::_S_size): Returns __dp_sign distance when not empty. * include/debug/list (_Sequence_traits<__debug::list<>>::_S_size): Likewise. * include/debug/helper_functions.h (__dp_sign_max_size): New _Distance_precision enum entry. (__valid_range_aux(_IIte, _IIte, _Distance_traits<>::__type, __false_type)): Adapt. * include/debug/safe_iterator.tcc (_Safe_iterator<>::_M_get_distance_to(const _Safe_iterator&)): Review distance computation. From-SVN: r276600
François Dumont committed -
From-SVN: r276597
Jan Hubicka committed -
https://gcc.gnu.org/ml/gcc-patches/2019-10/msg00371.html PR preprocessor/91991 * line-map.c (linemap_line_start): Clear max_column_hint if we run out of locations. From-SVN: r276596
Nathan Sidwell committed -
* match.pd (sinh (x) / cosh (x)): New simplification rule. * gcc.dg/sinhovercosh-1.c: New test. From-SVN: r276595
Rafael Tsuha committed -
The machinery that collects types referenced by expressions that are part of inlinable function bodies was missing the types of local named constants in certain cases. This patch updates the Collect_export_references::expression() hook to look for references to local named constants and include their types in the exported set. Fixes golang/go#34577. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/198017 From-SVN: r276594
Ian Lance Taylor committed -
2019-10-04 Martin Jambor <mjambor@suse.cz> * tree-ssa-forwprop.c (simplify_builtin_call): Set gimple call fntype when switching to calling memcpy instead of memset. From-SVN: r276593
Martin Jambor committed -
2019-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de> * hash-table.h (hash_table::empty_slow): Don't assign size_t values to int variables. From-SVN: r276592
Bernd Edlinger committed -
2019-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de> * expr.c (convert_mode_scalar): Remove shadowing local var. (emit_block_move): Rename local vars. (block_move_libcall_safe_for_call_parm): Remove shadowing local var. (emit_push_insn): Rename local vars. (expand_assignment): Fix wrong mode in assign_stack_temp. Remove shadowing local vars. (store_constructor): Remove shadowing local vars. Rename local var. (store_field, expand_cond_expr_using_cmove, expand_expr_real_2): Remove shadowing local vars. (expand_expr_real_1, do_store_flag): Remove shadowing local vars. Rename local vars. From-SVN: r276591
Bernd Edlinger committed -
2019-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de> * cgraph.h (FOR_EACH_ALIAS): Avoid shadowing the loop variable. From-SVN: r276590
Bernd Edlinger committed -
2019-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de> * genmatch.c (commutate): Rename local var. (lower_cond): Reuse local var. (dt_node::gen, dt_node::gen_kids, dt_node::gen_kids_1, dt_operand::gen, dt_operand::gen_gimple_expr, dt_simplify::gen): Add a param. Rename generated vars. (decision_tree::insert_operand, (capture_info::walk_match, capture_info::walk_result, capture_info::walk_c_expr): Rename local vars. (expr::gen_transform): Rename generated vars. Use snprintf. Rename local vars. (capture::gen_transform, dt_operand::get_name, dt_operand::gen_opname): Rename generated vars. (write_predicate): Adjust call to gen_kids. (parser::get_internal_capture_id): Rename generated vars. (parser::parse_expr): Rename local vars. (parser::parse_if): Remove local var. (parser::parse_pattern, add_operator): Rename local vars. From-SVN: r276589
Bernd Edlinger committed -
Various built-in functions that GCC has as extensions are now standard functions in C2x. This patch adds DEF_C2X_BUILTIN and uses it to mark them as such. Some of the so-marked functions were previously DEF_EXT_LIB_BUILTIN, while some DFP ones were DEF_GCC_BUILTIN (i.e. __builtin_* only); both sets become DEF_C2X_BUILTIN. This in turn requires flag_isoc2x to be defined in various front ends using builtins.def. As the semantics of the built-in functions should already be tested, the tests added only verify that they are declared in C2x mode but not in C11 mode. The test of DFP built-in functions being declared for C2x goes in gcc.dg/dfp/, as while such built-in functions currently don't depend on whether DFP is supported, that looks like a bug to me (see bug 91985), so it seems best for the tests not to depend on exactly how that bug might be fixed. Bootstrapped with no regressions on x86_64-pc-linux-gnu. gcc: * builtins.def (DEF_C2X_BUILTIN): New macro. (exp10, exp10f, exp10l, fabsd32, fabsd64, fabsd128, nand32) (nand64, nand128, roundeven, roundevenf, roundevenl, strdup) (strndup): Use DEF_C2X_BUILTIN. * coretypes.h (enum function_class): Add function_c2x_misc. gcc/ada: * gcc-interface/utils.c (flag_isoc2x): New variable. gcc/brig: * brig-lang.c (flag_isoc2x): New variable. gcc/lto: * lto-lang.c (flag_isoc2x): New variable. gcc/testsuite: * gcc.dg/c11-builtins-1.c, gcc.dg/c2x-builtins-1.c, gcc.dg/dfp/c2x-builtins-dfp-1.c: New tests. From-SVN: r276588
Joseph Myers committed -
* ira-color.c (update_costs_from_allocno): Call ira_init_register_move_cost_if_necessary. From-SVN: r276587
Maya Rashish committed -
Enable AC_SYS_LARGEFILE to set the macros needed for large file APIs to be used by default. We do not want to define those macros in the public headers that users include. The values of the macros are copied to a separate file that is only included by the filesystem sources during the build, and then the macros in <bits/c++config.h> are renamed so that they don't have any effect in user code including our headers. Also use larger type for result of filesystem::file_size to avoid truncation of large values on 32-bit systems (PR 91947). PR libstdc++/81091 PR libstdc++/91947 * configure.ac: Use AC_SYS_LARGEFILE to enable 64-bit file APIs. * config.h.in: Regenerate: * configure: Regenerate: * include/Makefile.am (${host_builddir}/largefile-config.h): New target to generate config header for filesystem library. (${host_builddir}/c++config.h): Rename macros for large file support. * include/Makefile.in: Regenerate. * src/c++17/fs_dir.cc: Include new config header. * src/c++17/fs_ops.cc: Likewise. (filesystem::file_size): Use uintmax_t for size. * src/filesystem/dir.cc: Include new config header. * src/filesystem/ops.cc: Likewise. (experimental::filesystem::file_size): Use uintmax_t for size. From-SVN: r276585
Jonathan Wakely committed -
* testsuite/util/testsuite_abi.h: Use std::unordered_map instead of std::tr1::unordered_map. * testsuite/util/testsuite_allocator.h: Likewise. From-SVN: r276584
Jonathan Wakely committed -
* config/h8300/h8300.md (cpymemsi): Disable. (movmd, movmd_internal_<mode>, movstr, movsd): (movstr, movsd, stpcpy_internal_<mode>: Likewise. (movmd splitter, movsd splitter): Likewise. From-SVN: r276582
Jeff Law committed -
* range-op.cc (range_tests): Avoid two tests when ints and shorts are the same size. From-SVN: r276581
Jeff Law committed -
From-SVN: r276580
Mark Eggleston committed -
Also add a couple of missing calls to free after mpz_get_str. This should make the code clean with respect to -Wshadow=local. Based on patch by Bernd Edlinger. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/198837 From-SVN: r276579
Ian Lance Taylor committed -
Fix a big-endian failure reported by Christophe. Also tighten the test so that it doesn't allow saving and restoring 128-bit vectors as Q registers. 2019-10-04 Richard Sandiford <richard.sandiford@arm.com> gcc/testsuite/ * gcc.target/aarch64/torture/simd-abi-8.c: Use -mlittle-endian. Check that there are no Q register saves or restores. From-SVN: r276577
Richard Sandiford committed -
* include/tr1/hashtable.h: Add header for __gnu_cxx::__alloc_traits. From-SVN: r276576
Jonathan Wakely committed -
In C++20 std::allocator will no longer define construct and destroy member functions, so using them needs to go via allocator_traits. * include/tr1/hashtable.h (tr1::_Hashtable::_M_allocate_node): Use __gnu_cxx::__alloc_traits for allocator construct function. (tr1::_Hashtable::_M_deallocate_node): Likewise for destroy function. From-SVN: r276575
Jonathan Wakely committed -
* include/precompiled/stdc++.h: Include <span> for C++20. * testsuite/17_intro/names.cc: Do not define 'e' for C++20. From-SVN: r276574
Jonathan Wakely committed -
2019-10-04 Richard Biener <rguenther@suse.de> * gcc.c-torture/execute/loop-3.c: Fix undefined behavior. From-SVN: r276572
Richard Biener committed
-