- May 22, 2020
-
-
Richard Biener authored
This documents new GCC 10 behavior on diagnostic options and -flto. 2020-05-22 Richard Biener <rguenther@suse.de> PR lto/95190 * doc/invoke.texi (flto): Document behavior of diagnostic options.
-
Richard Biener authored
This tries to enforce a set SLP_TREE_VECTYPE in vect_get_constant_vectors and provides some infrastructure for setting it in the vectorizable_* functions, amending those. 2020-05-22 Richard Biener <rguenther@suse.de> * tree-vectorizer.h (vect_is_simple_use): New overload. (vect_maybe_update_slp_op_vectype): New. * tree-vect-stmts.c (vect_is_simple_use): New overload accessing operands of SLP vs. non-SLP operation transparently. (vect_maybe_update_slp_op_vectype): New function updating the possibly shared SLP operands vector type. (vectorizable_operation): Be a bit more SLP vs non-SLP agnostic using the new vect_is_simple_use overload; update SLP invariant operand nodes vector type. (vectorizable_comparison): Likewise. (vectorizable_call): Likewise. (vectorizable_conversion): Likewise. (vectorizable_shift): Likewise. (vectorizable_store): Likewise. (vectorizable_condition): Likewise. (vectorizable_assignment): Likewise. * tree-vect-loop.c (vectorizable_reduction): Likewise. * tree-vect-slp.c (vect_get_constant_vectors): Enforce present SLP_TREE_VECTYPE and check it matches previous behavior.
-
Richard Biener authored
This fixes a leftover early out in determining the sequence of stores to materialize. 2020-05-22 Richard Biener <rguenther@suse.de> PR tree-optimization/95248 * tree-ssa-loop-im.c (sm_seq_valid_bb): Remove bogus early out. * gcc.dg/torture/pr95248.c: New testcase.
-
Martin Liska authored
-
Richard Biener authored
This adds constructor and destructor to slp_tree factoring common code. I've not changed the wrappers to overloaded CTORs since I hope to use object_allocator<> and am not sure whether that can be done in any fancy way yet. 2020-05-22 Richard Biener <rguenther@suse.de> * tree-vectorizer.h (_slp_tree::_slp_tree): New. (_slp_tree::~_slp_tree): Likewise. * tree-vect-slp.c (_slp_tree::_slp_tree): Factor out code from allocators. (_slp_tree::~_slp_tree): Implement. (vect_free_slp_tree): Simplify. (vect_create_new_slp_node): Likewise. Add nops parameter. (vect_build_slp_tree_2): Adjust. (vect_analyze_slp_instance): Likewise.
-
Martin Liska authored
contrib/ChangeLog: 2020-05-22 Martin Liska <mliska@suse.cz> * gcc-changelog/git_commit.py: Add gcc/testsuite/go.test/test to ignored locations.
-
GCC Administrator authored
-
- May 21, 2020
-
-
Jason Merrill authored
We give a better diagnostic for non-constant array bounds in compute_array_index_type_loc, we don't need to diagnose it in the parser. But to avoid a regression on parse/varmod1.C we need to actually check non-dependent expressions in a template. gcc/cp/ChangeLog: * decl.c (compute_array_index_type_loc): Diagnose expressions in a template that can't be constant. * parser.c (cp_parser_direct_declarator): Don't check non-constant array bounds here. gcc/testsuite/ChangeLog: * c-c++-common/gomp/depend-iterator-2.c: Adjust. * g++.dg/ext/vla1.C: Adjust. * g++.dg/template/array9.C: Adjust. * g++.dg/template/error41.C: Adjust.
-
Jason Merrill authored
The difference between a "potential" constant-expression and a regular constant-expression is the treatment of parameters; in a constexpr function, a parameter is potentially constant when evaluating a call to that function, but it is not constant during parsing of the function. cp_parser_constant_expression should check the latter rather than the former. gcc/cp/ChangeLog: * cp-tree.h (is_rvalue_constant_expression): Declare. * constexpr.c (is_rvalue_constant_expression): New. * parser.c (cp_parser_constant_expression): Use it. * decl.c (cp_finish_decl): Try to treat a constexpr initializer in a template as constant.
-
Jason Merrill authored
In a template we were happily embedding error_mark_node in a MODOP_EXPR, leading to confusion later. gcc/cp/ChangeLog: * typeck.c (build_x_modify_expr): Handle error_mark_node arguments. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/lambda/lambda-ice30.C: Adjust. * g++.dg/cpp0x/lambda/lambda-ice31.C: Adjust. * g++.dg/ext/fixed1.C: Adjust. * g++.dg/template/crash107.C: Adjust. * g++.dg/template/error35.C: Adjust. * g++.dg/template/sizeof-template-argument.C: Adjust.
-
Jason Merrill authored
If a parameter is erroneous, we currently drop it, leading to "too many arguments" errors later. Treating the function as (...) avoids those errors. gcc/cp/ChangeLog: * decl.c (grokparms): Return NULL_TREE if any parms were erroneous. gcc/testsuite/ChangeLog: * g++.dg/parse/error33.C: Adjust.
-
Iain Sandoe authored
co_returns are statements, not expressions; they do not need to be wrapped in an EXPR_STMT. gcc/cp/ChangeLog: * coroutines.cc (finish_co_return_stmt): Revert change to use finish_expr_stmt.
-
Rainer Orth authored
Commit dfa4fcdb broke SPARC bootstrap: In file included from ./tm_p.h:4, from /vol/gcc/src/hg/master/local/gcc/adjust-alignment.c:28: /vol/gcc/src/hg/master/local/gcc/config/sparc/sparc-protos.h:45:47: error: use of enum 'memmodel' without previous declaration extern void sparc_emit_membar_for_model (enum memmodel, int, int); ^~~~~~~~ Fixed by including memmodel.h. Bootstrapped on sparc-sun-solaris2.11 and i386-pc-solaris2.11. 2020-05-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> gcc/ * adjust-alignment.c: Include memmodel.h.
-
H.J. Lu authored
Since Intel SDM uses hexadecimal, use hexadecimal in comments. PR target/95260 * config/i386/cpuid.h: Use hexadecimal in comments.
-
Matthias Kretz authored
2020-05-21 Matthias Kretz <kretz@kde.org> * testsuite/Makefile.am: Remove dup target_triplet and set tool, allowing runtest to work without arguments. * testsuite/Makefile.in: Regenerate. Signed-off-by:
Jonathan Wakely <jwakely@redhat.com>
-
Patrick Palka authored
Unfortunately, the previous fix to PR94038 is fragile. When the argument to fold_for_warn is a bare CALL_EXPR, then all is well: the result of maybe_constant_value from fold_for_warn (with uid_sensitive=true) is reused via the cv_cache in the subsequent call to maybe_constant_value from cp_fold (with uid_sensitive=false), so we avoid instantiating bar<int>. But when the argument to fold_for_warn is more complex, e.g. an INDIRECT_REF of a CALL_EXPR, as in the testcase below (due to bar<int>() returning const int& which we need to decay to int) then from fold_for_warn we call maybe_constant_value on the INDIRECT_REF, and from cp_fold we call it on the CALL_EXPR, so there is no reuse via the cv_cache and we therefore end up instantiating bar<int>. So for a more robust solution to this general issue of warning flags affecting code generation, it seems that we need a way to globally avoid template instantiation during constexpr evaluation whenever we're performing warning-dependent folding. To that end, this patch replaces the flag constexpr_ctx::uid_sensitive with a global flag uid_sensitive_constexpr_evaluation_p, and enables it during fold_for_warn using an RAII helper. The patch also adds a counter that keeps track of the number of times uid_sensitive_constexpr_evaluation_p is called and returned true, and we use this to determine whether the result of constexpr evaluation was restricted by the flag. This lets us safely update the cv_cache and fold_cache from fold_for_warn in the most common case where the flag did not restrict constexpr evaluation. gcc/cp/ChangeLog: PR c++/94038 * constexpr.c (constexpr_ctx::uid_sensitive): Remove field. (uid_sensitive_constexpr_evaluation_value): Define. (uid_sensitive_constexpr_evaluation_true_counter): Define. (uid_sensitive_constexpr_evaluation_p): Define. (uid_sensitive_constexpr_evaluation_sentinel): Define its constructor. (uid_sensitive_constexpr_evaluation_checker): Define its constructor and its evaluation_restricted_p method. (get_fundef_copy): Remove 'ctx' parameter. Use u_s_c_e_p instead of constexpr_ctx::uid_sensitive. (cxx_eval_call_expression): Use u_s_c_e_p instead, and test it last. Adjust call to get_fundef_copy. (instantiate_cx_fn_r): Test u_s_c_e_p so that we increment the counter if necessary. (cxx_eval_outermost_constant_expr): Remove 'uid_sensitive' parameter. Adjust function body accordingly. (maybe_constant_value): Remove 'uid_sensitive' parameter and adjust function body accordingly. Set up a uid_sensitive_constexpr_evaluation_checker, and use it to conditionally update the cv_cache. * cp-gimplify.c (cp_fold): Set up a uid_sensitive_constexpr_evaluation_checker, and use it to conditionally update the fold_cache. * cp-tree.h (maybe_constant_value): Update declaration. (struct uid_sensitive_constexpr_evaluation_sentinel): Define. (struct sensitive_constexpr_evaluation_checker): Define. * expr.c (fold_for_warn): Set up a uid_sensitive_constexpr_evaluation_sentinel before calling the folding subroutines. Drop all but the first argument to maybe_constant_value. gcc/testsuite/ChangeLog: PR c++/94038 * g++.dg/warn/pr94038-2.C: New test.
-
H.J. Lu authored
Move FEATURE_AVX512VP2INTERSECT after FEATURE_AVX512BF16 to avoid changing libgcc ABI. gcc/ PR target/95212 * config/i386/i386-builtins.c (processor_features): Move F_AVX512VP2INTERSECT after F_AVX512BF16. (isa_names_table): Likewise. libgcc/ PR target/95212 * config/i386/cpuinfo.h (processor_features): Move FEATURE_AVX512VP2INTERSECT after FEATURE_AVX512BF16.
-
Martin Liska authored
PR target/95229 * g++.target/i386/pr95229.C: Fix error: unnamed type with no linkage used to declare variable ‘<unnamed class> e’ with linkage with -std=gnu++98.
-
Nathan Sidwell authored
* c-c++-common/cpp/cmd-1.c: Delete. * c-c++-common/cpp/cmd-1.h: Delete.
-
H.J. Lu authored
* m4/matmul.m4: Don't include <config/i386/cpuinfo.h>. Use __builtin_cpu_is/__builtin_cpu_supports * generated/matmul_c10.c: Regenerated. * generated/matmul_c16.c: Likewise. * generated/matmul_c4.c: Likewise. * generated/matmul_c8.c: Likewise. * generated/matmul_i1.c: Likewise. * generated/matmul_i16.c: Likewise. * generated/matmul_i2.c: Likewise. * generated/matmul_i4.c: Likewise. * generated/matmul_i8.c: Likewise. * generated/matmul_r10.c: Likewise. * generated/matmul_r16.c: Likewise. * generated/matmul_r4.c: Likewise. * generated/matmul_r8.c: Likewise.
-
Martin Liska authored
* common/config/aarch64/aarch64-common.c (aarch64_handle_option): Handle OPT_moutline_atomics. * config/aarch64/aarch64.c: Add outline-atomics to aarch64_attributes. * doc/extend.texi: Document the newly added target attribute. * gcc.target/aarch64/target_attr_20.c: New test. * gcc.target/aarch64/target_attr_21.c: New test.
-
Martin Liska authored
* gcc-changelog/git_update_version.py: Prepare the script, the only missing piece is pushing of the updated branches.
-
Martin Liska authored
* gcc-changelog/git_commit.py: Support DR entries/ * gcc-changelog/test_email.py: New test for it. * gcc-changelog/test_patches.txt: New patch for it.
-
Martin Liska authored
* mklog.py: Support DR parsing. * test_mklog.py: New test for DR parsing.
-
Jonathan Wakely authored
Checking whether a filesystem::path constructor argument is an iterator requires instantiating std::iterator_traits. In C++20 that checks for satisfaction of std::iterator_traits constraints, which checks if the type is copyable, which can end up recursing back to the path constructor. The fix in LWG 3420 is to reorder the cpp17-iterator concept's constraints to check if the type looks vaguely like an iterator before checking copyable. That avoids the recursion for types which definitely aren't iterators, but isn't foolproof. PR libstdc++/93983 * include/bits/iterator_concepts.h (__detail::__cpp17_iterator): Reorder constraints to avoid recursion when constructors use iterator_traits (LWG 3420). * testsuite/24_iterators/customization_points/lwg3420.cc: New test.
-
GCC Administrator authored
-
Jonathan Wakely authored
* include/experimental/socket (basic_socket::is_open() (basic_socket_acceptor::is_open()): Use _GLIBCXX_NODISCARD macro.
-
- May 20, 2020
-
-
Jonathan Wakely authored
Define concepts and traits for checking type requirements. * include/experimental/bits/net.h (__endpoint, __protocol) (__acceptable_protocol, __inet_protocol): New concepts. (__detail::__is_endpoint): Move trait from <experimental/socket>. (__is_protocol, __is_acceptable_protocol, __is_inet_protocol): New traits. (__endpoint, __protocol, __acceptable_protocol): New variable templates. * include/experimental/socket (__is_endpoint): Move to net.h header. (basic_socket, basic_socket_acceptor): Check requirements.
-
Jonathan Wakely authored
Also add some missing member functions, nodiscard attributes, and noexcept-specifiers. * include/experimental/executor (use_future_t::use_future_t()): Fix incorrect noexcept-specifier. * include/experimental/internet (basic_resolver_results): Adjust whitespace. * include/experimental/socket (__basic_socket_impl::release): Add member function. (basic_socket(io_context&, const endpoint_type&)): Fix argument to target constructor. (basic_socket::release(), basic_socket::release(error_code&)): Add missing member functions. (basic_socket::is_open()): Add nodiscard attribute. (basic_socket::close(error_code&)): Pass argument to base function. (basic_socket_acceptor::release()) (basic_socket_acceptor::release(error_code&)): Add missing member functions. (basic_socket_acceptor::is_open()): Add nodiscard attribute. (basic_socket_streambuf::error()): Add noexcept. (basic_socket_iostream::error()): Likewise. * testsuite/experimental/net/socket/basic_socket.cc: New test.
-
Jonathan Wakely authored
* include/experimental/buffer: Replace typedefs with alias-declarations. * include/experimental/executor: Likewise. * include/experimental/internet: Likewise. * include/experimental/socket: Likewise. * include/experimental/timer: Likewise.
-
Uros Bizjak authored
2020-05-21 Uroš Bizjak <ubizjak@gmail.com> gcc/ChangeLog: PR target/95218 * config/i386/mmx.md (*mmx_<code>v2sf): Do not mark operands 1 and 2 commutative. Manually swap operands. (*mmx_nabsv2sf2): Ditto. Partially revert: * config/i386/i386.md (*<code>tf2_1): Mark operands 1 and 2 commutative. (*nabstf2_1): Ditto. * config/i386/sse.md (*<code><mode>2): Mark operands 1 and 2 commutative. Do not swap operands. (*nabs<mode>2): Ditto.
-
Jozef Lawrynowicz authored
* g++.dg/warn/Wconversion-null-2.C: Add explicit declarations for l() and g() with int, long, long long and __int20 arguments. * g++.dg/warn/Wconversion-null.C: Likewise.
-
Jozef Lawrynowicz authored
This fixes regressions for aarch64 with -mabi=ilp32 of the Wconversion-null*.C tests, introduced by 92ea8e1b. The "g (int)" declaration is required for that target where sizeof(int) == sizeof(long) == sizeof(void *). To handle the msp430/-mlarge case, an explicit declaration of "g (__int20)" is required. gcc/testsuite/ChangeLog: * g++.dg/warn/Wconversion-null-2.C: Add explicit declarations for l() and g() with int, long, long long and __int20 arguments. * g++.dg/warn/Wconversion-null.C: Likewise.
-
Marek Polacek authored
This patch implements DR 2237 which says that a simple-template-id is no longer valid as the declarator-id of a constructor or destructor; see [diff.cpp17.class]#2. It is not explicitly stated but out-of-line destructors with a simple-template-id are also meant to be ill-formed now. (Out-of-line constructors like that are invalid since DR1435 I think.) This change only applies to C++20; it is not a DR against C++17. I'm not crazy about the diagnostic in constructors but ISTM that cp_parser_constructor_declarator_p shouldn't print errors. DR 2237 * parser.c (cp_parser_unqualified_id): Reject simple-template-id as the declarator-id of a destructor. (cp_parser_constructor_declarator_p): Reject simple-template-id as the declarator-id of a constructor. * g++.dg/DRs/dr2237.C: New test. * g++.dg/parse/constructor2.C: Add dg-error for C++20. * g++.dg/parse/dtor12.C: Likewise. * g++.dg/parse/dtor4.C: Likewise. * g++.dg/template/dtor4.C: Adjust dg-error. * g++.dg/template/error34.C: Likewise. * g++.old-deja/g++.other/inline15.C: Only run for C++17 and lesses. * g++.old-deja/g++.pt/ctor2.C: Add dg-error for C++20.
-
Nathan Sidwell authored
This part of the cleanup patch turns out to require more pieces to function correctly. I must have got confused over which tree I was testing. The very first map has a different pointer to the file name, so doesn't match with a pointer compare. We were relying on that. * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
-
Nathan Sidwell authored
* c-common.c (try_to_locate_new_include_insertion_point): Use strcmp to compare filenames. * c-lex.c (init_c_lex): Move declaration to initialization. * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into deferred count loop.
-
Marek Polacek authored
DR 2289 clarified that since structured bindings have no C compatibility implications, they should be unique in their declarative region, see [basic.scope.declarative]/4.2. The duplicate_decls hunk is the gist of the patch, but that alone would not be enough to detect the 'A' case: cp_parser_decomposition_declaration uses 13968 tree decl2 = start_decl (declarator, &decl_specs, SD_INITIALIZED, 13969 NULL_TREE, NULL_TREE, &elt_pushed_scope); to create the 'A' VAR_DECL but in this start_decl's grokdeclarator we don't do fit_decomposition_lang_decl because the declarator kind is not cdk_decomp, so then when start_decl calls maybe_push_decl, the decl 'A' isn't DECL_DECOMPOSITION_P and we don't detect this case. So I needed a way to signal to start_decl that it should fit_decomposition_lang_decl. In this patch, I'm adding SD_DECOMPOSITION flag to say that the variable is initialized and it should also be marked as DECL_DECOMPOSITION_P. DR 2289 PR c++/94553 * cp-tree.h (SD_DECOMPOSITION): New flag. * decl.c (duplicate_decls): Make sure a structured binding is unique in its declarative region. (start_decl): If INITIALIZED is SD_DECOMPOSITION, call fit_decomposition_lang_decl. (grokdeclarator): Compare INITIALIZED directly to SD_* flags. * parser.c (cp_parser_decomposition_declaration): Pass SD_DECOMPOSITION to start_decl. * g++.dg/cpp1z/decomp52.C: New test.
-
Uros Bizjak authored
2020-05-20 Uroš Bizjak <ubizjak@gmail.com> gcc/ChangeLog: PR target/95229 * config/i386/sse.md (<code>v8qiv8hi2): Use simplify_gen_subreg instead of simplify_subreg. (<code>v8qiv8si2): Ditto. (<code>v4qiv4si2): Ditto. (<code>v4hiv4si2): Ditto. (<code>v8qiv8di2): Ditto. (<code>v4qiv4di2): Ditto. (<code>v2qiv2di2): Ditto. (<code>v4hiv4di2): Ditto. (<code>v2hiv2di2): Ditto. (<code>v2siv2di2): Ditto. gcc/testsuite/ChangeLog: PR target/95229 * g++.target/i386/pr95229.C: New test.
-
Uros Bizjak authored
2020-05-20 Uroš Bizjak <ubizjak@gmail.com> gcc/ChangeLog: PR target/95238 * config/i386/i386.md (*pushsi2_rex64): Use "e" constraint instead of "i".
-
Martin Liska authored
* gcc-changelog/git_commit.py: Add author_tuple only if not present in author_lines. * gcc-changelog/test_email.py: New test. * gcc-changelog/test_patches.txt: Add new patch.
-