]> git.ipfire.org Git - people/ms/gcc.git/log
people/ms/gcc.git
3 years agoDaily bump. misc/first-auto-changelog-10
GCC Administrator [Tue, 26 May 2020 00:16:50 +0000 (00:16 +0000)] 
Daily bump.

3 years agotestsuite: Support { target c++20 } in tests.
Jason Merrill [Mon, 25 May 2020 22:04:39 +0000 (18:04 -0400)] 
testsuite: Support { target c++20 } in tests.

gcc/testsuite/ChangeLog
2020-05-12  Jason Merrill  <jason@redhat.com>

* lib/target-supports.exp (check_effective_target_c++20_only)
(check_effective_target_c++20): New.

3 years agoc++: constexpr and lambda capture [PR90212]
Jason Merrill [Mon, 25 May 2020 22:04:39 +0000 (18:04 -0400)] 
c++: constexpr and lambda capture [PR90212]

This is the same issue as PR86429, just in potential_constant_expression_1
rather than cxx_eval_constant_expression.  As in that case, when we're
trying to evaluate a constant expression within a lambda, we don't have a
constant closure object to refer to, but we can try to refer directly to the
captured variable.

gcc/cp/ChangeLog
2020-05-05  Jason Merrill  <jason@redhat.com>

PR c++/90212
* constexpr.c (potential_constant_expression_1): In a lambda
function, consider a captured variable directly.

3 years agoc++: Local class DMI using local static [PR90749]
Jason Merrill [Mon, 25 May 2020 22:04:39 +0000 (18:04 -0400)] 
c++: Local class DMI using local static [PR90749]

For default member initializers in templates it's important to push into the
right context during get_nsdmi.  But for a local class that's not possible,
and trying leaves the function context we need to be in, so don't try.

gcc/cp/ChangeLog
2020-05-01  Jason Merrill  <jason@redhat.com>

PR c++/90479
* init.c (get_nsdmi): Don't push_to_top_level for a local class.

3 years agoc++: -fmerge-all-constants vs. destructors [PR91529]
Jason Merrill [Mon, 25 May 2020 22:04:39 +0000 (18:04 -0400)] 
c++: -fmerge-all-constants vs. destructors [PR91529]

cp_finish_decl avoids setting TREE_READONLY on TREE_STATIC variables that
have non-constant construction or destruction, but -fmerge-all-constants was
converting an automatic variable to static while leaving TREE_READONLY set.

Fixed by clearing the flag in cp_finish_decl in the presence of
-fmerge-all-constants.

gcc/cp/ChangeLog
2020-05-01  Jason Merrill  <jason@redhat.com>

PR c++/91529
* decl.c (cp_finish_decl): Also clear TREE_READONLY if
-fmerge-all-constants.

3 years agoc++: generic lambda and -fsanitize=vla-bound [PR93822]
Jason Merrill [Mon, 25 May 2020 22:04:39 +0000 (18:04 -0400)] 
c++: generic lambda and -fsanitize=vla-bound [PR93822]

Within the generic lambda the VLA capture proxy VAR_DECL has DECL_VALUE_EXPR
which is a NOP_EXPR to the VLA type of the proxy.  The problem here was that
when instantiating we were tsubsting that type twice, once for the type of
the DECL and once for the type of the NOP_EXPR, and getting two
different (though equivalent) types.  Then gimplify_type_sizes fixed up the
type of the DECL, but that didn't affect the type of the NOP_EXPR, leading
to sadness.

Fixed by directly reusing the type from the DECL.

gcc/cp/ChangeLog
2020-05-01  Jason Merrill  <jason@redhat.com>

PR c++/93822
* pt.c (tsubst_decl): Make sure DECL_VALUE_EXPR continues to have
the same type as the variable.

3 years agoDaily bump.
GCC Administrator [Mon, 25 May 2020 00:16:46 +0000 (00:16 +0000)] 
Daily bump.

3 years agoi386: Fix <rounding_insn><mode>2 expander [PR95255]
Uros Bizjak [Sun, 24 May 2020 16:01:08 +0000 (18:01 +0200)] 
i386: Fix <rounding_insn><mode>2 expander [PR95255]

2020-05-24  Uroš Bizjak  <ubizjak@gmail.com>

gcc/ChangeLog:
PR target/95255
* config/i386/i386.md (<rounding_insn><mode>2): Do not try to
expand non-sse4 ROUND_ROUNDEVEN rounding via SSE support routines.

gcc/testsuite/ChangeLog:
PR target/95255
* gcc.target/i386/pr95255.c: New test.

3 years agoDarwin: Make sanitizer local vars linker-visible.
Iain Sandoe [Sun, 24 May 2020 11:18:19 +0000 (12:18 +0100)] 
Darwin: Make sanitizer local vars linker-visible.

Another case where we need a linker-visible symbol in order
to preserve the ld64 atom model.  If these symbols are emitted
as 'local' the linker cannot see that they are separate from any
global weak entry that precedes them.  This will cause the linker
to complain that there is (apparently) direct access to such a
weak global.

This is a short-term fix for the problem - ideally we need a more
generic handling for all the relevant cases.

Backport 804254edb48f87d726a1bc9e95af04076c030e35

gcc/ChangeLog:

* config/darwin.h (ASM_GENERATE_INTERNAL_LABEL):
Make ubsan_{data,type},ASAN linker-visible.

3 years agox86: Handle -mavx512vpopcntdq for -march=native
H.J. Lu [Fri, 22 May 2020 11:18:34 +0000 (04:18 -0700)] 
x86: Handle -mavx512vpopcntdq for -march=native

Add -mavx512vpopcntdq for -march=native if AVX512VPOPCNTDQ is available.

PR target/95258
* config/i386/driver-i386.c (host_detect_local_cpu): Detect
AVX512VPOPCNTDQ.

(cherry picked from commit 808b611bfb4b05703ea174e50874c711dca44c98)

3 years agocoroutines: Implicitly movable objects should use move CTORs for co_return.
Iain Sandoe [Sun, 24 May 2020 11:09:10 +0000 (12:09 +0100)] 
coroutines: Implicitly movable objects should use move CTORs for co_return.

This is a case where the standard contains conflicting information.
after discussion between implementators, the accepted intent is of
[class.copy.elision].  This amends the handling of co_return statements
to follow that.

Backport 5ef067eb14d40337507077a8a1265a04daa8ebc1 and f898793b4545483adaf62c5efbc78cee518884e6

gcc/cp/ChangeLog:

* coroutines.cc (finish_co_return_stmt): Implement rules
from [class.copy.elision] /3.

gcc/testsuite/ChangeLog:

* g++.dg/coroutines/co-return-syntax-10-movable.C: New test.

3 years agoDaily bump.
GCC Administrator [Sun, 24 May 2020 00:16:50 +0000 (00:16 +0000)] 
Daily bump.

3 years agolibstdc++: Remove incorrect static specifiers
Jonathan Wakely [Sat, 23 May 2020 17:40:53 +0000 (18:40 +0100)] 
libstdc++: Remove incorrect static specifiers

These functions were originally static members of the path class, but
the 'static' specifiers were not removed when they were moved to
namespace scope. This causes ODR violations when the functions are
called from functions defined in the header. Change them to 'inline'
instead.

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

* include/bits/fs_path.h (__detail::_S_range_begin)
(__detail::_S_range_end): Remove unintentional static specifiers.
* include/experimental/bits/fs_path.h (__detail::_S_range_begin)
(__detail::_S_range_end): Likewise.

3 years agolibstdc++: Fix function that can't be constexpr in C++11 (PR 95289)
Jonathan Wakely [Sat, 23 May 2020 17:29:33 +0000 (18:29 +0100)] 
libstdc++: Fix function that can't be constexpr in C++11 (PR 95289)

The body of this function isn't just a return statement, so it can't be
constexpr until C++14.

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

