]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
5 years agolibphobos: Correct my identity in the last ChangeLog entry
macro [Thu, 2 May 2019 17:03:25 +0000 (17:03 +0000)] 
libphobos: Correct my identity in the last ChangeLog entry

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270817 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agolibphobos: RISC-V: Fix soft-float build errors with IEEE exception flags
ibuclaw [Thu, 2 May 2019 16:38:08 +0000 (16:38 +0000)] 
libphobos: RISC-V: Fix soft-float build errors with IEEE exception flags

libphobos/ChangeLog:

* std/math.d (IeeeFlags.getIeeeFlags): Handle RISC-V soft-float ABI.
(IeeeFlags.resetIeeeFlags): Likewise.
(FloatingPointControl.getControlState): Likewise.
(FloatingPointControl.setControlState): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270815 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoMiscellaneous API doc improvements
redi [Thu, 2 May 2019 15:46:50 +0000 (15:46 +0000)] 
Miscellaneous API doc improvements

* include/bits/basic_string.h: Fix iterator/index confusion in
Doxygen comments.
* include/bits/range_access.h: Fix Doxygen warnings.
* include/bits/refwrap.h: Do not document implementation details.
(ref, cref): Group docs with reference_wrapper.
* include/std/fstream: Fix Doxygen markup.
* libsupc++/initializer_list (begin, end): Group docs with
initializer_list.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270814 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoAllow Markdown formatting in Doxygen comments
redi [Thu, 2 May 2019 15:46:46 +0000 (15:46 +0000)] 
Allow Markdown formatting in Doxygen comments

* doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270813 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoImprove docs for mutexes
redi [Thu, 2 May 2019 15:46:42 +0000 (15:46 +0000)] 
Improve docs for mutexes

* include/bits/unique_lock.h: Fix/improve doxygen markup.
* include/std/mutex: Likewise.
* include/std/shared_mutex: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270812 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoImprove docs for C++17 Filesystem library
redi [Thu, 2 May 2019 15:46:38 +0000 (15:46 +0000)] 
Improve docs for C++17 Filesystem library

* include/bits/fs_dir.h: Fix/improve doxygen markup.
* include/bits/fs_fwd.h: Likewise.
* include/bits/fs_ops.h: Likewise.
* include/bits/fs_path.h: Likewise.
* include/std/filesystem: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270811 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoImprove docs for Networking TS
redi [Thu, 2 May 2019 15:46:34 +0000 (15:46 +0000)] 
Improve docs for Networking TS

* include/experimental/bits/net.h: Fix/improve doxygen markup.
* include/experimental/buffer: Likewise.
* include/experimental/executor: Likewise.
* include/experimental/internet: Likewise.
* include/experimental/io_context: Likewise.
* include/experimental/net: Likewise.
* include/experimental/netfwd: Likewise.
* include/experimental/socket: Likewise.
* include/experimental/timer: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270810 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoImprove docs for Library Fundamentals TS
redi [Thu, 2 May 2019 15:46:29 +0000 (15:46 +0000)] 
Improve docs for Library Fundamentals TS

* doc/doxygen/doxygroups.cc: Move description of experimental group
here.
* include/experimental/algorithm: Add to libfund-ts doc group.
* include/experimental/any: Likewise. Do not document implementation
details.
* include/experimental/array: Add to libfund-ts doc group.
* include/experimental/bits/lfts_config.h: Define libfund-ts doc group
for Library Fundamentals.
* include/experimental/chrono: Add to libfund-ts doc group.
* include/experimental/deque: Likewise.
* include/experimental/forward_list: Likewise.
* include/experimental/functional: Likewise.
* include/experimental/iterator: Likewise.
* include/experimental/list: Likewise.
* include/experimental/map: Likewise.
* include/experimental/memory: Likewise.
* include/experimental/memory_resource: Likewise. Improve docs.
details.
* include/experimental/numeric: Add to libfund-ts doc group.
* include/experimental/optional: Likewise.
* include/experimental/propagate_const: Likewise.
* include/experimental/random: Likewise.
* include/experimental/ratio: Likewise.
* include/experimental/regex: Likewise.
* include/experimental/set: Likewise.
* include/experimental/source_location: Likewise.
* include/experimental/string: Likewise.
* include/experimental/string_view: Likewise.
* include/experimental/system_error: Likewise.
* include/experimental/tuple: Likewise.
* include/experimental/type_traits: Likewise.
* include/experimental/unordered_map: Likewise.
* include/experimental/unordered_set: Likewise.
* include/experimental/utility: Likewise.
* include/experimental/vector: Likewise.
* testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
* testsuite/experimental/array/neg.cc: Adjust dg-error.
* testsuite/experimental/propagate_const/assignment/move_neg.cc:
Likewise.
* testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
* testsuite/experimental/propagate_const/requirements2.cc: Likewise.
* testsuite/experimental/propagate_const/requirements3.cc: Likewise.
* testsuite/experimental/propagate_const/requirements4.cc: Likewise.
* testsuite/experimental/propagate_const/requirements5.cc: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270809 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoImprove docs for Filesystem TS
redi [Thu, 2 May 2019 15:45:32 +0000 (15:45 +0000)] 
Improve docs for Filesystem TS

* include/experimental/bits/fs_dir.h: Fix Doxygen markup.
* include/experimental/bits/fs_fwd.h: Improve docs.
* include/experimental/bits/fs_ops.h: fix Doxygen markup.
* include/experimental/bits/fs_path.h: Likewise.
(path, filesystem_error, u8path): Improve docs.
* include/experimental/filesystem: Link to docs for TS.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270808 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoImprove API docs for <memory> and <scoped_allocator>
redi [Thu, 2 May 2019 15:45:04 +0000 (15:45 +0000)] 
Improve API docs for <memory> and <scoped_allocator>

* config/allocator/new_allocator_base.h (__allocator_base): Add
workaround for Doxygen bug #6945.
* include/std/memory: Improve docs. Define group for pointer safety.
* include/std/scoped_allocator: Improve docs. Use "undocumented"
conditional to suppress documentation for implementation details.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270807 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoImprove API docs for mathematical special functions
redi [Thu, 2 May 2019 15:44:59 +0000 (15:44 +0000)] 
Improve API docs for mathematical special functions

