gcc.git
5 years ago[IRA] Handle fully-tied destinations in a similar way to earlyclobbers
Richard Sandiford [Mon, 7 Oct 2019 08:39:12 +0000 (08:39 +0000)]
[IRA] Handle fully-tied destinations in a similar way to earlyclobbers

IRA's make_early_clobber_and_input_conflicts checks for cases in
which an output operand is likely to be an earlyclobber and an input
operand is unlikely to be tieable with it.  If so, the allocno for
the output conflicts with the allocno for the input.  This seems
to work well.

However, a similar situation arises if an output operand is likely
to be tied to one of a set of input operands X and if another input
operand has a different value from all of the operands in X.
E.g. if we have:

  0: "=r, r"
  1: "0, r"
  2: "r, 0"
  3: "r, r"

operand 0 will always be tied to operand 1 or operand 2, so if operand 3
is different from them both, operand 0 acts like an earlyclobber as far
as operand 3 (only) is concerned.  The same is true for operand 2 in:

  0: "=r"
  1: "0"
  2: "r"

In the second example, we'd normally have a copy between operand 1 and
operand 0 if operand 1 dies in the instruction, and so there's rarely
a problem.  But if operand 1 doesn't die in the instruction, operand 0
still acts as an earlyclobber for operand 2 (if different from operand 1),
since in that case LRA must copy operand 1 to operand 0 before the
instruction.

As the existing comment says:

    Avoid introducing unnecessary conflicts by checking classes of the
    constraints and pseudos because otherwise significant code
    degradation is possible for some targets.

I think that's doubly true here.  E.g. it's perfectly reasonable to have
constraints like:

  0: "=r, r"
  1: "0, r"
  2: "r, r"

on targets like s390 that have shorter instructions for tied operands,
but that don't want the size difference to influence RA too much.
We shouldn't treat operand 0 as earlyclobber wrt operand 2 in that case.

This patch therefore treats a normal tied non-earlyclobber output as
being effectively earlyclobber wrt to an input if it is so for *all*
preferred alternatives.

2019-10-07  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* ira-lives.c (check_and_make_def_conflict): Handle cases in which
DEF is not a true earlyclobber but is tied to a specific input
operand, and so is effectively earlyclobber wrt inputs that have
different values.
(make_early_clobber_and_input_conflicts): Pass this case to the above.

From-SVN: r276650

5 years agoUse CONSTEXPR in machmode.h
Richard Sandiford [Mon, 7 Oct 2019 08:38:49 +0000 (08:38 +0000)]
Use CONSTEXPR in machmode.h

This patch adds CONSTEXPR to constructors and operators in machmode.h,
excluding the controversial constexpr-resistant "() {}" constructors,
which would become "= default" if we required C++11.

Some of the other routines could potentially be constexpr too,
but that can be done on an as-needed basis.

2019-10-07  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* machmode.h (opt_mode): Mark constructors with CONSTEXPR.
(pod_mode): Mark operators likewise.
(scalar_int_mode): Mark non-default constructors and
operators with CONSTEXPR.
(scalar_float_mode, scalar_mode, complex_mode): Likewise.
(fixed_size_mode): Likewise.

From-SVN: r276649

5 years ago[i386] Make the vzeroupper pattern describe its effects (PR91994)
Richard Sandiford [Mon, 7 Oct 2019 08:36:06 +0000 (08:36 +0000)]
[i386] Make the vzeroupper pattern describe its effects (PR91994)

The problem in this PR was that vzeroupper has an effect on register
contents, but those effects weren't modelled in the rtl pattern,
which was just an unspec_volatile.

This patch fixes that by running a subpass after vzeroupper insertion
to add SETs and CLOBBERs as appropriate.  See the comments in the patch
for more details.

2019-10-07  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
PR target/91994
* config/i386/sse.md (avx_vzeroupper): Turn into a define_expand
and wrap the unspec_volatile in a parallel.
(*avx_vzeroupper): New define_insn.  Use a match_parallel around
the unspec_volatile.
* config/i386/predicates.md (vzeroupper_pattern): Expect the
unspec_volatile to be wrapped in a parallel.
* config/i386/i386-features.c (ix86_add_reg_usage_to_vzeroupper)
(ix86_add_reg_usage_to_vzerouppers): New functions.
(rest_of_handle_insert_vzeroupper): Use them to add register
usage information to the vzeroupper instructions.

gcc/testsuite/
PR target/91994
* gcc.target/i386/pr91994.c: New test.

From-SVN: r276648

