gcc.git
6 years agoDaily bump.
GCC Administrator [Sat, 3 Nov 2018 00:17:46 +0000 (00:17 +0000)]
Daily bump.

From-SVN: r265766

6 years agore PR fortran/46020 (Improve error string for BIND(C) diagnostic for len>1 character...
Thomas Koenig [Fri, 2 Nov 2018 20:20:43 +0000 (20:20 +0000)]
re PR fortran/46020 (Improve error string for BIND(C) diagnostic for len>1 character return type)

2018-11-02  Thomas Koenig  <tkoenig@gcc.gnu.org>

    PR fortran/46020
    * decl.c (verify_bind_c_sym): Remove unnecessary space
    in error message.

From-SVN: r265757

6 years agoMove gcc.dg/compat dg-skip-if to *_main.c files
Rainer Orth [Fri, 2 Nov 2018 19:18:31 +0000 (19:18 +0000)]
Move gcc.dg/compat dg-skip-if to *_main.c files

* gcc.dg/compat/pr83487-1_y.c: Move dg-skip-if ...
* gcc.dg/compat/pr83487-1_main.c: ... here.
* gcc.dg/compat/struct-by-value-10_main.c,
gcc.dg/compat/struct-by-value-10_x.c,
gcc.dg/compat/struct-by-value-11_main.c,
gcc.dg/compat/struct-by-value-11_x.c,
gcc.dg/compat/struct-by-value-12_main.c,
gcc.dg/compat/struct-by-value-12_x.c,
gcc.dg/compat/struct-by-value-13_main.c,
gcc.dg/compat/struct-by-value-13_x.c,
gcc.dg/compat/struct-by-value-14_main.c,
gcc.dg/compat/struct-by-value-14_x.c,
gcc.dg/compat/struct-by-value-15_main.c,
gcc.dg/compat/struct-by-value-15_x.c,
gcc.dg/compat/struct-by-value-17_main.c,
gcc.dg/compat/struct-by-value-17_x.c,
gcc.dg/compat/struct-by-value-18_main.c,
gcc.dg/compat/struct-by-value-18_x.c,
gcc.dg/compat/struct-by-value-2_main.c,
gcc.dg/compat/struct-by-value-2_x.c,
gcc.dg/compat/struct-by-value-22_main.c,
gcc.dg/compat/struct-by-value-22_x.c,
gcc.dg/compat/struct-by-value-3_main.c,
gcc.dg/compat/struct-by-value-3_x.c,
gcc.dg/compat/struct-by-value-4_main.c,
gcc.dg/compat/struct-by-value-4_x.c,
gcc.dg/compat/struct-by-value-5b_main.c,
gcc.dg/compat/struct-by-value-5b_x.c,
gcc.dg/compat/struct-by-value-6b_main.c,
gcc.dg/compat/struct-by-value-6b_x.c,
gcc.dg/compat/struct-by-value-6b_main.c,
gcc.dg/compat/struct-by-value-7b_x.c,
gcc.dg/compat/struct-by-value-7b_main.c,
gcc.dg/compat/struct-by-value-8_main.c,
gcc.dg/compat/struct-by-value-8_x.c,
gcc.dg/compat/struct-by-value-9_main.c,
gcc.dg/compat/struct-by-value-9_x.c,
gcc.dg/compat/struct-return-2_main.c,
gcc.dg/compat/struct-return-2_x.c: Likewise.

From-SVN: r265755

6 years agors6000-string.c (expand_strncmp_gpr_sequence): Pay attention to TARGET_AVOID_XFORM...
Aaron Sawdey [Fri, 2 Nov 2018 17:02:38 +0000 (17:02 +0000)]
rs6000-string.c (expand_strncmp_gpr_sequence): Pay attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.

2018-11-02  Aaron Sawdey  <acsawdey@linux.ibm.com>

* config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.

From-SVN: r265751

6 years agoAlthough there's no fundamental reason why shrink wrapping and speculation tracking...
Richard Earnshaw [Fri, 2 Nov 2018 13:36:31 +0000 (13:36 +0000)]
Although there's no fundamental reason why shrink wrapping and speculation tracking are incompatible...

Although there's no fundamental reason why shrink wrapping and
speculation tracking are incompatible, a phase-ordering requirement
(we need to do speculation tracking before the final basic block
clean-up) means that the shrink wrapping pass can undo some of the
changes the speculation tracking pass makes.  The result is that the
tracking, while still safe is less comprehensive than we really want.

So to keep things simple, and because the tracking code is quite
expensive anyway, it seems best to just disable that pass when we are
tracking speculative execution.

 * config/aarch64/aarch64.c (aarch64_override_options): Disable
 shrink-wrapping when -mtrack-speculation.

From-SVN: r265747

6 years agotree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
Richard Biener [Fri, 2 Nov 2018 11:29:50 +0000 (11:29 +0000)]
tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.

2018-11-02  Richard Biener  <rguenther@suse.de>

* tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
(pop_cost_one_pair): Do not free pair.
(pop_best_coalesce): Likewise.
(create_coalesce_list): Initialize obstack.
(delete_coalesce_list): Free obstack.
(find_coalesce_pair): Obstack-allocate coalesce pairs.
(add_cost_one_coalesce): Likewise.
(struct live_track): Remove bitmap pointer indirections.
(new_live_track): Adjust.
(delete_live_track): Likewise.
(live_track_remove_partition): Likewise.
(live_track_add_partition): Likewise.
(live_track_live_p): Likewise.
(live_track_process_def): Likewise.
(live_track_clear_base_vars): Likewise.

From-SVN: r265745

6 years ago[C++ PATCH] refactor duplicate_decls
Nathan Sidwell [Fri, 2 Nov 2018 11:12:43 +0000 (11:12 +0000)]
[C++ PATCH] refactor duplicate_decls

https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00085.html
gcc/cp/
* decl.c (duplicate_decls): Refactor checks.
gcc/testsuite/
* g++.dg/lookup/crash6.C: Adjust error
* g++.dg/parse/crash38.C: Likewise.

From-SVN: r265744

6 years agoRemove SPARC HAVE_AS_REGISTER_PSEUDO_OP
Rainer Orth [Fri, 2 Nov 2018 08:51:04 +0000 (08:51 +0000)]
Remove SPARC HAVE_AS_REGISTER_PSEUDO_OP

* configure.ac (gcc_cv_as_sparc_register_op): Remove.
* configure: Regenerate.
* config.in: Regenerate.
* config/sparc/sparc.c (sparc_output_scratch_registers): Remove
HAVE_AS_REGISTER_PSEUDO_OP guard.
* config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
!HAVE_AS_REGISTER_PSEUDO_OP support.
(ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
guard.

From-SVN: r265743

6 years agoFix libgphobos.spec in the wrong place with --enable-version-specific-runtime-libs
Iain Buclaw [Fri, 2 Nov 2018 08:29:50 +0000 (08:29 +0000)]
Fix libgphobos.spec in the wrong place with --enable-version-specific-runtime-libs

libphobos/ChangeLog:

2018-11-01  Iain Buclaw  <ibuclaw@gdcproject.org>

PR d/87827
* Makefile.in: Rebuild.
* configure: Rebuild.
* configure.ac: Properly set MULTISUBDIR.
* d_rules.am: Set toolexecdir and toolexeclibdir.
* libdruntime/Makefile.in: Rebuild.
* m4/druntime.m4 (DRUNTIME_INSTALL_DIRECTORIES): Add
--enable-version-specific-runtime-libs.
* src/Makefile.in: Rebuild.
* testsuite/Makefile.in: Rebuild.

From-SVN: r265742

6 years ago20010904-2.c: Fix last change.
Andreas Schwab [Fri, 2 Nov 2018 08:22:59 +0000 (08:22 +0000)]
20010904-2.c: Fix last change.

* gcc.c-torture/execute/20010904-2.c: Fix last change.
* gcc.dg/Wattributes-10.c: Likewise.

From-SVN: r265741

6 years agodwarf2out.c (build_abbrev_table): Guard lookup_external_ref call with is_type_die.
Richard Biener [Fri, 2 Nov 2018 07:55:49 +0000 (07:55 +0000)]
dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call with is_type_die.

2018-11-02  Richard Biener  <rguenther@suse.de>

* dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
with is_type_die.

From-SVN: r265740

6 years agore PR tree-optimization/87776 (Compile time hog during RPO VN)
Richard Biener [Fri, 2 Nov 2018 07:53:48 +0000 (07:53 +0000)]
re PR tree-optimization/87776 (Compile time hog during RPO VN)

2018-11-02  Richard Biener  <rguenther@suse.de>

PR tree-optimization/87776
* tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
executable when iterating but running into rpo-vn-max-loop-depth
and not eliding the iteration.

* gcc.dg/torture/pr87776.c: New testcase.

From-SVN: r265739

6 years agoDaily bump.
GCC Administrator [Fri, 2 Nov 2018 00:17:14 +0000 (00:17 +0000)]
Daily bump.

From-SVN: r265738

6 years agotree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of TYPE_DECL.
Jan Hubicka [Thu, 1 Nov 2018 23:29:27 +0000 (23:29 +0000)]
tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of TYPE_DECL.

* tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
TYPE_DECL.

From-SVN: r265735

6 years agoImplement P0846R0, ADL and function templates.
Marek Polacek [Thu, 1 Nov 2018 22:10:31 +0000 (22:10 +0000)]
Implement P0846R0, ADL and function templates.

* decl.c (grokfndecl): Allow FUNCTION_DECL in assert.
* lex.c (unqualified_fn_lookup_error): Handle TEMPLATE_ID_EXPR.
* parser.c (cp_parser_postfix_expression): Do ADL for a template-name.
(cp_parser_template_id): Give errors if parsing the template argument
list didn't go well.  Allow FUNCTION_DECL in assert.
(cp_parser_template_name): Consider a name to refer to a template if
it is an unqualified-id followed by a <.  Don't return the identifier
if the decl is a function and dependent.
* pt.c (tsubst_copy) <case OVERLOAD>: Remove assert.

* g++.dg/addr_builtin-1.C: Adjust dg-error.
* g++.dg/cpp2a/fn-template1.C: New test.
* g++.dg/cpp2a/fn-template10.C: New test.
* g++.dg/cpp2a/fn-template11.C: New test.
* g++.dg/cpp2a/fn-template12.C: New test.
* g++.dg/cpp2a/fn-template13.C: New test.
* g++.dg/cpp2a/fn-template14.C: New test.
* g++.dg/cpp2a/fn-template15.C: New test.
* g++.dg/cpp2a/fn-template16.C: New test.
* g++.dg/cpp2a/fn-template2.C: New test.
* g++.dg/cpp2a/fn-template3.C: New test.
* g++.dg/cpp2a/fn-template4.C: New test.
* g++.dg/cpp2a/fn-template5.C: New test.
* g++.dg/cpp2a/fn-template6.C: New test.
* g++.dg/cpp2a/fn-template7.C: New test.
* g++.dg/cpp2a/fn-template8.C: New test.
* g++.dg/cpp2a/fn-template9.C: New test.
* g++.dg/parse/fn-template1.C: New test.
* g++.dg/parse/fn-template2.C: New test.
* g++.dg/parse/template19.C: Adjust dg-error.
* g++.dg/template/pr61745.C: Add target to dg-error.

From-SVN: r265734

6 years agors6000-protos.h (rs6000_address_for_fpconvert): Remove prototype.
Aaron Sawdey [Thu, 1 Nov 2018 20:41:08 +0000 (20:41 +0000)]
rs6000-protos.h (rs6000_address_for_fpconvert): Remove prototype.

2018-11-01  Aaron Sawdey  <acsawdey@linux.ibm.com>

* config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
prototype.
* config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
Combine with rs6000_address_for_fpconvert.
(rs6000_address_for_fpconvert): Combine with
rs6000_force_indexed_or_indirect_mem.
(rs6000_expand_vector_init): Change function call from
rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
* config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
(floatsi<mode>2_lfiwax_mem): Ditto.
(floatunssi<mode>2_lfiwzx): Ditto.
(floatunssi<mode>2_lfiwzx_mem): Ditto.
(float<QHI:mode><FP_ISA3:mode>2): Ditto.
(floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
(fix_trunc<mode>si2_stfiwx): Ditto.
(fixuns_trunc<mode>si2_stfiwx): Ditto.
(float_<mode>si2_hw): Ditto.
(floatuns_<mode>si2_hw): Ditto.
* config/rs6000/vsx.md (*vsx_extract_si): Ditto.
(vsx_splat_<mode>): Ditto.

From-SVN: r265733

6 years agore PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=)
Thomas Koenig [Thu, 1 Nov 2018 20:12:57 +0000 (20:12 +0000)]
re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=)

2017-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>

    PR fortran/54613
    * gfortran.dg/findloc_1.f90: Actually commit.
    * gfortran.dg/findloc_2.f90: Actually commit.
    * gfortran.dg/findloc_3.f90: Actually commit.
    * gfortran.dg/findloc_4.f90: Actually commit.
    * gfortran.dg/findloc_5.f90: Actually commit.
    * gfortran.dg/findloc_6.f90: Actually commit.

From-SVN: r265732

6 years agore PR fortran/87782 (runtime error: load of value 1818451807, which is not a valid...
Thomas Koenig [Thu, 1 Nov 2018 19:50:14 +0000 (19:50 +0000)]
re PR fortran/87782 (runtime error: load of value 1818451807, which is not a valid value for type 'expr_t')

2018-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/87782
* frontend-passes.c (constant_string_length): If there is a
substring with a length which cannot be reduced to a constant,
return NULL.

From-SVN: r265730

6 years agore PR fortran/40196 ([F03] [F08] Type parameter inquiry (str%len, a%kind) and Complex...
Paul Thomas [Thu, 1 Nov 2018 19:36:08 +0000 (19:36 +0000)]
re PR fortran/40196 ([F03] [F08] Type parameter inquiry (str%len, a%kind) and Complex parts (z%re, z%im))

2018-11-01  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/40196
* dependency.c (are_identical_variables): Return false if the
inquiry refs are not the same.
(gfc_ref_needs_temporary_p): Break on an inquiry ref.
* dump_parse_tree.c (show_ref): Show the inquiry ref type.
* expr.c (gfc_free_ref_list): Break on an inquiry ref.
(gfc_copy_ref): Copy the inquiry ref types.
(find_inquiry_ref): New function.
(simplify_const_ref, simplify_ref_chain): Call it. Add new arg
to simplify_ref_chain.
(gfc_simplify_expr): Use the new arg in call to
simplify_ref_chain.
(gfc_get_full_arrayspec_from_expr, gfc_is_coarray): Break on
inquiry ref.
(gfc_traverse_expr): Return true for inquiry ref.
* frontend-passes.c (gfc_expr_walker): Break on inquiry ref.
* gfortran.h : Add enums and union member in gfc_ref to
implement inquiry refs.
* intrinsic.c : Fix white nois.
* match.c (gfc_match_assignment): A constant lavlue is an
error.
* module.c : Add DECL_MIO_NAME for inquiry_type and the mstring
for inquiry_types.
(mio_ref): Handle inquiry refs.
* primary.c (is_inquiry_ref): New function.
(gfc_match_varspec): Handle inquiry refs calling new function.
(gfc_variable_attr): Detect inquiry ref for disambiguation
with components.
(caf_variable_attr): Treat inquiry and substring refs in the
same way.
* resolve.c (find_array_spec): ditto.
(gfc_resolve_substring_charlen): If there is neither a charlen
ref not an inquiry ref, return.
(resolve_ref): Handle inqiry refs as appropriate.
(resolve_allocate_expr): Entities with an inquiry ref cannot be
allocated.
* simplify.c (simplify_bound, simplify_cobound): Punt on
inquiry refs.
* trans-array.c (get_array_ctor_var_strlen): Break on inquiry
ref.
*trans-expr.c (conv_inquiry): New function.
(gfc_conv_variable): Retain the last typespec to pass to
conv_inquiry on detecting an inquiry ref.

2018-11-01  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/40196
* gfortran.dg/inquiry_part_ref_1.f08: New test.
* gfortran.dg/inquiry_part_ref_2.f90: New test.
* gfortran.dg/inquiry_part_ref_3.f90: New test.

From-SVN: r265729

6 years ago20010904-1.c: Align 2 if pdp11.
Paul Koning [Thu, 1 Nov 2018 18:59:40 +0000 (14:59 -0400)]
20010904-1.c: Align 2 if pdp11.

* gcc.c-torture/execute/20010904-1.c: Align 2 if pdp11.
* gcc.c-torture/execute/20010904-2.c: Ditto.
* c-c++-common/builtin-arith-overflow-2.c: Skip if pdp11.
* gcc.dg/Walloc-size-larger-than-4.c: Ditto.
* gcc.dg/Walloc-size-larger-than-5.c: Ditto.
* gcc.dg/Walloc-size-larger-than-6.c: Ditto.
* gcc.dg/Walloc-size-larger-than-7.c: Ditto.
* gcc.dg/Walloca-14.c: Ditto.
* gcc.dg/Wlarger-than3.c: Ditto.
* gcc.dg/compat/pr83487-1_y.c: Ditto.
* gcc.dg/compat/struct-by-value-2_x.c: Ditto.
* gcc.dg/compat/struct-by-value-3_x.c: Ditto.
* gcc.dg/compat/struct-by-value-4_x.c: Ditto.
* gcc.dg/compat/struct-by-value-5b_x.c: Ditto.
* gcc.dg/compat/struct-by-value-6b_x.c: Ditto.
* gcc.dg/compat/struct-by-value-7b_x.c: Ditto.
* gcc.dg/compat/struct-by-value-8_x.c: Ditto.
* gcc.dg/compat/struct-by-value-9_x.c: Ditto.
* gcc.dg/compat/struct-by-value-10_x.c: Ditto.
* gcc.dg/compat/struct-by-value-11_x.c: Ditto.
* gcc.dg/compat/struct-by-value-12_x.c: Ditto.
* gcc.dg/compat/struct-by-value-13_x.c: Ditto.
* gcc.dg/compat/struct-by-value-14_x.c: Ditto.
* gcc.dg/compat/struct-by-value-15_x.c: Ditto.
* gcc.dg/compat/struct-by-value-16_x.c: Ditto.
* gcc.dg/compat/struct-by-value-17_x.c: Ditto.
* gcc.dg/compat/struct-by-value-18_x.c: Ditto.
* gcc.dg/compat/struct-by-value-22_x.c: Ditto.
* gcc.dg/compat/struct-return-2_x.c: Ditto.
* gcc.dg/falign-labels-1.c: Ditto.
* gcc.dg/long_branch.c: Ditto.
* gcc.dg/nextafter-1.c: Ditto.
* gcc.dg/pr35045.c: Ditto.
* gcc.dg/pr48616.c: Ditto.
* gcc.dg/pr84100.c: Ditto.
* gcc.dg/tree-ssa/builtin-sprintf-9.c: Ditto.
* gcc.dg/tree-ssa/builtin-sprintf-warn-10.c: Ditto.
* gcc.dg/tree-ssa/builtin-sprintf.c: Ditto.
* gcc.dg/Wattributes-10.c: Expect error if pdp11.
* gcc.dg/attr-alloc_size-11.c: Don't XFAIL if pdp11.
* gcc.dg/builtin-inf-1.c: Add pdp11 to warnings about INF.
* gcc.dg/builtins-1.c: Ditto.

From-SVN: r265728

6 years agore PR fortran/46020 (Improve error string for BIND(C) diagnostic for len>1 character...
Thomas Koenig [Thu, 1 Nov 2018 18:41:28 +0000 (18:41 +0000)]
re PR fortran/46020 (Improve error string for BIND(C) diagnostic for len>1 character return type)

2018-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>

    PR fortran/46020
    * gfortran.dg/bind_c_18.f90: Adjust error message.

From-SVN: r265727

6 years agot-pdp11 (LIB2ADD): Add divmod.c.
Paul Koning [Thu, 1 Nov 2018 18:36:52 +0000 (14:36 -0400)]
t-pdp11 (LIB2ADD): Add divmod.c.

* config/pdp11/t-pdp11 (LIB2ADD): Add divmod.c.
(HOST_LIBGCC2_CFLAGS): Change to optimize for size.

From-SVN: r265726

6 years ago* g++.dg/cpp1z/constexpr-lambda22.C: New test,
Marek Polacek [Thu, 1 Nov 2018 18:29:44 +0000 (18:29 +0000)]
* g++.dg/cpp1z/constexpr-lambda22.C: New test,

From-SVN: r265725

6 years agoAvoid stray [] in ia64 assembler test.
Joseph Myers [Thu, 1 Nov 2018 17:05:17 +0000 (17:05 +0000)]
Avoid stray [] in ia64 assembler test.

Noted in <https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00034.html>.
Fix by adding extra newline in test input is analogous to many such
newlines added in cases where argument to a newly added AC_LANG_SOURCE
had a preprocessor directive on its last line.

* configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
at end of assembler input text.
* configure: Regenerate.

From-SVN: r265724

6 years agocunroll-13.c: Add missing cast from literal to int32.
Jozef Lawrynowicz [Thu, 1 Nov 2018 17:02:48 +0000 (17:02 +0000)]
cunroll-13.c: Add missing cast from literal to int32.

2018-11-01  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

* gcc.dg/tree-ssa/cunroll-13.c: Add missing cast from literal to int32.

From-SVN: r265723

6 years agotree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of TYPE_DECL.
Jan Hubicka [Thu, 1 Nov 2018 13:03:28 +0000 (14:03 +0100)]
tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of TYPE_DECL.

* tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
TYPE_DECL.

* g++.dg/lto/pr84805_1.C: Update template.
* g++.dg/lto/pr84805_0.C: Update template.
* g++.dg/lto/pr84805_1b.C: Update template.
* g++.dg/lto/pr84805_0b.C: Update template.

From-SVN: r265722

6 years agore PR tree-optimization/87826 (ubsan: gimple-ssa-store-merging.c:281)
Jakub Jelinek [Thu, 1 Nov 2018 12:31:45 +0000 (13:31 +0100)]
re PR tree-optimization/87826 (ubsan: gimple-ssa-store-merging.c:281)

PR tree-optimization/87826
* gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
negative or larger or equal to type's precision.

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

From-SVN: r265720

6 years agore PR fortran/46020 (Improve error string for BIND(C) diagnostic for len>1 character...
Thomas Koenig [Thu, 1 Nov 2018 12:00:59 +0000 (12:00 +0000)]
re PR fortran/46020 (Improve error string for BIND(C) diagnostic for len>1 character return type)

2018-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/46020
* decl.c (verify_bind_c_sym): Improve error message.

From-SVN: r265719

6 years agore PR fortran/46020 (Improve error string for BIND(C) diagnostic for len>1 character...
Thomas Koenig [Thu, 1 Nov 2018 11:56:26 +0000 (11:56 +0000)]
re PR fortran/46020 (Improve error string for BIND(C) diagnostic for len>1 character return type)

2018-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>

    PR fortran/46020
    * gfortran.dg/bind_c_usage_32.f90: Really commit.

From-SVN: r265717

6 years agore PR fortran/46020 (Improve error string for BIND(C) diagnostic for len>1 character...
Thomas Koenig [Thu, 1 Nov 2018 11:55:43 +0000 (11:55 +0000)]
re PR fortran/46020 (Improve error string for BIND(C) diagnostic for len>1 character return type)

2018-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>

    PR fortran/46020
    * gfortran.dg/bind_c_usage_7.f90: Adjust error message.
    * gfortran.dg/bind_c_usage_32.f90: New test.

From-SVN: r265716

6 years agore PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=)
Thomas Koenig [Thu, 1 Nov 2018 11:37:08 +0000 (11:37 +0000)]
re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=)

2018-10-28  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/54613
* gfortran.texi (File format of unformatted sequential files):
Replace random comma with period.
* intrinsic.texi (Intrinsic Procedures): Add FINDLOC to menu.
(FINDLOC): Document.
(MAXLOC): Add refrence to FINDLOC.
(MINLOC): Likewise.

From-SVN: r265715

6 years ago[ABI PATCH] static anonymous unions of function scope
Nathan Sidwell [Thu, 1 Nov 2018 11:18:06 +0000 (11:18 +0000)]
[ABI PATCH] static anonymous unions of function scope

https://gcc.gnu.org/ml/gcc-patches/2018-10/msg02076.html
* cp-tree.h (struct lang_function): Delete x_local_names field.
(struct lang_decl_base): Rename u2sel to spare.
(struct lang_decl_min): Remove lang_decl_u2 union.  Keep access
field.
(LANG_DECL_U2_CHECK): Delete.
(DECL_DISCRIMINATOR_P): Require function scope.
(DECL_DISCRIMINATOR): Adjust.
(DECL_DISCRIMINATOR_SET_P): Delete.
(DECL_CAPTURED_VARIABLE, DECL_ACCESS, THUnK_VIRTUAL_OFFSET): Adjust.
(local_classes): Don't declare.
(determine_local_discriminator): Declare.
* decl.c (push_local_name): Delete.
(local_entities, determina_local_discrminator): New.
(duplicate_decls): Copy DECL_ACCESS. Fix formatting.
(cp_finish_decl): Use determine_local_discriminator.
(save_function_data): Drop x_local_names.
(finish_function): Drop local_names.
* decl2.c (finish_anon_union): Use determine_local_disciminator.
* mangle.c (write_unnamed_type_name): Use
discriminator_for_local_entity.
(local_class_index): Delete.
(discriminator_for_local_entity): Reimplement.
(write_local_name): Adjust discriminator code.
* name-lookup.c (do_pushtag): Call determine_local_discrimiator.
* semantics.c (finish_omp_threadprivate): Drop DECL_DISCRIMINATOR
handling.
* class.c (local_classes): Delete.
(init_class_processing): Don't init it.

* g++.dg/abi/anon5.C: New.

From-SVN: r265714

6 years agore PR d/87824 (x86_64-linux multilib issues)
Jakub Jelinek [Thu, 1 Nov 2018 11:14:08 +0000 (12:14 +0100)]
re PR d/87824 (x86_64-linux multilib issues)

PR d/87824
* lang.opt (Wpsabi): New option.

* gdc.dg/simd.d: Add -Wno-psabi.
* gdc.dg/compilable.d: Likewise.

From-SVN: r265713

6 years agoMake __PRETTY_FUNCTION__-like functions mergeable string csts (PR c++/64266).
Martin Liska [Thu, 1 Nov 2018 09:19:31 +0000 (10:19 +0100)]
Make __PRETTY_FUNCTION__-like functions mergeable string csts (PR c++/64266).

2018-11-01  Martin Liska  <mliska@suse.cz>
    Jason Merrill  <jason@redhat.com>

PR c++/64266
PR bootstrap/70422
PR ipa/81277
* cp-tree.h (DECL_FNAME_P): New macro.
* decl.c (cp_make_fname_decl): Set DECL_DECLARED_CONSTEXPR_P,
        DECL_VALUE_EXPR, DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
(cp_finish_decl):
* lambda.c (is_capture_proxy): Use DECL_FNAME_P.
* pt.c (tsubst_expr): Handle DECL_PRETTY_FUNCTION_P.
2018-11-01  Martin Liska  <mliska@suse.cz>
    Jason Merrill  <jason@redhat.com>

PR c++/64266
PR bootstrap/70422
PR ipa/81277
* g++.dg/cpp0x/constexpr-__func__2.C: Make it a compilation
test.
* g++.old-deja/g++.ext/pretty4.C: Remove as the run-time
assumptions are not longer valid.

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

6 years agogo-gcc.cc (Gcc_backend::write_global_definitions): Don't call gimplify_function_tree.
Ian Lance Taylor [Thu, 1 Nov 2018 04:21:16 +0000 (04:21 +0000)]
go-gcc.cc (Gcc_backend::write_global_definitions): Don't call gimplify_function_tree.

* go-gcc.cc (Gcc_backend::write_global_definitions): Don't call
gimplify_function_tree.  Instead call allocate_struct_function if
necessary.

From-SVN: r265710

6 years agoFix typo in gcc/ChangeLog
Alexandre Oliva [Thu, 1 Nov 2018 01:23:20 +0000 (01:23 +0000)]
Fix typo in gcc/ChangeLog

From-SVN: r265709

6 years agogOlogy: skip dbranch at -Og
Alexandre Oliva [Thu, 1 Nov 2018 01:23:08 +0000 (01:23 +0000)]
gOlogy: skip dbranch at -Og

Delayed slot filling moves insns without any regard to variable
location notes, causing the location information in them to become
incorrect.

Fixing that appears to be quite difficult, but filling delay slots is
hardly an essential optimization to run at -Og, so if the user wants
to privilege debuggability, skip delay slot filling.

for  gcc/ChangeLog

* opts.c (default_options_table): Do not enable
OPT_fdelayed_branch at -Og.
* doc/invoke.texi (-fdelayed-branch): Document it.

From-SVN: r265708

6 years agoDaily bump.
GCC Administrator [Thu, 1 Nov 2018 00:17:19 +0000 (00:17 +0000)]
Daily bump.

From-SVN: r265707

6 years agoAdd visibility to libfunc constructors
Richard Henderson [Wed, 31 Oct 2018 23:12:14 +0000 (23:12 +0000)]
Add visibility to libfunc constructors

* optabs-libfuncs.c (build_libfunc_function_visibility):
New, split out from...
(build_libfunc_function): ... here.
(init_one_libfunc_visibility): New, split out from ...
(init_one_libfunc): ... here.

From-SVN: r265704

6 years agoaarch64: Remove early clobber from ATOMIC_LDOP scratch
Richard Henderson [Wed, 31 Oct 2018 23:11:22 +0000 (23:11 +0000)]
aarch64: Remove early clobber from ATOMIC_LDOP scratch

* config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
The scratch register need not be early-clobber.  Document the reason
why we cannot use ST<OP>.

From-SVN: r265703

6 years agoFix profiledbootstrap when D is enabled
Iain Buclaw [Wed, 31 Oct 2018 21:48:52 +0000 (21:48 +0000)]
Fix profiledbootstrap when D is enabled

gcc/d/ChangeLog:

2018-10-31  Iain Buclaw  <ibuclaw@gdcproject.org>

PR d/87825
* Make-lang.in (d/idgen) Link with BUILD_LINKERFLAGS.
(d/impcvgen): Likewise.

From-SVN: r265702

6 years agore PR bootstrap/82856 (--enable-maintainter-mode broken by incompatiblity of gcc...
Ian Lance Taylor [Wed, 31 Oct 2018 20:46:17 +0000 (20:46 +0000)]
re PR bootstrap/82856 (--enable-maintainter-mode broken by incompatiblity of gcc's required automake and modern Perl)

PR bootstrap/82856

    libgo: update to autoconf 2.69 and automake 1.15.1

    Initial patch from Joseph Myers.

    Reviewed-on: https://go-review.googlesource.com/c/146417

From-SVN: r265701

6 years agore PR fortran/20520 (allocatable arrays used uninitialized without a warning)
Thomas Koenig [Wed, 31 Oct 2018 18:35:59 +0000 (18:35 +0000)]
re PR fortran/20520 (allocatable arrays used uninitialized without a warning)

2018-10-31  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/20520
* gfortran.dg/allocatable_uninitialized_1.f90: New test.

From-SVN: r265698

6 years ago[C++ PATCH] missed testcase
Nathan Sidwell [Wed, 31 Oct 2018 17:33:59 +0000 (17:33 +0000)]
[C++ PATCH] missed testcase

https://gcc.gnu.org/ml/gcc-patches/2018-10/msg02065.html
* g++.dg/lookup/friend21.C: New.

From-SVN: r265697

6 years ago[PATCH] command line macros
Nathan Sidwell [Wed, 31 Oct 2018 17:12:27 +0000 (17:12 +0000)]
[PATCH] command line macros

https://gcc.gnu.org/ml/gcc-patches/2018-10/msg02062.html
* c-opts.c (c_finish_options): Force command line macro
location.  Refactor to avoid repeating main debug hook.
(push_command_line_include): Clarify comment.

From-SVN: r265696

6 years agoUpdate GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856).
Joseph Myers [Wed, 31 Oct 2018 17:03:16 +0000 (17:03 +0000)]
Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856).

This patch updates GCC to use autoconf 2.69 and automake 1.15.1.
(That's not the latest automake version, but it's the one used by
binutils-gdb, with which consistency is desirable, and in any case
seems a useful incremental update that should make a future update to
1.16.1 easier.)

The changes are generally similar to the binutils-gdb ones, and are
copied from there where shared files and directories are involved
(there are some further changes to such shared directories, however,
which I'd expect to apply to binutils-gdb once this patch is in GCC).
Largely, obsolete AC_PREREQ calls are removed, while many
AC_LANG_SOURCE calls are added to avoid warnings from aclocal and
autoconf.  Multilib support is no longer included in core automake,
meaning that multilib.am needs copying from automake's contrib
directory into the GCC source tree.  Autoconf 2.69 has Go support, so
local copies of that support are removed.  I hope the D support will
soon be submitted to upstream autoconf so the local copy of that can
be removed in a future update.  Changes to how automake generates
runtest calls mean quotes are removed from RUNTEST definitions in five
lib*/testsuite/Makefile.am files (libatomic, libgomp, libitm,
libphobos, libvtv; some others have RUNTEST definitions without
quotes, which are still OK); libgo and libphobos also get
-Wno-override added to AM_INIT_AUTOMAKE so those overrides of RUNTEST
do not generate automake warnings.

Note that the regeneration did not include regeneration of
fixincludes/config.h.in (attempting such regeneration resulted in all
the USED_FOR_TARGET conditionals disappearing; and I don't see
anything in the fixincludes/ directory that would result in such
conditionals being generated, unlike in the gcc/ directory).  Also
note that libvtv/testsuite/other-tests/Makefile.in was not
regenerated; that directory is not listed as a subdirectory for which
Makefile.in gets regenerated by calling "automake" in libvtv/, so I'm
not sure how it's meant to be regenerated.

While I mostly fixed warnings should running aclocal / automake /
autoconf, there were various such warnings from automake in the
libgfortran, libgo, libgomp, liboffloadmic, libsanitizer, libphobos
directories that I did not fix, preferring to leave those to the
relevant subsystem maintainers.  Specifically, most of those warnings
were of the following form (example from libgfortran):

Makefile.am:48: warning: source file 'caf/single.c' is in a subdirectory,
Makefile.am:48: but option 'subdir-objects' is disabled
automake: warning: possible forward-incompatibility.
automake: At least a source file is in a subdirectory, but the 'subdir-objects'
automake: automake option hasn't been enabled.  For now, the corresponding output
automake: object file(s) will be placed in the top-level directory.  However,
automake: this behaviour will change in future Automake versions: they
will
automake: unconditionally cause object files to be placed in the same subdirectory
automake: of the corresponding sources.
automake: You are advised to start using 'subdir-objects' option throughout your
automake: project, to avoid future incompatibilities.

I think it's best for the relevant maintainers to add subdir-objects
and do any other associated Makefile.am changes needed.  In some cases
the paths in the warnings involved ../; I don't know if that adds any
extra complications to the use of subdir-objects.

I've tested this with native, cross and Canadian cross builds.  The
risk of any OS-specific issues should I hope be rather lower than if a
libtool upgrade were included (we *should* do such an upgrade at some
point, but it's more complicated - it involves identifying all our
local libtool changes to see if any aren't included in the upstream
version we update to, and reverting an upstream libtool patch that's
inappropriate for use in GCC); I think it would be better to get this
update into GCC so that people can test in different configurations
and we can fix any issues found, rather than to try to get more and
more testing done before it goes in.

top level:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
* multilib.am: New file.  From automake.

Merge from binutils-gdb:
2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>

* libtool.m4: Use AC_LANG_SOURCE.
* configure.ac: Remove AC_PREREQ, use AC_LANG_SOURCE.
* ar-lib: New file.
* test-driver: New file.
* configure: Re-generate.

config:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
* math.m4, tls.m4: Use AC_LANG_SOURCE.

Merge from binutils-gdb:
2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>

* override.m4 (_GCC_AUTOCONF_VERSION): Bump from 2.64 to 2.69.

fixincludes:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
* configure.ac: Remove AC_PREREQ.
* aclocal.m4, configure: Regenerate.

gcc:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.  Use single
line for second argument of AC_DEFINE_UNQUOTED.
* doc/install.texi (Tools/packages necessary for modifying GCC):
Update to autoconf 2.69 and automake 1.15.1.
* aclocal.m4, config.in, configure: Regenerate.

gnattools:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
* configure.ac: Remove AC_PREREQ.
* configure: Regenerate.

gotools:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
* config/go.m4: Remove file.
* Makefile.am (ACLOCAL_AMFLAGS): Do not use -I ./config.
* configure.ac:  Remove AC_PREREQ.  Do not include config/go.m4.
* Makefile.in, aclocal.m4, configure: Regenerate.

intl:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
Merge from binutils-gdb:
2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>

* configure.ac: Add AC_USE_SYSTEM_EXTENSIONS, remove AC_PREREQ.
* configure: Re-generate.
* config.h.in: Re-generate.
* aclocal.m4: Re-generate.

libada:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
* configure.ac: Remove AC_PREREQ.
* configure: Regenerate.

libatomic:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
* Makefile.am: Include multilib.am.
* acinclude.m4: Use AC_LANG_SOURCE.
* configure.ac: Remove AC_PREREQ.
* testsuite/Makefile.am (RUNTEST): Remove quotes.
* Makefile.in, aclocal.m4, configure, testsuite/Makefile.in:
Regenerate.

libbacktrace:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
* Makefile.am: Include multilib.am.
* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
* Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.

libcc1:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
* configure.ac: Remove AC_PREREQ.
* Makefile.in, aclocal.m4, configure: Regenerate.

libcpp:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
* aclocal.m4, config.in, configure: Regenerate.

libdecnumber:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
Merge from binutils-gdb:
2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>

* configure.ac: Remove AC_PREREQ.
* configure: Re-generate.
* aclocal.m4.

libffi:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
* Makefile.am: Include multilib.am.
(AUTOMAKE_OPTIONS): Add info-in-builddir.
(CLEANFILES): Remove doc/libffi.info.
* configure.ac: Remove AC_PREREQ.
* Makefile.in, aclocal.m4, configure, fficonfig.h.in,
include/Makefile.in, man/Makefile.in, testsuite/Makefile.in:
Regenerate.

libgcc:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
* configure: Regenerate.

libgfortran:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
* Makefile.am: Include multilib.am.
* configure.ac: Remove AC_PREREQ.
* Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.

libgo [logically part of this change but omitted from the commit]:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
* Makefile.am: Include multilib.am.
* config/go.m4: Remove file.
* config/libtool.m4: Use AC_LANG_SOURCE.
* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.  Use
-Wno-override in AM_INIT_AUTOMAKE call.
* Makefile.in, aclocal.m4, configure, testsuite/Makefile.in:
Regenerate.

libgomp:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
* Makefile.am: Include multilib.am
(AUTOMAKE_OPTIONS): Add info-in-builddir.
(CLEANFILES): Remove libgomp.info.
* configure.ac: Remove AC_PREREQ.
* testsuite/Makefile.am (RUNTEST): Remove quotes.
* Makefile.in, aclocal.m4, configure, testsuite/Makefile.in:
Regenerate.

libhsail-rt:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
* configure.ac: Remove AC_PREREQ.
* Makefile.in, aclocal.m4, configure: Regenerate.

libiberty:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
Merge from binutils-gdb:
2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>

* configure.ac: Remove AC_PREREQ.
* configure: Re-generate.
* config.in: Re-generate.

libitm:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
* Makefile.am: Include multilib.am.
(AUTOMAKE_OPTIONS): Add info-in-builddir.
(CLEANFILES): Remove libitm.info.
* configure.ac: Remove AC_PREREQ.
* testsuite/Makefile.am (RUNTEST): Remove quotes.
* Makefile.in, aclocal.m4, configure, testsuite/Makefile.in:
Regenerate.

libobjc:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
* configure.ac: Remove AC_PREREQ.
* aclocal.m4, config.h.in, configure: Regenerate.

liboffloadmic:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
* Makefile.am: Include multilib.am.
* configure.ac: Remove AC_PREREQ.
* plugin/Makefile.am: Include multilib.am.
* plugin/configure.ac: Remove AC_PREREQ.
* Makefile.in, aclocal.m4, configure, plugin/Makefile.in,
plugin/aclocal.m4, plugin/configure: Regenerate.

libphobos:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
* Makefile.am: Include multilib.am.
* configure.ac: Remove AC_PREREQ.  Use -Wno-override in
AM_INIT_AUTOMAKE call.
* m4/autoconf.m4: Add extra argument to AC_LANG_DEFINE call.
* m4/druntime/os.m4: Use AC_LANG_SOURCE.
* testsuite/Makefile.am (RUNTEST): Remove quotes.
* Makefile.in, aclocal.m4, configure, libdruntime/Makefile.in,
src/Makefile.in, testsuite/Makefile.in: Regenerate.

libquadmath:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
* Makefile.am: Include multilib.am.
(AUTOMAKE_OPTIONS): Remove 1.8.  Add info-in-builddir.
(all-local): Define outside conditional code.
(CLEANFILES): Remove libquadmath.info.
* configure.ac: Remove AC_PREREQ.
* Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.

libsanitizer:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
* Makefile.am: Include multilib.am.
* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
* Makefile.in, aclocal.m4, asan/Makefile.in, configure,
interception/Makefile.in, libbacktrace/Makefile.in,
lsan/Makefile.in, sanitizer_common/Makefile.in, tsan/Makefile.in,
ubsan/Makefile.in: Regenerate.

libssp:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
* Makefile.am: Include multilib.am.
(AUTOMAKE_OPTIONS): Remove 1.9.5.
* configure.ac: Remove AC_PREREQ.  Quote argument to
AC_RUN_IFELSE.
* Makefile.in, aclocal.m4, configure: Regenerate.

libstdc++-v3:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
* Makefile.am: Include multilib.am.
* configure.ac: Remove AC_PREREQ.
* Makefile.in, aclocal.m4, configure, doc/Makefile.in,
include/Makefile.in, libsupc++/Makefile.in, po/Makefile.in,
python/Makefile.in, src/Makefile.in, src/c++11/Makefile.in,
src/c++17/Makefile.in, src/c++98/Makefile.in,
src/filesystem/Makefile.in, testsuite/Makefile.in: Regenerate.

libvtv:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
* Makefile.am: Include multilib.am.
* configure.ac: Remove AC_PREREQ.
* testsuite/Makefile.am (RUNTEST): Remove quotes.
* Makefile.in, aclocal.m4, configure, testsuite/Makefile.in:
Regenerate.

lto-plugin:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
* Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.

zlib:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

PR bootstrap/82856
* Makefile.am: Include multilib.am.

Merge from binutils-gdb:
2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>

* configure.ac: Modernize AC_INIT call, remove AC_PREREQ.
* Makefile.am (AUTOMAKE_OPTIONS): Remove 1.8, cygnus, add foreign.
* Makefile.in: Re-generate.
* aclocal.m4: Re-generate.
* configure: Re-generate.

From-SVN: r265695

6 years agotree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead initialization.
Pat Haugen [Wed, 31 Oct 2018 15:30:48 +0000 (15:30 +0000)]
tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead initialization.

* tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
initialization.

From-SVN: r265693

6 years ago[6/6] Preprocessor forced macro location
Nathan Sidwell [Wed, 31 Oct 2018 15:26:28 +0000 (15:26 +0000)]
[6/6] Preprocessor forced macro location

https://gcc.gnu.org/ml/gcc-patches/2018-10/msg02044.html
libcpp/
* internal.h (struct cpp_reader): Rename forced_token_location_p
to forced_token_location and drop its pointerness.
* include/cpplib.h (cpp_force_token_locations): Take location, not
pointer to one.
* init.c (cpp_create_reader): Adjust.
* lex.c (cpp_read_main_file):

gcc/c-family/
* c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.

gcc/fortran/
* cpp.c (gfc_cpp_init): Adjust cpp_force_token_locations call.

From-SVN: r265692

6 years agoAdd myself to MAINTAINERS
Michael Ploujnikov [Wed, 31 Oct 2018 15:16:31 +0000 (15:16 +0000)]
Add myself to MAINTAINERS

ChangeLog:

2018-10-31  Michael Ploujnikov  <michael.ploujnikov@oracle.com>

* MAINTAINERS (Write After Approval): Add myself.

From-SVN: r265691

6 years ago[5/6] Preprocessor include
Nathan Sidwell [Wed, 31 Oct 2018 15:03:04 +0000 (15:03 +0000)]
[5/6] Preprocessor include

https://gcc.gnu.org/ml/gcc-patches/2018-10/msg02041.html
* directives.c (do_include_common): Commonize cleanup path.
(_cpp_pop_buffer): Fix leak.

From-SVN: r265690

6 years ago[4/7] Preprocessor location-kind predicates
Nathan Sidwell [Wed, 31 Oct 2018 14:57:13 +0000 (14:57 +0000)]
[4/7] Preprocessor location-kind predicates

https://gcc.gnu.org/ml/gcc-patches/2018-10/msg02040.html
* include/line-map.h (IS_ORDINARY_LOC, IS_MACRO_LOC): New
predicates.
(IS_ADHOC_LOC): Move earlier.
(MAP_ORDINARY_P): Use IS_ORDINARY_LOC.
* line-map.c (linemap_location_from_macro_expansion_p): Use
IS_MACRO_LOC.

From-SVN: r265689

6 years ago[3/7] Preprocessor macro loc
Nathan Sidwell [Wed, 31 Oct 2018 14:51:54 +0000 (14:51 +0000)]
[3/7] Preprocessor macro loc

https://gcc.gnu.org/ml/gcc-patches/2018-10/msg02039.html
* include/cpplib.h (cpp_macro_definition_location): Make inline.
* macro.c (warn_of_redefinition): Fix comments, examine macro
type, use C++ for.
(cpp_macro_definition_location): Don't define here.

From-SVN: r265688

6 years ago[2/7] Preprocessor node access
Nathan Sidwell [Wed, 31 Oct 2018 14:46:39 +0000 (14:46 +0000)]
[2/7] Preprocessor node access

https://gcc.gnu.org/ml/gcc-patches/2018-10/msg02038.html
* include/cpplib.h (HT_NODE): Don't cast NODE.
(NODE_LEN, NODE_NAME): Use HT_NODE.

From-SVN: r265687

6 years agoProvide extension hint for aarch64 target (PR driver/83193).
Martin Liska [Wed, 31 Oct 2018 14:46:17 +0000 (15:46 +0100)]
Provide extension hint for aarch64 target (PR driver/83193).

2018-10-31  Martin Liska  <mliska@suse.cz>

PR driver/83193
* common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
Add new argument invalid_extension.
(aarch64_get_all_extension_candidates): New function.
(aarch64_rewrite_selected_cpu): Add NULL to function call.
* config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
new argument.
(aarch64_get_all_extension_candidates): New function.
* config/aarch64/aarch64.c (aarch64_parse_arch): Add new
argument invalid_extension.
(aarch64_parse_cpu): Likewise.
(aarch64_print_hint_for_extensions): New function.
(aarch64_validate_mcpu): Provide hint about invalid extension.
(aarch64_validate_march): Likewise.
(aarch64_handle_attr_arch): Pass new argument.
(aarch64_handle_attr_cpu): Provide hint about invalid extension.
(aarch64_handle_attr_isa_flags): Likewise.
2018-10-31  Martin Liska  <mliska@suse.cz>

PR driver/83193
* gcc.target/aarch64/spellcheck_7.c: New test.
* gcc.target/aarch64/spellcheck_8.c: New test.
* gcc.target/aarch64/spellcheck_9.c: New test.

From-SVN: r265686

6 years ago[1/7] Preprocessor cleanup
Nathan Sidwell [Wed, 31 Oct 2018 14:41:35 +0000 (14:41 +0000)]
[1/7] Preprocessor cleanup

https://gcc.gnu.org/ml/gcc-patches/2018-10/msg02037.html
* directives.c (DIRECTIVE_TABLE): Drop historical frequency
comments.
* files.c (_cpp_stack_file): Fix indentation.

From-SVN: r265685

6 years agoMore testing for std::pair layout change
Jonathan Wakely [Wed, 31 Oct 2018 12:58:45 +0000 (12:58 +0000)]
More testing for std::pair layout change

* testsuite/20_util/pair/87822.cc: Test deeper nesting.

From-SVN: r265680

6 years ago[C++ PATCH] Simplify overloads
Nathan Sidwell [Wed, 31 Oct 2018 12:42:35 +0000 (12:42 +0000)]
[C++ PATCH] Simplify overloads

https://gcc.gnu.org/ml/gcc-patches/2018-10/msg02026.html
gcc/cp/
* cp-tree.h (OVL_DEDUP_P): New.
* name-lookup.c (name_lookup::add_overload): Check OVL_DEDUP_P.
(get_class_binding_direct): Likwise.
* tree.c (ovl_make): Propagate OVL_DEDUP_P.
(ovl_copy): Copy it.
(ovl_insert): Do not keep using-decls ordered.
(lookup_maybe_add): Adjust comment.

gcc/testsuite/
* g++.dg/lookup/using60.C: New.

From-SVN: r265679

6 years agoPR libstdc++/87822 fix layout change for nested std::pair
Jonathan Wakely [Wed, 31 Oct 2018 12:29:02 +0000 (12:29 +0000)]
PR libstdc++/87822 fix layout change for nested std::pair

The introduction of the empty __pair_base base class for PR 86751
changed the layout of std::pair<std::pair<...>, ...>. The outer pair and
its first member both have a base class of the same type, which cannot
exist at the same address. This causes the first member to be at a
non-zero offset.

The solution is to make the base class depend on the template
parameters, so that each pair type has a different base class type,
which allows the base classes of the outer pair and its first member to
have the same address.

PR libstdc++/87822
* include/bits/stl_pair.h (__pair_base): Change to class template.
(pair): Make base class type depend on template parameters.
* testsuite/20_util/pair/87822.cc: New test.

From-SVN: r265678

6 years agore PR middle-end/70359 (Code size increase for x86/ARM/others compared to gcc-5.3.0)
Richard Biener [Wed, 31 Oct 2018 11:57:33 +0000 (11:57 +0000)]
re PR middle-end/70359 (Code size increase for x86/ARM/others compared to gcc-5.3.0)

2018-10-31  Richard Biener  <rguenther@suse.de>

PR middle-end/70359
PR middle-end/86270
* tree-outof-ssa.c (insert_backedge_copies): Restrict
copy generation to useful cases.  Place the copy before
the definition of the backedge value when possible.

* gcc.target/i386/pr70359.c: New testcase.
* gcc.target/i386/pr86270.c: Likewise.

From-SVN: r265677

6 years ago[ARC] Handle store cacheline hazard.
Claudiu Zissulescu [Wed, 31 Oct 2018 11:27:46 +0000 (12:27 +0100)]
[ARC] Handle store cacheline hazard.

Handle store cacheline hazard for A700 cpus by inserting two NOP_S
between ST ST LD or their logical equivalent (like ST ST NOP_S NOP_S
J_L.D LD)

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

        * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
        * config/arc/arc.c (arc_active_insn): New function.
        (check_store_cacheline_hazard): Likewise.
        (workaround_arc_anomaly): Use check_store_cacheline_hazard.
        (arc_override_options): Disable delay slot scheduler for older
        A7.
        (arc_store_addr_hazard_p): New implementation, old one renamed to
        ...
        (arc_store_addr_hazard_internal_p): Renamed.
        (arc_reorg): Don't combine into brcc instructions which are part
        of hardware hazard solution.
        * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
        (tune_arc700): Likewise.
        * config/arc/arc.opt (arc7xx): New tune value.
        * config/arc/arc700.md: Improve A7 scheduler.

From-SVN: r265676

6 years ago[ARC] Add BI/BIH instruction support.
Claudiu Zissulescu [Wed, 31 Oct 2018 11:27:35 +0000 (12:27 +0100)]
[ARC] Add BI/BIH instruction support.

Use BI/BIH instruction to implement casesi pattern. Only ARC V2.

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

        * config/arc/arc.c (arc_override_options): Remove
        TARGET_COMPACT_CASESI.
        * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
        (CASE_VECTOR_MODE): Likewise.
        (CASE_VECTOR_PC_RELATIVE): Likewise.
        (CASE_VECTOR_SHORTEN_MODE): Likewise.
        (CASE_VECTOR_SHORTEN_MODE1): Delete.
        (ADDR_VEC_ALIGN): Update.
        (ASM_OUTPUT_CASE_LABEL): Undefine.
        (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
        (TARGET_BI_BIH): Define.
        (DEFAULT_BRANCH_INDEX): Likewise.
        * config/arc/arc.md (casesi): Rework to accept BI/BIH
        instructions, remove compact_casesi use case.
        (casesi_compact_jump): Remove.
        (casesi_dispatch): New pattern.
        * config/arc/arc.opt: Add mbranch-index option. Deprecate
        compact_casesi option.
        * doc/invoke.texi: Document mbranch-index option.

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

        * gcc.target/arc/jumptable.c: New test.

From-SVN: r265675

6 years ago[ARC] Cleanup TLS implementation and add a number of tests.
Claudiu Zissulescu [Wed, 31 Oct 2018 11:27:19 +0000 (12:27 +0100)]
[ARC] Cleanup TLS implementation and add a number of tests.

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

* config/arc/arc.c (arc_get_tp): Remove function.
(arc_emit_call_tls_get_addr): Likewise.
(arc_call_tls_get_addr): New function.
(arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
* config/arc/arc.md (tls_load_tp_soft): Remove.
(tls_gd_get_addr): Likewise.

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

* gcc.target/arc/tls-gd.c: New file.
* gcc.target/arc/tls-ie.c: Likewise.
* gcc.target/arc/tls-ld.c: Likewise.
* gcc.target/arc/tls-le.c: Likewise.
* gcc.target/arc/tls-1.c: Update test.

From-SVN: r265674

6 years agoUpdate LOCAL_PATCHES after libsanitizer merge.
Martin Liska [Wed, 31 Oct 2018 11:27:16 +0000 (12:27 +0100)]
Update LOCAL_PATCHES after libsanitizer merge.

2018-10-31  Martin Liska  <mliska@suse.cz>

* LOCAL_PATCHES: Update to installed revisions.

From-SVN: r265673

6 years ago[ARC] Remove non standard funcions calls.
Claudiu Zissulescu [Wed, 31 Oct 2018 11:27:07 +0000 (12:27 +0100)]
[ARC] Remove non standard funcions calls.

Replace all custom "library" calls with compiler known patterns.

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

* config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
(mulsi3_600_lib): Remove pattern.
(umulsi3_highpart_600_lib_le): Likewise.
(umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
(umulsidi3): Remove call to umulsidi3_600_lib.
(umulsidi3_600_lib): Remove pattern.
(peephole2): Remove peephole using the above deprecated patterns.

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

* gcc.target/arc/mulsi3_highpart-2.c: Update test.

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

* config/arc/lib1funcs.S (_muldi3): New function.
* config/arc/t-arc (LIB1ASMFUNCS): Add _muldi3.

From-SVN: r265672

6 years agoUpdate test-suite expected output after rewording in libsanitizer.
Martin Liska [Wed, 31 Oct 2018 11:17:30 +0000 (12:17 +0100)]
Update test-suite expected output after rewording in libsanitizer.

2018-10-31  Martin Liska  <mliska@suse.cz>

* c-c++-common/ubsan/pr63839.c: Update to new sanitizer message.
* c-c++-common/ubsan/unreachable-1.c (main): Likewise.
* c-c++-common/ubsan/unreachable-2.c: Likewise.
* c-c++-common/ubsan/unreachable-4.c (main): Likewise.

From-SVN: r265670

6 years agoNew local GCC patch for CAN_SANITIZE_UB ifdef.
Martin Liska [Wed, 31 Oct 2018 11:17:10 +0000 (12:17 +0100)]
New local GCC patch for CAN_SANITIZE_UB ifdef.

2018-10-31  Martin Liska  <mliska@suse.cz>

* ubsan/ubsan_platform.h: Add ifndef as we define it with
-DCAN_SANITIZE_UB CFLAGS.

From-SVN: r265669

6 years agoRevert https://reviews.llvm.org/D40908 which changes asan offset to 1<<44.
Martin Liska [Wed, 31 Oct 2018 11:16:41 +0000 (12:16 +0100)]
Revert https://reviews.llvm.org/D40908 which changes asan offset to 1<<44.

2018-10-31  Martin Liska  <mliska@suse.cz>

* asan/asan_mapping.h: Revert shadow memory offset to 1 << 41.

From-SVN: r265668

6 years agoApply LOCAL_PATCHES and remove not used ones.
Martin Liska [Wed, 31 Oct 2018 11:16:17 +0000 (12:16 +0100)]
Apply LOCAL_PATCHES and remove not used ones.

2018-10-31  Martin Liska  <mliska@suse.cz>

* LOCAL_PATCHES: Update patch list.
* asan/asan_globals.cc (CheckODRViolationViaIndicator): Apply
patches from GCC's trunk.
(CheckODRViolationViaPoisoning): Likewise.
(RegisterGlobal): Likewise.
* sanitizer_common/sanitizer_mac.cc (defined): Likewise.
* sanitizer_common/sanitizer_stacktrace.cc (GetCanonicFrame): Likewise.
* ubsan/ubsan_handlers.cc (__ubsan::__ubsan_handle_cfi_bad_icall): Likewise.
(__ubsan::__ubsan_handle_cfi_bad_icall_abort): Likewise.
* ubsan/ubsan_handlers.h (struct CFIBadIcallData): Likewise.
(struct CFICheckFailData): Likewise.
(RECOVERABLE): Likewise.

From-SVN: r265667

6 years agoUpdate build system: include new files and run autoheader, autoconf, automake
Martin Liska [Wed, 31 Oct 2018 11:15:57 +0000 (12:15 +0100)]
Update build system: include new files and run autoheader, autoconf, automake

2018-10-31  Martin Liska  <mliska@suse.cz>

* config.h.in: Regenerate.
* configure: Likewise.
* sanitizer_common/Makefile.am: Include new files, remove old
files.
* sanitizer_common/Makefile.in: Regenerate.
* ubsan/Makefile.am: Include new files, remove old
files.
* ubsan/Makefile.in: Likewise.
* asan/Makefile.am: Include new files.
* asan/Makefile.in: Regenerate.

From-SVN: r265666

6 years agobackport: All source files: Merge from upstream 345033.
Martin Liska [Wed, 31 Oct 2018 11:14:23 +0000 (12:14 +0100)]
backport: All source files: Merge from upstream 345033.

Merge from upstream 345033.

2018-10-31  Martin Liska  <mliska@suse.cz>

* All source files: Merge from upstream 345033.

From-SVN: r265665

6 years agoUpdate merge script and HOWTO_MERGE documentation.
Martin Liska [Wed, 31 Oct 2018 11:09:26 +0000 (12:09 +0100)]
Update merge script and HOWTO_MERGE documentation.

2018-10-31  Martin Liska  <mliska@suse.cz>

* HOWTO_MERGE: Enhance documentation.
* merge.sh: Add support for git as well.

From-SVN: r265664

6 years agoFix hash-table violation in trans-decl.c.
Martin Liska [Wed, 31 Oct 2018 10:59:34 +0000 (11:59 +0100)]
Fix hash-table violation in trans-decl.c.

2018-10-31  Martin Liska  <mliska@suse.cz>

* trans-decl.c (struct module_hasher): Call htab_hash_string
for s->name and not for s.

From-SVN: r265663

6 years agoFix PR87374: ICE with -mslow-flash-data and -mword-relocations
Thomas Preud'homme [Wed, 31 Oct 2018 10:05:54 +0000 (10:05 +0000)]
Fix PR87374: ICE with -mslow-flash-data and -mword-relocations

GCC ICEs under -mslow-flash-data and -mword-relocations because there
is no way to load an address, both literal pools and MOVW/MOVT being
forbidden. This patch gives an error message when both options are
specified by the user and adds the according dg-skip-if directives for
tests that use either of these options. It also explicitely set the
option when in PIC mode as per documentation rather than always check
for target_word_relocation together with flag_pic.

2018-10-31  Thomas Preud'homme  <thomas.preudhomme@linaro.org>

    gcc/
    PR target/87374
    * config/arm/arm.c (arm_option_check_internal): Disable the combined
    use of -mslow-flash-data and -mword-relocations.
    (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
    * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
    flag_pic.
    * doc/invoke.texi (-mword-relocations): Mention conflict with
    -mslow-flash-data.
    (-mslow-flash-data): Reciprocally.

    gcc/testsuite/
    PR target/87374
    * gcc.target/arm/movdi_movt.c: Skip if both -mslow-flash-data and
    -mword-relocations would be passed when compiling the test.
    * gcc.target/arm/movsi_movt.c: Likewise.
    * gcc.target/arm/pr81863.c: Likewise.
    * gcc.target/arm/thumb2-slow-flash-data-1.c: Likewise.
    * gcc.target/arm/thumb2-slow-flash-data-2.c: Likewise.
    * gcc.target/arm/thumb2-slow-flash-data-3.c: Likewise.
    * gcc.target/arm/thumb2-slow-flash-data-4.c: Likewise.
    * gcc.target/arm/thumb2-slow-flash-data-5.c: Likewise.
    * gcc.target/arm/tls-disable-literal-pool.c: Likewise.

From-SVN: r265662

6 years agoaarch64: Force TImode values into even registers
Richard Henderson [Wed, 31 Oct 2018 10:00:45 +0000 (10:00 +0000)]
aarch64: Force TImode values into even registers

The LSE CASP instruction requires values to be placed in even
register pairs.  A solution involving two additional register
classes was rejected in favor of the much simpler solution of
simply requiring all TImode values to be aligned.

* config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
16-byte modes held in GP registers to use an even regno.

From-SVN: r265661

6 years agoaarch64: Improve atomic-op lse generation
Richard Henderson [Wed, 31 Oct 2018 09:58:48 +0000 (09:58 +0000)]
aarch64: Improve atomic-op lse generation

Fix constraints; avoid unnecessary split.  Drop the use of the atomic_op
iterator in favor of the ATOMIC_LDOP iterator; this is simplier and more
logical for ldclr aka bic.

* config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
(aarch64_atomic_ldop_supported_p): Remove.
(aarch64_gen_atomic_ldop): Remove.
* config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
Fully expand LSE operations here.
(atomic_fetch_<atomic_optab><ALLI>): Likewise.
(atomic_<atomic_optab>_fetch<ALLI>): Likewise.
(aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
and use ATOMIC_LDOP instead; use register_operand for the input;
drop the split and emit insns directly.
(aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
(aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
(@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.

From-SVN: r265660

6 years agoaarch64: Improve swp generation
Richard Henderson [Wed, 31 Oct 2018 09:47:21 +0000 (09:47 +0000)]
aarch64: Improve swp generation

Allow zero as an input; fix constraints; avoid unnecessary split.

* config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
(aarch64_gen_atomic_ldop): Don't call it.
* config/aarch64/atomics.md (atomic_exchange<ALLI>):
Use aarch64_reg_or_zero.
(aarch64_atomic_exchange<ALLI>): Likewise.
(aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
operand 0; use aarch64_reg_or_zero for input; merge ...
(@aarch64_atomic_swp<ALLI>): ... this and remove.

From-SVN: r265659

6 years agore PR d/87788 (Support D on x86_64-apple-darwin*)
Iain Buclaw [Wed, 31 Oct 2018 09:44:31 +0000 (09:44 +0000)]
re PR d/87788 (Support D on x86_64-apple-darwin*)

ChangeLog:

2018-10-31  Iain Buclaw  <ibuclaw@gdcproject.org>

PR bootstrap/87788
PR d/87799
* configure: Rebuild.
* configure.ac: Disable D on systems where it is known not to work.

libphobos/ChangeLog:

2018-10-31  Iain Buclaw  <ibuclaw@gdcproject.org>

PR bootstrap/87789
PR d/87818
PR d/87819
* configure.tgt: New file.

From-SVN: r265658

6 years agoaarch64: Improve cas generation
Richard Henderson [Wed, 31 Oct 2018 09:42:39 +0000 (09:42 +0000)]
aarch64: Improve cas generation

Do not zero-extend the input to the cas for subword operations;
instead, use the appropriate zero-extending compare insns.
Correct the predicates and constraints for immediate expected operand.

* config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
(aarch64_split_compare_and_swap): Use it.
(aarch64_expand_compare_and_swap): Likewise.  Remove convert_modes;
test oldval against the proper predicate.
* config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
Use nonmemory_operand for expected.
(cas_short_expected_pred): New.
(@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
(@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
* config/aarch64/predicates.md (aarch64_plushi_immediate): New.
(aarch64_plushi_operand): New.

From-SVN: r265657

6 years agoaarch64: Simplify LSE cas generation
Richard Henderson [Wed, 31 Oct 2018 09:29:29 +0000 (09:29 +0000)]
aarch64: Simplify LSE cas generation

The cas insn is a single insn, and if expanded properly need not
be split after reload.  Use the proper inputs for the insn.

* config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
Force oldval into the rval register for TARGET_LSE; emit the compare
during initial expansion so that it may be deleted if unused.
(aarch64_gen_atomic_cas): Remove.
* config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
Change =&r to +r for operand 0; use match_dup for operand 2;
remove is_weak and mod_f operands as unused.  Drop the split
and merge with...
(@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
(@aarch64_compare_and_swap<GPI>_lse): Similarly.
(@aarch64_atomic_cas<GPI>): Similarly.

From-SVN: r265656

6 years agore PR testsuite/87802 (g++.dg/vect/slp-pr87105.cc fails starting with r265522)
Richard Biener [Wed, 31 Oct 2018 08:48:59 +0000 (08:48 +0000)]
re PR testsuite/87802 (g++.dg/vect/slp-pr87105.cc fails starting with r265522)

2018-10-31  Richard Biener  <rguenther@suse.de>

PR testsuite/87802
* g++.dg/vect/slp-pr87105.cc: XFAIL for strict alignment targets.

From-SVN: r265655

6 years agotree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case using ABSU_EXPR.
Richard Biener [Wed, 31 Oct 2018 08:10:58 +0000 (08:10 +0000)]
tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case using ABSU_EXPR.

2018-10-31  Richard Biener  <rguenther@suse.de>

* tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
using ABSU_EXPR.

From-SVN: r265654

6 years agoAdd pipeline description for Qualcomm Saphira core.
Sameera Deshpande [Wed, 31 Oct 2018 07:32:53 +0000 (07:32 +0000)]
Add pipeline description for Qualcomm Saphira core.

From-SVN: r265653

6 years agoDaily bump.
GCC Administrator [Wed, 31 Oct 2018 00:17:19 +0000 (00:17 +0000)]
Daily bump.

From-SVN: r265652

6 years agore PR fortran/85896 (ICE in gfc_convert_constant(): Unexpected type)
Thomas Koenig [Tue, 30 Oct 2018 23:04:10 +0000 (23:04 +0000)]
re PR fortran/85896 (ICE in gfc_convert_constant(): Unexpected type)

2018-10-30  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/85896
* simplify.c (simplify_min_max): Do not convert the type of the
return expression.

2018-10-30  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/85896
* gfortran.dg/min_max_type.f90: New test.

From-SVN: r265649

6 years agoPR middle-end/87041 - -Wformat reading through null pointer on unreachable code
Martin Sebor [Tue, 30 Oct 2018 21:58:35 +0000 (21:58 +0000)]
PR middle-end/87041 - -Wformat reading through null pointer on unreachable code

gcc/ChangeLog:

PR middle-end/87041
* gimple-ssa-sprintf.c (format_directive): Use %G to include
inlining context.
(sprintf_dom_walker::compute_format_length):
Avoid setting POSUNDER4K here.
(get_destination_size): Handle null argument values.
(get_user_idx_format): New function.
(sprintf_dom_walker::handle_gimple_call): Handle all printf-like
functions, including user-defined with attribute format printf.
Use %G to include inlining context.
Set POSUNDER4K here.

gcc/c-family/ChangeLog:

PR middle-end/87041
* c-format.c (check_format_types): Avoid diagnosing null pointer
arguments to printf-family of functions.

gcc/testsuite/ChangeLog:

PR middle-end/87041
* gcc.c-torture/execute/fprintf-2.c: New test.
* gcc.c-torture/execute/printf-2.c: Same.
* gcc.c-torture/execute/user-printf.c: Same.
* gcc.dg/tree-ssa/builtin-fprintf-warn-1.c: Same.
* gcc.dg/tree-ssa/builtin-printf-2.c: Same.
* gcc.dg/tree-ssa/builtin-printf-warn-1.c: Same.
* gcc.dg/tree-ssa/user-printf-warn-1.c: Same.

From-SVN: r265648

6 years ago* params.def (lto-partitions): Bump from 32 to 128.
Jan Hubicka [Tue, 30 Oct 2018 21:47:19 +0000 (22:47 +0100)]
* params.def (lto-partitions): Bump from 32 to 128.

From-SVN: r265647

6 years agoImplement P0892R2, explicit(bool).
Marek Polacek [Tue, 30 Oct 2018 19:59:41 +0000 (19:59 +0000)]
Implement P0892R2, explicit(bool).

* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.

* call.c (add_template_candidate_real): Return if the declaration is
explicit and we're only looking for non-converting constructor.
* cp-tree.h (lang_decl_fn): Add has_dependent_explicit_spec_p bit.
(DECL_HAS_DEPENDENT_EXPLICIT_SPEC_P): New macro.
(cp_decl_specifier_seq): Add explicit_specifier field.
(build_explicit_specifier, store_explicit_specifier): Declare.
* decl.c (grokdeclarator): Call store_explicit_specifier.
(build_explicit_specifier): New function.
* parser.c (cp_parser_function_specifier_opt) <case RID_EXPLICIT>:
Parse C++20 explicit(bool).
* pt.c (store_explicit_specifier, lookup_explicit_specifier): New.
(tsubst_function_decl): Handle explicit(dependent-expr).

* g++.dg/cpp2a/explicit1.C: New test.
* g++.dg/cpp2a/explicit10.C: New test.
* g++.dg/cpp2a/explicit11.C: New test.
* g++.dg/cpp2a/explicit12.C: New test.
* g++.dg/cpp2a/explicit13.C: New test.
* g++.dg/cpp2a/explicit2.C: New test.
* g++.dg/cpp2a/explicit3.C: New test.
* g++.dg/cpp2a/explicit4.C: New test.
* g++.dg/cpp2a/explicit5.C: New test.
* g++.dg/cpp2a/explicit6.C: New test.
* g++.dg/cpp2a/explicit7.C: New test.
* g++.dg/cpp2a/explicit8.C: New test.
* g++.dg/cpp2a/explicit9.C: New test.

* testsuite/20_util/any/cons/explicit.cc: Adjust dg-error.
* testsuite/20_util/pair/cons/explicit_construct.cc: Likewise.
* testsuite/20_util/tuple/cons/explicit_construct.cc: Likewise.

From-SVN: r265641

6 years agoxfail ira-shrink-wrap-prep tests (PR87708)
Segher Boessenkool [Tue, 30 Oct 2018 19:49:36 +0000 (20:49 +0100)]
xfail ira-shrink-wrap-prep tests (PR87708)

After r265398, the ira-shrinkwrap-prep-[12].c tests fail on all
targets, because the IRA feature tested can only move hard registers
down, and we no longer have hard registers for the function parameters
at this stage.

gcc/testsuite/
PR rtl-optimization/87708
gcc.dg/ira-shrinkwrap-prep-1.c: xfail test.
gcc.dg/ira-shrinkwrap-prep-2.c: xfail test.

From-SVN: r265639

6 years ago* tree.c
Jan Hubicka [Tue, 30 Oct 2018 19:13:47 +0000 (20:13 +0100)]
* tree.c
(free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
head in file.
(free_lang_data_in_type): Forward declare.
(fld_type_variant_equal_p): New function.
(fld_type_variant): New function
(fld_incomplete_types): New hash.
(fld_incomplete_type_of): New function
(fld_simplfied-type): New function.
(free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
(free_lang_data): Allocate and free fld_incomplete_type; update call
of free_lang_data_in_decl.

From-SVN: r265638

6 years agodecl.c (grokdeclarator): Use declarator->id_loc in diagnostic about flexible array...
Paolo Carlini [Tue, 30 Oct 2018 18:29:49 +0000 (18:29 +0000)]
decl.c (grokdeclarator): Use declarator->id_loc in diagnostic about flexible array members.

/cp
2018-10-30  Paolo Carlini  <paolo.carlini@oracle.com>

* decl.c (grokdeclarator): Use declarator->id_loc in diagnostic
about flexible array members.

/testsuite
2018-10-30  Paolo Carlini  <paolo.carlini@oracle.com>

* g++.dg/cpp1z/has-unique-obj-representations1.C: Test location too.
* g++.dg/ext/flexarray-mangle-2.C: Likewise.
* g++.dg/ext/flexarray-mangle.C: Likewise.
* g++.dg/ext/flexarray-subst.C: Likewise.
* g++.dg/ext/flexary10.C: Likewise.
* g++.dg/ext/flexary11.C: Likewise.
* g++.dg/ext/flexary14.C: Likewise.
* g++.dg/ext/flexary16.C: Likewise.
* g++.dg/ext/flexary26.C: Likewise.
* g++.dg/ext/flexary27.C: Likewise.
* g++.dg/ext/flexary7.C: Likewise.
* g++.dg/ext/pr71290.C: Likewise.

From-SVN: r265636

6 years ago* gcov.c (output_lines): Remove duplicate line.
Eric Botcazou [Tue, 30 Oct 2018 18:01:41 +0000 (18:01 +0000)]
* gcov.c (output_lines): Remove duplicate line.

From-SVN: r265634

6 years agors6000.md (bswapdi2): Force address into register if not in indexed or indirect form.
Aaron Sawdey [Tue, 30 Oct 2018 17:05:37 +0000 (17:05 +0000)]
rs6000.md (bswapdi2): Force address into register if not in indexed or indirect form.

2018-10-30  Aaron Sawdey  <acsawdey@linux.ibm.com>

* config/rs6000/rs6000.md (bswapdi2): Force address into register
if not in indexed or indirect form.
(bswapdi2_load): Change predicate to indexed_or_indirect_operand.
(bswapdi2_store): Ditto.
* config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
helper function.
* config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
Prototype for helper function.

From-SVN: r265632

6 years agoextend.texi (optimize): Clarify/expand attribute documentation.
Martin Sebor [Tue, 30 Oct 2018 15:46:07 +0000 (15:46 +0000)]
extend.texi (optimize): Clarify/expand attribute documentation.

gcc/ChangeLog:

* doc/extend.texi (optimize): Clarify/expand attribute documentation.
(target, pragma GCC optimize, pragma GCC target): Ditto.

From-SVN: r265631

6 years agoAdd PR marker
Jeff Law [Tue, 30 Oct 2018 15:14:39 +0000 (09:14 -0600)]
Add PR marker

From-SVN: r265628

6 years agomethod-serial.cc: Mark varible as potentially unused to silence warning.
Nicholas Krause [Tue, 30 Oct 2018 15:13:26 +0000 (15:13 +0000)]
method-serial.cc: Mark varible as potentially unused to silence warning.

       * method-serial.cc: Mark varible as potentially unused
        to silence warning.

From-SVN: r265627

6 years agoPR libstdc++/87809 avoid invalid expressions in exception specifications
Jonathan Wakely [Tue, 30 Oct 2018 14:49:43 +0000 (14:49 +0000)]
PR libstdc++/87809 avoid invalid expressions in exception specifications

If the allocator isn't default constructible then checking if the
default constructor throws in an exception specification makes the
declaration invalid. Use the type trait instead.

PR libstdc++/87809
* include/bits/forward_list.h (_Fwd_list_impl::_Fwd_list_impl()): Use
trait in exception-specification instead of possibly invalid
expression.
* include/bits/stl_bvector.h (_Bvector_impl::_Bvector_impl()):
Likewise.
* include/bits/stl_list.h (_List_impl::_List_impl()): Likewise.
* include/bits/stl_vector.h (_Vector_impl::_Vector_impl()): Likewise.
* testsuite/23_containers/forward_list/cons/87809.cc: New test.
* testsuite/23_containers/list/cons/87809.cc: New test.
* testsuite/23_containers/vector/bool/cons/87809.cc: New test.
* testsuite/23_containers/vector/cons/87809.cc: New test.

From-SVN: r265626

6 years agoPR libstdc++/87784 fix dynamic_bitset::push_back
Jonathan Wakely [Tue, 30 Oct 2018 14:49:32 +0000 (14:49 +0000)]
PR libstdc++/87784 fix dynamic_bitset::push_back

Previously the _M_Nb member was incremented before calling
_M_unchecked_set which meant that the bit being set was out of bounds.
It either set the wrong bit in an allocated word, or accessed beyond the
end of the allocated memory in the _M_w vector. The fix for the bug is
to update the _M_Nb member after using it as an index.

As an optimisation, when a new block needs to be appended the call to
_M_unchecked_set can be avoided by appending a block with the least
significant bit already set to the desired value.

PR libstdc++/87784
* include/tr2/dynamic_bitset (dynamic_bitset::push_back): When there
are no unused bits in the last block, append a new block with the
right value so the bit doesn't need to be set. Only increment size
after setting the new bit, not before.
* testsuite/tr2/dynamic_bitset/pr87784.cc: New test.

From-SVN: r265625

6 years ago* gcc.dg/tree-ssa/attr-alias.c: Skip if no weak support.
Paul Koning [Tue, 30 Oct 2018 14:47:32 +0000 (10:47 -0400)]
* gcc.dg/tree-ssa/attr-alias.c: Skip if no weak support.

From-SVN: r265624

6 years agoFix __builtin_expect_with_probability documentation
Jonathan Wakely [Tue, 30 Oct 2018 12:17:27 +0000 (12:17 +0000)]
Fix __builtin_expect_with_probability documentation

* doc/extend.texi: Fix prototype and description of
__builtin_expect_with_probability.

From-SVN: r265622

6 years agoAvoid unnecessarily numbering cloned symbols.
Michael Ploujnikov [Tue, 30 Oct 2018 11:39:29 +0000 (11:39 +0000)]
Avoid unnecessarily numbering cloned symbols.

2018-10-30  Michael Ploujnikov  <michael.ploujnikov@oracle.com>

* cgraph.h (clone_function_name_1): Replaced by new
  clone_function_name_numbered that takes name as string; for
  privatize_symbol_name_1 use only.
  (clone_function_name): Renamed to
  clone_function_name_numbered to be explicit about numbering.
  (clone_function_name): New two-argument function that does
  not number its output.
  (clone_function_name): New three-argument function that
  takes a number to append to its output.
* cgraphclones.c (duplicate_thunk_for_node):
  (clone_function_name_1): Renamed.
  (clone_function_name_numbered): Two new functions.
  (clone_function_name): Improved documentation.
  (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
* config/rs6000/rs6000.c (make_resolver_func): Ditto.
* final.c (final_scan_insn_1): Use the new clone_function_name
  without numbering.
* multiple_target.c (create_dispatcher_calls): Ditto.
  (create_target_clone): Ditto.
* omp-expand.c (grid_expand_target_grid_body): Ditto.
* omp-low.c (create_omp_child_function_name): Ditto.
* omp-simd-clone.c (simd_clone_create): Ditto.
* symtab.c (simd_symtab_node::noninterposable_alias): Use the
  new clone_function_name without numbering.
2018-10-30  Michael Ploujnikov  <michael.ploujnikov@oracle.com>

* lto-partition.c (privatize_symbol_name_1): Use
  clone_function_name_numbered.
2018-10-30  Michael Ploujnikov  <michael.ploujnikov@oracle.com>

* gcc.dg/tree-prof/cold_partition_label.c: Update for cold
  section names without numbers.
* gcc.dg/tree-prof/section-attr-1.c: Ditto.
* gcc.dg/tree-prof/section-attr-2.c: Ditto.
* gcc.dg/tree-prof/section-attr-3.c: Ditto.

From-SVN: r265621