This prevents "Mathematical Special Functions" appearing in the
top-level menu of the generated HTML docs, and adds "TR1" to the title
for the TR1 docs, to avoid duplicate titles.

* include/bits/specfun.h: Improve docs.
* include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
and namespaces.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270806 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoImprove Doxygen docs for nested namespaces
redi [Thu, 2 May 2019 15:44:55 +0000 (15:44 +0000)] 
Improve Doxygen docs for nested namespaces

* doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
(std::experimental): Add docs.
* doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
namespace to nothing when generating docs.
* include/bits/regex_constants.h (std::regex_constants): Improve docs.
* include/std/chrono (std::chrono): Likewise.
* include/std/functional (std::placeholders): Likewise.
* include/std/thread (std::this_thread): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270805 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoFix markup for Parallel Mode docs
redi [Thu, 2 May 2019 15:44:51 +0000 (15:44 +0000)] 
Fix markup for Parallel Mode docs

* include/parallel/settings.h: Fix Doxygen markup.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270804 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoAdjust Doxygen processing of pb_ds containers
redi [Thu, 2 May 2019 15:44:46 +0000 (15:44 +0000)] 
Adjust Doxygen processing of pb_ds containers

Several of the pb_ds headers are intended to be included multiple times,
within the definition of various class templates. The including files
define macros like PB_DS_CLASS_C_DEC and PB_DS_GEN_POS before including
these headers.

In some cases the types defined in the headers are actually nested types
within other classes, and so should not have been documented as though
they are declared in the global namespace, as in:
https://gcc.gnu.org/onlinedocs/gcc-8.3.0/libstdc++/api/a12028.html

In other cases the headers provide inline member function definitions,
but when processed by Doxygen the class name "PB_DS_CLASS_C_DEC" is not
recognised.

This patch makes Doxygen ignore definitions that only make sense when
included in the right context with the right macros defined.

* include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
anything unless PB_DS_CLASS_C_DEC is defined.
* include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
* include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
* include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
* include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
* include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
* include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
* include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
Likewise.
* include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
* include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
* include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
* include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
* include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
* include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
* include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
* include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
* include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
* include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
* include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
Likewise.
* include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
* include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
Likewise.
* include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270803 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoUpdate libstdc++ Doxygen config
redi [Thu, 2 May 2019 15:44:16 +0000 (15:44 +0000)] 
Update libstdc++ Doxygen config

The GROUP_NESTED_COMPOUNDS option means that types nested inside inline
namespaces or other classes will be automatically added to a Doxygen
group, e.g. this actually works as intended:

  /**
   * @defgroup chrono Time
   * @ingroup utilities
   *
   * Classes and functions for time.
   * @{
   */

  namespace chrono
  {
    template<typename _Rep, typename _Period = ratio<1>>
      struct duration;

    template<typename _Clock, typename _Dur = typename _Clock::duration>
      struct time_point;
  }

  /// @}

Currently chrono::duration and chrono::time_point are not added to the
"chrono" group. They would need an explicit @ingroup tag added to them
individually. With GROUP_NESTED_COMPOUNDS=YES they get added to the
enclosing group.

The SORT_BY_SCOPE_NAME option means that the list of classes will sort
by class name, not the full qualified-id. Currently the alphabetical
Class List for classes beginning with 'c' looks like:

  char_traits (__gnu_cxx)
  character (__gnu_cxx)
  condition_base (__gnu_cxx)
  const_iterator_
  condition_variable_any (std::_V2)
  cauchy_distribution (std)
  char_traits (std)

i.e. the list is sorted by the namespaces first, then the class names.
This is not helpful when you don't know which namespace a class might be
in, and inline namespaces with reserved names are not hidden (see
https://github.com/doxygen/doxygen/issues/5914 for a feature request to
allow that).

With SORT_BY_SCOPE_NAME=NO the list looks like:

  cauchy_distribution (std)
  char_traits (__gnu_cxx)
  char_traits (std)
  character (__gnu_cxx)
  condition_base (__gnu_cxx)
  condition_variable_any (std::_V2)
  const_iterator_

This allows you to find a class by name more easily.

Also add PREDEFINED macros so that __attribute__ and various macros like
_GLIBCXX_NO_DISCARD, _GLIBCXX14_CONSTEXPR don't appear in the generated
docs.

* doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
_GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
Doxygen expands.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270802 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agodarwin, testsuite, fix a failing test.
iains [Thu, 2 May 2019 14:55:21 +0000 (14:55 +0000)] 
darwin, testsuite, fix a failing test.

The istantiate2.C test has started to fail since Darwin's impl. of
this part of the ABI was fixed. It now emits the same output as
other platforms (and clang).

2019-05-02  Iain Sandoe  <iain@sandoe.co.uk>

* g++.dg/ext/instantiate2.C: Remove special-caseing for Darwin.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270801 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2019-05-02 Richard Biener <rguenther@suse.de>
rguenth [Thu, 2 May 2019 14:08:08 +0000 (14:08 +0000)] 
2019-05-02  Richard Biener  <rguenther@suse.de>

PR tree-optimization/89653
* tree-ssa-loop.c (pass_data_tree_loop_init): Execute
update-address-taken before the pass.
* passes.def (pass_tree_loop_init): Put comment before it.

* g++.dg/vect/pr89653.cc: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270800 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2019-05-02 Richard Biener <rguenther@suse.de>
rguenth [Thu, 2 May 2019 14:05:27 +0000 (14:05 +0000)] 
2019-05-02  Richard Biener  <rguenther@suse.de>

PR tree-optimization/89509
* tree-ssa-structalias.c (compute_dependence_clique): Look
at the first subvar when determining whether it is restrict.

* gcc.dg/torture/restrict-8.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270799 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2019-05-02 Richard Biener <rguenther@suse.de>
rguenth [Thu, 2 May 2019 13:58:47 +0000 (13:58 +0000)] 
2019-05-02  Richard Biener  <rguenther@suse.de>

PR bootstrap/85574
* Makefile.tpl (compare target): Also compare extra-compare
files.
* Makefile.in: Regenerate.

config/
* bootstrap-lto.mk (extra-compare): Set to gcc/lto1$(exeext).

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270798 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agodarwin - fix a failing test
iains [Thu, 2 May 2019 13:44:17 +0000 (13:44 +0000)] 
darwin - fix a failing test

An inflexible regex caused these tests to regress.

