]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
5 years ago[OpenACC] Don't open-code 'gomp_remove_var' in 'acc_unmap_data'
Thomas Schwinge [Fri, 29 May 2020 12:21:03 +0000 (14:21 +0200)] 
[OpenACC] Don't open-code 'gomp_remove_var' in 'acc_unmap_data'

libgomp/
* oacc-mem.c (acc_unmap_data): Don't open-code 'gomp_remove_var'.

Co-Authored-By: Julian Brown <julian@codesourcery.com>
(cherry picked from commit 2112d3242f413979931e371423dcead9d19440e7)

5 years ago[OpenACC] Remove 'tgt' reference counting from 'acc_unmap_data' [PR92854]
Thomas Schwinge [Fri, 29 May 2020 12:12:16 +0000 (14:12 +0200)] 
[OpenACC] Remove 'tgt' reference counting from 'acc_unmap_data' [PR92854]

libgomp/
PR libgomp/92854
* oacc-mem.c (acc_unmap_data): Remove 'tgt' reference counting.

(cherry picked from commit 4662f7fe7863b19fcc20ba58c22880f8d6661f3a)

5 years agoExtend 'libgomp.oacc-c-c++-common/pr92854-1.c' some more [PR92854]
Thomas Schwinge [Fri, 29 May 2020 12:11:27 +0000 (14:11 +0200)] 
Extend 'libgomp.oacc-c-c++-common/pr92854-1.c' some more [PR92854]

libgomp/
PR libgomp/92854
* testsuite/libgomp.oacc-c-c++-common/pr92854-1.c: Extend some
more.

(cherry picked from commit af8fd1a99d9a21f8088ebb11250cd06a3f275052)

5 years ago[OpenACC] Use 'tgt' returned from 'gomp_map_vars'
Thomas Schwinge [Thu, 14 May 2020 13:49:52 +0000 (15:49 +0200)] 
[OpenACC] Use 'tgt' returned from 'gomp_map_vars'

libgomp/
* oacc-mem.c (goacc_enter_datum): Use 'tgt' returned from
'gomp_map_vars'.
 (acc_map_data): Clean up accordingly.

Co-Authored-By: Julian Brown <julian@codesourcery.com>
(cherry picked from commit f233418ccf6a16eb3bf53018852c5f8926780143)

5 years ago[OpenACC] XFAIL behavior of over-eager 'finalize' clause
Thomas Schwinge [Fri, 29 May 2020 19:36:27 +0000 (21:36 +0200)] 
[OpenACC] XFAIL behavior of over-eager 'finalize' clause

libgomp/
* testsuite/libgomp.oacc-fortran/deep-copy-6.f90: XFAIL behavior
of over-eager 'finalize' clause.
* testsuite/libgomp.oacc-fortran/deep-copy-6-no_finalize.F90: New
file.
* testsuite/libgomp.oacc-fortran/mdc-refcount-1-1-1.f90: Likewise.
* testsuite/libgomp.oacc-fortran/mdc-refcount-1-1-2.F90: Likewise.
* testsuite/libgomp.oacc-fortran/mdc-refcount-1-2-1.f90: Likewise.
* testsuite/libgomp.oacc-fortran/mdc-refcount-1-2-2.f90: Likewise.
* testsuite/libgomp.oacc-fortran/mdc-refcount-1-3-1.f90: Likewise.
* testsuite/libgomp.oacc-fortran/mdc-refcount-1-3-2.f90: Likewise.
* testsuite/libgomp.oacc-fortran/mdc-refcount-1-4-1.f90: Likewise.
* testsuite/libgomp.oacc-fortran/mdc-refcount-1-4-2.f90: Likewise.

(cherry picked from commit 8d7794c0a2aa6696ab1a91ef209e8a9fe2df56ac)

5 years ago[OpenACC] Missing unlocking on error paths in attach/detach code, part II
Thomas Schwinge [Sat, 23 May 2020 15:20:30 +0000 (17:20 +0200)] 
[OpenACC] Missing unlocking on error paths in attach/detach code, part II

libgomp/
* oacc-mem.c (goacc_exit_data_internal): Unlock on error path.

(cherry picked from commit 2e24d457d8c97e409549848715ff046cfa9efd3d)

5 years ago[OpenACC] Missing unlocking on error paths in attach/detach code
Julian Brown [Fri, 22 May 2020 22:16:04 +0000 (15:16 -0700)] 
[OpenACC] Missing unlocking on error paths in attach/detach code

libgomp/
* oacc-mem.c (acc_attach_async): Add missing gomp_mutex_unlock on
error path.
(goacc_detach_internal): Likewise.

Reviewed-by: Thomas Schwinge <thomas@codesourcery.com>
(cherry picked from commit dc9541545d9e5705a97c41713c557f55522b54dc)

5 years ago'libgomp.oacc-fortran/{error_,}stop-{1,2,3}.f': initialize before the checkpoint
Thomas Schwinge [Wed, 6 May 2020 08:05:49 +0000 (10:05 +0200)] 
'libgomp.oacc-fortran/{error_,}stop-{1,2,3}.f': initialize before the checkpoint

