]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
4 years agoc++: Fix attr-lambda3.C
Jason Merrill [Sun, 28 Feb 2021 14:17:10 +0000 (09:17 -0500)] 
c++: Fix attr-lambda3.C

Some testcase for a change I was testing had an unnecessary ; at the end of
a line that caused a test failure on the 10 branch, so I mistakenly removed
it from this one.  Oops.

gcc/testsuite/ChangeLog:

* g++.dg/ext/attr-lambda3.C: Add missing ;

4 years agoDaily bump.
GCC Administrator [Sun, 28 Feb 2021 00:18:35 +0000 (00:18 +0000)] 
Daily bump.

4 years agoc++: Allow GNU attributes before lambda -> [PR90333]
Jason Merrill [Fri, 26 Feb 2021 10:45:02 +0000 (05:45 -0500)] 
c++: Allow GNU attributes before lambda -> [PR90333]

In my 9.3/10 patch for 90333 I allowed attributes between [] and (), and
after the trailing return type, but not in the place that GCC 8 expected
them, and we've gotten several bug reports about that.  So let's allow them
there, as well.

gcc/cp/ChangeLog:

PR c++/90333
* parser.c (cp_parser_lambda_declarator_opt): Accept GNU attributes
between () and ->.

gcc/testsuite/ChangeLog:

PR c++/90333
* g++.dg/ext/attr-lambda3.C: New test.

4 years agoDaily bump.
GCC Administrator [Sat, 27 Feb 2021 00:18:38 +0000 (00:18 +0000)] 
Daily bump.

4 years agoPR fortran/93340 - fix missed substring simplifications
Harald Anlauf [Thu, 14 Jan 2021 19:25:33 +0000 (20:25 +0100)] 
PR fortran/93340 - fix missed substring simplifications

Substrings were not reduced early enough for use in initializations,
such as DATA statements.  Add an early simplification for substrings
with constant starting and ending points.

gcc/fortran/ChangeLog:

* gfortran.h (gfc_resolve_substring): Add prototype.
* primary.c (match_string_constant): Simplify substrings with
constant starting and ending points.
* resolve.c: Rename resolve_substring to gfc_resolve_substring.
(gfc_resolve_ref): Use renamed function gfc_resolve_substring.

gcc/testsuite/ChangeLog:

* substr_10.f90: New test.
* substr_9.f90: New test.

(cherry picked from commit bdd1b1f55529da00b867ef05a53a08fbfc3d1c2e)

4 years agoDaily bump.
GCC Administrator [Fri, 26 Feb 2021 00:18:48 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Thu, 25 Feb 2021 00:18:38 +0000 (00:18 +0000)] 
Daily bump.

4 years agoFortran: Fix for class defined operators [PR99124].
Paul Thomas [Tue, 23 Feb 2021 19:29:04 +0000 (19:29 +0000)] 
Fortran: Fix for class defined operators [PR99124].

2021-02-23  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/99124
* resolve.c (resolve_fl_procedure): Include class results in
the test for F2018, C15100.
* trans-array.c (get_class_info_from_ss): Do not use the saved
descriptor to obtain the class expression for variables. Use
gfc_get_class_from_expr instead.

gcc/testsuite/
PR fortran/99124
* gfortran.dg/class_defined_operator_2.f03 : New test.
* gfortran.dg/elemental_result_2.f90 : New test.
* gfortran.dg/class_assign_4.f90: Correct the non-conforming
elemental function with an allocatable result with an operator
interface with array dummies and result.

(cherry picked from commit 29a5298955f777c539c628f51e78b75d8e586c44)

4 years agoDaily bump.
GCC Administrator [Wed, 24 Feb 2021 00:18:42 +0000 (00:18 +0000)] 
Daily bump.

4 years agoPR fortran/99169 - Do not clobber allocatable intent(out) dummy argument
Harald Anlauf [Sun, 21 Feb 2021 20:44:24 +0000 (21:44 +0100)] 
PR fortran/99169 - Do not clobber allocatable intent(out) dummy argument

gcc/fortran/ChangeLog:

* trans-expr.c (gfc_conv_procedure_call): Do not add clobber to
allocatable intent(out) argument.

gcc/testsuite/ChangeLog:

* gfortran.dg/intent_optimize_3.f90: New test.

(cherry picked from commit 2df374b337a5f6cf5528e91718e4e12e4006b7ae)

4 years agoaarch64: Add cpu cost tables for A64FX
Qian Jianhua [Tue, 23 Feb 2021 02:29:19 +0000 (10:29 +0800)] 
aarch64: Add cpu cost tables for A64FX

This is a backport of adding cost tables for A64FX.

2021-02-23 Qian Jianhua <qianjh@cn.fujitsu.com>

gcc/ChangeLog:

* config/aarch64/aarch64-cost-tables.h (a64fx_extra_costs): New.
* config/aarch64/aarch64.c (a64fx_addrcost_table): New.
(a64fx_regmove_cost, a64fx_vector_cost): New.
(a64fx_tunings): Use the new added cost tables.

(cherry picked from commit 041f720c821d394896c0e58a1c9b756fe9c82322)

4 years agoDaily bump.
GCC Administrator [Tue, 23 Feb 2021 00:18:49 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Mon, 22 Feb 2021 00:18:26 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Sun, 21 Feb 2021 00:18:28 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Sat, 20 Feb 2021 00:18:36 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Fri, 19 Feb 2021 00:18:31 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Thu, 18 Feb 2021 00:18:37 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Wed, 17 Feb 2021 00:18:30 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Tue, 16 Feb 2021 00:18:49 +0000 (00:18 +0000)] 
Daily bump.

