]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
5 years ago[arm] Backport -- Fix multilibs for Armv7-R
Mihail Ionescu [Thu, 24 Oct 2019 16:55:18 +0000 (16:55 +0000)] 
[arm] Backport -- Fix multilibs for Armv7-R

gcc/ChangeLog:
2019-10-24  Mihail Ionescu  <mihail.ionescu@arm.com>

Backport from mainline
2019-10-18  Andre Vieira  <andre.simoesdiasvieira@arm.com>

* config/arm/t-multilib: Add new multilib variants and new
mappings.

gcc/testsuite/ChangeLog:
2019-10-24  Mihail Ionescu  <mihail.ionescu@arm.com>

Backport from mainline
2019-10-18  Andre Vieira  <andre.simoesdiasvieira@arm.com>

* gcc.target/arm/multilib.exp: Add extra tests.

From-SVN: r277417

5 years ago[Darwin, PPC] Check for out of range asm values.
Iain Sandoe [Thu, 24 Oct 2019 14:53:28 +0000 (14:53 +0000)] 
[Darwin, PPC] Check for out of range asm values.

There are some cases in which the value for the max skip to a p2align
directive can be negative. The older assembler (and GAS) just ignores
these cases but newer tools produce an error. To preserve behaviour,
we avoid emitting out of range values.

gcc/ChangeLog:

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

Backport from mainline
2019-10-23  Iain Sandoe  <iain@sandoe.co.uk>

* config/rs6000/darwin.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Guard
against out of range max skip or log values.

From-SVN: r277405

5 years agoPR libstdc++/90682 allow set_terminate(0) and set_unexpected(0)
Jonathan Wakely [Thu, 24 Oct 2019 12:55:27 +0000 (13:55 +0100)] 
PR libstdc++/90682 allow set_terminate(0) and set_unexpected(0)

Make these functions restore the default handlers when passed a null
pointer. This is consistent with std::pmr::set_default_resource(0), and
also matches the current behaviour of libc++.

In order to avoid duplicating the preprocessor condition from
eh_term_handler.cc more that into a new eh_term_handler.h header and
define a macro that can be used in both eh_term_handler.cc and
eh_terminate.cc.

Backport from mainline
2019-05-31  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/90682
* libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
* libsupc++/eh_term_handler.h: New header defining
_GLIBCXX_DEFAULT_TERM_HANDLER.
* libsupc++/eh_terminate.cc: Include eh_term_handler.h.
(set_terminate): Restore default handler when argument is null.
(set_unexpected): Likewise.
* testsuite/18_support/set_terminate.cc: New test.
* testsuite/18_support/set_unexpected.cc: New test.

From-SVN: r277393

5 years agoPR libstdc++/61761 fix std::proj for targets without C99 cproj
Jonathan Wakely [Thu, 24 Oct 2019 12:55:21 +0000 (13:55 +0100)] 
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.

Backport from mainline
2019-05-01  Jonathan Wakely  <jwakely@redhat.com>

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.

From-SVN: r277392

5 years agoFix more failing tests for C++98 mode
Jonathan Wakely [Thu, 24 Oct 2019 12:55:14 +0000 (13:55 +0100)] 
Fix more failing tests for C++98 mode

Backport from mainline
2019-06-06  Jonathan Wakely  <jwakely@redhat.com>

* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
dg-prune-output for different C++98 diagnostic.
* testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
Likewise.
* testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
Likewise.
* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
Likewise.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
Likewise.
* testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
Likewise.
* testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
Likewise.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
Likewise.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
Likewise.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Likewise.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Likewise.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
Likewise.
* testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.

From-SVN: r277391

5 years agoFix tests that fail with -std=gnu++98 or -std=gnu++11
Jonathan Wakely [Thu, 24 Oct 2019 12:55:08 +0000 (13:55 +0100)] 
Fix tests that fail with -std=gnu++98 or -std=gnu++11

Backport from mainline
2019-06-06  Jonathan Wakely  <jwakely@redhat.com>

* testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
void.
* testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
include Library Fundamentals or Networking headers in C++11 mode.
* testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.

From-SVN: r277390

5 years agoFix indentation in testsuite utility header
Jonathan Wakely [Thu, 24 Oct 2019 12:55:03 +0000 (13:55 +0100)] 
Fix indentation in testsuite utility header

Backport from mainline
2019-05-14  Jonathan Wakely  <jwakely@redhat.com>

* testsuite/util/testsuite_allocator.h (memory_resource)
(default_resource_mgr): Fix indentation.

From-SVN: r277389