If, for example, GCC is configured such that 'libgomp-plugin-nvptx.so.1'
dynamically links against 'libcuda.so.1', but testing is run on a system where
there is no 'libcuda.so.1', this produces output such as:

    PASS: libgomp.oacc-fortran/error_stop-1.f -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O0  (test for excess errors)
    PASS: libgomp.oacc-fortran/error_stop-1.f -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O0  execution test
    FAIL: libgomp.oacc-fortran/error_stop-1.f -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O0  output pattern test, is  CheCKpOInT

    libgomp: while loading libgomp-plugin-nvptx.so.1: libcuda.so.1: cannot open shared object file: No such file or directory
    ERROR STOP

    Error termination. Backtrace: [...]
    , should match CheCKpOInT(
    |
    |^M)+ERROR STOP (
    |
    |^M)+Error termination.*

..., where after 'CheCKpOInT' we got 'libgomp: while loading [...]' injected
before the expected 'ERROR STOP'.

libgomp/
* testsuite/libgomp.oacc-fortran/error_stop-1.f: Initialize before
the checkpoint.
* testsuite/libgomp.oacc-fortran/error_stop-2.f: Likewise.
* testsuite/libgomp.oacc-fortran/error_stop-3.f: Likewise.
* testsuite/libgomp.oacc-fortran/stop-1.f: Likewise.
* testsuite/libgomp.oacc-fortran/stop-2.f: Likewise.
* testsuite/libgomp.oacc-fortran/stop-3.f: Likewise.

(cherry picked from commit 1e378edd8f038c52914bc6cac8f6dd5a5c4f8a98)

5 years agoc++: more constrained nested partial specialization
Patrick Palka [Thu, 4 Jun 2020 17:04:01 +0000 (13:04 -0400)] 
c++: more constrained nested partial specialization

When checking that a constrained partial specialization is more
constrained than the primary template, we pass only the innermost level
of generic template arguments to strictly_subsumes.  This leads to us
doing a nonsensical substitution from normalize_concept_check if the
full set of template arguments has multiple levels, and it ultimately
causes strictly_subsumes to sometimes erroneously return false as in the
testcase below.

gcc/cp/ChangeLog:

* pt.c (process_partial_specialization): Pass the full set of
generic template arguments to strictly_subsumes.

gcc/testsuite/ChangeLog:

* g++.dg/cpp2a/concepts-partial-spec8.C: New test.

(cherry picked from commit c06280ac4c34b0aff8cfa2e74ae8c7afd759d52f)

5 years agoc++: constrained nested partial specialization [PR92103]
Patrick Palka [Thu, 4 Jun 2020 17:03:58 +0000 (13:03 -0400)] 
c++: constrained nested partial specialization [PR92103]

When determining the most specialized partial specialization of a
primary template that is nested inside a class template, we first
tsubst the outer template arguments into the TEMPLATE_DECL of each
partial specialization, and then check for satisfaction of each of the
new TEMPLATE_DECL's constraints.

But tsubst_template_decl does not currently guarantee that constraints
from the original DECL_TEMPLATE_RESULT get reattached to the new
DECL_TEMPLATE_RESULT.  In the testcase below, this leads to the
constraints_satisfied_p check in most_specialized_partial_spec to
trivially return true for each of the partial specializations.

I'm not sure if such a guarantee would be desirable, but in this case we
can just check constraints_satisfied_p on the original TEMPLATE_DECL
instead of on the tsubsted TEMPLATE_DECL here, which is what this patch
does (alongside some reorganizing).

gcc/cp/ChangeLog:

PR c++/92103
* pt.c (most_specialized_partial_spec): Reorganize the loop over
DECL_TEMPLATE_SPECIALIZATIONS.  Check constraints_satisfied_p on
the original template declaration, not on the tsubsted one.

gcc/testsuite/ChangeLog:

PR c++/92103
* g++.dg/cpp2a/concepts-partial-spec7.C: New test.

(cherry picked from commit aee69073cdb8086d393f12474c6177e75467ceaa)

5 years agoDaily bump.
GCC Administrator [Thu, 4 Jun 2020 00:17:06 +0000 (00:17 +0000)] 
Daily bump.

5 years agoUpdate gcc sv.po.
Joseph Myers [Wed, 3 Jun 2020 22:19:34 +0000 (22:19 +0000)] 
Update gcc sv.po.

* sv.po: Update.

5 years agoDaily bump.
GCC Administrator [Wed, 3 Jun 2020 00:17:05 +0000 (00:17 +0000)] 
Daily bump.

5 years agoaarch64: Add initial support for -mcpu=zeus
Kyrylo Tkachov [Tue, 2 Jun 2020 16:48:12 +0000 (17:48 +0100)] 
aarch64: Add initial support for -mcpu=zeus

This patch adds support for the Arm Zeus CPU.
Bootstrapped and tested on aarch64-none-linux-gnu.

gcc/

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

* config/aarch64/aarch64-cores.def (zeus): Define.
* config/aarch64/aarch64-tune.md: Regenerate.
* doc/invoke.texi (AArch64 Options): Document zeus -mcpu option.

