]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
2 years agofortran: Move the clobber generation code
Mikael Morin [Wed, 31 Aug 2022 09:00:45 +0000 (11:00 +0200)] 
fortran: Move the clobber generation code

This change inlines the clobber generation code from
gfc_conv_expr_reference to the single caller from where the add_clobber
flag can be true, and removes the add_clobber argument.

What motivates this is the standard making the procedure call a cause
for a variable to become undefined, which translates to a clobber
generation, so clobber generation should be closely related to procedure
call generation, whereas it is rather orthogonal to variable reference
generation.  Thus the generation of the clobber feels more appropriate
in gfc_conv_procedure_call than in gfc_conv_expr_reference.

Behaviour remains unchanged.

gcc/fortran/ChangeLog:

* trans.h (gfc_conv_expr_reference): Remove add_clobber
argument.
* trans-expr.c (gfc_conv_expr_reference): Ditto. Inline code
depending on add_clobber and conditions controlling it ...
(gfc_conv_procedure_call): ... to here.

(cherry picked from commit 2b393f6f83903cb836676bbd042c1b99a6e7e6f7)

2 years agoDaily bump.
GCC Administrator [Mon, 10 Oct 2022 00:18:01 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 9 Oct 2022 00:19:20 +0000 (00:19 +0000)] 
Daily bump.

2 years agoFortran: Fix ICE and wrong code for assumed-rank arrays [PR100029, PR100040]
José Rui Faustino de Sousa [Sun, 25 Sep 2022 20:48:55 +0000 (22:48 +0200)] 
Fortran: Fix ICE and wrong code for assumed-rank arrays [PR100029, PR100040]

gcc/fortran/ChangeLog:

PR fortran/100040
PR fortran/100029
* trans-expr.c (gfc_conv_class_to_class): Add code to have
assumed-rank arrays recognized as full arrays and fix the type
of the array assignment.
(gfc_conv_procedure_call): Change order of code blocks such that
the free of ALLOCATABLE dummy arguments with INTENT(OUT) occurs
first.

gcc/testsuite/ChangeLog:

PR fortran/100029
* gfortran.dg/PR100029.f90: New test.

PR fortran/100040
* gfortran.dg/PR100040.f90: New test.

(cherry picked from commit 5299155bb80e90df822e1eebc9f9a0c8e4505a46)