2019-05-02  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.dg/tree-prof/section-attr-1.c: Update scan-asm regex
for cold section label.
* gcc.dg/tree-prof/section-attr-2.c: Likewise.
* gcc.dg/tree-prof/section-attr-3.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270797 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoRestrict gcc.target/i386/spellcheck-options-5.c to Linux targets
ro [Thu, 2 May 2019 13:31:04 +0000 (13:31 +0000)] 
Restrict gcc.target/i386/spellcheck-options-5.c to Linux targets

* gcc.target/i386/spellcheck-options-5.c: Restrict to Linux and
GNU targets.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270795 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * Makefile.am (gfor_cdir): Remove $(MULTISUBDIR).
jakub [Thu, 2 May 2019 13:02:27 +0000 (13:02 +0000)] 
* Makefile.am (gfor_cdir): Remove $(MULTISUBDIR).
* Makefile.in: Regenerated.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270793 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[C++ PATCH] remove unreachable code
nathan [Thu, 2 May 2019 12:42:32 +0000 (12:42 +0000)] 
[C++ PATCH] remove unreachable code

https://gcc.gnu.org/ml/gcc-patches/2019-05/msg00039.html
* semantics.c (finish_id_expression_1): Remove unreachable code.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270792 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2019-05-02 Richard Biener <rguenther@suse.de>
rguenth [Thu, 2 May 2019 11:17:00 +0000 (11:17 +0000)] 
2019-05-02  Richard Biener  <rguenther@suse.de>

PR tree-optimization/90273
* tree-ssa-dce.c (eliminate_unnecessary_stmts): Eliminate
useless debug stmts.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270791 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[Aarch64][SVE] Dot product support
alejandro [Thu, 2 May 2019 09:58:00 +0000 (09:58 +0000)] 
[Aarch64][SVE] Dot product support

This patch does two things. For the general vectoriser, it adds support to
perform fully masked reductions over expressions that don't support masking.
This is achieved by using VEC_COND_EXPR where possible.  At the moment this is
implemented for DOT_PROD_EXPR only, but the framework is there to extend it to
other expressions.

Related to that, this patch adds support to vectorize dot product using SVE.  It
also uses the new functionality to ensure that the resulting loop is masked.

Given this input code:

uint32_t
dotprod (uint8_t *restrict x, uint8_t *restrict y, int n)
{
  uint32_t sum = 0;

  for (int i = 0; i < n; i++)
    {
      sum += x[i] * y[i];
    }

  return sum;
}

The resulting SVE code is:

0000000000000000 <dotprod>:
   0: 7100005f  cmp w2, #0x0
   4: 5400024d  b.le 4c <dotprod+0x4c>
   8: d2800003  mov x3, #0x0                    // #0
   c: 93407c42  sxtw x2, w2
  10: 2538c001  mov z1.b, #0
  14: 25221fe0  whilelo p0.b, xzr, x2
  18: 2538c003  mov z3.b, #0
  1c: d503201f  nop
  20: a4034002  ld1b {z2.b}, p0/z, [x0, x3]
  24: a4034020  ld1b {z0.b}, p0/z, [x1, x3]
  28: 0430e3e3  incb x3
  2c: 0523c000  sel z0.b, p0, z0.b, z3.b
  30: 25221c60  whilelo p0.b, x3, x2
  34: 44820401  udot z1.s, z0.b, z2.b
  38: 54ffff41  b.ne 20 <dotprod+0x20>  // b.any
  3c: 2598e3e0  ptrue p0.s
  40: 04812021  uaddv d1, p0, z1.s
  44: 1e260020  fmov w0, s1
  48: d65f03c0  ret
  4c: 1e2703e1  fmov s1, wzr
  50: 1e260020  fmov w0, s1
  54: d65f03c0  ret

Notice how udot is used inside a fully masked loop.

I tested this patch in an aarch64 machine bootstrapping the compiler and
running the checks.
gcc/Changelog:

2019-05-02  Alejandro Martinez  <alejandro.martinezvicente@arm.com>

* config/aarch64/aarch64-sve.md (<sur>dot_prod<vsi2qi>): Taken from SVE
ACLE branch.
* config/aarch64/iterators.md: Copied Vetype_fourth, VSI2QI and vsi2qi from
SVE ACLE branch.
* tree-vect-loop.c (use_mask_by_cond_expr_p): New function to check if a
VEC_COND_EXPR be inserted to emulate a conditional internal function.
(build_vect_cond_expr): Emit the VEC_COND_EXPR.
(vectorizable_reduction): Use the functions above to vectorize in a
fully masked loop codes that don't have a conditional internal
function.

gcc/testsuite/Changelog:

2019-05-02  Alejandro Martinez  <alejandro.martinezvicente@arm.com>

* gcc.target/aarch64/sve/dot_1.c: New test for dot product.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270790 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoEnhance target and target_clone error messages.
marxin [Thu, 2 May 2019 08:43:25 +0000 (08:43 +0000)] 
Enhance target and target_clone error messages.

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

* cgraphclones.c: Call valid_attribute_p with 1 for
target_clone.
* config/i386/i386-c.c (ix86_pragma_target_parse): Use 0 as
it's for target attribute.
* config/i386/i386-protos.h (ix86_valid_target_attribute_tree):
Add new boolean argument.
* config/i386/i386.c (ix86_valid_target_attribute_inner_p):
Likewise.
(ix86_valid_target_attribute_tree): Pass target_clone_attr
to ix86_valid_target_attribute_inner_p.
(ix86_valid_target_attribute_p): Pass flags argument to
ix86_valid_target_attribute_inner_p.
(get_builtin_code_for_version): Use 0 as it's target attribute.
2019-05-02  Martin Liska  <mliska@suse.cz>

* gcc.target/i386/funcspec-4.c: Update scanned pattern.
* g++.target/i386/pr57362.C: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270789 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoPostpone print of --help=* option.
marxin [Thu, 2 May 2019 08:16:12 +0000 (08:16 +0000)] 
Postpone print of --help=* option.

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