PR libstdc++/95289
* include/debug/helper_functions.h (__get_distance): Only declare
as a constexpr function for C++14 and up.
* testsuite/25_algorithms/copy/debug/95289.cc: New test.

3 years agoDaily bump.
GCC Administrator [Sat, 23 May 2020 00:16:41 +0000 (00:16 +0000)] 
Daily bump.

3 years agoAdd early return for invalid STATUS for close.
Thomas Koenig [Thu, 14 May 2020 16:30:27 +0000 (18:30 +0200)] 
Add early return for invalid STATUS for close.

2020-05-14  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR libfortran/95119
* io/close.c (close_status): Add CLOSE_INVALID.
(st_close): Return early on invalid STATUS parameter.

2020-05-14  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR libfortran/95119
* testsuite/libgomp.fortran/close_errors_1.f90: New test.

(cherry picked from commit cdc34b505796327b3eee9e97bc5f27ba71fd9e7a)
(cherry picked from commit d975519ad1066ed0397714c91aafadadb52a63dd)

3 years agolto/95190 - amend -flto docs for diagnostic option handling
Richard Biener [Tue, 19 May 2020 06:36:13 +0000 (08:36 +0200)] 
lto/95190 - amend -flto docs for diagnostic option handling

This documents new GCC 10 behavior on diagnostic options and -flto.

2020-05-22  Richard Biener  <rguenther@suse.de>

PR lto/95190
* doc/invoke.texi (flto): Document behavior of diagnostic
options.

(cherry picked from commit ab7eca92926fdc1da880120c116a1832fce56a29)

3 years agoDaily bump.
GCC Administrator [Fri, 22 May 2020 00:16:39 +0000 (00:16 +0000)] 
Daily bump.

3 years agoi386: Avoid reversing a non-trapping comparison to a trapping one [PR95169]
Uros Bizjak [Thu, 21 May 2020 17:36:32 +0000 (19:36 +0200)] 
i386: Avoid reversing a non-trapping comparison to a trapping one [PR95169]

2020-05-21  Uroš Bizjak  <ubizjak@gmail.com>

gcc/ChangeLog:
PR target/95169
* config/i386/i386-expand.c (ix86_expand_int_movcc):
 Avoid reversing a non-trapping comparison to a trapping one.

gcc/testsuite/ChangeLog:
PR target/95169
* gcc.target/i386/pr95169.c: New test.

3 years agoAdd outline-atomics to target attribute.
Martin Liska [Thu, 21 May 2020 10:45:47 +0000 (12:45 +0200)] 
Add outline-atomics to target attribute.

* common/config/aarch64/aarch64-common.c (aarch64_handle_option):
Handle OPT_moutline_atomics.
* config/aarch64/aarch64.c: Add outline-atomics to
aarch64_attributes.

* doc/extend.texi: Document the newly added target attribute.

* gcc.target/aarch64/target_attr_20.c: New test.
* gcc.target/aarch64/target_attr_21.c: New test.

(cherry picked from commit 9e02b45ffc60e0078bde3c56a14f00c54b7f8039)

3 years agolibgcc: Move FEATURE_AVX512VP2INTERSECT after FEATURE_AVX512BF16
H.J. Lu [Thu, 21 May 2020 12:32:53 +0000 (05:32 -0700)] 
libgcc: Move FEATURE_AVX512VP2INTERSECT after FEATURE_AVX512BF16

Move FEATURE_AVX512VP2INTERSECT after FEATURE_AVX512BF16 to avoid
changing libgcc ABI.

gcc/

PR target/95212
* config/i386/i386-builtins.c (processor_features): Move
F_AVX512VP2INTERSECT after F_AVX512BF16.
(isa_names_table): Likewise.

libgcc/

PR target/95212
* config/i386/cpuinfo.h (processor_features): Move
FEATURE_AVX512VP2INTERSECT after FEATURE_AVX512BF16.

(cherry picked from commit 5855bdfa06fb25c0880af89cb2bfdcdf342beac2)

3 years agolibstdc++: Fix net::basic_socket::close(error_code&)
Jonathan Wakely [Thu, 21 May 2020 07:08:27 +0000 (08:08 +0100)] 
libstdc++: Fix net::basic_socket::close(error_code&)

Also add some missing member functions, nodiscard attributes, and
noexcept-specifiers.

Backport from mainline
2020-05-21  Jonathan Wakely  <jwakely@redhat.com>

* include/experimental/executor (use_future_t::use_future_t()): Fix
incorrect noexcept-specifier.
* include/experimental/internet (basic_resolver_results): Adjust
whitespace.
* include/experimental/socket (__basic_socket_impl::release): Add
member function.
(basic_socket(io_context&, const endpoint_type&)): Fix argument to
target constructor.
(basic_socket::release(), basic_socket::release(error_code&)): Add
missing member functions.
(basic_socket::is_open()): Add nodiscard attribute.
(basic_socket::close(error_code&)): Pass argument to base function.
(basic_socket_acceptor::release())
(basic_socket_acceptor::release(error_code&)): Add missing member
functions.
(basic_socket_acceptor::is_open()): Add nodiscard attribute.
(basic_socket_streambuf::error()): Add noexcept.
(basic_socket_iostream::error()): Likewise.
* testsuite/experimental/net/socket/basic_socket.cc: New test.

3 years agolibstdc++: Avoid constraint recursion with iterator_traits (PR 93983)
Jonathan Wakely [Thu, 21 May 2020 06:47:17 +0000 (07:47 +0100)] 
libstdc++: Avoid constraint recursion with iterator_traits (PR 93983)

Checking whether a filesystem::path constructor argument is an iterator
requires instantiating std::iterator_traits. In C++20 that checks for
satisfaction of std::iterator_traits constraints, which checks if the
type is copyable, which can end up recursing back to the path
constructor. The fix in LWG 3420 is to reorder the cpp17-iterator
concept's constraints to check if the type looks vaguely like an
iterator before checking copyable. That avoids the recursion for types
which definitely aren't iterators, but isn't foolproof.

Backport from mainline
2020-05-21  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/93983
* include/bits/iterator_concepts.h (__detail::__cpp17_iterator):
Reorder constraints to avoid recursion when constructors use
iterator_traits (LWG 3420).
* testsuite/24_iterators/customization_points/lwg3420.cc: New test.

3 years agox86: Update VPCLMULQDQ check
H.J. Lu [Wed, 20 May 2020 01:55:08 +0000 (18:55 -0700)] 
x86: Update VPCLMULQDQ check

Update VPCLMULQDQ check to support processors with AVX version of
VPCLMULQDQ.

Backport from master
PR target/91695
* config/i386/cpuinfo.c (get_available_features): Fix VPCLMULQDQ
check.

(cherry picked from commit 1e46a443f25d26816536c0c480211714b123a1d5)

3 years agoDaily bump.
GCC Administrator [Thu, 21 May 2020 00:16:56 +0000 (00:16 +0000)] 
Daily bump.

3 years agoFortran : ProcPtr function results: 'ppr@' in error message PR39695
Mark Eggleston [Thu, 7 May 2020 07:02:02 +0000 (08:02 +0100)] 
Fortran  : ProcPtr function results: 'ppr@' in error message PR39695

The value 'ppr@' is set in the name of result symbol, the actual
name of the symbol is in the procedure name symbol pointed
to by the result symbol's namespace (ns). When reporting errors for
symbols that have the proc_pointer attribute check whether the
result attribute is set and set the name accordingly.

Backported from master.

2020-05-20  Mark Eggleston  <markeggleston@gcc.gnu.org>

gcc/fortran/

PR fortran/39695
* resolve.c (resolve_fl_procedure): Set name depending on
whether the result attribute is set.  For PROCEDURE/RESULT
conflict use the name in sym->ns->proc_name->name.
* symbol.c (gfc_add_type): Add check for function and result
attributes use sym->ns->proc_name->name if both are set.
Where the symbol cannot have a type use the name in
sym->ns->proc_name->name.