5 years agoc++: constrained lambda inside template [PR92633]
Patrick Palka [Tue, 2 Jun 2020 01:37:04 +0000 (21:37 -0400)] 
c++: constrained lambda inside template [PR92633]

When regenerating a constrained lambda during instantiation of an
enclosing template, we are forgetting to substitute into the lambda's
constraints.  Fix this by substituting through the constraints during
tsubst_lambda_expr.

gcc/cp/ChangeLog:

PR c++/92633
PR c++/92838
* pt.c (tsubst_function_decl): Don't do set_constraints when
regenerating a lambda.
(tsubst_lambda_expr): Substitute into the lambda's constraints
and do set_constraints here.

gcc/testsuite/ChangeLog:

PR c++/92633
PR c++/92838
* g++.dg/cpp2a/concepts-lambda11.C: New test.
* g++.dg/cpp2a/concepts-lambda12.C: New test.

(cherry picked from commit c2449995ca36ea955e3c6d4ee7f0d401b512c897)

5 years agoc++: premature requires-expression folding [PR95020]
Patrick Palka [Tue, 2 Jun 2020 12:52:21 +0000 (08:52 -0400)] 
c++: premature requires-expression folding [PR95020]

In the testcase below we're prematurely folding away the
requires-expression to 'true' after substituting in the function's
template arguments, but before substituting in the lambda's deduced
template arguments.

This patch removes the uses_template_parms check when deciding in
tsubst_requires_expr whether to keep around a new requires-expression.
Regardless of whether the template arguments are dependent, there still
might be more template parameters to later substitute in (as in the
below testcase) and even if not, tsubst_expr doesn't perform full
semantic processing unless !processing_template_decl, so we should still
wait until then to fold away the requires-expression.

gcc/cp/ChangeLog:

PR c++/95020
* constraint.cc (tsubst_requires_expr): Produce a new
requires-expression when processing_template_decl, even if
template arguments are not dependent.

gcc/testsuite/ChangeLog:

PR c++/95020
* g++.dg/cpp2a/concepts-lambda7.C: New test.

(cherry picked from commit 7e52f8b1e03776575b92574252d9b6bbed9f1af4)

5 years agoFix unrecognised -mcpu target 'armv7-a' on arm-wrs-vxworks7
Iain Buclaw [Sun, 31 May 2020 22:18:44 +0000 (00:18 +0200)] 
Fix unrecognised -mcpu target 'armv7-a' on arm-wrs-vxworks7

In the removal of arm-wrs-vxworks, the default cpu was updated from arm8
to armv7-a, but this is not recognized as a valid -mcpu target.  There
is however generic-armv7-a, which was likely the intended cpu that
should have been used instead.

gcc/ChangeLog:

PR target/95420
* config.gcc (arm-wrs-vxworks7*): Set default cpu to generic-armv7-a.

(cherry picked from commit 86b14bb1a93d8ef01678d132013a2006a4f00deb)

5 years agod: Fix segfault in build_frontend_type on alpha-*-*
Iain Buclaw [Mon, 1 Jun 2020 11:27:06 +0000 (13:27 +0200)] 
d: Fix segfault in build_frontend_type on alpha-*-*

The va_list type for Alpha includes a nameless dummy field for alignment
purposes.  To transpose this into D, a field named "__pad%d" is inserted
into the struct definition.

It was also noticed that in the D front-end AST copy of the backend
type, all offsets for fields generated by build_frontend_type were set
to zero due to a wrong assumption that DECL_FIELD_OFFSET would have a
non-zero value.  This has been fixed to use byte_position instead.

gcc/d/ChangeLog:

* d-builtins.cc (build_frontend_type): Handle struct fields with NULL
DECL_NAME.  Use byte_position to get the real field offset.

(cherry picked from commit 70f6320462d91e5add99ae5b50226356302a8c0b)

5 years agoDaily bump.
GCC Administrator [Tue, 2 Jun 2020 00:16:58 +0000 (00:16 +0000)] 
Daily bump.

5 years agoFinalization depends on the expression, not on the component.
Thomas Koenig [Sun, 31 May 2020 08:26:40 +0000 (10:26 +0200)] 
Finalization depends on the expression, not on the component.

This patch fixes a 8/9/10/11 regression, where finalized types
were not finalized (and deallocated), which led to memory
leaks.

gcc/fortran/ChangeLog:

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

PR fortran/94361
* class.c (finalize_component): Use expr->finalized instead of
comp->finalized.
* gfortran.h (gfc_component): Remove finalized member.
(gfc_expr): Add it here instead.

gcc/testsuite/ChangeLog:

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

PR fortran/94361
* gfortran.dg/finalize_28.f90: Adjusted free counts.
* gfortran.dg/finalize_33.f90: Likewise.
* gfortran.dg/finalize_34.f90: Likewise.
* gfortran.dg/finalize_35.f90: New test.

(cherry picked from commit 811f902b764c5a13178cbd7588e96c16b3fab504)

5 years agoDaily bump.
GCC Administrator [Mon, 1 Jun 2020 00:16:58 +0000 (00:16 +0000)] 
Daily bump.