4 years agoFix cast in df_worklist_dataflow_doublequeue
Eric Botcazou [Mon, 15 Feb 2021 09:41:44 +0000 (10:41 +0100)] 
Fix cast in df_worklist_dataflow_doublequeue

The existing cast to float gives weird results in the RTL dump files
on x86 when the compiler is configured -with-fpmath=sse.

gcc/
* df-core.c (df_worklist_dataflow_doublequeue): Use proper cast.

4 years agoDaily bump.
GCC Administrator [Mon, 15 Feb 2021 00:18:35 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Sun, 14 Feb 2021 00:18:39 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Sat, 13 Feb 2021 00:18:45 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Fri, 12 Feb 2021 00:18:41 +0000 (00:18 +0000)] 
Daily bump.

4 years agoFix -freorder-blocks-and-partition glitch with Windows SEH
Eric Botcazou [Thu, 11 Feb 2021 23:16:49 +0000 (00:16 +0100)] 
Fix -freorder-blocks-and-partition glitch with Windows SEH

Since GCC 8, the -freorder-blocks-and-partition pass can split a function
into hot and cold parts, thus generating 2 CIEs for a single function in
DWARF for exception purposes and doing an equivalent trick for Windows SEH.

Now the Windows system unwinder is picky when it comes to the boundary
between an active EH region and the end of the function and, therefore,
a nop may need to be added in specific cases.

gcc/
* config/i386/winnt.c (i386_pe_seh_unwind_emit): When switching to
the cold section, emit a nop before the directive if the previous
active instruction can throw.

4 years agoFortran: Fix ICE after error regression [PR99060].
Paul Thomas [Thu, 11 Feb 2021 10:38:23 +0000 (10:38 +0000)] 
Fortran: Fix ICE after error regression [PR99060].

2021-02-11  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/99060
* primary.c (gfc_match_varspec): Test for non-null 'previous'
before using its name in the error message.

gcc/testsuite/
PR fortran/99060
* gfortran.dg/pr99060.f90: New test.

(cherry picked from commit 5ee5415af8691640b0f7a5332b78d04ba309f4f0)

