]> gcc.gnu.org Git - gcc.git/log
gcc.git
3 years agoFortran: Fix problem with allocate initialization [PR99545].
Paul Thomas [Mon, 15 Mar 2021 09:32:52 +0000 (09:32 +0000)]
Fortran: Fix problem with allocate initialization [PR99545].

2021-03-15  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran/ChangeLog

PR fortran/99545
* trans-stmt.c (gfc_trans_allocate): Mark the initialization
assignment by setting init_flag.

gcc/testsuite/ChangeLog

PR fortran/99545
* gfortran.dg/pr99545.f90: New test.

(cherry picked from commit 21ced2776a117924e52f6aab8b41afb613fef0e7)

3 years agoDaily bump.
GCC Administrator [Mon, 15 Mar 2021 00:18:57 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 14 Mar 2021 00:18:37 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 13 Mar 2021 00:18:39 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Fri, 12 Mar 2021 00:18:49 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Thu, 11 Mar 2021 00:18:55 +0000 (00:18 +0000)]
Daily bump.

3 years agoFix Ada bootstrap on Cygwin64
Mikael Pettersson [Tue, 9 Mar 2021 15:58:56 +0000 (08:58 -0700)]
Fix Ada bootstrap on Cygwin64

gcc/ada/
PR bootstrap/94918
* raise-gcc.c: On Cygwin include mingw32.h to prevent
windows.h from including x86intrin.h or emmintrin.h.

3 years agoDaily bump.
GCC Administrator [Wed, 10 Mar 2021 00:19:06 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Tue, 9 Mar 2021 00:19:24 +0000 (00:19 +0000)]
Daily bump.

3 years agoruntime: cast SIGSTKSZ to uintptr
Ian Lance Taylor [Mon, 8 Mar 2021 23:24:06 +0000 (15:24 -0800)]
runtime: cast SIGSTKSZ to uintptr

PR go/99458
* libgo/runtime/proc.c: cast SIGSTKSZ to uintptr
In newer versions of glibc it is long, which causes a signed
comparison warning.

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

3 years agoPR libfortran/99218 - matmul on temporary array accesses invalid memory
Harald Anlauf [Fri, 5 Mar 2021 19:57:54 +0000 (20:57 +0100)]
PR libfortran/99218 - matmul on temporary array accesses invalid memory

Do not invoke tuned rank-2 times rank-2 matmul if rank(b) == 1.

libgfortran/ChangeLog:

PR libfortran/99218
* m4/matmul_internal.m4: Invoke tuned matmul only for rank(b)>1.
* generated/matmul_c10.c: Regenerated.
* generated/matmul_c16.c: Likewise.
* generated/matmul_c4.c: Likewise.
* generated/matmul_c8.c: Likewise.
* generated/matmul_i1.c: Likewise.
* generated/matmul_i16.c: Likewise.
* generated/matmul_i2.c: Likewise.
* generated/matmul_i4.c: Likewise.
* generated/matmul_i8.c: Likewise.
* generated/matmul_r10.c: Likewise.
* generated/matmul_r16.c: Likewise.
* generated/matmul_r4.c: Likewise.
* generated/matmul_r8.c: Likewise.
* generated/matmulavx128_c10.c: Likewise.
* generated/matmulavx128_c16.c: Likewise.
* generated/matmulavx128_c4.c: Likewise.
* generated/matmulavx128_c8.c: Likewise.
* generated/matmulavx128_i1.c: Likewise.
* generated/matmulavx128_i16.c: Likewise.
* generated/matmulavx128_i2.c: Likewise.
* generated/matmulavx128_i4.c: Likewise.
* generated/matmulavx128_i8.c: Likewise.
* generated/matmulavx128_r10.c: Likewise.
* generated/matmulavx128_r16.c: Likewise.
* generated/matmulavx128_r4.c: Likewise.
* generated/matmulavx128_r8.c: Likewise.

gcc/testsuite/ChangeLog:

PR libfortran/99218
* gfortran.dg/matmul_21.f90: New test.

(cherry picked from commit b1bee29167df6b0fbc9a4c8d06e2acbf3367af47)