5 years agoDaily bump.
GCC Administrator [Sun, 31 May 2020 00:16:55 +0000 (00:16 +0000)] 
Daily bump.

5 years agoc++: satisfaction value of type typedef to bool [PR95386]
Patrick Palka [Fri, 29 May 2020 17:09:20 +0000 (13:09 -0400)] 
c++: satisfaction value of type typedef to bool [PR95386]

In the testcase below, the satisfaction value of fn1<int>'s constraint
is INTEGER_CST '1' of type BOOLEAN_TYPE value_type, which is a typedef
to the standard boolean_type_node.  But satisfaction_value expects to
see exactly boolean_true_node or integer_one_node, which this value is
neither, causing us to trip over the assert therein.

This patch relaxes satisfaction_value to accept any INTEGER_CST which
satisfies integer_zerop or integer_onep.

gcc/cp/ChangeLog:

PR c++/95386
* constraint.cc (satisfaction_value): Relax to accept any
INTEGER_CST that satisfies integer_zerop or integer_onep.

gcc/testsuite/ChangeLog:

PR c++/95386
* g++.dg/concepts/pr95386.C: New test.

5 years agoc++: lambdas inside constraints [PR92652]
Patrick Palka [Fri, 29 May 2020 18:17:02 +0000 (14:17 -0400)] 
c++: lambdas inside constraints [PR92652]

When parsing a constraint-expression, a requires-clause or a
requires-expression, we temporarily increment processing_template_decl
so that we always obtain template trees which we could later reduce via
substitution even when not inside a template.

But incrementing processing_template_decl when we're already inside a
template has the unintended side effect of shifting up the template
parameter levels of a lambda defined inside one of these constructs,
which leads to confusion later during substitution into the lambda.

This patch fixes this issue by incrementing processing_template_decl
during parsing of these constructs only if it is 0.

gcc/cp/ChangeLog:

PR c++/92652
PR c++/93698
PR c++/94128
* parser.c (cp_parser_requires_clause_expression): Temporarily
increment processing_template_decl only if it is 0.
(cp_parser_constraint_expression): Likewise.
(cp_parser_requires_expression): Likewise.

gcc/testsuite/ChangeLog:

PR c++/92652
PR c++/93698
PR c++/94128
* g++.dg/cpp2a/concepts-lambda8.C: New test.
* g++.dg/cpp2a/concepts-lambda9.C: New test.
* g++.dg/cpp2a/concepts-lambda10.C: New test.

(cherry picked from commit 020d86db8896f088435830595640e6fc21bc64ad)

5 years agoc++: constexpr ctor with RANGE_EXPR index [PR95241]
Patrick Palka [Fri, 29 May 2020 13:44:09 +0000 (09:44 -0400)] 
c++: constexpr ctor with RANGE_EXPR index [PR95241]

In the testcase below, the CONSTRUCTOR for 'field' contains a RANGE_EXPR
index:

  {{aggr_init_expr<...>, [1...2]={.off=1}}}

but get_or_insert_ctor_field isn't prepared to handle looking up a
RANGE_EXPR index.

This patch adds limited support to get_or_insert_ctor_field for looking
up a RANGE_EXPR index.  The limited scope of this patch should make it
more suitable for backporting, and more extensive support would be
needed only to handle self-modifying CONSTRUCTORs that contain a
RANGE_EXPR index, but I haven't yet been able to come up with a testcase
that actually creates such a CONSTRUCTOR.

gcc/cp/ChangeLog:

PR c++/95241
* constexpr.c (get_or_insert_ctor_field): Add limited support
for RANGE_EXPR index lookups.

gcc/testsuite/ChangeLog:

PR c++/95241
* g++.dg/cpp0x/constexpr-array25.C: New test.

(cherry picked from commit e069285cdf457cc85070e522380c4e25b0d2ed25)

5 years agoc++: P0848R3 and member function templates [PR95181]
Patrick Palka [Fri, 22 May 2020 14:28:19 +0000 (10:28 -0400)] 
c++: P0848R3 and member function templates [PR95181]

When comparing two special member function templates to see if one hides
the other (as per P0848R3), we need to check satisfaction which we can't
do on templates.  So this patch makes add_method skip the eligibility
test on member function templates and just lets them coexist.

gcc/cp/ChangeLog:

PR c++/95181
* class.c (add_method): Let special member function templates
coexist if they are not equivalently constrained, or in a class
template.

gcc/testsuite/ChangeLog:

PR c++/95181
* g++.dg/concepts/pr95181.C: New test.
* g++.dg/concepts/pr95181-2.C: New test.

Co-authored-by: Jason Merrill <jason@redhat.com>
(cherry picked from commit 6b449b74c590f5a6f66c73aed894e5b5b36aa59d)

5 years agoc++: Template template parameter in constraint [PR95371]
Jason Merrill [Fri, 29 May 2020 20:55:52 +0000 (16:55 -0400)] 
c++: Template template parameter in constraint [PR95371]

gcc/cp/ChangeLog:

PR c++/95371
* pt.c (process_template_parm): Set DECL_TEMPLATE_INFO
on the DECL_TEMPLATE_RESULT.