4 years agoDaily bump.
GCC Administrator [Thu, 11 Feb 2021 00:18:57 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Wed, 10 Feb 2021 00:18:49 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Tue, 9 Feb 2021 00:18:46 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Mon, 8 Feb 2021 00:18:57 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Sun, 7 Feb 2021 00:19:01 +0000 (00:19 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Sat, 6 Feb 2021 00:18:52 +0000 (00:18 +0000)] 
Daily bump.

4 years agoBackport fix for PR/tree-optimization/97236 - fix bad use of VMAT_CONTIGUOUS
Matthias Klose [Tue, 6 Oct 2020 11:41:37 +0000 (13:41 +0200)] 
Backport fix for PR/tree-optimization/97236 - fix bad use of VMAT_CONTIGUOUS

This avoids using VMAT_CONTIGUOUS with single-element interleaving
when using V1mode vectors.  Instead keep VMAT_ELEMENTWISE but
continue to avoid load-lanes and gathers.

2020-10-01  Richard Biener  <rguenther@suse.de>

PR tree-optimization/97236
* tree-vect-stmts.c (get_group_load_store_type): Keep
VMAT_ELEMENTWISE for single-element vectors.

* gcc.dg/vect/pr97236.c: New testcase.

(cherry picked from commit 1ab88985631dd2c5a5e3b5c0dce47cf8b6ed2f82)

4 years agoDaily bump.
GCC Administrator [Fri, 5 Feb 2021 00:18:39 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Thu, 4 Feb 2021 00:18:45 +0000 (00:18 +0000)] 
Daily bump.

4 years agoFix regression with partial rep clause on variant record type
Eric Botcazou [Wed, 3 Feb 2021 10:38:04 +0000 (11:38 +0100)] 
Fix regression with partial rep clause on variant record type

It can yield an incorrect layout when there is a partial representation
clause on a discriminated record type with a variant part.

gcc/ada/
* gcc-interface/decl.c (components_to_record): If the first component
with rep clause is the _Parent field with variable size, temporarily
set it aside when computing the internal layout of the REP part again.
* gcc-interface/utils.c (finish_record_type): Revert to taking the
maximum when merging sizes for all record types with rep clause.
(merge_sizes): Put SPECIAL parameter last and adjust recursive calls.

4 years agoAssorted LTO fixes for Ada
Eric Botcazou [Wed, 3 Feb 2021 10:11:26 +0000 (11:11 +0100)] 
Assorted LTO fixes for Ada

This polishes a few rough edges visible in LTO mode.

gcc/ada/
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Make the
two fields of the fat pointer type addressable, and do not make the
template type read-only.
<E_Record_Type>: If the type has discriminants mark it as may_alias.
* gcc-interface/utils.c (make_dummy_type): Likewise.
(build_dummy_unc_pointer_types): Likewise.

4 years agoarm: Fix up neon_vector_mem_operand [PR97528]
Jakub Jelinek [Fri, 20 Nov 2020 11:26:58 +0000 (12:26 +0100)] 
arm: Fix up neon_vector_mem_operand [PR97528]

The documentation for POST_MODIFY says:
   Currently, the compiler can only handle second operands of the
   form (plus (reg) (reg)) and (plus (reg) (const_int)), where
   the first operand of the PLUS has to be the same register as
   the first operand of the *_MODIFY.
The following testcase ICEs, because combine just attempts to simplify
things and ends up with
(post_modify (reg1) (plus (mult (reg2) (const_int 4)) (reg1))
but the target predicates accept it, because they only verify
that POST_MODIFY's second operand is PLUS and the second operand
of the PLUS is a REG.

The following patch fixes this by performing further verification that
the POST_MODIFY is in the form it should be.

2020-11-20  Jakub Jelinek  <jakub@redhat.com>

PR target/97528
* config/arm/arm.c (neon_vector_mem_operand): For POST_MODIFY, require
first POST_MODIFY operand is a REG and is equal to the first operand
of PLUS.

* gcc.target/arm/pr97528.c: New test.

(cherry picked from commit 410b8f6f41920dad200cd709f9f3de8b840a995c)

4 years agoDaily bump.
GCC Administrator [Wed, 3 Feb 2021 00:18:45 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Tue, 2 Feb 2021 12:49:43 +0000 (12:49 +0000)] 
Daily bump.

4 years agod: Fix junk in generated symbol on powerpc64-*-* [PR98921]
Iain Buclaw [Mon, 1 Feb 2021 23:52:49 +0000 (00:52 +0100)] 
d: Fix junk in generated symbol on powerpc64-*-* [PR98921]

This adds a special formatter to OutBuffer to handle formatted printing
of integers, a common case.  The replacement is faster and safer.

In dmangle.c, it also gets rid of a number of problematic casts, as seen
on powerpc64 targets.

gcc/d/ChangeLog:

PR d/98921
* dmd/dmangle.c (Mangler::visit (TypeSArray *)): Use buf->print
  to format integer value.
(Mangler::visit (TypeIdentifier *)): Likewise.
(Mangler::toBuffer): Likewise.
(Mangler::visit (IntegerExp *)): Likewise.
(Mangler::visit (StringExp *)): Likewise.
(Mangler::visit (ArrayLiteralExp *)): Likewise.
(Mangler::visit (AssocArrayLiteralExp *)): Likewise.
(Mangler::visit (StructLiteralExp *)): Likewise.
* dmd/root/outbuffer.c (OutBuffer::print): New function.
* dmd/root/outbuffer.h (OutBuffer::print): Declare.

(cherry picked from commit 6a481021a65d6237b0c509a76fcd9c1f32c4558e)

4 years agoDaily bump.
GCC Administrator [Mon, 1 Feb 2021 00:18:29 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Sun, 31 Jan 2021 00:18:28 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Sat, 30 Jan 2021 00:18:48 +0000 (00:18 +0000)] 
Daily bump.

4 years agoc++: Fix list-init of array of no-copy type [PR63707]
Jason Merrill [Fri, 15 Jan 2021 16:42:00 +0000 (11:42 -0500)] 
c++: Fix list-init of array of no-copy type [PR63707]

build_vec_init_elt models initialization from some arbitrary object of the
type, i.e. copy, but in the case of list-initialization we don't do a copy
from the elements, we initialize them directly.

gcc/cp/ChangeLog:

PR c++/63707
* tree.c (build_vec_init_expr): Don't call build_vec_init_elt
if we got a CONSTRUCTOR.

gcc/testsuite/ChangeLog:

PR c++/63707
* g++.dg/cpp0x/initlist-array13.C: New test.

4 years agotree-optimization/97627 - Avoid computing niters for fake edges
Richard Biener [Fri, 29 Jan 2021 10:17:42 +0000 (11:17 +0100)] 
tree-optimization/97627 - Avoid computing niters for fake edges

This avoids computing niters information for fake edges.

2021-01-29  Bin Cheng  <bin.cheng@linux.alibaba.com>
    Richard Biener  <rguenther@suse.de>

PR tree-optimization/97627
* tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
Do not analyze fake edges.

* g++.dg/pr97627.C: New testcase.

(cherry picked from commit 3976b2701b826569ffcd90877d94095def507e3f)

4 years agoDaily bump.
GCC Administrator [Fri, 29 Jan 2021 00:18:39 +0000 (00:18 +0000)] 
Daily bump.

4 years agoPR fortran/86470 - ICE with OpenMP, class(*) allocatable
Harald Anlauf [Thu, 28 Jan 2021 09:13:46 +0000 (10:13 +0100)] 
PR fortran/86470 - ICE with OpenMP, class(*) allocatable

gfc_call_malloc should malloc an area of size 1 if no size given.

gcc/fortran/ChangeLog:

PR fortran/86470
* trans.c (gfc_call_malloc): Allocate area of size 1 if passed
size is NULL (as documented).

gcc/testsuite/ChangeLog:

PR fortran/86470
* gfortran.dg/gomp/pr86470.f90: New test.

(cherry picked from commit 33a7a93218b1393d0135e3c4a9ad9ced87808f5e)

4 years agoFix LTO bootstrap on Windows
Eric Botcazou [Thu, 28 Jan 2021 10:31:35 +0000 (11:31 +0100)] 
Fix LTO bootstrap on Windows

The latest fix introduced a comparison of executables and this cannot
directly work on Windows because they are timestamped.  Moreover nobody
sets $(exeext) at top level, at least on MinGW, so you get weird behavior
because some tools add the implicit .exe suffix and others do not.

contrib/
PR lto/85574
* compare-lto: Deal with PE-COFF executables specifically.

4 years agoDaily bump.
GCC Administrator [Thu, 28 Jan 2021 00:19:11 +0000 (00:19 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Wed, 27 Jan 2021 00:18:45 +0000 (00:18 +0000)] 
Daily bump.

4 years agoFix PR ada/98228
Eric Botcazou [Tue, 26 Jan 2021 17:54:26 +0000 (18:54 +0100)] 
Fix PR ada/98228

This is the profiled bootstrap failure for s390x/Linux on the mainline,
which has been introduced by the modref pass but actually exposing an
existing issue in the maybe_pad_type function that is visible on s390x.

The issue is too weak a test for the addressability of the inner component.

gcc/ada/
    Marius Hillenbrand  <mhillen@linux.ibm.com>

PR ada/98228
* gcc-interface/utils.c (maybe_pad_type): Test the size of the new
packable type instead of its alignment for addressability's sake.

4 years agoDaily bump.
GCC Administrator [Tue, 26 Jan 2021 00:18:58 +0000 (00:18 +0000)] 
Daily bump.

4 years agoFix internal error on extension with interface at -O2
Eric Botcazou [Mon, 25 Jan 2021 10:27:29 +0000 (11:27 +0100)] 
Fix internal error on extension with interface at -O2

This is a regression present on the mainline, 10 and 9 branches, in the
form of an internal error with the Ada compiler when a covariant-only
thunk is inlined into its caller.

gcc/ada/
* gcc-interface/trans.c (make_covariant_thunk): Set the DECL_CONTEXT
of the parameters and do not set TREE_PUBLIC on the thunk.
(maybe_make_gnu_thunk): Pass the alias to the covariant thunk.
* gcc-interface/utils.c (finish_subprog_decl): Set the DECL_CONTEXT
of the parameters here...
(begin_subprog_body): ...instead of here.

gcc/testsuite/
* gnat.dg/thunk2.adb, gnat.dg/thunk2.ads: New test.
* gnat.dg/thunk2_pkg.ads: New helper.

4 years agoFortran: Fix deferred character lengths in array constructors [PR98517].
Paul Thomas [Mon, 25 Jan 2021 10:27:51 +0000 (10:27 +0000)] 
Fortran: Fix deferred character lengths in array constructors [PR98517].

2021-01-25  Steve Kargl  <kargl@gcc.gnu.org>

gcc/fortran
PR fortran/98517
* resolve.c (resolve_charlen): Check that length expression is
present before testing for scalar/integer..

gcc/testsuite/
PR fortran/98517
* gfortran.dg/charlen_18.f90 : New test.

(cherry picked from commit c6b0e33febbf73abfcc2bb0e28f0b62afe3b0f2a)

4 years agoFortran: Fix deferred character lengths in array constructors [PR93833].
Paul Thomas [Tue, 29 Dec 2020 17:37:25 +0000 (17:37 +0000)] 
Fortran: Fix deferred character lengths in array constructors [PR93833].

2020-12-29  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/93833
* trans-array.c (get_array_ctor_var_strlen): If the character
length backend_decl cannot be found, convert the expression and
use the string length. Clear up some minor white space issues
in the rest of the file.

gcc/testsuite/
PR fortran/93833
* gfortran.dg/deferred_character_36.f90 : New test.

(cherry picked from commit feae0af82753e06fbff6103da5fbb3b28e1ddbd7)

4 years agoDaily bump.
GCC Administrator [Mon, 25 Jan 2021 00:18:32 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Sun, 24 Jan 2021 00:18:33 +0000 (00:18 +0000)] 
Daily bump.

4 years agolibphobos: Fix executables segfault on mipsel architecture
Iain Buclaw [Sat, 23 Jan 2021 23:20:25 +0000 (00:20 +0100)] 
libphobos: Fix executables segfault on mipsel architecture

The dynamic section on MIPS is read-only, but this was not properly
handled in the runtime library.  The segfault only occurred for programs
that linked to the shared libphobos library.

libphobos/ChangeLog:

PR d/98806
* libdruntime/gcc/sections/elf_shared.d (MIPS_Any): Declare version
for MIPS32 and MIPS64.
(getDependencies): Adjust dlpi_addr on MIPS_Any.

(cherry picked from commit 81f928ec8e8abf1f21c5ff008c39b5d6af78f6cb)

4 years agoFortran: Correction to recent patch in light of comments [PR98022].
Paul Thomas [Sat, 26 Dec 2020 16:44:24 +0000 (16:44 +0000)] 
Fortran: Correction to recent patch in light of comments [PR98022].

2020-12-26  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/98022
* data.c (gfc_assign_data_value): Throw an error for inquiry
references. Follow with corrected code that would provide the
expected result and provides clean error recovery.

gcc/testsuite/
PR fortran/98022
* gfortran.dg/data_inquiry_ref.f90: Change to dg-compile and
add errors for inquiry references.

(cherry picked from commit c7256c8260afa313e019fd531574ad33ec49b9f6)

4 years agoFortran: Enable inquiry references in data statements [PR98022].
Paul Thomas [Sat, 12 Dec 2020 14:01:08 +0000 (14:01 +0000)] 
Fortran: Enable inquiry references in data statements [PR98022].

2020-12-12  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/98022
* data.c (gfc_assign_data_value): Handle inquiry references in
the data statement object list.

gcc/testsuite/
PR fortran/98022
* gfortran.dg/data_inquiry_ref.f90: New test.

(cherry picked from commit ff2dfdef2f2e01c579dd280daa1d81fbeb4d7ac5)

4 years agoDaily bump.
GCC Administrator [Sat, 23 Jan 2021 00:18:38 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Fri, 22 Jan 2021 00:18:42 +0000 (00:18 +0000)] 
Daily bump.

4 years ago[AArch64] Fix symbol offset limit (PR 98618)
Wilco Dijkstra [Wed, 16 Oct 2019 14:24:41 +0000 (14:24 +0000)] 
[AArch64] Fix symbol offset limit (PR 98618)

In aarch64_classify_symbol symbols are allowed large offsets on relocations.
This means the offset can use all of the +/-4GB offset, leaving no offset
available for the symbol itself.  This results in relocation overflow and
link-time errors for simple expressions like &global_array + 0xffffff00.

To avoid this, unless the offset_within_block_p is true, limit the offset
to +/-1MB so that the symbol needs to be within a 3.9GB offset from its
references.  For the tiny code model use a 64KB offset, allowing most of
the 1MB range for code/data between the symbol and its references.

gcc/
PR target/98618
* config/aarch64/aarch64.c (aarch64_classify_symbol):
Apply reasonable limit to symbol offsets.

gcc/testsuite/
PR target/98618
* gcc.target/aarch64/symbol-range.c: Improve testcase.
* gcc.target/aarch64/symbol-range-tiny.c: Likewise.

(cherry picked from commit 7d3b27ff12610fde9d6c4b56abc70c6ee9b6b3db)

4 years agoDaily bump.
GCC Administrator [Thu, 21 Jan 2021 00:18:49 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Wed, 20 Jan 2021 00:19:09 +0000 (00:19 +0000)] 
Daily bump.

4 years ago[Fortran] PR91640 – Fix call to contiguous dummy
Tobias Burnus [Sat, 4 Jan 2020 08:19:51 +0000 (08:19 +0000)] 
[Fortran] PR91640 – Fix call to contiguous dummy

gcc/fortran/

PR fortran/91640
* trans-expr.c (gfc_conv_procedure_call): Avoid copy-out for nonvariable
arguments to contiguous dummy args.  Avoid re-checking whether fsym is
NULL.

gcc/testsuite/

PR fortran/91640
* gfortran.dg/contiguous_10.f90: New.

(cherry picked from commit 9b9623194bf17328bc03e09b043149adf4fb0f9a)

4 years agoFix PR ada/98740
Eric Botcazou [Tue, 19 Jan 2021 09:43:15 +0000 (10:43 +0100)] 
Fix PR ada/98740

It's a long-standing GENERIC tree sharing issue.

gcc/ada/ChangeLog:
PR ada/98740
* gcc-interface/trans.c (add_decl_expr): Always mark TYPE_ADA_SIZE.

4 years agoDaily bump.
GCC Administrator [Tue, 19 Jan 2021 00:18:56 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Mon, 18 Jan 2021 00:18:41 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Sun, 17 Jan 2021 00:18:35 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Sat, 16 Jan 2021 00:18:38 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Fri, 15 Jan 2021 00:18:41 +0000 (00:18 +0000)] 
Daily bump.

4 years agolibgomp_g.h: Include stdint.h instead of gstdint.h.
Kwok Cheung Yeung [Mon, 30 Sep 2019 14:16:34 +0000 (14:16 +0000)] 
libgomp_g.h: Include stdint.h instead of gstdint.h.

2019-09-30  Kwok Cheung Yeung  <kcy@codesourcery.com>

* libgomp_g.h: Include stdint.h instead of gstdint.h.

(cherry picked from commit d7f9ee981f32bdbc6916cb8c6b9435cfc06f88a0, r276301)

4 years ago[nvptx libgomp plugin] Build only in supported configurations
Thomas Schwinge [Mon, 30 Nov 2020 14:15:20 +0000 (15:15 +0100)] 
[nvptx libgomp plugin] Build only in supported configurations

As recently again discussed in <https://gcc.gnu.org/PR97436> "[nvptx] -m32
support", nvptx offloading other than for 64-bit host has never been
implemented, tested, supported.  So we simply should buildn't the nvptx libgomp
plugin in this case.

This avoids build problems if, for example, in a (standard) bi-arch
x86_64-pc-linux-gnu '-m64'/'-m32' build, libcuda is available only in a 64-bit
variant but not in a 32-bit one, which, for example, is the case if you build
GCC against the CUDA toolkit's 'stubs/libcuda.so' (see
<https://stackoverflow.com/a/52784819>).

This amends PR65099 commit a92defdab79a1268f4b9dcf42b937e4002a4cf15 (r225560)
"[nvptx offloading] Only 64-bit configurations are currently supported" to
match the way we're doing this for the HSA/GCN plugins.

libgomp/
PR libgomp/65099
* plugin/configfrag.ac (PLUGIN_NVPTX): Restrict to supported
configurations.
* configure: Regenerate.
* plugin/plugin-nvptx.c (nvptx_get_num_devices): Remove 64-bit
check.

(cherry picked from commit 6106dfb9f73a33c87108ad5b2dcd4842bdd7828e)

4 years agoDaily bump.
GCC Administrator [Thu, 14 Jan 2021 00:18:33 +0000 (00:18 +0000)] 
Daily bump.

4 years agolibstdc++: Fix clang analyzer suppression [PR 98605]
Jonathan Wakely [Wed, 13 Jan 2021 11:03:58 +0000 (11:03 +0000)] 
libstdc++: Fix clang analyzer suppression [PR 98605]

The fix for PR libstdc++/82481 should only have applied for targets
where _GLIBCXX_HAVE_TLS is defined. Because it was also done for non-TLS
targets, it isn't possible to use clang's analyzers on non-TLS targets
if the code uses <mutex>. This fixes it by using a NOLINT comment on
the relevant line instead of testing #ifdef __clang_analyzer__ and
compiling different code when analyzing.

I'm not actually able to reproduce the analyzer warning with the tools
from Clang 10.0.1 so I'm not going to try to make the suppression more
specific with NOLINTNEXTLINE(clang-analyzer-code.StackAddressEscape).

libstdc++-v3/ChangeLog:

PR libstdc++/98605
* include/std/mutex (call_once): Use NOLINT to suppress clang
analyzer warnings.

(cherry picked from commit 8d3636923a309074eb19240ebaa30c1a0801eaaf)

4 years agoHurd: Enable ifunc by default
Samuel Thibault [Sun, 8 Nov 2020 22:52:51 +0000 (23:52 +0100)] 
Hurd: Enable ifunc by default

The binutils bugs seem to have been fixed.

gcc/
* config.gcc [$target == *-*-gnu*]: Enable
'default_gnu_indirect_function'.

(cherry picked from commit e9cb89b936f831a02318d45fc4ddb06f7be55ae4)

4 years agohurd: libgcc unwinding over signal trampolines with SIGINFO
Samuel Thibault [Mon, 21 Dec 2020 14:36:30 +0000 (15:36 +0100)] 
hurd: libgcc unwinding over signal trampolines with SIGINFO

When the application sets SA_SIGINFO, the signal trampoline parameters
are different to follow POSIX.

libgcc/
* config/i386/gnu-unwind.h (x86_gnu_fallback_frame_state): Add the
posix siginfo case to struct handler_args. Detect between legacy
and siginfo from the second parameter, which is a small sigcode in
the legacy case, and a pointer in the siginfo case.

(cherry picked from commit 2b356e689c334ca4765a9ffd95a76cf715447200)

4 years agoDaily bump.
GCC Administrator [Wed, 13 Jan 2021 00:18:39 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Tue, 12 Jan 2021 00:18:28 +0000 (00:18 +0000)] 
Daily bump.

4 years agolibstdc++: Fix misnamed configure option in manual
Jonathan Wakely [Thu, 24 Sep 2020 16:33:16 +0000 (17:33 +0100)] 
libstdc++: Fix misnamed configure option in manual

libstdc++-v3/ChangeLog:

* doc/xml/manual/configure.xml: Correct name of option.
* doc/html/*: Regenerate.

(cherry picked from commit 61f7995398a719f2ff91d07e8f8ed6d4413db697)

4 years agolibstdc++: Fix filesystem::path pretty printer test failure
Jonathan Wakely [Wed, 2 Dec 2020 00:39:21 +0000 (00:39 +0000)] 
libstdc++: Fix filesystem::path pretty printer test failure

On some systems libstdc++-prettyprinters/cxx17.cc FAILs with this error:

skipping: Python Exception <type 'exceptions.AttributeError'> 'gdb.Type' object has no attribute 'name': ^M
got: $27 = filesystem::path "/dir/."^M
FAIL: libstdc++-prettyprinters/cxx17.cc print path2

The gdb.Type.name attribute isn't present in GDB 7.6, so we get an
exception from StdPathPrinter._iterator.__next__ trying to use it.
The StdPathPrinter._iterator is already passed the type's name in its
constructor, so we can just store that and use it instead of
gdb.Type.name.

libstdc++-v3/ChangeLog:

* python/libstdcxx/v6/printers.py (StdExpPathPrinter): Store the
name of the type and pass it to the iterator.
(StdPathPrinter): Likewise.
* testsuite/libstdc++-prettyprinters/filesystem-ts.cc: New test.

(cherry picked from commit a70384f94c83895f97179b45c1a8d66202132af8)

4 years agolibstdc++: Only use __builtin_sprintf if supported [PR 96083]
Jonathan Wakely [Wed, 16 Dec 2020 13:50:34 +0000 (13:50 +0000)] 
libstdc++: Only use __builtin_sprintf if supported [PR 96083]

Clang doesn't support __builtin_sprintf, so use std::sprintf instead.

libstdc++-v3/ChangeLog:

PR libstdc++/96083
* include/ext/throw_allocator.h: Use __has_builtin to check for
__builtin_sprintf support, and use std::sprintf if necessary.

(cherry picked from commit 96d9670e88333d8896a5d2f2bb0403c1e2ad19ab)

4 years agolibstdc++: Fix std::any pretty printer [PR 68735]
Jonathan Wakely [Wed, 2 Dec 2020 21:39:08 +0000 (21:39 +0000)] 
libstdc++: Fix std::any pretty printer [PR 68735]

This fixes errors seen on powerpc64 (big endian only) due to the
printers for std::any and std::experimental::any being unable to find
the manager function.

libstdc++-v3/ChangeLog:

PR libstdc++/65480
PR libstdc++/68735
* python/libstdcxx/v6/printers.py (function_pointer_to_name):
New helper function to get the name of a function from its
address.
(StdExpAnyPrinter.__init__): Use it.

(cherry picked from commit dc2b372ed1b1e9af6db45051cff95478c7616807)

4 years agolibstdc++: Fix compatibility support in unique_ptr pretty printer
Jonathan Wakely [Mon, 10 Aug 2020 17:44:06 +0000 (18:44 +0100)] 
libstdc++: Fix compatibility support in unique_ptr pretty printer

The support for the old std::unique_ptr implementation was failing,
because it tried to work on a typedef instead of the underlying type.
The test supposed to verify the support worked wasn't using a typedef,
so didn't notice the problem.

libstdc++-v3/ChangeLog:

* python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
Use gdb.Type.strip_typedefs().
* testsuite/libstdc++-prettyprinters/compat.cc: Use a typedef in
the emulated old type.

(cherry picked from commit ed11f7e84bcae89f486f5023e566726a7faa7dd4)

4 years agolibstdc++: Fix unique_ptr pretty printer for empty classes
Jonathan Wakely [Tue, 14 May 2019 11:17:18 +0000 (12:17 +0100)] 
libstdc++: Fix unique_ptr pretty printer for empty classes

The printer was confused when unique_ptr<T,D>::pointer is an empty
class, or the deleter is not empty. Instead of assuming the tuple has a
single _M_head_impl member manually inspect the tuple base classes to
get the first element.

* python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
not assume field called _M_head_impl is the first tuple element.
* testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
implementation more accurate.
* testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
empty pointer type and non-empty deleter.

(cherry picked from commit e25f488d603a6bd7570c1ffdfd9572e4b8a645de)

4 years agolibstdc++: Fix pretty printers script and tests
François Dumont [Fri, 20 Dec 2019 12:42:50 +0000 (12:42 +0000)] 
libstdc++: Fix pretty printers script and tests

* python/libstdcxx/v6/printers.py (lookup_node_type): Remove redundant
call to lookup_node_type.
* testsuite/libstdc++-prettyprinters/80276.cc: Define
_GLIBCXX_USE_CXX11_ABI to 0.
* testsuite/libstdc++-prettyprinters/91997.cc: Use regexp-test to check
'a' content.

(cherry picked from commit e278e62f91d955ce808fcf4d05826c7b2779888f)

4 years agolibstdc++: improve how pretty printers find node types (PR 91997)
Jonathan Wakely [Fri, 29 Nov 2019 14:47:03 +0000 (14:47 +0000)] 
libstdc++: improve how pretty printers find node types (PR 91997)

This fixes two related problems.

The iterators for node-based containers use nested typedefs such as
std::list<T>::iterator::_Node to denote their node types. As reported in
https://bugzilla.redhat.com/show_bug.cgi?id=1053438 those typedefs are
not always present in the debug info. That means the pretty printers
cannot find them using gdb.lookup_type (via the find_type helper).
Instead of looking up the nested typedefs this patch makes the printers
look up the actual class templates directly.

A related problem (and the original topic of PR 91997) is that GDB fails
to find types via gdb.lookup_type when printing a backtrace from a
non-C++ functiion: https://sourceware.org/bugzilla/show_bug.cgi?id=25234
That is also solved by not looking up the nested typedef.

PR libstdc++/91997
* python/libstdcxx/v6/printers.py (find_type): Fail more gracefully
if we run out of base classes to look at.
(llokup_templ_spec, lookup_node_type): New utilities to find node
types for node-based containers.
(StdListPrinter.children, NodeIteratorPrinter.__init__)
(NodeIteratorPrinter.to_string, StdSlistPrinter.children)
(StdSlistIteratorPrinter.to_string, StdRbtreeIteratorPrinter.__init__)
(StdMapPrinter.children, StdSetPrinter.children)
(StdForwardListPrinter.children): Use lookup_node_type instead of
find_type.
(StdListIteratorPrinter.__init__, StdFwdListIteratorPrinter.__init__):
Pass name of node type to NodeIteratorPrinter constructor.
(Tr1HashtableIterator.__init__): Rename argument.
(StdHashtableIterator.__init__): Likewise. Use lookup_templ_spec
instead of find_type.
* testsuite/libstdc++-prettyprinters/59161.cc: Remove workaround for
_Node typedef not being present in debuginfo.
* testsuite/libstdc++-prettyprinters/91997.cc: New test.

(cherry picked from commit 9d50a6a78509b42b3c2b2264da1a0d2c4b151d66)

4 years agolibstdc++: Remove accidental -std=gnu++17 from test
Jonathan Wakely [Fri, 31 Jul 2020 17:02:10 +0000 (18:02 +0100)] 
libstdc++: Remove accidental -std=gnu++17 from test

This was probably copied from a std::filesystem test and the -std option
wasn't removed.

libstdc++-v3/ChangeLog:

* testsuite/experimental/filesystem/filesystem_error/cons.cc:
Remove -std=gnu++17 option.

(cherry picked from commit ed0b4bb29a50d6be0e4b6411b3cc9f22967f1313)

4 years agoDaily bump.
GCC Administrator [Mon, 11 Jan 2021 00:18:25 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Sun, 10 Jan 2021 00:18:26 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Sat, 9 Jan 2021 00:18:32 +0000 (00:18 +0000)] 
Daily bump.

4 years agoDaily bump.
GCC Administrator [Fri, 8 Jan 2021 00:18:38 +0000 (00:18 +0000)] 
Daily bump.

4 years agoPR fortran/78746 - invalid access after error recovery
Harald Anlauf [Wed, 6 Jan 2021 18:37:11 +0000 (19:37 +0100)] 
PR fortran/78746 - invalid access after error recovery

The error recovery after an invalid reference to an undefined CLASS
during a TYPE declaration lead to an invalid access.  Add a check.

gcc/fortran/ChangeLog:

* resolve.c (resolve_component): Add check for valid CLASS
reference before trying to access CLASS data.

(cherry picked from commit 8b6f1e8f97fe0d435d334075821149dbd85c8266)

4 years agoChange testcase for pr96325 from run to compile.
Paul Thomas [Tue, 4 Aug 2020 06:53:50 +0000 (07:53 +0100)] 
Change testcase for pr96325 from run to compile.

2020-08-04  Paul Thomas  <pault@gcc.gnu.org>

gcc/testsuite/
PR fortran/96325
* gfortran.dg/pr96325.f90: Change from run to compile.

(cherry picked from commit 863de9321813f947018cc60b06ba163ddcfbb5f2)

4 years agoThis patch fixes PR96325. See the explanatory comment in the testcase.
Paul Thomas [Sun, 2 Aug 2020 09:35:36 +0000 (10:35 +0100)] 
This patch fixes PR96325. See the explanatory comment in the testcase.

2020-08-02  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/96325
* primary.c (gfc_match_varspec): In the case that a component
reference is added to an intrinsic type component, emit the
error message in this function.

gcc/testsuite/
PR fortran/96325
* gfortran.dg/pr96325.f90: New test.
* gfortran.dg/pr91589.f90: Update error message.

(cherry picked from commit e41da82345fb01c4c2641c979a94a975d15312ab)

4 years agoFix failures with -m32 and some memory leaks.
Paul Thomas [Sat, 26 Dec 2020 15:08:11 +0000 (15:08 +0000)] 
Fix failures with -m32 and some memory leaks.

2020-12-23  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/83118
* trans-array.c (gfc_alloc_allocatable_for_assignment): Make
sure that class expressions are captured for dummy arguments by
use of gfc_get_class_from_gfc_expr otherwise the wrong vptr is
used.
* trans-expr.c (gfc_get_class_from_gfc_expr): New function.
(gfc_get_class_from_expr): If a constant expression is
encountered, return NULL_TREE;
(gfc_trans_assignment_1): Deallocate rhs allocatable components
after passing derived type function results to class lhs.
* trans.h : Add prototype for gfc_get_class_from_gfc_expr.

(cherry picked from commit 0175d45d14b1f9ebc4c15ea5bafcda655c37fc35)

4 years agoAs well as the PR this patch fixes problems in handling class objects
Paul Thomas [Fri, 18 Dec 2020 14:00:11 +0000 (14:00 +0000)] 
As well as the PR this patch fixes problems in handling class objects

2020-12-18  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/83118
PR fortran/96012
* resolve.c (resolve_ordinary_assign): Generate a vtable if
necessary for scalar non-polymorphic rhs's to unlimited lhs's.
* trans-array.c (get_class_info_from_ss): New function.
(gfc_trans_allocate_array_storage): Defer obtaining class
element type until all sources of class exprs are tried. Use
class API rather than TREE_OPERAND. Look for class expressions
in ss->info by calling get_class_info_from_ss. After, obtain
the element size for class descriptors. Where the element type
is unknown, cast the data as character(len=size) to overcome
unlimited polymorphic problems.
(gfc_conv_ss_descriptor): Do not fix class variable refs.
(build_class_array_ref, structure_alloc_comps): Replace code
replicating the new function gfc_resize_class_size_with_len.
(gfc_alloc_allocatable_for_assignment): Obtain element size
for lhs in cases of deferred characters and class enitities.
Move code for the element size of rhs to start of block. Clean
up extraction of class parameters throughout this function.
After the shape check test whether or not the lhs and rhs
element sizes are the same. Use earlier evaluation of
'cond_null'. Reallocation of lhs only to happen if size changes
or element size changes.
* trans-expr.c (gfc_resize_class_size_with_len): New function.
(gfc_get_class_from_expr): If a constant expression is
encountered, return NULL_TREE;
(trans_scalar_class_assign): New function.
(gfc_conv_procedure_call): Ensure the vtable is present for
passing a non-class actual to an unlimited formal.
(trans_class_vptr_len_assignment): For expressions of type
BT_CLASS, extract the class expression if necessary. Use a
statement block outside the loop body. Ensure that 'rhs' is
of the correct type. Obtain rhs vptr in all circumstances.
(gfc_trans_scalar_assign): Call trans_scalar_class_assign to
make maximum use of the vptr copy in place of assignment.
(trans_class_assignment): Actually do reallocation if needed.
(gfc_trans_assignment_1): Simplify some of the logic with
'realloc_flag'. Set 'vptr_copy' for all array assignments to
unlimited polymorphic lhs.
* trans.c (gfc_build_array_ref): Call gfc_resize_class_size_
with_len to correct span for unlimited polymorphic decls.
* trans.h : Add prototype for gfc_resize_class_size_with_len.

gcc/testsuite/
PR fortran/83118
PR fortran/96012
* gfortran.dg/dependency_60.f90: New test.
* gfortran.dg/class_allocate_25.f90: New test.
* gfortran.dg/class_assign_4.f90: New test.
* gfortran.dg/unlimited_polymorphic_32.f03: New test.

(cherry picked from commit ce8dcc9105cbd4043d575d8b2c91309a423951a9)

4 years agoSync gcc-changelog scripts.
Martin Liska [Thu, 7 Jan 2021 10:30:29 +0000 (11:30 +0100)] 
Sync gcc-changelog scripts.

contrib/ChangeLog:

* gcc-changelog/git_commit.py: Sync from master.
* gcc-changelog/git_email.py: Likewise.
* gcc-changelog/git_repository.py: Likewise.
* gcc-changelog/test_email.py: Likewise.
* gcc-changelog/test_patches.txt: Likewise.