2020-05-20  Mark Eggleston  <markeggleston@gcc.gnu.org>

gcc/testsuite/

PR fortran/39695
* gfortran.dg/pr39695_1.f90: New test.
* gfortran.dg/pr39695_2.f90: New test.
* gfortran.dg/pr39695_3.f90: New test.
* gfortran.dg/pr39695_4.f90: New test.

(cherry picked from commit eb069ae8819c3a84d7f78becc5501e21ee3a9554)

3 years agoDaily bump.
GCC Administrator [Wed, 20 May 2020 00:16:54 +0000 (00:16 +0000)] 
Daily bump.

3 years agox86: Add FEATURE_AVX512VP2INTERSECT and update GFNI check
H.J. Lu [Tue, 19 May 2020 21:42:12 +0000 (14:42 -0700)] 
x86: Add FEATURE_AVX512VP2INTERSECT and update GFNI check

Add FEATURE_AVX512VP2INTERSECT to libgcc so that enum processor_features
in libgcc matches enum processor_features in i386-builtins.c.  Update
GFNI check to support processors with SSE and AVX versions of GFNI.

Backport from master
PR target/95212
PR target/95220
* config/i386/cpuinfo.c (get_available_features): Fix
FEATURE_GFNI check.  Also check FEATURE_AVX512VP2INTERSECT.
* config/i386/cpuinfo.h (processor_features): Add
FEATURE_AVX512VP2INTERSECT.

3 years agoi386: Define __ILP32__ and _ILP32 for all 32-bit targets
Gerald Pfeifer [Thu, 7 May 2020 22:48:52 +0000 (00:48 +0200)] 
i386: Define __ILP32__ and _ILP32 for all 32-bit targets

* config/i386/i386-c.c (ix86_target_macros): Define _ILP32 and
__ILP32__ for 32-bit targets.

3 years ago[OpenMP] Fix 'omp exit data' for Fortran arrays (PR 94635)
Tobias Burnus [Tue, 19 May 2020 08:10:21 +0000 (10:10 +0200)] 
[OpenMP] Fix 'omp exit data' for Fortran arrays (PR 94635)

        Backport from mainline
        2020-05-15  Tobias Burnus  <tobias@codesourcery.com>

gcc/
PR middle-end/94635
* gimplify.c (gimplify_scan_omp_clauses): For MAP_TO_PSET with
OMP_TARGET_EXIT_DATA, use 'release:' unless the associated
item is 'delete:'.

gcc/testsuite
PR middle-end/94635
* gfortran.dg/gomp/target-exit-data.f90: New.

3 years agoDaily bump.
GCC Administrator [Tue, 19 May 2020 00:17:00 +0000 (00:17 +0000)] 
Daily bump.

3 years agoPR middle-end/94940 - spurious -Warray-bounds for a zero length array member of union
Martin Sebor [Mon, 18 May 2020 22:04:56 +0000 (16:04 -0600)] 
PR middle-end/94940 - spurious -Warray-bounds for a zero length array member of union

gcc/testsuite/ChangeLog:

PR middle-end/94940
* gcc.dg/Warray-bounds-61.c: New test.

gcc/ChangeLog:

PR middle-end/94940
* tree-vrp.c (vrp_prop::check_mem_ref): Remove unreachable code.
* tree.c (component_ref_size): Correct the handling or array members
of unions.
Drop a pointless test.
Rename a local variable.

3 years agoUpdate gcc sv.po.
Joseph Myers [Mon, 18 May 2020 20:51:43 +0000 (20:51 +0000)] 
Update gcc sv.po.

* sv.po: Update.

3 years agoRequire powerpc_vsx_ok in gcc.target/powerpc/pr71763.c
Douglas Rupp [Mon, 18 May 2020 18:43:48 +0000 (11:43 -0700)] 
Require powerpc_vsx_ok in gcc.target/powerpc/pr71763.c

We're getting an error when running this test on PowerPC VxWorks 7,
due to an unexpected warning:

    | Excess errors:
    | cc1: warning: '-mvsx' and '-mno-altivec' are incompatible

The warning comes from a combination of factors:
  - The test itself uses -mvsx explicitly via the following directive:
       // { dg-options "-O1 -mvsx" }
  - Our toolchain was configured so as to make -mno-altivec
    the default;
  - These two options are mutually exclusive.

This commit adds a powerpc_vsx_ok dg-require-effective-target directive
to that test, and thus making it UNSUPPORTED instead.

Tested on PowerPC VxWorks 7. Also tested on PowerPC ELF as well,
a platform where we do not make -mno-altivec the default, to verify
that the test continues to run as usual in that case.

gcc/testsuite/

        * gcc.target/powerpc/pr71763.c: Require powerpc_vsx_ok.

(cherry picked from commit c917584aa9ec32934acf0082ed383b04f49fd174)

3 years agoDaily bump.
GCC Administrator [Mon, 18 May 2020 00:16:45 +0000 (00:16 +0000)] 
Daily bump.

3 years agolibphobos: Backport library fixes from mainline
Iain Buclaw [Sun, 17 May 2020 16:49:19 +0000 (18:49 +0200)] 
libphobos: Backport library fixes from mainline

- core.cpuid has been fixed to not use i7 detection on AMD processors.
- std.net.curl has been fixed to correctly handle HTTP/2 status lines.
- std.zip has had a test fixed to not rely on unzip being installed.

libphobos/ChangeLog:

PR d/95166
* libdruntime/core/cpuid.d (cpuidX86): Do not use i7 detection on AMD
processors.
(hasCPUID): Fix deprecated asm syntax.

PR d/95167
* src/std/zip.d (unittest): Skip test if unzip is not installed.

PR d/95168
* src/std/net/curl.d (HTTP.onReceiveHeader): Move status line parsing
to ...
(HTTP.parseStatusLine): ... here.  New function.  Add support for
parsing HTTP/2 status lines.

3 years agod: Fix ICE in verify_gimple_stmt, at tree-cfg.c:4959
Iain Buclaw [Sun, 17 May 2020 14:25:35 +0000 (16:25 +0200)] 
d: Fix ICE in verify_gimple_stmt, at tree-cfg.c:4959

Both array concat and array new expressions wrapped any temporaries
created into a BIND_EXPR.  This does not work if an expression used to
construct the result requires scope destruction, which is represented by
a TARGET_EXPR with a clean-up, and a CLEANUP_POINT_EXPR at the
location where the temporaries logically go out of scope.  The reason
for this not working is because the lowering of cleanup point
expressions does not traverse inside BIND_EXPRs to expand any gimple
cleanup expressions within.

The use of creating BIND_EXPR has been removed at both locations, and
replaced with a normal temporary variable that has initialization
delayed until its address is taken.

gcc/d/ChangeLog:

PR d/94970
* d-codegen.cc (force_target_expr): Move create_temporary_var
implementation inline here.
(create_temporary_var): Remove.
(maybe_temporary_var): Remove.
(bind_expr): Remove.
* d-convert.cc (d_array_convert): Use build_local_temp to generate
temporaries, and generate its assignment.
* d-tree.h (create_temporary_var): Remove.
(maybe_temporary_var): Remove.
(d_array_convert): Remove vars argument.
* expr.cc (ExprVisitor::visit (CatExp *)): Use build_local_temp to
generate temporaries, don't wrap them in a BIND_EXPR.
(ExprVisitor::visit (NewExp *)): Likewise.

gcc/testsuite/ChangeLog:

PR d/94970
* gdc.dg/pr94970.d: New test.