gcc/testsuite/ChangeLog:

PR c++/95371
* g++.dg/cpp2a/concepts-ttp1.C: New test.

(cherry picked from commit d91b3aea7a5bdfbdaec746af2d62894812e6fd86)

5 years agoDaily bump.
GCC Administrator [Sat, 30 May 2020 00:17:00 +0000 (00:17 +0000)] 
Daily bump.

5 years agolibgfortran: Export forgotten _gfortran_{,m,s}findloc{0,1}_c10 [PR95390]
Jakub Jelinek [Fri, 29 May 2020 17:01:50 +0000 (19:01 +0200)] 
libgfortran: Export forgotten _gfortran_{,m,s}findloc{0,1}_c10 [PR95390]

I have noticed we don't export these 6 symbols and thus the testcase
below fails to link.

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

PR libfortran/95390
* gfortran.dg/findloc_8.f90: New test.

* Makefile.am (i_findloc0_c): Add findloc0_i10.c.
(i_findloc1_c): Add findloc1_i10.c.
* gfortran.map (GFORTRAN_10.2): New symbol version, export
_gfortran_{,m,s}findloc{0,1}_c10 symbols.
* Makefile.in: Regenerated.
* generated/findloc0_c10.c: Generated.
* generated/findloc1_c10.c: Generated.

(cherry picked from commit 316fe6b40165c26b30375f8ad85384379133f89b)

5 years agoc++: Fix tmplattr10.C
Marek Polacek [Thu, 28 May 2020 14:13:16 +0000 (10:13 -0400)] 
c++: Fix tmplattr10.C

This test uses C++11 features so should only run in c++11.

* g++.dg/ext/tmplattr10.C: Only run in c++11.

5 years agoaarch64: PR target/94591: Don't generate invalid REV64 insns
Alex Coplan [Fri, 29 May 2020 13:05:11 +0000 (14:05 +0100)] 
aarch64: PR target/94591: Don't generate invalid REV64 insns

This fixes PR94591. The problem was the function aarch64_evpc_rev_local()
matching vector permutations that were not reversals. In particular, prior to
this patch, this function matched the identity permutation which led to
generating bogus REV64 insns which were rejected by the assembler.

gcc/
PR target/94591
* config/aarch64/aarch64.c (aarch64_evpc_rev_local): Don't match
identity permutation.

gcc/testsuite/
PR target/94591
* gcc.c-torture/execute/pr94591.c: New test.

(cherry picked from commit 98452668d362bb9e6358f7eb5cff69f4f5ab1d45)

5 years agoamdgcn: fix vcc clobber in vector load/store
Andrew Stubbs [Wed, 13 May 2020 15:05:54 +0000 (16:05 +0100)] 
amdgcn: fix vcc clobber in vector load/store

This switches the code that expands scalar addresses to vectors of addresses
from using VCC to using CC_SAVE_REG, for the lo-part to hi-part carry values.
These were fine in code expanded in earlier passes, but addresses expanded
late, such as for stack spills or reloads, could clobber live VCC values,
causing execution failures.

This is the first target-specific testcase for GCN, so the new .exp file is
included.

Backport from master:

gcc/
* config/gcn/gcn-valu.md (add<mode>3_zext_dup): Change to a
define_expand, and rename the original to ...
(add<mode>3_vcc_zext_dup): ... this, and add a custom VCC operand.
(add<mode>3_zext_dup_exec): Likewise, with ...
(add<mode>3_vcc_zext_dup_exec): ... this.
(add<mode>3_zext_dup2): Likewise, with ...
(add<mode>3_zext_dup_exec): ... this.
(add<mode>3_zext_dup2_exec): Likewise, with ...
(add<mode>3_zext_dup2): ... this.
* config/gcn/gcn.c (gcn_expand_scalar_to_vector_address): Switch
addv64di3_zext* calls to use addv64di3_vcc_zext*.

gcc/testsuite/
* gcc.target/gcn/gcn.exp: New file.
* gcc.target/gcn/vcc-clobber.c: New file.

5 years agogcov-tool: Flexible endian adjustment for merging coverage data
Martin Liska [Thu, 28 May 2020 06:16:58 +0000 (08:16 +0200)] 
gcov-tool: Flexible endian adjustment for merging coverage data

gcc/ChangeLog:
2020-05-27  Dong JianQiang  <dongjianqiang2@huawei.com>

PR gcov-profile/95332
* gcov-io.c (gcov_var::endian): Move field.
(from_file): Add IN_GCOV_TOOL check.
* gcov-io.h (gcov_magic): Ditto.

libgcc/ChangeLog:
2020-05-27  Dong JianQiang  <dongjianqiang2@huawei.com>

PR gcov-profile/95332
* libgcov-util.c (read_gcda_file): Call gcov_magic.
* libgcov.h (gcov_magic): Disable GCC poison.

(cherry picked from commit 17d1594bfe08f3c768e024b180816cbe37ac08ac)

5 years agoFix various limitations of git-backport.py.
Martin Liska [Fri, 29 May 2020 09:29:25 +0000 (11:29 +0200)] 
Fix various limitations of git-backport.py.

