gcc.git
5 years ago2019-09-01 François Dumont <fdumont@gcc.gnu.org>
François Dumont [Sun, 1 Sep 2019 20:11:42 +0000 (20:11 +0000)]
2019-09-01  François Dumont  <fdumont@gcc.gnu.org>

* testsuite_files/util/testsuite_performance.h
(resource_counter::start): Ignore unused malloc(0) result.

From-SVN: r275284

5 years ago[testsuite] Unsupport 20190827-1.c for targets without alias support.
Iain Sandoe [Sun, 1 Sep 2019 18:38:59 +0000 (18:38 +0000)]
[testsuite] Unsupport 20190827-1.c for targets without alias support.

gcc/testsuite/

2019-09-01  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.c-torture/compile/20190827-1.c: Add dg-requires-alias.

From-SVN: r275274

5 years agotarget-supports.exp (check_effective_target_pthread): Add #include <pthread.h> direct...
Eric Botcazou [Sun, 1 Sep 2019 12:55:58 +0000 (12:55 +0000)]
target-supports.exp (check_effective_target_pthread): Add #include <pthread.h> directive to the test.

* lib/target-supports.exp (check_effective_target_pthread): Add
#include <pthread.h> directive to the test.

From-SVN: r275271

5 years agore PR target/91472 (gmp testsuite segfaults with gcc-8 and gcc-9, works fine with...
Eric Botcazou [Sun, 1 Sep 2019 12:55:22 +0000 (12:55 +0000)]
re PR target/91472 (gmp testsuite segfaults with gcc-8 and gcc-9, works fine with gcc-7)

PR target/91472
* config/sparc/sparc.c (sparc_cannot_force_const_mem): Return true
during LRA/reload in PIC mode if the PIC register hasn't been used yet.
(sparc_pic_register_p): Test reload_in_progress for consistency's sake.

From-SVN: r275270

5 years agoarray.c (spec_dimen_size): Check for the presence of expressions for the bounds.
Paul Thomas [Sun, 1 Sep 2019 12:53:02 +0000 (12:53 +0000)]
array.c (spec_dimen_size): Check for the presence of expressions for the bounds.

2019-09-01  Paul Thomas  <pault@gcc.gnu.org>

* array.c (spec_dimen_size): Check for the presence of
expressions for the bounds.
* decl.c (gfc_match_end): Add case COMP_SELECT_RANK.
* dump-parse-tree.c(show_symbol): Show the arrayspec of class
entities.
(show_code_node): Show the code for SELECT_RANK.
* expr.c (gfc_check_vardef_context): Omit the context of
variable definition for select rank associate names since the
ASSUMED RANK throws.
* gfortran.h : Add ST_SELECT_RANK and ST_RANK to enum
gfc_statement. Add select_rank_temporary to symbol attribute
structure. Add EXEC_SELECT_RANK to enum gfc_exec_op.
* match.c (match_exit_cycle): Add COMP_SELECT_RANK.
(copy_ts_from_selector_to_associate): Add as special case for
assumed rank class variables.
(select_intrinsic_set_tmp): Clean up the code by using symbols
for references to the temporary and the selector.
(select_type_set_tmp): Ditto.
(select_rank_set_tmp): New function.
(gfc_match_select_rank): New function.
(gfc_match_rank_is): New function.
* match.h : Add prototypes for gfc_match_select_rank and
gfc_match_rank_is.
* parse.c (decode_statement): Attempt to match select_rank and
rank statements.
(next_statement, gfc_ascii_statement): Add ST_SELECT_RANK.
(parse_select_rank_block): New function.
(parse_executable): Parse select rank block for ST_SELECT_RANK.
* parse.h : Add COMP_SELECT_RANK to enum gfc_compile_state.
* resolve.c (resolve_variable): Exclude select_rank_temporaries
from the check on use of ASSUMED RANK.
(gfc_resolve_expr): Make sure that unlimited polymorphic select
rank temporaries expressions are not resolved again after being
successfully resolved.
(resolve_assoc_var): Do not do the rank check for select rank
temporaries.
(resolve_select_rank): New function.
(gfc_resolve_blocks): Deal with case EXEC_SELECT_RANK.
(resolve_symbol): Exclude select rank temporaries for check on
use of ASSUMED RANK.
* st.c (gfc_free_statement): Include EXEC_SELECT_RANK.
* trans-array.c (gfc_conv_array_ref): Select rank temporaries
may have dimen == 0.
(gfc_conv_expr_descriptor): Zero the offset of select rank
temporaries.
* trans-stmt.c (copy_descriptor): New function.
(trans_associate_var): Add code to associate select rank temps.
(gfc_trans_select_rank_cases): New function.
(gfc_trans_select_rank): New function.
* trans-stmt.h : Add prototype for gfc_trans_select_rank.
trans.c (trans_code): Add select rank case.

2019-09-01  Paul Thomas  <pault@gcc.gnu.org>

* gfortran.dg/select_rank_1.f90 : New test.
* gfortran.dg/select_rank_2.f90 : New test.

From-SVN: r275269

5 years agopolicy_data_structures_biblio.xml (COM: Component Model Object Technologies): Adjust...
Gerald Pfeifer [Sun, 1 Sep 2019 12:42:41 +0000 (12:42 +0000)]
policy_data_structures_biblio.xml (COM: Component Model Object Technologies): Adjust name and link.

* doc/xml/manual/policy_data_structures_biblio.xml (COM: Component
Model Object Technologies): Adjust name and link.

From-SVN: r275268

5 years agore PR middle-end/91623 (-msse4.1 -O3 segfault in /usr/lib/gcc/x86_64-pc-linux-gnu...
Jakub Jelinek [Sun, 1 Sep 2019 11:57:10 +0000 (13:57 +0200)]
re PR middle-end/91623 (-msse4.1 -O3 segfault in /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include/smmintrin.h:270:10)

PR middle-end/91623
* optabs.c (expand_vec_cond_expr): If op0 is a VECTOR_CST and only
EQ_EXPR/NE_EXPR is supported, verify that op0 only contains
zeros or negative elements and use NE_EXPR instead of LT_EXPR against
zero vector.

* gcc.target/i386/pr91623.c: New test.

From-SVN: r275267

5 years agore PR lto/91572 (lto1: error: type variant has different ‘TREE_TYPE’ since r269862)
Jakub Jelinek [Sun, 1 Sep 2019 11:56:13 +0000 (13:56 +0200)]
re PR lto/91572 (lto1: error: type variant has different ‘TREE_TYPE’ since r269862)

PR lto/91572
* tree.c (find_decls_types_in_node): Also walk TREE_PURPOSE of
GIMPLE_ASM TREE_LIST operands.

* g++.dg/lto/pr91572_0.C: New test.

From-SVN: r275266

5 years agoFix wrong dates in ChangeLog
Bernd Edlinger [Sun, 1 Sep 2019 10:40:52 +0000 (10:40 +0000)]
Fix wrong dates in ChangeLog

From-SVN: r275265

5 years agoDaily bump.
GCC Administrator [Sun, 1 Sep 2019 00:16:48 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r275264

5 years agoAdd source location to TRAIT_EXPR.
Jason Merrill [Sat, 31 Aug 2019 22:09:47 +0000 (18:09 -0400)]
Add source location to TRAIT_EXPR.

Since TRAIT_EXPR is exceptional, maybe_wrap_with_location won't wrap it, so
we need to put its location in the TRAIT_EXPR node itself.

* cp-tree.h (TRAIT_EXPR_LOCATION): New.
(struct tree_trait_expr): Add locus field.
* parser.c (cp_parser_trait_expr): Pass trait_loc down.
* pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Likewise.
* semantics.c (finish_trait_expr): Add location parm.
* tree.c (cp_expr_location): Handle TRAIT_EXPR.

From-SVN: r275260

5 years ago* es.po: Update.
Joseph Myers [Sat, 31 Aug 2019 21:49:27 +0000 (22:49 +0100)]
* es.po: Update.

From-SVN: r275258

5 years agogeneric.texi (Unary and Binary Expressions): Mark up an instance of TYPE_MIN.
Gerald Pfeifer [Sat, 31 Aug 2019 17:20:28 +0000 (17:20 +0000)]
generic.texi (Unary and Binary Expressions): Mark up an instance of TYPE_MIN.

* doc/generic.texi (Unary and Binary Expressions): Mark up
an instance of TYPE_MIN.

From-SVN: r275243

5 years agoor1k: Fix issue with set_got clobbering LR (r9)
Stafford Horne [Sat, 31 Aug 2019 06:00:56 +0000 (06:00 +0000)]
or1k: Fix issue with set_got clobbering LR (r9)

When compiling glibc we found that the GOT register was being allocated
r9 when the instruction was still set_got_tmp.  That is a problem
because r9 is the Link Register (LR) in OpenRISC which is used/clobbered
in set_got.  We cannot use r9 as the GOT register.  Also, we cannot
simply say set_got_tmp clobbers r9 as this is the reason for having the
temporary set_got_tmp.

Fix by using a register class constraint that does not allow r9 during
register allocation.

gcc/ChangeLog:

        * config/or1k/constraints.md (t): New constraint.
        * config/or1k/or1k.h (GOT_REGS): New register class.
        * config/or1k/or1k.md (set_got_tmp, set_got): Use t contraint.

From-SVN: r275242

5 years agocompiler: check for notinheap struct at each struct field
Ian Lance Taylor [Sat, 31 Aug 2019 03:07:48 +0000 (03:07 +0000)]
compiler: check for notinheap struct at each struct field

    When generating write barriers, we were only checking for a notinheap
    struct at the outermost struct.  That mishandled the case of setting a
    pointer to a notinheap struct as a field of another struct that is not
    notinheap.  This caused an invalid write barrier error when building
    the 1.13 version of the runtime.

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

From-SVN: r275240

5 years agocompiler, runtime: support and use single argument go:linkname
Ian Lance Taylor [Sat, 31 Aug 2019 03:01:15 +0000 (03:01 +0000)]
compiler, runtime: support and use single argument go:linkname

    The gc compiler has started permitting go:linkname comments with a
    single argument to mean that a function should be externally visible
    outside the package.  Implement this in the Go frontend.

    Change the libgo runtime package to use it, rather than repeating the
    name just to export a function.

    Remove a couple of unnecessary go:linkname comments on declarations.

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

From-SVN: r275239

5 years agocompiler: don't report runtime escapes if we've seen errors
Ian Lance Taylor [Sat, 31 Aug 2019 02:56:55 +0000 (02:56 +0000)]
compiler: don't report runtime escapes if we've seen errors

    If we get errors during compilation, we skip the escape analysis pass.
    If we are compiling the runtime package, we report an error if a bound
    method expression escapes.  The effect is that if we get an error
    while compiling the runtime package, we would report confusing and
    meaningless errors about bound method expressions escaping.

    This CL stops doing that.

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

From-SVN: r275238

5 years agoruntime: always build panic32.go
Ian Lance Taylor [Sat, 31 Aug 2019 02:55:09 +0000 (02:55 +0000)]
runtime: always build panic32.go

    Avoids problems with arm64 ILP32 mode.  We might want to handle that
    mode better in general, but always building panic32.go is simple and
    fixes the build.

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

From-SVN: r275237

5 years agore PR fortran/91587 (ICE in gfc_resolve_filepos, at fortran/io.c:2913)
Steven G. Kargl [Sat, 31 Aug 2019 00:32:48 +0000 (00:32 +0000)]
re PR fortran/91587 (ICE in gfc_resolve_filepos, at fortran/io.c:2913)

2019-08-30  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91587
* io.c (match_filepos): MATCH_ERROR should branch to a syntax error.

2019-08-30  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91587
* gfortran.dg/pr91587.f90: New test.

From-SVN: r275236

5 years agoDaily bump.
GCC Administrator [Sat, 31 Aug 2019 00:17:00 +0000 (00:17 +0000)]
Daily bump.

From-SVN: r275235

5 years agoRISC-V: Disable -msave-restore for shared libraries.
Jim Wilson [Fri, 30 Aug 2019 23:32:52 +0000 (23:32 +0000)]
RISC-V: Disable -msave-restore for shared libraries.

This was noticed while trying to test -msave-restore support.  The
save/restore routines use the alternate return register t0/x5 which is
clobbered by the PLT header, so we can't use them in shared libraries.
This patch disables -msave-restore when -fpic (and -mplt), and emits a
warning if the user explicitly turned on -msave-restore.

gcc/
* config/riscv/riscv.c (riscv_option_override): If -msave-restore
and -fpic and -mplt then disable -msave-restore and warn.

From-SVN: r275231

5 years agocompile, runtime: permit anonymous and empty fields in C header
Ian Lance Taylor [Fri, 30 Aug 2019 21:49:49 +0000 (21:49 +0000)]
compile, runtime: permit anonymous and empty fields in C header

    Permit putting structs with anonymous and empty fields in the C header
    file runtime.inc that is used to build the C runtime code.  This is
    required for upcoming 1.13 support, as the m struct has picked up an
    anonymous field.

    Doing this lets the C header contain all the type descriptor structs,
    so start using those in the C code.  This cuts the number of copies of
    type descriptor definitions from 3 to 2.

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

From-SVN: r275227

5 years agoFix ChangeLog
Jonathan Wakely [Fri, 30 Aug 2019 20:00:28 +0000 (21:00 +0100)]
Fix ChangeLog

From-SVN: r275223

5 years agoPR middle-end/91599 - GCC does not say where warning is happening
Martin Sebor [Fri, 30 Aug 2019 17:49:17 +0000 (17:49 +0000)]
PR middle-end/91599 - GCC does not say where warning is happening

gcc/ChangeLog:

PR middle-end/91599
* tree-ssa-strlen.c (handle_store): Use a fallback location if
the statement doesn't have one.
* gimple-pretty-print.c (percent_G_format): Same.

gcc/testsuite/ChangeLog:

PR middle-end/91599
* gcc.dg/Wstringop-overflow-16.c: New test.

From-SVN: r275211

5 years agoPR middle-end/91584 - Bogus warning from -Warray-bounds during string assignment
Martin Sebor [Fri, 30 Aug 2019 17:42:57 +0000 (17:42 +0000)]
PR middle-end/91584 - Bogus warning from -Warray-bounds during string assignment

gcc/ChangeLog:

PR middle-end/91584
* tree-vrp.c (vrp_prop::check_mem_ref): Normalize type domain bounds
before using them to validate MEM_REF offset.

gcc/testsuite/ChangeLog:
* gfortran.dg/char_array_constructor_4.f90: New test.

From-SVN: r275210

5 years agoOptimize std::to_chars
Antony Polukhin [Fri, 30 Aug 2019 16:25:24 +0000 (16:25 +0000)]
Optimize std::to_chars

Bunch of micro optimizations for std::to_chars:
* For base == 8 replacing the lookup in __digits table with arithmetic
computations leads to a same CPU cycles for a loop (exchanges two movzx
with 3 bit ops). However this saves 129 bytes of data and totally avoids
a chance of cache misses on __digits.
* For base == 16 replacing the lookup in __digits table with
arithmetic computations leads to a few additional instructions, but
totally avoids a chance of cache misses on __digits (- ~9 cache misses
for worst case) and saves 513 bytes of const data.
* Replacing __first[pos] and __first[pos - 1] with __first[1] and
__first[0] on final iterations saves ~2% of code size.
* Removing trailing '\0' from arrays of digits allows the linker to
merge the symbols (so that "0123456789abcdefghijklmnopqrstuvwxyz" and
"0123456789abcdef" could share the same address). This improves data
locality and reduces binary sizes.
* Using __detail::__to_chars_len_2 instead of a generic
__detail::__to_chars_len makes the operation O(1) instead of O(N). It
also makes the code two times shorter.

In sum: this significantly reduces the size of a binary (for about 4KBs
only for base-8 conversion), deals with latency (CPU cache misses)
without changing the iterations count and without adding costly
instructions into the loops.

2019-08-30  Antony Polukhin  <antoshkka@gmail.com>

* include/std/charconv (__detail::__to_chars_8)
__detail::__to_chars_16): Replace array of precomputed digits with
arithmetic operations to avoid CPU cache misses. Remove zero
termination from array of digits to allow symbol merge with generic
implementation of __detail::__to_chars. Replace final offsets with
constants. Use __detail::__to_chars_len_2 instead of a generic
__detail::__to_chars_len.
(__detail::__to_chars): Remove zero termination from array of digits.
(__detail::__to_chars_2): Leading digit is always '1'.

From-SVN: r275205

5 years agoFix errors in new test
Jonathan Wakely [Fri, 30 Aug 2019 16:25:20 +0000 (17:25 +0100)]
Fix errors in new test

* testsuite/23_containers/vector/cons/89164_c++17.cc: Fix errors.

From-SVN: r275204

5 years agodecl.c (maybe_saturate_size): New function.
Eric Botcazou [Fri, 30 Aug 2019 15:32:51 +0000 (15:32 +0000)]
decl.c (maybe_saturate_size): New function.

* gcc-interface/decl.c (maybe_saturate_size): New function.
(gnat_to_gnu_entity): Invoke it on the Esize of types before sending
it for back-annotations.
* gcc-interface/trans.c: Fix typo.

From-SVN: r275200

5 years agobaseline_symbols.txt: Update.
Uros Bizjak [Fri, 30 Aug 2019 15:27:10 +0000 (17:27 +0200)]
baseline_symbols.txt: Update.

* config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.

From-SVN: r275199

5 years agoada-tree.h (DECL_FORCED_BY_REF_P): New macro.
Eric Botcazou [Fri, 30 Aug 2019 15:22:34 +0000 (15:22 +0000)]
ada-tree.h (DECL_FORCED_BY_REF_P): New macro.

* gcc-interface/ada-tree.h (DECL_FORCED_BY_REF_P): New macro.
* gcc-interface/decl.c (gnat_to_gnu_param): Set it on parameters
whose mechanism was forced to by-reference.
* gcc-interface/trans.c (Call_to_gnu): Do not issue a warning about a
misaligned actual parameter if it is based on a CONSTRUCTOR.  Remove
  obsolete warning for users of Starlet.  Issue a warning if a temporary
is make around the call for a parameter with DECL_FORCED_BY_REF_P set.
(addressable_p): Return true for REAL_CST and ADDR_EXPR.

From-SVN: r275198

5 years agotrans.c (gnat_to_gnu): Do not set the location on an expression used for a tag.
Eric Botcazou [Fri, 30 Aug 2019 15:15:40 +0000 (15:15 +0000)]
trans.c (gnat_to_gnu): Do not set the location on an expression used for a tag.

* gcc-interface/trans.c (gnat_to_gnu): Do not set the location on an
expression used for a tag.

From-SVN: r275197

5 years agogigi.h (aggregate_type_contains_array_p): Declare.
Eric Botcazou [Fri, 30 Aug 2019 15:12:20 +0000 (15:12 +0000)]
gigi.h (aggregate_type_contains_array_p): Declare.

* gcc-interface/gigi.h (aggregate_type_contains_array_p): Declare.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: For an
extension, test Has_Record_Rep_Clause instead of Has_Specified_Layout.
(adjust_packed): Return 0 if the type of the field is an aggregate
type that contains (or is) a self-referential array.
(type_has_variable_size): Delete.
* gcc-interface/utils.c (inish_record_type): Constify a variable.
(aggregate_type_contains_array_p): Add parameter SELF_REFERENTIAL.
<RECORD_TYPE>: Pass it in the recursive call.
<ARRAY_TYPE>: If it is true, return true only if the array type is
self-referential.
(create_field_decl): Streamline the setting of the alignment on the
field.  Pass false to aggregate_type_contains_array_p.

From-SVN: r275196

5 years ago* gcc.target/mips/r10k-cache-barrier-9.c: Suppress warnings.
Jeff Law [Fri, 30 Aug 2019 15:10:14 +0000 (09:10 -0600)]
* gcc.target/mips/r10k-cache-barrier-9.c: Suppress warnings.

From-SVN: r275195

5 years agotrans.c (lvalue_required_p): Adjust GNU_TYPE in the recursive call.
Eric Botcazou [Fri, 30 Aug 2019 14:48:16 +0000 (14:48 +0000)]
trans.c (lvalue_required_p): Adjust GNU_TYPE in the recursive call.

* gcc-interface/trans.c (lvalue_required_p) <N_Slice>: Adjust GNU_TYPE
in the recursive call.
<N_Selected_Component>: Likewise.

From-SVN: r275191

5 years agoutils.c (build_template): Deal with parameters passed by pointer to component of...
Eric Botcazou [Fri, 30 Aug 2019 14:44:50 +0000 (14:44 +0000)]
utils.c (build_template): Deal with parameters passed by pointer to component of multi-dimensional arrays.

* gcc-interface/utils.c (build_template): Deal with parameters
passed by pointer to component of multi-dimensional arrays.

From-SVN: r275190

5 years agodecl.c (annotate_value): Inline the call also if List_Representation_Info is greater...
Eric Botcazou [Fri, 30 Aug 2019 14:39:09 +0000 (14:39 +0000)]
decl.c (annotate_value): Inline the call also if List_Representation_Info is greater than 3.

* gcc-interface/decl.c (annotate_value) <CALL_EXPR>: Inline the call
also if List_Representation_Info is greater than 3.

From-SVN: r275188

5 years ago* gcc-interface/trans.c (Attribute_to_gnu) <Attr_Size>: Add assertion.
Eric Botcazou [Fri, 30 Aug 2019 14:26:20 +0000 (14:26 +0000)]
* gcc-interface/trans.c (Attribute_to_gnu) <Attr_Size>: Add assertion.

From-SVN: r275187

5 years ago* doc/invoke.texi (-Wvolatile): Use @code for volatile.
Marek Polacek [Fri, 30 Aug 2019 13:55:59 +0000 (13:55 +0000)]
* doc/invoke.texi (-Wvolatile): Use @code for volatile.

From-SVN: r275178

5 years agoPR libstdc++/89164 enforce constraints for uninitialized algos
Jonathan Wakely [Fri, 30 Aug 2019 13:54:49 +0000 (14:54 +0100)]
PR libstdc++/89164 enforce constraints for uninitialized algos

The memmove optimizations for std::uninitialized_copy/fill/_n will
compile even if the type is not copy constructible, because std::copy
doesn't require copy construction to work. But the uninitialized
algorithms do require it.

This adds explicit static assertions to ensure we don't allow ill-formed
initializations.

PR libstdc++/89164
* include/bits/stl_algobase.h (__copy_move): Give descriptive names
to template parameters.
* include/bits/stl_uninitialized.h (uninitialized_copy)
(uninitialized_fill, uninitialized_fill_n): Add static assertions to
diagnose invalid uses.
* testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
Adjust expected error.
* testsuite/20_util/specialized_algorithms/uninitialized_copy/89164.cc:
New test.
* testsuite/20_util/specialized_algorithms/uninitialized_copy_n/
89164.cc: New test.
* testsuite/20_util/specialized_algorithms/uninitialized_fill/89164.cc:
New test.
* testsuite/20_util/specialized_algorithms/uninitialized_fill_n/
89164.cc: New test.
* testsuite/23_containers/vector/cons/89164.cc: New test.
* testsuite/23_containers/vector/cons/89164_c++17.cc: New test.

From-SVN: r275177

5 years agogigi.h (gigi_checking_assert): New macro.
Eric Botcazou [Fri, 30 Aug 2019 13:50:34 +0000 (13:50 +0000)]
gigi.h (gigi_checking_assert): New macro.

* gcc-interface/gigi.h (gigi_checking_assert): New macro.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Modular_Integer_Type>:
Remove redundant test and adjust comments.  Minor tweaks.
* gcc-interface/trans.c (Call_to_gnu): Do not generate range checks,
instead assert that the Do_Range_Check flag is not set.  Adjust call
to convert_with_check.
(gnat_to_gnu): Likewise.
(assoc_to_constructor): Likewise.
(pos_to_constructor): Likewise.  Remove GNAT_COMPONENT_TYPE parameter.
(emit_range_check): Delete.
(convert_with_check): Remove RANGE_P parameter and adjust.  Do a single
overflow check for modular types.

From-SVN: r275174

5 years agoarm.md (unaligned_loaddi, [...]): New unspec insn patterns.
Bernd Edlinger [Fri, 30 Aug 2019 10:38:37 +0000 (10:38 +0000)]
arm.md (unaligned_loaddi, [...]): New unspec insn patterns.

2019-08-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * config/arm/arm.md (unaligned_loaddi,
        unaligned_storedi): New unspec insn patterns.
        * config/arm/neon.md (unaligned_storev8qi): Likewise.
        * config/arm/arm.c (gen_cpymem_ldrd_strd): Use unaligned_loaddi
        and unaligned_storedi for 4-byte aligned memory.
        (arm_block_set_aligned_vect): Use unaligned_storev8qi for
        4-byte aligned memory.

From-SVN: r275063

5 years ago[PR 91579] Avoid creating redundant PHI nodes in tail-call pass
Martin Jambor [Fri, 30 Aug 2019 08:08:42 +0000 (10:08 +0200)]
[PR 91579] Avoid creating redundant PHI nodes in tail-call pass

2019-08-30  Martin Jambor  <mjambor@suse.cz>

tree-optimization/91579
* tree-tailcall.c (tailr_arg_needs_copy): New variable.
(find_tail_calls): Allocate tailr_arg_needs_copy and set its bits as
appropriate.
(arg_needs_copy_p): Removed.
(eliminate_tail_call): Test tailr_arg_needs_copy instead of calling
arg_needs_copy_p.
(tree_optimize_tail_calls_1): Likewise.  Free tailr_arg_needs_copy.

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

From-SVN: r275062

5 years agoDaily bump.
GCC Administrator [Fri, 30 Aug 2019 00:16:23 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r275059

5 years ago* config/i386/i386-features.c
Uros Bizjak [Thu, 29 Aug 2019 19:47:19 +0000 (21:47 +0200)]
* config/i386/i386-features.c
(general_scalar_chain::compute_convert_gain):
Correct cost for double-word shifts.
(general_scalar_to_vector_candidate_p): Reject count operands
greater or equal to mode bitsize.

From-SVN: r275055

5 years agoi386.c (inline_secondary_memory_needed): Return true for moves between SSE and non...
Uros Bizjak [Thu, 29 Aug 2019 18:15:13 +0000 (20:15 +0200)]
i386.c (inline_secondary_memory_needed): Return true for moves between SSE and non-general registers and between mask...

* config/i386/i386.c (inline_secondary_memory_needed): Return true
for moves between SSE and non-general registers and between
mask and non-general registers.
(ix86_register_move_cost): Remove stalled comment.

From-SVN: r275050

5 years ago* ChangeLog: Fix wrong ChangeLog of my last entry.
Uros Bizjak [Thu, 29 Aug 2019 18:09:50 +0000 (20:09 +0200)]
* ChangeLog: Fix wrong ChangeLog of my last entry.

From-SVN: r275049

5 years ago[preprocessor] Include stacking
Nathan Sidwell [Thu, 29 Aug 2019 14:06:32 +0000 (14:06 +0000)]
[preprocessor] Include stacking

https://gcc.gnu.org/ml/gcc-patches/2019-08/msg01971.html
* internal.h (enum include_type): Add IT_MAIN, IT_DIRECTIVE_HWM,
IT_HEADER_HWM.
(_cpp_stack_file): Take include_type, not a bool.
* files.c (_cpp_find_file): Refactor to not hide an if inside a
for conditional.
(should_stack_file): Break apart to ...
(is_known_idempotent_file, has_unique_contents): ... these.
(_cpp_stack_file): Replace IMPORT boolean with include_type enum.
Refactor to use new predicates.  Do linemap compensation here ...
(_cpp_stack_include): ... not here.
* init.c (cpp_read_main_file): Pass IT_MAIN to _cpp_stack_file.

From-SVN: r275034

5 years agoPR libstdc++/91067 add more missing exports for directory iterators
Jonathan Wakely [Thu, 29 Aug 2019 12:16:27 +0000 (13:16 +0100)]
PR libstdc++/91067 add more missing exports for directory iterators

PR libstdc++/91067
* acinclude.m4 (libtool_VERSION): Bump to 6:28:0.
* configure: Regenerate.
* config/abi/pre/gnu.ver (GLIBCXX_3.4.28): Add new version. Export
missing symbols.
* testsuite/27_io/filesystem/iterators/91067.cc: Test move
constructors.
* testsuite/util/testsuite_abi.cc: Add new symbol version.

From-SVN: r275032

5 years agoi386-features.c (general_scalar_chain::convert_insn): Guard debug work with MAY_HAVE_...
Richard Biener [Thu, 29 Aug 2019 11:59:41 +0000 (11:59 +0000)]
i386-features.c (general_scalar_chain::convert_insn): Guard debug work with MAY_HAVE_DEBUG_BIND_INSNS.

2019-08-29  Richard Biener  <rguenther@suse.de>

* config/i386/i386-features.c (general_scalar_chain::convert_insn):
Guard debug work with MAY_HAVE_DEBUG_BIND_INSNS.

From-SVN: r275031

5 years agore PR bootstrap/91580 (i686-{darwin, linux} bootstrap fails after r274926)
Richard Biener [Thu, 29 Aug 2019 10:30:48 +0000 (10:30 +0000)]
re PR bootstrap/91580 (i686-{darwin, linux} bootstrap fails after r274926)

2019-08-29  Richard Biener  <rguenther@suse.de>

PR bootstrap/91580
* config/i386/i386-features.c (general_scalar_chain::convert_insn):
Do not emit scalar copies for debug-insns, instead replace
their uses with the reg copy used in the chain or reset them
if there is a reaching definition outside of the chain as well.

From-SVN: r275030

5 years agobaseline_symbols.txt: Update.
Jakub Jelinek [Thu, 29 Aug 2019 10:25:13 +0000 (12:25 +0200)]
baseline_symbols.txt: Update.

* config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.

From-SVN: r275028

5 years agore PR target/91560 (Try harder for AVX non-AVX2 cross-lane permutations)
Jakub Jelinek [Thu, 29 Aug 2019 09:22:57 +0000 (11:22 +0200)]
re PR target/91560 (Try harder for AVX non-AVX2 cross-lane permutations)

PR target/91560
* config/i386/i386-expand.c (expand_vec_perm_movs,
expand_vec_perm_blend, expand_vec_perm_vpermil,
expand_vec_perm_pshufb, expand_vec_perm_1,
expand_vec_perm_pshuflw_pshufhw, expand_vec_perm_palignr,
expand_vec_perm_interleave2, expand_vec_perm_vpermq_perm_1,
expand_vec_perm_vperm2f128, expand_vec_perm_interleave3,
expand_vec_perm_vperm2f128_vblend, expand_vec_perm_2vperm2f128_vshuf,
expand_vec_perm_even_odd, expand_vec_perm_broadcast): Adjust function
comments - replace ix86_expand_vec_perm_builtin_1 with
ix86_expand_vec_perm_const_1.
(expand_vec_perm2_vperm2f128_vblend): New function.
(ix86_expand_vec_perm_const_1): New forward declaration.  Call
expand_vec_perm2_vperm2f128_vblend as last resort.
(canonicalize_perm): Formatting fix.

* gcc.dg/torture/vshuf-8.inc: Add two further permutations.

From-SVN: r275027

5 years agore PR tree-optimization/91351 (-fstrict-enums generates incorrect code)
Jakub Jelinek [Thu, 29 Aug 2019 09:20:54 +0000 (11:20 +0200)]
re PR tree-optimization/91351 (-fstrict-enums generates incorrect code)

PR tree-optimization/91351
* tree-cfg.c (generate_range_test): Use range_check_type instead of
unsigned_type_for.
* tree-cfgcleanup.c (convert_single_case_switch): Punt if
range_check_type returns NULL.
* tree-switch-conversion.c (switch_conversion::build_one_array):
Use range_check_type instead of unsigned_type_for, don't perform
linear opt if it returns NULL.
(bit_test_cluster::find_bit_tests): Formatting fix.
(bit_test_cluster::emit): Use range_check_type instead of
unsigned_type_for.
(switch_decision_tree::try_switch_expansion): Punt if range_check_type
returns NULL.

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

From-SVN: r275026

5 years agodecl.c (check_var_type): Add location_t parameter and use it.
Paolo Carlini [Thu, 29 Aug 2019 09:01:26 +0000 (09:01 +0000)]
decl.c (check_var_type): Add location_t parameter and use it.

/cp
2019-08-29  Paolo Carlini  <paolo.carlini@oracle.com>

* decl.c (check_var_type): Add location_t parameter and use it.
(grokdeclarator): Adjust call.
* pt.c (tsubst_decl): Likewise.
* cp-tree.h: Adjust declaration.

/testsuite
2019-08-29  Paolo Carlini  <paolo.carlini@oracle.com>

* g++.dg/spellcheck-typenames.C: Adjust expected locations.
* g++.dg/cpp0x/pr84676.C: Check locations.
* g++.dg/other/pr88187.C: Likewise.
* g++.dg/parse/crash13.C: Likewise.
* g++.dg/parse/crash46.C: Likewise.
* g++.dg/parse/template28.C: Likewise.
* g++.dg/parse/typename4.C: Likewise.

From-SVN: r275025

5 years agore PR tree-optimization/91568 (internal compiler error: in vect_schedule_slp_instance...
Richard Biener [Thu, 29 Aug 2019 08:07:35 +0000 (08:07 +0000)]
re PR tree-optimization/91568 (internal compiler error: in vect_schedule_slp_instance, at tree-vect-slp.c:3922)

2019-08-29  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91568
* tree-vectorizer.h (_slp_tree::max_nunits): Add.
(vect_update_max_nunits): Add overload for poly_uint64.
* tree-vect-slp.c (vect_create_new_slp_node): Initialize it.
(vect_build_slp_tree): Record max_nunits into the subtree
and merge it upwards.
(vect_print_slp_tree): Print max_nunits.

* gfortran.dg/pr91568.f: New testcase.

From-SVN: r275023

5 years agoImplement P1152R4: Deprecating some uses of volatile.
Marek Polacek [Thu, 29 Aug 2019 03:11:50 +0000 (03:11 +0000)]
Implement P1152R4: Deprecating some uses of volatile.

PR c++/91361
* c-opts.c (c_common_post_options): Enable -Wvolatile by
default for C++2a, unless -Wno-deprecated.
* c.opt (Wvolatile): New warning.

* cp-gimplify.c (cp_fold): Set TREE_THIS_VOLATILE.
* decl.c (grokdeclarator): Warn about a volatile-qualified structured
binding and return type.
(grokparms): Warn about a volatile-qualified function parameter.
* expr.c (mark_use) <case MODIFY_EXPR>: Emit a -Wvolatile warning.
* typeck.c (cp_build_unary_op): Emit a -Wvolatile warning for pre and
post ++/-- on a volatile operand.
(genericize_compound_lvalue): Use a better location.  Don't lose
TREE_THIS_VOLATILE.
(cp_build_modify_expr): Emit a -Wvolatile warning for a compound
assignment whose LHS is volatile-qualified.  Build the assignment with
a more precise location.

* doc/invoke.texi: Document -Wvolatile.

* c-c++-common/Wbool-operation-1.c: Use -Wno-volatile in C++.
* c-c++-common/gomp/atomic-1.c: Likewise.
* c-c++-common/gomp/atomic-9.c: Likewise.
* c-c++-common/gomp/depend-iterator-1.c: Likewise.
* c-c++-common/gomp/loop-1.c: Adjust warning location for C++.
* c-c++-common/gomp/order-3.c: Likewise.
* c-c++-common/pr69733.c: Use -Wno-volatile in C++.
* c-c++-common/spec-barrier-2.c: Likewise.
* c-c++-common/tm/pr54893.c: Likewise.
* g++.dg/cpp0x/pr65327.C: Add dg-warning.
* g++.dg/cpp0x/rv-conv2.C: Likewise.
* g++.dg/cpp0x/rv1n.C: Likewise.
* g++.dg/cpp0x/rv1p.C: Likewise.
* g++.dg/cpp0x/rv2n.C: Likewise.
* g++.dg/cpp0x/rv2p.C: Likewise.
* g++.dg/cpp0x/rv3n.C: Likewise.
* g++.dg/cpp0x/rv3p.C: Likewise.
* g++.dg/cpp0x/rv4n.C: Likewise.
* g++.dg/cpp0x/rv4p.C: Likewise.
* g++.dg/cpp0x/rv5n.C: Likewise.
* g++.dg/cpp0x/rv5p.C: Likewise.
* g++.dg/cpp0x/rv6n.C: Likewise.
* g++.dg/cpp0x/rv6p.C: Likewise.
* g++.dg/cpp0x/rv7n.C: Likewise.
* g++.dg/cpp0x/rv7p.C: Likewise.
* g++.dg/cpp0x/rv8p.C: Likewise.
* g++.dg/cpp0x/trailing14.C: Use -Wno-volatile.
* g++.dg/cpp1y/new1.C: Add dg-warning.
* g++.dg/cpp2a/volatile1.C: New test.
* g++.dg/cpp2a/volatile2.C: New test.
* g++.dg/cpp2a/volatile3.C: New test.
* g++.dg/cpp2a/volatile4.C: New test.
* g++.dg/expr/bool3.C: Add dg-warning.
* g++.dg/expr/bool4.C: Likewise.
* g++.dg/expr/cond9.C: Likewise.
* g++.dg/ext/vector25.C: Likewise.
* g++.dg/gomp/depend-iterator-1.C: Use -Wno-volatile.
* g++.dg/inherit/covariant21.C: Add dg-warning.
* g++.dg/init/ref18.C: Likewise.
* g++.dg/ipa/pr63838.C: Likewise.
* g++.dg/overload/rvalue2.C: Likewise.
* g++.dg/parse/semicolon4.C: Likewise.
* g++.dg/warn/Wreturn-type-4.C: Likewise.
* g++.dg/warn/pr36069.C: Likewise.
* g++.old-deja/g++.mike/p9506.C: Likewise.
* g++.old-deja/g++.other/volatile1.C: Likewise.

From-SVN: r275022

5 years agoDaily bump.
GCC Administrator [Thu, 29 Aug 2019 00:16:24 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r275021

5 years ago* es.po: Update.
Joseph Myers [Wed, 28 Aug 2019 21:40:43 +0000 (22:40 +0100)]
* es.po: Update.

From-SVN: r275012

5 years agoUpdate ABI baselines for x86 and powerpc GNU targets
Jonathan Wakely [Wed, 28 Aug 2019 21:14:58 +0000 (22:14 +0100)]
Update ABI baselines for x86 and powerpc GNU targets

* config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
* config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
* config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.

From-SVN: r275011

5 years agoruntime: move osinit to Go
Ian Lance Taylor [Wed, 28 Aug 2019 20:39:32 +0000 (20:39 +0000)]
runtime: move osinit to Go

    This is a step toward updating libgo to 1.13.  This adds the 1.13
    version of the osinit function to Go code, and removes the
    corresponding code from the C runtime.  This should simplify future updates.
    Some additional 1.13 code was brought in to simplify this change.

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

From-SVN: r275010

5 years agore PR fortran/91551 (ICE in sort_actual, at fortran/intrinsic.c:4193)
Steven G. Kargl [Wed, 28 Aug 2019 20:36:00 +0000 (20:36 +0000)]
re PR fortran/91551 (ICE in sort_actual, at fortran/intrinsic.c:4193)

2019-08-28  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91551
* intrinsic.c (sort_actual): ALLOCATED has one argument. Check for
no argument case.

2019-08-28  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91551
* gfortran.dg/allocated_3.f90

From-SVN: r275009

5 years agoPR c++/91360 - Implement C++20 P1143R2: constinit.
Marek Polacek [Wed, 28 Aug 2019 20:31:31 +0000 (20:31 +0000)]
PR c++/91360 - Implement C++20 P1143R2: constinit.

* c-common.c (c_common_reswords): Add constinit and __constinit.
(keyword_is_decl_specifier): Handle RID_CONSTINIT.
* c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
RID_LAST_CXX20.
(D_CXX20): Define.
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
* c-format.c (cxx_keywords): Add "constinit".
* c.opt (Wc++2a-compat, Wc++20-compat): New options.

* cp-tree.h (TINFO_VAR_DECLARED_CONSTINIT): Define.
(LOOKUP_CONSTINIT): Define.
(enum cp_decl_spec): Add ds_constinit.
* decl.c (check_tag_decl): Give an error for constinit in type
declarations.
(check_initializer): Also check LOOKUP_CONSTINIT.
(cp_finish_decl): Add checking for a constinit declaration.  Set
TINFO_VAR_DECLARED_CONSTINIT.
(grokdeclarator): Add checking for a declaration with the constinit
specifier.
* lex.c (init_reswords): Handle D_CXX20.
* parser.c (cp_lexer_get_preprocessor_token): Pass a better location
to warning_at.  Warn about C++20 keywords.
(cp_keyword_starts_decl_specifier_p): Handle RID_CONSTINIT.
(cp_parser_diagnose_invalid_type_name): Add an inform about constinit.
(cp_parser_decomposition_declaration): Maybe pass LOOKUP_CONSTINIT to
cp_finish_decl.
(cp_parser_decl_specifier_seq): Handle RID_CONSTINIT.
(cp_parser_init_declarator): Maybe pass LOOKUP_CONSTINIT to
cp_finish_decl.
(set_and_check_decl_spec_loc): Add "constinit".
* pt.c (tsubst_decl): Set TINFO_VAR_DECLARED_CONSTINIT.
(instantiate_decl): Maybe pass LOOKUP_CONSTINIT to cp_finish_decl.
* typeck2.c (store_init_value): If a constinit variable wasn't
initialized using a constant initializer, give an error.

* doc/invoke.texi: Document -Wc++20-compat.

* g++.dg/cpp2a/constinit1.C: New test.
* g++.dg/cpp2a/constinit2.C: New test.
* g++.dg/cpp2a/constinit3.C: New test.
* g++.dg/cpp2a/constinit4.C: New test.
* g++.dg/cpp2a/constinit5.C: New test.
* g++.dg/cpp2a/constinit6.C: New test.
* g++.dg/cpp2a/constinit7.C: New test.
* g++.dg/cpp2a/constinit8.C: New test.
* g++.dg/cpp2a/constinit9.C: New test.
* g++.dg/cpp2a/constinit10.C: New test.
* g++.dg/cpp2a/constinit11.C: New test.
* g++.dg/cpp2a/constinit12.C: New test.

From-SVN: r275008

5 years agore PR fortran/91565 (ICE in gfc_simplify_reshape, at fortran/simplify.c:6707 etc.)
Steven G. Kargl [Wed, 28 Aug 2019 20:16:57 +0000 (20:16 +0000)]
re PR fortran/91565 (ICE in gfc_simplify_reshape, at fortran/simplify.c:6707 etc.)

2019-08-28  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91565
* simplify.c (gfc_simplify_reshape): Add additional checks of the
ORDER dummy argument.

2019-08-28  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91565
* gfortran.dg/pr91565.f90: New test.

From-SVN: r275007

5 years agore PR fortran/91564 (ICE in gimplify_expr, at gimplify.c:14147)
Steven G. Kargl [Wed, 28 Aug 2019 19:54:23 +0000 (19:54 +0000)]
re PR fortran/91564 (ICE in gimplify_expr, at gimplify.c:14147)

2019-08-28  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91564
* check.c (gfc_check_kill_sub): Additional checks on status dummy
argument.

2019-08-28  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91564
* gfortran.dg/pr91564.f90: New test.

From-SVN: r275005

5 years agoAdd .clangd and compile_commands.json to .gitignore.
Martin Liska [Wed, 28 Aug 2019 19:33:28 +0000 (21:33 +0200)]
Add .clangd and compile_commands.json to .gitignore.

2019-08-28  Martin Liska  <mliska@suse.cz>

* .gitignore: Add .clangd and compile_commands.json
to .gitignore.

From-SVN: r275004

5 years agocompiler: handle unsafe conversion expression in escape analysis
Ian Lance Taylor [Wed, 28 Aug 2019 18:45:45 +0000 (18:45 +0000)]
compiler: handle unsafe conversion expression in escape analysis

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

From-SVN: r275000

5 years ago[Preprocessor] small cleanups
Nathan Sidwell [Wed, 28 Aug 2019 18:43:37 +0000 (18:43 +0000)]
[Preprocessor] small cleanups

https://gcc.gnu.org/ml/gcc-patches/2019-08/msg01904.html
* directives-only.c (_cpp_preprocess_dir_only): Use false, not
zero for _cpp_handle_directive call.
* directives.c (_cpp_handle_directive): Indented is bool.
* files.c (struct _cpp_file): Make bools 1 bit bitfields.
* internal.h (enum include_type): Reformat and comment.
(struct cpp_buffer): Make flags 1 bit bitfields.
(_cpp_handle_directive): Indented is bool.

From-SVN: r274999

5 years agocompiler, runtime: provide index information on bounds check failure
Ian Lance Taylor [Wed, 28 Aug 2019 18:27:30 +0000 (18:27 +0000)]
compiler, runtime: provide index information on bounds check failure

    This implements https://golang.org/cl/161477 in the gofrontend.

    Updates golang/go#30116

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

From-SVN: r274998

5 years agoPR tree-optimization/91457 - inconsistent warning for writing past the end of an...
Martin Sebor [Wed, 28 Aug 2019 16:43:56 +0000 (16:43 +0000)]
PR tree-optimization/91457 - inconsistent warning for writing past the end of an array member

gcc/ChangeLog:

PR tree-optimization/91457
* builtins.c (component_size): New function.
(compute_objsize): Add argument. Handle ARRAY_REF and COMPONENT_REF.
* builtins.h (compute_objsize): Add argument.
* tree-ssa-strlen.c (handle_store): Handle no-warning bit.
* tree-vrp.c (vrp_prop::check_array_ref): Return warning result.
(vrp_prop::check_mem_ref): Same.
(vrp_prop::search_for_addr_array): Set no-warning bit.
(check_array_bounds): Same.

gcc/testsuite/ChangeLog:

PR tree-optimization/91457
* c-c++-common/Wstringop-overflow-2.c: New test.
* g++.dg/warn/Warray-bounds-8.C: New test.
* g++.dg/warn/Wstringop-overflow-3.C: New test.
* gcc.dg/Wstringop-overflow-15.c: New test.

From-SVN: r274997

5 years agoPR driver/80545 - option -Wstringop-overflow not recognized by Fortran
Martin Sebor [Wed, 28 Aug 2019 16:24:38 +0000 (16:24 +0000)]
PR driver/80545 - option -Wstringop-overflow not recognized by Fortran

gcc/ChangeLog:

PR driver/80545
* opts-common.c (option_enabled): Correct checking for language
options.

From-SVN: r274996

5 years ago* config/i386/i386-features.c
Uros Bizjak [Wed, 28 Aug 2019 15:09:51 +0000 (17:09 +0200)]
* config/i386/i386-features.c
(general_scalar_chain::compute_convert_gain):
Correct cost for double-word shifts.
(general_scalar_to_vector_candidate_p): Reject count operands
greater or equal to mode bitsize.

From-SVN: r274994

5 years ago[PR 91468] Small fixes in ipa-cp.c and ipa-prop.c
Martin Jambor [Wed, 28 Aug 2019 14:26:45 +0000 (16:26 +0200)]
[PR 91468] Small fixes in ipa-cp.c and ipa-prop.c

2019-08-28  Martin Jambor  <mjambor@suse.cz>

PR ipa/91468
* ipa-cp.c (merge_agg_lats_step): Removed redundant test, made a
checking assert a normal assert to test it really is redundant.
* ipa-prop.c (compute_complex_assign_jump_func): Removed
redundant test.
(update_jump_functions_after_inlining): Removed combining unary
arithmetic operations with an ancestor jump function.
(ipcp_modif_dom_walker::before_dom_children): Fix wrong use of rhs
instead of t.

From-SVN: r274992

5 years ago[PR c++/90613] Fix using-decl debug bloat
Nathan Sidwell [Wed, 28 Aug 2019 13:36:54 +0000 (13:36 +0000)]
[PR c++/90613] Fix using-decl debug bloat

https://gcc.gnu.org/ml/gcc-patches/2019-08/msg01888.html
cp/
PR c++/90613
* name-lookup.c (cp_emit_debug_info): Check for builtins during
overload iteration.

testsuite/
PR c++/90613
* g++.dg/lookup/using61.C: New.

From-SVN: r274991

5 years agoi386-features.c (convert_scalars_to_vector): Do not add the MD problem.
Richard Biener [Wed, 28 Aug 2019 13:26:41 +0000 (13:26 +0000)]
i386-features.c (convert_scalars_to_vector): Do not add the MD problem.

2019-08-28  Richard Biener  <rguenther@suse.de>

* config/i386/i386-features.c (convert_scalars_to_vector): Do not
add the MD problem.

From-SVN: r274990

5 years agoStated standards in documentation
Mark Eggleston [Wed, 28 Aug 2019 10:21:31 +0000 (10:21 +0000)]
Stated standards in documentation

Correct the stated standards in documentation and for intrinsics and
specific intrinsics.  In C_SIZEOF the printed value is T not .TRUE..
In IPARITY example wrap BOZ constants in calls to INT.

From-SVN: r274988

5 years agore PR middle-end/89544 (Argument marshalling incorrectly assumes stack slots are...
Bernd Edlinger [Wed, 28 Aug 2019 10:20:44 +0000 (10:20 +0000)]
re PR middle-end/89544 (Argument marshalling incorrectly assumes stack slots are naturally aligned.)

2019-08-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR middle-end/89544
        * gcc.target/arm/unaligned-argument-3.c: New test.

From-SVN: r274987

5 years agoexpr.c (expand_assignment): Handle misaligned DECLs.
Bernd Edlinger [Wed, 28 Aug 2019 10:18:23 +0000 (10:18 +0000)]
expr.c (expand_assignment): Handle misaligned DECLs.

2019-09-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
    Richard Biener  <rguenther@suse.de>

* expr.c (expand_assignment): Handle misaligned DECLs.
(expand_expr_real_1): Handle FUNCTION_DECL as unaligned.
* function.c (assign_parm_adjust_stack_rtl): Check movmisalign optab
too.
(assign_parm_setup_stack): Allocate properly aligned stack slots.
* varasm.c (build_constant_desc): Align constants of misaligned types.
* config/arm/predicates.md (aligned_operand): New predicate.
* config/arm/arm.md (movdi, movsi, movhi, movhf, movsf, movdf): Use
aligned_operand to check restrictions on memory addresses.
* config/arm/neon.md (movti, mov<VSTRUCT>, mov<VH>): Likewise.
* config/arm/vec-common.md (mov<VALL>): Likewise.

Co-Authored-By: Richard Biener <rguenther@suse.de>
From-SVN: r274986

5 years agore PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime)
Jakub Jelinek [Wed, 28 Aug 2019 10:13:21 +0000 (12:13 +0200)]
re PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime)

PR libgomp/91530
* config/i386/sse.md (vec_shl_<mode>, vec_shr_<mode>): Use
V_128 iterator instead of VI_128.

* testsuite/libgomp.c/scan-21.c: New test.
* testsuite/libgomp.c/scan-22.c: New test.

From-SVN: r274985

5 years agore PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime)
Jakub Jelinek [Wed, 28 Aug 2019 10:12:11 +0000 (12:12 +0200)]
re PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime)

PR libgomp/91530
* config/i386/sse.md (vec_shl_<mode>, vec_shr_<mode>): Use
V_128 iterator instead of VI_128.

* testsuite/libgomp.c/scan-21.c: New test.
* testsuite/libgomp.c/scan-22.c: New test.

From-SVN: r274984

5 years agoRemove code leftover that has never been used.
Martin Liska [Wed, 28 Aug 2019 06:39:47 +0000 (08:39 +0200)]
Remove code leftover that has never been used.

2019-08-28  Martin Liska  <mliska@suse.cz>

PR tree-optimization/90970
* builtins.c (check_access): Remove assignment to maxread
as it hasn't been used since when it was introduced in r255755.

From-SVN: r274983

5 years agoPR c++/81676 - bogus -Wunused warnings in constexpr if.
Marek Polacek [Wed, 28 Aug 2019 02:22:29 +0000 (02:22 +0000)]
PR c++/81676 - bogus -Wunused warnings in constexpr if.

* semantics.c (maybe_mark_exp_read_r): New function.
(finish_if_stmt): Call it on THEN_CLAUSE and ELSE_CLAUSE.

* g++.dg/cpp1z/constexpr-if31.C: New test.
* g++.dg/cpp1z/constexpr-if32.C: New test.

From-SVN: r274982

5 years agoPR c++/91428 - warn about std::is_constant_evaluated in if constexpr.
Marek Polacek [Wed, 28 Aug 2019 02:03:48 +0000 (02:03 +0000)]
PR c++/91428 - warn about std::is_constant_evaluated in if constexpr.

* cp-tree.h (decl_in_std_namespace_p): Declare.
* semantics.c (is_std_constant_evaluated_p): New.
(finish_if_stmt_cond): Warn about "std::is_constant_evaluated ()" in
an if-constexpr.
* typeck.c (decl_in_std_namespace_p): No longer static.

* g++.dg/cpp2a/is-constant-evaluated9.C: New test.

From-SVN: r274981

5 years agoDaily bump.
GCC Administrator [Wed, 28 Aug 2019 00:16:21 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r274980

5 years agoPR tree-optimization/91567 - Spurious -Wformat-overflow warnings building glibc ...
Martin Sebor [Tue, 27 Aug 2019 23:31:44 +0000 (23:31 +0000)]
PR tree-optimization/91567 - Spurious -Wformat-overflow warnings building glibc (32-bit only)

gcc/ChangeLog:

PR tree-optimization/91567
* gimple-ssa-sprintf.c (get_string_length): Handle more forms of lengths
of unknown strings.
* vr-values.c (vr_values::extract_range_basic): Set strlen upper bound
to PTRDIFF_MAX - 2.

gcc/testsuite/ChangeLog:

PR tree-optimization/91567
* gcc.dg/tree-ssa/builtin-snprintf-6.c: Xfail a subset of assertions
on targets other than x86_64 to work around PR 83543.
* gcc.dg/tree-ssa/builtin-sprintf-warn-22.c: New test.

From-SVN: r274976

5 years agotree-ssa-strlen.c (printf_strlen_execute): Initialize the loop optimizer and SCEV...
Jeff Law [Tue, 27 Aug 2019 23:03:45 +0000 (17:03 -0600)]
tree-ssa-strlen.c (printf_strlen_execute): Initialize the loop optimizer and SCEV before sizing ssa_ver_to_stridx.

* tree-ssa-strlen.c (printf_strlen_execute): Initialize
the loop optimizer and SCEV before sizing ssa_ver_to_stridx.

* gcc.c-torture/compile/20190827-1.c: New test.

From-SVN: r274975

5 years agore PR fortran/91496 (!GCC$ directives error if mistyped or unknown)
Harald Anlauf [Tue, 27 Aug 2019 19:16:33 +0000 (19:16 +0000)]
re PR fortran/91496 (!GCC$ directives error if mistyped or unknown)

2019-08-27  Harald Anlauf  <anlauf@gmx.de>

PR fortran/91496
* gfortran.h: Extend struct gfc_iterator for loop annotations.
* array.c (gfc_copy_iterator): Copy loop annotations by IVDEP,
VECTOR, and NOVECTOR pragmas.
* decl.c (gfc_match_gcc_ivdep, gfc_match_gcc_vector)
(gfc_match_gcc_novector): New matcher functions handling IVDEP,
VECTOR, and NOVECTOR pragmas.
* match.h: Declare prototypes of matcher functions handling IVDEP,
VECTOR, and NOVECTOR pragmas.
* parse.c (decode_gcc_attribute, parse_do_block)
(parse_executable): Decode IVDEP, VECTOR, and NOVECTOR pragmas;
emit warning for unrecognized pragmas instead of error.
* trans-stmt.c (gfc_trans_simple_do, gfc_trans_do): Add code to
emit annotations for IVDEP, VECTOR, and NOVECTOR pragmas.
* gfortran.texi: Document IVDEP, VECTOR, and NOVECTOR pragmas.

PR fortran/91496
* gfortran.dg/pr91496.f90: New testcase.

From-SVN: r274966

5 years agosse4_1-round-roundeven-1.c (dg-options): Add -mfpmath=sse.
Uros Bizjak [Tue, 27 Aug 2019 17:37:03 +0000 (19:37 +0200)]
sse4_1-round-roundeven-1.c (dg-options): Add -mfpmath=sse.

* gcc.target/i386/sse4_1-round-roundeven-1.c (dg-options):
Add -mfpmath=sse.
* gcc.target/i386/sse4_1-round-roundeven-2.c (dg-options): Ditto.

From-SVN: r274964

5 years agore PR target/91528 (ICE in ix86_expand_prologue at i386.c:7844 since r274481)
Uros Bizjak [Tue, 27 Aug 2019 17:23:59 +0000 (19:23 +0200)]
re PR target/91528 (ICE in ix86_expand_prologue at i386.c:7844 since r274481)

PR target/91528
* config/i386/i386-features.c (convert_scalars_to_vector):
Update crtl->stack_realign_needed, crtl->stack_realign_tried and
crtl->stack_realign_processed.  Update crtl->drap_reg by calling
targetm.calls.get_drap_rtx.  If drap_rtx is non-null then
Update crtl->args.internal_arg_pointer and call fixup_tail_calls.

testsuite/ChangeLog:

PR target/91528
* gcc.target/i386/pr91528.c: New test.

From-SVN: r274962

5 years agore PR c++/83431 (-Wformat-truncation may incorrectly report truncation)
Martin Sebor [Tue, 27 Aug 2019 16:18:27 +0000 (16:18 +0000)]
re PR c++/83431 (-Wformat-truncation may incorrectly report truncation)

gcc/testsuite/ChangeLog:

PR c++/83431
PR testsuite/91562
* gcc.dg/strlenopt-8.c: Adjust pass/dump name.

From-SVN: r274961

5 years agoOptions documentation fixes.
Mark Eggleston [Tue, 27 Aug 2019 14:46:23 +0000 (14:46 +0000)]
Options documentation fixes.

Ensure that options lists fit cleanly inside the margins of a PDF page.
Reword description of option -ffrontend-loop-interchange so that it fits
cleanly inside the margins of a PDF page. Add options to those enabled
by -fdec.

From-SVN: r274958

5 years agolibgo: rebuild runtime.inc if mkruntimeinc.sh changes
Ian Lance Taylor [Tue, 27 Aug 2019 14:25:04 +0000 (14:25 +0000)]
libgo: rebuild runtime.inc if mkruntimeinc.sh changes

    The Makefile was missing a dependency.

    Also remove runtime.inc.raw in mostlyclean.

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

From-SVN: r274956

5 years agoShare a prevailing name for remove debug info symbols w/ LTO.
Martin Liska [Tue, 27 Aug 2019 13:36:15 +0000 (15:36 +0200)]
Share a prevailing name for remove debug info symbols w/ LTO.

2019-08-27  Martin Liska  <mliska@suse.cz>

PR lto/91478
* simple-object-elf.c (simple_object_elf_copy_lto_debug_sections):
First find a WEAK HIDDEN symbol in symbol table that will be
preserved.  Later, use the symbol name for all removed symbols.

From-SVN: r274955

5 years ago2019-08-27 Richard Biener <rguenther@suse.de>
Richard Biener [Tue, 27 Aug 2019 12:46:07 +0000 (12:46 +0000)]
2019-08-27  Richard Biener  <rguenther@suse.de>

* config/i386/i386-features.h
(general_scalar_chain::~general_scalar_chain): Add.
(general_scalar_chain::insns_conv): New bitmap.
(general_scalar_chain::n_sse_to_integer): New.
(general_scalar_chain::n_integer_to_sse): Likewise.
(general_scalar_chain::make_vector_copies): Adjust signature.
* config/i386/i386-features.c
(general_scalar_chain::general_scalar_chain): Outline,
initialize new members.
(general_scalar_chain::~general_scalar_chain): New.
(general_scalar_chain::mark_dual_mode_def): Record insns
we need to insert conversions at and count them.
(general_scalar_chain::compute_convert_gain): Account
for conversion instructions at chain boundary.
(general_scalar_chain::make_vector_copies): Generate a single
copy for a def by a specific insn.
(general_scalar_chain::convert_registers): First populate
defs_map, then make copies at out-of chain insns.

From-SVN: r274953

5 years agore PR c++/91415 (Invalid warning for C++17 sequencing of shift operator E1<<E2.)
Jakub Jelinek [Tue, 27 Aug 2019 12:37:30 +0000 (14:37 +0200)]
re PR c++/91415 (Invalid warning for C++17 sequencing of shift operator E1<<E2.)

PR c++/91415
* c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
like COMPOUND_EXPR rather than normal expression.

* g++.dg/warn/sequence-pt-4.C: New test.

From-SVN: r274952

5 years agore PR testsuite/91549 (gcc.dg/wrapped-binop-simplify.c fails starting with r274925)
Robin Dapp [Tue, 27 Aug 2019 12:08:58 +0000 (12:08 +0000)]
re PR testsuite/91549 (gcc.dg/wrapped-binop-simplify.c fails starting with r274925)

PR testsuite/91549

gcc/testsuite/ChangeLog:
* gcc.dg/wrapped-binop-simplify.c: Test only on x86, s390 with lp64.

From-SVN: r274951

5 years agore PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime)
Jakub Jelinek [Tue, 27 Aug 2019 10:45:55 +0000 (12:45 +0200)]
re PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime)

PR libgomp/91530
* testsuite/libgomp.c/scan-11.c: Add -msse2 option for sse2_runtime
targets.
* testsuite/libgomp.c/scan-12.c: Likewise.
* testsuite/libgomp.c/scan-13.c: Likewise.
* testsuite/libgomp.c/scan-14.c: Likewise.
* testsuite/libgomp.c/scan-15.c: Likewise.
* testsuite/libgomp.c/scan-16.c: Likewise.
* testsuite/libgomp.c/scan-17.c: Likewise.
* testsuite/libgomp.c/scan-18.c: Likewise.
* testsuite/libgomp.c/scan-19.c: Likewise.
* testsuite/libgomp.c/scan-20.c: Likewise.
* testsuite/libgomp.c++/scan-9.C: Likewise.
* testsuite/libgomp.c++/scan-10.C: Likewise.
* testsuite/libgomp.c++/scan-11.C: Likewise.
* testsuite/libgomp.c++/scan-12.C: Likewise.
* testsuite/libgomp.c++/scan-14.C: Likewise.
* testsuite/libgomp.c++/scan-15.C: Likewise.
* testsuite/libgomp.c++/scan-13.C: Likewise.  Use sse2_runtime
instead of i?86-*-* x86_64-*-* as target for scan-tree-dump-times.
* testsuite/libgomp.c++/scan-16.C: Likewise.

From-SVN: r274947

5 years ago[arm/aarch64] Add comments warning that stack-protector initializer insns shouldn...
Richard Earnshaw [Tue, 27 Aug 2019 10:05:51 +0000 (10:05 +0000)]
[arm/aarch64] Add comments warning that stack-protector initializer insns shouldn't be split

Following the publication of https://kb.cert.org/vuls/id/129209/ I've
been having a look at GCC's implementation for Arm and AArch64.  I
haven't identified any issues yet, but it's a bit early to be
completely sure.

One observation, however, is that the instruction sequence that
initializes the stack canary might be vulnerable to producing a
reusable value if it were ever split early.  I don't think we ever
would, because the memory locations involved with the stack protector
are all marked volatile to ensure that the values are only loaded at
the point in time when the test is intended to happen, and that also
has the effect of making it unlikely that the value would be reused
without reloading.  Nevertheless, defence in depth is probably
warranted here.

So this patch just adds some comments warning that the patterns should
not be split.

* config/arm/arm.md (stack_protect_set_insn): Add security-related
comment.
* config/aarch64/aarch64.md (stack_protect_set_<mode>): Likewise.

From-SVN: r274946

5 years agoFix new clang warnings.
Martin Liska [Tue, 27 Aug 2019 07:39:34 +0000 (09:39 +0200)]
Fix new clang warnings.

2019-08-27  Martin Liska  <mliska@suse.cz>

* cgraph.c (cgraph_node::remove): Remove dead assignment before
loop.
* config/i386/i386-features.c (scalar_chain::emit_conversion_insns):
Enclose in anonymous namespace.
* config/i386/x86-tune-costs.h (struct processor_costs): Wrap
hard_register initialization in braces.
* tree-vrp.h (value_range_base::supports_type_p): Return false
for function with boolean return type.

From-SVN: r274945

5 years agoDaily bump.
GCC Administrator [Tue, 27 Aug 2019 00:16:37 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r274944

5 years agore PR fortran/91390 (treatment of extra parameter in a subroutine call)
Thomas Koenig [Mon, 26 Aug 2019 20:05:32 +0000 (20:05 +0000)]
re PR fortran/91390 (treatment of extra parameter in a subroutine call)

2019-08-26  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/91390
PR fortran/91473
* frontend-passes.c (gfc_check_externals): Make
gfc_errors_to_warnings conditional on -fallow-argument-mismatch.
* invoke.texi: Document -fallow-argument-mismatch.
* lang.opt: Add -fallow-argument-mismatch.

2019-08-26  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/91390
PR fortran/91473
* gfortran.dg/used_before_typed_4.f90: Change warning to error.
* gfortran.dg/argument_checking_20.f90: New test.

From-SVN: r274937