3 years agoAdd mi_thunk support for vcalls on hppa.
John David Anglin [Sun, 7 Mar 2021 17:44:49 +0000 (17:44 +0000)]
Add mi_thunk support for vcalls on hppa.

gcc/ChangeLog:

PR target/85074
* config/pa/pa.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): Define as
hook_bool_const_tree_hwi_hwi_const_tree_true.
(pa_asm_output_mi_thunk): Add support for nonzero vcall_offset.

3 years agoDaily bump.
GCC Administrator [Sun, 7 Mar 2021 00:18:44 +0000 (00:18 +0000)]
Daily bump.

3 years agoOpenACC: C/C++ - fix async parsing [PR99137]
Tobias Burnus [Fri, 5 Mar 2021 10:41:44 +0000 (11:41 +0100)]
OpenACC: C/C++ - fix async parsing [PR99137]

gcc/c/ChangeLog:

PR c/99137
* c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.

gcc/cp/ChangeLog:

PR c/99137
* parser.c (cp_parser_oacc_clause_async): Reject comma expressions.

gcc/testsuite/ChangeLog:

PR c/99137
* c-c++-common/goacc/asyncwait-1.c: Update dg-error; add
additional test.

(cherry picked from commit 6ddedd3efa3fe482f76a4037521a06b3ac9f2a8b)

3 years agoDaily bump.
GCC Administrator [Sat, 6 Mar 2021 00:19:01 +0000 (00:19 +0000)]
Daily bump.

3 years agoc++: Use c++2a in g++.dg/cpp2a/nontype-class-defarg1.C.
Marek Polacek [Fri, 5 Mar 2021 17:51:53 +0000 (12:51 -0500)]
c++: Use c++2a in g++.dg/cpp2a/nontype-class-defarg1.C.

GCC 9 doesn't have the "c++20" target yet.

* g++.dg/cpp2a/nontype-class-defarg1.C: Use target c++2a.

3 years agoFix build breakage with latest glibc release
Eric Botcazou [Fri, 5 Mar 2021 11:45:41 +0000 (12:45 +0100)]
Fix build breakage with latest glibc release

gcc/ada/
PR ada/99264
* init.c (__gnat_alternate_sta) [Linux]: Remove preprocessor test on
MINSIGSTKSZ and bump size to 32KB.
* libgnarl/s-osinte__linux.ads (Alternate_Stack_Size): Bump to 32KB.

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

3 years agoc++: Fix class NTTP constness handling [PR98810]
Jason Merrill [Thu, 25 Feb 2021 21:47:53 +0000 (16:47 -0500)]
c++: Fix class NTTP constness handling [PR98810]

Here, when substituting still-dependent args into an alias template, we see
a non-const type because the default argument is non-const, and is not a
template parm object because it's still dependent.

gcc/cp/ChangeLog:

PR c++/98810
* pt.c (tsubst_copy) [VIEW_CONVERT_EXPR]: Add const
to a class non-type template argument that needs it.

gcc/testsuite/ChangeLog:

PR c++/98810
* g++.dg/cpp2a/nontype-class-defarg1.C: New test.

3 years agoc++: C++17 and decltype of multi-operator expression [PR95675]
Jason Merrill [Wed, 3 Mar 2021 04:59:00 +0000 (23:59 -0500)]
c++: C++17 and decltype of multi-operator expression [PR95675]

A call that is the immediate operand of decltype has special semantics: no
temporary is produced, so it's OK for the return type to be e.g. incomplete.
But we were treating (e | f) the same way, which confused overload
resolution when we then tried to evaluate ... | g.

Fixed by making build_temp do what its name says, and force the C++17
temporary materialization conversion.

gcc/cp/ChangeLog:

PR c++/95675
* call.c (build_temp): Wrap a CALL_EXPR in a TARGET_EXPR
if it didn't get one before.

gcc/testsuite/ChangeLog:

PR c++/95675
* g++.dg/cpp0x/decltype-call5.C: New test.
* g++.dg/cpp0x/decltype-call6.C: New test.

3 years agoDaily bump.
GCC Administrator [Thu, 4 Mar 2021 00:19:04 +0000 (00:19 +0000)]
Daily bump.