I've just tested the script and I'm going to install the patch
to all active branches.

contrib/ChangeLog:

* git-backport.py: The script did 'git co HEAD~' when
there was no modified ChangeLog file in a successful
git cherry pick.
Run cherry-pick --continue without editor.

(cherry picked from commit 24663f1f6d709daf8913484914ed01af9f7a480a)

5 years agoDaily bump.
GCC Administrator [Fri, 29 May 2020 00:16:54 +0000 (00:16 +0000)] 
Daily bump.

5 years agoPR fortran/95104 - Segfault on a legal WAIT statement
Harald Anlauf [Thu, 28 May 2020 19:53:17 +0000 (21:53 +0200)] 
PR fortran/95104 - Segfault on a legal WAIT statement

The initial commit for this PR uncovered a latent issue with unit locking
in the Fortran run-time library.  Add check for valid unit.

2020-05-28  Harald Anlauf  <anlauf@gmx.de>

libgfortran/
PR libfortran/95104
* io/unit.c (unlock_unit): Guard by check for NULL pointer.

(cherry picked from commit 6ce3d791dfcba469e709935aba5743640f7d4959)

5 years agoaarch64: Fix segfault in aarch64_expand_epilogue [PR95361]
Richard Sandiford [Thu, 28 May 2020 18:03:46 +0000 (19:03 +0100)] 
aarch64: Fix segfault in aarch64_expand_epilogue [PR95361]

The stack frame for the function in the testcase consisted of two
SVE save slots.  Both saves had been shrink-wrapped, but for different
blocks, meaning that the stack allocation and deallocation were
separate from the saves themselves.  Before emitting the deallocation,
we tried to attach a REG_CFA_DEF_CFA note to the preceding instruction,
to redefine the CFA in terms of the stack pointer.  But in this case
there was no preceding instruction.

This in practice only happens for SVE because:

(a) We don't try to shrink-wrap wb_candidate* registers even when
    we've decided to treat them as normal saves and restores.
    I have a fix for that.

(b) Even with (a) fixed, we're (almost?) guaranteed to emit
    a stack tie for frames that are 64k or larger, so we end
    up hanging the REG_CFA_DEF_CFA note on that instead.

We should only need to redefine the CFA if it was previously
defined in terms of the frame pointer.  In other cases the CFA
should already be defined in terms of the stack pointer,
so redefining it is unnecessary but usually harmless.

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

gcc/
PR testsuite/95361
* config/aarch64/aarch64.c (aarch64_expand_epilogue): Only
redefine the CFA if we have CFI operations.

gcc/testsuite/
PR testsuite/95361
* gcc.target/aarch64/sve/pr95361.c: New test.

5 years agoFortran : "type is( real(kind(1.)) )" spurious syntax error PR94397
Mark Eggleston [Wed, 1 Apr 2020 08:52:41 +0000 (09:52 +0100)] 
Fortran  : "type is( real(kind(1.)) )" spurious syntax error PR94397

Based on a patch in the comments of the PR. That patch fixed this
problem but caused the test cases for PR93484 to fail. It has been
changed to reduce initialisation expressions if the expression is
not EXPR_VARIABLE and not EXPR_CONSTANT.

2020-05-28  Steven G. Kargl  <kargl@gcc.gnu.org>
    Mark Eggleston  <markeggleston@gcc.gnu.org>

gcc/fortran/

PR fortran/94397
* match.c (gfc_match_type_spec): New variable ok initialised
to true. Set ok with the return value of gfc_reduce_init_expr
called only if the expression is not EXPR_CONSTANT and is not
EXPR_VARIABLE. Add !ok to the check for type not being integer
or the rank being greater than zero.

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

gcc/testsuite/

PR fortran/94397
* gfortran.dg/pr94397.F90: New test.

(cherry picked from commit 3ea6977d0f1813d982743a09660eec1760e981ec)

5 years agoi386: Fix V2SF horizontal addsub insn
Uros Bizjak [Thu, 28 May 2020 11:59:49 +0000 (13:59 +0200)] 
i386: Fix V2SF horizontal addsub insn

PFPNACC insn is incorrectly modelled to perform addition and subtraction
of two operands, but in reality it performs horizontal addition and
subtraction:

Instruction: PFPNACC dest,src

Description:
dest[31:0] <- dest[31:0] - dest[63:32];
dest[63:32] <- src[31:0] + src[63:32];

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

gcc/ChangeLog:
* config/i386/mmx.md (mmx_haddsubv2sf3): Correct
RTL template to model horizontal subtraction and addition.

5 years agoi386: Remove %q modifier from two pmov insn templates [PR95355]
Uros Bizjak [Thu, 28 May 2020 11:56:54 +0000 (13:56 +0200)] 
i386: Remove %q modifier from two pmov insn templates [PR95355]

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

gcc/ChangeLog:
PR target/95355
* config/i386/sse.md
(<mask_codefor>avx512f_<code>v16qiv16si2<mask_name>):
Remove %q operand modifier from insn template.
(avx512f_<code>v8hiv8di2<mask_name>): Ditto.