5 years agore PR tree-optimization/91975 (worse code for small array copy using pointer arithmet...
Richard Biener [Mon, 7 Oct 2019 07:53:45 +0000 (07:53 +0000)]
re PR tree-optimization/91975 (worse code for small array copy using pointer arithmetic than array indexing)

2019-10-07  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91975
* tree-ssa-loop-ivcanon.c (constant_after_peeling): Consistently
handle invariants.

* g++.dg/tree-ssa/ivopts-3.C: Adjust.
* gcc.dg/vect/vect-profile-1.c: Disable cunrolli.
* gcc.dg/vect/vect-double-reduc-6.c: Disable unrolling of
the innermost loop.
* gcc.dg/vect/vect-93.c: Likewise.
* gcc.dg/vect/vect-105.c: Likewise.
* gcc.dg/vect/pr79920.c: Likewise.
* gcc.dg/vect/no-vfa-vect-102.c: Likewise.
* gcc.dg/vect/no-vfa-vect-101.c: Likewise.
* gcc.dg/vect/pr83202-1.c: Operate on a larger array.
* gfortran.dg/vect/vect-8.f90: Likewise.
* gcc.dg/tree-ssa/cunroll-2.c: Scan early unrolling dump instead
of late one.

From-SVN: r276645

5 years agoDaily bump.
GCC Administrator [Mon, 7 Oct 2019 00:16:24 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r276644

5 years agoAdd std::copy_n istreambuf_iterator specialization
François Dumont [Sun, 6 Oct 2019 15:53:51 +0000 (15:53 +0000)]
Add std::copy_n istreambuf_iterator specialization

Commit this missing part which had been rejected.

From-SVN: r276640

5 years agoFix EXECUTE_IF_SET_IN_HARD_REG_SET use
Richard Sandiford [Sun, 6 Oct 2019 15:39:27 +0000 (15:39 +0000)]
Fix EXECUTE_IF_SET_IN_HARD_REG_SET use

As Maxim pointed out, r276309 broke -O3 bootstrap for aarch64-linux-gnu.
It turns out that EXECUTE_IF_SET_IN_HARD_REG_SET isn't safe to use for
temporary objects because their lifetimes don't extend to the end of
the loop.  This patch therefore uses an explicit temporary instead.

Other patches in the series already used this style (but for
full_reg_and_partial_clobbers rather than full_reg_clobbers),
so AFAICT this is the only place that needs fixing.

2019-10-06  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* var-tracking.c (dataflow_set_clear_at_call): Hoist temporary
function result outside of EXECUTE_IF_SET_IN_HARD_REG_SET.

From-SVN: r276639

5 years agoAdd std::copy_n istreambuf_iterator specialization
François Dumont [Sun, 6 Oct 2019 15:29:04 +0000 (15:29 +0000)]
Add std::copy_n istreambuf_iterator specialization

* include/bits/stl_algo.h
(__copy_n_a(_IIte, _Size, _OIte)): New.
(__copy_n_a(istreambuf_iterator<>, _Size, _CharT*)): New declaration.
(__copy_n(_IIte, _Size, _OIte, input_iterator_tag)): Adapt to use
latter.
* include/bits/streambuf_iterator.h (istreambuf_iterator<>): Declare
std::__copy_n_a friend.
(__copy_n_a(istreambuf_iterator<>, _Size, _CharT*)): New.
* testsuite/25_algorithms/copy_n/istreambuf_iterator/1.cc: New.
* testsuite/25_algorithms/copy_n/istreambuf_iterator/1_neg.cc: New.
* testsuite/25_algorithms/copy_n/istreambuf_iterator/2_neg.cc: New.

From-SVN: r276638

5 years agoAdd C++11 __iterator_category_t template alias.
François Dumont [Sun, 6 Oct 2019 15:10:40 +0000 (15:10 +0000)]
Add C++11 __iterator_category_t template alias.

* 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

5 years agoAdd std::copy_n __glibcxx_requires_can_increment checks.
François Dumont [Sun, 6 Oct 2019 10:29:35 +0000 (10:29 +0000)]
Add std::copy_n __glibcxx_requires_can_increment checks.

* 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

5 years ago[Darwin] Fix some format-related build warnings.
Iain Sandoe [Sun, 6 Oct 2019 08:02:03 +0000 (08:02 +0000)]
[Darwin] Fix some format-related build warnings.

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

5 years agoDaily bump.
GCC Administrator [Sun, 6 Oct 2019 00:16:37 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r276634

5 years ago2019-0105 Steven G. Kargl <kargl@gcc.gnu.org>
Steven G. Kargl [Sat, 5 Oct 2019 22:40:07 +0000 (22:40 +0000)]
2019-0105  Steven G. Kargl  <kargl@gcc.gnu.org>

In my previous commit, I managed to include a duplicate copy
of the ChangeLog file.  This commit removes the duplicate
portion.

From-SVN: r276630

5 years agoipa-inline.c: Fix type; compute size rather than self_size for size of caller function.
Jan Hubicka [Sat, 5 Oct 2019 21:36:46 +0000 (23:36 +0200)]
ipa-inline.c: Fix type; compute size rather than self_size for size of caller function.

* ipa-inline.c: Fix type; compute size rather than self_size
for size of caller function.

From-SVN: r276629

5 years agore PR fortran/47054 (Compilation error when cray pointers are declared in both host...
Steven G. Kargl [Sat, 5 Oct 2019 15:23:26 +0000 (15:23 +0000)]
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

5 years agore PR fortran/91497 (-Wconversion warns when doing explicit type conversion)
Steven G. Kargl [Sat, 5 Oct 2019 14:27:26 +0000 (14:27 +0000)]
re PR fortran/91497 (-Wconversion warns when doing explicit type conversion)

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

5 years agore PR fortran/91926 (assumed rank optional)
Paul Thomas [Sat, 5 Oct 2019 08:17:55 +0000 (08:17 +0000)]
re PR fortran/91926 (assumed rank optional)

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

5 years ago[Darwin] Amend section for constants with reloactions.
Iain Sandoe [Sat, 5 Oct 2019 08:05:44 +0000 (08:05 +0000)]
[Darwin] Amend section for constants with reloactions.

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

5 years agoPR c++/91369 - Implement P0784R7: constexpr new
Jakub Jelinek [Sat, 5 Oct 2019 07:38:21 +0000 (09:38 +0200)]
PR c++/91369 - Implement P0784R7: constexpr new

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

5 years agore PR tree-optimization/91734 (gcc skip an if statement with "-O1 -ffast-math")
Jakub Jelinek [Sat, 5 Oct 2019 07:36:09 +0000 (09:36 +0200)]
re PR tree-optimization/91734 (gcc skip an if statement  with "-O1 -ffast-math")

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

5 years agoDaily bump.
GCC Administrator [Sat, 5 Oct 2019 00:16:20 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r276618

5 years agoAdd strftime format checking support for C2x %OB and %Ob (bug 82752).
Joseph Myers [Fri, 4 Oct 2019 21:56:14 +0000 (22:56 +0100)]
Add strftime format checking support for C2x %OB and %Ob (bug 82752).

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

5 years agoPR middle-end/91977 - missing -Wstringop-overflow on memcpy into a pointer plus offset
Martin Sebor [Fri, 4 Oct 2019 21:29:41 +0000 (21:29 +0000)]
PR middle-end/91977 - missing -Wstringop-overflow on memcpy into a pointer plus offset

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

5 years agobuiltins.c (compute_objsize): Add an argument.
Martin Sebor [Fri, 4 Oct 2019 21:26:27 +0000 (21:26 +0000)]
builtins.c (compute_objsize): Add an argument.

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

5 years agoPR fortran.91959
Steven G. Kargl [Fri, 4 Oct 2019 21:21:21 +0000 (21:21 +0000)]
PR fortran.91959

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

5 years agoImprove _GLIBCXX_DEBUG safe iterator range size computation.
François Dumont [Fri, 4 Oct 2019 20:22:11 +0000 (20:22 +0000)]
Improve _GLIBCXX_DEBUG safe iterator range size computation.

* 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

5 years ago* ipa-inline.c (inline_insns_single, inline_insns_auto): Fix typo.
Jan Hubicka [Fri, 4 Oct 2019 19:10:39 +0000 (21:10 +0200)]
* ipa-inline.c (inline_insns_single, inline_insns_auto): Fix typo.

From-SVN: r276597

5 years ago[preprocessor/91991] column location overflow
Nathan Sidwell [Fri, 4 Oct 2019 19:08:09 +0000 (19:08 +0000)]
[preprocessor/91991] column location overflow

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

5 years agomatch.pd (sinh (x) / cosh (x)): New simplification rule.
Rafael Tsuha [Fri, 4 Oct 2019 18:34:29 +0000 (18:34 +0000)]
match.pd (sinh (x) / cosh (x)): New simplification rule.

        * match.pd (sinh (x) / cosh (x)): New simplification rule.

        * gcc.dg/sinhovercosh-1.c: New test.

From-SVN: r276595

5 years agocompiler: include selected constant types during export processing
Ian Lance Taylor [Fri, 4 Oct 2019 18:14:30 +0000 (18:14 +0000)]
compiler: include selected constant types during export processing

    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

5 years agoAdd missing gimple_call_set_fntype
Martin Jambor [Fri, 4 Oct 2019 16:25:02 +0000 (18:25 +0200)]
Add missing gimple_call_set_fntype

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

5 years agohash-table.h (hash_table::empty_slow): Don't assign size_t values to int variables.
Bernd Edlinger [Fri, 4 Oct 2019 16:22:28 +0000 (16:22 +0000)]
hash-table.h (hash_table::empty_slow): Don't assign size_t values to int variables.

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

5 years agoexpr.c (convert_mode_scalar): Remove shadowing local var.
Bernd Edlinger [Fri, 4 Oct 2019 16:21:11 +0000 (16:21 +0000)]
expr.c (convert_mode_scalar): Remove shadowing local var.

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

5 years agocgraph.h (FOR_EACH_ALIAS): Avoid shadowing the loop variable.
Bernd Edlinger [Fri, 4 Oct 2019 16:18:22 +0000 (16:18 +0000)]
cgraph.h (FOR_EACH_ALIAS): Avoid shadowing the loop variable.

2019-10-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * cgraph.h (FOR_EACH_ALIAS): Avoid shadowing the loop variable.

From-SVN: r276590

5 years agogenmatch.c (commutate): Rename local var.
Bernd Edlinger [Fri, 4 Oct 2019 16:15:00 +0000 (16:15 +0000)]
genmatch.c (commutate): Rename local var.

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

5 years agoMark C2x built-in functions as such.
Joseph Myers [Fri, 4 Oct 2019 16:08:06 +0000 (17:08 +0100)]
Mark C2x built-in functions as such.

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

5 years agoira-color.c (update_costs_from_allocno): Call ira_init_register_move_cost_if_necessary.
Maya Rashish [Fri, 4 Oct 2019 15:43:07 +0000 (15:43 +0000)]
ira-color.c (update_costs_from_allocno): Call ira_init_register_move_cost_if_necessary.

* ira-color.c (update_costs_from_allocno): Call
ira_init_register_move_cost_if_necessary.

From-SVN: r276587

5 years agoBuild filesystem library with large file support
Jonathan Wakely [Fri, 4 Oct 2019 15:08:23 +0000 (16:08 +0100)]
Build filesystem library with large file support

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

5 years agoReplace uses of std::tr1::unordered_map in testsuite
Jonathan Wakely [Fri, 4 Oct 2019 15:08:14 +0000 (16:08 +0100)]
Replace uses of std::tr1::unordered_map in testsuite

* testsuite/util/testsuite_abi.h: Use std::unordered_map instead of
std::tr1::unordered_map.
* testsuite/util/testsuite_allocator.h: Likewise.

From-SVN: r276584

5 years agoh8300.md (cpymemsi): Disable.
Jeff Law [Fri, 4 Oct 2019 14:45:46 +0000 (08:45 -0600)]
h8300.md (cpymemsi): Disable.

* 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

5 years agorange-op.cc (range_tests): Avoid two tests when ints and shorts are the same size.
Jeff Law [Fri, 4 Oct 2019 14:27:45 +0000 (08:27 -0600)]
range-op.cc (range_tests): Avoid two tests when ints and shorts are the same size.

* range-op.cc (range_tests): Avoid two tests when ints and
shorts are the same size.

From-SVN: r276581

5 years agoReplace test cases for using automatic variables in equivalence statements.
Mark Eggleston [Fri, 4 Oct 2019 14:11:36 +0000 (14:11 +0000)]
Replace test cases for using automatic variables in equivalence statements.

From-SVN: r276580

5 years agocompiler: adjust code to avoid shadowing local variables
Ian Lance Taylor [Fri, 4 Oct 2019 13:50:07 +0000 (13:50 +0000)]
compiler: adjust code to avoid shadowing local variables

    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

5 years agoFix gcc.target/aarch64/torture/simd-abi-8.c for big-endian
Richard Sandiford [Fri, 4 Oct 2019 13:27:53 +0000 (13:27 +0000)]
Fix gcc.target/aarch64/torture/simd-abi-8.c for big-endian

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

5 years agoAdd missing header required by previous change
Jonathan Wakely [Fri, 4 Oct 2019 13:17:54 +0000 (14:17 +0100)]
Add missing header required by previous change

* include/tr1/hashtable.h: Add header for __gnu_cxx::__alloc_traits.

From-SVN: r276576

5 years agoAdjust tr1::_Hashtable to work with std::allocator in C++20
Jonathan Wakely [Fri, 4 Oct 2019 12:17:01 +0000 (13:17 +0100)]
Adjust tr1::_Hashtable to work with std::allocator in C++20

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

5 years agoAdd <span> to <bits/stdc++.h> precompiled header
Jonathan Wakely [Fri, 4 Oct 2019 12:16:56 +0000 (13:16 +0100)]
Add <span> to <bits/stdc++.h> precompiled header

* include/precompiled/stdc++.h: Include <span> for C++20.
* testsuite/17_intro/names.cc: Do not define 'e' for C++20.

From-SVN: r276574

5 years agoloop-3.c: Fix undefined behavior.
Richard Biener [Fri, 4 Oct 2019 11:40:40 +0000 (11:40 +0000)]
loop-3.c: Fix undefined behavior.

2019-10-04  Richard Biener  <rguenther@suse.de>

* gcc.c-torture/execute/loop-3.c: Fix undefined behavior.

From-SVN: r276572

5 years agore PR debug/91968 (DW_AT_low_pc missing for DW_TAG_label with LTO)
Richard Biener [Fri, 4 Oct 2019 11:37:16 +0000 (11:37 +0000)]
re PR debug/91968 (DW_AT_low_pc missing for DW_TAG_label with LTO)

2019-10-04  Richard Biener  <rguenther@suse.de>

PR lto/91968
* tree.c (find_decls_types_r): Do not remove LABEL_DECLs from
BLOCK_VARS.

From-SVN: r276571

5 years agoFix gcc.target/aarch64/sve2/shracc_1.c for ILP32
Yuliang Wang [Fri, 4 Oct 2019 10:40:47 +0000 (10:40 +0000)]
Fix gcc.target/aarch64/sve2/shracc_1.c for ILP32

2019-10-04  Yuliang Wang  <yuliang.wang@arm.com>

gcc/testsuite/
* gcc.target/aarch64/sve2/shracc_1.c: Tighten scan-assembler-nots
to avoid matching scalar code.

From-SVN: r276568

5 years ago[Fortran] Fix column of %C diagnostic location
Tobias Burnus [Fri, 4 Oct 2019 09:29:31 +0000 (11:29 +0200)]
[Fortran] Fix column of %C diagnostic location

        gcc/fortran/
        * error (error_print, gfc_format_decoder): Fix off-by one issue with %C.

        gcc/testsuite/
        * gfortran.dg/use_without_only_1.f90: Update column num in dg-warning.

From-SVN: r276567

5 years agore PR target/91982 (gcc.target/aarch64/sve/clastb_*.c tests failing with segfault)
Richard Biener [Fri, 4 Oct 2019 09:18:26 +0000 (09:18 +0000)]
re PR target/91982 (gcc.target/aarch64/sve/clastb_*.c tests failing with segfault)

2019-10-04  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91982
* tree-vect-loop.c (vectorizable_live_operation): Also guard
against EXTRACT_LAST_REDUCTION.
* tree-vect-stmts.c (vect_transform_stmt): Likewise.

From-SVN: r276566

5 years agoAdjust various comments and rename some functions in range-op.cc to
Aldy Hernandez [Fri, 4 Oct 2019 07:08:56 +0000 (07:08 +0000)]
Adjust various comments and rename some functions in range-op.cc to
improve readability.

From-SVN: r276564

5 years agore PR c++/71504 ([C++11] constexpr fails with multidimensional arrays)
Jakub Jelinek [Fri, 4 Oct 2019 06:56:02 +0000 (08:56 +0200)]
re PR c++/71504 ([C++11] constexpr fails with multidimensional arrays)

PR c++/71504
* constexpr.c (cxx_fold_indirect_ref_1): New function.
(cxx_fold_indirect_ref): Use it.

* g++.dg/cpp0x/constexpr-array21.C: New test.
* g++.dg/cpp1y/constexpr-array7.C: New test.
* g++.dg/cpp1z/constexpr-array1.C: New test.

2019-10-04  Jason Merrill  <jason@redhat.com>

PR c++/71504
* g++.dg/cpp0x/constexpr-array20.C: New test.

From-SVN: r276563

5 years agore PR c++/91974 (function not sequenced before function argument)
Jakub Jelinek [Fri, 4 Oct 2019 06:54:05 +0000 (08:54 +0200)]
re PR c++/91974 (function not sequenced before function argument)

PR c++/91974
* cp-gimplify.c (cp_gimplify_expr) <case CALL_EXPR>: For
-fstrong-eval-order ensure CALL_EXPR_FN side-effects are evaluated
before any arguments.  Additionally, ensure CALL_EXPR_FN that isn't
invariant nor OBJ_TYPE_REF nor SSA_NAME is forced into a temporary.

* g++.dg/cpp1z/eval-order5.C: New test.

From-SVN: r276562

5 years agoinvoke.texi (-Wshadow=global, [...]): Fix description.
Bernd Edlinger [Fri, 4 Oct 2019 05:42:08 +0000 (05:42 +0000)]
invoke.texi (-Wshadow=global, [...]): Fix description.

2019-10-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * doc/invoke.texi (-Wshadow=global, -Wshadow=local,
        -Wshadow=compatible-local): Fix description.
        Add an example where -Wshadow=compatible-local does not
        warn.

From-SVN: r276561

5 years agoDaily bump.
GCC Administrator [Fri, 4 Oct 2019 00:16:26 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r276560

5 years agofptr.c: Disable -Warray-bounds warning.
John David Anglin [Thu, 3 Oct 2019 23:51:42 +0000 (23:51 +0000)]
fptr.c: Disable -Warray-bounds warning.

* config/pa/fptr.c: Disable -Warray-bounds warning.

From-SVN: r276556

5 years agopa.h (MAX_PCREL17F_OFFSET): Adjust.
John David Anglin [Thu, 3 Oct 2019 23:32:53 +0000 (23:32 +0000)]
pa.h (MAX_PCREL17F_OFFSET): Adjust.

* config/pa/pa.h (MAX_PCREL17F_OFFSET): Adjust.

From-SVN: r276555

5 years agopa.c (pa_output_call): Remove 64-bit sibcall sequence.
John David Anglin [Thu, 3 Oct 2019 22:39:49 +0000 (22:39 +0000)]
pa.c (pa_output_call): Remove 64-bit sibcall sequence.

* config/pa/pa.c (pa_output_call): Remove 64-bit sibcall sequence.
(pa_attr_length_call): Adjust length for 64-bit plabel sequence.

From-SVN: r276543

5 years agoexpr.c (emit_block_move_hints): Slightly cleaner fix to can_move_by_pieces issue.
Aaron Sawdey [Thu, 3 Oct 2019 22:19:14 +0000 (22:19 +0000)]
expr.c (emit_block_move_hints): Slightly cleaner fix to can_move_by_pieces issue.

2019-10-03  Aaron Sawdey <acsawdey@linux.ibm.com>

* expr.c (emit_block_move_hints): Slightly cleaner fix to
can_move_by_pieces issue.

From-SVN: r276542

5 years agorust-demangle.c (looks_like_rust): Remove.
Eduard-Mihai Burtescu [Thu, 3 Oct 2019 21:54:47 +0000 (23:54 +0200)]
rust-demangle.c (looks_like_rust): Remove.

* rust-demangle.c (looks_like_rust): Remove.
(rust_is_mangled): Don't check escapes.
(is_prefixed_hash): Allow 0-9a-f permutations.
(rust_demangle_sym): Don't bail on unknown escapes.
* testsuite/rust-demangle-expected: Update 'main::$99$' test.

From-SVN: r276539

5 years agore PR fortran/91497 (-Wconversion warns when doing explicit type conversion)
Steven G. Kargl [Thu, 3 Oct 2019 20:46:26 +0000 (20:46 +0000)]
re PR fortran/91497 (-Wconversion warns when doing explicit type conversion)

2019-10-03  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91497
* simplify.c (gfc_simplify_dble, simplify_intconv, gfc_simplify_real,
gfc_simplify_sngl): Disable -Wconversion and -Wconversion-extra
warnings for explicit conversion of literal constants.

2019-10-03  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91497
* gfortran.dg/pr91497.f90: New test.

From-SVN: r276532

5 years ago[Darwin] Pick up SDKROOT as the sysroot fallback.
Iain Sandoe [Thu, 3 Oct 2019 20:19:18 +0000 (20:19 +0000)]
[Darwin] Pick up SDKROOT as the sysroot fallback.

For compatibility with xcrun and the behaviour of the clang driver, make use
of the setting of the SDKROOT environment variable when it is available.
This applies to both finding headers and libraries (i.e. it is also passed to
ld64).

Priority:
 1. User's command-line specified --sysroot= or -isysroot.
 2. The SDKROOT variable when set, and validated.
 3. Any sysroot provided by --with-sysroot= configuration parameter.

SDKROOT is checked thus:
  1. Presence.
  2. That it starts with "/" (i.e. 'absolute').
  3. That it is not "/" only (since that's the default).
  4. That it is readable by the process executing the driver.

This is pretty much the same rule set as used by the clang driver.

NOTE: (3) might turn out to be overly restrictive in the case that we
have configured with --with-sysroot= and then we want to run on a system
with an installation of the headers/libraries in /.  We can revisit this
if that turns out to be an important use-case.

So one can do:

xcrun --sdk macosx /path/to/gcc ....

and that provides the SDK path as the sysroot to GCC as expected.

CAVEAT: An unfortunate effect of the fact that "gcc" (and "g++") are
executables in the Xcode installation, which are found ahead of any such
named in the $PATH:

PATH=/path/to/gcc/install:$PATH
xcrun --sdk macosx gcc ....

does *not* work, instead that executes the clang from the xcode/commmand
line tools installation.

PATH=/path/to/gcc/install:$PATH
xcrun --sdk macosx x64_64-apple-darwinXX-gcc ...

does work as expected, however.

gcc/ChangeLog:

2019-10-03  Iain Sandoe  <iain@sandoe.co.uk>

PR target/87243
* config/darwin-driver.c (maybe_get_sysroot_from_sdkroot): New.
(darwin_driver_init): Use the sysroot provided by SDKROOT when that
is available and the user has not set one on the command line.

From-SVN: r276530

5 years ago* g++.dg/tree-ssa/pr61034.C: Add --param max-inline-insns-single-O2=200.
Jan Hubicka [Thu, 3 Oct 2019 19:45:23 +0000 (21:45 +0200)]
* g++.dg/tree-ssa/pr61034.C: Add --param max-inline-insns-single-O2=200.

From-SVN: r276527

5 years agore PR target/91769 (wrong code with -O2 on MIPS)
Dragan Mladjenovic [Thu, 3 Oct 2019 19:17:20 +0000 (19:17 +0000)]
re PR target/91769 (wrong code with -O2 on MIPS)

Fix PR target/91769

This fixes the issue by checking that addr's base reg is not part of dest
multiword reg instead just checking the first reg of dest.

gcc/ChangeLog:

2019-10-03  Dragan Mladjenovic  <dmladjenovic@wavecomp.com>

PR target/91769
* config/mips/mips.c (mips_split_move): Use reg_overlap_mentioned_p
instead of REGNO equality check on addr.reg.

gcc/testsuite/ChangeLog:

2019-10-03  Dragan Mladjenovic  <dmladjenovic@wavecomp.com>

PR target/91769
* gcc.target/mips/pr91769.c: New test.

From-SVN: r276525

5 years agoLibgomp magic offset value self-documentation
Julian Brown [Thu, 3 Oct 2019 17:48:36 +0000 (17:48 +0000)]
Libgomp magic offset value self-documentation

2019-10-02  Julian Brown  <julian@codesourcery.com>
    Cesar Philippidis  <cesar@codesourcery.com>

libgomp/
* libgomp.h (OFFSET_INLINED, OFFSET_POINTER, OFFSET_STRUCT): Define.
* target.c (FIELD_TGT_EMPTY): Define.
(gomp_map_val): Use OFFSET_* macros instead of magic constants.  Write
as switch instead of list of ifs.
(gomp_map_vars_internal): Use OFFSET_* and FIELD_TGT_EMPTY macros.

Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com>
From-SVN: r276519

5 years agoprimary.c (match_real_constant): Remove shadowing local vars.
Bernd Edlinger [Thu, 3 Oct 2019 17:03:43 +0000 (17:03 +0000)]
primary.c (match_real_constant): Remove shadowing local vars.

2019-10-03  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * primary.c (match_real_constant): Remove shadowing local vars.
        Rename local vars.  Fix undefined behavior in loop termination.
        (gfc_convert_to_structure_constructor): Rename local var.

From-SVN: r276518

5 years agoparams.def (PARAM_INLINE_HEURISTICS_HINT_PERCENT, [...]): New.
Jan Hubicka [Thu, 3 Oct 2019 15:08:21 +0000 (17:08 +0200)]
params.def (PARAM_INLINE_HEURISTICS_HINT_PERCENT, [...]): New.

* params.def (PARAM_INLINE_HEURISTICS_HINT_PERCENT,
PARAM_INLINE_HEURISTICS_HINT_PERCENT_O2): New.
* doc/invoke.texi (inline-heuristics-hint-percent,
inline-heuristics-hint-percent-O2): Document.
* tree-inline.c (inline_insns_single, inline_insns_auto): Add new
hint attribute.
(can_inline_edge_by_limits_p): Use it.

From-SVN: r276516

5 years agoAvoid reserved identifier in include/parallel/multiway_merge.h
Rainer Orth [Thu, 3 Oct 2019 14:35:35 +0000 (14:35 +0000)]
Avoid reserved identifier in include/parallel/multiway_merge.h

* include/parallel/multiway_merge.h (_RAIter3): Replace _C by _Cp.

From-SVN: r276515

5 years agoCheck init_priority in g++.dg/cpp0x/gen-attrs-67.C
Rainer Orth [Thu, 3 Oct 2019 13:23:52 +0000 (13:23 +0000)]
Check init_priority in g++.dg/cpp0x/gen-attrs-67.C

gcc/testsuite:
* g++.dg/cpp0x/gen-attrs-67.C: Expect constructor priorities error
on any !init_priority target.

From-SVN: r276510

5 years ago[arm] Fix rtl-checking failure in arm_print_value
Richard Sandiford [Thu, 3 Oct 2019 13:05:31 +0000 (13:05 +0000)]
[arm] Fix rtl-checking failure in arm_print_value

Noticed while debugging the arm bootstrap failure.

2019-10-03  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* config/arm/arm.c (arm_print_value): Use real_to_decimal
to print CONST_DOUBLEs.

From-SVN: r276508

5 years agore PR jit/91928 (libgccjit fails on subsequent compilations in ipa-cp)
Andrea Corallo [Thu, 3 Oct 2019 12:39:55 +0000 (12:39 +0000)]
re PR jit/91928 (libgccjit fails on subsequent compilations in ipa-cp)

PR jit/91928

* ipa-cp.c (ipa_cp_c_finalize): Release ipcp_transformation_sum.
* ipa-prop.c (ipcp_free_transformation_sum): New function.
* ipa-prop.h (ipcp_free_transformation_sum): Add declaration.

From-SVN: r276507

5 years agore PR fortran/84487 (Large rodate section increase in 465.tonto with r254427)
Thomas Koenig [Thu, 3 Oct 2019 12:39:42 +0000 (12:39 +0000)]
re PR fortran/84487 (Large rodate section increase in 465.tonto with r254427)

2019-10-03  Thomas Koenig <tkoenig@gcc.gnu.org>

PR fortran/84487
* trans-decl.c (gfc_get_symbol_decl): For __def_init, set
DECL_ARTIFICAL and do not set TREE_READONLY.

2019-10-03  Thomas Koenig <tkoenig@gcc.gnu.org>

PR fortran/84487
* gfortran.dg/typebound_call_22.f03: xfail.

From-SVN: r276506

5 years agoCharacter typenames in errors and warnings
Mark Eggleston [Thu, 3 Oct 2019 09:40:23 +0000 (09:40 +0000)]
Character typenames in errors and warnings

Character type names now incorporate length, kind is only shown if
the default character is not being used.

Examples:

  character(7) is reported as CHARACTER(7)
  character(len=20,kind=4) is reported as CHARACTER(20,4)

dummy character variables with assumed length:

  character(*) is reported as CHARACTER(*)
  character(*,kind=4) is reported as CHARACTER(*,4)

From-SVN: r276505

5 years agoMakefile.in (OBJS): Add range.o and range-op.o.
Aldy Hernandez [Thu, 3 Oct 2019 08:08:50 +0000 (08:08 +0000)]
Makefile.in (OBJS): Add range.o and range-op.o.

* Makefile.in (OBJS): Add range.o and range-op.o.
Remove wide-int-range.o.
* function-tests.c (test_ranges): New.
(function_tests_c_tests): Call test_ranges.
* ipa-cp.c (ipa_vr_operation_and_type_effects): Call
range_fold_unary_expr instead of extract_range_from_unary_expr.
* ipa-prop.c (ipa_compute_jump_functions_for_edge): Same.
* range-op.cc: New file.
* range-op.h: New file.
* range.cc: New file.
* range.h: New file.
* selftest.h (range_tests): New prototype.
* ssa.h: Include range.h.
* tree-vrp.c (value_range_base::value_range_base): New
constructors.
(value_range_base::singleton_p): Do not call
ranges_from_anti_range until sure we will need to.
(value_range_base::type): Rename gcc_assert to
gcc_checking_assert.
(vrp_val_is_max): New argument.
(vrp_val_is_min): Same.
(wide_int_range_set_zero_nonzero_bits): Move from
wide-int-range.cc.
(extract_range_into_wide_ints): Remove.
(extract_range_from_multiplicative_op): Remove.
(extract_range_from_pointer_plus_expr): Abstract POINTER_PLUS code
from extract_range_from_binary_expr.
(extract_range_from_plus_minus_expr): Abstract PLUS/MINUS code
from extract_range_from_binary_expr.
(extract_range_from_binary_expr): Remove.
(normalize_for_range_ops): New.
(range_fold_binary_expr): New.
(range_fold_unary_expr): New.
(value_range_base::num_pairs): New.
(value_range_base::lower_bound): New.
(value_range_base::upper_bound): New.
(value_range_base::upper_bound): New.
(value_range_base::contains_p): New.
(value_range_base::invert): New.
(value_range_base::union_): New.
(value_range_base::intersect): New.
(range_compatible_p): New.
(value_range_base::operator==): New.
(determine_value_range_1): Call range_fold_*expr instead of
extract_range_from_*expr.
* tree-vrp.h (class value_range_base): Add new constructors.
Add methods for union_, intersect, operator==, contains_p,
num_pairs, lower_bound, upper_bound, invert.
(vrp_val_is_min): Add handle_pointers argument.
(vrp_val_is_max): Same.
(extract_range_from_unary_expr): Remove.
(extract_range_from_binary_expr): Remove.
(range_fold_unary_expr): New.
(range_fold_binary_expr): New.
* vr-values.c (vr_values::extract_range_from_binary_expr): Call
range_fold_binary_expr instead of extract_range_from_binary_expr.
(vr_values::extract_range_basic): Same.
(vr_values::extract_range_from_unary_expr): Call
range_fold_unary_expr instead of extract_range_from_unary_expr.
* wide-int-range.cc: Remove.
* wide-int-range.h: Remove.

From-SVN: r276504

5 years agoUndo unintended change to predicates.md in subversion id 276498
Michael Meissner [Thu, 3 Oct 2019 00:17:56 +0000 (00:17 +0000)]
Undo unintended change to predicates.md in subversion id 276498

From-SVN: r276503

5 years agoDaily bump.
GCC Administrator [Thu, 3 Oct 2019 00:16:19 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r276502

5 years agoUse the SIGNED_16BIT_OFFSET_EXTRA_P macro for 16-bit signed tests.
Michael Meissner [Thu, 3 Oct 2019 00:13:40 +0000 (00:13 +0000)]
Use the SIGNED_16BIT_OFFSET_EXTRA_P macro for 16-bit signed tests.

2019-10-02   Michael Meissner  <meissner@linux.ibm.com>

* config/rs6000/rs6000.c (mem_operand_gpr): Use
SIGNED_16BIT_OFFSET_EXTRA_P.
(mem_operand_ds_form): Use SIGNED_16BIT_OFFSET_EXTRA_P.
(rs6000_mode_dependent_address): Use SIGNED_16BIT_OFFSET_EXTRA_P.

From-SVN: r276498

5 years agoDefine WIDTH macros for C2x.
Joseph Myers [Wed, 2 Oct 2019 23:50:58 +0000 (00:50 +0100)]
Define WIDTH macros for C2x.

As part of the integration of TS 18661-1 into C2x, many features
became unconditional features not depending on any feature test macro
being defined.  This patch updates the conditionals on the *_WIDTH
macros in limits.h and stdint.h accordingly so that they are defined
for C2x.  The macro CR_DECIMAL_DIG in float.h does still require
__STDC_WANT_IEC_60559_BFP_EXT__ to be defined, and a test for this is
added.

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

gcc:
* ginclude/stdint-gcc.h [__STDC_WANT_IEC_60559_BFP_EXT__]: Change
condition on WIDTH macros to [__STDC_WANT_IEC_60559_BFP_EXT__ ||
(__STDC_VERSION__ && __STDC_VERSION__ > 201710L)].
* glimits.h: Likewise.

gcc/testsuite:
* gcc.dg/cr-decimal-dig-2.c: New test.
* gcc.dg/limits-width-2.c: New test.  Based on limits-width-1.c.
* gcc.dg/stdint-width-2.c: New test.  Based on stdint-width-1.c.

From-SVN: r276497

5 years agoinit.c (build_new): Use cp_expr_loc_or_input_loc in two places.
Paolo Carlini [Wed, 2 Oct 2019 23:23:51 +0000 (23:23 +0000)]
init.c (build_new): Use cp_expr_loc_or_input_loc in two places.

/cp
2019-10-03  Paolo Carlini  <paolo.carlini@oracle.com>

* init.c (build_new): Use cp_expr_loc_or_input_loc in two places.
* name-lookup.c (do_pushdecl): Use DECL_SOURCE_LOCATION.
(push_class_level_binding_1): Likewise.
(set_decl_namespace): Likewise.

/testsuite
2019-10-03  Paolo Carlini  <paolo.carlini@oracle.com>

* g++.dg/diagnostic/integral-array-size-1.C: New.
* g++.dg/cpp0x/alias-decl-1.C: Test location(s) too.
* g++.dg/init/new43.C: Likewise.
* g++.dg/lookup/friend12.C: Likewise.
* g++.dg/lookup/pr79766.C: Likewise.
* g++.dg/lookup/pr84375.C: Likewise.
* g++.dg/other/new-size-type.C: Likewise.

From-SVN: r276496

5 years agore PR rtl-optimization/91976 (RTL check: expected code 'const_int', have 'reg' in...
Jakub Jelinek [Wed, 2 Oct 2019 22:33:39 +0000 (00:33 +0200)]
re PR rtl-optimization/91976 (RTL check: expected code 'const_int', have 'reg' in emit_block_move_hints, at expr.c:1627)

PR rtl-optimization/91976
* expr.c (emit_block_move_hints): Don't call can_move_by_pieces if
size is not CONST_INT_P, set pieces_ok to false in that case.  Simplify
CONST_INT_P (size) && pieces_ok to pieces_ok.  Formatting fix.

From-SVN: r276495

5 years agoconstexpr.c (cxx_eval_constant_expression): If not skipping upon entry to body...
Jakub Jelinek [Wed, 2 Oct 2019 22:32:56 +0000 (00:32 +0200)]
constexpr.c (cxx_eval_constant_expression): If not skipping upon entry to body...

* constexpr.c (cxx_eval_constant_expression) <case CLEANUP_STMT>: If
not skipping upon entry to body, run cleanup with the same *jump_target
as it started to run the cleanup even if the body returns, breaks or
continues.
(potential_constant_expression_1): Allow CLEANUP_STMT.

* g++.dg/ext/constexpr-attr-cleanup1.C: New test.

From-SVN: r276494

5 years agoconstexpr.c (cxx_eval_store_expression): Formatting fix.
Jakub Jelinek [Wed, 2 Oct 2019 22:31:58 +0000 (00:31 +0200)]
constexpr.c (cxx_eval_store_expression): Formatting fix.

* constexpr.c (cxx_eval_store_expression): Formatting fix.  Handle
const_object_being_modified with array type.

From-SVN: r276493

5 years agoAdd changelog entries for r276491.
Martin Sebor [Wed, 2 Oct 2019 22:04:00 +0000 (16:04 -0600)]
Add changelog entries for r276491.

From-SVN: r276492

5 years agoPR tree-optimization/80936 - bcmp, bcopy, and bzero not declared nonnull
Martin Sebor [Wed, 2 Oct 2019 22:00:42 +0000 (16:00 -0600)]
PR tree-optimization/80936 - bcmp, bcopy, and bzero not declared nonnull

gcc/testsuite/ChangeLog:

PR tree-optimization/80936
* gcc.dg/Wnonnull-2.c: New test.
* gcc.dg/Wnonnull-3.c: New test.
* gcc.dg/nonnull-3.c: Expect more warnings.

gcc/ChangeLog:

PR tree-optimization/80936
* builtins.def (bcmp, bcopy, bzero): Declare nonnull.

From-SVN: r276491

5 years agoFix ALL_REGS thinko in initialisation of function_used_regs
Richard Sandiford [Wed, 2 Oct 2019 21:19:35 +0000 (21:19 +0000)]
Fix ALL_REGS thinko in initialisation of function_used_regs

My change to the -fipa-ra bookkeeping used ALL_REGS as the supposedly
safe default assumption, but ALL_REGS isn't literally all registers,
just a close approximation.

This caused a bootstrap failure on arm-linux-gnu, where the condition
code register isn't in ALL_REGS and so was being masked out of some
call-clobbered sets.

2019-10-02  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* cgraph.c (cgraph_node::rtl_info): Use SET_HARD_REG_SET
instead of reg_class_contents[ALL_REGS].

From-SVN: r276489

5 years agoruntime: mark go-context.S as no-executable-stack and split-stack supported
Ian Lance Taylor [Wed, 2 Oct 2019 20:11:35 +0000 (20:11 +0000)]
runtime: mark go-context.S as no-executable-stack and split-stack supported

    The .note.GNU-stack section tells the linker that this object does not
    require an executable stack.

    The .note.GNU-split-stack section tells the linker that functions in
    this object can be called directly by split-stack functions, without
    require a large stack.

    The .note.GNU-no-split-stack section tells the linker that functions
    in this object do not have a split-stack prologue.

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

From-SVN: r276488

5 years agoImprove C++ fold caching efficiency.
Jason Merrill [Wed, 2 Oct 2019 20:01:42 +0000 (16:01 -0400)]
Improve C++ fold caching efficiency.

While looking at concepts caching I noticed that we were clearing the caches
unnecessarily for non-constant initialization, which shouldn't affect
folding.

* typeck2.c (store_init_value): Only clear_cv_and_fold_caches if the
value is constant.

From-SVN: r276487

5 years agoAdd some hash_map_safe_* functions like vec_safe_*.
Jason Merrill [Wed, 2 Oct 2019 19:26:47 +0000 (15:26 -0400)]
Add some hash_map_safe_* functions like vec_safe_*.

gcc/
* hash-map.h (default_hash_map_size): New variable.
(create_ggc): Use it as default argument.
(hash_map_maybe_create, hash_map_safe_get)
(hash_map_safe_get_or_insert, hash_map_safe_put): New fns.
gcc/cp/
* constexpr.c (maybe_initialize_fundef_copies_table): Remove.
(get_fundef_copy): Use hash_map_safe_get_or_insert.
* cp-objcp-common.c (cp_get_debug_type): Use hash_map_safe_*.
* decl.c (store_decomp_type): Remove.
(cp_finish_decomp): Use hash_map_safe_put.
* init.c (get_nsdmi): Use hash_map_safe_*.
* pt.c (store_defaulted_ttp, lookup_defaulted_ttp): Remove.
(add_defaults_to_ttp): Use hash_map_safe_*.

From-SVN: r276484

5 years agoTestsuite, remove alloca header
Andreas Tobler [Wed, 2 Oct 2019 19:05:35 +0000 (21:05 +0200)]
Testsuite, remove alloca header

2019-10-02  Andreas Tobler  <andreast@gcc.gnu.org>

* testsuite/libgomp.oacc-c-c++-common/loop-default.h: Remove alloca.h
include. Replace alloca () with __builtin_alloca ().
* testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c: Likewise.

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

5 years agore PR fortran/91784 (ICE in gfc_real2complex, at fortran/arith.c:2208)
Steven G. Kargl [Wed, 2 Oct 2019 17:17:55 +0000 (17:17 +0000)]
re PR fortran/91784 (ICE in gfc_real2complex, at fortran/arith.c:2208)

2019-10-02  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91784
* simplify.c (gfc_convert_constant): Simplify expression if the
expres ion type is EXPR_OP.

2019-10-02  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91784
* gfortran.dg/pr91784.f90: New test.

From-SVN: r276474

5 years agore PR fortran/91785 (ICE in check_assumed_size_reference, at fortran/resolve.c:1601)
Steven G. Kargl [Wed, 2 Oct 2019 17:09:45 +0000 (17:09 +0000)]
re PR fortran/91785 (ICE in check_assumed_size_reference, at fortran/resolve.c:1601)

2019-10-02  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91785
* primary.c (gfc_match_varspec): Ensure an inquiry parameter has
it locus set.

2019-10-02  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91785
* gfortran.dg/pr91785.f90: New test.

From-SVN: r276473

5 years agore PR fortran/91942 (ICE in match_vtag, at fortran/io.c:1485)
Steven G. Kargl [Wed, 2 Oct 2019 17:04:57 +0000 (17:04 +0000)]
re PR fortran/91942 (ICE in match_vtag, at fortran/io.c:1485)

2019-10-02  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91942
* io.c (match_vtag): Check for non-NULL result->symtree.
(match_out_tag): Check for invalid constant due to inquiry parameter.
(match_filepos): Instead of a syntax error, go to cleanup to get better
error messages.

2019-10-02  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91942
* gfortran.dg/pr91587.f90: Update dg-error regex.
* gfortran.dg/pr91942.f90: New test.

From-SVN: r276472

5 years agore PR fortran/91943 (ICE in gfc_conv_constant_to_tree, at fortran/trans-const.c:370)
Steven G. Kargl [Wed, 2 Oct 2019 17:01:30 +0000 (17:01 +0000)]
re PR fortran/91943 (ICE in gfc_conv_constant_to_tree, at fortran/trans-const.c:370)

2019-10-02  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91943
* match.c (gfc_match_call): BOZ cannot be an actual argument in
a subroutine reference.
* resolve.c (resolve_function): BOZ cannot be an actual argument in
a function reference.

2019-10-02  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91943
gfortran.dg/pr91943.f90

From-SVN: r276471

5 years agocif-code.def (MAX_INLINE_INSNS_SINGLE_O2_LIMIT, [...]): New.
Jan Hubicka [Wed, 2 Oct 2019 16:02:16 +0000 (16:02 +0000)]
cif-code.def (MAX_INLINE_INSNS_SINGLE_O2_LIMIT, [...]): New.

* cif-code.def (MAX_INLINE_INSNS_SINGLE_O2_LIMIT,
MAX_INLINE_INSNS_AUTO_O2_LIMIT): New.
* ipa-inline.c (inline_insns_single, inline_insns_auto): New functions.
(can_inline_edge_by_limits_p): Use it.
(big_speedup_p): Use PARAM_INLINE_MIN_SPEEDUP_O2.
(want_inline_small_function_p): Use O2 bounds.
(edge_badness): LIkewise.
* opts.c (default_options): Add OPT_finline_functions.
* params.def (PARAM_INLINE_MIN_SPEEDUP_O2,
PARAM_MAX_INLINE_INSNS_SINGLE_O2, PARAM_MAX_INLINE_INSNS_AUTO_O2):
New parameters.

* g++.dg/tree-ssa/pr53844.C: Add -fno-inline-functions --param
max-inline-insns-single-O2=200.
* gcc.c-torture/execute/builtins/builtins.exp: Add
-fno-inline-functions to additional_flags.
* gcc.dg/ipa/inline-7.c: Add -fno-inline-functions.
* gcc.dg/optimize-bswapsi-5.c: Add -fno-inline-functions.
* gcc.dg/tree-ssa/ssa-thread-12.c: Add --param
early-inlining-insns-O2=14 -fno-inline-functions; revert previous
change.
* gcc.dg/winline-3.c: Use --param max-inline-insns-single-O2=1
--param inline-min-speedup-O2=100
instead of --param max-inline-insns-single=1 --param
inline-min-speedup=100

* invoke.texi (-finline-functions): Update documentation.
(max-inline-insns-single-O2, max-inline-insns-auto-O2,
inline-min-speedup-O2): Document.
(early-inlining-insns-O2): Simplify docs.

From-SVN: r276470

5 years agocif-code.def (MAX_INLINE_INSNS_SINGLE_O2_LIMIT, [...]): New.
Jan Hubicka [Wed, 2 Oct 2019 16:01:47 +0000 (16:01 +0000)]
cif-code.def (MAX_INLINE_INSNS_SINGLE_O2_LIMIT, [...]): New.

* cif-code.def (MAX_INLINE_INSNS_SINGLE_O2_LIMIT,
MAX_INLINE_INSNS_AUTO_O2_LIMIT): New.
* ipa-inline.c (inline_insns_single, inline_insns_auto): New functions.
(can_inline_edge_by_limits_p): Use it.
(big_speedup_p): Use PARAM_INLINE_MIN_SPEEDUP_O2.
(want_inline_small_function_p): Use O2 bounds.
(edge_badness): LIkewise.
* opts.c (default_options): Add OPT_finline_functions.
* params.def (PARAM_INLINE_MIN_SPEEDUP_O2,
PARAM_MAX_INLINE_INSNS_SINGLE_O2, PARAM_MAX_INLINE_INSNS_AUTO_O2):
New parameters.

* g++.dg/tree-ssa/pr53844.C: Add -fno-inline-functions --param
max-inline-insns-single-O2=200.
* gcc.c-torture/execute/builtins/builtins.exp: Add
-fno-inline-functions to additional_flags.
* gcc.dg/ipa/inline-7.c: Add -fno-inline-functions.
* gcc.dg/optimize-bswapsi-5.c: Add -fno-inline-functions.
* gcc.dg/tree-ssa/ssa-thread-12.c: Add --param
early-inlining-insns-O2=14 -fno-inline-functions; revert previous
change.
* gcc.dg/winline-3.c: Use --param max-inline-insns-single-O2=1
--param inline-min-speedup-O2=100
instead of --param max-inline-insns-single=1 --param
inline-min-speedup=100

* invoke.texi (-finline-functions): Update documentation.
(max-inline-insns-single-O2, max-inline-insns-auto-O2,
inline-min-speedup-O2): Document.
(early-inlining-insns-O2): Simplify docs.

From-SVN: r276469

5 years agoRemove greedy wildcards from libstdc++ linker script
Jonathan Wakely [Wed, 2 Oct 2019 15:52:41 +0000 (16:52 +0100)]
Remove greedy wildcards from libstdc++ linker script

The only symbols matched by std::e[a-q]* and std::e[s-z]* that are
supposed to be in the GLIBCXX_3.4 version are std::exception::* and
std::endl and std::ends. The latter two already have explicit patterns
matching them, so we just need to match std::exception::*.

This change ensures that any new symbols with a return type of
std::enable_if<...> are not added to the GLIBCXX_3.4 version.

* config/abi/pre/gnu.ver: Tighten up greedy wildcards.

From-SVN: r276468

5 years agoifcvt: improve cost estimation (PR 87047)
Alexander Monakov [Wed, 2 Oct 2019 15:37:12 +0000 (18:37 +0300)]
ifcvt: improve cost estimation (PR 87047)

PR rtl-optimization/87047
* ifcvt.c (average_cost): New static function.  Use it...
(noce_process_if_block): ... here.

testsuite/
* gcc.dg/pr87047.c: New test.

From-SVN: r276466

5 years ago[PR testsuite/91842] Skip gcc.dg/ipa/ipa-sra-19.c on power
Martin Jambor [Wed, 2 Oct 2019 15:09:37 +0000 (17:09 +0200)]
[PR testsuite/91842] Skip gcc.dg/ipa/ipa-sra-19.c on power

2019-10-02  Martin Jambor  <mjambor@suse.cz>

PR testsuite/91842
* gcc.dg/ipa/ipa-sra-19.c: Skip on powerpc.

From-SVN: r276465