3 years agod: Fix heap-buffer-overflow in checkModFileAlias [PR 99337]
Iain Buclaw [Wed, 3 Mar 2021 14:34:04 +0000 (15:34 +0100)]
d: Fix heap-buffer-overflow in checkModFileAlias [PR 99337]

The code wrongly assumed memcmp did not read past the mismatch.

gcc/d/ChangeLog:

PR d/99337
* dmd/dmodule.c (checkModFileAlias): Don't read past buffer in
  comparison.

(cherry picked from commit d6177870dd2696501e3b8d3930fd5549d4acaeae)

3 years agoFix ICE with pathologically large frames
Eric Botcazou [Wed, 3 Mar 2021 11:25:03 +0000 (12:25 +0100)]
Fix ICE with pathologically large frames

gcc/
PR target/99234
* config/i386/i386.c (ix86_compute_frame_layout): For a SEH target,
point back the hard frame pointer to its default location when the
frame is larger than SEH_MAX_FRAME_SIZE.

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

3 years agoDaily bump.
GCC Administrator [Tue, 2 Mar 2021 00:18:43 +0000 (00:18 +0000)]
Daily bump.

3 years agoFix wrong result for 1.0/3.0 at -O2 -fno-omit-frame-pointer -frounding-math
Eric Botcazou [Mon, 1 Mar 2021 06:53:05 +0000 (07:53 +0100)]
Fix wrong result for 1.0/3.0 at -O2 -fno-omit-frame-pointer -frounding-math

This wrong-code PR for the C++ compiler on x86-64/Windows is a regression
in GCC 9 and later, but the underlying issue has probably been there since
SEH was implemented and is exposed by this comment in config/i386/winnt.c:

  /* SEH records saves relative to the "current" stack pointer, whether
     or not there's a frame pointer in place.  This tracks the current
     stack pointer offset from the CFA.  */
  HOST_WIDE_INT sp_offset;

That's not what the (current) Microsoft documentation says; instead it says:

  /* SEH records offsets relative to the lowest address of the fixed stack
     allocation.  If there is no frame pointer, these offsets are from the
     stack pointer; if there is a frame pointer, these offsets are from the
     value of the stack pointer when the frame pointer was established, i.e.
     the frame pointer minus the offset in the .seh_setframe directive.  */

That's why the implementation is correct only under the condition that the
frame pointer be established *after* the fixed stack allocation; as a matter
of fact, that's clearly the model underpinning SEH, but is the opposite of
what is done e.g. on Linux.

However the issue is mostly papered over in practice because:

  1. SEH forces use_fast_prologue_epilogue to false, which in turns forces
save_regs_using_mov to false, so the general regs are always pushed when
they need to be saved, which eliminates the offset computation for them.

  2. As soon as a frame is larger than 240 bytes, the frame pointer is fixed
arbitrarily to 128 bytes above the stack pointer, which of course requires
that it be established after the fixed stack allocation.

So you need a small frame clobbering one of the call-saved XMM registers in
order to generate wrong SEH unwind info.

The attached fix makes sure that the frame pointer is always established
after the fixed stack allocation by pointing it at or below the lowest used
register save area, i.e. the SSE save area, and removing the special early
saves in the prologue; the end result is a uniform prologue sequence for
SEH whatever the frame size.  And it avoids a discrepancy between cases
where the number of saved general regs is even and cases where it is odd.

gcc/
PR target/99234
* config/i386/i386.c (ix86_compute_frame_layout): For a SEH target,
point the hard frame pointer to the SSE register save area instead
of the general register save area.  Perform only minimal adjustment
for small frames if it is initially not correctly aligned.
(ix86_expand_prologue): Remove early saves for a SEH target.
* config/i386/winnt.c (struct seh_frame_state): Document constraint.
gcc/testsuite/
* g++.dg/eh/seh-xmm-unwind.C: New test.

3 years agoDaily bump.
GCC Administrator [Mon, 1 Mar 2021 00:19:00 +0000 (00:19 +0000)]
Daily bump.

3 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 ;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

This page took 0.096011 seconds and 5 git commands to generate.