gcc/testsuite/ChangeLog:
PR target/95355
* gcc.target/i386/pr95355.c: New test.

5 years agoAdd documentation for missing params.
Martin Liska [Thu, 28 May 2020 08:49:49 +0000 (10:49 +0200)] 
Add documentation for missing params.

The patch fixes various issues spotted by check-params-in-docs.py
script. I'm going to install the patch.

gcc/ChangeLog:

PR web/95380
* doc/invoke.texi: Add missing params, remove max-once-peeled-insns and
rename ipcp-unit-growth to ipa-cp-unit-growth.

(cherry picked from commit 48e872db11b27604f4993f9be8f67f40b1a40468)

5 years agoFortran : ICE in gfc_trans_label_assign PR50392
Mark Eggleston [Thu, 7 May 2020 07:15:26 +0000 (08:15 +0100)] 
Fortran  : ICE in gfc_trans_label_assign PR50392

A function may contain an assigned goto.  If the the return variable
is an integer a statement can be assigned to it.  Prior to this fix
this resulted in an ICE.

2020-05-28  Tobias Burnus  <tobias@codesourcery.com>

gcc/fortran/

PR fortran/50392
* trans-decl.c (gfc_get_symbol_decl): Remove unnecessary block
delimiters.  Add auxiliary variables if a label is assigned to
a return variable. (gfc_gat_fake_result): If the symbol has an
assign attribute set declaration from the symbol's backend
declaration.

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

gcc/testsuite/

PR fortran/50392
* gfortran.dg/pr50392.f: New test.

(cherry picked from commit a7fd43c38f7469a3ef5ee30e889d60e1376d4dfc)

5 years agoDaily bump.
GCC Administrator [Thu, 28 May 2020 04:24:22 +0000 (04:24 +0000)] 
Daily bump.

5 years agolibstdc++: Fix common_iterator::operator-> [PR95322]
Patrick Palka [Tue, 26 May 2020 20:17:34 +0000 (16:17 -0400)] 
libstdc++: Fix common_iterator::operator-> [PR95322]

This patch fixes the definition of common_iterator::operator-> when the
underlying iterator's operator* returns a non-reference.

The first problem is that the class __detail::_Common_iter_proxy is used
unqualified.  Fixing that revealed another problem: the class's template
friend declaration of common_iterator doesn't match up with the
definition of common_iterator, because the friend declaration isn't
constrained.

If we try to make the friend declaration match up by adding constraints,
we run into frontend bug PR93467.  So we currently can't correctly
express this friend relation between __detail::_Common_iter_proxy and
common_iterator.

As a workaround to this frontend bug, this patch moves the definition of
_Common_iter_proxy into the class template of common_iterator so that we
could instead express the friend relation via the injected-class-name.

(This bug was found when attempting to use views::common to work around
the compile failure with the testcase in PR95322.)

libstdc++-v3/ChangeLog:

PR libstdc++/95322
* include/bits/stl_iterator.h (__detail::_Common_iter_proxy):
Remove and instead define it ...
(common_iterator::_Proxy): ... here.
(common_iterator::operator->): Use it.
* testsuite/24_iterators/common_iterator/2.cc: New test.
* testsuite/std/ranges/adaptors/95322.cc: New test.

(cherry picked from commit 3bf5e7657b752cc2352778e8c20ac9cdddca4f93)

5 years agoPR fortran/95104 - Segfault on a legal WAIT statement
Harald Anlauf [Tue, 26 May 2020 21:29:52 +0000 (23:29 +0200)] 
PR fortran/95104 - Segfault on a legal WAIT statement

Referencing a unit in a WAIT statement that has not been opened before
resulted in a NULL pointer dereference.  Check for this condition.

2020-05-26  Harald Anlauf  <anlauf@gmx.de>

libgfortran/
PR libfortran/95104
* io/transfer.c (st_wait_async): Do not dereference NULL pointer.

gcc/testsuite/
PR libfortran/95104
* gfortran.dg/pr95104.f90: New test.

Co-Authored-By: Steven G. Kargl <kargl@gcc.gnu.org>
(cherry picked from commit 56f03cd12be26828788a27f6f3c250041a958e45)

5 years agoc++: Handle multiple aggregate overloads [PR95319].
Jason Merrill [Wed, 27 May 2020 14:27:25 +0000 (10:27 -0400)] 
c++: Handle multiple aggregate overloads [PR95319].

Here, when considering the two 'insert' overloads, we look for aggregate
conversions from the same initializer-list to B<3> or
initializer_list<B<3>>.  But since my fix for reshape_init overhead on the
PR14179 testcase we reshaped the initializer-list directly, leading to an
error when we then tried to reshape it differently for the second overload.

gcc/cp/ChangeLog:

PR c++/95319
* decl.c (reshape_init_array_1): Don't reuse in overload context.

gcc/testsuite/ChangeLog:

PR c++/95319
* g++.dg/cpp0x/initlist-array12.C: New test.

(cherry picked from commit 6efa97ea1d2fe6df1fbb9df78faaa2248a8618d7)

5 years agoAdd new git-backport.py script.
Martin Liska [Tue, 26 May 2020 13:32:32 +0000 (15:32 +0200)] 
Add new git-backport.py script.