3 years agoDaily bump.
GCC Administrator [Sun, 17 May 2020 00:16:48 +0000 (00:16 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 16 May 2020 00:16:46 +0000 (00:16 +0000)] 
Daily bump.

3 years agoUpdate cpplib sv.po.
Joseph Myers [Fri, 15 May 2020 22:41:13 +0000 (22:41 +0000)] 
Update cpplib sv.po.

* sv.po: Update.

3 years agoDaily bump.
GCC Administrator [Fri, 15 May 2020 00:16:42 +0000 (00:16 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Thu, 14 May 2020 00:16:50 +0000 (00:16 +0000)] 
Daily bump.

3 years agoFortran : ICE in gfc_conv_array_constructor_expr PR93497
Mark Eggleston [Thu, 7 May 2020 07:29:14 +0000 (08:29 +0100)] 
Fortran  : ICE in gfc_conv_array_constructor_expr PR93497

Invalid expressions, such as those involving array constructors,
used for the length of character types will cause an ICE.

2020-05-11  Mark Eggleston  <markeggleston@gcc.gnu.org>

Backported from master
2020-05-13  Steven G. Kargl  <kargl@gcc.gnu.org>

gcc/fortran/

PR fortran/93497
* decl.c (char_len_param_value): Check whether character
length expression is of type EXPR_OP and if so simplify it.
* resolve.c (resolve_charlen): Reject length if it has a
rank.

2020-05-11  Mark Eggleston  <markeggleston@gcc.gnu.org>

Backported from master
2020-05-13  Mark Eggleston  <markeggleston@gcc.gnu.org>

gcc/testsuite/

PR fortran/93497
* gfortran.dg/pr88025.f90: Change in wording of error.
* gfortran.dg/pr93497.f90: New test.
* gfortran.dg/pr93714_1.f90: Change in wording of errors.
* gfortran.dg/pr93714_2.f90: Change in wording of errors.

3 years agoipa/94947 - avoid using externally_visible_p ()
Richard Biener [Thu, 7 May 2020 12:06:02 +0000 (14:06 +0200)] 
ipa/94947 - avoid using externally_visible_p ()

externally_visible_p wasn't the correct predicate to use (even if it
worked), instead we should use DECL_EXTERNAL || TREE_PUBLIC.

2020-05-07  Richard Biener  <rguenther@suse.de>

PR ipa/94947
* tree-ssa-structalias.c (refered_from_nonlocal_fn): Use
DECL_EXTERNAL || TREE_PUBLIC instead of externally_visible.
(refered_from_nonlocal_var): Likewise.
(ipa_pta_execute): Likewise.

3 years agoipa/94947 - fix test for externally visible variables for IPA PTA
Richard Biener [Tue, 5 May 2020 11:09:50 +0000 (13:09 +0200)] 
ipa/94947 - fix test for externally visible variables for IPA PTA

This fixes lack of an escape point of externally declared variables.

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

PR ipa/94947
* tree-ssa-structalias.c (ipa_pta_execute): Use
varpool_node::externally_visible_p ().
(refered_from_nonlocal_var): Likewise.

* gcc.dg/torture/pr94947-1.c: New testcase.
* gcc.dg/torture/pr94947-2.c: Likewise.

3 years agotestsuite/92177 - adjust expected patterns for gcc.dg/vect/bb-slp-22.c
Richard Biener [Tue, 5 May 2020 13:38:24 +0000 (15:38 +0200)] 
testsuite/92177 - adjust expected patterns for gcc.dg/vect/bb-slp-22.c

We now always vectorize two BBs, adjust the selector to also scan
for integer multiplication vectorization explicitely.

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

PR testsuite/92177
* gcc.dg/vect/bb-slp-22.c: Adjust.

3 years agoDaily bump.
GCC Administrator [Wed, 13 May 2020 00:16:55 +0000 (00:16 +0000)] 
Daily bump.

3 years agors6000: AIX long double builtins for 64 bit long double.
David Edelsohn [Thu, 30 Apr 2020 15:29:32 +0000 (11:29 -0400)] 
rs6000: AIX long double builtins for 64 bit long double.

When long doubles are 64 bit, the AIX C library overrides the definitions
but GCC builtins point to 128 bit names.  This patch overrides the
builtins for fmodl, frexpl, ldexpl and modfl to refer to the 64 bit symbols.

Backport from mainline
2020-05-04  Clement Chigot  <clement.chigot@atos.net>
    David Edelsohn  <dje.gcc@gmail.com>

* config/rs6000/rs6000-call.c (rs6000_init_builtins): Override explicit
for fmodl, frexpl, ldexpl and modfl builtins.

3 years ago[Fortran] Fix/modify present() handling for assumed-shape optional (PR 94672)
Tobias Burnus [Tue, 12 May 2020 10:07:39 +0000 (12:07 +0200)] 
[Fortran] Fix/modify present() handling for assumed-shape optional (PR 94672)

gcc/fortran/
2020-05-12  Tobias Burnus  <tobias@codesourcery.com>

Backported from mainline
2020-05-11  Tobias Burnus  <tobias@codesourcery.com>

PR fortran/94672
* trans.h (gfc_conv_expr_present): Add use_saved_decl=false argument.
* trans-expr.c (gfc_conv_expr_present): Likewise; use DECL directly
and only if use_saved_decl is true, use the actual PARAM_DECL arg (saved
descriptor).
* trans-array.c (gfc_trans_dummy_array_bias): Set local 'arg.0'
variable to NULL if 'arg' is not present.
* trans-openmp.c (gfc_omp_check_optional_argument): Simplify by checking
'arg.0' instead of the true PARM_DECL.
(gfc_omp_finish_clause): Remove setting 'arg.0' to NULL.

gcc/testsuite/
2020-05-12  Tobias Burnus  <tobias@codesourcery.com>

Backported from mainline
2020-05-11  Jakub Jelinek  <jakub@redhat.com>
    Tobias Burnus  <tobias@codesourcery.com>

PR fortran/94672
* gfortran.dg/gomp/pr94672.f90: New.
* gfortran.dg/missing_optional_dummy_6a.f90: Update scan-tree.

3 years agolibstdc++: Fix incorrect size calculation in PMR resource (PR 94906)
Jonathan Wakely [Tue, 12 May 2020 08:54:44 +0000 (09:54 +0100)] 
libstdc++: Fix incorrect size calculation in PMR resource  (PR 94906)

Calculating the size of a chunk being returned to the upstream allocator
was done with a 32-bit type, so it wrapped if the chunk was 4GB or
larger.

I don't know how to test this without allocating 4GB, so there's no test
in the testsuite. It has been tested manually of course.

Backport from mainline
2020-05-04  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/94906
* src/c++17/memory_resource.cc
(monotonic_buffer_resource::_Chunk::release): Use size_t for shift
operands.

3 years agolibstdc++: Make byte-sized std::fill_n a constant expression (PR 94933)
Jonathan Wakely [Tue, 12 May 2020 08:54:24 +0000 (09:54 +0100)] 
libstdc++: Make byte-sized std::fill_n a constant expression (PR 94933)

The overload for byte types uses memset and isn't constexpr. This adds
the specifier and uses std::is_constant_evaluated() to provide a
compile-time alternative.

Backport from mainline
2020-05-03  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/94933
* include/bits/stl_algobase.h (__fill_a1): Make overload for byte types
usable in constant expressions.
* testsuite/25_algorithms/fill_n/constexpr.cc: Test with bytes and
non-scalars.

3 years agosyscall: append to environment in tests, don't clobber it
Ian Lance Taylor [Mon, 11 May 2020 23:23:44 +0000 (16:23 -0700)] 
syscall: append to environment in tests, don't clobber it

This is a partial backport of https://golang.org/cl/233318.
It's only a partial backport because part of the change was
already applied to libgo in CL 193497 as part of the update
to the Go 1.13beta1 release.

Fixes PR go/95061

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

3 years agoDaily bump.
GCC Administrator [Tue, 12 May 2020 00:16:46 +0000 (00:16 +0000)] 
Daily bump.

3 years agoUpdate gcc .po files.
Joseph Myers [Mon, 11 May 2020 20:44:10 +0000 (20:44 +0000)] 
Update gcc .po files.

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

3 years agoFortran : Spurious warning message with -Wsurprising PR59107
Mark Eggleston [Thu, 23 Apr 2020 09:33:14 +0000 (10:33 +0100)] 
Fortran : Spurious warning message with -Wsurprising PR59107

This change is from a patch developed for gcc-5.  The code
has moved on since then requiring a change to interface.c

2020-05-11  Mark Eggleston  <markeggleston@gcc.gnu.org>

Backported from mainline
2020-05-11  Janus Weil  <janus@gcc.gnu.org>
    Dominique d'Humieres  <dominiq@lps.ens.fr>

gcc/fortran/

PR fortran/59107
* gfortran.h: Rename field resolved as resolve_symbol_called
and assign two 2 bits instead of 1.
* interface.c (check_dtio_interface1): Use new field name.
(gfc_find_typebound_dtio_proc): Use new field name.
* resolve.c (gfc_resolve_intrinsic): Replace check of the formal
field with resolve_symbol_called is at least 2, if it is not
set the field to 2.  (resolve_typebound_procedure): Use new field
name.  (resolve_symbol): Use new field name and check whether it
is at least 1, if it is not set the field to 1.

Backported from mainline
2020-05-11  Mark Eggleston  <markeggleston@gcc.gnu.org>

gcc/testsuite/

PR fortran/59107
* gfortran.dg/pr59107.f90: New test.

3 years agoRTEMS: Improve GCC specification
Sebastian Huber [Mon, 6 Apr 2020 14:34:50 +0000 (16:34 +0200)] 
RTEMS: Improve GCC specification

Add a start/end file specification if the -qrtems option is present.
Allow targets to customize it.

Support the standard -nodefaultlibs option.

gcc/

* config/rtems.h (RTEMS_STARTFILE_SPEC): Define if undefined.
(RTEMS_ENDFILE_SPEC): Likewise.
(STARTFILE_SPEC): Update comment.  Add RTEMS_STARTFILE_SPEC.
(ENDFILE_SPEC): Add RTEMS_ENDFILE_SPEC.
(LIB_SPECS): Support -nodefaultlibs option.
* config/or1k/rtems.h (RTEMS_STARTFILE_SPEC): Define.
(RTEMS_ENDFILE_SPEC): Likewise.
* config/rs6000/rtems.h (RTEMS_STARTFILE_SPEC): Likewise.
(RTEMS_ENDFILE_SPEC): Likewise.
* config/v850/rtems.h (RTEMS_STARTFILE_SPEC): Likewise.
(RTEMS_ENDFILE_SPEC): Likewise.

3 years agoFix typo in fprofile-prefix-path.
Martin Liska [Mon, 11 May 2020 07:35:16 +0000 (09:35 +0200)] 
Fix typo in fprofile-prefix-path.

Backport from mainline
2020-05-11  Martin Liska  <mliska@suse.cz>

PR c/95040
* common.opt: Fix typo in option description.

3 years agoDaily bump.
GCC Administrator [Mon, 11 May 2020 00:16:48 +0000 (00:16 +0000)] 
Daily bump.

3 years agocoroutines: Update TREE_SIDE_EFFECTS on inserted bind exprs.
Iain Sandoe [Sun, 10 May 2020 13:20:13 +0000 (14:20 +0100)] 
coroutines: Update TREE_SIDE_EFFECTS on inserted bind exprs.

There are several places where we insert bind expressions while
making the coroutine AST transforms.  These should be marked as
having side-effects where relevant, which had been omitted.  This
leads to at least one failure in the cppcoros test suite, where a loop
body is dropped in gimplification because it is not marked.

gcc/cp/ChangeLog:

2020-05-10  Iain Sandoe  <iain@sandoe.co.uk>

Backported from mainline
2020-05-08  Iain Sandoe  <iain@sandoe.co.uk>

PR c++/95003
* coroutines.cc (build_actor_fn): Ensure that bind scopes
are marked as having side-effects where necessary.
(replace_statement_captures): Likewise.
(morph_fn_to_coro): Likewise.

gcc/testsuite/ChangeLog:

2020-05-10  Iain Sandoe  <iain@sandoe.co.uk>

Backported from mainline
2020-05-08  Iain Sandoe  <iain@sandoe.co.uk>

PR c++/95003
* g++.dg/coroutines/torture/pr95003.C: New test.

3 years agoDaily bump.
GCC Administrator [Sun, 10 May 2020 00:16:44 +0000 (00:16 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 9 May 2020 00:16:42 +0000 (00:16 +0000)] 
Daily bump.

3 years agoc++: Parenthesized-init of aggregates accepts invalid code [PR94885]
Marek Polacek [Fri, 8 May 2020 15:04:29 +0000 (11:04 -0400)] 
c++: Parenthesized-init of aggregates accepts invalid code [PR94885]

Here we have (conceptually *) something like

  struct B { };
  struct D : B { };
  D(0); // invalid

and in C++20 the ()-initialization has created a { 0 } constructor that
it tries to initialize an object of type D with.  We should reject
initializing an object of type B from 0, but we wrongly accept it because
process_init_constructor_record skips initializers for empty bases/fields:
       if (DECL_SIZE (field) && integer_zerop (DECL_SIZE (field))
           && !TREE_SIDE_EFFECTS (next))
         /* Don't add trivial initialization of an empty base/field to the
            constructor, as they might not be ordered the way the back-end
            expects.  */
         continue;
but here 'next' was error_mark_node, returned by massage_elt_init, so we
wound up with { } which would validly value-initialize the object.

[*] Usually digest_init in build_new_method_call_1 would detect this,
but in this case the instance is is_dummy_object and we don't call
digest just yet.

        PR c++/94885
        * typeck2.c (process_init_constructor_record): Return PICFLAG_ERRONEOUS
        if an initializer element was erroneous.

        * g++.dg/cpp2a/paren-init26.C: New test.

3 years agotree: Avoid variable sharing in get_narrower [PR94724]
Jakub Jelinek [Fri, 8 May 2020 07:37:09 +0000 (09:37 +0200)] 
tree: Avoid variable sharing in get_narrower [PR94724]

On Thu, May 07, 2020 at 02:45:29PM +0200, Thomas Schwinge wrote:
> >>+      for (tree op = win; TREE_CODE (op) == COMPOUND_EXPR;
>
> ..., and new 'op' variable here.
>
> >>+        op = TREE_OPERAND (op, 1))
> >>+     v.safe_push (op);
> >>+      FOR_EACH_VEC_ELT_REVERSE (v, i, op)
> >>+     ret = build2_loc (EXPR_LOCATION (op), COMPOUND_EXPR,
> >>+                       TREE_TYPE (win), TREE_OPERAND (op, 0),
> >>+                       ret);
> >>+      return ret;
> >>     }
> >>   while (TREE_CODE (op) == NOP_EXPR)
> >>     {

There is no reason for the shadowing and op at this point acts as a
temporary and will be overwritten in FOR_EACH_VEC_ELT_REVERSE anyway.
So, we can just s/tree // here.

2020-05-08  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/94724
* tree.c (get_narrower): Reuse the op temporary instead of
shadowing it.

3 years agoDaily bump.
GCC Administrator [Fri, 8 May 2020 00:16:45 +0000 (00:16 +0000)] 
Daily bump.

3 years agolibstdc++: Replace deduced return type in ranges::iter_move (PR 92894)
Jonathan Wakely [Thu, 7 May 2020 16:39:56 +0000 (17:39 +0100)] 
libstdc++: Replace deduced return type in ranges::iter_move (PR 92894)

The deduced return type causes the instantiation of the function body,
which can then require the instantiation of std::projected::operator*
which is intentionally not defined.

This patch uses a helper trait to define the return type, so that the
function body doesn't need to be instantiated.

Unlike on the master branch, this backport to gcc-10 does not change the
iter_rvalue_reference_t alias template and __indirectly_readable_impl
concept to use the new trait.

Backport from mainline
2020-05-01  Jonathan Wakely  <jwakely@redhat.com>
    Patrick Palka  <ppalka@redhat.com>

PR libstdc++/92894
* include/bits/iterator_concepts.h (ranges::__cust_imove::_IMove):
Add trait to determine return type and an alias for it.
(ranges::__cust_imove::_IMove::operator()): Use __result instead of
deduced return type.
* testsuite/24_iterators/customization_points/92894.cc: New test.
* testsuite/24_iterators/indirect_callable/92894.cc: New test.

Co-authored-by: Patrick Palka <ppalka@redhat.com>
3 years agoc++: ICE in value_dependent_expression_p in C++98 mode [PR94938]
Marek Polacek [Thu, 7 May 2020 18:34:15 +0000 (14:34 -0400)] 
c++: ICE in value_dependent_expression_p in C++98 mode [PR94938]

Here we ICE with -std=c++98 since the newly added call to uses_template_parms
(r10-6357): we hit
26530             gcc_assert (cxx_dialect >= cxx11
26531                         || INTEGRAL_OR_ENUMERATION_TYPE_P (type));
and TYPE is a record type.  The problem is that the argument to
value_dependent_expression_p does not satisfy potential_constant_expression
which it must, as the comment explains.  I thought about fixing this in
uses_template_parms -- only call v_d_e_p if p_c_e is true, but in this
case we want to also suppress the warnings if we don't have a constant
expression.  I couldn't simply check TREE_CONSTANT as in
compute_array_index_type_loc, because then we'd stop warning in the new
Wtype-limits3.C test.

Fixed by using type_dependent_expression_p_push instead.  This means
that we won't suppress the warnings for value-dependent expressions that
aren't type-dependent, e.g. sizeof (T).  This only seems to make a
difference for -Wdiv-by-zero, now tested in Wdiv-by-zero-3.C, where I
think it's reasonable to warn.  It could make -Wtautological-compare
warn more, but that warning doesn't trigger when it gets constant arguments.
Wtype-limits4.C is a test reduced from poly-int.h and it tests a scenario
that was missing in our testsuite.

This patch also moves the warning_sentinels after the RECURs -- we mean
to use them for build_x_binary_op purposes only.

        PR c++/94938
        * pt.c (tsubst_copy_and_build): Call type_dependent_expression_p_push
        instead of uses_template_parms.  Move the warning_sentinels after the
        RECURs.

        * g++.dg/warn/Wdiv-by-zero-3.C: New test.
        * g++.dg/warn/Wtype-limits4.C: New test.
        * g++.dg/warn/template-2.C: New test.
        * g++.old-deja/g++.pt/crash10.C: Add dg-warning.

3 years agoalpha: Implement the PR94780 fix for alpha.
Uros Bizjak [Thu, 7 May 2020 15:14:23 +0000 (17:14 +0200)] 
alpha: Implement the PR94780 fix for alpha.

Essentially the same fix as for x86.

2020-05-07  Uroš Bizjak  <ubizjak@gmail.com>

gcc/
* config/alpha/alpha.c (alpha_atomic_assign_expand_fenv): Use
TARGET_EXPR instead of MODIFY_EXPR for the first assignments to
fenv_var and new_fenv_var.

3 years agoFix optindex entries for 2 options.
Martin Liska [Thu, 7 May 2020 14:07:46 +0000 (16:07 +0200)] 
Fix optindex entries for 2 options.

Backport from mainline
2020-05-07  Martin Liska  <mliska@suse.cz>

* doc/invoke.texi: Fix 2 optindex entries.

3 years agotestsuite: Improve g++.dg/ext/attr-parm-1.C testcase [PR94946]
Jakub Jelinek [Thu, 7 May 2020 12:56:51 +0000 (14:56 +0200)] 
testsuite: Improve g++.dg/ext/attr-parm-1.C testcase [PR94946]

The testcase in the current form doesn't FAIL without the patch on
x86_64-linux unless also testing with -m32; as that the 64-bit testing
on that target is probably way more common, and we can use also attributes
that FAIL without the patch with -m64, the following patch adjusts the
test, so that it FAILs without the patch for both -m64 and -m32 (but not
-mx32) and PASSes with the patch.

2020-05-07  Jakub Jelinek  <jakub@redhat.com>

PR c++/94946
* g++.dg/ext/attr-parm-1.C: Enable the test also for lp64 x86, use
sysv_abi and ms_abi attributes in that case instead of fastcall and
no attribute.

3 years agoc-family: Fix error-recovery ICE on __builtin_speculation_safe_value [PR94968]
Jakub Jelinek [Thu, 7 May 2020 12:54:20 +0000 (14:54 +0200)] 
c-family: Fix error-recovery ICE on __builtin_speculation_safe_value [PR94968]

If the second argument of __builtin_speculation_safe_value is
error_mark_node (or has such a type), we ICE during
useless_typ_conversion_p.

202-05-07  Jakub Jelinek  <jakub@redhat.com>

PR c/94968
* c-common.c (speculation_safe_value_resolve_params): Return false if
error_operand_p (val2).
(resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
Remove extraneous semicolon.

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

3 years agoc++: Avoid strict_aliasing_warning on dependent types or expressions [PR94951]
Jakub Jelinek [Wed, 6 May 2020 21:38:13 +0000 (23:38 +0200)] 
c++: Avoid strict_aliasing_warning on dependent types or expressions [PR94951]

The following testcase gets a bogus warning during build_base_path,
when cp_build_indirect_ref* calls strict_aliasing_warning with a dependent
expression.  IMHO calling get_alias_set etc. on dependent types feels wrong
to me, we should just defer the warnings in those cases until instantiation
and only handle the cases where neither type nor expr are dependent.

2020-05-06  Jakub Jelinek  <jakub@redhat.com>

PR c++/94951
* typeck.c (cp_strict_aliasing_warning): New function.
(cp_build_indirect_ref_1, build_reinterpret_cast_1): Use
it instead of strict_aliasing_warning.

* g++.dg/warn/Wstrict-aliasing-bogus-tmpl.C: New test.

3 years agoc++: Don't synthesize sfk_comparison method multiple times [PR94907]
Jakub Jelinek [Wed, 6 May 2020 21:36:31 +0000 (23:36 +0200)] 
c++: Don't synthesize sfk_comparison method multiple times [PR94907]

On the following testcase we ICE, because synthesize_method is called twice
on the same sfk_comparison method fndecl, the first time it works fine
because start_preparsed_function in that case sets both
current_function_decl and cfun, but second time it is called it only sets
the former and keeps cfun NULL, so we ICE when trying to store
current_function_returns_value.
I think it is just wrong to call synthesize_method multiple times, and most
synthesize_method callers avoid that by not calling it if DECL_INITIAL is
already set, so this patch does that too.

2020-05-06  Jakub Jelinek  <jakub@redhat.com>

PR c++/94907
* method.c (defaulted_late_check): Don't call synthesize_method
on constexpr sfk_comparison if it has been called on it already.

* g++.dg/cpp2a/spaceship-synth8.C: New test.

3 years agoriscv: Fix up riscv_atomic_assign_expand_fenv [PR94950]
Jakub Jelinek [Wed, 6 May 2020 07:40:33 +0000 (09:40 +0200)] 
riscv: Fix up riscv_atomic_assign_expand_fenv [PR94950]

Similarly to the fixes on many other targets, riscv needs to use TARGET_EXPR
to avoid having the create_tmp_var_raw temporaries without proper DECL_CONTEXT
and not mentioned in local decls.

2020-05-06  Jakub Jelinek  <jakub@redhat.com>

PR target/94950
* config/riscv/riscv-builtins.c (riscv_atomic_assign_expand_fenv): Use
TARGET_EXPR instead of MODIFY_EXPR for first assignment to old_flags.

3 years agocombine: Don't replace SET_SRC with REG_EQUAL note content if SET_SRC has side-effect...
Jakub Jelinek [Wed, 6 May 2020 07:31:19 +0000 (09:31 +0200)] 
combine: Don't replace SET_SRC with REG_EQUAL note content if SET_SRC has side-effects [PR94873]

There were some discussions about whether REG_EQUAL notes are valid on insns with a single
set which contains auto-inc-dec side-effects in the SET_SRC and the majority thinks that
it should be valid.  So, this patch fixes the combiner to punt in that case, because otherwise
the auto-inc-dec side-effects from the SET_SRC are lost.

2020-05-06  Jakub Jelinek  <jakub@redhat.com>

PR rtl-optimization/94873
* combine.c (combine_instructions): Don't optimize using REG_EQUAL
note if SET_SRC (set) has side-effects.

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

3 years agox86: Fix *vec_dupv4hi constraints [PR94942]
Jakub Jelinek [Tue, 5 May 2020 09:33:47 +0000 (11:33 +0200)] 
x86: Fix *vec_dupv4hi constraints [PR94942]

This insn and split splits into HI->V?HImode broadcast for avx2 and later,
but either the operands need to be %xmm0-%xmm15 (i.e. VEX encoded insn), or
the insn needs both AVX512BW and AVX512VL.
Now, Yv constraint is v for AVX512VL and x otherwise, so for -mavx512vl -mno-avx512bw
we ICE if we end up with a %xmm16+ register from RA.
Yw constraint is v for AVX512VL and AVX512BW and nothing otherwise, so
in this pattern we actually need xYw.

2020-05-05  Jakub Jelinek  <jakub@redhat.com>

PR target/94942
* config/i386/mmx.md (*vec_dupv4hi): Use xYw constraints instead of Yv.

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

3 years agodiagnostics: get_option_html_page fixes
Jakub Jelinek [Mon, 4 May 2020 07:31:27 +0000 (09:31 +0200)] 
diagnostics: get_option_html_page fixes

While testing the --with-documentation-root-url= changes, I run into
[Wreturn-type] URL pointing to gfortran documentation where it obviously
isn't documented.  The following patch updates the list of options to match
reality (on the other side -Wconversion-extra is gfortran only option
documented in gfortran.texi).

Or, perhaps better use the attached patch instead, which doesn't have a
hardcoded list and instead uses the flags?  I went through options.c
and the updated list of options matches exactly the cases where CL_Fortran
is set for "-W*" options together with CL_C and/or CL_CXX (ok, there is also
-Wall and -Wextra, but hopefully we don't emit [Wall] or [Wextra] for
anything).

2020-05-04  Jakub Jelinek  <jakub@redhat.com>

* opts.c (get_option_html_page): Instead of hardcoding a list of
options common between C/C++ and Fortran only use gfortran/
documentation for warnings that have CL_Fortran set but not
CL_C or CL_CXX.

3 years agoc: Fix ICE with _Atomic side-effect in nested fn param decls [PR94842]
Jakub Jelinek [Thu, 30 Apr 2020 19:48:30 +0000 (21:48 +0200)] 
c: Fix ICE with _Atomic side-effect in nested fn param decls [PR94842]

If there are _Atomic side-effects in the parameter declarations
of non-nested function, when they are parsed, current_function_decl is
NULL, the create_artificial_label created labels during build_atomic* are
then adjusted by store_parm_decls through set_labels_context_r callback.
Unfortunately, if such thing happens in nested function parameter
declarations, while those decls are parsed current_function_decl is the
parent function (and am not sure it is a good idea to temporarily clear it,
some code perhaps should be aware it is in a nested function, or it can
refer to variables from the parent function etc.) and that means
store_param_decls through set_labels_context_r doesn't adjust anything.
As those labels are emitted in the nested function body rather than in the
parent, I think it is ok to override the context in those cases.

2020-04-30  Jakub Jelinek  <jakub@redhat.com>

PR c/94842
* c-decl.c (set_labels_context_r): In addition to context-less
LABEL_DECLs adjust also LABEL_DECLs with context equal to
parent function if any.
(store_parm_decls): Adjust comment.

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

3 years agoBump BASE-VER.
Jakub Jelinek [Thu, 7 May 2020 11:31:16 +0000 (13:31 +0200)] 
Bump BASE-VER.

2020-05-07  Jakub Jelinek  <jakub@redhat.com>

* BASE-VER: Set to 10.1.1.

3 years agoUpdate ChangeLog and version files for release releases/gcc-10.1.0
Jakub Jelinek [Thu, 7 May 2020 10:50:32 +0000 (10:50 +0000)] 
Update ChangeLog and version files for release

3 years agoUpdate gennews for GCC 10.
Jakub Jelinek [Thu, 7 May 2020 10:48:18 +0000 (12:48 +0200)] 
Update gennews for GCC 10.

2020-05-07  Jakub Jelinek  <jakub@redhat.com>

* gennews (files): Add files for GCC 10.

3 years agoUpdate the baseline symbols for SPARC64/Linux
Eric Botcazou [Thu, 7 May 2020 08:56:51 +0000 (10:56 +0200)] 
Update the baseline symbols for SPARC64/Linux

3 years agoDaily bump.
GCC Administrator [Thu, 7 May 2020 00:16:58 +0000 (00:16 +0000)] 
Daily bump.

3 years agoc++: Adjust testcase target [pr94946]
Nathan Sidwell [Wed, 6 May 2020 19:15:32 +0000 (12:15 -0700)] 
c++: Adjust testcase target [pr94946]

This uses a target spec to test only on ia32 targets

3 years agoc++: QT overload regression with attribute [PR94946]
Nathan Sidwell [Wed, 6 May 2020 19:07:30 +0000 (12:07 -0700)] 
c++: QT overload regression with attribute [PR94946]

Jason's fix for 90570 & 79585 was a bit overzealous.  Dependent attribs should still
attach to a parameter decl.

* decl.c (grokdeclarator): Don't splice template attributes in
parm context -- they can apply to the parm.

3 years ago[AArch64] Use __getauxval instead of getauxval in LSE detection code in libgcc
Kyrylo Tkachov [Wed, 6 May 2020 15:23:38 +0000 (16:23 +0100)] 
[AArch64] Use __getauxval instead of getauxval in LSE detection code in libgcc

This version of the fix uses __getauxval instead of getauxval.
The whole thing is guarded simply on __gnu_linux__.
__getauxval was introduced in 2.16 but the aarch64 port was added in 2.17 so in practice I expect all aarch64 glibcs to support __getauxval.

Bootstrapped and tested on aarch64-none-linux-gnu.
Also tested on aarch64-none-elf.

2020-05-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

* config/aarch64/lse-init.c (init_have_lse_atomics): Use __getauxval
instead of getauxval.
(AT_HWCAP): Define.
(HWCAP_ATOMICS): Define.
Guard detection on __gnu_linux__.

3 years agox32: Update baseline_symbols.txt
H.J. Lu [Wed, 6 May 2020 13:17:31 +0000 (06:17 -0700)] 
x32: Update baseline_symbols.txt

* config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.

3 years agolibstdc++: Update Solaris baselines for GCC 10.1
Rainer Orth [Wed, 6 May 2020 12:07:03 +0000 (14:07 +0200)] 
libstdc++: Update Solaris baselines for GCC 10.1

I just remembered that the libstdc++ ABI baselines haven't been updated
for the GCC 10 release yet.  This patch corrects this for Solaris/SPARC
and x86.

Created on master with make new-abi-baseline on i386-pc-solaris2.11 and
sparc-sun-solaris2.11, bootstrapped on gcc-10 branch without regressions.

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

3 years agolibstdc++: Document library versioning for 9.[123] and 10.1
Jonathan Wakely [Wed, 6 May 2020 09:30:15 +0000 (10:30 +0100)] 
libstdc++: Document library versioning for 9.[123] and 10.1

* doc/xml/manual/abi.xml (abi.versioning.history): Document library
versions for GCC 9.[123] and 10.1 releases.
* doc/html/*: Regenerate.

3 years agolibstdc++: Update {x86_64,i?86,powerpc64,s390x,aarch64}-linux baselines for GCC 10.1
Jakub Jelinek [Wed, 6 May 2020 09:21:28 +0000 (11:21 +0200)] 
libstdc++: Update {x86_64,i?86,powerpc64,s390x,aarch64}-linux baselines for GCC 10.1

On Wed, May 06, 2020 at 10:49:13AM +0200, Rainer Orth wrote:
> I just remembered that the libstdc++ ABI baselines haven't been updated
> for the GCC 10 release yet.  This patch corrects this for Solaris/SPARC
> and x86.

Oops, here are the updates from Fedora packages built during the weekend.

2020-05-06  Jakub Jelinek  <jakub@redhat.com>

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

3 years agodoc: Update install.texi for GCC 10 on Solaris
Rainer Orth [Wed, 6 May 2020 08:13:09 +0000 (10:13 +0200)] 
doc: Update install.texi for GCC 10 on Solaris

This patch updates install.texi for GCC 10 on Solaris.  It includes some
general cleanup and updates and includes a couple of caveats, some of
them found when testing GCC 10.1.0 RC1 with only the bundled tools.

The reference to TGCware on the binaries page is gone because they only
provide binaries up to Solaris 9.

The note about configuring 64-bit Solaris/SPARC compilers with
--build=sparcv9-sun-solaris2.11 became necessary because upstream
config.guess silently reverted my patch to automatically detect this.  We
already had a bug report about a comparison failure caused by this issue.

Tested with make doc/gccinstall.info and doc/gccinstall.pdf and
inspection of the resulting files.

* doc/install.texi: Replace Sun with Solaris as appropriate.
(Tools/packages necessary for building GCC, Perl version between
5.6.1 and 5.6.24): Remove Solaris 8 reference.
(Installing GCC: Binaries, Solaris 2 (SPARC, Intel)): Remove
TGCware reference.
(Specific, i?86-*-solaris2*): Update version references for
Solaris 11.3 and later.  Remove gas 2.26 caveat.
(Specific, *-*-solaris2*): Update version references for
Solaris 11.3 and later.  Remove boehm-gc reference.
Document GMP, MPFR caveats on Solaris 11.3.
(Specific, sparc-sun-solaris2*): Update Solaris 9 references.
(Specific, sparc64-*-solaris2*): Likewise.
Document --build requirement.

3 years agoDaily bump.
GCC Administrator [Wed, 6 May 2020 00:16:44 +0000 (00:16 +0000)] 
Daily bump.

3 years agobuild: Fix 32-bit TLS detection with 64-bit-default gas on Solaris/x86
Rainer Orth [Tue, 5 May 2020 08:46:20 +0000 (10:46 +0200)] 
build: Fix 32-bit TLS detection with 64-bit-default gas on Solaris/x86

I've recently tested i386-pc-solaris2.11 bootstrap on Solaris 11/x86
with only the bundled tools (using /usr/gnu/bin/as from binutils 2.30 in
this case).  It failed compiling libgo/runtime/proc.c, creating invalid
assembly:

proc.s: Assembler messages:
proc.s:2092: Error: junk at end of line, first unrecognized character is `*'

        .globl  __emutls_v.*runtime.g

and several more errors.  This is completely unexpected since Solaris
does support TLS.  It turned out that 32-bit TLS detection in
gcc/configure had failed:

configure:25145: checking assembler for thread-local storage support
configure:25158: /usr/gnu/bin/as   --fatal-warnings -o conftest.o conftest.s >&5
conftest.s: Assembler messages:
conftest.s:6: Error: relocated field and relocation type differ in signedness
conftest.s:7: Error: @TLSLDM reloc is not supported with 64-bit output format
conftest.s:7: Error: junk `@tlsldm' after expression

which isn't unexpected given that the bundled gas has been configured
for x86_64-pc-solaris2.11, i.e. 64-bit-default.

This is easily fixed by explicitly passing --32 for the 32-bit case,
matching what is done for the 64-bit test.

Tested on i386-pc-solaris2.11 with 32-bit-default and 64-bit-default gas
as well as with /usr/bin/as, always correctly detecting TLS support.

* configure.ac <i[34567]86-*-*>: Add --32 to tls_as_opt on Solaris.
* configure: Regenerate.

3 years agoDaily bump.
GCC Administrator [Tue, 5 May 2020 00:16:47 +0000 (00:16 +0000)] 
Daily bump.

3 years agolibstdc++: Fix broken link to SGI STL FAQ
Jonathan Wakely [Mon, 4 May 2020 21:54:25 +0000 (22:54 +0100)] 
libstdc++: Fix broken link to SGI STL FAQ

The previous URL to an entry in the wayback machine now redirects to a
page saying "SGI.com Tech Archive Resources now retired" so use an older
entry from the archive.

* doc/xml/faq.xml: Use working link for SGI STL FAQ.
* doc/html/*: Regenerate.

3 years agoFix Ada bootstrap on Cygwin64
Eric Botcazou [Mon, 4 May 2020 21:32:39 +0000 (23:32 +0200)] 
Fix Ada bootstrap on Cygwin64

This fixes two compilation errors preventing bootstrap with Ada
on x86_64-pc-cygwin.

2020-05-04  Mikael Pettersson  <mikpelinux@gmail.com>

PR bootstrap/94918
* mingw32.h: Prevent windows.h from including emmintrin.h on Cygw64.
* s-oscons-tmplt.c (Serial_Port_Descriptor): Use System.Win32.HANDLE
also on Cygwin.

3 years agointernal-fn: Avoid dropping the lhs of some calls [PR94941]
Richard Sandiford [Mon, 4 May 2020 20:22:16 +0000 (21:22 +0100)] 
internal-fn: Avoid dropping the lhs of some calls [PR94941]

create_output_operand coerces an output operand to the insn's
predicates, using a suggested rtx location if convenient.
But if that rtx location is actually required rather than
optional, the builder of the insn has to emit a move afterwards.

(We could instead add a new interface that does this automatically,
but that's future work.)

This PR shows that we were failing to emit the move for some of the
vector load internal functions.  I think there are other routines in
internal-fn.c that potentially have the same problem, but this patch is
supposed to be a conservative subset suitable for backporting to GCC 10.

2020-05-04  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
PR middle-end/94941
* internal-fn.c (expand_load_lanes_optab_fn): Emit a move if the
chosen lhs is different from the gcall lhs.
(expand_mask_load_optab_fn): Likewise.
(expand_gather_load_optab_fn): Likewise.

gcc/testsuite/
PR middle-end/94941
* gcc.target/aarch64/sve/acle/general/unoptimized_1.c: New test.

3 years agoUpdate gcc sv.po.
Joseph Myers [Mon, 4 May 2020 19:45:12 +0000 (19:45 +0000)] 
Update gcc sv.po.

* sv.po: Update.

3 years agoRevert "tree: Don't reuse types if TYPE_USER_ALIGN differ [PR94775]"
Marek Polacek [Mon, 4 May 2020 14:41:24 +0000 (10:41 -0400)] 
Revert "tree: Don't reuse types if TYPE_USER_ALIGN differ [PR94775]"

Revert:
2020-04-30  Marek Polacek  <polacek@redhat.com>

PR c++/94775
* tree.c (check_base_type): Return true only if TYPE_USER_ALIGN match.
(check_aligned_type): Check if TYPE_USER_ALIGN match.

3 years agoDaily bump.
GCC Administrator [Mon, 4 May 2020 00:16:41 +0000 (00:16 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Sun, 3 May 2020 00:16:46 +0000 (00:16 +0000)] 
Daily bump.