5 years agoPR libstdc++/89164 enforce constraints for uninitialized algos
Jonathan Wakely [Thu, 24 Oct 2019 12:54:58 +0000 (13: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.

Backport from mainline
2019-08-30  Jonathan Wakely  <jwakely@redhat.com>

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: r277388

5 years agoDo not declare std::uses_allocator before C++11
Jonathan Wakely [Thu, 24 Oct 2019 12:54:50 +0000 (13:54 +0100)] 
Do not declare std::uses_allocator before C++11

Backport from mainline
2019-10-22  Jonathan Wakely  <jwakely@redhat.com>

* include/bits/memoryfwd.h (uses_allocator): Do not declare for C++98.
* testsuite/17_intro/names.cc: Check uses_allocator in C++98.

From-SVN: r277387

5 years agoPR libstdc++/92143 adjust for OS X aligned_alloc behaviour
Jonathan Wakely [Thu, 24 Oct 2019 12:54:44 +0000 (13:54 +0100)] 
PR libstdc++/92143 adjust for OS X aligned_alloc behaviour

OS X 10.15 adds aligned_alloc but it has the same restriction as the AIX
version, namely that alignments smaller than sizeof(void*) are not
supported.

Backport from mainline
2019-10-18  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/92143
* libsupc++/new_opa.cc (operator new) [__APPLE__]: Increase alignment
to at least sizeof(void*).

From-SVN: r277386

5 years agoFix more tests that fail in C++2a mode
Jonathan Wakely [Thu, 24 Oct 2019 12:54:40 +0000 (13:54 +0100)] 
Fix more tests that fail in C++2a mode

Backport from mainline
2019-06-06  Jonathan Wakely  <jwakely@redhat.com>

* testsuite/23_containers/unordered_map/requirements/debug_container.cc:
Do not test allocator rebinding extension for C++2a.
* testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
dg-do directive for C++17 and C++2a.

From-SVN: r277385

5 years agoFix testsuite bugs
Jonathan Wakely [Thu, 24 Oct 2019 12:54:35 +0000 (13:54 +0100)] 
Fix testsuite bugs

One of the static assertions in 20_util/function_objects/invoke/1.cc was
wrong, but didn't fail because by default it was compiled with
-std=gnu++14 which didn't use that static assertion. Split out the C++17
parts to a new file that always runs with -std=gnu++17, so those checks
are always done. Also backport some extra tests from an earlier commit
on trunk (r271173).

The 23_containers/unordered_set/allocator/ext_ptr.cc test is supposed to
be a run-time test but was unintentionally compile-only.

Backport from mainline
2019-05-23  Jonathan Wakely  <jwakely@redhat.com>

* testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
Move C++17-specific tests to ...
* testsuite/20_util/function_objects/invoke/3.cc: New test.
* testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
"compile" test to "run".

From-SVN: r277384

5 years agoAdd makefile target to update HTML files in source tree
Jonathan Wakely [Thu, 24 Oct 2019 12:54:30 +0000 (13:54 +0100)] 
Add makefile target to update HTML files in source tree

Also remove the creation of the html/ext sub-directory, which has been
unused since revision r245258.

Backport from mainline
2019-10-08  Jonathan Wakely  <jwakely@redhat.com>

* doc/Makefile.am (doc-html-docbook-regenerate): New target.
(${docbook_outdir}/html): Do not create unused 'html/ext' directory.
* doc/Makefile.in: Regenerate.
* doc/xml/manual/documentation_hacking.xml: Document new target.
* doc/html/*: Regenerate.

From-SVN: r277383

5 years agoUpdate URL for CUJ article in libstdc++ docs
Jonathan Wakely [Thu, 24 Oct 2019 12:54:23 +0000 (13:54 +0100)] 
Update URL for CUJ article in libstdc++ docs

* doc/xml/manual/allocator.xml: Use archived copy of CUJ article.

From-SVN: r277382

5 years agoUpdate URL for Hoard in libstdc++ docs
Jonathan Wakely [Thu, 24 Oct 2019 12:54:18 +0000 (13:54 +0100)] 
Update URL for Hoard in libstdc++ docs

Backport from mainline
2019-05-31  Gerald Pfeifer  <gerald@pfeifer.com>

* doc/xml/manual/allocator.xml: Move hoard.org back to http.

From-SVN: r277381

5 years agoPR libstdc++/91456 make INVOKE<R> work with uncopyable prvalues
Jonathan Wakely [Thu, 24 Oct 2019 12:54:13 +0000 (13:54 +0100)] 
PR libstdc++/91456 make INVOKE<R> work with uncopyable prvalues

In C++17 a function can return a prvalue of a type that cannot be moved
or copied. The current implementation of std::is_invocable_r uses
std::is_convertible to test the conversion to R required by INVOKE<R>.
That fails for non-copyable prvalues, because std::is_convertible is
defined in terms of std::declval which uses std::add_rvalue_reference.
In C++17 conversion from R to R involves no copies and so is not the
same as conversion from R&& to R.

This commit changes std::is_invocable_r to check the conversion without
using std::is_convertible.

std::function also contains a similar check using std::is_convertible,
which can be fixed by simply reusing std::is_invocable_r (but because
std::is_invocable_r is not defined for C++11 it uses the underlying
std::__is_invocable_impl trait directly).

Backport from mainline
2019-08-15  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/91456
* include/bits/std_function.h (__check_func_return_type): Remove.
(function::_Callable): Use std::__is_invocable_impl instead of
__check_func_return_type.
* include/std/type_traits (__is_invocable_impl): Add another defaulted
template parameter. Define a separate partial specialization for
INVOKE and INVOKE<void>. For INVOKE<R> replace is_convertible check
with a check that models delayed temporary materialization.
* testsuite/20_util/function/91456.cc: New test.
* testsuite/20_util/is_invocable/91456.cc: New test.

From-SVN: r277380

5 years agoInclude netinet/in.h in include/experimental/internet
Jonathan Wakely [Thu, 24 Oct 2019 12:54:09 +0000 (13:54 +0100)] 
Include netinet/in.h in include/experimental/internet

Backport from mainline
2019-09-30  Andreas Tobler  <andreast@gcc.gnu.org>

* include/experimental/internet: Include netinet/in.h if we have
_GLIBCXX_HAVE_NETINET_IN_H defined.

From-SVN: r277379

5 years agoFix array index error in address_v6 comparisons
Jonathan Wakely [Thu, 24 Oct 2019 12:54:05 +0000 (13:54 +0100)] 
Fix array index error in address_v6 comparisons

Backport from mainline
2019-09-26  Jonathan Wakely  <jwakely@redhat.com>

* include/experimental/internet (operator==, operator<): Fix loop
condition to avoid reading past the end of the array.

From-SVN: r277378

5 years agoP1651R0 bind_front should not unwrap reference_wrapper
Jonathan Wakely [Thu, 24 Oct 2019 12:54:00 +0000 (13:54 +0100)] 
P1651R0 bind_front should not unwrap reference_wrapper

Backport from mainline
2019-08-06  Jonathan Wakely  <jwakely@redhat.com>

P1651R0 bind_front should not unwrap reference_wrapper
* include/std/functional (bind_front): Don't unwrap reference_wrapper.
* include/std/version (__cpp_lib_bind_front): Update value.
* testsuite/20_util/function_objects/bind_front/1.cc: Fix test for
feature test macro.
* testsuite/20_util/function_objects/bind_front/2.cc: New test.

From-SVN: r277377

5 years agoPR libstdc++/92059 fix several bugs in tr2::dynamic_bitset
Jonathan Wakely [Thu, 24 Oct 2019 12:53:55 +0000 (13:53 +0100)] 
PR libstdc++/92059 fix several bugs in tr2::dynamic_bitset

Backport from mainline
2019-10-11  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/92059
* include/tr2/dynamic_bitset (__dynamic_bitset_base): Define all
special member functions as defaulted. Add noexcept to most members.
(__dynamic_bitset_base(size_t, unsigned long long, const _Alloc&)):
Mask off unwanted bits in the __val parameter. Avoid undefined left
shifts.
(__dynamic_bitset_base::_M_assign): Remove.
(__dynamic_bitset_base::_M_do_reset): Use std::fill.
(__dynamic_bitset_base::_M_are_all_aux): Avoid integer promotion when
block_type has lower rank than int.
(dynamic_bitset): Add noexcept to most members. Use injected-class-name
in return types and parameter types.
(dynamic_bitset::_M_Nb): Add default member initializer.
(dynamic_bitset(), dynamic_bitset(const dynamic_bitset&)): Define as
defaulted.
(dynamic_bitset(dynamic_bitset&&)): Clear source object after move.
(dynamic_bitset::operator=(const dynamic_bitset&)): Define as
defaulted.
(dynamic_bitset::operator=(dynamic_bitset&&)): Add noexcept-specifier.
Define without using swap, to propagate allocator correctly.
(dynamic_bitset(const char*, const _Alloc&)): Use strlen.
(dynamic_bitset::_M_do_sanitize, dynamic_bitset::_M_do_fill): Use
casts to avoid unwanted integer promotions.
(dynamic_bitset::_M_copy_from_ptr): Rearrange template parameters and
add default template arguments and default argument to simplify usage.
(dynamic_bitset::_M_copy_from_string): Adjust call to _M_copy_from_ptr.
(operator==(const dynamic_bitset&, const dynamic_bitset&))
(operator<(const dynamic_bitset&, const dynamic_bitset&)): Use _M_Nb.
* include/tr2/dynamic_bitset.tcc (dynamic_bitset::_M_copy_from_ptr):
Adjust template parameters to match declaration.
* testsuite/tr2/dynamic_bitset/cmp.cc: New test.
* testsuite/tr2/dynamic_bitset/cons.cc: New test.
* testsuite/tr2/dynamic_bitset/copy.cc: New test.
* testsuite/tr2/dynamic_bitset/move.cc: New test.
* testsuite/tr2/dynamic_bitset/pr92059.cc: New test.

From-SVN: r277376

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

From-SVN: r277361

5 years agobackport: config.gcc: Move -L usage from LINK_OS_EXTRA_SPEC32 and LINK_OS_EXTRA_SPEC6...
Peter Bergner [Wed, 23 Oct 2019 21:34:42 +0000 (21:34 +0000)] 
backport: config.gcc: Move -L usage from LINK_OS_EXTRA_SPEC32 and LINK_OS_EXTRA_SPEC64 to...

Backport from mainline
2019-10-08  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>

* config.gcc: Move -L usage from LINK_OS_EXTRA_SPEC32 and
LINK_OS_EXTRA_SPEC64 to MD_STARTFILE_PREFIX and
MD_STARTFILE_PREFIX_1 when using --with-advance-toolchain.

From-SVN: r277353

5 years agoBackport r276178
Martin Liska [Wed, 23 Oct 2019 12:16:28 +0000 (14:16 +0200)] 
Backport r276178

2019-10-23  Martin Liska  <mliska@suse.cz>

Backport from mainline
2019-09-27  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/91885
* gcc.dg/pr91885.c (__int64_t): Change from long to long long.
(__uint64_t): Change from unsigned long to unsigned long long.

From-SVN: r277318

5 years agoBackport r276141
Martin Liska [Wed, 23 Oct 2019 12:12:57 +0000 (14:12 +0200)] 
Backport r276141

2019-10-23  Martin Liska  <mliska@suse.cz>

Backport from mainline
2019-09-26  Martin Liska  <mliska@suse.cz>

PR tree-optimization/91885
* tree-vectorizer.c (try_vectorize_loop_1):
Add TODO_update_ssa_only_virtuals similarly to what slp
pass does.
2019-10-23  Martin Liska  <mliska@suse.cz>

Backport from mainline
2019-09-26  Martin Liska  <mliska@suse.cz>

PR tree-optimization/91885
* gcc.dg/pr91885.c: New test.

From-SVN: r277317

5 years agore PR tree-optimization/92131 (incorrect assumption that (ao >= 0) is always false)
Eric Botcazou [Wed, 23 Oct 2019 11:37:28 +0000 (11:37 +0000)] 
re PR tree-optimization/92131 (incorrect assumption that (ao >= 0) is always false)

PR tree-optimization/92131
* tree-vrp.c (extract_range_from_plus_minus_expr): If the resulting
range would be symbolic, drop to varying for any explicit overflow
in the constant part or if neither range is a singleton.

From-SVN: r277315

5 years agobackport: re PR debug/91887 (-fdebug-types-section ICE building chromium)
Richard Biener [Wed, 23 Oct 2019 10:32:06 +0000 (10:32 +0000)] 
backport: re PR debug/91887 (-fdebug-types-section ICE building chromium)

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

Backport from mainline
2019-10-17  Richard Biener  <rguenther@suse.de>

PR debug/91887
* dwarf2out.c (gen_formal_parameter_die): Also try to match
context_die against a DW_TAG_GNU_formal_parameter_pack parent.

* g++.dg/debug/dwarf2/pr91887.C: New testcase.

From-SVN: r277312

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

From-SVN: r277305

5 years agore PR fortran/92174 (runtime error: index 15 out of bounds for type 'gfc_expr *[15])
Steven G. Kargl [Tue, 22 Oct 2019 18:38:30 +0000 (18:38 +0000)] 
re PR fortran/92174 (runtime error: index 15 out of bounds for type 'gfc_expr *[15])

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

PR fortran/92174
* decl.c (attr_decl1): Move check for F2018:C822 from here ...
* array.c (gfc_set_array_spec): ... to here.

From-SVN: r277298

5 years agoPR c++/92062 - ODR-use ignored for static member of class template.
Marek Polacek [Tue, 22 Oct 2019 15:46:47 +0000 (15:46 +0000)] 
PR c++/92062 - ODR-use ignored for static member of class template.

* pt.c (has_value_dependent_address): Strip location wrappers.

* g++.dg/cpp0x/constexpr-odr1.C: New test.
* g++.dg/cpp0x/constexpr-odr2.C: New test.

From-SVN: r277295

5 years agoPR c++/92106 - ICE with structured bindings and -Wreturn-local-addr.
Marek Polacek [Tue, 22 Oct 2019 15:21:34 +0000 (15:21 +0000)] 
PR c++/92106 - ICE with structured bindings and -Wreturn-local-addr.

* typeck.c (maybe_warn_about_returning_address_of_local): Avoid
recursing on null initializer and return false instead.

From-SVN: r277294

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

From-SVN: r277275

5 years agobackport: re PR tree-optimization/92056 (ice in expr_object_size, at tree-object...
Jakub Jelinek [Mon, 21 Oct 2019 11:49:18 +0000 (13:49 +0200)] 
backport: re PR tree-optimization/92056 (ice in expr_object_size, at tree-object-si ze.c:675 with -O3)

Backported from mainline
2019-10-17  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/92056
* tree-object-size.c (cond_expr_object_size): Return early if then_
processing resulted in unknown size.

* gcc.c-torture/compile/pr92056.c: New test.

From-SVN: r277259

5 years agobackport: re PR fortran/87752 (ICE in omp_add_variable, at gimplify.c:6776)
Jakub Jelinek [Mon, 21 Oct 2019 11:48:34 +0000 (13:48 +0200)] 
backport: re PR fortran/87752 (ICE in omp_add_variable, at gimplify.c:6776)

Backported from mainline
2019-10-17  Jakub Jelinek  <jakub@redhat.com>

PR fortran/87752
* gfortran.dg/gomp/pr87752.f90: New test.

From-SVN: r277258

5 years agobackport: re PR tree-optimization/91734 (gcc skip an if statement with "-O1 -ffast...
Jakub Jelinek [Mon, 21 Oct 2019 11:48:00 +0000 (13:48 +0200)] 
backport: re PR tree-optimization/91734 (gcc skip an if statement  with "-O1 -ffast-math")

Backported from mainline
2019-10-05  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/91734
* generic-match-head.c: Include fold-const-call.h.
* match.pd (sqrt(x) cmp c): Check the boundary value and
in case inexact computation of c*c affects comparison of the boundary,
turn LT_EXPR into LE_EXPR, GE_EXPR into GT_EXPR, LE_EXPR into LT_EXPR
or GT_EXPR into GE_EXPR.  Punt for sqrt comparisons against NaN and
for -frounding-math.  For c2, try the next smaller or larger floating
point constant depending on comparison code and if it has the same
sqrt as c2, use it instead of c2.

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

From-SVN: r277257

5 years agobackport: re PR c++/91974 (function not sequenced before function argument)
Jakub Jelinek [Mon, 21 Oct 2019 11:47:09 +0000 (13:47 +0200)] 
backport: re PR c++/91974 (function not sequenced before function argument)

Backported from mainline
2019-10-04  Jakub Jelinek  <jakub@redhat.com>

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

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

From-SVN: r277256

5 years agobackport: re PR c++/91925 (-fpack-struct causes a decltype with template to ICE)
Jakub Jelinek [Mon, 21 Oct 2019 11:46:21 +0000 (13:46 +0200)] 
backport: re PR c++/91925 (-fpack-struct causes a decltype with template to ICE)

Backported from mainline
2019-10-01  Jakub Jelinek  <jakub@redhat.com>

PR c++/91925
* c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
with NULL DECL_FIELD_OFFSET.

* g++.dg/conversion/packed2.C: New test.

From-SVN: r277255

5 years agobackport: re PR bootstrap/90543 (Build failure on MINGW for gcc-9.1.0)
Jakub Jelinek [Mon, 21 Oct 2019 11:45:27 +0000 (13:45 +0200)] 
backport: re PR bootstrap/90543 (Build failure on MINGW for gcc-9.1.0)

Backported from mainline
2019-09-29  Jakub Jelinek  <jakub@redhat.com>

PR bootstrap/90543
* optc-save-gen.awk: Fix up printing string option differences.

From-SVN: r277254

5 years agobackport: re PR c++/88203 (assert does not compile with OpenMP's pragma omp parallel...
Jakub Jelinek [Mon, 21 Oct 2019 11:44:53 +0000 (13:44 +0200)] 
backport: re PR c++/88203 (assert does not compile with OpenMP's pragma omp parallel for default(none))

Backported from mainline
2019-09-27  Jakub Jelinek  <jakub@redhat.com>

PR c++/88203
* c-common.h (c_omp_predefined_variable): Declare.
* c-omp.c (c_omp_predefined_variable): New function.
(c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
for predefined variables.

* c-parser.c (c_parser_predefined_identifier): New function.
(c_parser_postfix_expression): Use it.
(c_parser_omp_variable_list): Parse predefined identifiers.
* c-typeck.c (c_finish_omp_clauses): Allow predefined variables
in shared and firstprivate clauses, even when they are predetermined
shared.

* parser.c (cp_parser_omp_var_list_no_open): Parse predefined
variables.
* semantics.c (finish_omp_clauses): Allow predefined variables in
shared and firstprivate clauses, even when they are predetermined
shared.
* cp-gimplify.c (cxx_omp_predetermined_sharing_1): Return
OMP_CLAUSE_DEFAULT_SHARED for predefined variables.

* c-c++-common/gomp/pr88203-1.c: New test.
* c-c++-common/gomp/pr88203-2.c: New test.
* c-c++-common/gomp/pr88203-3.c: New test.

From-SVN: r277253

5 years agobackport: re PR middle-end/91920 (ggc 9.2.0 failing openmp compile on ppc64le)
Jakub Jelinek [Mon, 21 Oct 2019 11:43:16 +0000 (13:43 +0200)] 
backport: re PR middle-end/91920 (ggc 9.2.0 failing openmp compile on ppc64le)

Backported from mainline
2019-09-27  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/91920
* gimplify.c (omp_default_clause): Predetermine DECL_IN_CONSTANT_POOL
variables as shared.

* c-c++-common/gomp/pr91920.c: New test.

From-SVN: r277252

5 years agobackport: re PR rtl-optimization/89435 (wrong code with -O1 -march=armv4 -fno-forward...
Jakub Jelinek [Mon, 21 Oct 2019 11:42:37 +0000 (13:42 +0200)] 
backport: re PR rtl-optimization/89435 (wrong code with -O1 -march=armv4 -fno-forward-propagate with __builtin_sub_overflow())

Backported from mainline
2019-09-11  Jakub Jelinek  <jakub@redhat.com>

PR rtl-optimization/89435
PR rtl-optimization/89795
PR rtl-optimization/91720
* gcc.dg/pr89435.c: New test.
* gcc.dg/pr89795.c: New test.
* gcc.dg/pr91720.c: New test.

From-SVN: r277251

5 years agobackport: re PR tree-optimization/91723 (builtin fma is not optimized or vectorized...
Jakub Jelinek [Mon, 21 Oct 2019 11:41:40 +0000 (13:41 +0200)] 
backport: re PR tree-optimization/91723 (builtin fma is not optimized or vectorized as *+)

Backported from mainline
2019-09-11  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/91723
* tree-vect-stmts.c (vectorizable_call): Use types_compatible_p check
instead of pointer equality when checking if argument vectypes are
the same.

* gcc.dg/vect/vect-fma-3.c: New test.

From-SVN: r277250

5 years agobackport: re PR tree-optimization/91665 (ICE in build_vector_from_val, at tree.c...
Jakub Jelinek [Mon, 21 Oct 2019 11:40:48 +0000 (13:40 +0200)] 
backport: re PR tree-optimization/91665 (ICE in build_vector_from_val, at tree.c:1904)

Backported from mainline
2019-09-07  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/91665
* tree-vect-loop.c (vectorizable_reduction): Punt if base has type
incompatible with the type of PHI result.

* gcc.dg/vect/pr91665.c: New test.

From-SVN: r277249

5 years agobackport: re PR middle-end/91001 (internal compiler error: in extract_insn, at recog...
Jakub Jelinek [Mon, 21 Oct 2019 11:39:53 +0000 (13:39 +0200)] 
backport: re PR middle-end/91001 (internal compiler error: in extract_insn, at recog.c:2310)

Backported from mainline
2019-09-06  Jakub Jelinek  <jakub@redhat.com>

* function.c (assign_parm_find_data_types): Use RECORD_OR_UNION_TYPE_P
before testing TYPE_TRANSPARENT_AGGR.
* calls.c (initialize_argument_information, load_register_parameters):
Likewise.

2019-09-05  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/91001
PR middle-end/91105
PR middle-end/91106
* calls.c (load_register_parameters): For TYPE_TRANSPARENT_AGGR
types, use type of their first field instead of type of
args[i].tree_value.

* gcc.c-torture/compile/pr91001.c: New test.

From-SVN: r277248

5 years agobackport: re PR tree-optimization/91632 (Probably wrong code since r275026)
Jakub Jelinek [Mon, 21 Oct 2019 11:39:04 +0000 (13:39 +0200)] 
backport: re PR tree-optimization/91632 (Probably wrong code since r275026)

Backported from mainline
2019-09-02  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/91632
* gcc.c-torture/execute/pr91632.c: New test.

From-SVN: r277247

5 years agobackport: re PR middle-end/91623 (-msse4.1 -O3 segfault in /usr/lib/gcc/x86_64-pc...
Jakub Jelinek [Mon, 21 Oct 2019 11:38:37 +0000 (13:38 +0200)] 
backport: 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)

Backported from mainline
2019-09-01  Jakub Jelinek  <jakub@redhat.com>

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: r277246

5 years agobackport: re PR lto/91572 (lto1: error: type variant has different ‘TREE_TYPE’ since...
Jakub Jelinek [Mon, 21 Oct 2019 11:37:41 +0000 (13:37 +0200)] 
backport: re PR lto/91572 (lto1: error: type variant has different â€˜TREE_TYPE’ since r269862)

Backported from mainline
2019-09-01  Jakub Jelinek  <jakub@redhat.com>

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: r277245

5 years agobackport: re PR go/91617 (Many go test case failures after r275026)
Jakub Jelinek [Mon, 21 Oct 2019 11:36:36 +0000 (13:36 +0200)] 
backport: re PR go/91617 (Many go test case failures after r275026)

Backported from mainline
2019-09-02  Jakub Jelinek  <jakub@redhat.com>

PR go/91617
* fold-const.c (range_check_type): For enumeral and boolean
type, pass 1 to type_for_size langhook instead of
TYPE_UNSIGNED (etype).  Return unsigned_type_for result whenever
etype isn't TYPE_UNSIGNED INTEGER_TYPE.
(build_range_check): Don't call unsigned_type_for for pointer types.
* match.pd (X / C1 op C2): Don't call unsigned_type_for on
range_check_type result.

2019-08-29  Jakub Jelinek  <jakub@redhat.com>

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: r277244

5 years agobackport: re PR c/91401 (schedule + dist_schedule clauses rejected on distribute...
Jakub Jelinek [Mon, 21 Oct 2019 11:35:09 +0000 (13:35 +0200)] 
backport: re PR c/91401 (schedule + dist_schedule clauses rejected on distribute parallel for)

Backported from mainline
2019-08-09  Jakub Jelinek  <jakub@redhat.com>

PR c/91401
* c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
check_no_duplicate_clause call.  Comment it out, instead emit a
warning for duplicate dist_schedule clauses.

* parser.c (cp_parser_omp_clause_dist_schedule): Comment out the
check_no_duplicate_clause call, instead emit a warning for duplicate
dist_schedule clauses.

* c-c++-common/gomp/pr91401-1.c: New test.
* c-c++-common/gomp/pr91401-2.c: New test.

From-SVN: r277243

5 years agobackport: quadmath.h (M_Eq, [...]): Use two more decimal places.
Jakub Jelinek [Mon, 21 Oct 2019 11:34:04 +0000 (13:34 +0200)] 
backport: quadmath.h (M_Eq, [...]): Use two more decimal places.

Backported from mainline
2019-08-02  Jakub Jelinek  <jakub@redhat.com>

* quadmath.h (M_Eq, M_LOG2Eq, M_LOG10Eq, M_LN2q, M_LN10q, M_PIq,
M_PI_2q, M_PI_4q, M_1_PIq, M_2_PIq, M_2_SQRTPIq, M_SQRT2q,
M_SQRT1_2q): Use two more decimal places.

From-SVN: r277242

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

From-SVN: r277220

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

From-SVN: r277208

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

From-SVN: r277198

5 years agore PR fortran/69455 ([F08] Assembler error(s) when using intrinsic modules in two...
Steven G. Kargl [Fri, 18 Oct 2019 17:59:32 +0000 (17:59 +0000)] 
re PR fortran/69455 ([F08] Assembler error(s) when using intrinsic modules in two BLOCK)

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

PR fortran/69455
* trans-decl.c (generate_local_decl): Avoid misconstructed
intrinsic modules in a BLOCK construct.

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

PR fortran/69455
* gfortran.dg/pr69455_1.f90: New test.
* gfortran.dg/pr69455_2.f90: Ditto.

From-SVN: r277160

5 years agoFortran] PR91586 Fix ICE on invalid code with CLASS
Tobias Burnus [Fri, 18 Oct 2019 12:38:26 +0000 (12:38 +0000)] 
Fortran] PR91586 Fix ICE on invalid code with CLASS

        gcc/fortran/
        Backport from mainline
        2019-10-18  Tobias Burnus  <tobias@codesourcery.com>

        PR fortran/91586
        * class.c (gfc_find_derived_vtab): Return NULL
        instead of deref'ing NULL pointer.

        gcc/testsuite/
        Backport from mainline
        2019-10-18  Tobias Burnus  <tobias@codesourcery.com>

        PR fortran/91586
        * gfortran.dg/class_71.f90: New.

From-SVN: r277154

5 years agobackport: re PR target/86040 ([avr]: RAMPZ is not always cleared after loading __flas...
Georg-Johann Lay [Fri, 18 Oct 2019 09:10:20 +0000 (09:10 +0000)] 
backport: re PR target/86040 ([avr]: RAMPZ is not always cleared after loading __flashN data)

Backport from 2019-10-18 trunk r277143.
PR target/86040
* config/avr/avr.c (avr_out_lpm): Do not shortcut-return.

From-SVN: r277147

5 years agoavr-mmcu.texi: Re-generate because config/avr/avr-devices.c was changed in r269487.
Georg-Johann Lay [Fri, 18 Oct 2019 09:06:40 +0000 (09:06 +0000)] 
avr-mmcu.texi: Re-generate because config/avr/avr-devices.c was changed in r269487.

* doc/avr-mmcu.texi: Re-generate because config/avr/avr-devices.c
was changed in r269487.

From-SVN: r277146

5 years ago[Darwin] Amend section for constants with relocations.
Iain Sandoe [Fri, 18 Oct 2019 08:42:41 +0000 (08:42 +0000)] 
[Darwin] Amend section for constants with relocations.

Darwin's linker doesn't like text section relocations (they require special
enabling).  The Fortran FE, at least, seems to generate cases where the
initialiser for a pointer constant can need a relocation.  We can handle
this by special-casing SECCAT_RODATA when the relocation is present by
placing the constant in the .const_data section.

gcc/

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

Backport from mainline
2019-10-05  Iain Sandoe  <iain@sandoe.co.uk>

PR target/59888
* config/darwin.c (darwin_rodata_section): Add relocation flag,
choose const_data section for constants with relocations.
(machopic_select_section): Pass relocation flag to
darwin_rodata_section ().

From-SVN: r277145

5 years ago[Darwin] Update machopic_legitimize_pic_address.
Iain Sandoe [Fri, 18 Oct 2019 07:54:12 +0000 (07:54 +0000)] 
[Darwin] Update machopic_legitimize_pic_address.

Some changes were missed here in the transition to LRA. The Darwin
archs are all using LRA now, testing for reload is not correct.

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

Backport from mainline
2019-09-21  Iain Sandoe  <iain@sandoe.co.uk>

* config/darwin.c (machopic_legitimize_pic_address): Check
for lra, rather than reload.

From-SVN: r277144

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

From-SVN: r277139

5 years agopa.c (pa_output_indirect_call): Fix typos in last change.
John David Anglin [Thu, 17 Oct 2019 22:44:24 +0000 (22:44 +0000)] 
pa.c (pa_output_indirect_call): Fix typos in last change.

* config/pa/pa.c (pa_output_indirect_call): Fix typos in last change.

From-SVN: r277136

5 years ago[arm] PR target/89400 fix thumb1 unaligned access expansion
Richard Earnshaw [Thu, 17 Oct 2019 16:45:46 +0000 (16:45 +0000)] 
[arm]  PR target/89400 fix thumb1 unaligned access expansion

Armv6 has support for unaligned accesses to memory.  However, the
thumb1 code patterns were trying to use the 32-bit code constraints.
One failure mode from this was that the patterns are designed to be
compatible with conditional execution and this was then causing an
assert in the compiler.

The unaligned_loadhis pattern is only used for expanding extv, which
in turn is only enabled for systems supporting thumb2.  Given that
there is no simple expansion for a thumb1 sign-extending load (the
instruction has no immediate offset form and requires two registers in
the address) it seems simpler to just disable this for thumb1.

Fixed thusly:

        Backport from trunk:
2019-05-03  Richard Earnshaw  <rearnsha@arm.com>

PR target/89400
* config/arm/arm.md (unaligned_loadsi): Add variant for thumb1.
Restrict 'all' variant to 32-bit configurations.
(unaligned_loadhiu): Likewise.
(unaligned_storehi): Likewise.
(unaligned_storesi): Likewise.
(unaligned_loadhis): Disable when compiling for thumb1.

From-SVN: r277123

5 years agore PR fortran/83113 (Bogus "duplicate allocatable attribute" error for submodule...
Steven G. Kargl [Thu, 17 Oct 2019 16:30:25 +0000 (16:30 +0000)] 
re PR fortran/83113 (Bogus "duplicate allocatable attribute" error for submodule character function)

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

PR fortran/83113
PR fortran/89943
decl.c (gfc_match_function_decl): Ignore duplicate BIND(C) for function
declaration in submodule.  Implement at check for F2018 C1550.
(gfc_match_entry): Use temporary for locus, which allows removal of
one gfc_error_now().
(gfc_match_subroutine): Ignore duplicate BIND(C) for subroutine
declaration in submodule.  Implement at check for F2018 C1550.

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

PR fortran/83113
PR fortran/89943
* gfortran.dg/pr89943_1.f90: New test.
* gfortran.dg/pr89943_2.f90: Ditto.
* gfortran.dg/pr89943_3.f90: Ditto.
* gfortran.dg/pr89943_4.f90: Ditto.

From-SVN: r277122

5 years agobackport: re PR testsuite/92093 (New test case gcc.target/powerpc/pr91275.c from...
Bill Schmidt [Thu, 17 Oct 2019 15:32:40 +0000 (15:32 +0000)] 
backport: re PR testsuite/92093 (New test case gcc.target/powerpc/pr91275.c from r276410 fails on BE)

2019-10-17  Bill Schmidt  <wschmidt@linux.ibm.com>

Backport from mainline
2019-10-15  Bill Schmidt  <wschmidt@linux.ibm.com>

PR target/92093
* gcc.target/powerpc/pr91275.c: Fix type and endian issues.

From-SVN: r277117

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

From-SVN: r277087

5 years ago[Darwin] Pick up SDKROOT as the sysroot fallback.
Iain Sandoe [Wed, 16 Oct 2019 19:22:17 +0000 (19:22 +0000)] 
[Darwin] Pick up SDKROOT as the sysroot fallback.

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

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

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

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

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

So one can do:

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

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

CAVEAT: An unfortunate effect of the fact that gcc (and g++) are
executables in the Xcode installation, which are found ahead of any such
named in the /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/TeX/texbin:/usr/local/tools/gcc-2016/bin:

PATH=/path/to/gcc/install:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/TeX/texbin:/usr/local/tools/gcc-2016/bin
xcrun --sdk macosx gcc ....

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

PATH=/path/to/gcc/install:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/TeX/texbin:/usr/local/tools/gcc-2016/bin
xcrun --sdk macosx x64_64-apple-darwinXX-gcc ...

does work as expected, however.

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

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

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

From-SVN: r277079

5 years ago[Darwin, specs] Backport fixes for driver handling of PIE options.
Iain Sandoe [Wed, 16 Oct 2019 19:12:33 +0000 (19:12 +0000)] 
[Darwin, specs] Backport fixes for driver handling of PIE options.

pie, no-pie and rdynamic are driver options, we can process them in the
relevant place and drop them once dealt with. There's no need to generate
a new header to process the no_compact_unwind which is applied on the
basis of the target system.

Support for the -pie, -no_pie and -no_compact_unwind options should ideally
be checked at configure time, however the status quo is to assert that linkers
capable of targeting the relevant systems support these options (i.e. we trust
that the user doesn't attempt to configure inappropriately).

TODO: check the availability of the linker opts in configure rather than
trusting to the user.

This will fix the fail of pie-7.c, which is a result of failing to handle the
no-pie driver option.

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

Backport from mainline
2019-07-03  Iain Sandoe  <iain@sandoe.co.uk>

* config/darwin.h (DRIVER_SELF_SPECS): Remove the linker cases.
(RDYNAMIC): Rename to, DARWIN_RDYNAMIC.
(DARWIN_PIE_SPEC, DARWIN_NOPIE_SPEC): Adjust to remove the Xlinker
clauses.
(LINK_COMMAND_SPEC_A): Add DARWIN_RDYNAMIC, DARWIN_PIE_SPEC and
DARWIN_NOPIE_SPEC.

Backport from mainline
2019-06-19  Iain Sandoe  <iain@sandoe.co.uk>

* config/darwin.h (DRIVER_SELF_SPECS): Add RDYNAMIC, DARWIN_PIE_SPEC
and DARWIN_NOPIE_SPEC.
(RDYNAMIC): New, modified from DARWIN_EXPORT_DYNAMIC.
(DARWIN_PIE_SPEC): Collate from darwin.h and darwin9.h.
(DARWIN_NOPIE_SPEC): Collate from darwin10.h.
(DARWIN_NOCOMPACT_UNWIND): New from darwin10.h
(DARWIN_EXPORT_DYNAMIC): Delete.
* config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Move no_compact_unwind
and pie options processing to  darwin.h.
* config/darwin9.h (DARWIN_PIE_SPEC): Move pie processing to darwin.h

From-SVN: r277078

5 years agoBackport PRs 91606, 91772, 91790, 91812, 91968
Richard Biener [Wed, 16 Oct 2019 09:25:34 +0000 (09:25 +0000)] 
Backport PRs 91606, 91772, 91790, 91812, 91968

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

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

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

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

PR c++/91606
* decl.c (build_ptrmemfunc_type): Mark pointer-to-member
fat pointer structure members as DECL_NONADDRESSABLE_P.

* g++.dg/torture/pr91606.C: New testcase.

2019-09-19  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91812
* tree-ssa-phiprop.c (propagate_with_phi): Do not replace
volatile loads.

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

2019-09-17  Richard Biener  <rguenther@suse.de>

PR debug/91772
* dwarf2out.c (dwarf2out_late_global_decl): If early dwarf
was missing generate locations only once.

2019-09-17  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91790
* tree-vect-stmts.c (vectorizable_load): For BB vectorization
use the correct DR for setting up realignment.

From-SVN: r277055

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

From-SVN: r277032

5 years agofptr.c (_dl_read_access_allowed): Change argument to unsigned int.
John David Anglin [Tue, 15 Oct 2019 22:20:12 +0000 (22:20 +0000)] 
fptr.c (_dl_read_access_allowed): Change argument to unsigned int.

* config/pa/fptr.c (_dl_read_access_allowed): Change argument to
unsigned int.  Adjust callers.
(__canonicalize_funcptr_for_compare): Change plabel type to volatile
unsigned int *.  Load relocation offset before function pointer.
Add barrier to ensure ordering.

From-SVN: r277016

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

From-SVN: r276981

5 years agobackport: rs6000-builtin.def: (LVSL...
Will Schmidt [Mon, 14 Oct 2019 18:11:47 +0000 (18:11 +0000)] 
backport: rs6000-builtin.def: (LVSL...

Backport from trunk
[gcc]

2019-09-26  Will Schmidt <will_schmidt@vnet.ibm.com>
* config/rs6000/rs6000-builtin.def: (LVSL, LVSR, LVEBX, LVEHX,
LVEWX, LVXL, LVXL_V2DF, LVXL_V2DI, LVXL_V4SF, LVXL_V4SI, LVXL_V8HI,
LVXL_V16QI, LVX, LVX_V1TI, LVX_V2DF, LVX_V2DI, LVX_V4SF, LVX_V4SI,
LVX_V8HI, LVX_V16QI, LVLX, LVLXL, LVRX, LVRXL, LXSDX, LXVD2X_V1TI,
LXVD2X_V2DF, LXVD2X_V2DI, LXVDSX, LXVW4X_V4SF, LXVW4X_V4SI,
LXVW4X_V8HI, LXVW4X_V16QI, LD_ELEMREV_V1TI, LD_ELEMREV_V2DF,
LD_ELEMREV_V2DI, LD_ELEMREV_V4SF, LD_ELEMREV_V4SI, LD_ELEMREV_V8HI,
LD_ELEMREV_V16QI): Use the PURE attribute.

[testsuite]

2019-09-26  Will Schmidt <will_schmidt@vnet.ibm.com>
* gcc.target/powerpc/pure-builtin-redundant-load.c:  New.

From-SVN: r276966

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

From-SVN: r276946

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

From-SVN: r276932

5 years agopa.c (pa_output_call): Load descriptor address to register %r22.
John David Anglin [Sat, 12 Oct 2019 20:39:41 +0000 (20:39 +0000)] 
pa.c (pa_output_call): Load descriptor address to register %r22.

* config/pa/pa.c (pa_output_call): Load descriptor address to register
%r22.  Load function address before global pointer.
(pa_attr_length_indirect_call): Adjust length of inline versions of
$$dyncall.
(pa_output_indirect_call): Remove fast inline version of $$dyncall
before normal cases.  Update inline $$dyncall sequences to preserve
function descriptor address in register %r22.
(TRAMPOLINE_CODE_SIZE): Adjust.
(pa_asm_trampoline_template): Revise 32-bit trampoline.  Don't assume
register %r22 contains trampoline address.
(pa_trampoline_init): Adjust offsets.
(pa_trampoline_adjust_address): Likewise.
* config/pa/pa.h (TRAMPOLINE_SIZE): Adjust 32-bit size.

From-SVN: r276929

5 years agolib2funcs.S (__gcc_plt_call): Load branch target to %r21.
John David Anglin [Sat, 12 Oct 2019 19:44:29 +0000 (19:44 +0000)] 
lib2funcs.S (__gcc_plt_call): Load branch target to %r21.

* config/pa/lib2funcs.S (__gcc_plt_call): Load branch target to %r21.
Load PIC register after branch target.  Fix white space.
* config/pa/milli64.S ($$dyncall): Separate LINUX and non LINUX
implementations.  Load PIC register after branch target.  Don't
clobber function pointer when it points to function descriptor.
Use nullification instead of branch in LINUX implementation.

From-SVN: r276927

5 years agore PR ada/91995 (gnat miscompilation and bootstrap failure on m68k-linux)
Eric Botcazou [Sat, 12 Oct 2019 14:49:21 +0000 (14:49 +0000)] 
re PR ada/91995 (gnat miscompilation and bootstrap failure on m68k-linux)

PR ada/91995
* sem_ch8.adb (Chain_Use_Clause): Remove second argument in calls
to Defining_Entity.
* sem_elab.adb (Find_Unit_Entity): Likewise.  Deal with N_Subunit
here in lieu of in Defining_Entity.
* sem_spark.adb (Check_Callable_Body): Likewise.
(Check_Package_Body): Likewise.
* sem_util.ads (Defining_Entity): Remove 2nd and 3th parameters.
* sem_util.adb (Defining_Entity): Remove 2nd and 3th parameters,
and adjust accordingly.  Deal with N_Compilation_Unit.

From-SVN: r276917

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

From-SVN: r276911

5 years agore PR fortran/91715 (ICE in resolve_fntype, at fortran/resolve.c:16884)
Steven G. Kargl [Fri, 11 Oct 2019 20:19:28 +0000 (20:19 +0000)] 
re PR fortran/91715 (ICE in resolve_fntype, at fortran/resolve.c:16884)

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

PR fortran/91715
* decl.c (gfc_match_prefix): If matching a type-spec returns an error,
it's an error so re-act correctly.

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

PR fortran/91715
* gfortran.dg/function_kinds_5.f90: Prune run-on error.
* gfortran.dg/pr85543.f90: Ditto.
* gfortran.dg/pr91715.f90: New test.

From-SVN: r276905

5 years agore PR fortran/91649 (ICE in gfc_resolve_findloc, at fortran/iresolve.c:1827)
Steven G. Kargl [Fri, 11 Oct 2019 20:06:15 +0000 (20:06 +0000)] 
re PR fortran/91649 (ICE in gfc_resolve_findloc, at fortran/iresolve.c:1827)

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

PR fortran/91649
check.c (gfc_check_findloc): Additional checking for valid arguments

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

PR fortran/91649
* gfortran.dg/pr91649.f90: New test.

From-SVN: r276904

5 years ago* fi.po: Update.
Joseph Myers [Fri, 11 Oct 2019 17:24:22 +0000 (18:24 +0100)] 
* fi.po: Update.

From-SVN: r276895

5 years agodecl.c (annotate_value): Really test the sign of the value when deciding to build...
Eric Botcazou [Fri, 11 Oct 2019 08:57:37 +0000 (08:57 +0000)] 
decl.c (annotate_value): Really test the sign of the value when deciding to build a NEGATE_EXPR.

* gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Really test the
sign of the value when deciding to build a NEGATE_EXPR.
<PLUS_EXPR>: Remove redundant line.
<BIT_AND_EXPR>: Do the negation here.

From-SVN: r276867

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

From-SVN: r276857

5 years agore PR fortran/91801 (ICE in gfc_simplify_reshape, at fortran/simplify.c:6733)
Steven G. Kargl [Thu, 10 Oct 2019 21:56:08 +0000 (21:56 +0000)] 
re PR fortran/91801 (ICE in gfc_simplify_reshape, at fortran/simplify.c:6733)

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

PR fortran/91801
* simplify.c (gfc_simplify_reshape): Convert a gcc_assert into a
gfc_error as a user can easily hit the condition.

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

PR fortran/91801
* gfortran.dg/pr91801.f90: New test.

From-SVN: r276853

5 years agore PR target/92022 (ICE in alpha_handle_trap_shadows, at config/alpha/alpha.c:8847)
Uros Bizjak [Thu, 10 Oct 2019 17:45:40 +0000 (19:45 +0200)] 
re PR target/92022 (ICE in alpha_handle_trap_shadows, at config/alpha/alpha.c:8847)

PR target/92022
* config/alpha/alpha.c (alpha_handle_trap_shadows): Skip DEBUG_INSN.

testsuite/ChangeLog:

PR target/92022
* g++.dg/pr92022.C: New test.

From-SVN: r276844

5 years agobackport: re PR target/88630 (Incorrect float negating together with convertion to...
Oleg Endo [Thu, 10 Oct 2019 15:24:05 +0000 (15:24 +0000)] 
backport: re PR target/88630 (Incorrect float negating together with convertion to int on ST-40)

gcc/
Backport from mainline
2019-10-10  Oleg Endo  <olegendo@gcc.gnu.org>

PR target/88630
* config/sh/sh.h (TARGET_FPU_SH4_300): New macro.
* config/sh/sh.c (sh_option_override): Enable fsca and fsrra insns
also for TARGET_FPU_SH4_300.
(sh_emit_mode_set): Check for TARGET_FPU_SH4_300 instead of
TARGET_SH4_300.
* config/sh/sh.md (toggle_pr): Add TARGET_FPU_SH4_300 condition.
(negsf2): Expand to either negsf2_fpscr or negsf2_no_fpscr.
(*negsf2_i): Split into ...
(negsf2_fpscr, negsf2_no_fpscr): ... these new patterns.
(abssf2): Expand to either abssf2_fpsc or abssf2_no_fpsc.
(**abssf2_i): Split into ...
(abssf2_fpscr, abssf2_no_fpscr): ... these new patterns.
(negdf2): Expand to either negdf2_fpscr or negdf2_no_fpscr.
(*negdf2_i): Split into ...
(negdf2_fpscr, negdf2_no_fpscr): ... these new patterns.
(absdf2): Expand to either absdf2_fpscr or absdf2_no_fpsc.
(**abssf2_i): Split into ...
(absdf2_fpscr, absdf2_no_fpscr): ... these new patterns.

From-SVN: r276825

5 years agoS/390: Add support for z15 as CPU name.
Andreas Krebbel [Thu, 10 Oct 2019 09:09:42 +0000 (09:09 +0000)] 
S/390: Add support for z15 as CPU name.

So far z15 was identified as arch13. After the machine has been
announced we can now add the real name.

gcc/ChangeLog:

2019-10-10  Andreas Krebbel  <krebbel@linux.ibm.com>

Backport from mainline
2019-10-10  Andreas Krebbel  <krebbel@linux.ibm.com>

* common/config/s390/s390-common.c (PF_ARCH13): Rename to...
(PF_Z15): ... this.
* config.gcc: Add z15 as option for --with-arch and --with-tune
configure switches.
* config/s390/s390-c.c (s390_resolve_overloaded_builtin): Add
error reporting for unsupported builtins.
* config/s390/s390-opts.h (enum processor_type): Rename
PROCESSOR_8561_ARCH13 to PROCESSOR_8561_Z15.
* config/s390/8561.md: Rename arch13 to z15 throughout the file.
* config/s390/driver-native.c (s390_host_detect_local_cpu):
Likewise.
* config/s390/s390-builtins.def: Likewise.
* config/s390/s390.c (processor_table): Add z15 as option and keep arch13 as alternative.
(s390_expand_builtin): Add missing check for unsupported builtins.
(s390_canonicalize_comparison): Rename TARGET_ARCH13 to TARGET_Z15.
(s390_rtx_costs): Likewise.
(s390_get_sched_attrmask): Rename arch13 to z15.
(s390_get_unit_mask): Likewise.
(s390_is_fpd): Likewise.
(s390_is_fxd): Likewise.
* config/s390/s390.h (enum processor_flags): Likewise.
* config/s390/s390.md: Likewise.
* config/s390/vector.md: Likewise.
* config/s390/vx-builtins.md: Likewise.
* config/s390/s390.opt: Add z15 to processor_type value.

From-SVN: r276793

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

From-SVN: r276785

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

From-SVN: r276749

5 years agoPR c++/91740 - ICE with constexpr call and ?: in ARRAY_REF.
Marek Polacek [Tue, 8 Oct 2019 13:38:35 +0000 (13:38 +0000)] 
PR c++/91740 - ICE with constexpr call and ?: in ARRAY_REF.

* pt.c (build_non_dependent_expr): Call build_non_dependent_expr for
the first operand.

From-SVN: r276699

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

From-SVN: r276684

5 years agobackport: re PR fortran/84487 (Large rodate section increase in 465.tonto with r254427)
Thomas Koenig [Mon, 7 Oct 2019 20:10:22 +0000 (20:10 +0000)] 
backport: re PR fortran/84487 (Large rodate section increase in 465.tonto with r254427)

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

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

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

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

From-SVN: r276672

5 years agobackport: re PR target/91275 (__builtin_crypto_vpmsumd gives different results -O...
Bill Schmidt [Mon, 7 Oct 2019 18:23:20 +0000 (18:23 +0000)] 
backport: re PR target/91275 (__builtin_crypto_vpmsumd gives different results -O[123] vs -O0)

[gcc]

2019-10-07  Bill Schmidt  <wschmidt@linux.ibm.com>

Backport from mainline
2019-10-01  Bill Schmidt  <wschmidt@linux.ibm.com>

PR target/91275
* config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Don't swap
vpmsumd.

[gcc/testsuite]

2019-10-07  Bill Schmidt  <wschmidt@linux.ibm.com>

Backport from mainline
2019-10-01  Bill Schmidt  <wschmdit@linux.ibm.com>

PR target/91275
* gcc.target/powerpc/pr91275.c: New.

From-SVN: r276667

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

From-SVN: r276643

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

From-SVN: r276633

5 years agore PR fortran/47054 (Compilation error when cray pointers are declared in both host...
Steven G. Kargl [Sat, 5 Oct 2019 15:42:25 +0000 (15:42 +0000)] 
re PR fortran/47054 (Compilation error when cray pointers are declared in both host and internal subroutines)

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

PR fortran/47054
* decl.c (variable_decl): Do not search parent namespace for symbol.

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

PR fortran/47054
* gfortran.dg/pr47054_1.f90: New test
* gfortran.dg/pr47054_2.f90: Ditto.

From-SVN: r276628

5 years agoBackport fix for PR jit/91928
Andrea Corallo [Sat, 5 Oct 2019 09:02:25 +0000 (09:02 +0000)] 
Backport fix for PR jit/91928

gcc/ChangeLog

2019-10-05  Andrea Corallo  <andrea.corallo@arm.com>

Backport from mainline
2019-10-03  Andrea Corallo  <andrea.corallo@arm.com>
* gcc/ipa-cp.c (ipa_cp_c_finalize): Release ipcp_transformation_sum
when finished.
* ipa-prop.c (ipcp_free_transformation_sum): New function.
* ipa-prop.h (ipcp_free_transformation_sum): Add declaration.

From-SVN: r276625

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

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

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

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

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

From-SVN: r276620

5 years agore PR fortran/91785 (ICE in check_assumed_size_reference, at fortran/resolve.c:1601)
Steven G. Kargl [Sat, 5 Oct 2019 03:55:05 +0000 (03:55 +0000)] 
re PR fortran/91785 (ICE in check_assumed_size_reference, at fortran/resolve.c:1601)

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

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

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

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

From-SVN: r276619

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

From-SVN: r276617

5 years agoBackport fix for PR target/91769
Dragan Mladjenovic [Fri, 4 Oct 2019 11:10:01 +0000 (11:10 +0000)] 
Backport fix for PR target/91769

gcc/ChangeLog:

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

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

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

gcc/testsuite/ChangeLog:

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

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

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

From-SVN: r276570