contrib/ChangeLog:

* git-backport.py: New file.

5 years agoc++: operator<=> and -Wzero-as-null-pointer-constant [PR95242]
Jason Merrill [Tue, 26 May 2020 21:27:55 +0000 (17:27 -0400)] 
c++: operator<=> and -Wzero-as-null-pointer-constant [PR95242]

In C++20, if there is no viable operator< available, lhs < rhs gets
rewritten to (lhs <=> rhs) < 0, where operator< for the comparison
categories is intended to accept literal 0 on the RHS but not other
integers.  We don't want this to produce a warning from
-Wzero-as-null-pointer-constant.

gcc/cp/ChangeLog:

* call.c (build_new_op_1): Suppress
warn_zero_as_null_pointer_constant across comparison of <=> result
to 0.

gcc/testsuite/ChangeLog:

* g++.dg/cpp2a/spaceship-synth2.C: Add
-Wzero-as-null-pointer-constant.

(cherry picked from commit 6c66c692043d680a5efcd9616b94f9629c417038)

5 years agoc++: Fix stdcall attribute in template. [PR95222]
Jason Merrill [Mon, 25 May 2020 23:04:05 +0000 (19:04 -0400)] 
c++: Fix stdcall attribute in template. [PR95222]

Another case that breaks with my fix for PR90750: we shouldn't move type
attributes in TYPENAME context either, as there's no decl for them to move
to.

gcc/cp/ChangeLog:

PR c++/95222
* decl.c (grokdeclarator): Don't shift attributes in TYPENAME
context.

gcc/testsuite/ChangeLog:

PR c++/95222
* g++.dg/ext/tmplattr10.C: New test.

(cherry picked from commit 7e7d9fcff56385812764cba63e1ebf6f4c6c0320)

5 years agoDaily bump.
GCC Administrator [Wed, 27 May 2020 07:46:24 +0000 (07:46 +0000)] 
Daily bump.

5 years agoFixes a hang on an invalid ID in a WAIT statement.
Thomas Koenig [Sat, 23 May 2020 17:01:43 +0000 (19:01 +0200)] 
Fixes a hang on an invalid ID in a WAIT statement.

gcc/fortran/ChangeLog:

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

PR libfortran/95191
* libgfortran.h (libgfortran_error_codes): Add
LIBERROR_BAD_WAIT_ID.

libgfortran/ChangeLog:

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

PR libfortran/95191
* io/async.c (async_wait_id): Generate error if ID is higher
than the highest current ID.
* runtime/error.c (translate_error): Handle LIBERROR_BAD_WAIT_ID.

libgomp/ChangeLog:

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

PR libfortran/95191
* testsuite/libgomp.fortran/async_io_9.f90: New test.

(cherry picked from commit 8df7ee67f6fdc780e9453f2baa8d1bf62c000761)

5 years agox86-vxworks malloc aligns to 8 bytes like solaris
Alexandre Oliva [Wed, 13 May 2020 08:21:42 +0000 (05:21 -0300)] 
x86-vxworks malloc aligns to 8 bytes like solaris

Vxworks 7's malloc, like Solaris', only ensures 8-byte alignment of
returned pointers on 32-bit x86, though GCC's stddef.h defines
max_align_t with 16-byte alignment for __float128.  This patch enables
on x86-vxworks the same memory_resource workaround used for x86-solaris.

The testsuite also had a workaround, defining BAD_MAX_ALIGN_T and
xfailing the test; extend those to x86-vxworks as well, and remove the
check for char-aligned requested allocation to be aligned like
max_align_t.  With that change, the test passes on x86-vxworks; I'm
guessing that's the same reason for the test not to pass on
x86-solaris (and on x86_64-solaris -m32), so with the fix, I'm
tentatively removing the xfail.

for libstdc++-v3/ChangeLog

PR libstdc++/77691
* include/experimental/memory_resource
(__resource_adaptor_imp::do_allocate): Handle max_align_t on
x86-vxworks as on x86-solaris.
(__resource_adaptor_imp::do_deallocate): Likewise.
* testsuite/experimental/memory_resource/new_delete_resource.cc:
Drop xfail.
(BAD_MAX_ALIGN_T): Define on x86-vxworks as on x86-solaris.
(test03): Drop max-align test for char-aligned alloc.

(cherry picked from commit 883246530f1bb10d854f455e1c3d55b93675690a)

5 years agoDaily bump. misc/first-auto-changelog-10
GCC Administrator [Tue, 26 May 2020 00:16:50 +0000 (00:16 +0000)] 
Daily bump.

5 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.

5 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.

5 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.

5 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.

5 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.

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

5 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.

5 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.

5 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)

5 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.

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

5 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.

5 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.

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

5 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)

5 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)

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

5 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.

5 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)

5 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)

5 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.

5 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.

5 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)

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

5 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)

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

5 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.

5 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.

5 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.

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

5 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.

5 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.

5 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)

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

5 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.

5 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.

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

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

5 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.

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

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

5 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.

5 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.

5 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.

5 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.

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

5 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.