* gcc.c (process_command): Add dummy file only
if n_infiles == 0.
* opts-global.c (decode_options): Pass lang_mask.
* opts.c (print_help): New function.
(finish_options): Print --help if help_option_argument
is set.
(common_handle_option): Factor out content of OPT__help_
into print_help.
* opts.h (finish_options): Add new argument.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270788 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoPrefer to use strlen call instead of inline expansion (PR target/88809).
marxin [Thu, 2 May 2019 07:57:38 +0000 (07:57 +0000)] 
Prefer to use strlen call instead of inline expansion (PR target/88809).

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

PR target/88809
* config/i386/i386.c (ix86_expand_strlen): Use strlen call.
With -minline-all-stringops use inline expansion using 4B loop.
* doc/invoke.texi: Document the change of
-minline-all-stringops.
2019-05-02  Martin Liska  <mliska@suse.cz>

PR target/88809
* gcc.target/i386/pr88809.c: New test.
* gcc.target/i386/pr88809-2.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270787 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoDaily bump.
gccadmin [Thu, 2 May 2019 00:16:20 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270786 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago compiler: recognize and optimize map range clear
ian [Wed, 1 May 2019 21:37:00 +0000 (21:37 +0000)] 
compiler: recognize and optimize map range clear

    Recognize

            for k := range m { delete(m, k) }

    for map m, and rewrite it to runtime.mapclear, as the gc compiler
    does.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270780 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago compiler,runtime: do more direct interfaces
ian [Wed, 1 May 2019 21:34:16 +0000 (21:34 +0000)] 
compiler,runtime: do more direct interfaces

    A direct interface is an interface whose data word contains the
    actual data value, instead of a pointer to it. The gc toolchain
    creates a direct interface if the value is pointer shaped, that
    includes pointers (including unsafe.Pointer), functions, channels,
    maps, and structs and arrays containing a single pointer-shaped
    field. In gccgo, we only do this for pointers. This CL unifies
    direct interface types with gc. This reduces allocations when
    converting such types to interfaces.

    Our method functions used to always take pointer receivers, to
    make interface calls easy. Now for direct interface types, their
    value methods will take value receivers. For a pointer to those
    types, when converted to interface, the interface data contains
    the pointer. For that interface to call a value method, it will
    need a wrapper method that dereference the pointer and invokes
    the value method. The wrapper method, instead of the actual one,
    is put into the itable of the pointer type.

    In the runtime, adjust funcPC for the new layout of interfaces of
    functions.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270779 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago runtime: persistentalloc and cache itabs
ian [Wed, 1 May 2019 20:27:36 +0000 (20:27 +0000)] 
runtime: persistentalloc and cache itabs

    Previously, each time we do an interface conversion for which the
    method table is not known at compile time, we allocate a new
    method table.

    This CL ports the mechanism of itab caching from the gc runtime,
    adapted to our itab representation and method finding mechanism.
    With the cache, we reuse the same itab for the same (interface,
    concrete) type pair. This reduces allocations in interface
    conversions.

    Unlike the gc runtime, we don't prepopulate the cache with
    statically allocated itabs, as currently we don't have a way to
    find them. This means we don't deduplicate run-time allocated
    itabs with compile-time allocated ones. But that is not too bad
    -- it is just a cache anyway.

    As now itabs are never freed, it is also possible to drop the
    write barrier for writing the first word of an interface header.
    I'll leave this optimization for the future.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270778 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago* module.c (write_module): Initialize module_column before writing
abensonca [Wed, 1 May 2019 19:47:51 +0000 (19:47 +0000)] 
* module.c (write_module): Initialize module_column before writing
module to ensure line break occurs at correct column

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270777 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2019-05-01 Dominique d'Humieres <dominiq@gcc.gnu.org>
dominiq [Wed, 1 May 2019 17:40:22 +0000 (17:40 +0000)] 
2019-05-01 Dominique d'Humieres  <dominiq@gcc.gnu.org>

PR fortran/60144
* match.c (gfc_match_parens): Change the location for missing ')'.
(gfc_match_if): Detect a missing '('. Remove the spurious named
constant error. Change the wording of some errors.
(gfc_match_else): Change the wording of an error.
(gfc_match_elseif): Detect a missing '('. Improve the matching
process to get a better syntax analysis.

PR fortran/60144
* gfortran.dg/block_name_2.f90: Adjust dg-error.
* gfortran.dg/dec_type_print_3.f90.f90: Likewise
* gfortran.dg/pr60144.f90: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270776 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR tree-optimization/88797
law [Wed, 1 May 2019 17:33:32 +0000 (17:33 +0000)] 
PR tree-optimization/88797
* gimple-ssa-split-paths (is_feasible_trace): Reject cases where the
PHI feeds a conditional on the RHS of an assignment.

PR tree-optimization/88797
* g++.dg/tree-ssa/pr88797.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270775 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoUpdate Solaris baselines for GCC 9.1
ro [Wed, 1 May 2019 16:14:30 +0000 (16:14 +0000)] 
Update Solaris baselines for GCC 9.1

* config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
* config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
* config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
* config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
* config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
* config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
Likewise.
* config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
* config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270773 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[C++ PATCH] Simplify class member lookup
nathan [Wed, 1 May 2019 11:38:54 +0000 (11:38 +0000)] 
[C++ PATCH] Simplify class member lookup

https://gcc.gnu.org/ml/gcc-patches/2019-05/msg00004.html
gcc/cp/
* name-lookup.h (get_class_binding_direct): Change final arg to
bool.
(get_class_binding): Likewise.
* name-lookup.c (get_class_binding_direct): Replace TYPE_OR_FNS
arg with WANT_TYPE bool.  Simplify.
(get_class_binding): Adjust final arg.
* decl.c (reshape_init_class): Adjust get_class_binding calls.

gcc/testsuite/
* g++.dg/cpp0x/decltype9.C: Adjust expected diagnostics.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270765 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoRISC-V: Update last ChangeLog entry to mention Andrew Waterman.
wilson [Wed, 1 May 2019 04:45:34 +0000 (04:45 +0000)] 
RISC-V: Update last ChangeLog entry to mention Andrew Waterman.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270764 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoDaily bump.
gccadmin [Wed, 1 May 2019 00:16:14 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270763 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoPR libstdc++/61761 fix std::proj for targets without C99 cproj
redi [Wed, 1 May 2019 00:08:36 +0000 (00:08 +0000)] 
PR libstdc++/61761 fix std::proj for targets without C99 cproj

The current generic implementation of __complex_proj used when cproj is
not available calculates the wrong projection, giving a different result
than given by C99's cproj.

When C99 cproj is not available but isinf and copysign are, use those to
give correct results for float, double and long double. Otherwise, and
for other specializations of std::complex, just use a generic version
that returns its argument, and so doesn't support infinities.

We might want to consider adding additional overloads of __complex_proj
to support extended types such as _Float64x, _Float128 etc.

PR libstdc++/61761
* include/std/complex (__complex_proj): Return parameter unchanged.
[_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
floating-point types to take std::complex arguments.
[_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
floating-point types.
* testsuite/26_numerics/complex/proj.cc: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270759 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoRISC-V: Short-forward-branch opt for SiFive 7 series cores.
wilson [Tue, 30 Apr 2019 23:45:36 +0000 (23:45 +0000)] 
RISC-V: Short-forward-branch opt for SiFive 7 series cores.

gcc/
* config/riscv/constraints.md (L): New.
* config/riscv/predicates.md (lui_operand): New.
(sfb_alu_operand): New.
* config/riscv/riscv-protos.h (riscv_expand_conditional_move): Declare.
* config/riscv/riscv.c (riscv_expand_conditional_move): New.
* config/riscv/riscv.h (TARGET_SFB_ALU): New.
* config/riscv/risc.md (type): Add sfb_alu.
(branch<mode>): Renamed from branch_order<mode>.  Change predicate for
operand 3 to reg_or_0_operand.  In output string, change %3 to %z3.
(branch_zero<mode>): Delete.
(mov<mode>cc): New.
(mov<GPR:mode><X:mode>cc): Likewise.
* config/riscv/sifive-7.md (sifive_7_sfb_alu): New.  Use in bypasses.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270758 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[GC PATCH] Correct TS marking of _EXPR nodes
nathan [Tue, 30 Apr 2019 20:23:45 +0000 (20:23 +0000)] 
[GC PATCH] Correct TS marking of _EXPR nodes

https://gcc.gnu.org/ml/gcc-patches/2019-04/msg01266.html
gcc/
* tree.h (MARK_TS_EXP): New.

gcc/c-family/
* c-common.c (c_common_init_ts): Use MARK_TS_EXP.  Mark SIZEOF_EXPR.

gcc/cp/
* cp-objcp-common.c (cp_common_init_ts): Use MARK_TS_EXP for _EXPR
nodes.  Call c_common_init_ts.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270711 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * de.po: Update.
jsm28 [Tue, 30 Apr 2019 19:57:37 +0000 (19:57 +0000)] 
* de.po: Update.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270709 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR target/89093
jakub [Tue, 30 Apr 2019 16:30:44 +0000 (16:30 +0000)] 
PR target/89093
* gcc.target/aarch64/return_address_sign_3.c: Remove extra space in
target attribute.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270705 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * check-internal-format-escaping.py: New version using polib.
law [Tue, 30 Apr 2019 16:14:40 +0000 (16:14 +0000)] 
* check-internal-format-escaping.py: New version using polib.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270704 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * gcc.dg/sinhatanh-2.c: Count the number of functions.
law [Tue, 30 Apr 2019 15:06:31 +0000 (15:06 +0000)] 
* gcc.dg/sinhatanh-2.c: Count the number of functions.
* gcc.dg/sinhatanh-3.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270703 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * d-demangle.c (dlang_parse_assocarray): Correctly handle error result.
law [Tue, 30 Apr 2019 14:39:14 +0000 (14:39 +0000)] 
 * d-demangle.c (dlang_parse_assocarray): Correctly handle error result.
     * testsuite/d-demangle-expected: Add testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270700 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * d-demangle.c (dlang_parse_tuple): Correctly handle error result.
law [Tue, 30 Apr 2019 14:37:51 +0000 (14:37 +0000)] 
 * d-demangle.c (dlang_parse_tuple): Correctly handle error result.
     * testsuite/d-demangle-expected: Add testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270699 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * d-demangle.c (dlang_parse_structlit): Correctly handle error result.
law [Tue, 30 Apr 2019 14:36:24 +0000 (14:36 +0000)] 
* d-demangle.c (dlang_parse_structlit): Correctly handle error result.
    * testsuite/d-demangle-expected: Add testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270698 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * d-demangle.c (dlang_parse_arrayliteral): Correctly handle error result.
law [Tue, 30 Apr 2019 14:34:52 +0000 (14:34 +0000)] 
* d-demangle.c (dlang_parse_arrayliteral): Correctly handle error result.
    * testsuite/d-demangle-expected: Add testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270697 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * d-demangle.c (dlang_parse_integer): Fix stack underflow.
law [Tue, 30 Apr 2019 14:32:38 +0000 (14:32 +0000)] 
 * d-demangle.c (dlang_parse_integer): Fix stack underflow.
     * testsuite/d-demangle-expected: Add testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270696 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * cp-demangle (d_print_comp_inner): Guard against a NULL 'typed_name'.
law [Tue, 30 Apr 2019 14:22:41 +0000 (14:22 +0000)] 
* cp-demangle (d_print_comp_inner): Guard against a NULL 'typed_name'.
    * testsuite/demangle-expected: Add testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270695 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * cp-demangle.c (d_encoding): Guard against NULL return values from
law [Tue, 30 Apr 2019 14:20:11 +0000 (14:20 +0000)] 
 * cp-demangle.c (d_encoding): Guard against NULL return values from
     d_right (dc).
     * testsuite/demangle-expected: Add testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270694 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoAdd option suggestion for -Werror=foo and corresponding pragma.
marxin [Tue, 30 Apr 2019 13:50:24 +0000 (13:50 +0000)] 
Add option suggestion for -Werror=foo and corresponding pragma.

2019-04-30  Martin Liska  <mliska@suse.cz>

* opts.c (enable_warning_as_error): Provide hints
for unknown options.
2019-04-30  Martin Liska  <mliska@suse.cz>

* c-pragma.c (handle_pragma_diagnostic): Provide hints
for unknown options.
2019-04-30  Martin Liska  <mliska@suse.cz>

* gcc.dg/Werror-13.c: Add new tests for it.
* gcc.dg/pragma-diag-6.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270693 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoAdd missing dash for 2 options in documentation (PR debug/90288).
marxin [Tue, 30 Apr 2019 13:31:22 +0000 (13:31 +0000)] 
Add missing dash for 2 options in documentation (PR debug/90288).

2019-04-30  Martin Liska  <mliska@suse.cz>

PR debug/90288
* doc/invoke.texi: Add missing dash for gas-locview-support
and gno-as-locview-support.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270692 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoRemove unintended part of r270680 commit.
jakub [Tue, 30 Apr 2019 12:11:18 +0000 (12:11 +0000)] 
Remove unintended part of r270680 commit.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270691 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR target/89093
jakub [Tue, 30 Apr 2019 12:07:27 +0000 (12:07 +0000)] 
PR target/89093
* config/aarch64/aarch64.c (aarch64_process_one_target_attr): Don't skip
whitespace at the start of target attribute string.

* gcc.target/aarch64/pr89093.c: New test.
* gcc.target/aarch64/pr63304_1.c: Remove space from target string.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270690 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
jakub [Tue, 30 Apr 2019 11:40:28 +0000 (11:40 +0000)] 
* config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
to _Lock_policyE[012].
* config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270687 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[Patch AArch64] Add __ARM_FEATURE_ATOMICS
ramana [Tue, 30 Apr 2019 11:22:11 +0000 (11:22 +0000)] 
[Patch AArch64] Add __ARM_FEATURE_ATOMICS

This keeps coming up repeatedly and the ACLE has finally added
__ARM_FEATURE_ATOMICS for the LSE feature in GCC. This is now part of
the latest ACLE release
(https://developer.arm.com/docs/101028/latest/5-feature-test-macros)

I know it's late for GCC-9 but this is a simple macro which need not
wait  for another year.

Ok for trunk and to backport to all release branches ?

Tested with a simple build and a smoke test.

PR target/86538
* config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Define
__ARM_FEATURE_ATOMICS

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270686 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoFix filesystem::path tests
redi [Tue, 30 Apr 2019 10:39:59 +0000 (10:39 +0000)] 
Fix filesystem::path tests

The root_path.cc test had some debugging macros left in accidentally, so
didn't FAIL correctly if an assertion failed.

The string-char8_t.cc tests didn't compile on Windows.

* testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
macros accidentally left in.
* testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
unnecessary -lstdc++fs option. Fix test for mingw.
* testsuite/experimental/filesystem/path/native/string-char8_t.cc:
Fix test for mingw.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270685 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoRefactor gimple_fold_builtin_memory_op function.
marxin [Tue, 30 Apr 2019 09:19:41 +0000 (09:19 +0000)] 
Refactor gimple_fold_builtin_memory_op function.

2019-04-30  Martin Liska  <mliska@suse.cz>

* gimple-fold.c (gimple_fold_builtin_memory_op): Change endp
into built_in_function enum. Remove code for endp == 2 and
use BUILT_IN_* constants.
(gimple_fold_builtin): Call the function with fcode.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270682 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoFix -Wenum-compare-switch warning in i386.c.
marxin [Tue, 30 Apr 2019 09:16:36 +0000 (09:16 +0000)] 
Fix -Wenum-compare-switch warning in i386.c.

2019-04-30  Martin Liska  <mliska@suse.cz>

* config/i386/i386.c (ix86_builtin_reciprocal): Cast
DECL_FUNCTION_CODE into ix86_builtins enum before
the switch statement.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270681 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR tree-optimization/89475
jakub [Tue, 30 Apr 2019 09:07:28 +0000 (09:07 +0000)] 
PR tree-optimization/89475
* tree-ssa-ccp.c (evaluate_stmt): Handle BUILT_IN_BSWAP{16,32,64}
calls.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270680 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
jakub [Tue, 30 Apr 2019 08:55:12 +0000 (08:55 +0000)] 
* config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270678 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoWrap a string with _ for translation (PR translation/90274).
marxin [Tue, 30 Apr 2019 08:33:29 +0000 (08:33 +0000)] 
Wrap a string with _ for translation (PR translation/90274).

2019-04-30  Martin Liska  <mliska@suse.cz>

PR translation/90274
* opts.c (print_filtered_help): Wrap string in _(...).

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270675 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR tree-optimization/90240
amker [Tue, 30 Apr 2019 03:00:59 +0000 (03:00 +0000)] 
PR tree-optimization/90240
Revert:
2019-04-23  Bin Cheng  <bin.cheng@linux.alibaba.com>

PR tree-optimization/90078
* tree-ssa-loop-ivopts.c (comp_cost::operator +,-,+=,-+,/=,*=): Add
checks for infinite_cost overflow.

* gcc/testsuite/g++.dg/tree-ssa/pr90078.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270673 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoDaily bump.
gccadmin [Tue, 30 Apr 2019 00:16:15 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270672 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * sv.po: Update.
jsm28 [Mon, 29 Apr 2019 22:45:23 +0000 (22:45 +0000)] 
* sv.po: Update.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270667 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * gcc.pot: Regenerate.
jsm28 [Mon, 29 Apr 2019 22:27:52 +0000 (22:27 +0000)] 
* gcc.pot: Regenerate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270665 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * cp-demangle.c (d_expression_1): Don't peek ahead unless the current
law [Mon, 29 Apr 2019 22:19:01 +0000 (22:19 +0000)] 
* cp-demangle.c (d_expression_1): Don't peek ahead unless the current
char is valid.
* testsuite/demangle-expected: Add testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270664 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * passes.def: Move -Wrestrict pass after copy propagation.
law [Mon, 29 Apr 2019 20:21:57 +0000 (20:21 +0000)] 
* passes.def: Move -Wrestrict pass after copy propagation.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270662 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * config.gcc (default_gnu_indirect_function): Default to yes
law [Mon, 29 Apr 2019 19:48:52 +0000 (19:48 +0000)] 
* config.gcc (default_gnu_indirect_function): Default to yes
for arm*-*-netbsd*, i[34567]86-*-netbsd*, powerpc*-*-netbsd*,
sparc*-*-netbsd*, x86_64-*-netbsd*

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270661 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * tree-ssa-uninit.c (is_pred_expr_subset_of): Correctly handle cases
law [Mon, 29 Apr 2019 19:47:17 +0000 (19:47 +0000)] 
* tree-ssa-uninit.c (is_pred_expr_subset_of): Correctly handle cases
where cond2 is NE_EXPR.
(is_value_included_in): Update comment.

        * gcc.dg/uninit-25-gimple.c: New test.
        * gcc.dg/uninit-25.c: New test.
        * gcc.dg/uninit-26.c: New test.
        * gcc.dg/uninit-27-gimple.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270660 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2019-04-29 Michael K. Darling <darlingm@gmail.com>
law [Mon, 29 Apr 2019 19:31:24 +0000 (19:31 +0000)] 
2019-04-29  Michael K. Darling  <darlingm@gmail.com>

        * gnatvsn.ads: Bump Library_Version to 10.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270659 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago compiler: avoid crash on real declaration of type with existing method
ian [Mon, 29 Apr 2019 18:56:24 +0000 (18:56 +0000)] 
compiler: avoid crash on real declaration of type with existing method

    This avoids a compiler crash on invalid code.

    Fixes https://gcc.gnu.org/PR90272

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270658 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2019-04-29 Richard Biener <rguenther@suse.de>
rguenth [Mon, 29 Apr 2019 17:53:36 +0000 (17:53 +0000)] 
2019-04-29  Richard Biener  <rguenther@suse.de>

PR tree-optimization/90278
* tree-ssa-forwprop.c (pass_forwprop::execute): Transfer/clean
EH on comparison simplification.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270657 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR c++/82081 - tail call optimization breaks noexcept
jason [Mon, 29 Apr 2019 17:27:13 +0000 (17:27 +0000)] 
PR c++/82081 - tail call optimization breaks noexcept

If a noexcept function calls a function that might throw, doing the tail
call optimization means that an exception thrown in the called function
will propagate out, breaking the noexcept specification.  So we need to
prevent the optimization in that case.

* tree-tailcall.c (find_tail_calls): Don't turn a call from a
nothrow function to a might-throw function into a tail call.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270656 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[C++ PATCH] some cleanups
nathan [Mon, 29 Apr 2019 15:22:41 +0000 (15:22 +0000)] 
[C++ PATCH] some cleanups

https://gcc.gnu.org/ml/gcc-patches/2019-04/msg01174.html
* decl.c (duplicate_decls): Add whitespace, move comments into
conditional blocks.
* method.c (explain_implicit_non_constexpr): Refactor.
* pt.c (check_explicit_specialization): Fix indentation.
* semantics.c (process_outer_var_ref): Reformat.
(finish_id_expression_1): Use STRIP_TEMPLATE.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270655 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoRemove DDR_INNER_LOOP
rsandifo [Mon, 29 Apr 2019 15:17:01 +0000 (15:17 +0000)] 
Remove DDR_INNER_LOOP

...since it was only ever zero in practice.  I wondered about making
it a symbolic constant instead, but it didn't seem worth it when
there was only one user (and that user was part of the internal
tree-data-ref.c implementation).

2019-04-29  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* tree-data-ref.h (data_dependence_relation::inner_loop): Delete.
(DDR_INNER_LOOP): Likewise.
* tree-data-ref.c (dump_data_dependence_relation): Update accordingly.
(initialize_data_dependence_relation): Likewise.
(insert_innermost_unit_dist_vector): Use 0 instead of DDR_INNER_LOOP.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270654 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR rtl-optimization/90257
jakub [Mon, 29 Apr 2019 14:18:55 +0000 (14:18 +0000)] 
PR rtl-optimization/90257
* cfgrtl.c (flow_active_insn_p): Return true for USE of a function
return value.

Revert the revert:
2019-04-21  H.J. Lu  <hongjiu.lu@intel.com>

PR target/90178
Revert:
2018-11-21  Uros Bizjak  <ubizjak@gmail.com>

Revert the revert:
2013-10-26  Vladimir Makarov  <vmakarov@redhat.com>

Revert:
2013-10-25  Vladimir Makarov  <vmakarov@redhat.com>

* lra-spills.c (lra_final_code_change): Remove useless move insns.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270653 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2019-04-29 Richard Biener <rguenther@suse.de>
rguenth [Mon, 29 Apr 2019 13:54:58 +0000 (13:54 +0000)] 
2019-04-29  Richard Biener  <rguenther@suse.de>

* tree-ssa.c (insert_debug_temp_for_var_def): For {CLOBBER}
rhs issue a reset.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270652 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoAdjust doxygen comment for std::generate_n
redi [Mon, 29 Apr 2019 13:31:50 +0000 (13:31 +0000)] 
Adjust doxygen comment for std::generate_n

* include/bits/stl_algo.h (generate_n): Adjust doxygen comment.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270651 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoUse _GLIBCXX_NOEXCEPT_IF for std::swap
redi [Mon, 29 Apr 2019 13:25:38 +0000 (13:25 +0000)] 
Use _GLIBCXX_NOEXCEPT_IF for std::swap

* include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
_GLIBCXX_NOEXCEPT_IF to simplify declarations.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270650 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoPR libstdc++/71312 Increase alignment of pooled mutexes
redi [Mon, 29 Apr 2019 12:55:29 +0000 (12:55 +0000)] 
PR libstdc++/71312 Increase alignment of pooled mutexes

PR libstdc++/71312
* src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270649 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoAdd nodiscard to std::vector<bool>::empty()
redi [Mon, 29 Apr 2019 12:35:24 +0000 (12:35 +0000)] 
Add nodiscard to std::vector<bool>::empty()

We already added it to the std::vector primary template.

* include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
attribute.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270648 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoRemove unused std::_Iter_base class template
redi [Mon, 29 Apr 2019 12:12:46 +0000 (12:12 +0000)] 
Remove unused std::_Iter_base class template

This class template has been unused since __gnu_debug::__base was
removed in r263786.

* include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
class template and partial specialization.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270647 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoPR libstdc++/87982 Fix generate_n and fill_n use of _Size parameter
redi [Mon, 29 Apr 2019 12:12:43 +0000 (12:12 +0000)] 
PR libstdc++/87982 Fix generate_n and fill_n use of _Size parameter

The standard only requires that _Size can be converted to an integral
type, not that it can be used for arithmetic. Add a new set of
__size_to_integer helper functions to do the conversion (which will be
ambiguous if there is no one conversion that is better than any others).

Also add tests for DR 426 which requires these algorithms and search_n
to handle negative values of n.

PR libstdc++/87982
* include/bits/stl_algo.h (generate_n): Convert _Size parameter to
an integral type.
* include/bits/stl_algobase.h (__size_to_integer): New overloaded
functions to convert a value to an integral type.
(__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
(fill_n): Convert _Size parameter to an integral type.
* testsuite/25_algorithms/fill_n/dr426.cc: New test.
* testsuite/25_algorithms/generate_n/87982.cc: New test.
* testsuite/25_algorithms/generate_n/dr426.cc: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270646 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agolibphobos: Fix multilib builds for s390x-linux-gnu
ibuclaw [Mon, 29 Apr 2019 05:42:48 +0000 (05:42 +0000)] 
libphobos: Fix multilib builds for s390x-linux-gnu

Merges upstream druntime aab44549, phobos 3dc363783.

Reviewed-on: https://github.com/dlang/druntime/pull/2590
     https://github.com/dlang/phobos/pull/6983

libphobos/ChangeLog:

2019-04-28  Iain Buclaw  <ibuclaw@gdcproject.org>

* libdruntime/gcc/sections/elf_shared.d (IBMZ_Any): Define when
version S390 or SystemZ.  Use condition instead of SystemZ.
(getTLSRange): Return null on GNU_EMUTLS targets.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270639 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agolibphobos: Backport minimal MinGW support patches.
ibuclaw [Mon, 29 Apr 2019 05:42:36 +0000 (05:42 +0000)] 
libphobos: Backport minimal MinGW support patches.

Merges upstream druntime 1ca80e4e, phobos b5e9661a0.

Reviewed-on: https://github.com/dlang/druntime/pull/2587
     https://github.com/dlang/phobos/pull/6981

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270638 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoDaily bump.
gccadmin [Mon, 29 Apr 2019 00:16:17 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270637 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoFix ChangeLog format
redi [Sun, 28 Apr 2019 21:38:19 +0000 (21:38 +0000)] 
Fix ChangeLog format

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270633 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoAdding noexcept-specification on tuple constructors (LWG 2899)
ville [Sun, 28 Apr 2019 21:17:50 +0000 (21:17 +0000)] 
Adding noexcept-specification on tuple constructors (LWG 2899)

2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>

* libstdc++-v3/include/std/tuple:
(tuple()): Add noexcept-specification.
(tuple(const _Elements&...)): Likewise
(tuple(_UElements&&...)): Likewise
(tuple(const tuple<_UElements...>&)): Likewise
(tuple(tuple<_UElements...>&&)): Likewise
(tuple(const _T1&, const _T2&)): Likewise
(tuple(_U1&&, _U2&&)): Likewise
(tuple(const tuple<_U1, _U2>&): Likewise
(tuple(tuple<_U1, _U2>&&): Likewise
(tuple(const pair<_U1, _U2>&): Likewise
(tuple(pair<_U1, _U2>&&): Likewise
* libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270632 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoDaily bump.
gccadmin [Sun, 28 Apr 2019 00:16:20 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270630 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR c++/90173
jakub [Sat, 27 Apr 2019 21:56:17 +0000 (21:56 +0000)] 
PR c++/90173
* g++.dg/cpp1z/class-deduction66.C: Use dg-do compile instead of
dg-do run.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270626 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[netbsd] d: Fix build failures on sparc*-netbsd
ibuclaw [Sat, 27 Apr 2019 16:52:26 +0000 (16:52 +0000)] 
[netbsd] d: Fix build failures on sparc*-netbsd

gcc/ChangeLog:

2019-04-27  Iain Buclaw  <ibuclaw@gdcproject.org>

* config/netbsd-d.c: Include memmodel.h.  Remove unused tree.h,
varasm.h, and netbsd-protos.h.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270625 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoUse __restrict for __relocate_object_a
glisse [Sat, 27 Apr 2019 14:09:20 +0000 (14:09 +0000)] 
Use __restrict for __relocate_object_a

2019-04-27  Marc Glisse  <marc.glisse@inria.fr>

PR libstdc++/87106
* include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
arguments with __restrict.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270624 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR target/89261
uros [Sat, 27 Apr 2019 13:38:19 +0000 (13:38 +0000)] 
PR target/89261
* config/i386/i386-protos.h (ix86_data_alignment): Change
the second argument type to unsigned int.
* config/i386/i386.c (ix86_data_alignment): Change "align"
argument type to unsigned int.

testsuite/ChangeLog:

PR target/89261
* gcc.target/i386/pr89261.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270623 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoAdd missing target options (PR middle-end/90258).
marxin [Sat, 27 Apr 2019 06:33:29 +0000 (06:33 +0000)] 
Add missing target options (PR middle-end/90258).

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

PR middle-end/90258
* opt-suggestions.c (option_proposer::build_option_suggestions):
When get_valid_option_values returns empty values, add the
misspelling candidate.
2019-04-27  Martin Liska  <mliska@suse.cz>

PR middle-end/90258
* gcc.dg/completion-5.c: New test.
* gcc.target/i386/spellcheck-options-5.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270622 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoRISC-V: Promode modes of constant loads for store insns.
wilson [Sat, 27 Apr 2019 00:46:20 +0000 (00:46 +0000)] 
RISC-V: Promode modes of constant loads for store insns.

This improves optimization of code storing constants to memory.  Given this
testcase:
    void sub1 (int *a, long long *b) { *a = 1; *b = 1; }
an unpatched rv64 compiler emits two li instructions, one for an SImode pseudo
and one for a DImode pseudo.  With the patch, we get a single DImode li insn.

gcc/
* config/riscv/riscv-protos.h (riscv_move_integer): Add machine_mode
parameter.
* config/riscv/riscv.c (riscv_move_integer): New parameter orig_mode.
Pass orig_mode to riscv_build_integer.
(riscv_split_integer): Pass mode to riscv_move_integer.
(riscv_legitimize_const_move): Likewise.
(riscv_legitimize_move): For MEM dest and CONST_INT src case, new local
promoted_mode.  Replace force_reg call with code to load constant into
promoted reg and then subreg it for the store.
* config/riscv/riscv.md (low<mode>+1): Pass <GPR:MODE>mode to
riscv_move_integer.

gcc/testsuite/
* gcc.target/riscv/load-immediate.c: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270621 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoDaily bump.
gccadmin [Sat, 27 Apr 2019 00:16:32 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270620 138bc75d-0d04-0410-961f-82ee72b054a4