platform/upstream/gcc.git
7 years agocp-tree.h (IDENTIFIER_GLOBAL_VALUE): Use get_namespace_value.
Nathan Sidwell [Fri, 5 May 2017 20:04:45 +0000 (20:04 +0000)]
cp-tree.h (IDENTIFIER_GLOBAL_VALUE): Use get_namespace_value.

* cp-tree.h (IDENTIFIER_GLOBAL_VALUE): Use get_namespace_value.
(SET_IDENTIFIER_GLOBAL_VALUE): Use set_global_value.
(IDENTIFIER_NAMESPACE_VALUE): Delete.
* name-lookup.h (namespace_binding, set_namespace_binding):
Replace
with ...
(get_namespace_value, set_global_value): ... these.
(get_global_value_if_present, is_typename_at_global_scope):
Delete.
* decl.c (poplevel): Use get_namespace_value.
(grokdeclarator): Use IDENTIFIER_GLOBAL_VALUE.
* class.c (build_vtbl_initializer): Stash library decl in
static var. Use IDENTIFIER_GLOBAL_VALUE.
* except.c (do_get_exception_ptr, do_begin_catch, do_end_catch)
do_allocate_exception, do_free_exception, build_throw): Likewise.
* init.c (throw_bad_array_new_length): Likewise.
* rtti.c (throw_bad_cast, throw_bad_typeid): Likewise.
* name-lookup.c (arg_assoc_namespace, pushdecl_maybe_friend_1)
check_for_our_of_scope_variable, push_overloaded_decl_1): Use
get_namespace_value.
(set_namespace_binding_1): Rename to
(set_namespace_binding): ... here.
(set_global_value): New.
(lookup_name_innermost_nonclass_level_1, push_namespace): Use
get_namespace_value.
* pt.c (listify): Use get_namespace_value.
((--This line, and those below, will be ignored--

M    cp/name-lookup.c
M    cp/name-lookup.h
M    cp/ChangeLog
M    cp/except.c
M    cp/class.c
M    cp/pt.c
M    cp/init.c
M    cp/cp-tree.h
M    cp/decl.c
M    cp/rtti.c

From-SVN: r247654

7 years agoMakefile.in (GTFILES): Add tree-ssa-loop-ivopts.c.
Bin Cheng [Fri, 5 May 2017 18:34:45 +0000 (18:34 +0000)]
Makefile.in (GTFILES): Add tree-ssa-loop-ivopts.c.

* Makefile.in (GTFILES): Add tree-ssa-loop-ivopts.c.
* tree-ssa-loop-ivopts.c (compute_max_addr_offset): Delete.
(addr_list, addr_offset_valid_p): New.
(split_address_groups): Check offset validity with above function.
(gt-tree-ssa-loop-ivopts.h): Include header file.

From-SVN: r247653

7 years agobuiltins.c (check_sizes, [...]): Fix typos introduced during merge conflict resolution.
Martin Sebor [Fri, 5 May 2017 18:03:26 +0000 (12:03 -0600)]
builtins.c (check_sizes, [...]): Fix typos introduced during merge conflict resolution.

gcc/ChangeLog:
* builtins.c (check_sizes, check_strncat_sizes): Fix typos
introduced during merge conflict resolution.
(expand_builtin_strncat): Same.

gcc/testsuite/ChangeLog:
* gcc.dg/pr78138.c: Adjust text of expected diagnostics.
* gcc.dg/pr79214.c: Same.
* gcc.dg/pr79222.c: Same.
* gcc.dg/pr79223.c: Same.
* gcc.dg/tree-ssa/builtins-folding-gimple-ub.c: Expect warnings.

From-SVN: r247652

7 years ago* config.gcc (arm*-*-*): Add missing 'fi'.
Nathan Sidwell [Fri, 5 May 2017 17:31:57 +0000 (17:31 +0000)]
* config.gcc (arm*-*-*): Add missing 'fi'.

From-SVN: r247650

7 years agoinvoke.texi (-fopt-info): Explicitly say order of options included in -fopt-info...
Steve Ellcey [Fri, 5 May 2017 17:00:46 +0000 (17:00 +0000)]
invoke.texi (-fopt-info): Explicitly say order of options included in -fopt-info does not matter.

2017-05-05  Steve Ellcey  <sellcey@cavium.com>

* doc/invoke.texi (-fopt-info): Explicitly say order of options
included in -fopt-info does not matter.
* doc/optinfo.texi (-fopt-info): Fix description of default
behavour. Explicitly say order of options included in -fopt-info
does not matter.

From-SVN: r247648

7 years ago[ARM] Allow combination of aprofile and rmprofile multilibs
Thomas Preud'homme [Fri, 5 May 2017 16:50:40 +0000 (16:50 +0000)]
[ARM] Allow combination of aprofile and rmprofile multilibs

2017-05-05  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    * config.gcc: Allow combinations of aprofile and rmprofile values for
    --with-multilib-list.
    * config/arm/t-multilib: New file.
    * config/arm/t-aprofile: Remove initialization of MULTILIB_*
    variables.  Remove setting of ISA and floating-point ABI in
    MULTILIB_OPTIONS and MULTILIB_DIRNAMES.  Set architecture and FPU in
    MULTI_ARCH_OPTS_A and MULTI_ARCH_DIRS_A rather than MULTILIB_OPTIONS
    and MULTILIB_DIRNAMES respectively.  Add comment to introduce all
    matches.  Add architecture matches for marvel-pj4 and generic-armv7-a
    CPU options.
    * config/arm/t-rmprofile: Likewise except for the matches changes.
    * doc/install.texi (--with-multilib-list): Document the combination of
    aprofile and rmprofile values and warn about pitfalls in doing that.

From-SVN: r247646

7 years agocall.c (make_temporary_var_for_ref_to_temp): Push decl into current scope.
Nathan Sidwell [Fri, 5 May 2017 16:50:14 +0000 (16:50 +0000)]
call.c (make_temporary_var_for_ref_to_temp): Push decl into current scope.

* call.c (make_temporary_var_for_ref_to_temp): Push decl into
current scope.
* lex.c (unqualified_name_lookup_error): Likewise.

From-SVN: r247645

7 years agoclass.c (alter_class): Use retrofit_lang_decl directly.
Nathan Sidwell [Fri, 5 May 2017 16:47:39 +0000 (16:47 +0000)]
class.c (alter_class): Use retrofit_lang_decl directly.

* class.c (alter_class): Use retrofit_lang_decl directly.
* decl.c (push_local_name, dupliate_decls): Likewise.
* semantics.c (omp_privatize_field): Likewise.

From-SVN: r247644

7 years agoFloat to int moves currently generate inefficient code due to hacks used in the movsi...
Wilco Dijkstra [Fri, 5 May 2017 16:18:17 +0000 (16:18 +0000)]
Float to int moves currently generate inefficient code due to hacks used in the movsi and movdi patterns.

Float to int moves currently generate inefficient code due to
hacks used in the movsi and movdi patterns.  The 'r = w' variant
uses '*' which tells the register allocator to ignore it.
As a result the float to int moves typically spill to the stack,
which is extremely inefficient.

    gcc/
* config/aarch64/aarch64.md (movsi_aarch64): Remove '*' from r=w.
(movdi_aarch64): Likewise.

From-SVN: r247643

7 years agore PR tree-optimization/80632 (error: invalid PHI argument with -O2)
Jakub Jelinek [Fri, 5 May 2017 16:02:44 +0000 (18:02 +0200)]
re PR tree-optimization/80632 (error: invalid PHI argument with -O2)

PR tree-optimization/80632
* tree-switch-conversion.c (struct switch_conv_info): Add target_vop
field.
(build_arrays): Initialize it for virtual phis.
(fix_phi_nodes): Use it for virtual phis.

* gcc.dg/pr80632.c: New test.

From-SVN: r247642

7 years agore PR tree-optimization/80558 (VRP not handling x & -2 well)
Jakub Jelinek [Fri, 5 May 2017 15:43:22 +0000 (17:43 +0200)]
re PR tree-optimization/80558 (VRP not handling x & -2 well)

PR tree-optimization/80558
* tree-vrp.c (extract_range_from_binary_expr_1): Optimize
[x, y] op z into [x op, y op z] for op & or | if conditions
are met.

* gcc.dg/tree-ssa/vrp115.c: New test.

From-SVN: r247641

7 years ago[ARM] PR71607: Fix ICE when loading constant
Andre Vieira [Fri, 5 May 2017 15:41:28 +0000 (15:41 +0000)]
[ARM] PR71607: Fix ICE when loading constant

2017-05-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
            Prakhar Bahuguna  <prakhar.bahuguna@arm.com>

    gcc/
    PR target/71607
    * config/arm/arm.md (use_literal_pool): Remove.
    (64-bit immediate split): No longer takes cost into consideration
    if arm_disable_literal_pool is enabled.
    * config/arm/arm.c (arm_tls_referenced_p): Add diagnostic if TLS is
    used when arm_disable_literal_pool is enabled.
    (arm_max_const_double_inline_cost): Remove use of
    arm_disable_literal_pool.
    (push_minipool_fix): Add assert.
    (arm_reorg): Add return if arm_disable_literal_pool is enabled.
    * config/arm/vfp.md (no_literal_pool_df_immediate): New.
    (no_literal_pool_sf_immediate): New.

2017-05-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
        Thomas Preud'homme  <thomas.preudhomme@arm.com>
        Prakhar Bahuguna  <prakhar.bahuguna@arm.com>

    gcc/testsuite/
    PR target/71607
    * gcc.target/arm/thumb2-slow-flash-data.c: Renamed to ...
    * gcc.target/arm/thumb2-slow-flash-data-1.c: ... this.
    * gcc.target/arm/thumb2-slow-flash-data-2.c: New.
    * gcc.target/arm/thumb2-slow-flash-data-3.c: New.
    * gcc.target/arm/thumb2-slow-flash-data-4.c: New.
    * gcc.target/arm/thumb2-slow-flash-data-5.c: New.
    * gcc.target/arm/tls-disable-literal-pool.c: New.

Co-Authored-By: Prakhar Bahuguna <prakhar.bahuguna@arm.com>
Co-Authored-By: Thomas Preud'homme <thomas.preudhomme@arm.com>
From-SVN: r247640

7 years agoKill walk_namespaces.
Nathan Sidwell [Fri, 5 May 2017 15:06:13 +0000 (15:06 +0000)]
Kill walk_namespaces.

* cp-tree.h (walk_namespaces_fn, walk_namespaces): Delete.
* decl.c (walk_namespaces_r, walk_namespaces): Delete.

From-SVN: r247638

7 years agore PR tree-optimization/80613 (ICE in is_gimple_reg_type with -O2)
Prathamesh Kulkarni [Fri, 5 May 2017 13:21:28 +0000 (13:21 +0000)]
re PR tree-optimization/80613 (ICE in is_gimple_reg_type with -O2)

2017-05-05  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

PR tree-optimization/80613
* tree-ssa-dce.c (propagate_necessity): Remove cases for
BUILT_IN_STRDUP and BUILT_IN_STRNDUP.

testsuite/
* gcc.dg/tree-ssa/pr79697.c (k): Remove.

From-SVN: r247635

7 years agotree-ssa-pre.c (get_or_alloc_expr_for): Simplify.
Richard Biener [Fri, 5 May 2017 12:51:36 +0000 (12:51 +0000)]
tree-ssa-pre.c (get_or_alloc_expr_for): Simplify.

2017-05-05  Richard Biener  <rguenther@suse.de>

* tree-ssa-pre.c (get_or_alloc_expr_for): Simplify.

From-SVN: r247634

7 years agoKill per-namespace static_decls.
Nathan Sidwell [Fri, 5 May 2017 11:30:49 +0000 (11:30 +0000)]
Kill per-namespace static_decls.

* cp-tree.h (static_decls): Declare.
(wrapup_globals_for_namespace)
diagnose_inline_vars_for_namespace): Replace with ...
(wrapup_namespace_globals): ... this.
* decl.c (static_decls): Define.
(wrapup_globals_for_namespace)
diagnose_inline_vars_for_namespace): Replace with ...
(wrapup_namespace_globals): ... this.
(cxx_init_decl_processing): Initialize static_decls.
* decl2.c (c_parse_final_cleanups): Adjust.
* name-lookup.h (cp_binding_level): Remove static_decls member.
* name-lookup.c (add_decl_to_level): Adjust.
(begin_scope): Adjust.
((--This line, and those below, will be ignored--

M    cp/cp-tree.h
M    cp/name-lookup.c
M    cp/name-lookup.h
M    cp/ChangeLog
M    cp/decl2.c
M    cp/decl.c

From-SVN: r247633

7 years agoavr.md [...]: Remove any occurence of this flag from insn conditions due to removal...
Georg-Johann Lay [Fri, 5 May 2017 10:35:55 +0000 (10:35 +0000)]
avr.md [...]: Remove any occurence of this flag from insn conditions due to removal from r247495.

* config/avr/avr.md [flag_strict_overflow]: Remove any occurence
of this flag from insn conditions due to removal from r247495.

From-SVN: r247632

7 years agoCode scheduling for Cortex-A53 isn't as good as it could be.
Wilco Dijkstra [Fri, 5 May 2017 09:40:01 +0000 (09:40 +0000)]
Code scheduling for Cortex-A53 isn't as good as it could be.

Code scheduling for Cortex-A53 isn't as good as it could be.  It turns out
code runs faster overall if we place loads and stores with a dependency
closer together.  To achieve this effect, this patch adds a bypass between
cortex_a53_load1 and cortex_a53_load*/cortex_a53_store* if the result of an
earlier load is used in an address calculation.  This significantly improved
benchmark scores in a proprietary benchmark suite.

    gcc/
* config/arm/aarch-common.c (arm_early_load_addr_dep_ptr):
New function.
(arm_early_store_addr_dep_ptr): Likewise.
* config/arm/aarch-common-protos.h
(arm_early_load_addr_dep_ptr): Add prototype.
(arm_early_store_addr_dep_ptr): Likewise.
* config/arm/cortex-a53.md: Add new bypasses.

From-SVN: r247631

7 years agore PR c++/71577 (ICE on invalid C++11 code (with extra struct initializer): in digest...
Paolo Carlini [Fri, 5 May 2017 09:02:22 +0000 (09:02 +0000)]
re PR c++/71577 (ICE on invalid C++11 code (with extra struct initializer): in digest_init_r, at cp/typeck2.c:1117)

/cp
2017-05-05  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/71577
* decl.c (reshape_init): Unconditionally return error_mark_node
upon error about too many initializers.

/testsuite
2017-05-05  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/71577
* g++.dg/cpp0x/pr71577.C: New.

From-SVN: r247630

7 years agotree.c (next_type_uid): Change type to unsigned.
Jakub Jelinek [Fri, 5 May 2017 07:35:13 +0000 (09:35 +0200)]
tree.c (next_type_uid): Change type to unsigned.

* tree.c (next_type_uid): Change type to unsigned.
(type_hash_canon): Decrement back next_type_uid if
freeing a type node with the highest TYPE_UID.  For INTEGER_TYPEs
also ggc_free TYPE_MIN_VALUE, TYPE_MAX_VALUE and TYPE_CACHED_VALUES
if possible.

From-SVN: r247628

7 years agoDaily bump.
GCC Administrator [Fri, 5 May 2017 00:16:23 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r247627

7 years agobuiltins.c: Fix a trivial typo in a comment.
Martin Sebor [Thu, 4 May 2017 23:54:22 +0000 (23:54 +0000)]
builtins.c: Fix a trivial typo in a comment.

gcc/ChangeLog:
* builtins.c: Fix a trivial typo in a comment.

From-SVN: r247623

7 years agoPR libstdc++/54924 - Warn for std::string constructor with wrong size
Martin Sebor [Thu, 4 May 2017 23:50:21 +0000 (23:50 +0000)]
PR libstdc++/54924 - Warn for std::string constructor with wrong size

PR libstdc++/54924 - Warn for std::string constructor with wrong size
PR middle-end/79234 - warn on past the end reads by library functions

gcc/ChangeLog:

PR middle-end/79234
* builtins.c (check_sizes): Adjust to handle reading past the end.
Avoid printing excessive upper bound of ranges.  Use %E to print
tree nodes instead of converting them to %wu.
(expand_builtin_memchr): New function.
(compute_dest_size): Rename...
(compute_objsize): ...to this.
(expand_builtin_memcpy): Adjust.
(expand_builtin_mempcpy): Adjust.
(expand_builtin_strcat): Adjust.
(expand_builtin_strcpy): Adjust.
(check_strncat_sizes): Adjust.
(expand_builtin_strncat): Adjust.
(expand_builtin_strncpy): Adjust and simplify.
(expand_builtin_memset): Adjust.
(expand_builtin_bzero): Adjust.
(expand_builtin_memcmp): Adjust.
(expand_builtin): Handle memcmp.
(maybe_emit_chk_warning): Check strncat just once.

gcc/testsuite/ChangeLog:

PR middle-end/79234
* gcc.dg/builtin-stringop-chk-8.c: New test.
* gcc.dg/builtin-stringop-chk-1.c: Adjust.
* gcc.dg/builtin-stringop-chk-4.c: Same.
* gcc.dg/builtin-strncat-chk-1.c: Same.
* g++.dg/ext/strncpy-chk1.C: Same.
* g++.dg/torture/Wsizeof-pointer-memaccess1.C: Same.
* gcc.dg/out-of-bounds-1.c: Same.
* gcc.dg/pr78138.c: Same.
* gcc.dg/torture/Wsizeof-pointer-memaccess1.c: Same.
* gfortran.dg/mvbits_7.f90: Same.

From-SVN: r247622

7 years agoFix a typo.
Martin Sebor [Thu, 4 May 2017 21:04:04 +0000 (15:04 -0600)]
Fix a typo.

From-SVN: r247619

7 years agoPR preprocessor/79214 - -Wno-system-header defeats strncat buffer overflow warnings
Martin Sebor [Thu, 4 May 2017 20:54:43 +0000 (20:54 +0000)]
PR preprocessor/79214 - -Wno-system-header defeats strncat buffer overflow warnings

PR preprocessor/79214 -  -Wno-system-header defeats strncat buffer overflow warnings
PR middle-end/79222 - missing -Wstringop-overflow= on a stpcpy overflow
PR middle-end/79223 - missing -Wstringop-overflow on a memmove overflow

gcc/ChangeLog:

PR preprocessor/79214
PR middle-end/79222
PR middle-end/79223
* builtins.c (check_sizes): Add inlinining context and issue
warnings even when -Wno-system-headers is set.
(check_strncat_sizes): Same.
(expand_builtin_strncat): Same.
(expand_builtin_memmove): New function.
(expand_builtin_stpncpy): Same.
(expand_builtin): Handle memmove and stpncpy.

gcc/testsuite/ChangeLog:

PR preprocessor/79214
PR middle-end/79222
PR middle-end/79223
* gcc.dg/pr79214.c: New test.
* gcc.dg/pr79214.h: New test header.
* gcc.dg/pr79222.c: New test.
* gcc.dg/pr79223.c: New test.
* gcc.dg/pr78138.c: Adjust.
* gfortran.dg/unconstrained_commons.f: Same.

From-SVN: r247618

7 years ago* constraint.cc (diagnose_check_constraint): Fix %E thinko.
Nathan Sidwell [Thu, 4 May 2017 18:37:53 +0000 (18:37 +0000)]
* constraint.cc (diagnose_check_constraint): Fix %E thinko.

From-SVN: r247614

7 years agotree-ssa-loop-ivopts.c (struct cost_pair): Remove field inv_expr which is not used...
Bin Cheng [Thu, 4 May 2017 18:01:10 +0000 (18:01 +0000)]
tree-ssa-loop-ivopts.c (struct cost_pair): Remove field inv_expr which is not used any more.

* tree-ssa-loop-ivopts.c (struct cost_pair): Remove field inv_expr
which is not used any more.

From-SVN: r247612

7 years agoMany supported cores use the AUTOPREFETCHER_WEAK setting which tries to order...
Wilco Dijkstra [Thu, 4 May 2017 17:52:03 +0000 (17:52 +0000)]
Many supported cores use the AUTOPREFETCHER_WEAK setting which tries to order...

Many supported cores use the AUTOPREFETCHER_WEAK setting which tries
to order loads and stores to improve streaming performance.  Since significant
gains were reported in http://patchwork.ozlabs.org/patch/534469/ it seems
like a good idea to enable this setting too for -mcpu=generic.  Since the
weak model only keeps the order if it doesn't make the schedule worse, it
should not impact performance adversely on cores that don't show a gain.

    gcc/
        * config/aarch64/aarch64.c (generic_tunings): Update prefetch model.

From-SVN: r247610

7 years agoSet jump alignment to 4 for Cortex cores as it reduces codesize by 0.4% on...
Wilco Dijkstra [Thu, 4 May 2017 17:49:19 +0000 (17:49 +0000)]
Set jump alignment to 4 for Cortex cores as it reduces codesize by 0.4% on...

Set jump alignment to 4 for Cortex cores as it reduces codesize by 0.4% on
average with no obvious performance difference.  See original discussion of
the overheads of various alignments:
https://gcc.gnu.org/ml/gcc-patches/2016-06/msg02075.html.

    gcc/
* config/aarch64/aarch64.c (cortexa35_tunings): Set jump alignment to 4.
(cortexa53_tunings): Likewise.
(cortexa57_tunings): Likewise.
(cortexa72_tunings): Likewise.
(cortexa73_tunings): Likewise.

From-SVN: r247609

7 years agoWith -mcpu=generic the loop alignment is currently 4.
Wilco Dijkstra [Thu, 4 May 2017 17:43:43 +0000 (17:43 +0000)]
With -mcpu=generic the loop alignment is currently 4.

With -mcpu=generic the loop alignment is currently 4.  All but one of the
supported cores use 8 or higher.  Since using 8 provides performance gains
on several cores, it is best to use that by default.  As discussed in [1],
the jump alignment has no effect on performance, yet has a relatively high
codesize cost [2], so setting it to 4 is best.  This gives a 0.2% overall
codesize improvement as well as performance gains in several benchmarks.

    gcc/
* config/aarch64/aarch64.c (generic_tunings): Set jump alignment to 4.
Set loop alignment to 8.

[1] https://gcc.gnu.org/ml/gcc-patches/2017-04/msg00574.html
[2] https://gcc.gnu.org/ml/gcc-patches/2016-06/msg02075.html

From-SVN: r247608

7 years agoPR translation/80280 - Missing closing quote (%>) c/semantics.c and c/c-typeck.c
Martin Sebor [Thu, 4 May 2017 17:40:05 +0000 (17:40 +0000)]
PR translation/80280 - Missing closing quote (%>) c/semantics.c and c/c-typeck.c

gcc/c-family/ChangeLog:

PR translation/80280
* c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
(handle_weakref_attribute): Same.

PR translation/80280 - Missing closing quote (%>) c/semantics.c and c/c-typeck.c

gcc/ChangeLog:

PR translation/80280
* config/i386/i386.c (ix86_function_versions): Quote a %D directive.

PR translation/80280 - Missing closing quote (%>) c/semantics.c and c/c-typeck.c

gcc/cp/ChangeLog:

PR translation/80280
* call.c (print_z_candidate): Add missing quoting to %D and other
like directives.
(build_op_call_1): Same.
* constraint.cc (diagnose_check_constraint): Same.
* mangle.c (mangle_decl): Same.
* name-lookup.c (cp_binding_level_debug): Same.
(set_decl_namespace): Same.
* parser.c (cp_parser_tx_qualifier_opt): Same.
* pt.c (print_candidates_1): Same.
(check_template_variable): Same.
(tsubst_default_argument): Same.
(most_specialized_partial_spec): Same.
* semantics.c (omp_reduction_lookup): Same.
* tree.c (check_abi_tag_redeclaration): Same.
* typeck.c (comptypes): Same.
* typeck2.c (abstract_virtuals_error_sfinae): Same.

PR translation/80280 - Missing closing quote (%>) c/semantics.c and c/c-typeck.c

gcc/ChangeLog:

PR translation/80280
* builtins.c (expand_builtin_object_size): Add missing quoting to
%D and like directives.
* hsa-gen.c (hsa_type_for_scalar_tree_type): Same.
(hsa_type_for_tree_type): Same.
(verify_function_arguments): Same.
* symtab.c (symbol_table::change_decl_assembler_name): Same.
* varasm.c (get_section): Same.
(mark_weak): Same.

PR translation/80280 - Missing closing quote (%>) c/semantics.c and c/c-typeck.c

gcc/objc/ChangeLog:

PR translation/80280
* objc-gnu-runtime-abi-01.c (objc_eh_runtime_type): Add missing
quoting to directives.
* objc-next-runtime-abi-01.c (objc_eh_runtime_type): Ditto.
* objc-next-runtime-abi-02.c (next_runtime_02_eh_type): Ditto.

PR translation/80280 - Missing closing quote (%>) c/semantics.c and c/c-typeck.c

gcc/testsuite/ChangeLog:

PR translation/80280
* g++.dg/abi/Wabi-2-3.C: Adjust.
* g++.dg/abi/Wabi-3-2.C: Ditto.
* g++.dg/lookup/using17.C: Ditto.
* gcc.dg/format/gcc_diag-1.c (foo): Ditto.

From-SVN: r247607

7 years agoAll cores which add a cpu_addrcost_table use a non-zero value for HI and TI...
Wilco Dijkstra [Thu, 4 May 2017 17:05:28 +0000 (17:05 +0000)]
All cores which add a cpu_addrcost_table use a non-zero value for HI and TI...

All cores which add a cpu_addrcost_table use a non-zero value for
HI and TI mode shifts (a non-zero value for general indexing also
applies to all shifts).  Given this, it makes no sense to use a
different setting in generic_addrcost_table.  So change it so that
all supported cores, including -mcpu=generic, now generate the same:

int f(short *p, short *q, long x) { return p[x] + q[x]; }

        lsl     x2, x2, 1
        ldrsh   w3, [x0, x2]
        ldrsh   w0, [x1, x2]
        add     w0, w3, w0
        ret

    gcc/
* config/aarch64/aarch64.c (generic_addrcost_table):
Change HI/TI mode setting.

From-SVN: r247606

7 years ago[PR 80622] Treat const pools as initialized in SRA
Martin Jambor [Thu, 4 May 2017 16:19:20 +0000 (18:19 +0200)]
[PR 80622] Treat const pools as initialized in SRA

2017-05-04  Martin Jambor  <mjambor@suse.cz>

PR tree-optimization/80622
* tree-sra.c (comes_initialized_p): New function.
(build_accesses_from_assign): Only set write lazily when
comes_initialized_p is false.
(analyze_access_subtree): Use comes_initialized_p.
(propagate_subaccesses_across_link): Assert !comes_initialized_p
instead of testing for PARM_DECL.

testsuite/
* gcc.dg/tree-ssa/pr80622.c: New test.

From-SVN: r247604

7 years ago[AArch64] Accept more addressing modes for PRFM
Kyrylo Tkachov [Thu, 4 May 2017 16:14:37 +0000 (16:14 +0000)]
[AArch64] Accept more addressing modes for PRFM

* config/aarch64/aarch64.md (prefetch); Adjust predicate and
constraint on operand 0 to allow more general addressing modes.
Adjust output template.
* config/aarch64/aarch64.c (aarch64_address_valid_for_prefetch_p):
New function.
* config/aarch64/aarch64-protos.h
(aarch64_address_valid_for_prefetch_p): Declare prototype.
* config/aarch64/constraints.md (Dp): New address constraint.
* config/aarch64/predicates.md (aarch64_prefetch_operand): New
predicate.

* gcc.target/aarch64/prfm_imm_offset_1.c: New test.

From-SVN: r247603

7 years agoUpdate .po files.
Joseph Myers [Thu, 4 May 2017 15:54:08 +0000 (16:54 +0100)]
Update .po files.

* be.po, da.po, el.po, fi.po, hr.po, id.po, ja.po, nl.po, ru.po,
sr.po, sv.po, tr.po, uk.po, vi.po, zh_CN.po, zh_TW.po: Update.

From-SVN: r247601

7 years agoMore global trees.
Nathan Sidwell [Thu, 4 May 2017 15:39:05 +0000 (15:39 +0000)]
More global trees.

* cp-tree.h (enum cp_tree_index): Add CPTI_GLOBAL,
CPTI_GLOBAL_TYPE, CPTI_GLOBAL_IDENTIFIER, CPTI_ANON_IDENTIFIER,
CPTI_INIT_LIST_IDENTIFIER.
(global_namespace, global_type_node, global_identifier)
anon_identifier, init_list_identifier): New.
* decl.c (global_type_node, global_scope_name): Delete.
(initialize_predefined_identifiers): Add new identifiers.
(cxx_init_decl_processing): Adjust.
* name-lookup.h (global_namespace, global_type_node): Delete.
* name-lookup.c (global_namespace, anonymous_namespace_name)
get_anonymous_namespace_name): Delete.
(namespace_scope_ht_size, begin_scope, pushtag_1)
push_namespace): Adjust,
* call.c (type_has_extended_temps): Use init_list_identifier.
* pt.c (listify): Likewise.
(((--This line, and those below, will be ignored--

M    cp/name-lookup.c
M    cp/name-lookup.h
M    cp/ChangeLog
M    cp/call.c
M    cp/pt.c
M    cp/cp-tree.h
M    cp/decl.c

From-SVN: r247599

7 years agoipa-cp.c (perform_estimation_of_a_value): Drop base_time parameter; update use of...
Jan Hubicka [Thu, 4 May 2017 13:57:35 +0000 (15:57 +0200)]
ipa-cp.c (perform_estimation_of_a_value): Drop base_time parameter; update use of estimate_ipcp_clone_size_and_time.

* ipa-cp.c (perform_estimation_of_a_value): Drop base_time parameter;
update use of estimate_ipcp_clone_size_and_time.
(estimate_local_effects): Update use of
estimate_ipcp_clone_size_and_time and perform_estimation_of_a_value.
* ipa-inline.h (estimate_ipcp_clone_size_and_time): Update prototype.
* ipa-inline-analysis.c (estimate_ipcp_clone_size_and_time):
Return nonspecialized time.

* gcc.dg/ipa/ipcp-2.c: Decrease ipcp threshold
* gcc.dg/tree-ssa/ipa-cp-1.c: Likewise.

From-SVN: r247597

7 years agotree-ssa-alias.c (get_continuation_for_phi): Improve looking for the last VUSE which...
Richard Biener [Thu, 4 May 2017 13:29:08 +0000 (13:29 +0000)]
tree-ssa-alias.c (get_continuation_for_phi): Improve looking for the last VUSE which def dominates the PHI.

2017-05-04  Richard Biener  <rguenther@suse.de>

* tree-ssa-alias.c (get_continuation_for_phi): Improve looking
for the last VUSE which def dominates the PHI.  Directly call
maybe_skip_until.
(get_continuation_for_phi_1): Remove.

* gcc.dg/tree-ssa/ssa-fre-58.c: New testcase.

From-SVN: r247596

7 years agoname-lookup.c: Reorder functions to make merging from modules branch simpler.
Nathan Sidwell [Thu, 4 May 2017 12:35:05 +0000 (12:35 +0000)]
name-lookup.c: Reorder functions to make merging from modules branch simpler.

* name-lookup.c: Reorder functions to make merging from modules
branch simpler.

From-SVN: r247592

7 years agoCap niter_for_unrolled_loop to upper bound
Richard Sandiford [Thu, 4 May 2017 11:37:05 +0000 (11:37 +0000)]
Cap niter_for_unrolled_loop to upper bound

For the reasons explained in PR77536, niter_for_unrolled_loop assumes 5
iterations in the absence of profiling information, although it doesn't
increase beyond the estimate for the original loop.  This left a hole in
which the new estimate could be less than the old one but still greater
than the limit imposed by CEIL (nb_iterations_upper_bound, unroll factor).

2017-05-04  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* tree-ssa-loop-manip.c (niter_for_unrolled_loop): Add commentary
to explain the use of truncating division.  Cap the number of
iterations to the maximum given by nb_iterations_upper_bound,
if defined.

gcc/testsuite/
* gcc.dg/vect/vect-profile-1.c: New test.

From-SVN: r247591

7 years agoFix previous commit
Richard Sandiford [Thu, 4 May 2017 11:03:54 +0000 (11:03 +0000)]
Fix previous commit

From-SVN: r247589

7 years agoconfigure.ac (--enable-mingw-wildcard): Add new configurable feature.
Thomas Preud'homme [Thu, 4 May 2017 11:02:08 +0000 (11:02 +0000)]
configure.ac (--enable-mingw-wildcard): Add new configurable feature.

2017-05-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>

* configure.ac (--enable-mingw-wildcard): Add new configurable feature.
* configure: Regenerate.
* config.in: Regenerate.
* config/i386/driver-mingw32.c: new file.
* config/i386/x-mingw32: Add rule to build driver-mingw32.o.
* config.host: Link driver-mingw32.o on MinGW host.
* doc/install.texi: Document new --enable-mingw-wildcard configure
option.

From-SVN: r247588

7 years agoRemove bogus top-level ChangeLog commit (sorry!)
Richard Sandiford [Thu, 4 May 2017 11:00:48 +0000 (11:00 +0000)]
Remove bogus top-level ChangeLog commit (sorry!)

From-SVN: r247587

7 years agore PR tree-optimization/80612 (ICE in get_range_info, at tree-ssanames.c:375)
Marek Polacek [Thu, 4 May 2017 10:35:58 +0000 (10:35 +0000)]
re PR tree-optimization/80612 (ICE in get_range_info, at tree-ssanames.c:375)

PR tree-optimization/80612
* calls.c (get_size_range): Check for INTEGRAL_TYPE_P.

* gcc.dg/torture/pr80612.c: New test.

From-SVN: r247586

7 years ago[ARM] Enable Purecode for ARMv8-M Baseline
Prakhar Bahuguna [Thu, 4 May 2017 10:26:25 +0000 (10:26 +0000)]
[ARM] Enable Purecode for ARMv8-M Baseline

This patch adds support for purecode to ARMv8-M Baseline, in addition to
the existing support for ARMv7-M and ARMv8-M Mainline.

2017-05-04  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
            Andre Simoes Dias Vieira  <andre.simoesdiasvieira@arm.com>

    gcc/
    * config/arm/arm.md (movsi): Change TARGET_32BIT to TARGET_HAVE_MOVT.
    (movt splitter): Likewise.
    * config/arm/arm.c (arm_option_check_internal): Change arm_arch_thumb2
    to TARGET_HAVE_MOVT, and merge with -mslow-flash-data check.
    (const_ok_for_arm): Change else to else if (TARGET_THUMB2) and add else
    block for Thumb-1 with MOVT.
    (thumb2_legitimate_address_p): Move code block ...
    (can_avoid_literal_pool_for_label_p): ... into this new function.
    (thumb1_legitimate_address_p): Add check for TARGET_HAVE_MOVT and
    literal pool.
    (thumb_legitimate_constant_p): Add conditional on TARGET_HAVE_MOVT
    * doc/invoke.texi (-mpure-code): Change "ARMv7-M targets" for
    "M-profile targets with the MOVT instruction".

    gcc/testsuite/
    * gcc.target/arm/pure-code/pure-code.exp: Add conditional for
    check_effective_target_arm_thumb1_movt_ok.

Co-Authored-By: Andre Vieira <andre.simoesdiasvieira@arm.com>
From-SVN: r247585

7 years ago[ARM] Rename FPSCR builtins to correct names
Prakhar Bahuguna [Thu, 4 May 2017 10:16:04 +0000 (10:16 +0000)]
[ARM] Rename FPSCR builtins to correct names

The GCC documentation in section 6.60.8 ARM Floating Point Status and
Control Intrinsics states that the FPSCR register can be read and
written to using the intrinsics __builtin_arm_get_fpscr and
__builtin_arm_set_fpscr. However, these are misnamed within GCC itself
and these intrinsic names are not recognised.

This patch corrects the intrinsic names to match the documentation, and
adds tests to verify these intrinsics generate the correct
instructions.

2017-05-04  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>

    gcc/
    * gcc/config/arm/arm-builtins.c (arm_init_builtins): Rename
    __builtin_arm_ldfscr to __builtin_arm_get_fpscr, and rename
    __builtin_arm_stfscr to __builtin_arm_set_fpscr.

    gcc/testsuite/
    * gcc.target/arm/fpscr.c: New file.

From-SVN: r247584

7 years agoRemove an unused variable.
Martin Liska [Thu, 4 May 2017 10:06:54 +0000 (12:06 +0200)]
Remove an unused variable.

2017-05-04  Martin Liska  <mliska@suse.cz>

* tree-vrp.c (simplify_cond_using_ranges_2): Remove unused
variable cond_code.

From-SVN: r247583

7 years agoRequire c99_runtime for pr78622.c
Thomas Preud'homme [Thu, 4 May 2017 09:36:29 +0000 (09:36 +0000)]
Require c99_runtime for pr78622.c

2017-05-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>

gcc/testsuite/
    * gcc.c-torture/execute/pr78622.c: Require c99_runtime effective
    target.

From-SVN: r247582

7 years agotree.c (array_at_struct_end_p): Handle arrays at struct end with flexarrays more...
Richard Biener [Thu, 4 May 2017 09:08:01 +0000 (09:08 +0000)]
tree.c (array_at_struct_end_p): Handle arrays at struct end with flexarrays more conservatively.

2017-05-04  Richard Biener  <rguenther@suse.de>

* tree.c (array_at_struct_end_p): Handle arrays at struct
end with flexarrays more conservatively.  Refactor and treat
arrays of arrays or aggregates more strict.  Fix
VIEW_CONVERT_EXPR handling.  Remove allow_compref argument.
* tree.c (array_at_struct_end_p): Adjust prototype.
* emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust.
* gimple-fold.c (get_range_strlen): Likewise.
* tree-chkp.c (chkp_may_narrow_to_field): Likewise.

From-SVN: r247581

7 years agoReplace absolute line numbers in g++.dg/warn
Tom de Vries [Thu, 4 May 2017 07:55:11 +0000 (07:55 +0000)]
Replace absolute line numbers in g++.dg/warn

2017-05-04  Tom de Vries  <tom@codesourcery.com>

PR testsuite/80557
* g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C: Replace absolute
line numbers.
* g++.dg/warn/miss-format-1.C: Same.
* g++.dg/warn/overflow-warn-1.C: Same.
* g++.dg/warn/overflow-warn-3.C: Same.
* g++.dg/warn/overflow-warn-4.C: Same.

From-SVN: r247580

7 years agoReplace absolute line numbers in gcc.target/i386
Tom de Vries [Thu, 4 May 2017 07:54:59 +0000 (07:54 +0000)]
Replace absolute line numbers in gcc.target/i386

2017-05-04  Tom de Vries  <tom@codesourcery.com>

PR testsuite/80557
* gcc.target/i386/pr57655.c: Replace absolute line numbers.
* gcc.target/i386/pr68657.c: Same.
* gcc.target/i386/pr69255-1.c: Same.
* gcc.target/i386/pr69255-2.c: Same.
* gcc.target/i386/pr69255-3.c: Same.

From-SVN: r247579

7 years agore PR tree-optimization/31130 (VRP no longer derives range for division after negation)
Richard Biener [Thu, 4 May 2017 07:29:55 +0000 (07:29 +0000)]
re PR tree-optimization/31130 (VRP no longer derives range for division after negation)

2017-05-04  Richard Biener  <rguenther@suse.de>

PR tree-optimization/31130
* tree-vrp.c (needs_overflow_infinity): Remove as always returning
false.
(supports_overflow_infinity): Likewise.
(is_negative_overflow_infinity): Likewise.
(is_positive_overflow_infinity): Likewise.
(is_overflow_infinity): Likewise.
(stmt_overflow_infinity): Likewise.
(overflow_infinity_range_p): Likewise.
(usable_range_p): Remove as always returning true.
(make_overflow_infinity): Remove.
(negative_overflow_infinity): Likewise.
(positive_overflow_infinity): Likewise.
(avoid_overflow_infinity): Likewise.
(set_value_range): Adjust accordingly.
(set_value_range_to_nonnegative): Likewise, remove now unused
overflow_infinity arg.
(vrp_operand_equal_p): Adjust.
(update_value_range): Likewise.
(range_int_cst_singleton_p): Likewise.
(operand_less_p): Likewise.
(compare_values_warnv): Likewise.
(extract_range_for_var_from_comparison_expr): Likewise.
(vrp_int_const_binop): Likewise.
(zero_nonzero_bits_from_vr): Likewise.
(extract_range_from_multiplicative_op_1): Likewise.
(extract_range_from_binary_expr_1): Likewise.
(extract_range_from_unary_expr): Likewise.
(extract_range_from_comparison): Likewise.
(extract_range_basic): Likewise.
(adjust_range_with_scev): Likewise.
(compare_ranges): Likewise.
(compare_range_with_value): Likewise.
(dump_value_range): Likewise.
(test_for_singularity): Likewise, remove strict_overflow_p parameter
never used.
(simplify_cond_using_ranges): Adjust.

* gcc.dg/Wstrict-overflow-12.c: XFAIL.
* gcc.dg/Wstrict-overflow-13.c: Likewise.
* gcc.dg/Wstrict-overflow-21.c: Likewise.
* gcc.dg/pr52904.c: Remove XFAIL.
* gcc.dg/tree-ssa/vrp114.c: New testcase.

From-SVN: r247578

7 years agoRemoved accidentally committed conflict marker.
Pekka Jääskeläinen [Thu, 4 May 2017 05:56:32 +0000 (05:56 +0000)]
Removed accidentally committed conflict marker.

From-SVN: r247577

7 years agoMinor BRIG/HSAIL frontend updates and bug fixes:
Pekka Jääskeläinen [Thu, 4 May 2017 05:50:21 +0000 (05:50 +0000)]
Minor BRIG/HSAIL frontend updates and bug fixes:

* brig-builtins.def: Added a builtin for class_f64.
* builtin-types.def: Added a builtin type needed by class_f64.
* brigfrontend/brig-code-entry-handler.cc
 (brig_code_entry_handler::build_address_operand): Fix a bug
 with reg+offset addressing on 32b segments. In large mode,
 the offset is treated as 32bits unless it's global, readonly or
 kernarg address space.
* rt/workitems.c: Removed a leftover comment.
* rt/arithmetic.c (__hsail_class_f32, __hsail_class_f64): Fix the
 check for signaling/non-signalling NaN. Add class_f64 default
 implementation.

From-SVN: r247576

7 years agoDaily bump.
GCC Administrator [Thu, 4 May 2017 00:16:25 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r247575

7 years ago* de.po: Update.
Joseph Myers [Wed, 3 May 2017 22:24:30 +0000 (23:24 +0100)]
* de.po: Update.

From-SVN: r247570

7 years agoinvoke.texi: Note that -faligned-new is on by default for C++17.
Jason Merrill [Wed, 3 May 2017 18:50:25 +0000 (14:50 -0400)]
invoke.texi: Note that -faligned-new is on by default for C++17.

* doc/invoke.texi: Note that -faligned-new is on by default
for C++17.

From-SVN: r247564

7 years agotimevar.def: Add TV_CONSTEXPR.
Jason Merrill [Wed, 3 May 2017 18:50:20 +0000 (14:50 -0400)]
timevar.def: Add TV_CONSTEXPR.

* timevar.def: Add TV_CONSTEXPR.

* constexpr.c (cxx_eval_outermost_constant_expr): Use TV_CONSTEXPR.

From-SVN: r247563

7 years agoFix typo in common.opt
David Malcolm [Wed, 3 May 2017 18:35:27 +0000 (18:35 +0000)]
Fix typo in common.opt

gcc/ChangeLog:
* common.opt (fdiagnostics-parseable-fixits): Fix typo.

From-SVN: r247562

7 years agoRemove ipa_update_after_lto_read
Martin Jambor [Wed, 3 May 2017 16:49:47 +0000 (18:49 +0200)]
Remove ipa_update_after_lto_read

2017-05-03  Martin Jambor  <mjambor@suse.cz>

* ipa-prop.c (ipa_update_after_lto_read): Removed.
* ipa-prop.h (ipa_update_after_lto_read): Remove declaration.
* ipa-cp.c (ipcp_propagate_stage): Do not call
ipa_update_after_lto_read.
* ipa-inline.c (ipa_inline): Likewise.

From-SVN: r247559

7 years agoUse call_summary in ipa-prop and ipa-cp
Martin Jambor [Wed, 3 May 2017 16:48:20 +0000 (18:48 +0200)]
Use call_summary in ipa-prop and ipa-cp

2017-05-03  Martin Jambor  <mjambor@suse.cz>

* ipa-prop.h (ipa_edge_args): Make a class.  Mark with for_user GTY
tag.  Added a default constructor and a destructor.
(ipa_edge_args_sum_t): New class;
(ipa_edge_args_sum): Declare.
(ipa_edge_args_vector): Remove declaration.
(IPA_EDGE_REF): Use ipa_edge_args_sum.
(ipa_free_edge_args_substructures): Remove declaration.
(ipa_check_create_edge_args): Use ipa_edge_args_sum.
(ipa_edge_args_info_available_for_edge_p): Likewise.
* ipa-prop.c (ipa_edge_args_vector): Removed.
(edge_removal_hook_holder): Likewise.
(edge_duplication_hook_holder): Likewise.
(ipa_edge_args_sum): New variable.
(ipa_propagate_indirect_call_infos): Test ipa_edge_args_sum instead of
ipa_edge_args_vector.
(ipa_free_edge_args_substructures): Likewise.
(ipa_free_all_edge_args): Free ipa_edge_args_sum instead of
ipa_edge_args_vector.
(ipa_edge_removal_hook): Turned into method
ipa_edge_args_sum_t::remove.
(ipa_edge_duplication_hook): Turned into method
ipa_edge_args_sum_t::duplicate.
(ipa_register_cgraph_hooks): Create ipa_edge_args_sum instead of
registering edge hooks.
(ipa_unregister_cgraph_hooks): Do not unregister edge hooks.
* ipa-inline-analysis.c (estimate_function_body_sizes): Test
ipa_edge_args_sum instead of ipa_edge_args_vector.
* ipa-profile.c (ipa_profile): Likewise.

From-SVN: r247558

7 years agocall_summary to keep info about cgraph_edges
Martin Jambor [Wed, 3 May 2017 16:41:39 +0000 (18:41 +0200)]
call_summary to keep info about cgraph_edges

2017-05-03  Martin Jambor  <mjambor@suse.cz>

* symbol-summary.h (function_summary): New method exists.
(function_summary::symtab_removal): Deallocate through release.
(call_summary): New class.
(gt_ggc_mx): New overload.
(gt_pch_nx): Likewise.
(gt_pch_nx): Likewise.

From-SVN: r247557

7 years agore PR tree-optimization/78496 (Missed opportunities for jump threading)
Jeff Law [Wed, 3 May 2017 16:33:45 +0000 (10:33 -0600)]
re PR tree-optimization/78496 (Missed opportunities for jump threading)

PR tree-optimization/78496
* tree-vrp.c (simplify_cond_using_ranges_1): Renamed
from simplify_cond_using_ranges.  Split off code to walk
backwards through casts into ...
(simplify_cond_using_ranges_2): New function.
(simplify_stmt_using_ranges): Call simplify_cond_using_ranges_1.
(execute_vrp): After identifying jump threads, call
simplify_cond_using_ranges_2.

PR tree-optimization/78496
* gcc.dg/tree-ssa/ssa-thread-15.c: New test.

From-SVN: r247556

7 years agore PR ipa/80609 (crash_signal in reset_inline_summary on ia64 bootstrap)
Jan Hubicka [Wed, 3 May 2017 16:14:32 +0000 (18:14 +0200)]
re PR ipa/80609 (crash_signal in reset_inline_summary on ia64 bootstrap)

PR bootstrap/80609
* ipa-inline.h (inline_summary): Add ctor.
(create_ggc): Do not use ggc_cleared_alloc.

From-SVN: r247555

7 years agoconfig-list.mk (am33_2.0-linux): Remove from list of targets to build.
Jeff Law [Wed, 3 May 2017 15:23:35 +0000 (09:23 -0600)]
config-list.mk (am33_2.0-linux): Remove from list of targets to build.

2007-05-03  Jeff Law  <law@redhat.com>

* config-list.mk (am33_2.0-linux): Remove from list of targets
to build.

From-SVN: r247553

7 years agoSupport escaping special characters in specs
Jeff Downs [Wed, 3 May 2017 15:22:51 +0000 (15:22 +0000)]
Support escaping special characters in specs

2017-05-03  Jeff Downs  <heydowns@somuchpressure.net>
    Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

* gcc.c (handle_braces): Support escaping in switch matching
text.
* doc/invoke.texi (Spec Files): Document it.
Remove superfluous @code markup in items.

Co-Authored-By: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
From-SVN: r247552

7 years agopr79671_0.C (foo): Fix asm constraints.
Uros Bizjak [Wed, 3 May 2017 14:54:16 +0000 (16:54 +0200)]
pr79671_0.C (foo): Fix asm constraints.

* g++.dg/lto/pr79671_0.C (foo): Fix asm constraints.

From-SVN: r247550

7 years agoNew fix-it printer
David Malcolm [Wed, 3 May 2017 13:11:21 +0000 (13:11 +0000)]
New fix-it printer

The existing fix-it printer can lead to difficult-to-read output
when fix-it hints are near each other.  For example, in a recent
patch to add fix-it hints to the C++ frontend's -Wold-style-cast,
e.g. for:

  foo *f = (foo *)ptr->field;
                       ^~~~~

the fix-it hints:
 replace the open paren with "const_cast<"
 replace the close paren with "> ("
 insert ")" after the "ptr->field"

would be printed in this odd-looking way:

  foo *f = (foo *)ptr->field;
                       ^~~~~
           -
           const_cast<
                 -
                 > (        )

class rich_location consolidates adjacent fix-it hints, which helps
somewhat, but the underlying problem is that the existing printer
simply walks through the list of hints printing them, starting newlines
as necessary.

This patch reimplements fix-it printing by introducing a planning
stage: a new class line_corrections "plans" how to print the
fix-it hints affecting a line, generating a vec of "correction"
instances.  Hints that are sufficiently close to each other are
consolidated at this stage.

This leads to the much more reasonable output for the above case:

  foo *f = (foo *)ptr->field;
                       ^~~~~
           -----------------
           const_cast<foo *> (ptr->field);

where the 3 hints are consolidated into one "correction" at printing.

gcc/ChangeLog:
* diagnostic-show-locus.c (struct column_range): New struct.
(get_affected_columns): New function.
(get_printed_columns): New function.
(struct correction): New struct.
(correction::ensure_capacity): New function.
(correction::ensure_terminated): New function.
(struct line_corrections): New struct.
(line_corrections::~line_corrections): New dtor.
(line_corrections::add_hint): New function.
(layout::print_trailing_fixits): Reimplement in terms of the new
classes.
(selftest::test_overlapped_fixit_printing): New function.
(selftest::diagnostic_show_locus_c_tests): Call it.

From-SVN: r247548

7 years agocp-tree.h (enum cp_tree_index, [...]): Move earlier, along with #defines, to before...
Nathan Sidwell [Wed, 3 May 2017 12:54:56 +0000 (12:54 +0000)]
cp-tree.h (enum cp_tree_index, [...]): Move earlier, along with #defines, to before name-lookup include.

* cp-tree.h (enum cp_tree_index, cp_global_trees): Move earlier,
along with #defines, to before name-lookup include.

From-SVN: r247547

7 years agoCanonicalize canonical type hashing
Nathan Sidwell [Wed, 3 May 2017 12:15:05 +0000 (12:15 +0000)]
Canonicalize canonical type hashing

Canonicalize canonical type hashing
gcc/
* tree.h (type_hash_canon_hash): Declare.
* tree.c (type_hash_list, attribute_hash_list): Move into
type_hash_canon_hash.
(build_type_attribute_qual_variant): Break out hash code calc into
type_hash_canon_hash.
(type_hash_canon_hash): New.  Generic type hash computation.
(build_range_type_1, build_array_type_1, build_function_type)
build_method_type_directly, build_offset_type, build_complex_type,
make_vector_type): Call it.
gcc/c-family/
* c-common.c (complete_array_type): Use type_hash_canon.
(--This line, and those below, will be ignored--

M    gcc/tree.c
M    gcc/tree.h
M    gcc/c-family/ChangeLog
M    gcc/c-family/c-common.c
M    gcc/ChangeLog

From-SVN: r247546

7 years agotree-vect-data-refs.c (vect_enhance_data_refs_alignment): When all DRs have unknown...
Richard Biener [Wed, 3 May 2017 11:01:06 +0000 (11:01 +0000)]
tree-vect-data-refs.c (vect_enhance_data_refs_alignment): When all DRs have unknown misaligned do not always peel when...

2017-05-03  Richard Biener  <rguenther@suse.de>

* tree-vect-data-refs.c (vect_enhance_data_refs_alignment):
When all DRs have unknown misaligned do not always peel
when there is a store but apply the same costing model as if
there were only loads.

* gcc.dg/vect/costmodel/x86_64/costmodel-alignpeel.c: New testcase.

From-SVN: r247544

7 years agorevert: re PR tree-optimization/80492 (Wrong code when unrolling a loop with inline...
Richard Biener [Wed, 3 May 2017 10:59:25 +0000 (10:59 +0000)]
revert: re PR tree-optimization/80492 (Wrong code when unrolling a loop with inline asm and local regs)

2017-05-03  Richard Biener  <rguenther@suse.de>

Revert
PR tree-optimization/80492
* tree-ssa-alias.c (decl_refs_may_alias_p): Handle
compare_base_decls returning dont-know properly.

From-SVN: r247543

7 years ago[ARM] Set mode for success result of atomic compare and swap
Thomas Preud'homme [Wed, 3 May 2017 10:11:44 +0000 (10:11 +0000)]
[ARM] Set mode for success result of atomic compare and swap

2017-05-03  Thomas Preud'homme  <thomas.preudhomme@arm.com>

gcc/
    * config/arm/iterators.md (CCSI): New mode iterator.
    (arch): New mode attribute.
    * config/arm/sync.md (atomic_compare_and_swap<mode>_1): Rename into ...
    (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1): This and ...
    (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): This.  Use CCSI
    code iterator for success result mode.
    * config/arm/arm.c (arm_expand_compare_and_swap): Adapt code to use
    the corresponding new insn generators.

From-SVN: r247542

7 years agoRevert r247509 2017-05-02 Bin Cheng <bin.cheng@arm.com>
Bin Cheng [Wed, 3 May 2017 10:10:43 +0000 (10:10 +0000)]
Revert r247509 2017-05-02 Bin Cheng <bin.cheng@arm.com>

Revert r247509
2017-05-02  Bin Cheng  <bin.cheng@arm.com>
* rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.

From-SVN: r247541

7 years agoWrap tree-data-ref.h macro arguments
Richard Sandiford [Wed, 3 May 2017 07:51:08 +0000 (07:51 +0000)]
Wrap tree-data-ref.h macro arguments

gcc/
2016-05-03  Richard Sandiford  <richard.sandiford@linaro.org>

* tree-data-ref.h (SUB_CONFLICTS_IN_A): Wrap SUB argument in brackets.
(SUB_CONFLICTS_IN_B, SUB_LAST_CONFLICT, SUB_DISTANCE): Likewise.
(DDR_A): Wrap DDR argument in brackets.
(DDR_B, DDR_AFFINE_P, DDR_ARE_DEPENDENT, DDR_SUBSCRIPTS): Likewise.
(DDR_LOOP_NEST, DDR_INNER_LOOP, DDR_SELF_REFERENCE): Likewise.
(DDR_REVERSED_P): Likewise.

From-SVN: r247539

7 years agore PR tree-optimization/79472 (x86-64: Switch table generation fails if default case...
Jakub Jelinek [Wed, 3 May 2017 07:49:43 +0000 (09:49 +0200)]
re PR tree-optimization/79472 (x86-64: Switch table generation fails if default case has different code)

PR tree-optimization/79472
* tree-switch-conversion.c (struct switch_conv_info): Add
contiguous_range and default_case_nonstandard fields.
(collect_switch_conv_info): Compute contiguous_range and
default_case_nonstandard fields, don't clear final_bb if
contiguous_range and only the default case doesn't have the required
structure.
(check_all_empty_except_final): Set default_case_nonstandard instead
of failing if contiguous_range and the default case doesn't have empty
block.
(check_final_bb): Add SWTCH argument, don't fail if contiguous_range
and only the default case doesn't have the required constants.  Skip
virtual phis.
(gather_default_values): Skip virtual phis.  Allow non-NULL CASE_LOW
if default_case_nonstandard.
(build_constructors): Build constant 1 just once.  Assert that default
values aren't inserted in between cases if contiguous_range.  Skip
virtual phis.
(build_arrays): Skip virtual phis.
(prune_bbs): Add DEFAULT_BB argument, don't remove that bb.
(fix_phi_nodes): Don't add e2f phi arg if default_case_nonstandard.
Handle virtual phis.
(gen_inbound_check): Handle default_case_nonstandard case.
(process_switch): Adjust check_final_bb caller.  Call
gather_default_values with the first non-default case instead of
default case if default_case_nonstandard.

* gcc.dg/tree-ssa/vrp40.c: Add -fno-tree-switch-conversion to dg-options.
* gcc.dg/tree-ssa/vrp113.c: New test.
* gcc.dg/tree-ssa/cswtch-3.c: New test.
* gcc.dg/tree-ssa/cswtch-4.c: New test.
* gcc.dg/tree-ssa/cswtch-5.c: New test.

From-SVN: r247538

7 years agoReplace absolute line numbers in c-c++-common
Tom de Vries [Wed, 3 May 2017 07:33:01 +0000 (07:33 +0000)]
Replace absolute line numbers in c-c++-common

2017-05-03  Tom de Vries  <tom@codesourcery.com>

PR testsuite/80557
* c-c++-common/Wshift-negative-value-1.c: Replace absolute line numbers.
* c-c++-common/Wshift-negative-value-2.c: Same.
* c-c++-common/Wshift-negative-value-3.c: Same.
* c-c++-common/Wshift-negative-value-4.c: Same.
* c-c++-common/cilk-plus/AN/pr57541.c: Same.
* c-c++-common/cpp/pr60400.c: Same.
* c-c++-common/fmax-errors.c: Same.
* c-c++-common/goacc/data-2.c: Same.
* c-c++-common/goacc/host_data-2.c: Same.
* c-c++-common/gomp/simd4.c: Same.
* c-c++-common/pr28656.c: Same.
* c-c++-common/pr43395.c: Same.
* c-c++-common/torture/pr57945.c: Same.

From-SVN: r247537

7 years agoAdd quotes to numerical comment arg of dg directive
Tom de Vries [Wed, 3 May 2017 07:32:49 +0000 (07:32 +0000)]
Add quotes to numerical comment arg of dg directive

2017-05-03  Tom de Vries  <tom@codesourcery.com>

* c-c++-common/goacc/data-default-1.c: Add quotes to numerical comment
arg of dg directive.
* c-c++-common/goacc/routine-3.c: Same.
* c-c++-common/goacc/routine-4.c: Same.

From-SVN: r247536

7 years agoDaily bump.
GCC Administrator [Wed, 3 May 2017 00:16:23 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r247533

7 years agoggc-page.c (move_ptes_to_front): Replace unsigned >0 with i-- check.
Nathan Sidwell [Tue, 2 May 2017 22:39:23 +0000 (22:39 +0000)]
ggc-page.c (move_ptes_to_front): Replace unsigned >0 with i-- check.

* ggc-page.c (move_ptes_to_front): Replace unsigned >0 with i--
check.  Fix formatting.

From-SVN: r247529

7 years agoipa-inline-analysis.c (estimate_node_size_and_time): Allow roundoff errors when compa...
Jan Hubicka [Tue, 2 May 2017 22:35:24 +0000 (00:35 +0200)]
ipa-inline-analysis.c (estimate_node_size_and_time): Allow roundoff errors when comparing specialized and unspecialized times.

* ipa-inline-analysis.c (estimate_node_size_and_time): Allow roundoff
errors when comparing specialized and unspecialized times.

From-SVN: r247528

7 years agopt.c (is_auto_or_concept): Remove.
Paolo Carlini [Tue, 2 May 2017 21:46:40 +0000 (21:46 +0000)]
pt.c (is_auto_or_concept): Remove.

2017-05-02  Paolo Carlini  <paolo.carlini@oracle.com>

* pt.c (is_auto_or_concept): Remove.
(type_uses_auto_or_concept): Remove, unused.
(find_parameter_packs_r, extract_autos_r, is_auto_r): Adjust.
* parser.c (tree_type_is_auto_or_concept): Remove, unused.
* cp-tree.h (is_auto_or_concept): Remove.

From-SVN: r247526

7 years ago* es.po: Update.
Joseph Myers [Tue, 2 May 2017 20:46:15 +0000 (21:46 +0100)]
* es.po: Update.

From-SVN: r247524

7 years agoSupport fix-it hints that add new lines
David Malcolm [Tue, 2 May 2017 19:03:56 +0000 (19:03 +0000)]
Support fix-it hints that add new lines

Previously fix-it hints couldn't contain newlines.  This is
due to the need to print something user-readable for them
within diagnostic-show-locus, and for handling them within
edit-context for printing diffs and regenerating content.

This patch enables limited support for fix-it hints with newlines,
for suggesting adding new lines.
Such a fix-it hint must have exactly one newline character, at the
end of the content.  It must be an insertion at the beginning of
a line (so that e.g. fix-its that split a pre-existing line are
still rejected).

They are printed by diagnostic-show-locus with a '+' in the
left-hand margin, like this:

test.c:42:4: note: suggest adding 'break;' here
+      break;
     case 'b':
     ^~~~~~~~~

and the printer injects "spans" if the insertion location is not
near the primary range of the diagnostic e.g.:

test.c:4:2: note: unrecognized 'putchar'; suggest including '<stdio.h>'
test.c:1:1:
+#include <stdio.h>

test.c:4:2:
  putchar (ch);
  ^~~~~~~

gcc/ChangeLog:
* diagnostic-show-locus.c
(layout::should_print_annotation_line_p): Make private.
(layout::print_annotation_line): Make private.
(layout::annotation_line_showed_range_p): Make private.
(layout::show_ruler): Make private.
(layout::print_source_line): Make private.  Pass in line and
line_width, rather than calling location_get_source_line.  Drop
returned value.
(layout::print_leading_fixits): New method.
(layout::print_any_fixits): Rename to...
(layout::print_trailing_fixits): ...this, and make private.
Don't print newline fixits.
(diagnostic_show_locus): Move logic for printing one row into...
(layout::print_line): ...this new function.  Move the
location_get_source_line call and error-handling from
print_source_line to here.  Call print_leading_fixits, and rename
print_any_fixits to print_trailing_fixits.
(selftest::test_fixit_insert_containing_newline): Update now that
newlines are partially supported.
(selftest::test_fixit_insert_containing_newline_2): New test.
(selftest::test_fixit_replace_containing_newline): Update comments.
(selftest::diagnostic_show_locus_c_tests): Call the new test.
* edit-context.c (class added_line): New class.
(class edited_line): Describe newline handling in comment.
(edited_line::actually_edited_p): New method.
(edited_line::print_content): Delete redundant decl.
(edited_line::m_predecessors): New field.
(edited_file::print_content): Call edited_line::print_content.
(edited_file::print_diff): Update to support newlines.
(edited_file::print_diff_hunk): Likewise.
(edited_file::print_run_of_changed_lines): New function.
(edited_file::print_diff_line): Convert to...
(print_diff_line): ...this.
(edited_file::get_effective_line_count): New function.
(edited_line::edited_line): Initialize new field m_predecessors.
(edited_line::~edited_line): Clean up m_predecessors.
(edited_line::apply_fixit): Handle newlines.
(edited_line::get_effective_line_count): New function.
(edited_line::print_content): New function.
(edited_line::print_diff_lines): New function.
(selftest::test_applying_fixits_insert_containing_newline): New
test.
(selftest::test_applying_fixits_replace_containing_newline): New
test.
(selftest::insert_line): New function.
(selftest::test_applying_fixits_multiple_lines): Add example of
inserting a line.
(selftest::edit_context_c_tests): Call the new tests.

gcc/testsuite/ChangeLog:
* gcc.dg/plugin/diagnostic-test-show-locus-bw.c
(test_fixit_insert_newline): New function.
* gcc.dg/plugin/diagnostic-test-show-locus-color.c
(test_fixit_insert_newline): New function.
* gcc.dg/plugin/diagnostic-test-show-locus-generate-patch.c
(test_fixit_insert_newline): New function.
* gcc.dg/plugin/diagnostic-test-show-locus-parseable-fixits.c
(test_fixit_insert_newline): New function.
* gcc.dg/plugin/diagnostic_plugin_test_show_locus.c
(test_show_locus): Handle test_fixit_insert_newline.

libcpp/ChangeLog:
* include/line-map.h (class rich_location): Update description of
newline handling.
(class fixit_hint): Likewise.
(fixit_hint::ends_with_newline_p): New decl.
* line-map.c (rich_location::maybe_add_fixit): Support newlines
in fix-it hints that are insertions of single lines at the start
of a line.  Don't consolidate into such fix-it hints.
(fixit_hint::ends_with_newline_p): New method.

From-SVN: r247522

7 years ago* fr.po: Update.
Joseph Myers [Tue, 2 May 2017 17:27:22 +0000 (18:27 +0100)]
* fr.po: Update.

From-SVN: r247520

7 years agotree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Delete parameter cand.
Bin Cheng [Tue, 2 May 2017 16:21:34 +0000 (16:21 +0000)]
tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Delete parameter cand.

* tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Delete
parameter cand.  Update dump information.
(get_computation_cost): Update uses.

From-SVN: r247519

7 years agotree-ssa-loop-ivopts.c (get_computation_aff_1): New.
Bin Cheng [Tue, 2 May 2017 16:20:43 +0000 (16:20 +0000)]
tree-ssa-loop-ivopts.c (get_computation_aff_1): New.

* tree-ssa-loop-ivopts.c (get_computation_aff_1): New.
(get_computation_aff): Reorder parameters.  Use get_computation_aff_1.
(get_computation_at, rewrite_use_address): Update use of
get_computation_aff.

From-SVN: r247518

7 years agotree-ssa-loop-ivopts.c (get_computation_at): Reorder parameters.
Bin Cheng [Tue, 2 May 2017 16:19:51 +0000 (16:19 +0000)]
tree-ssa-loop-ivopts.c (get_computation_at): Reorder parameters.

* tree-ssa-loop-ivopts.c (get_computation_at): Reorder parameters.
(get_computation): Delete.
(get_computation_cost): Implement like get_computation_cost_at.
Use get_computation_at.
(get_computation_cost_at): Delete.
(rewrite_use_nonlinear_expr): Use get_computation_at.
(rewrite_use_compare, remove_unused_ivs): Ditto.

From-SVN: r247517

7 years ago* tree-ssa-loop-ivopts.c (rewrite_use_address): Simple refactor.
Bin Cheng [Tue, 2 May 2017 16:18:42 +0000 (16:18 +0000)]
* tree-ssa-loop-ivopts.c (rewrite_use_address): Simple refactor.

From-SVN: r247516

7 years agotree-ssa-loop-ivopts.c (struct iv_ca): Rename n_regs to n_invs.
Bin Cheng [Tue, 2 May 2017 16:14:53 +0000 (16:14 +0000)]
tree-ssa-loop-ivopts.c (struct iv_ca): Rename n_regs to n_invs.

* tree-ssa-loop-ivopts.c (struct iv_ca): Rename n_regs to n_invs.
(ivopts_global_cost_for_size): Rename parameter and update uses.
(iv_ca_recount_cost): Update uses.
(iv_ca_set_remove_invs, iv_ca_set_no_cp): Record invariants and
candidates seperately in n_invs and n_cands.
(iv_ca_set_add_invs, iv_ca_set_cp, iv_ca_new): Ditto.

From-SVN: r247515

7 years agotree-ssa-loop-ivopts.c (struct walk_tree_data): New.
Bin Cheng [Tue, 2 May 2017 16:12:41 +0000 (16:12 +0000)]
tree-ssa-loop-ivopts.c (struct walk_tree_data): New.

* tree-ssa-loop-ivopts.c (struct walk_tree_data): New.
(find_inv_vars_cb): New.
(find_depends): Renamed to ...
(find_inv_vars): ... this.
(add_candidate_1, force_var_cost): Call find_inv_vars.
(split_address_cost, determine_group_iv_cost_cond): Ditto.

From-SVN: r247514

7 years agotree-ssa-loop-ivopts.c (struct cost_pair): Rename depends_on to inv_vars.
Bin Cheng [Tue, 2 May 2017 16:09:23 +0000 (16:09 +0000)]
tree-ssa-loop-ivopts.c (struct cost_pair): Rename depends_on to inv_vars.

* tree-ssa-loop-ivopts.c (struct cost_pair): Rename depends_on to
inv_vars.  Add inv_exprs.
(struct iv_cand): Rename depends_on to inv_vars.
(struct ivopts_data): Rename max_inv_id/n_invariant_uses to
max_inv_var_id/n_inv_var_uses.  Move max_inv_expr_id around.
Refactor field used_inv_exprs from has_map to array n_inv_expr_uses.
(dump_cand): Dump inv_vars.
(tree_ssa_iv_optimize_init): Support inv_vars and inv_exprs.
(record_invariant, find_depends, add_candidate_1): Ditto.
(set_group_iv_cost, force_var_cost): Ditto.
(split_address_cost, ptr_difference_cost, difference_cost): Ditto.
(get_computation_cost_at, get_computation_cost): Ditto.
(determine_group_iv_cost_generic): Ditto.
(determine_group_iv_cost_address): Ditto.
(determine_group_iv_cost_cond, autoinc_possible_for_pair): Ditto.
(determine_group_iv_costs): Ditto.
(iv_ca_recount_cost): Update call to ivopts_global_cost_for_size.
(iv_ca_set_remove_invariants): Renamed to ...
(iv_ca_set_remove_invs): ... this.  Support inv_vars and inv_exprs.
(iv_ca_set_no_cp): Use iv_ca_set_remove_invs.
(iv_ca_set_add_invariants):  Renamed to ...
(iv_ca_set_add_invs): ... this.  Support inv_vars and inv_exprs.
(iv_ca_set_cp): Use iv_ca_set_add_invs.
(iv_ca_has_deps): Support inv_vars and inv_exprs.
(iv_ca_new, iv_ca_free, iv_ca_dump, free_loop_data): Ditto.
(create_new_ivs): Remove useless dump.

gcc/testsuite
* g++.dg/tree-ssa/ivopts-3.C: Adjust test string.

From-SVN: r247512

7 years agotree-ssa-loop-ivopts.c (get_computation_cost_at): Remove pseudo iv_cand code.
Bin Cheng [Tue, 2 May 2017 16:03:49 +0000 (16:03 +0000)]
tree-ssa-loop-ivopts.c (get_computation_cost_at): Remove pseudo iv_cand code.

* tree-ssa-loop-ivopts.c (get_computation_cost_at): Remove pseudo
iv_cand code.
(determine_group_iv_cost_cond, determine_iv_cost): Ditto.
(iv_ca_set_no_cp, create_new_iv): Ditto.

From-SVN: r247510

7 years ago* rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
Bin Cheng [Tue, 2 May 2017 15:57:45 +0000 (15:57 +0000)]
* rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.

From-SVN: r247509

7 years agotree.h (EXPR_CILK_SPAWN): Use macro TREE_CHECK2 instead of function tree_check2.
Jeff Law [Tue, 2 May 2017 15:39:02 +0000 (09:39 -0600)]
tree.h (EXPR_CILK_SPAWN): Use macro TREE_CHECK2 instead of function tree_check2.

2017-05-02  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>

* tree.h (EXPR_CILK_SPAWN): Use macro TREE_CHECK2 instead of
function tree_check2.

From-SVN: r247508

7 years agoFix documentation and a ctor in gcov.c
Martin Liska [Tue, 2 May 2017 15:37:41 +0000 (17:37 +0200)]
Fix documentation and a ctor in gcov.c

2017-05-02  Martin Liska  <mliska@suse.cz>

* doc/gcov.texi: Add missing preposition.
* gcov.c (function_info::function_info): Properly fill up
all member variables.

From-SVN: r247507

7 years agoexpr.c (expand_expr_real_2): Re-cost if previous costs are the same.
Tamar Christina [Tue, 2 May 2017 15:20:47 +0000 (15:20 +0000)]
expr.c (expand_expr_real_2): Re-cost if previous costs are the same.

2017-04-26  Tamar Christina  <tamar.christina@arm.com>

* expr.c (expand_expr_real_2): Re-cost if previous costs are the same.

From-SVN: r247505

7 years agosimplify-rtx.c (simplify_binary_operation_1): Add LSHIFTRT case.
Tamar Christina [Tue, 2 May 2017 15:19:07 +0000 (15:19 +0000)]
simplify-rtx.c (simplify_binary_operation_1): Add LSHIFTRT case.

gcc/
2017-04-27  Tamar Christina  <tamar.christina@arm.com>

* simplify-rtx.c (simplify_binary_operation_1): Add LSHIFTRT case.

gcc/testsuite/
2017-04-27  Tamar Christina  <tamar.christina@arm.com>

* gcc.dg/lsr-div1.c: New testcase.

From-SVN: r247504

7 years agoMake right PR.
Martin Liska [Tue, 2 May 2017 15:11:29 +0000 (15:11 +0000)]
Make right PR.

From-SVN: r247503

7 years agore PR bootstrap/69506 (check-in 232454 seems to cause problems with cygwin builds)
Hugo Beauzée-Luyssen [Tue, 2 May 2017 15:04:39 +0000 (17:04 +0200)]
re PR bootstrap/69506 (check-in 232454 seems to cause problems with cygwin builds)

2017-05-02  Hugo Beauzée-Luyssen <hugo@beauzee.fr>

PR libstdc++/69506
* config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_WEAK_REF): Define.

From-SVN: r247502