]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
4 years agore PR libfortran/92100 (Formatted stream IO irreproducible read with binary data...
Jerry DeLisle [Sun, 24 Nov 2019 22:14:59 +0000 (22:14 +0000)] 
re PR libfortran/92100 (Formatted stream IO irreproducible read with binary data in file)

2019-11-24  Jerry DeLisle  <jvdelisle@gcc.ngu.org>

PR fortran/92100
io/transfer.c (data_transfer_init_worker): Use fbuf_reset
instead of fbuf_flush before the seek. Note that fbuf_reset
calls fbuf_flush and adjusts fbuf pointers.

From-SVN: r278660

4 years agoFix EOF handling for arrays.
Thomas Koenig [Sun, 24 Nov 2019 19:16:23 +0000 (19:16 +0000)] 
Fix EOF handling for arrays.

2019-11-23  Thomas Koenig  <tkoenig@gcc.gnu.org>
Harald Anlauf <anlauf@gmx.de>

PR fortran/92569
* io/transfer.c (transfer_array_inner):  If position is
at AFTER_ENDFILE in current unit, return from data loop.

2019-11-23  Thomas Koenig  <tkoenig@gcc.gnu.org>
Harald Anlauf <anlauf@gmx.de>

PR fortran/92569
* gfortran.dg/eof_6.f90: New test.

Co-Authored-By: Harald Anlauf <anlauf@gmx.de>
From-SVN: r278659

4 years agolibstdc++: Improve _GLIBCXX_DEBUG __valid_range check
François Dumont [Sun, 24 Nov 2019 17:09:44 +0000 (17:09 +0000)] 
libstdc++: Improve _GLIBCXX_DEBUG __valid_range check

Adds iterator singular check within the valid range check.

* include/debug/functions.h: Remove <bits/move.h> include.
(__check_singular_aux, __check_singular): Move...
* include/debug/helper_functions.h:
(__check_singular_aux, __check_singular): ...here.
(__valid_range_aux): Adapt to use latter.
Add <bits/move.h> include.
* testsuite/25_algorithms/copy/debug/2_neg.cc: New.

From-SVN: r278658

4 years agoAllow combiner to create autoinc in jump insns.
Bernd Schmidt [Sun, 24 Nov 2019 13:20:55 +0000 (13:20 +0000)] 
Allow combiner to create autoinc in jump insns.

* combine.c (can_combine_p): Allow autoinc in jumps.

From-SVN: r278656

4 years agoDo not ignore costs of jump insns in combine.
Bernd Schmidt [Sun, 24 Nov 2019 13:11:55 +0000 (13:11 +0000)] 
Do not ignore costs of jump insns in combine.

* combine.c (combine_instructions): Record costs for jumps.

From-SVN: r278655

4 years agoFix ix86 rtx costs for the pr30315 testcase (PR target/30315)
Bernd Schmidt [Sun, 24 Nov 2019 13:08:27 +0000 (13:08 +0000)] 
Fix ix86 rtx costs for the pr30315 testcase (PR target/30315)

* config/i386/i386.c (ix86_rtx_costs): Handle care of a PLUS in a
COMPARE, representing an overflow detection.

From-SVN: r278654

4 years agoDaily bump.
GCC Administrator [Sun, 24 Nov 2019 00:16:15 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r278653

4 years agoFixed ChangeLog entry.
Thomas Koenig [Sat, 23 Nov 2019 15:23:10 +0000 (15:23 +0000)] 
Fixed ChangeLog entry.

From-SVN: r278648

4 years agoAdd test case for PR 92442.
Thomas Koenig [Sat, 23 Nov 2019 15:19:19 +0000 (15:19 +0000)] 
Add test case for PR 92442.

2019-11-23  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/92442
* gfortran.dg/bounds_check_21.f90: New test.

From-SVN: r278647

4 years agoConvert inliner to new param infrastructure
Jan Hubicka [Sat, 23 Nov 2019 13:13:23 +0000 (13:13 +0000)] 
Convert inliner to new param infrastructure

/bin/sh: :q: command not found
This patch adds opt_for_fn for all cross module params used by inliner
so they can be modified at function granuality.  With inlining almost always
there are three functions to consider (callee and caller of the inlined edge
and the outer function caller is inlined to).

I always use the outer function params since that is how local parameters
behave.  I hope it is kind of what is also expected in most case: it is better
to inline agressively into -O3 compiled code rather than inline agressively -O3
functions into their callers.

New params infrastructure is nice.  One drawback is that is very hard to
search for individual param uses since they all occupy global namespace.
With C++ world we had chance to do something like params.param_flag_name
or params::param_flag_name instead...

Bootstrapped/regtested x86_64-linux, comitted.

* cif-code.def (MAX_INLINE_INSNS_SINGLE_O2_LIMIT): Remove.
* doc/invoke.texi (max-inline-insns-single-O2,
inline-heuristics-hint-percent-O2, inline-min-speedup-O2,
early-inlining-insns-O2): Remove documentation.
* ipa-fnsummary.c (analyze_function_body,
compute_fn_summary): Use opt_for_fn when accessing parameters.
* ipa-inline.c (caller_growth_limits, can_inline_edge_p,
inline_insns_auto, can_inline_edge_by_limits_p,
want_early_inline_function_p, big_speedup_p,
want_inline_small_function_p, want_inline_self_recursive_call_p,
recursive_inlining, compute_max_insns, inline_small_functions):
Likewise.
* opts.c (default_options): Add -O3 defaults for
OPT__param_early_inlining_insns_,
OPT__param_inline_heuristics_hint_percent_,
OPT__param_inline_min_speedup_, OPT__param_max_inline_insns_single_.
* params.opt (-param=early-inlining-insns-O2=,
-param=inline-heuristics-hint-percent-O2=,
-param=inline-min-speedup-O2=, -param=max-inline-insns-single-O2=
-param=early-inlining-insns=, -param=inline-heuristics-hint-percent=,
-param=inline-min-speedup=, -param=inline-unit-growth=,
-param=large-function-growth=, -param=large-stack-frame=,
-param=large-stack-frame-growth=, -param=large-unit-insns=,
-param=max-inline-insns-recursive=,
-param=max-inline-insns-recursive-auto=,
-param=max-inline-insns-single=,
-param=max-inline-insns-size=, -param=max-inline-insns-small=,
-param=max-inline-recursive-depth=,
-param=max-inline-recursive-depth-auto=,
-param=min-inline-recursive-probability=,
-param=partial-inlining-entry-probability=,
-param=uninlined-function-insns=, -param=uninlined-function-time=,
-param=uninlined-thunk-insns=, -param=uninlined-thunk-time=): Add
Optimization.

* g++.dg/tree-ssa/pr53844.C: Drop -O2 from param name.
* g++.dg/tree-ssa/pr61034.C: Likewise.
* g++.dg/tree-ssa/pr8781.C: Likewise.
* g++.dg/warn/Wstringop-truncation-1.C: Likewise.
* gcc.dg/ipa/pr63416.c: Likewise.
* gcc.dg/tree-ssa/ssa-thread-12.c: Likewise.
* gcc.dg/vect/pr66142.c: Likewise.
* gcc.dg/winline-3.c: Likewise.
* gcc.target/powerpc/pr72804.c: Likewise.

From-SVN: r278645

4 years agoConvert inliner to function specific param infrastructure
Jan Hubicka [Sat, 23 Nov 2019 13:11:25 +0000 (14:11 +0100)] 
Convert inliner to function specific param infrastructure

This patch adds opt_for_fn for all cross module params used by inliner
so they can be modified at function granuality.  With inlining almost always
there are three functions to consider (callee and caller of the inlined edge
and the outer function caller is inlined to).

I always use the outer function params since that is how local parameters
behave.  I hope it is kind of what is also expected in most case: it is better
to inline agressively into -O3 compiled code rather than inline agressively -O3
functions into their callers.

New params infrastructure is nice.  One drawback is that is very hard to
search for individual param uses since they all occupy global namespace.
With C++ world we had chance to do something like params.param_flag_name
or params::param_flag_name instead...

Bootstrapped/regtested x86_64-linux, comitted.

* cif-code.def (MAX_INLINE_INSNS_SINGLE_O2_LIMIT): Remove.
* doc/invoke.texi (max-inline-insns-single-O2,
inline-heuristics-hint-percent-O2, inline-min-speedup-O2,
early-inlining-insns-O2): Remove documentation.
* ipa-fnsummary.c (analyze_function_body,
compute_fn_summary): Use opt_for_fn when accessing parameters.
* ipa-inline.c (caller_growth_limits, can_inline_edge_p,
inline_insns_auto, can_inline_edge_by_limits_p,
want_early_inline_function_p, big_speedup_p,
want_inline_small_function_p, want_inline_self_recursive_call_p,
recursive_inlining, compute_max_insns, inline_small_functions):
Likewise.
* opts.c (default_options): Add -O3 defaults for
OPT__param_early_inlining_insns_,
OPT__param_inline_heuristics_hint_percent_,
OPT__param_inline_min_speedup_, OPT__param_max_inline_insns_single_.
* params.opt (-param=early-inlining-insns-O2=,
-param=inline-heuristics-hint-percent-O2=,
-param=inline-min-speedup-O2=, -param=max-inline-insns-single-O2=
-param=early-inlining-insns=, -param=inline-heuristics-hint-percent=,
-param=inline-min-speedup=, -param=inline-unit-growth=,
-param=large-function-growth=, -param=large-stack-frame=,
-param=large-stack-frame-growth=, -param=large-unit-insns=,
-param=max-inline-insns-recursive=,
-param=max-inline-insns-recursive-auto=,
-param=max-inline-insns-single=,
-param=max-inline-insns-size=, -param=max-inline-insns-small=,
-param=max-inline-recursive-depth=,
-param=max-inline-recursive-depth-auto=,
-param=min-inline-recursive-probability=,
-param=partial-inlining-entry-probability=,
-param=uninlined-function-insns=, -param=uninlined-function-time=,
-param=uninlined-thunk-insns=, -param=uninlined-thunk-time=): Add
Optimization.

* g++.dg/tree-ssa/pr53844.C: Drop -O2 from param name.
* g++.dg/tree-ssa/pr61034.C: Likewise.
* g++.dg/tree-ssa/pr8781.C: Likewise.
* g++.dg/warn/Wstringop-truncation-1.C: Likewise.
* gcc.dg/ipa/pr63416.c: Likewise.
* gcc.dg/tree-ssa/ssa-thread-12.c: Likewise.
* gcc.dg/vect/pr66142.c: Likewise.
* gcc.dg/winline-3.c: Likewise.
* gcc.target/powerpc/pr72804.c: Likewise.

From-SVN: r278644

4 years agoipa-fnsummary.c: Fix comment typos.
Jakub Jelinek [Sat, 23 Nov 2019 11:44:51 +0000 (12:44 +0100)] 
ipa-fnsummary.c: Fix comment typos.

* ipa-fnsummary.c: Fix comment typos.
* ipa-ref.h: Likewise.
* ipa-predicate.h: Likewise.
* ipa-split.c: Likewise.
* ipa-inline-analysis.c: Likewise.
* ipa-predicate.c: Likewise.
* ipa-devirt.c: Likewise.
* ipa-icf.h: Likewise.
* profile-count.c: Likewise.
* ipa-icf.c: Likewise.
(sem_function::equals_wpa): Fix typos in dump messages.
* ipa-icf-gimple.h: Fix comment typos.
* ipa-inline-transform.c: Likewise.
* ipa-polymorphic-call.c: Likewise.
* ipa-fnsummary.h: Likewise.
* ipa-inline.c: Likewise.
(dump_inline_stats): Fix typo in debug dump message.
* profile-count.h: Fix comment typos.

From-SVN: r278643

4 years agore PR inline-asm/92615 (ICE in extract_insn)
Jakub Jelinek [Sat, 23 Nov 2019 10:07:21 +0000 (11:07 +0100)] 
re PR inline-asm/92615 (ICE in extract_insn)

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: r278642

4 years agore PR middle-end/83859 (Please add new attribute which will establish relation betwee...
Jakub Jelinek [Sat, 23 Nov 2019 10:06:26 +0000 (11:06 +0100)] 
re PR middle-end/83859 (Please add new attribute which will establish relation between parameters for buffer and its size)

PR middle-end/83859
* doc/extend.texi (attribute access): Fix a typo.

* c-attribs.c (append_access_attrs): Avoid buffer overflow.  Avoid
memory leak.  Use XNEWVEC macro.  Use auto_diagnostic_group to
group warning with inform together.
(handle_access_attribute): Formatting fix.

From-SVN: r278641

4 years agore PR rtl-optimization/92610 (ICE in calc_dfs_tree, at dominance.c:458 since r270940)
Jakub Jelinek [Sat, 23 Nov 2019 10:05:31 +0000 (11:05 +0100)] 
re PR rtl-optimization/92610 (ICE in calc_dfs_tree, at dominance.c:458 since r270940)

PR rtl-optimization/92610
* cse.c (rest_of_handle_cse2): Call cleanup_cfg (0) also if
cse_cfg_altered is set, even when tem is 0.
(rest_of_handle_cse_after_global_opts): Likewise.

* g++.dg/opt/pr92610.C: New test.

From-SVN: r278640

4 years agore PR c++/92365 (ice unexpected expression ‘int16_t()’ of kind cast_expr)
Bernd Edlinger [Sat, 23 Nov 2019 06:33:59 +0000 (06:33 +0000)] 
re PR c++/92365 (ice unexpected expression ‘int16_t()’ of kind cast_expr)

PR c++/92365

2019-11-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR c++/92365
        * name-lookup.c (check_local_shadow): Use can_convert_arg
        instead of can_convert.

testsuite:
2019-11-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR c++/92365
        * g++.dg/pr92365.C: New test.

From-SVN: r278639

4 years agoDaily bump.
GCC Administrator [Sat, 23 Nov 2019 00:16:21 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r278638

4 years agoPR c++/88337 - P1327R1: Allow polymorphic typeid in constexpr.
Marek Polacek [Fri, 22 Nov 2019 23:48:25 +0000 (23:48 +0000)] 
PR c++/88337 - P1327R1: Allow polymorphic typeid in constexpr.

Part of P1327R1 is to allow typeid with an operand of polymorphic type in
constexpr.  I found that we pretty much support it already, the only tweak
was to allow TYPEID_EXPR (only created in a template) in constexpr in C++20.

* constexpr.c (potential_constant_expression_1): Allow a typeid
expression whose operand is of polymorphic type in constexpr in
C++20.
* rtti.c (build_typeid): Remove obsolete FIXME comment.

* g++.dg/cpp2a/constexpr-typeid1.C: New test.
* g++.dg/cpp2a/constexpr-typeid2.C: New test.
* g++.dg/cpp2a/constexpr-typeid3.C: New test.
* g++.dg/cpp2a/constexpr-typeid4.C: New test.

From-SVN: r278635

4 years agore PR c/90677 (gcc-9.1.0 fails to build __gcc_diag__ souce: error: 'cgraph_node'...
Jakub Jelinek [Fri, 22 Nov 2019 21:45:27 +0000 (22:45 +0100)] 
re PR c/90677 (gcc-9.1.0 fails to build __gcc_diag__ souce: error: 'cgraph_node' is not defined as a type)

PR c/90677
* c-common.h (identifier_global_tag): Declare.
* c-format.c (get_pointer_to_named_type): Renamed to ...
(get_named_type): ... this.  Use identifier_global_tag instead of
identifier_global_value, handle the return value being a TYPE_P.
(init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
to call get_named_type instead.  Formatting fixes.
c/
* c-decl.c (identifier_global_tag): Define.
cp/
* cp-objcp-common.c (identifier_global_tag): Define.
testsuite/
* c-c++-common/pr90677.c: New test.

From-SVN: r278634

4 years agore PR c++/92458 (Constraints do not work with precompiled headers)
Jakub Jelinek [Fri, 22 Nov 2019 21:38:44 +0000 (22:38 +0100)] 
re PR c++/92458 (Constraints do not work with precompiled headers)

PR c++/92458
* tree-hash-traits.h (tree_decl_hash, tree_ssa_name_hash,
tree_hash): Move to ...
* tree.h (tree_decl_hash, tree_ssa_name_hash, tree_hash): ... here.
(struct decl_tree_cache_traits, struct type_tree_cache_traits): New
types.
(decl_tree_cache_map, tree_tree_cache_map): New typedefs.

* init.c (nsdmi_inst): Change type to
decl_tree_cache_map * from tree_cache_map *.
* constraint.cc (decl_constraints): Likewise.
* decl.c (get_tuple_decomp_init): Likewise.
* pt.c (defarg_inst, explicit_specifier_map): Likewise.
(tsubst_default_argument, store_explicit_specifier): Use
decl_tree_cache_map::create_ggc rather than
tree_cache_map::create_ggc.
* cp-objcp-common.c (debug_type_map): Change type to
type_tree_cache_map * from tree_cache_map *.

* g++.dg/pch/pr92458.C: New test.
* g++.dg/pch/pr92458.Hs: New test.

From-SVN: r278633

4 years ago[Darwin, X86, testsuite] Update tests for common section use.
Iain Sandoe [Fri, 22 Nov 2019 20:58:54 +0000 (20:58 +0000)] 
[Darwin, X86, testsuite] Update tests for common section use.

The tests amended here now have different code-gen with default
options because, previously, the access were indirected per Darwin
ABI for common accesses.  The revised code-gen does not match the
expected scan-asms because Darwin defaults to fPIC.  For these tests,
it seems that the best solution is to use '-mdynamic-no-pic' in the
m32 case which makes the output similar to the ElF platform default.

gcc/testsuite/ChangeLog:

2019-11-22  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.target/i386/pr27971.c: Use mdynamic-no-pic for m32 on
Darwin.
* gcc.target/i386/sse2-load-multi.c: Likewise.
* gcc.target/i386/sse2-store-multi.c: Likewise.

From-SVN: r278631

4 years ago[testsuite] Commit missed Changelog entry.
Iain Sandoe [Fri, 22 Nov 2019 20:45:34 +0000 (20:45 +0000)] 
[testsuite] Commit missed Changelog entry.

From-SVN: r278630

4 years agoImplement P1902R1, Missing feature-test macros 2017-2019.
Jakub Jelinek [Fri, 22 Nov 2019 19:55:38 +0000 (20:55 +0100)] 
Implement P1902R1, Missing feature-test macros 2017-2019.

* c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
and __cpp_generic_lambdas for -std=c++2a.  Define
__cpp_designated_initializers, __cpp_constexpr_in_decltype and
__cpp_consteval for -std=c++2a.  Remove a FIXME comment about
__cpp_concepts for -std=c++2a.

* g++.dg/cpp1z/feat-cxx1z.C: Only compile with -std=c++17.
* g++.dg/cpp2a/feat-cxx2a.C: Adjust for P1902R1 changes.
* g++.dg/cpp2a/desig15.C: New test.
* g++.dg/cpp2a/lambda-pack-init3.C: New test.
* g++.dg/cpp2a/lambda-generic6.C: New test.
* g++.dg/cpp2a/consteval15.C: New test.

From-SVN: r278628

4 years agore PR tree-optimization/92618 (error: type mismatch in binary expression in reassoc...
Jakub Jelinek [Fri, 22 Nov 2019 18:17:04 +0000 (19:17 +0100)] 
re PR tree-optimization/92618 (error: type mismatch in binary expression in reassoc since r273490)

PR tree-optimization/92618
* tree-ssa-reassoc.c (v_info): Change from auto_vec to a struct
containing the auto_vec and a tree.
(undistribute_bitref_for_vector): Handle the case when element type
of vec is not the same as type of the BIT_FIELD_REF.  Formatting
fixes.

* gcc.c-torture/compile/pr92618.c: New test.
* gcc.c-torture/execute/pr92618.c: New test.

From-SVN: r278626

4 years agoPR middle-end/83859 - attributes to associate pointer arguments and sizes
Martin Sebor [Fri, 22 Nov 2019 17:14:17 +0000 (17:14 +0000)] 
PR middle-end/83859 - attributes to associate pointer arguments and sizes

gcc/ChangeLog:

PR middle-end/83859
* attribs.h (struct attr_access): New.
* attribs.c (decl_attributes): Add an informational note.
* builtins.c (check_access): Make extern.  Consistently set no-warning
after issuing a warning.  Handle calls through function pointers.  Set
no-warning.
* builtins.h (check_access): Declare.
* calls.c (rdwr_access_hash): New type.
(rdwr_map): Same.
(init_attr_rdwr_indices): New function.
(maybe_warn_rdwr_sizes): Same.
(initialize_argument_information): Call init_attr_rdwr_indices.
Call maybe_warn_rdwr_sizes.
(get_size_range): Avoid null argument.
* doc/extend.texi (attribute access): Document new attribute.

gcc/c-family/ChangeLog:

PR middle-end/83859
* c-attribs.c (handle_access_attribute): New function.
(c_common_attribute_table): Add new attribute.
(get_argument_type): New function.
(append_access_attrs): New function.
(get_nonnull_operand): Rename...
(get_attribute_operand): ...to this.
* c-common.c (get_nonnull_operand): Rename...
(get_attribute_operand): ...to this.

gcc/testsuite/ChangeLog:

PR middle-end/83859
* c-c++-common/attr-nonstring-8.c: Adjust text of expected warning.
* gcc.dg/Wstringop-overflow-23.c: New test.
* gcc.dg/Wstringop-overflow-24.c: New test.
* gcc.dg/attr-access-read-only.c: New test.
* gcc.dg/attr-access-read-write.c: New test.
* gcc.dg/attr-access-read-write-2.c: New test.
* gcc.dg/attr-access-write-only.c: New test.

From-SVN: r278624

4 years agoPR middle-end/88226 - missing warning on fprintf, fputs, and puts with an unterminate...
Martin Sebor [Fri, 22 Nov 2019 16:47:22 +0000 (16:47 +0000)] 
PR middle-end/88226 - missing warning on fprintf, fputs, and puts with an unterminated array

gcc/ChangeLog:

PR middle-end/88226
* builtins.c (check_nul_terminated_array): New function.
(fold_builtin_0): Remove declaration.
(fold_builtin_1): Same.
(fold_builtin_2): Same.
(fold_builtin_3): Same.
(fold_builtin_strpbrk): Add argument.
(fold_builtin_strspn): Same.
(fold_builtin_strcspn): Same.
(expand_builtin_strcat): Call it.  Remove unused argument.
(expand_builtin_stpncpy): Same.
(expand_builtin_strncat): Same.
(expand_builtin_strncpy): Same.  Adjust indentation.
(expand_builtin_strcmp): Same.
(expand_builtin_strncmp): Same.
(expand_builtin_fork_or_exec): Same.
(expand_builtin): Handle more built-ins.
(fold_builtin_2): Add argument.
(fold_builtin_n): Make static.  Add argument.
(fold_call_expr): Pass new argument to fold_builtin_n and fold_builtin_2.
(fold_builtin_call_array): Pass new argument to fold_builtin_n.
(fold_builtin_strpbrk): Add argument.  Call check_nul_terminated_array.
(fold_call_stmt): Pass new argument to fold_builtin_n.
* builtins.h: Correct a comment.
* gimple-fold.c (gimple_fold_builtin_strchr): Call
check_nul_terminated_array.
* tree-ssa-strlen.c (handle_builtin_strlen): Call
check_nul_terminated_array.
(handle_builtin_strchr): Same.
(handle_builtin_string_cmp): Same.

gcc/testsuite/ChangeLog:

PR middle-end/88226
* gcc.dg/Wstringop-overflow-22.c: New test.
* gcc.dg/tree-ssa/builtin-fprintf-warn-1.c: Remove xfails.

From-SVN: r278623

4 years agoLimit LDS usage.
Andrew Stubbs [Fri, 22 Nov 2019 16:43:46 +0000 (16:43 +0000)] 
Limit LDS usage.

2019-11-22  Andrew Stubbs  <ams@codesourcery.com>

gcc/
* config/gcn/gcn.c (OMP_LDS_SIZE): Define.
(ACC_LDS_SIZE): Define.
(OTHER_LDS_SIZE): Define.
(LDS_SIZE): Redefine using above.
(gcn_expand_prologue): Initialize m0 with LDS_SIZE-1.

From-SVN: r278622

4 years agoPR tree-optimization/92501 - strncmp with constant unterminated arrays not folded
Martin Sebor [Fri, 22 Nov 2019 16:39:37 +0000 (16:39 +0000)] 
PR tree-optimization/92501 - strncmp with constant unterminated arrays not folded

gcc/testsuite/ChangeLog:

PR tree-optimization/92501
* gcc.dg/strcmpopt_7.c: New test.

gcc/ChangeLog:

PR tree-optimization/92501
* gimple-fold.c ((gimple_fold_builtin_string_compare): Let strncmp
handle unterminated arrays.  Rename local variables for clarity.

From-SVN: r278621

4 years agoUse GFX9 granulated sgprs count correctly.
Andrew Stubbs [Fri, 22 Nov 2019 14:42:49 +0000 (14:42 +0000)] 
Use GFX9 granulated sgprs count correctly.

2019-11-22  Andrew Stubbs  <ams@codesourcery.com>

gcc/
* config/gcn/gcn.c (gcn_hsa_declare_function_name): Calculate
granulated_sgprs according to architecture.

From-SVN: r278617

4 years agoRelease memory-block-pool memory back to malloc.
Jan Hubicka [Fri, 22 Nov 2019 14:37:37 +0000 (15:37 +0100)] 
Release memory-block-pool memory back to malloc.

* ggc-page.c (ggc_collect): Call memory_block_pool::trim.
* memory-block.cc (memory_block_pool::clear_free_list): Rename to ...
(memory_block_pool::reduce_free_list): ... this one.
(memory_block_pool::trim): New static function.
* memory-block.h (memory_block_pool::freelist_size): New constant
(memory_block_pool::clear_free_list): Rename to ...
(memory_block_pool::reduce_free_list): ... this one.
(memory_block_pool::trim): Declare.

* lto.c (lto_wpa_write_files): Call memory_block_pool::trim.

From-SVN: r278616

4 years agoDisable epilogue loop vectorisation for vect-widen-mult-u8-*.c
Richard Sandiford [Fri, 22 Nov 2019 12:03:08 +0000 (12:03 +0000)] 
Disable epilogue loop vectorisation for vect-widen-mult-u8-*.c

vect-widen-mult-u8.c and vect-widen-mult-u8-u32.c were failing
on arm-linux-gnueabihf with epilogue vectorisation because we
print the expected messages twice rather than once.  We could
fix that either by removing the counts or by disabling epilogue
loop vectorisation.  The other vect-widen-mult-* tests do the
latter, so I did the same here.

2019-11-22  Richard Sandiford  <richard.sandiford@arm.com>

gcc/testsuite/
* gcc.dg/vect/vect-widen-mult-u8.c: Disable epilogue loop
vectorization.
* gcc.dg/vect/vect-widen-mult-u8-u32.c: Likewise.

From-SVN: r278613

4 years agoFix markup in gcc.dg/vect/vect-cond-reduc-3.c
Richard Sandiford [Fri, 22 Nov 2019 10:56:13 +0000 (10:56 +0000)] 
Fix markup in gcc.dg/vect/vect-cond-reduc-3.c

gcc.dg/vect/vect-cond-reduc-3.c had been failing on
arm-linux-gnueabihf since the test was added, because the test needs
support for VEC_COND_EXPR <float cmp float, int, int> whereas the target
only supports VEC_COND_EXPRs in which all modes are the same.  (I have
a fix for that, but it's not really stage 3 material.)

2019-11-22  Richard Sandiford  <richard.sandiford@arm.com>

gcc/testsuite/
* gcc.dg/vect/vect-cond-reduc-3.c: Require vect_cond_mixed
rather than vect_condition.

From-SVN: r278612

4 years agoMove EXTRACT_LAST_REDUCTION costing to vectorizable_condition
Richard Sandiford [Fri, 22 Nov 2019 09:58:08 +0000 (09:58 +0000)] 
Move EXTRACT_LAST_REDUCTION costing to vectorizable_condition

gcc.target/aarch64/sve/clastb_[57].c started failing after the increase
in the cost of vec_to_scalar (r278452).  The problem is that we were
double-counting the cost of the CLASTB: once in vect_model_reduction_cost
as a vec_to_scalar and once in vectorizable_condition as a plain
vector_stmt.

Based on the TODO above vect_model_reduction_cost, I think the
preferred long-term direction is for vectorizable_* to cost these
things itself, so that's what the patch does (for this one case only).

2019-11-22  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* tree-vect-stmts.c (vect_model_simple_cost): Take an optional
vect_cost_for_stmt.
(vectorizable_condition): Calculate the cost of EXTRACT_LAST_REDUCTION
here rather than...
* tree-vect-loop.c (vect_model_reduction_cost): ...here.

From-SVN: r278611

4 years ago[ARC] Fix failing pr77309 for ARC700
Claudiu Zissulescu [Fri, 22 Nov 2019 08:00:33 +0000 (09:00 +0100)] 
[ARC] Fix failing pr77309 for ARC700

The patterns neg_scc_insn and not_scc_insn are not correct, leading to
failing pr77309 test for ARC700. Add two new bic compare with zero
patterns to improve output code.

gcc/
xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>

* config/arc/arc.md (bic_f): Use cc_set_register predicate.
(bic_cmp0_noout): New pattern.
(bic_cmp0): Likewise.
(neg_scc_insn): Remove pattern.
(not_scc_insn): Likewise.

From-SVN: r278610

4 years ago[ARC] Fix ARC target specific tests.
Claudiu Zissulescu [Fri, 22 Nov 2019 07:59:54 +0000 (08:59 +0100)] 
[ARC] Fix ARC target specific tests.

Fix ARC specific tests by improving the matching pattern and adding
the missing functionality in arc.exp

gcc/tests
xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>

* gcc.target/arc/add_n-combine.c: Match add1/2/3 instruction in
output assembly.
* gcc.target/arc/arc.exp (check_effective_target_codedensity):
Add.
* gcc.target/arc/cmem-7.c: Fix matching patterns.
* gcc.target/arc/cmem-bit-1.c: Likewise.
* gcc.target/arc/cmem-bit-2.c: Likewise.
* gcc.target/arc/cmem-bit-3.c: Likewise.
* gcc.target/arc/cmem-bit-4.c: Likewise.
* gcc.target/arc/interrupt-2.c: Match rtie insn for A7.
* gcc.target/arc/store-merge-1.c: This test is only meaningful for
architectures with double load/store operations.

From-SVN: r278609

4 years agostrlenopt-66.c: Avoid buffer overflow.
Martin Sebor [Fri, 22 Nov 2019 00:51:16 +0000 (00:51 +0000)] 
strlenopt-66.c: Avoid buffer overflow.

gcc/testsuite/ChangeLog:
* gcc.dg/strlenopt-66.c: Avoid buffer overflow.  Add more test cases.

From-SVN: r278608

4 years agoDaily bump.
GCC Administrator [Fri, 22 Nov 2019 00:16:42 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r278607

4 years agodoc: Remove claim about ISO C
Harald van Dijk [Thu, 21 Nov 2019 23:27:39 +0000 (00:27 +0100)] 
doc: Remove claim about ISO C

The patch to make -fcommon the default introduces a bogus claim into
the GCC documentation.

-fcommon was claimed to be incompatible with ISO C for preventing
duplicate definitions from being diagnosed.  It does, but as that
elicits undefined behaviour (the requirement that there shall be no
more than one external definition is not a constraint), ISO C does not
require any diagnostic for it.  In the absence of any other rule this
would violate, both -fcommon and -fno-common are fully compatible with
all versions of ISO C.

2019-11-21  Harald van Dijk  <harald@gigawatt.nl>

* doc/invoke.texi (-fcommon): Remove claim about ISO C.

From-SVN: r278604

4 years agoMake more bad uses of fallthrough attribute into pedwarns.
Joseph Myers [Thu, 21 Nov 2019 20:29:40 +0000 (20:29 +0000)] 
Make more bad uses of fallthrough attribute into pedwarns.

Various bad uses of the [[fallthrough]] attribute are constraint
violations in C2x, so need pedwarns rather than warnings.

This patch duly turns the relevant warnings into pedwarns.  The
relevant code is not specific to C, and does not know which form the
attribute was given in ([[fallthrough]] or [[gnu::fallthrough]] or
__attribute__((fallthrough))), but as I understand it these usages are
also erroneous for C++ and it seems reasonable to give a pedwarn here
even when a form other than [[fallthrough]] is being used.

The precise meaning of the standard wording about "The next statement
that would be executed" seems a but unclear in some corner cases; the
tests added keep to cases where it is clear whether or not the next
statement executed is of the required form.

Bootstrapped with no regressions for x86_64-pc-linux-gnu.

gcc:
* gimplify.c (expand_FALLTHROUGH_r, expand_FALLTHROUGH): Use
pedwarn instead of warning_at for fallthrough not preceding a case
or default label.

gcc/c-family:
* c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
of warning.

gcc/testsuite:
* gcc.dg/c2x-attr-fallthrough-6.c: New test.  Split out from
c2x-attr-fallthrough-3.c.
* gcc.dg/c2x-attr-fallthrough-1.c: Add more tests.
* gcc.dg/c2x-attr-fallthrough-2.c: Update expected diagnostics.
* gcc.dg/c2x-attr-fallthrough-3.c: Split inside-switch part of
test out to c2x-attr-fallthrough-6.c.

From-SVN: r278599

4 years agoUse safe_dyn_cast instead of dyn_cast in find_loop_guard to fix PR92608.
Prathamesh Kulkarni [Thu, 21 Nov 2019 20:20:36 +0000 (20:20 +0000)] 
Use safe_dyn_cast instead of dyn_cast in find_loop_guard to fix PR92608.

2019-11-22  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

PR tree-optimization/92608
* tree-ssa-loop-unswitch.c (find_loop_guard): Use safe_dyn_cast instead
of dyn_cast.

testsuite/
* gcc.dg/torture/pr92608.c: New test.

From-SVN: r278598

4 years ago[Darwin, testsuite] Update tests for common section use.
Iain Sandoe [Thu, 21 Nov 2019 20:08:57 +0000 (20:08 +0000)] 
[Darwin, testsuite] Update tests for common section use.

These two tests are explicitly testing the use of specific
sections or assembler directives for data that is placed in
common.  Append -fcommon to the flags to restore them.

gcc/testsuite/ChangeLog:

2019-11-21  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.dg/darwin-comm.c: Add -fcommon to compile flags.
* gcc.dg/darwin-sections.c: Likewise.

From-SVN: r278596

4 years ago[testsuite] Fix bad dg-error syntax in gnu2x-attrs-1.c.
Iain Sandoe [Thu, 21 Nov 2019 19:56:34 +0000 (19:56 +0000)] 
[testsuite] Fix bad dg-error syntax in gnu2x-attrs-1.c.

2019-11-21  Iain Sandoe  <iain@sandoe.co.uk>

PR testsuite/92619
* gcc.dg/gnu2x-attrs-1.c: Fix dg-error syntax.

From-SVN: r278594

4 years agors6000: Don't split FP comparisons at expand time
Segher Boessenkool [Thu, 21 Nov 2019 18:14:28 +0000 (19:14 +0100)] 
rs6000: Don't split FP comparisons at expand time

We currently expand various floating point comparisons early, to some
sequences with cror insns and the like.  This doesn't optimize well.

Change that to allow any of the 14 floating point comparisons in the
instruction stream, and split them after combine (at split1).

* config/rs6000/predicates.md (extra_insn_branch_comparison_operator):
New predicate.
* config/rs6000/rs6000-protos.h (rs6000_emit_fp_cror): New declaration.
* config/rs6000/rs6000.c (rs6000_generate_compare): Don't do anything
special for FP comparisons that need a cror instruction eventually.
(rs6000_emit_fp_cror): New function.
(rs6000_emit_sCOND): Expand all floating point comparisons to one
instruction, for normal FP modes, with HONOR_NANS.
(rs6000_emit_cbranch): Reformat.
* config/rs6000/rs6000.md (fp_rev): New iterator.
(fp_two): New iterator.
*<code><mode>_cc for fp_rev and GPR: New define_insn_and_split.
*<code><mode>_cc for fp_two and GPR: New define_insn_and_split.
*cbranch_2insn: New define_insn_and_split.

From-SVN: r278593

4 years agoReject versioning for alignment with different masks (PR 92526)
Richard Sandiford [Thu, 21 Nov 2019 17:45:36 +0000 (17:45 +0000)] 
Reject versioning for alignment with different masks (PR 92526)

Allowing mixed vector sizes broke the assumption in the following assert,
since it's now possible for different accesses to require different
levels of alignment:

              /* FORNOW: use the same mask to test all potentially unaligned
                 references in the loop.  The vectorizer currently supports
                 a single vector size, see the reference to
                 GET_MODE_NUNITS (TYPE_MODE (vectype)) where the
                 vectorization factor is computed.  */
              gcc_assert (!LOOP_VINFO_PTR_MASK (loop_vinfo)
                          || LOOP_VINFO_PTR_MASK (loop_vinfo) == mask);

I guess we could try to over-align smaller accesses so that all
of them are consistent, or try to support multiple alignment masks,
but for now the easiest fix seems to be to turn the assert into a
bail-out check.

2019-11-21  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
PR tree-optimization/92526
* tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Reject
versioning for alignment if the accesses do not have a consistent
mask, rather than asserting that the masks are consistent.

gcc/testsuite/
PR tree-optimization/92526
* gcc.target/aarch64/pr92526.c: New test.

From-SVN: r278592

4 years agoAdd more markup to vect-alias-check-{1,18}.c (PR 92543)
Richard Sandiford [Thu, 21 Nov 2019 17:43:24 +0000 (17:43 +0000)] 
Add more markup to vect-alias-check-{1,18}.c (PR 92543)

In vect-alias-check-1.c we unroll the inner loop and then vectorise
the stores at a[c + 1][b].  Since the access has no guaranteed
alignemnt, we need a realignment mechanism or support for unaligned
accesses in order to vectorise.

In vect-alias-check-18.c we use a reverse access and so need
permute support in order to vectorise.

I'm not really sure when this part of the testsuite prefers
{ xfail { ! foo } } and when it prefers { target foo }.  xfail
seems like the most common choice for the alignment restriction,
whereas vect_int and vect_perm are mostly dg-require-effective-target
style features, so I went with that combination.

2019-11-21  Richard Sandiford  <richard.sandiford@arm.com>

gcc/testsuite/
PR testsuite/92543
* gcc.dg/vect/vect-alias-check-1.c: XFAIL the alias check message
if there is no realignment support and no support for unaligned
accesses.
* gcc.dg/vect/vect-alias-check-18.c: Restrict the test for the
alias message to targets that have permute support.

From-SVN: r278591

4 years agoAdd missing VECTOR_MODE_P checks (PR 92595)
Richard Sandiford [Thu, 21 Nov 2019 17:41:16 +0000 (17:41 +0000)] 
Add missing VECTOR_MODE_P checks (PR 92595)

This patch fixes some cases in which we weren't checking whether we had
a vector mode before calling related_vector_mode or before making vector
optab queries.

2019-11-21  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
PR tree-optimization/92595
* tree-vect-stmts.c (get_group_load_store_type): Add a VECTOR_MODE_P
check.
(vectorizable_store, vectorizable_load): Likewise.

gcc/testsuite/
PR tree-optimization/92595
* g++.dg/vect/pr92595.cc: New test.

From-SVN: r278590

4 years ago[GCC][ARM]: Fix the failing ACLE testcase with correct test directive.
Srinath Parvathaneni [Thu, 21 Nov 2019 17:31:01 +0000 (17:31 +0000)] 
[GCC][ARM]: Fix the failing ACLE testcase with correct test directive.

Hello,

This patch fixes arm acle testcase crc_hf_1.c by modifying the compiler
options directive.

Regression tested on arm-none-eabi and found no regressions.

Ok for trunk? If ok, please commit on my behalf, I don't have the commit
rights.

Thanks,
Srinath.

Applied on behalf of Srinath.

gcc/testsuite/ChangeLog:

2019-11-21  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>

* gcc.target/arm/acle/crc_hf_1.c: Modify the compiler options directive
from dg-options to dg-additional-options.

From-SVN: r278588

4 years agoFix failures on Solaris with -fno-common default
Rainer Orth [Thu, 21 Nov 2019 16:14:21 +0000 (16:14 +0000)] 
Fix failures on Solaris with -fno-common default

gcc/testsuite:
* gcc.c-torture/execute/20030913-1.c: Rename glob to g.
* gcc.c-torture/execute/960218-1.c: Rename glob to gl.
* gcc.c-torture/execute/complex-6.c: Rename err to e.
* gcc.dg/torture/ssa-pta-fn-1.c: Rename glob to g.

libgomp:
* testsuite/libgomp.c/pr39591-1.c: Rename err to e.
* testsuite/libgomp.c/pr39591-2.c: Likewise.
* testsuite/libgomp.c/pr39591-3.c: Likewise.
* testsuite/libgomp.c/private-1.c: Likewise.
* testsuite/libgomp.c/task-1.c: Likewise.
* testsuite/libgomp.c/task-5.c: Renamed err to serr.

From-SVN: r278571

4 years agoPR c++/92450 - ICE with invalid nested name specifier.
Marek Polacek [Thu, 21 Nov 2019 15:27:46 +0000 (15:27 +0000)] 
PR c++/92450 - ICE with invalid nested name specifier.

* parser.c (cp_parser_member_declaration): Don't attempt to print
erroneous bit-field diagnostic if grokdeclarator returns
error_mark_node.

* g++.dg/parse/crash71.C: New test.

From-SVN: r278570

4 years agoAvoid quadratic behaviour of update_callee_keys.
Jan Hubicka [Thu, 21 Nov 2019 15:23:09 +0000 (16:23 +0100)] 
Avoid quadratic behaviour of update_callee_keys.

* ipa-inline.c (update_callee_keys): Add parameter UPDATE_SINCE.
(resolve_noninline_speculation, inline_small_functions): Avoid
redundant updates.

From-SVN: r278566

4 years agoFix global_vars_f90_init test failure
Wilco Dijkstra [Thu, 21 Nov 2019 15:06:56 +0000 (15:06 +0000)] 
Fix global_vars_f90_init test failure

Add a missing extern to ensure the test passes with -fno-common change.
Committed as obvious.

    testsuite/
* gfortran.dg/global_vars_f90_init_driver.c: Add missing extern.

From-SVN: r278557

4 years agolra.c (lra_insn_recog_data_pool): New.
Richard Biener [Thu, 21 Nov 2019 15:02:19 +0000 (15:02 +0000)] 
lra.c (lra_insn_recog_data_pool): New.

2019-11-21  Richard Biener  <rguenther@suse.de>

* lra.c (lra_insn_recog_data_pool): New.
(free_insn_recog_data): Adjust.
(finish_insn_recog_data): Release lra_insn_recog_data_pool.
(lra_set_insn_recog_data): Allocate from lra_insn_recog_data_pool.

From-SVN: r278556

4 years agore PR tree-optimization/92596 (ICE in exact_div, at poly-int.h:2162 since r278406)
Richard Biener [Thu, 21 Nov 2019 15:01:17 +0000 (15:01 +0000)] 
re PR tree-optimization/92596 (ICE in exact_div, at poly-int.h:2162 since r278406)

2019-11-21  Richard Biener  <rguenther@suse.de>

PR tree-optimization/92596
* tree-vect-slp.c (vect_build_slp_tree): Fix pasto.

* gcc.dg/torture/pr92596-1.c: New testcase.

From-SVN: r278555

4 years agoFix previous commit.
Jan Hubicka [Thu, 21 Nov 2019 14:59:20 +0000 (15:59 +0100)] 
Fix previous commit.

        * ipa-prop.h (ipa_release_agg_values): Add parameter RELEASE_VECTOR.

From-SVN: r278554

4 years agoipa-fnsummary.c (evaluate_conditions_for_known_args): Be ready for some vectors to...
Jan Hubicka [Thu, 21 Nov 2019 14:58:08 +0000 (15:58 +0100)] 
ipa-fnsummary.c (evaluate_conditions_for_known_args): Be ready for some vectors to not be allocated.

* ipa-fnsummary.c (evaluate_conditions_for_known_args): Be
ready for some vectors to not be allocated.
(evaluate_properties_for_edge): Document better; make
known_vals and known_aggs caller allocated; avoid determining
values of parameters which are not used.
(ipa_merge_fn_summary_after_inlining): Pre allocate known_vals and
known_aggs.
* ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
(do_estimate_edge_size): Likewise.
(do_estimate_edge_hints): Likewise.
* ipa-cp.c (ipa_get_indirect_edge_target_1): Do not early exit when
values are not known.
(ipa_release_agg_values): Add option to not release vector itself.

From-SVN: r278553

4 years agoTestsuite: Fix fp-int-convert-timode-1.c testism.
Tamar Christina [Thu, 21 Nov 2019 14:08:10 +0000 (14:08 +0000)] 
Testsuite: Fix fp-int-convert-timode-1.c testism.

The test fp-int-convert-timode-1.c uses FE_TONEAREST without
actually checking if the target has defined it.

Like the rest of the tests I now add a check to see if the target
has actually implemented it.

This fixed Arm newlib target failures.

Regtested on aarch64-none-elf and aarch64_be-none-elf and no issues.

Committed under the GCC obvious rules.

gcc/testsuite/ChangeLog:

* gcc.dg/torture/fp-int-convert-timode-1.c: Add check for FE_TONEAREST.

From-SVN: r278552

4 years agocfgloop.h (loop_iterator::~loop_iterator): Remove.
Richard Biener [Thu, 21 Nov 2019 13:46:18 +0000 (13:46 +0000)] 
cfgloop.h (loop_iterator::~loop_iterator): Remove.

2019-11-21  Richard Biener  <rguenther@suse.de>

* cfgloop.h (loop_iterator::~loop_iterator): Remove.
(loop_iterator::to_visit): Use an auto_vec with internal storage.
(loop_iterator::loop_iterator): Adjust.
* cfganal.c (compute_dominance_frontiers_1): Fold into...
(compute_dominance_frontiers): ... this.  Hoist invariant
get_immediate_dominator call.
(compute_idf): Use a work-set instead of a work-list for more
optimal iteration order and duplicate avoidance.
* tree-into-ssa.c (mark_phi_for_rewrite): Avoid re-allocating
the vector all the time, instead pre-allocate the vector only
once.
(delete_update_ssa): Simplify.
* vec.h (va_heap::release): Disable -Wfree-nonheap-object around it.

From-SVN: r278550

4 years ago[AArch64] Add -fno-vect-cost-model to sve2/whilerw_1.c
Richard Sandiford [Thu, 21 Nov 2019 12:03:54 +0000 (12:03 +0000)] 
[AArch64] Add -fno-vect-cost-model to sve2/whilerw_1.c

Bumping the cost of vec_to_scalar made the .s loop in
gcc.target/aarch64/sve2/whilerw_1.c use a runtime profitability check,
like the .d version already did.  Since the cost model isn't really
being tested here, the most robust fix seemed to be to disable it,
which I should really have done from the outset.

2019-11-21  Richard Sandiford  <richard.sandiford@arm.com>

gcc/testsuite/
* gcc.target/aarch64/sve2/whilerw_1.c: Add -fno-vect-cost-model.
Require x0 in the .d test too.

From-SVN: r278549

4 years agore PR tree-optimization/91355 (optimized code does not call destructor while unwindin...
Jakub Jelinek [Thu, 21 Nov 2019 10:59:27 +0000 (11:59 +0100)] 
re PR tree-optimization/91355 (optimized code does not call destructor while unwinding after exception)

PR tree-optimization/91355
* tree-ssa-sink.c (select_best_block): Use >= rather than >
for early_bb scaled count with best_bb count comparison.

* g++.dg/torture/pr91355.C: New test.

From-SVN: r278548

4 years ago[Darwin, testsuite] Fix fail of gnu2x-attrs-1.c.
Iain Sandoe [Thu, 21 Nov 2019 10:41:41 +0000 (10:41 +0000)] 
[Darwin, testsuite] Fix fail of gnu2x-attrs-1.c.

This test fails on targets without symbol alias support, but we don't
want to skip it entirely with the usual dg-requires, thus expect the
error on the alias line.

gcc/testsuite/ChangeLog:

2019-11-21  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.dg/gnu2x-attrs-1.c: Expect an error for the alias case
on Darwin.

From-SVN: r278547

4 years agoipa-fnsummary.h (enum ipa_hints_vals): Fix comment typo, preffer -> prefer.
Jakub Jelinek [Thu, 21 Nov 2019 09:39:47 +0000 (10:39 +0100)] 
ipa-fnsummary.h (enum ipa_hints_vals): Fix comment typo, preffer -> prefer.

* ipa-fnsummary.h (enum ipa_hints_vals): Fix comment typo,
preffer -> prefer.
* ipa-inline.c (edge_badness): Likewise.
* lto-streamer.h (class lto_location_cache): Likewise.
* tree-ssa-sink.c (select_best_block): Likewise.  Fix comment typos,
gratutious -> gratuitous.

From-SVN: r278546

4 years agorevert: re PR tree-optimization/91790 (ICE: verify_ssa failed (error: definition...
Richard Biener [Thu, 21 Nov 2019 09:16:46 +0000 (09:16 +0000)] 
revert: re PR tree-optimization/91790 (ICE: verify_ssa failed (error: definition in block 2 follows the use))

2019-11-21  Richard Biener  <rguenther@suse.de>

Revert
2019-09-17  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91790
* tree-vect-stmts.c (vectorizable_load): For BB vectorization
use the correct DR for setting up realignment.

From-SVN: r278544

4 years agocfganal.c (pre_and_rev_post_order_compute_fn): Use an auto_bb_flag instead of an...
Richard Biener [Thu, 21 Nov 2019 08:39:53 +0000 (08:39 +0000)] 
cfganal.c (pre_and_rev_post_order_compute_fn): Use an auto_bb_flag instead of an sbitmap for visited handling.

2019-11-21  Richard Biener  <rguenther@suse.de>

* cfganal.c (pre_and_rev_post_order_compute_fn): Use an
auto_bb_flag instead of an sbitmap for visited handling.
* lra.c (lra_insn_recog_data_pool): New.
(free_insn_recog_data): Adjust.
(finish_insn_recog_data): Release lra_insn_recog_data_pool.
(lra_set_insn_recog_data): Allocate from lra_insn_recog_data_pool.
* tree-ssa-structalias.c (equiv_class_hasher): Change to nofree.
(equiv_class_obstack): New.
(equiv_class_lookup_or_add): Allocate from equiv_class_obstack.
(perform_var_substitution): Initialize equiv_class_obstack.
(free_var_substitution_info): Free equiv_class_obstack.

From-SVN: r278543

4 years agoAvoid quadratic behaviour of early inliner.
Jan Hubicka [Thu, 21 Nov 2019 08:15:47 +0000 (09:15 +0100)] 
Avoid quadratic behaviour of early inliner.

* ipa-inline.c (want_early_inline_function_p): Do not estimate
edge growth when callee function is very large.
* ipa-inline.h (estimate_min_edge_growth): New.

From-SVN: r278542

4 years agoIncremental updating of inline summaries.
Jan Hubicka [Thu, 21 Nov 2019 08:03:01 +0000 (09:03 +0100)] 
Incremental updating of inline summaries.

        * ipa-fnsummary.c (ipa_fn_summary::account_size_time): Allow
negative time in calls summary; correct roundoff errors
leading to negative times.
(ipa_merge_fn_summary_after_inlining): Update calls size time table
if present.
(ipa_update_overall_fn_summary): Add RESET parameter.
* ipa-fnsummary.h (ipa_update_overall_fn_summary): Update prototype.
* ipa-inline-transform.c (inline_call): Enable incremental updates.

From-SVN: r278541

4 years agore PR go/92605 (r278509 causes/reveals issue in building go library)
Ian Lance Taylor [Thu, 21 Nov 2019 01:06:47 +0000 (01:06 +0000)] 
re PR go/92605 (r278509 causes/reveals issue in building go library)

PR go/92605
    runtime: declare runtime_usestackmaps in stack.c, not runtime.h

    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/208161

From-SVN: r278540

4 years agomksysinfo: use type aliases for time struct field types
Ian Lance Taylor [Thu, 21 Nov 2019 01:03:55 +0000 (01:03 +0000)] 
mksysinfo: use type aliases for time struct field types

    Also fix a case where grep wasn't redirecting to /dev/null.

    Fixes golang/go#35713

    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/208160

From-SVN: r278539

4 years agore PR c++/90842 (ICE in poplevel, at cp/decl.c:585)
Jakub Jelinek [Thu, 21 Nov 2019 01:00:43 +0000 (02:00 +0100)] 
re PR c++/90842 (ICE in poplevel, at cp/decl.c:585)

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.

Co-Authored-By: Jason Merrill <jason@redhat.com>
From-SVN: r278538

4 years agoDaily bump.
GCC Administrator [Thu, 21 Nov 2019 00:16:35 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r278537

4 years agoAdd test for PR c++/92443.
Marek Polacek [Wed, 20 Nov 2019 22:59:20 +0000 (22:59 +0000)] 
Add test for PR c++/92443.

* g++.dg/cpp0x/constexpr-92443.C: New test.

From-SVN: r278534

4 years agoRestore stmt def types after scheduling two-operation SLP
Richard Sandiford [Wed, 20 Nov 2019 21:15:54 +0000 (21:15 +0000)] 
Restore stmt def types after scheduling two-operation SLP

2019-11-20  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* tree-vect-slp.c (vect_schedule_slp_instance): Restore stmt
def types for two-operation SLP.

From-SVN: r278533

4 years agoRestrict bb-slp-40.c to targets with VnQI addition (PR 92366)
Richard Sandiford [Wed, 20 Nov 2019 21:13:05 +0000 (21:13 +0000)] 
Restrict bb-slp-40.c to targets with VnQI addition (PR 92366)

bb-slp-40.c fails on SPARC targets without VIS4 because it
requires addition on vectors of bytes.  There doesn't seem to be
an existing target selector for this, so I added vect_char_add.
(Wasn't sure whether to use vect_char_add, for consistency
with vect_no_int_add/vect_int_mult etc., or vect_add_char for
consistency with vect_shift_char etc.)

I took the target list from vect_int and removed targets that didn't
seem to support the operation (namely sparc*, since we don't seem to
have any test for VIS4, niagara7 or m8, and alpha*-*-*.)

2019-11-20  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
PR testsuite/92366
* doc/sourcebuild.texi (vect_char_add): Document.

gcc/testsuite/
PR testsuite/92366
* lib/target-supports.exp (check_effective_target_vect_char_add):
New proc.
* gcc.dg/vect/bb-slp-40.c: Require vect_char_add instead of vect_int.

From-SVN: r278532

4 years agoAdjust expected output for bb-slp-21.c (PR 92527)
Richard Sandiford [Wed, 20 Nov 2019 21:08:52 +0000 (21:08 +0000)] 
Adjust expected output for bb-slp-21.c (PR 92527)

After r278246, we can try building the out[] store value from scalars
if the target has no multiplication support.  That's not necessarily
a good thing, but like most of vect/, this test is run with the cost
model disabled.

2019-11-20  Richard Sandiford  <richard.sandiford@arm.com>

gcc/testsuite/
PR testsuite/92527
* gcc.dg/vect/bb-slp-21.c: Expect both SLP groups to be vectorized,
regardless of whether the target supports multiplication.

From-SVN: r278531

4 years agotypeck2.c (build_x_arrow): Early return if decay_conversion returns error_mark_node.
Paolo Carlini [Wed, 20 Nov 2019 21:03:05 +0000 (21:03 +0000)] 
typeck2.c (build_x_arrow): Early return if decay_conversion returns error_mark_node.

/gcc
2019-11-20  Paolo Carlini  <paolo.carlini@oracle.com>

* typeck2.c (build_x_arrow): Early return if decay_conversion
returns error_mark_node.

/testsuite
2019-11-20  Paolo Carlini  <paolo.carlini@oracle.com>

* g++.dg/parse/error43.C: Adjust expected error.

From-SVN: r278530

4 years agodrop attempt to reuse cgraph callees for -fcallgraph-info
Alexandre Oliva [Wed, 20 Nov 2019 20:54:31 +0000 (20:54 +0000)] 
drop attempt to reuse cgraph callees for -fcallgraph-info

The information in cgraph callees is released long before we get to
the point in which -fcallgraph-info edges are dumped, or even
expanded.  It doesn't make sense to retain it longer: the edges
created for -fcallgraph-info are much smaller, and they don't even
coexist, so not even peak use grows.

for  gcc/ChangeLog

* function.h (CALLEE_FROM_CGRAPH_P): Remove.
* function.c (record_final_call): Record even calls that might
have been in the cgraph.
* toplev.c (dump_final_node_vcg): Skip iteration over cgraph
callees.

From-SVN: r278529

4 years agoSwitch gcc ftp URL's to https
Janne Blomqvist [Wed, 20 Nov 2019 20:24:48 +0000 (22:24 +0200)] 
Switch gcc ftp URL's to https

The FTP protocol is getting long in the tooth, and we should emphasize
HTTPS where that is available. This patch changes various gcc.gnu.org
URL's to instead use HTTPS.

For instance, kernel.org shut down FTP access in 2017, with the
explanation:

- The protocol is inefficient and requires adding awkward kludges to
  firewalls and load-balancing daemons
- FTP servers have no support for caching or accelerators, which has
  significant performance impacts
- Most software implementations have stagnated and see infrequent
  updates

ChangeLog:

2019-11-20  Janne Blomqvist  <jb@gcc.gnu.org>

        * configure.ac: Use https for gcc.gnu.org.
        * configure: Regenerated.

gcc/ChangeLog:

2019-11-20  Janne Blomqvist  <jb@gcc.gnu.org>

        * configure.ac: Use https for gcc.gnu.org.
        * configure: Regenerated.
        * doc/install.texi: Use https for gcc.gnu.org.
        * doc/sourcebuild.texi: Likewise.

gcc/testsuite/ChangeLog:

2019-11-20  Janne Blomqvist  <jb@gcc.gnu.org>

        * README: Use https for gcc.gnu.org.

libstdc++-v3/ChangeLog:

2019-11-20  Janne Blomqvist  <jb@gcc.gnu.org>

        * doc/html/api.html: Use https for gcc.gnu.org.
        * doc/xml/api.xml: Likewise.

maintainer-scripts/ChangeLog:

2019-11-20  Janne Blomqvist  <jb@gcc.gnu.org>

        * gcc_release: Use https for gcc.gnu.org.

From-SVN: r278526

4 years agoPR 92463 MPFR modernization: Revert r269139
Janne Blomqvist [Wed, 20 Nov 2019 20:08:29 +0000 (22:08 +0200)] 
PR 92463 MPFR modernization: Revert r269139

Commit r269139 fixed an accidental dependency on MPFR 3.0. As we now
require at least MPFR 3.1.0+ we can revert it and instead use the
simpler MPFR 3.0+ code.

ChangeLog entry of the original commit was:

2019-02-23  David Malcolm  <dmalcolm@redhat.com>
            Jakub Jelinek  <jakub@redhat.com>

        PR middle-end/88074
        * simplify.c (norm2_do_sqrt, gfc_simplify_norm2): Use
        mpfr_number_p && !mpfr_zero_p instead of mpfr_regular_p.
        (norm2_add_squared): Likewise.  Use mp_exp_t rather than mpfr_exp_t.

ChangeLog for this commit:

2019-11-20  Janne Blomqvist  <jb@gcc.gnu.org>

PR fortran/92463
Revert r269139
* simplify.c (norm2_do_sqrt, gfc_simplify_norm2): Use
mpfr_regular_p instead of mpfr_number_p && !mpfr_zero_p.
(norm2_add_squared): Likewise.  Use mpfr_exp_t rather than
mp_exp_t.

From-SVN: r278525

4 years agoPR 92463 MPFR modernization in GFortran
Janne Blomqvist [Wed, 20 Nov 2019 20:01:25 +0000 (22:01 +0200)] 
PR 92463 MPFR modernization in GFortran

Now that we require a minimum of MPFR 3.1.0+ to build GCC, we can do
some modernization of the MPFR usage in the GFortran frontend.

This patch replaces

1) GMP_RND* with MPFR_RND*

2) mp_exp_t with mpfr_exp_t

3) mp_prec_t with mpfr_prec_t

4) mp_rnd_t with mpfr_rnd_t

gcc/fortran/ChangeLog:

2019-11-20  Janne Blomqvist  <jb@gcc.gnu.org>

PR fortran/92463
* arith.c (gfc_mpfr_to_mpz): Change mp_exp_t to mpfr_exp_t.
(gfc_check_real_range): Likewise.
* gfortran.h (GFC_RND_MODE): Change GMP_RNDN to MPFR_RNDN.
* module.c (mio_gmp_real): Change mp_exp_t to mpfr_exp_t.
* simplify.c (degrees_f): Change mp_rnd_t to mpfr_rnd_t.
(radians_f): Likewise.
(fullprec_erfc_scaled): Change mp_prec_t to mpfr_prec_t.
(asympt_erfc_scaled): Likewise.
(gfc_simplify_nearest): Change mp_exp_t to mpfr_exp_t, and
GMP_RND* to MPFR_RND*.

From-SVN: r278523

4 years ago[AArch64] Fix vrbit_1.c test failure
Wilco Dijkstra [Wed, 20 Nov 2019 17:58:39 +0000 (17:58 +0000)] 
[AArch64] Fix vrbit_1.c test failure

The vrbit_1 test which was missing a flag to disable code sharing.
Committed as obvious.

    testsuite/
* gcc.target/aarch64/simd/vrbit_1.c: Add -fno-ipa-icf.

From-SVN: r278519

4 years agoAMD GCN symbol output with null cfun
Julian Brown [Wed, 20 Nov 2019 17:58:30 +0000 (17:58 +0000)] 
AMD GCN symbol output with null cfun

gcc/
* config/gcn/gcn.c (gcn_asm_output_symbol_ref): Handle null cfun.

Reviewed-by: Andrew Stubbs <ams@codesourcery.com>
From-SVN: r278518

4 years agoAMD GCN libgomp plugin queue-full condition locking fix
Julian Brown [Wed, 20 Nov 2019 17:56:30 +0000 (17:56 +0000)] 
AMD GCN libgomp plugin queue-full condition locking fix

libgomp/
* plugin/plugin-gcn.c (wait_for_queue_nonfull): Don't lock/unlock
aq->mutex here.
(queue_push_launch): Lock aq->mutex before calling
wait_for_queue_nonfull.
(queue_push_callback): Likewise.
(queue_push_asyncwait): Likewise.
(queue_push_placeholder): Likewise.

Reviewed-by: Andrew Stubbs <ams@codesourcery.com>
From-SVN: r278517

4 years agoFix host-to-device copies from rodata for AMD GCN
Julian Brown [Wed, 20 Nov 2019 17:53:31 +0000 (17:53 +0000)] 
Fix host-to-device copies from rodata for AMD GCN

libgomp/
* plugin/plugin-gcn.c (hsa_memory_copy_wrapper): New.
(copy_data, GOMP_OFFLOAD_host2dev): Use above function.
(GOMP_OFFLOAD_dev2host, GOMP_OFFLOAD_dev2dev): Check hsa_memory_copy
return code.

Reviewed-by: Andrew Stubbs <ams@codesourcery.com>
From-SVN: r278516

4 years agojit: fix ICE with GCC_JIT_BOOL_OPTION_SELFCHECK_GC since r278084 (PR jit/92483)
David Malcolm [Wed, 20 Nov 2019 17:51:41 +0000 (17:51 +0000)] 
jit: fix ICE with GCC_JIT_BOOL_OPTION_SELFCHECK_GC since r278084 (PR jit/92483)

Since r278084 (part of the params refactoring), most of libgccjit's
test suite has been ICEing.

The root cause is that jit-playback.c injects params to its fake_args
here:

  /* Aggressively garbage-collect, to shake out bugs: */
  if (get_bool_option (GCC_JIT_BOOL_OPTION_SELFCHECK_GC))
    {
      ADD_ARG ("--param");
      ADD_ARG ("ggc-min-expand=0");
      ADD_ARG ("--param");
      ADD_ARG ("ggc-min-heapsize=0");
    }

(building a vec of char * where the char * are allocated using xstrdup)

and r278084 added this logic to decode_cmdline_options_to_array:

964       /* Interpret "--param" "key=name" as "--param=key=name".  */
965       const char *needle = "--param";
966       if (i + 1 < argc && strcmp (opt, needle) == 0)
967 {
968   const char *replacement
969     = opts_concat (needle, "=", argv[i + 1], NULL);
970   argv[++i] = replacement;
971 }

Note that at line 970 it manipulates the argv in-place, inserting a
new option allocated with opts_concat, which uses opts_obstack
(itself initialized from toplev::main).

jit-playback.c cleans up its fake arguments using "free", at which
point we have a free of the middle of an obstack and an ICE.

This patch fixes the issue by using the new syntax for the params.

Fixes all 60 FAILs in jit.sum, restoring the number of PASS results
from 2033 to 10469.

gcc/jit/ChangeLog:
PR jit/92483
* jit-playback.c (gcc::jit::playback::context::make_fake_args):
Update GCC_JIT_BOOL_OPTION_SELFCHECK_GC for new --param syntax.

From-SVN: r278515

4 years agoOpenACC "present" subarrays: runtime API return value and unmapping fixes
Julian Brown [Wed, 20 Nov 2019 17:51:09 +0000 (17:51 +0000)] 
OpenACC "present" subarrays: runtime API return value and unmapping fixes

PR libgomp/92511

libgomp/
* oacc-mem.c (present_create_copy): Fix device pointer return value in
case of "present" subarray.  Use tgt->tgt_start instead of tgt->to_free
in non-present/create case.
(delete_copyout): Change error condition to fail only on copies outside
of mapped block.  Adjust error message accordingly.
* testsuite/libgomp.oacc-c-c++-common/copyin-devptr-1.c: New test.
* testsuite/libgomp.oacc-c-c++-common/copyin-devptr-2.c: New test.
* testsuite/libgomp.oacc-c-c++-common/lib-20.c: Adjust expected error
message.
* testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-22.c: Allow test to pass now.
* testsuite/libgomp.oacc-c-c++-common/lib-30.c: Likewise.

Reviewed-by: Thomas Schwinge <thomas@codesourcery.com>
From-SVN: r278514

4 years agoImplement inline call summaries.
Jan Hubicka [Wed, 20 Nov 2019 17:03:43 +0000 (18:03 +0100)] 
Implement inline call summaries.

* ipa-fnsummary.c (ipa_fn_summary::account_size_time): Add CALL
parameter and update call_size_time_table.
(ipa_fn_summary::max_size_time_table_size): New constant.
(estimate_calls_size_and_time_1): Break out from ...
(estimate_calls_size_and_time): ... here; implement summary production.
(summarize_calls_size_and_time): New function.
(ipa_call_context::estimate_size_and_time): Bypass
estimate_calls_size_and_time for leaf functions.
(ipa_update_overall_fn_summary): Likewise.
* ipa-fnsummary.h (call_size_time_table): New.
(ipa_fn_summary::account_size_time): Update prototype.

From-SVN: r278513

4 years agoDocument -Wc11-c2x-compat.
Joseph Myers [Wed, 20 Nov 2019 16:38:37 +0000 (16:38 +0000)] 
Document -Wc11-c2x-compat.

My patch that added initial C2X support and associated command-line
options missed documenting -Wc11-c2x-compat although the other options
were properly documented.  This patch adds the missing documentation.

Tested with "make info" and "make pdf".

* doc/invoke.texi (-Wc11-c2x-compat): Document.

From-SVN: r278510

4 years agoPR85678: Change default to -fno-common
Wilco Dijkstra [Wed, 20 Nov 2019 16:29:23 +0000 (16:29 +0000)] 
PR85678: Change default to -fno-common

GCC currently defaults to -fcommon.  As discussed in the PR, this is an ancient
C feature which is not conforming with the latest C standards.  On many targets
this means global variable accesses have a codesize and performance penalty.
This applies to C code only, C++ code is not affected by -fcommon.  It is about
time to change the default.

    gcc/
PR85678
* common.opt (fcommon): Change init to 1.
* invoke.texi (-fcommon): Update documentation.

    testsuite/
* g++.dg/lto/odr-6_1.c: Add -fcommon.
* gcc.dg/alias-15.c: Likewise.
* gcc.dg/fdata-sections-1.c: Likewise.
* gcc.dg/ipa/pr77653.c: Likewise.
* gcc.dg/lto/20090729_0.c: Likewise.
* gcc.dg/lto/20111207-1_0.c: Likewise.
* gcc.dg/lto/c-compatible-types-1_0.c: Likewise.
* gcc.dg/lto/pr55525_0.c: Likewise.
* gcc.dg/lto/pr88077_0.c: Use long to avoid alignment warning.
* gcc.dg/lto/pr88077_1.c: Add -fcommon.
* gcc.target/aarch64/sve/peel_ind_1.c: Allow ANCHOR0.
* gcc.target/aarch64/sve/peel_ind_2.c: Likewise.
* gcc.target/aarch64/sve/peel_ind_3.c: Likewise.
* gcc.target/i386/volatile-bitfields-2.c: Allow movl or movq.

From-SVN: r278509

4 years agolibgomp/test: Add flags to find libatomic in build-tree testing
Maciej W. Rozycki [Wed, 20 Nov 2019 15:49:23 +0000 (15:49 +0000)] 
libgomp/test: Add flags to find libatomic in build-tree testing

Add flags to find libatomic in build-tree testing, fixing a catastrophic
libgomp testsuite failure with `riscv*-*-linux*' targets, which imply
`-latomic' with the `-pthread' GCC option, implied in turn by the
`-fopenacc' and `-fopenmp' options, removing failures like:

.../bin/riscv64-linux-gnu-ld: cannot find -latomic
collect2: error: ld returned 1 exit status
compiler exited with status 1
FAIL: libgomp.c/../libgomp.c-c++-common/atomic-18.c (test for excess errors)
Excess errors:
.../bin/riscv64-linux-gnu-ld: cannot find -latomic

UNRESOLVED: libgomp.c/../libgomp.c-c++-common/atomic-18.c compilation failed to produce executable

and bringing overall test results for the `riscv64-linux-gnu' target
(here with the `x86_64-linux-gnu' host and RISC-V QEMU in the Linux user
emulation mode as the target board) from:

=== libgomp Summary ===

# of expected passes 90
# of unexpected failures 3267
# of expected failures 2
# of unresolved testcases 3247
# of unsupported tests 548

to:

=== libgomp Summary ===

# of expected passes 6834
# of unexpected failures 4
# of expected failures 4
# of unsupported tests 518

libgomp/
* testsuite/lib/libgomp.exp (libgomp_init): Add flags to find
libatomic in build-tree testing.

From-SVN: r278505

4 years agoWorkaround bogus warning in fibonacci_heap<K,V>::consolidate.
Jan Hubicka [Wed, 20 Nov 2019 15:45:53 +0000 (16:45 +0100)] 
Workaround bogus warning in fibonacci_heap<K,V>::consolidate.

* fibonacci_heap.h (fibonacci_heap<K,V>::consolidate): Turn auto_vec
to ordinary array.

From-SVN: r278504

4 years agoAdd pool_allocator for fibonaci heaps.
Jan Hubicka [Wed, 20 Nov 2019 15:04:34 +0000 (16:04 +0100)] 
Add pool_allocator for fibonaci heaps.

* fibonacci_heap.h (fibonacci_heap<K,V>::fibonacci_heap):
Add allocator parameter.
(fibonacci_heap<K,V>::~fibonacci_heap): Optimize destruction.
(fibonacci_heap<K,V>::m_allocator): New.
(fibonacci_heap<K,V>::m_own_allocator): New.
(fibonacci_heap<K,V>::insert): Use allocator.
(fibonacci_heap<K,V>::extract_min): Likewise.
(fibonacci_heap<K,V>::union_with): Assert that both heaps share
allocator.
(fibonacci_heap<K,V>::consolidate): Allocate constant sized vector
on stack.
* fibonacci_heap.c: Include alloc-pool
(test_empty_heap): Initialize allocator.
(test_union): Likewise.
* bb-reorder.c: Include alloc-pool.h.
* tracer.c: Inlclude alloc-pool.h.

From-SVN: r278501

4 years agoUpdate comment in libsanitizer/*/libtool-version files.
Martin Liska [Wed, 20 Nov 2019 14:52:05 +0000 (15:52 +0100)] 
Update comment in libsanitizer/*/libtool-version files.

2019-11-20  Martin Liska  <mliska@suse.cz>

* libtool-version: Remove.
* lsan/libtool-version: Upate comment to not mention libmudflap.
* tsan/libtool-version: Likewise.
* ubsan/libtool-version: Likewise.

From-SVN: r278500

4 years agolto-streamer-out.c (DFS::sccstack): Turn into auto-vec.
Jan Hubicka [Wed, 20 Nov 2019 14:10:41 +0000 (15:10 +0100)] 
lto-streamer-out.c (DFS::sccstack): Turn into auto-vec.

* lto-streamer-out.c (DFS::sccstack): Turn into auto-vec.
Preallocate for 32 entries.
(DFS::worklist): Likewise.
(DFS::DFS): Do not initialize sccstack and worklist.
(DFS::~DFS): Do not release sccstack.

From-SVN: r278498

4 years agors6000: Fix UNORDERED without NaNs, for DFP (PR92573)
Segher Boessenkool [Wed, 20 Nov 2019 13:38:52 +0000 (14:38 +0100)] 
rs6000: Fix UNORDERED without NaNs, for DFP (PR92573)

This is the analogue of r278103, but for DFP.

PR target/92573
* config/rs6000/dfp.md (dfptstsfi_<code>_<mode> for DFP_TEST and DDTD):
Handle UNORDERED if !HONOR_NANS.

From-SVN: r278497

4 years agoOptimize updating of badness after applying inline
Jan Hubicka [Wed, 20 Nov 2019 11:46:41 +0000 (12:46 +0100)] 
Optimize updating of badness after applying inline

        * ipa-inline.c (wrapper_heuristics_may_apply): Break out from ...
(edge_badness): ... here.
(inline_small_functions): Use monotonicity of badness calculation
to avoid redundant updates.

From-SVN: r278496

4 years agotree-vect-slp.c (vect_analyze_slp_instance): Dump constructors we are actually analyzing.
Richard Biener [Wed, 20 Nov 2019 11:12:48 +0000 (11:12 +0000)] 
tree-vect-slp.c (vect_analyze_slp_instance): Dump constructors we are actually analyzing.

2019-11-20  Richard Biener  <rguenther@suse.de>

* tree-vect-slp.c (vect_analyze_slp_instance): Dump
constructors we are actually analyzing.
(vect_slp_check_for_constructors): Do not vectorize uniform
constuctors, do not dump here.

* gcc.dg/vect/bb-slp-42.c: Adjust.
* gcc.dg/vect/bb-slp-40.c: Likewise.

From-SVN: r278495

4 years agore PR tree-optimization/92537 (ICE in vect_slp_analyze_node_operations, at tree-vect...
Richard Biener [Wed, 20 Nov 2019 10:40:09 +0000 (10:40 +0000)] 
re PR tree-optimization/92537 (ICE in vect_slp_analyze_node_operations, at tree-vect-slp.c:2775)

2019-11-20  Richard Biener  <rguenther@suse.de>

PR tree-optimization/92537
* tree-vect-slp.c (vect_analyze_slp_instance): Move CTOR
vectorization validity check...
(vect_slp_analyze_operations): ... here.

* gfortran.dg/pr92537.f90: New testcase.

From-SVN: r278494

4 years ago[testsuite][arm] Fix asm-flag-[45].c tests
Christophe Lyon [Wed, 20 Nov 2019 09:31:10 +0000 (09:31 +0000)] 
[testsuite][arm] Fix asm-flag-[45].c tests

In asm-flag-4.c, we need to use dg-message instead of dg-error because
we have to match "sorry, unimplemented:" rather than "error:".  In
asm-flag-5.c, fix the dg-error syntax.

2019-11-20  Christophe Lyon  <christophe.lyon@linaro.org>

* gcc.target/arm/asm-flag-4.c: Replace dg-error with dg-message.
* gcc.target/arm/asm-flag-5.c: Add quotes around dg-error
messages.

From-SVN: r278487

4 years agoRemove my name from AArch64 port maintainers
James Greenhalgh [Wed, 20 Nov 2019 09:29:13 +0000 (09:29 +0000)] 
Remove my name from AArch64 port maintainers

* MAINTAINERS (aarch64 port): Remove my name, move to...
(Write After Approval): ...Here.

From-SVN: r278486

4 years ago[ARC] Register ARC specific passes with a .def file.
Claudiu Zissulescu [Wed, 20 Nov 2019 08:39:21 +0000 (09:39 +0100)] 
[ARC] Register ARC specific passes with a .def file.

New arc-passes.def to register ARC specific passes.

gcc/
xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>

* config/arc/arc-protos.h (make_pass_arc_ifcvt): Declare.
(make_pass_arc_predicate_delay_insns): Likewise.
* config/arc/arc.c (class pass_arc_ifcvt): Reformat text, add gate
method, remove clone.
(class pass_arc_predicate_delay_insns): Likewise.
(arc_init): Remove registering of ARC specific passes.
* config/arc/t-arc (PASSES_EXTRA): Add arc-passes.def.
* config/arc/arc-passes.def: New file.

From-SVN: r278485

4 years agore PR c++/90767 (jumbled error message with this and const)
Jakub Jelinek [Wed, 20 Nov 2019 08:33:56 +0000 (09:33 +0100)] 
re PR c++/90767 (jumbled error message with this and const)

PR c++/90767
* call.c (complain_about_no_candidates_for_method_call): If
conv->from is not a type, pass to complain_about_bad_argument
lvalue_type of conv->from.

* g++.dg/diagnostic/pr90767-1.C: New test.
* g++.dg/diagnostic/pr90767-2.C: New test.

From-SVN: r278484