2 years agoDaily bump.
GCC Administrator [Sat, 8 Oct 2022 00:20:01 +0000 (00:20 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Fri, 7 Oct 2022 00:18:51 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Thu, 6 Oct 2022 09:15:08 +0000 (09:15 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Wed, 5 Oct 2022 00:19:10 +0000 (00:19 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Tue, 4 Oct 2022 00:19:37 +0000 (00:19 +0000)] 
Daily bump.

2 years agogcc/config/t-i386: add build dependencies on i386-builtin-types.inc
Sergei Trofimovich [Fri, 16 Sep 2022 17:33:11 +0000 (18:33 +0100)] 
gcc/config/t-i386: add build dependencies on i386-builtin-types.inc

i386-builtin-types.inc is included indirectly via i386-builtins.h
into 4 files: i386.cc i386-builtins.cc i386-expand.cc i386-features.cc

Only i386.cc dependency was present in gcc/config/t-i386 makefile.

As a result parallel builds occasionally fail as:

    g++ ... -o i386-builtins.o ... ../../gcc-13-20220911/gcc/config/i386/i386-builtins.cc
    In file included from ../../gcc-13-20220911/gcc/config/i386/i386-builtins.cc:92:
    ../../gcc-13-20220911/gcc/config/i386/i386-builtins.h:25:10:
     fatal error: i386-builtin-types.inc: No such file or directory
       25 | #include "i386-builtin-types.inc"
          |          ^~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    make[3]: *** [../../gcc-13-20220911/gcc/config/i386/t-i386:54: i386-builtins.o]
      Error 1 shuffle=1663349189

gcc/
PR target/107064
* config/i386/t-i386: Add build-time dependencies against
i386-builtin-types.inc to i386-builtins.o, i386-expand.o,
i386-features.o.

(cherry picked from commit ef3165736d9daafba88adb2db65b2e8ebf0024ca)

2 years agoDaily bump.
GCC Administrator [Mon, 3 Oct 2022 00:18:56 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 2 Oct 2022 00:19:14 +0000 (00:19 +0000)] 
Daily bump.

2 years agoFortran: Fix function attributes [PR100132]
José Rui Faustino de Sousa [Mon, 19 Sep 2022 20:00:45 +0000 (22:00 +0200)] 
Fortran: Fix function attributes [PR100132]

gcc/fortran/ChangeLog:

PR fortran/100132
* trans-types.c (create_fn_spec): Fix function attributes when
passing polymorphic pointers.

gcc/testsuite/ChangeLog:

PR fortran/100132
* gfortran.dg/PR100132.f90: New test.

(cherry picked from commit be60aa5b608b5f09fadfeff852a46589ac311a42)

2 years agoDaily bump.
GCC Administrator [Sat, 1 Oct 2022 00:19:22 +0000 (00:19 +0000)] 
Daily bump.

2 years agoFortran: error recovery while simplifying intrinsic UNPACK [PR107054]
Harald Anlauf [Tue, 27 Sep 2022 18:54:28 +0000 (20:54 +0200)] 
Fortran: error recovery while simplifying intrinsic UNPACK [PR107054]

gcc/fortran/ChangeLog:

PR fortran/107054
* simplify.c (gfc_simplify_unpack): Replace assert by condition
that terminates simplification when there are not enough elements
in the constructor of argument VECTOR.

gcc/testsuite/ChangeLog:

PR fortran/107054
* gfortran.dg/pr107054.f90: New test.

(cherry picked from commit 78bc6497fc61bbdacfb416ee0246a775360d9af6)

2 years agoFortran: fix ICE in generate_coarray_sym_init [PR82868]
Harald Anlauf [Wed, 21 Sep 2022 17:55:30 +0000 (19:55 +0200)] 
Fortran: fix ICE in generate_coarray_sym_init [PR82868]

gcc/fortran/ChangeLog:

PR fortran/82868
* trans-decl.c (generate_coarray_sym_init): Skip symbol
if attr.associate_var.

gcc/testsuite/ChangeLog:

PR fortran/82868
* gfortran.dg/associate_26a.f90: New test.

(cherry picked from commit bc71318a91286b5f00e88f07aab818ac82510692)

2 years agoFortran: NULL pointer dereference in invalid simplification [PR106985]
Harald Anlauf [Tue, 20 Sep 2022 20:23:43 +0000 (22:23 +0200)] 
Fortran: NULL pointer dereference in invalid simplification [PR106985]

gcc/fortran/ChangeLog:

PR fortran/106985
* expr.c (gfc_simplify_expr): Avoid NULL pointer dereference.

gcc/testsuite/ChangeLog:

PR fortran/106985
* gfortran.dg/pr106985.f90: New test.

(cherry picked from commit 8dbb15bc2d019488240c1e69d93121b0347ac092)

2 years agoFortran: improve error recovery while simplifying size of bad array [PR103694]
Harald Anlauf [Tue, 23 Aug 2022 20:16:14 +0000 (22:16 +0200)] 
Fortran: improve error recovery while simplifying size of bad array [PR103694]

gcc/fortran/ChangeLog:

PR fortran/103694
* simplify.c (simplify_size): The size expression of an array cannot
be simplified if an error occurs while resolving the array spec.

gcc/testsuite/ChangeLog:

PR fortran/103694
* gfortran.dg/pr103694.f90: New test.

(cherry picked from commit 55d8c5409325001c89c35c3d04d425dec9127146)

2 years agoDaily bump.
GCC Administrator [Fri, 30 Sep 2022 00:18:36 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Thu, 29 Sep 2022 00:18:23 +0000 (00:18 +0000)] 
Daily bump.

2 years agoaarch64: Add support for -mcpu=neoverse-v2
Kyrylo Tkachov [Wed, 28 Sep 2022 15:48:14 +0000 (16:48 +0100)] 
aarch64: Add support for -mcpu=neoverse-v2

This is a GCC 10 version of https://gcc.gnu.org/pipermail/gcc-patches/2022-September/602105.html
There are no tuning structures to rename so the patch is (even) smaller than the GCC 12 and trunk
versions.

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

gcc/ChangeLog:

* config/aarch64/aarch64-cores.def (neoverse-v2): New entry.
* config/aarch64/aarch64-tune.md: Regenerate.
* doc/invoke.texi (AArch64 Options): Document neoverse-v2.

2 years agoDaily bump.
GCC Administrator [Wed, 28 Sep 2022 00:18:52 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Tue, 27 Sep 2022 00:18:55 +0000 (00:18 +0000)] 
Daily bump.

2 years agoFortran: error recovery on invalid ARRAY argument to FINDLOC [PR106986]
Harald Anlauf [Tue, 20 Sep 2022 20:41:48 +0000 (22:41 +0200)] 
Fortran: error recovery on invalid ARRAY argument to FINDLOC [PR106986]

gcc/fortran/ChangeLog:

PR fortran/106986
* simplify.c (gfc_simplify_findloc): Do not try to simplify
intrinsic FINDLOC when the ARRAY argument has a NULL shape.

gcc/testsuite/ChangeLog:

PR fortran/106986
* gfortran.dg/pr106986.f90: New test.

(cherry picked from commit 5976fbf9d5dd9542fcb82eebb2185886fd52d000)

2 years agoDaily bump.
GCC Administrator [Mon, 26 Sep 2022 00:19:05 +0000 (00:19 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 25 Sep 2022 00:18:54 +0000 (00:18 +0000)] 
Daily bump.

2 years agoFortran: Fix ICE with automatic reallocation [PR100245]
José Rui Faustino de Sousa [Fri, 2 Sep 2022 19:35:22 +0000 (21:35 +0200)] 
Fortran: Fix ICE with automatic reallocation [PR100245]

gcc/fortran/ChangeLog:

PR fortran/100245
* trans-expr.c (trans_class_assignment): Add if clause to handle
derived type in the LHS.

gcc/testsuite/ChangeLog:

PR fortran/100245
* gfortran.dg/PR100245.f90: New test.

(cherry picked from commit 504424f33771be0405454e7845219d5df1bb88bb)

2 years agoDaily bump.
GCC Administrator [Sat, 24 Sep 2022 00:18:06 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Fri, 23 Sep 2022 00:19:44 +0000 (00:19 +0000)] 
Daily bump.

2 years agoFortran: catch NULL pointer dereferences while simplifying PACK [PR106857]
Harald Anlauf [Thu, 15 Sep 2022 20:39:24 +0000 (22:39 +0200)] 
Fortran: catch NULL pointer dereferences while simplifying PACK [PR106857]

gcc/fortran/ChangeLog:

PR fortran/106857
* simplify.c (gfc_simplify_pack): Check for NULL pointer dereferences
while walking through constructors (error recovery).

gcc/testsuite/ChangeLog:

PR fortran/106857
* gfortran.dg/pr106857.f90: New test.

(cherry picked from commit 2b75d5f533b9d6b39f4055949aff64ed0d22dd24)

2 years agoDaily bump.
GCC Administrator [Thu, 22 Sep 2022 00:20:45 +0000 (00:20 +0000)] 
Daily bump.

2 years agoaarch64: Fix GTY markup for arm_sve.h [PR106491]
Richard Sandiford [Wed, 21 Sep 2022 13:17:43 +0000 (14:17 +0100)] 
aarch64: Fix GTY markup for arm_sve.h [PR106491]

It turns out that GTY(()) markers in definitions like:

  GTY(()) tree scalar_types[NUM_VECTOR_TYPES];

are not effective and are silently ignored.  The GTY(()) has
to come after an extern or static.

The externs associated with the SVE ACLE GTY variables are in
aarch64-sve-builtins.h.  This file is not in tm_include_list because
we don't want every target-facing file to include it.  It therefore
isn't in the list of GC header files either.

In this case that's a blessing in disguise, since the variables
belong to a namespace and gengtype doesn't understand namespaces.
I think the fix is instead to add an extra extern before each
variable declaration, similarly to varasm.cc and vtable-verify.cc.
(This works due to a "using namespace" at the end of the file.)

gcc/
PR target/106491
* config/aarch64/aarch64-sve-builtins.cc (scalar_types)
(acle_vector_types, acle_svpattern, acle_svprfop): Add GTY
markup to (new) extern declarations instead of to the main
definition.

(cherry picked from commit 6bf5a704d36243c4c04b17a9408ebe881beb0051)

2 years agoDaily bump.
GCC Administrator [Wed, 21 Sep 2022 00:20:50 +0000 (00:20 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Tue, 20 Sep 2022 00:19:30 +0000 (00:19 +0000)] 
Daily bump.

2 years agoFix PR target/99184: Wrong cast from double to 16-bit and 32-bit ints
Georg-Johann Lay [Mon, 19 Sep 2022 07:46:58 +0000 (09:46 +0200)] 
Fix PR target/99184: Wrong cast from double to 16-bit and 32-bit ints

this patch fixed PR target/99184 which incorrectly rounded during 64-bit
(long) double to 16-bit and 32-bit integers.

The patch just removes the respective roundings from
libf7-asm.sx::to_integer and ::to_unsigned.  Luckily, LibF7 does nowhere
use respective functions internally, the only user is in libf7.c::f7_exp

which reads

   f7_round (qq, qq);
   int16_t q = f7_get_s16 (qq);

so that f7_get_s16() operates on an already rounded value, and therefore
this code works unaltered with or without rounding in to_integer.

PR target/99184
libgcc/config/avr/libf7/
* libf7-asm.sx (to_integer, to_unsigned): Don't round 16-bit
and 32-bit integers.

(cherry picked from commit 0b5b8ac5cb7fe92dd17ae8bd7de84640daa59e84)

2 years agoDaily bump.
GCC Administrator [Mon, 19 Sep 2022 00:19:39 +0000 (00:19 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 18 Sep 2022 00:18:54 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sat, 17 Sep 2022 00:19:54 +0000 (00:19 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Fri, 16 Sep 2022 00:18:34 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Thu, 15 Sep 2022 00:20:34 +0000 (00:20 +0000)] 
Daily bump.

2 years ago[nvptx] Add uniform_warp_check insn
Tom de Vries [Fri, 28 Jan 2022 09:28:59 +0000 (10:28 +0100)] 
[nvptx] Add uniform_warp_check insn

On a GT 1030, with driver version 470.94 and -mptx=3.1 I run into:
...
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/parallel-dims.c \
  -DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none \
  -O2 execution test
...
which minimizes to the same test-case as listed in commit "[nvptx]
Update default ptx isa to 6.3".

The problem is again that the first diverging branch is not handled as such in
SASS, which causes problems with a subsequent shfl insn, but given that we
have -mptx=3.1 we can't use the bar.warp.sync insn.

Given that the default is now -mptx=6.3, and consequently -mptx=3.1 is of a
lesser importance, implement the next best thing: abort when detecting
non-convergence using this insn:
...
  { .reg.b32 act;
    vote.ballot.b32 act,1;
    .reg.pred uni;
    setp.eq.b32 uni,act,0xffffffff;
    @ !uni trap;
    @ !uni exit;
  }
...

Interestingly, the effect of this is that rather than aborting, the test-case
now passes.

Tested on x86_64 with nvptx accelerator.

gcc/ChangeLog:

2022-01-31  Tom de Vries  <tdevries@suse.de>

* config/nvptx/nvptx.c (nvptx_single): Use nvptx_uniform_warp_check.
* config/nvptx/nvptx.md (define_c_enum "unspecv"): Add
UNSPECV_UNIFORM_WARP_CHECK.
(define_insn "nvptx_uniform_warp_check"): New define_insn.

(cherry picked from commit f32f74c2e8cef5fe37af6d4e8d7e8f6b4c8ae9a8)

2 years ago[nvptx] Add bar.warp.sync
Tom de Vries [Thu, 27 Jan 2022 14:03:59 +0000 (15:03 +0100)] 
[nvptx] Add bar.warp.sync

On a GT 1030 (sm_61), with driver version 470.94 I run into:
...
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/parallel-dims.c \
  -DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none \
  -O2 execution test
...
which minimizes to the same test-case as listed in commit "[nvptx] Update
default ptx isa to 6.3".

The first divergent branch looks like:
...
  {
    .reg .u32 %x;
    mov.u32 %x,%tid.x;
    setp.ne.u32 %r59,%x,0;
  }
  @ %r59 bra $L15;
  mov.u64 %r48,%ar0;
  mov.u32 %r22,2;
  ld.u64 %r53,[%r48];
  mov.u32 %r55,%r22;
  mov.u32 %r54,1;
 $L15:
...
and when inspecting the generated SASS, the branch is not setup as a divergent
branch, but instead as a regular branch.

This causes us to execute a shfl.sync insn in divergent mode, which is likely
to cause trouble given a remark in the ptx isa version 6.3, which mentions
that for .target sm_6x or below, all threads must excute the same
shfl.sync instruction in convergence.

Fix this by placing a "bar.warp.sync 0xffffffff" at the desired convergence
point (in the example above, after $L15).

Tested on x86_64 with nvptx accelerator.

gcc/ChangeLog:

2022-01-31  Tom de Vries  <tdevries@suse.de>

* config/nvptx/nvptx.c (nvptx_single): Use nvptx_warpsync.
* config/nvptx/nvptx.md (define_c_enum "unspecv"): Add
UNSPECV_WARPSYNC.
(define_insn "nvptx_warpsync"): New define_insn.

(cherry picked from commit bba61d403d05202deb698b352a4faef3feb1f04d)

2 years agonvptx: Define (dummy) 'TARGET_PTX_6_0'
Thomas Schwinge [Tue, 13 Sep 2022 15:26:33 +0000 (17:26 +0200)] 
nvptx: Define (dummy) 'TARGET_PTX_6_0'

'TARGET_PTX_*' not applicable before GCC 12, but makes it easier to cherry-pick
patches.

gcc/
* config/nvptx/nvptx.h (TARGET_PTX_6_0): '#define' to 'false'.

2 years agoDaily bump.
GCC Administrator [Wed, 14 Sep 2022 00:19:43 +0000 (00:19 +0000)] 
Daily bump.

2 years agors6000: Don't ICE when we disassemble an MMA variable [PR101322]
Peter Bergner [Thu, 1 Sep 2022 02:14:36 +0000 (21:14 -0500)] 
rs6000: Don't ICE when we disassemble an MMA variable [PR101322]

When we expand an MMA disassemble built-in with C++ using a pointer that
is cast to a valid MMA type, the type isn't passed down to the expand
machinery and we end up using the base type of the pointer which leads to
an ICE.  This patch enforces we always use the correct MMA type regardless
of the pointer type being used.

2022-08-31  Peter Bergner  <bergner@linux.ibm.com>

gcc/
PR target/101322
* config/rs6000/rs6000-call.c (rs6000_gimple_fold_mma_builtin):
Enforce the use of a valid MMA pointer type.

gcc/testsuite/
PR target/101322
* g++.target/powerpc/pr101322.C: New test.

(cherry picked from commit 2985049049f12b0aa3366ca244d387820385b9e8)

2 years agors6000/test: Fix empty TU in some cases of effective targets [PR106345]
Kewen Lin [Wed, 7 Sep 2022 01:37:57 +0000 (20:37 -0500)] 
rs6000/test: Fix empty TU in some cases of effective targets [PR106345]

As the failure of test case gcc.target/powerpc/pr92398.p9-.c in
PR106345 shows, some test sources for some powerpc effective
targets use empty translation unit wrongly.  The test sources
could go with options like "-ansi -pedantic-errors", then those
effective target checkings will fail unexpectedly with the
error messages like:

  error: ISO C forbids an empty translation unit [-Wpedantic]

This patch is to fix empty TUs with one dummy function definition
accordingly.

PR testsuite/106345

gcc/testsuite/ChangeLog:

* lib/target-supports.exp (check_effective_target_has_arch_pwr5): Add
a function definition to avoid pedwarn about empty translation unit.
(check_effective_target_has_arch_pwr6): Likewise.
(check_effective_target_has_arch_pwr7): Likewise.
(check_effective_target_has_arch_pwr8): Likewise.
(check_effective_target_has_arch_pwr9): Likewise.
(check_effective_target_has_arch_ppc64): Likewise.
(check_effective_target_ppc_float128): Likewise.
(check_effective_target_ppc_float128_insns): Likewise.
(check_effective_target_powerpc_vsx): Likewise.

(cherry picked from commit 7a43e52a48b6403a99d3e8ab3105869b4b3c081e)

2 years agoDaily bump.
GCC Administrator [Tue, 13 Sep 2022 00:19:51 +0000 (00:19 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Mon, 12 Sep 2022 00:19:16 +0000 (00:19 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 11 Sep 2022 00:18:58 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sat, 10 Sep 2022 00:19:12 +0000 (00:19 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Fri, 9 Sep 2022 00:19:41 +0000 (00:19 +0000)] 
Daily bump.

2 years agoRTEMS: Add -mvrsave multilibs
Sebastian Huber [Thu, 1 Sep 2022 08:22:47 +0000 (10:22 +0200)] 
RTEMS: Add -mvrsave multilibs

gcc/ChangeLog:

* config/rs6000/rtems.h (CPP_OS_DEFAULT_SPEC): Define __PPC_VRSAVE__ if
-mvrsave is present.
* config/rs6000/t-rtems: Add -mvrsave multilib variants for
-mcpu=e6500.

2 years agoDaily bump.
GCC Administrator [Thu, 8 Sep 2022 00:19:55 +0000 (00:19 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Wed, 7 Sep 2022 00:19:12 +0000 (00:19 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Tue, 6 Sep 2022 00:18:24 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Mon, 5 Sep 2022 00:18:24 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 4 Sep 2022 00:18:43 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sat, 3 Sep 2022 00:18:39 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Fri, 2 Sep 2022 00:17:55 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Thu, 1 Sep 2022 00:18:39 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Wed, 31 Aug 2022 00:17:42 +0000 (00:17 +0000)] 
Daily bump.

2 years agors6000: Allow conversions of MMA pointer types [PR106017]
Peter Bergner [Sun, 28 Aug 2022 00:44:16 +0000 (19:44 -0500)] 
rs6000: Allow conversions of MMA pointer types [PR106017]

GCC incorrectly disables conversions between MMA pointer types, which
are allowed with clang.  The original intent was to disable conversions
between MMA types and other other types, but pointer conversions should
have been allowed.  The fix is to just remove the MMA pointer conversion
handling code altogether.

gcc/
PR target/106017
* config/rs6000/rs6000.c (rs6000_invalid_conversion): Remove handling
of MMA pointer conversions.

gcc/testsuite/
PR target/106017
* gcc.target/powerpc/pr106017.c: New test.

(cherry picked from commit 1ae1325f24cea1698b56e4299d95446a1f7b90a2)

2 years agoDaily bump.
GCC Administrator [Tue, 30 Aug 2022 00:18:08 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Mon, 29 Aug 2022 00:17:43 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 28 Aug 2022 00:17:39 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sat, 27 Aug 2022 00:17:56 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Fri, 26 Aug 2022 00:17:34 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Thu, 25 Aug 2022 00:17:42 +0000 (00:17 +0000)] 
Daily bump.

2 years agors6000: Adjust mov optabs for opaque modes [PR103353]
Kewen Lin [Tue, 23 Aug 2022 08:31:17 +0000 (03:31 -0500)] 
rs6000: Adjust mov optabs for opaque modes [PR103353]

As PR103353 shows, we may want to continue to expand built-in
function __builtin_vsx_lxvp, even if we have already emitted
error messages about some missing required conditions.  As
shown in that PR, without one explicit mov optab on OOmode
provided, it would call emit_move_insn recursively.

So this patch is to allow the mov pattern to be generated during
expanding phase if compiler has already seen errors.

PR target/103353

gcc/ChangeLog:

* config/rs6000/mma.md (define_expand movpoi): Move TARGET_MMA condition
check to preparation statements and add handlings for !TARGET_MMA.
(define_expand movpxi): Likewise.

gcc/testsuite/ChangeLog:

* gcc.target/powerpc/pr103353.c: New test.

(cherry picked from commit 9367e3a65f874dffc8f8a3b6760e77fd9ed67117)

2 years agoDaily bump.
GCC Administrator [Wed, 24 Aug 2022 00:17:41 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Tue, 23 Aug 2022 00:17:43 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Mon, 22 Aug 2022 00:17:47 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 21 Aug 2022 00:22:06 +0000 (00:22 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sat, 20 Aug 2022 00:17:43 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Fri, 19 Aug 2022 00:18:05 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Thu, 18 Aug 2022 00:18:25 +0000 (00:18 +0000)] 
Daily bump.

2 years agors6000: Make the has_arch target selectors actually work
Segher Boessenkool [Tue, 26 Apr 2022 11:26:09 +0000 (11:26 +0000)] 
rs6000: Make the has_arch target selectors actually work

2022-04-26  Segher Boessenkoool  <segher@kernel.crashing.org>

gcc/testsuite/
PR target/105349
* lib/target-supports.exp (check_effective_target_has_arch_pwr5): Use
the specified dg-options.
(check_effective_target_has_arch_pwr6): Ditto.
(check_effective_target_has_arch_pwr7): Ditto.
(check_effective_target_has_arch_pwr8): Ditto.
(check_effective_target_has_arch_pwr9): Ditto.
(check_effective_target_has_arch_ppc64): Ditto.

(cherry picked from commit ad56a60f58c1ed662deaf60d5736c332ec2caabb)

2 years agors6000: Add effective target has_arch_ppc64
Segher Boessenkool [Thu, 21 Apr 2022 18:32:48 +0000 (18:32 +0000)] 
rs6000: Add effective target has_arch_ppc64

This is true if we have -mpowerpc64.

2022-04-21  Segher Boessenkool  <segher@kernel.crashing.org>

gcc/testsuite/
* lib/target-supports.exp (check_effective_target_has_arch_ppc64): New.

(cherry picked from commit fc9deca632c2eb246c54cfd13cb616bf3fcbd21a)

2 years agoDaily bump.
GCC Administrator [Wed, 17 Aug 2022 00:18:56 +0000 (00:18 +0000)] 
Daily bump.

2 years agors6000: Disparage lfiwzx and similar
Segher Boessenkool [Sun, 2 Jan 2022 14:08:35 +0000 (14:08 +0000)] 
rs6000: Disparage lfiwzx and similar

RA now chooses GEN_OR_VSX_REGS in most cases.  This is great in most
cases, but we often (or always?) use {l,st}{f,xs}iwzx now, which is
problematic because the integer load and store insns can use cheaper
addressing modes.  We can fix that by putting a small penalty on the
instruction alternatives for those.

2022-04-21  Segher Boessenkool  <segher@kernel.crashing.org>

PR target/103197
PR target/102146
* config/rs6000/rs6000.md (zero_extendqi<mode>2 for EXTQI): Disparage
the "Z" alternatives in {l,st}{f,xs}iwzx.
(zero_extendhi<mode>2 for EXTHI): Ditto.
(zero_extendsi<mode>2 for EXTSI): Ditto.
(*movsi_internal1): Ditto.
(*mov<mode>_internal1 for QHI): Ditto.
(movsd_hardfloat): Ditto.

(cherry picked from commit 26fa464f42622c60d6929720dd37143a21054ede)

2 years agod: Update DIP links in gdc documentation to point at upstream repository
Iain Buclaw [Tue, 16 Aug 2022 10:22:10 +0000 (12:22 +0200)] 
d: Update DIP links in gdc documentation to point at upstream repository

The wiki links probably worked at some point in the distant past, but
now the official location of tracking all D Improvement Proposals is on
the upstream dlang/DIPs GitHub repository.

PR d/106638

gcc/d/ChangeLog:

* gdc.texi: Update DIP links to point at upstream dlang/DIPs
repository.

(cherry picked from commit e56b695aa3aed3c0c80616bba569bbeb4a06b5e5)

2 years agoDaily bump.
GCC Administrator [Tue, 16 Aug 2022 00:19:21 +0000 (00:19 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Mon, 15 Aug 2022 00:17:32 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 14 Aug 2022 00:17:58 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sat, 13 Aug 2022 00:17:48 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Fri, 12 Aug 2022 00:17:59 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Thu, 11 Aug 2022 00:17:49 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Wed, 10 Aug 2022 00:17:50 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Tue, 9 Aug 2022 00:17:43 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Mon, 8 Aug 2022 00:17:32 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 7 Aug 2022 00:17:40 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 6 Aug 2022 00:17:45 +0000 (00:17 +0000)] 
Daily bump.

3 years agoDaily bump.
GCC Administrator [Fri, 5 Aug 2022 00:17:34 +0000 (00:17 +0000)] 
Daily bump.

3 years agors6000: Update testsuite to use -mdejagnu-cpu= and -mdejagnu-tune= options
Peter Bergner [Fri, 25 Mar 2022 22:59:07 +0000 (17:59 -0500)] 
rs6000: Update testsuite to use -mdejagnu-cpu= and -mdejagnu-tune= options

This patch updates the POWER testsuite test cases using -mcpu= and -mtune=
to use the preferred -mdejagnu-cpu= and -mdejagnu-tune= options.  This also
obviates the need for the dg-skip-if directive, since the user cannot
override the -mcpu= value being used to compile the test case.

2022-03-25  Peter Bergner  <bergner@linux.ibm.com>

gcc/testsuite/

* g++.dg/pr65240-1.C: Use -mdejagnu-cpu=.  Remove dg-skip-if.
* g++.dg/pr65240-2.C: Likewise.
* g++.dg/pr65240-3.C: Likewise.
* g++.dg/pr65240-4.C: Likewise.
* g++.dg/pr65242.C: Likewise.
* g++.dg/pr67211.C: Likewise.
* g++.dg/pr69667.C: Likewise.
* g++.dg/pr71294.C: Likewise.
* g++.dg/pr84279.C: Likewise.
* g++.dg/torture/ppc-ldst-array.C: Likewise.
* gfortran.dg/nint_p7.f90: Likewise.
* gfortran.dg/pr102860.f90: Likewise.
* gcc.target/powerpc/fusion.c: Use -mdejagnu-cpu= and -mdejagnu-tune=.
* gcc.target/powerpc/fusion2.c: Likewise.
* gcc.target/powerpc/test_mffsl.c: Likewise.
* gfortran.dg/pr47614.f: Likewise.
* gfortran.dg/pr58968.f: Likewise.

(cherry picked from commit 81faedaa8e2819fc0ffda4ce0a888065a6d7a535)

3 years agoDaily bump.
GCC Administrator [Thu, 4 Aug 2022 00:17:49 +0000 (00:17 +0000)] 
Daily bump.

3 years agolibstdc++: Add valid range checks to std::span constructors [PR98421]
Jonathan Wakely [Tue, 31 Aug 2021 16:34:51 +0000 (17:34 +0100)] 
libstdc++: Add valid range checks to std::span constructors [PR98421]

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

PR libstdc++/98421
* include/std/span (span(Iter, size_type), span(Iter, Iter)):
Add valid range checks.
* testsuite/23_containers/span/cons_1_assert_neg.cc: New test.
* testsuite/23_containers/span/cons_2_assert_neg.cc: New test.

(cherry picked from commit ef7becc9c8a48804d3fd9dac032f7b33e561a612)

3 years agolibstdc++: Avoid try-catch and O(N) size in std::list::merge for old ABI
Jonathan Wakely [Wed, 29 Sep 2021 19:46:55 +0000 (20:46 +0100)] 
libstdc++: Avoid try-catch and O(N) size in std::list::merge for old ABI

The current std::list::merge code calls size() before starting to merge
any elements, so that the _M_size members can be updated after the merge
finishes. The work is done in a try-block so that the sizes can still be
updated in an exception handler if any element comparison throws.

The _M_size members only exist for the cxx11 ABI, so the initial call to
size() and the try-catch are only needed for that ABI. For the old ABI
the size() call performs an O(N) list traversal to get a value that
isn't even used, and catching exceptions just to rethrow them isn't
needed either.

In r11-10123 this code was refactored to use an RAII guard type, but for
the gcc-10 branch a less invasive change using preprocessor conditionals
seems more appropriate.

libstdc++-v3/ChangeLog:

* include/bits/list.tcc (list::merge) [!USE_CXX11_ABI]: Remove
call to size() and try-catch block.

3 years agolibstdc++: Optimize std::any_cast by replacing indirect call
Tim Adye [Fri, 4 Jun 2021 14:59:38 +0000 (15:59 +0100)] 
libstdc++: Optimize std::any_cast by replacing indirect call

This significantly improves the performance of std::any_cast, by
avoiding an indirect call to the _S_manage function through a function
pointer. Before we make that indirect call we've already established
that the contained value has the expected type, which means we also know
the manager type, and so can call one of its members directly.

We also know the precise type in the any::emplace functions, because
we've just constructed that type, so we can use the new member there
too. That doesn't seem to affect performance, but we might as well use
the new _S_access function anyway.

Signed-off-by: Tim Adye <Tim.Adye@cern.ch>
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

* include/std/any (any::_Manager::_S_access): New static
function to access the contained value.
(any::emplace, __any_caster): Use _S_access member of the
manager type.

(cherry picked from commit f6bb145c0bff19767931d37733be11c8acc6fa00)

3 years agolibstdc++: Remove precondition checks from ranges::subrange
Jonathan Wakely [Tue, 15 Jun 2021 14:07:25 +0000 (15:07 +0100)] 
libstdc++: Remove precondition checks from ranges::subrange

The assertion in the subrange constructor causes semantic changes,
because the call to ranges::distance performs additional operations that
are not part of the constructor's specification. That will fail to
compile if the iterator is move-only, because the argument to
ranges::distance is passed by value. It will modify the subrange if the
iterator is not a forward iterator, because incrementing the copy also
affects the _M_begin member. Those problems could be prevented by using
if-constexpr to only do the assertion for copyable forward iterators,
but the call to ranges::distance can also prevent the constructor being
usable in constant expressions. If the member initializers are usable in
constant expressions, but iterator increments of equality comparisons
are not, then the checks done by __glibcxx_assert might
make constant evaluation fail.

This change removes the assertion.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

* include/std/ranges (subrange(i, s, n)): Remove assertion.
* testsuite/std/ranges/subrange/constexpr.cc: New test.

(cherry picked from commit a88fc03ba7e52d9a072f25d42bb9619fedb7892e)

3 years agolibstdc++: Disable gthreads weak symbols for glibc 2.34 [PR103133]
Jonathan Wakely [Tue, 9 Nov 2021 23:45:36 +0000 (23:45 +0000)] 
libstdc++: Disable gthreads weak symbols for glibc 2.34 [PR103133]

Since Glibc 2.34 all pthreads symbols are defined directly in libc not
libpthread, and since Glibc 2.32 we have used __libc_single_threaded to
avoid unnecessary locking in single-threaded programs. This means there
is no reason to avoid linking to libpthread now, and so no reason to use
weak symbols defined in gthr-posix.h for all the pthread_xxx functions.

libstdc++-v3/ChangeLog:

PR libstdc++/100748
PR libstdc++/103133
* config/os/gnu-linux/os_defines.h (_GLIBCXX_GTHREAD_USE_WEAK):
Define for glibc 2.34 and later.

(cherry picked from commit 80fe172ba9820199c2bbce5d0611ffca27823049)