]> gcc.gnu.org Git - gcc.git/log
gcc.git
16 months agoBackport from master
Michael Meissner [Tue, 11 Apr 2023 14:11:53 +0000 (10:11 -0400)]
Backport from master

2023-04-11  Michael Meissner  <meissner@linux.ibm.com>

gcc/

PR target/109067
* config/rs6000/rs6000.c (create_complex_muldiv): Delete.
(init_float128_ieee): Delete code to switch complex multiply and divide
for long double.  Backport from master, 3/20/2023.
(complex_multiply_builtin_code): New helper function.
(complex_divide_builtin_code): Likewise.
(rs6000_mangle_decl_assembler_name): Add support for mangling the name
of complex 128-bit multiply and divide built-in functions.

gcc/testsuite/

PR target/109067
* gcc.target/powerpc/divic3-1.c: New test.  Backport from master,
3/20/2023.
* gcc.target/powerpc/divic3-2.c: Likewise.
* gcc.target/powerpc/mulic3-1.c: Likewise.
* gcc.target/powerpc/mulic3-2.c: Likewise.

16 months agoDaily bump.
GCC Administrator [Tue, 11 Apr 2023 00:18:53 +0000 (00:18 +0000)]
Daily bump.

16 months agoDaily bump.
GCC Administrator [Mon, 10 Apr 2023 00:18:51 +0000 (00:18 +0000)]
Daily bump.

16 months agoDaily bump.
GCC Administrator [Sun, 9 Apr 2023 00:19:44 +0000 (00:19 +0000)]
Daily bump.

16 months agoDaily bump.
GCC Administrator [Sat, 8 Apr 2023 00:19:07 +0000 (00:19 +0000)]
Daily bump.

16 months agoDaily bump.
GCC Administrator [Fri, 7 Apr 2023 00:19:41 +0000 (00:19 +0000)]
Daily bump.

16 months agoDaily bump.
GCC Administrator [Thu, 6 Apr 2023 00:18:53 +0000 (00:18 +0000)]
Daily bump.

16 months agoDaily bump.
GCC Administrator [Wed, 5 Apr 2023 00:19:15 +0000 (00:19 +0000)]
Daily bump.

16 months agoDaily bump.
GCC Administrator [Tue, 4 Apr 2023 00:18:51 +0000 (00:18 +0000)]
Daily bump.

16 months agoDaily bump.
GCC Administrator [Mon, 3 Apr 2023 00:19:04 +0000 (00:19 +0000)]
Daily bump.

16 months agoChange "long_double" into "long double" for C prototypes from Fortran.
Thomas Koenig [Sat, 1 Apr 2023 08:20:32 +0000 (10:20 +0200)]
Change "long_double" into "long double" for C prototypes from Fortran.

gcc/fortran/ChangeLog:

* dump-parse-tree.c (get_c_type_name): Fix "long_long"
type name to be "long long".

16 months agoFix fc-prototypes usage with C_INT64_T and non LP64 Targets.
Andrew Pinski [Wed, 29 Mar 2023 21:34:30 +0000 (21:34 +0000)]
Fix fc-prototypes usage with C_INT64_T and non LP64 Targets.

The problem here is we were outputing long_long instead of
"long long". This was just an oversight and a missing check.

Committed as obvious after a bootstrap/test on x86_64-linux-gnu.

gcc/fortran/ChangeLog:

* dump-parse-tree.c (get_c_type_name): Fix "long_long"
type name to be "long long". Add a comment on why adding
2 to the name too.

16 months agoDaily bump.
GCC Administrator [Sun, 2 Apr 2023 00:19:31 +0000 (00:19 +0000)]
Daily bump.

16 months agoDaily bump.
GCC Administrator [Sat, 1 Apr 2023 00:19:47 +0000 (00:19 +0000)]
Daily bump.

16 months agoDaily bump.
GCC Administrator [Fri, 31 Mar 2023 00:19:18 +0000 (00:19 +0000)]
Daily bump.

16 months agoDaily bump.
GCC Administrator [Thu, 30 Mar 2023 00:19:14 +0000 (00:19 +0000)]
Daily bump.

16 months agoDaily bump.
GCC Administrator [Wed, 29 Mar 2023 00:19:19 +0000 (00:19 +0000)]
Daily bump.

16 months agoFix PR target/109140
Eric Botcazou [Tue, 28 Mar 2023 08:13:24 +0000 (10:13 +0200)]
Fix PR target/109140

This is a regression present on the mainline and 12 branch at -O2, but the
issue is related to vectorization so was present at -O3 in earlier versions.

The vcondu expander that was added for VIS 3 more than a decade ago does not
fully work, because it does not filter out the unsigned condition codes (the
instruction is an UNSPEC that accepts only signed condition codes).

While I was at it, I also added the missing vcond and vcondu expanders for
the new comparison instructions that were added in VIS 4.

gcc/
PR target/109140
* config/sparc/sparc.c (sparc_expand_vcond): Call signed_condition
on operand #3 to get the final condition code.  Use std::swap.
* config/sparc/sparc.md (vcondv8qiv8qi): New VIS 4 expander.
(fucmp<gcond:code>8<P:mode>_vis): Move around.
(fpcmpu<gcond:code><GCM:gcm_name><P:mode>_vis): Likewise.
(vcondu<GCM:mode><GCM:mode>): New VIS 4 expander.

gcc/testsuite/
* gcc.target/sparc/20230328-1.c: New test.
* gcc.target/sparc/20230328-2.c: Likewise.
* gcc.target/sparc/20230328-3.c: Likewise.
* gcc.target/sparc/20230328-4.c: Likewise.

16 months agoDaily bump.
GCC Administrator [Tue, 28 Mar 2023 00:19:10 +0000 (00:19 +0000)]
Daily bump.

16 months agoDaily bump.
GCC Administrator [Mon, 27 Mar 2023 00:19:13 +0000 (00:19 +0000)]
Daily bump.

16 months agoDaily bump.
GCC Administrator [Sun, 26 Mar 2023 00:19:59 +0000 (00:19 +0000)]
Daily bump.

16 months agoDaily bump.
GCC Administrator [Sat, 25 Mar 2023 00:20:28 +0000 (00:20 +0000)]
Daily bump.

16 months agoFortran: reject MODULE PROCEDURE outside generic module interface [PR99036]
Harald Anlauf [Tue, 21 Mar 2023 18:58:31 +0000 (19:58 +0100)]
Fortran: reject MODULE PROCEDURE outside generic module interface [PR99036]

gcc/fortran/ChangeLog:

PR fortran/99036
* decl.c (gfc_match_modproc): Reject MODULE PROCEDURE if not in a
generic module interface.

gcc/testsuite/ChangeLog:

PR fortran/99036
* gfortran.dg/pr99036.f90: New test.

(cherry picked from commit dd282b16bfd3c6e218dffb7798a375365b10ae22)

16 months agoFortran: simplification of NEAREST for large argument [PR109186]
Harald Anlauf [Sun, 19 Mar 2023 20:29:46 +0000 (21:29 +0100)]
Fortran: simplification of NEAREST for large argument [PR109186]

gcc/fortran/ChangeLog:

PR fortran/109186
* simplify.c (gfc_simplify_nearest): Fix off-by-one error in setting
up real kind-specific maximum exponent for mpfr.

gcc/testsuite/ChangeLog:

PR fortran/109186
* gfortran.dg/nearest_6.f90: New test.

(cherry picked from commit 4410a08b80cc40342eeaa5b6af824cd4352b218c)

16 months agoFortran: procedures with BIND(C) attribute require explicit interface [PR85877]
Harald Anlauf [Fri, 17 Mar 2023 21:24:49 +0000 (22:24 +0100)]
Fortran: procedures with BIND(C) attribute require explicit interface [PR85877]

gcc/fortran/ChangeLog:

PR fortran/85877
* resolve.c (resolve_fl_procedure): Check for an explicit interface
of procedures with the BIND(C) attribute (F2018:15.4.2.2).

gcc/testsuite/ChangeLog:

PR fortran/85877
* gfortran.dg/pr85877.f90: New test.

(cherry picked from commit 5426ab34643d9e6502f3ee572891a03471fa33ed)

16 months agoDaily bump.
GCC Administrator [Fri, 24 Mar 2023 00:19:22 +0000 (00:19 +0000)]
Daily bump.

16 months agoDaily bump.
GCC Administrator [Thu, 23 Mar 2023 00:20:01 +0000 (00:20 +0000)]
Daily bump.

16 months agoDaily bump.
GCC Administrator [Wed, 22 Mar 2023 00:19:39 +0000 (00:19 +0000)]
Daily bump.

16 months agolibstdc++: Skip integer division optimization for Clang
Matthias Kretz [Tue, 21 Mar 2023 13:20:52 +0000 (14:20 +0100)]
libstdc++: Skip integer division optimization for Clang

Clang ICEs on _SimdImplX86::_S_divides. The function is only working
around a missed optimization and not necessary for correctness.
Therefore, don't use it for Clang.

Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:

* include/experimental/bits/simd_detail.h: Don't define
_GLIBCXX_SIMD_WORKAROUND_PR90993 for Clang.
* include/experimental/bits/simd_x86.h (_S_divides): Remove
check for __clang__.

(cherry picked from commit 403e48ef441b0502af46ad3598f699f4a1611791)

16 months agolibstdc++: Fix simd test compilation with Clang
Matthias Kretz [Thu, 23 Feb 2023 13:45:07 +0000 (14:45 +0100)]
libstdc++: Fix simd test compilation with Clang

Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:

* testsuite/experimental/simd/tests/operators.cc: Clang doesn't
define __GCC_IEC_559. Use __STDC_IEC_559__ instead.

(cherry picked from commit 25db59017f2e216a76c8a0fe4814568135f19f9a)

16 months agoDaily bump.
GCC Administrator [Tue, 21 Mar 2023 00:19:17 +0000 (00:19 +0000)]
Daily bump.

16 months agoDaily bump.
GCC Administrator [Mon, 20 Mar 2023 00:19:43 +0000 (00:19 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Sun, 19 Mar 2023 00:20:12 +0000 (00:20 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Sat, 18 Mar 2023 00:19:31 +0000 (00:19 +0000)]
Daily bump.

17 months agoFortran: fix bounds check for copying of class expressions [PR106945]
Harald Anlauf [Sat, 11 Mar 2023 14:37:37 +0000 (15:37 +0100)]
Fortran: fix bounds check for copying of class expressions [PR106945]

In the bounds check for copying of class expressions, the number of elements
determined from a descriptor, returned as type gfc_array_index_type (i.e. a
signed type), should be converted to the type of the passed element count,
which is of type size_type_node (i.e. unsigned), for use in comparisons.

gcc/fortran/ChangeLog:

PR fortran/106945
* trans-expr.c (gfc_copy_class_to_class): Convert element counts in
bounds check to common type for comparison.

gcc/testsuite/ChangeLog:

PR fortran/106945
* gfortran.dg/pr106945.f90: New test.

(cherry picked from commit 2cf5f485e0351bb1faf46196a99e524688f3966e)

17 months agoFortran: fix ICE with bind(c) in block data [PR104332]
Harald Anlauf [Thu, 9 Mar 2023 17:59:08 +0000 (18:59 +0100)]
Fortran: fix ICE with bind(c) in block data [PR104332]

gcc/fortran/ChangeLog:

PR fortran/104332
* resolve.c (resolve_symbol): Avoid NULL pointer dereference while
checking a symbol with the BIND(C) attribute.

gcc/testsuite/ChangeLog:

PR fortran/104332
* gfortran.dg/bind_c_usage_34.f90: New test.

(cherry picked from commit e20e5d9dc11b64e8eabce6803c91cb5768207083)

17 months agoDaily bump.
GCC Administrator [Fri, 17 Mar 2023 00:19:30 +0000 (00:19 +0000)]
Daily bump.

17 months agolibstdc++: Fix std::filesystem errors with -fkeep-inline-functions [PR108636]
Jonathan Wakely [Thu, 2 Feb 2023 14:06:40 +0000 (14:06 +0000)]
libstdc++: Fix std::filesystem errors with -fkeep-inline-functions [PR108636]

With -fkeep-inline-functions there are linker errors when including
<filesystem>. This happens because there are some filesystem::path
constructors defined inline which call non-exported functions defined in
the library. That's usually not a problem, because those constructors
are only called by code that's also inside the library. But when the
header is compiled with -fkeep-inline-functions those inline functions
are emitted even though they aren't called. That then creates an
undefined reference to the other library internals. The fix is to just
move the private constructors into the library where they are called.
That way they are never even seen by users, and so not compiled even if
-fkeep-inline-functions is used.

libstdc++-v3/ChangeLog:

PR libstdc++/108636
* include/bits/fs_path.h (path::path(string_view, _Type))
(path::_Cmpt::_Cmpt(string_view, _Type, size_t)): Move inline
definitions to ...
* src/c++17/fs_path.cc: ... here.
* testsuite/27_io/filesystem/path/108636.cc: New test.

(cherry picked from commit db8d6fc572ec316ccfcf70b1dffe3be0b1b37212)

17 months agolibstdc++: Horrible macro hacks to allow building on avr
Jonathan Wakely [Thu, 2 Feb 2023 18:03:26 +0000 (18:03 +0000)]
libstdc++: Horrible macro hacks to allow building on avr

In r12-4071-g59ffa3e3dba5a7 I added a new __unsupported() function and
replaced all std::filesystem's uses of std::errc::not_supported and
ENOTSUP with a call to that function. Then in r13-5664-g5c43f06c228d16
that function was tweaked to use ENOSYS instead of EOPNOTSUP for avr,
due to limitations of <errno.h> on avr-libc.

In the gcc-11 branch we don't have __unsupported(), so we get loads and
loads of failures when trying to compile the src/c++17/fs_*.cc files.
This horrible hack uses macros to redefine not_supported and ENOTSUP as
function_not_supported and ENOSYS respectively, to fix the build for
avr.

libstdc++-v3/ChangeLog:

* src/c++17/fs_ops.cc [AVR] (not_supported): Define as a macro
for function_not_supported.
* src/filesystem/ops-common.h [AVR] (ENOTSUP): Define as a macro
for ENOSYS.

17 months agolibstdc++: Fix std::random_device for avr
Jonathan Wakely [Tue, 31 Jan 2023 22:28:16 +0000 (22:28 +0000)]
libstdc++: Fix std::random_device for avr

This fixes a build failure that affects avr, but could affect other
targets in theory. The _M_fini function should not try to use ::open or
::fopen if _GLIBCXX_USE_DEV_RANDOM is not defined, because no file can
ever have been opened.

libstdc++-v3/ChangeLog:

* src/c++11/random.cc (random_device::_M_fini): Do not try to
close the file handle if the target doesn't support the
/dev/random and /dev/urandom files.

(cherry picked from commit 277dd6ea416718ba5493023b5a4660ecdbaf936c)

17 months agolibstdc++: Fix build failures for avr
Jonathan Wakely [Tue, 31 Jan 2023 22:16:31 +0000 (22:16 +0000)]
libstdc++: Fix build failures for avr

The avr-libc <errno.h> does not define EOVERFLOW, which means that
std::errc::value_too_large is not defined, and so <charconv> cannot be
compiled. Define value_too_large for avr with a value that does not
clash with any that is defined in <errno.h>. This is a kluge to fix
bootstrap for avr; it can be removed after PR libstdc++/104883 is
resolved.

The avr-libc <errno.h> fails to meet the C and POSIX requirements that
each error macro has a distinct integral value, and is usable in #if
directives. Add a special case for avr to system_error.cc so that only
the valid errors are recognized. Also disable the errno checks in
std::filesystem::remove_all that assume a meaningful value for errno.

On avr-libc <unistd.h> exists but does not define the POSIX functions
needed by std::filesystem, so _GLIBCXX_HAVE_UNISTD_H is not sufficient
to check for basic POSIX APIs. Check !defined __AVR__ as well as
_GLIBCXX_HAVE_UNISTD_H before using those functions. This is a kluge and
we should really have a specific macro that says the required functions
are available.

libstdc++-v3/ChangeLog:

* config/os/generic/error_constants.h (errc::value_too_large)
[__AVR__]: Define.
* src/c++11/system_error.cc
(system_category::default_error_condition) [__AVR__]: Only match
recognize values equal to EDOM, ERANGE, ENOSYS and EINTR.
* src/c++17/fs_ops.cc (fs::current_path) [__AVR__]: Do not use
getcwd.
* src/filesystem/ops-common.h [__AVR__]: Do not use POSIX open,
close etc.

(cherry picked from commit 2d2e163d12f64a5e68f9e0381751ed9d5d6d3617)

17 months agoDaily bump.
GCC Administrator [Thu, 16 Mar 2023 00:19:29 +0000 (00:19 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Wed, 15 Mar 2023 00:19:15 +0000 (00:19 +0000)]
Daily bump.

17 months agod: Fix undefined reference to lambda defined in private enum [PR109108]
Iain Buclaw [Tue, 14 Mar 2023 12:16:11 +0000 (13:16 +0100)]
d: Fix undefined reference to lambda defined in private enum [PR109108]

Previously lambdas were connected to the module they were defined in.
Now they are emitted into every referencing compilation unit, and are
given one-only linkage.

PR d/109108

gcc/d/ChangeLog:

* decl.cc (get_symbol_decl): Set DECL_LAMBDA_FUNCTION_P on function
literals.
(start_function): Unconditionally unset DECL_EXTERNAL.
(set_linkage_for_decl): Give lambda functions one-only linkage.

gcc/testsuite/ChangeLog:

* gdc.dg/torture/torture.exp (srcdir): New proc.
* gdc.dg/torture/imports/pr109108.d: New test.
* gdc.dg/torture/pr109108.d: New test.

(cherry picked from commit 423d34f61c43e400f0d5b837fe93c83963b2ecdd)

17 months agoDaily bump.
GCC Administrator [Tue, 14 Mar 2023 00:20:02 +0000 (00:20 +0000)]
Daily bump.

17 months agoc++: top level bind when rewriting coroutines [PR106188]
Arsen Arsenović [Sun, 4 Sep 2022 19:04:23 +0000 (21:04 +0200)]
c++: top level bind when rewriting coroutines [PR106188]

In the edge case of a coroutine not containing any locals, the ifcd/switch
temporaries would get added to the coroutine frame, corrupting its
layout. To prevent this, we can make sure there is always a BIND_EXPR at
the top of the function body, and thus, always a place for our new
temporaries to go without interfering with the coroutine frame.

PR c++/106188 - Incorrect frame layout after transforming conditional statement without top-level bind expression
PR c++/106713 - if (co_await ...) crashes with a jump to ud2

PR c++/106188
PR c++/106713

gcc/cp/ChangeLog:

* coroutines.cc (coro_rewrite_function_body): Ensure we have a
BIND_EXPR wrapping the function body.

gcc/testsuite/ChangeLog:

* g++.dg/coroutines/pr106188.C: New test.

17 months agod: Delay removing DECL_EXTERNAL from thunks until funcion has finished
Iain Buclaw [Mon, 13 Mar 2023 21:04:24 +0000 (22:04 +0100)]
d: Delay removing DECL_EXTERNAL from thunks until funcion has finished

Second part to fixing PR109108, don't blindly generate the associated
function definition of all referenced thunks in the compilation. Just
delay finishing a thunk until the function gets codegen itself.  If the
function never gets a definition, then the thunk is left as "extern".

gcc/d/ChangeLog:

* decl.cc (finish_thunk): Unset DECL_EXTERNAL on thunk.
(make_thunk): Set DECL_EXTERNAL on thunk, don't call build_decl_tree.
(finish_function): Call finish_thunk on forward referenced thunks.

(cherry picked from commit d1bddcaf15a362d88c29337295a0aaaaaa037642)

17 months agod: Refactor DECL_ARGUMENT and DECL_RESULT generation to own function
Iain Buclaw [Sun, 12 Mar 2023 20:43:31 +0000 (21:43 +0100)]
d: Refactor DECL_ARGUMENT and DECL_RESULT generation to own function

When looking into PR109108, the reason why things go awry is because
of the logic around functions with thunks - they have their definitions
generated even when they are external.  This subsequently then relied on
the detection of whether a function receiving codegen really is extern
or not, and this check ultimately prunes too much.

This is a first step to both removing the call to `build_decl_tree' from
`make_thunk' and the pruning of symbols within the `build_decl_tree'
visitor method for functions.  Move the generation of DECL_ARGUMENT and
DECL_RESULT out of `build_decl_tree' and into their own functions.

gcc/d/ChangeLog:

* decl.cc (get_fndecl_result): New function.
(get_fndecl_arguments): New function.
(DeclVisitor::visit (FuncDeclaration *)): Adjust to call
get_fndecl_arguments.
(make_thunk): Adjust to call get_fndecl_arguments and
get_fndecl_result.
(start_function): Adjust to call get_fndecl_result.

(cherry picked from commit 499b07700f0e679a490c2e3b80ca7c382dd737ab)

17 months agoDaily bump.
GCC Administrator [Mon, 13 Mar 2023 00:19:46 +0000 (00:19 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Sun, 12 Mar 2023 00:19:00 +0000 (00:19 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Sat, 11 Mar 2023 00:19:09 +0000 (00:19 +0000)]
Daily bump.

17 months agolibstdc++: Add missing free functions for atomic_flag [PR103934]
Thomas W Rodgers [Fri, 10 Feb 2023 18:09:06 +0000 (10:09 -0800)]
libstdc++: Add missing free functions for atomic_flag [PR103934]

This patch adds -
  atomic_flag_wait
  atomic_flag_wait_explicit
  atomic_flag_notify
  atomic_flag_notify_explicit

Which were missed when commit 83a1be introduced C++20 atomic wait.

libstdc++-v3/ChangeLog:

PR libstdc++/103934
* include/std/atomic (atomic_flag_wait): Add.
(atomic_flag_wait_explicit): Add.
(atomic_flag_notify): Add.
(atomic_flag_notify_explicit): Add.
* testsuite/29_atomics/atomic_flag/wait_notify/1.cc:
Add test case to cover missing atomic_flag free functions.

(cherry picked from commit 56cf9372c0596c4df4003c72dc4665a306fbfe31)

17 months agoDaily bump.
GCC Administrator [Fri, 10 Mar 2023 00:19:32 +0000 (00:19 +0000)]
Daily bump.

17 months agoOpenMP/Fortran: Fix handling of optional is_device_ptr + bind(C) [PR108546]
Tobias Burnus [Wed, 1 Mar 2023 12:53:09 +0000 (13:53 +0100)]
OpenMP/Fortran: Fix handling of optional is_device_ptr + bind(C) [PR108546]

For is_device_ptr, optional checks should only be done before calling
libgomp, afterwards they are NULL either because of absent or, by
chance, because it is unallocated or unassociated (for pointers/allocatables).

Additionally, it fixes an issue with explicit mapping for 'type(c_ptr)'.

PR middle-end/108546

gcc/fortran/ChangeLog:

* trans-openmp.c (gfc_trans_omp_clauses): Fix mapping of
type(C_ptr) variables.

gcc/ChangeLog:

* omp-low.c (lower_omp_target): Remove optional handling
on the receiver side, i.e. inside target (data), for
use_device_ptr.

libgomp/ChangeLog:

* testsuite/libgomp.fortran/is_device_ptr-3.f90: New test.
* testsuite/libgomp.fortran/use_device_ptr-optional-4.f90: New test.

(cherry picked from commit 96ff97ff6574666a5509ae9fa596e7f2b6ad4f88)

17 months agoDaily bump.
GCC Administrator [Thu, 9 Mar 2023 00:19:15 +0000 (00:19 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Wed, 8 Mar 2023 00:19:35 +0000 (00:19 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Tue, 7 Mar 2023 00:19:17 +0000 (00:19 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Mon, 6 Mar 2023 00:19:47 +0000 (00:19 +0000)]
Daily bump.

17 months agoFortran: fix corner case of IBITS intrinsic [PR108937]
Harald Anlauf [Mon, 27 Feb 2023 20:37:11 +0000 (21:37 +0100)]
Fortran: fix corner case of IBITS intrinsic [PR108937]

gcc/fortran/ChangeLog:

PR fortran/108937
* trans-intrinsic.c (gfc_conv_intrinsic_ibits): Handle corner case
LEN argument of IBITS equal to BITSIZE(I).

gcc/testsuite/ChangeLog:

PR fortran/108937
* gfortran.dg/ibits_2.f90: New test.

(cherry picked from commit 6cce953ebec274f1468d5d3a0697cf05bb43b8f6)

17 months agoFortran: reject invalid CHARACTER length of derived type components [PR96024]
Harald Anlauf [Tue, 21 Feb 2023 21:06:33 +0000 (22:06 +0100)]
Fortran: reject invalid CHARACTER length of derived type components [PR96024]

gcc/fortran/ChangeLog:

PR fortran/96024
* resolve.c (resolve_component): The type of a CHARACTER length
expression must be INTEGER.

gcc/testsuite/ChangeLog:

PR fortran/96024
* gfortran.dg/pr96024.f90: New test.

(cherry picked from commit 31303c9b5bab200754cdb7ef8cd91ae4918f3018)

17 months agoFortran: improve checking of character length specification [PR96025]
Harald Anlauf [Mon, 20 Feb 2023 20:28:09 +0000 (21:28 +0100)]
Fortran: improve checking of character length specification [PR96025]

gcc/fortran/ChangeLog:

PR fortran/96025
* parse.c (check_function_result_typed): Improve type check of
specification expression for character length and return status.
(parse_spec): Use status from above.
* resolve.c (resolve_fntype): Prevent use of invalid specification
expression for character length.

gcc/testsuite/ChangeLog:

PR fortran/96025
* gfortran.dg/pr96025.f90: New test.

(cherry picked from commit 6c1b825b3d6499dfeacf7c79dcf4b56a393ac204)

17 months agoDaily bump.
GCC Administrator [Sun, 5 Mar 2023 00:19:19 +0000 (00:19 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Sat, 4 Mar 2023 00:19:01 +0000 (00:19 +0000)]
Daily bump.

17 months agos390: libatomic: Fix 16 byte atomic {cas,load,store}
Stefan Schulze Frielinghaus [Fri, 3 Mar 2023 16:13:20 +0000 (17:13 +0100)]
s390: libatomic: Fix 16 byte atomic {cas,load,store}

This is a follow-up to commit a4c6bd0821099f6b8c0f64a96ffd9d01a025c413
introducing a runtime check for alignment for 16 byte atomic
compare-exchange, load, and store.

libatomic/ChangeLog:

* config/s390/cas_n.c: New file.
* config/s390/load_n.c: New file.
* config/s390/store_n.c: New file.

(cherry picked from commit 9056d0df830c5a295d7594d517d409d10476990d)

17 months agod: Fix ICE on explicit immutable struct import [PR108877]
Iain Buclaw [Mon, 27 Feb 2023 19:46:18 +0000 (20:46 +0100)]
d: Fix ICE on explicit immutable struct import [PR108877]

Const and immutable types are built as variants of the type they are
derived from, and TYPE_STUB_DECL is not set for these variants.

PR d/108877

gcc/d/ChangeLog:

* imports.cc (ImportVisitor::visit (EnumDeclaration *)): Call
make_import on TYPE_MAIN_VARIANT.
(ImportVisitor::visit (AggregateDeclaration *)): Likewise.
(ImportVisitor::visit (ClassDeclaration *)): Likewise.

gcc/testsuite/ChangeLog:

* gdc.dg/imports/pr108877a.d: New test.
* gdc.dg/pr108877.d: New test.

(cherry picked from commit ce1cea3e22f58bbddde017f8a92e59bae8892339)

17 months agoDaily bump.
GCC Administrator [Fri, 3 Mar 2023 00:19:03 +0000 (00:19 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Thu, 2 Mar 2023 00:19:51 +0000 (00:19 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Wed, 1 Mar 2023 00:20:28 +0000 (00:20 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Tue, 28 Feb 2023 00:21:13 +0000 (00:21 +0000)]
Daily bump.

17 months agors6000/test: Adjust some test cases on partial vector [PR96373]
Kewen Lin [Tue, 14 Feb 2023 02:03:26 +0000 (20:03 -0600)]
rs6000/test: Adjust some test cases on partial vector [PR96373]

As Richard pointed out in [1] and the testing on Power10, the
proposed fix for PR96373 requires some updates on a few rs6000
test cases which adopt partial vector.  This patch is to fix
all of them with one extra option "-fno-trapping-math" as
Richard suggested.

Besides, the original test case also failed on Power10 without
Richard's proposed fix, this patch adds it together for a bit
better testing coverage.

[1] https://gcc.gnu.org/pipermail/gcc-patches/2023-January/610728.html

PR target/96373

gcc/testsuite/ChangeLog:

* gcc.target/powerpc/p9-vec-length-epil-1.c: Add -fno-trapping-math.
* gcc.target/powerpc/p9-vec-length-epil-2.c: Likewise.
* gcc.target/powerpc/p9-vec-length-epil-3.c: Likewise.
* gcc.target/powerpc/p9-vec-length-epil-4.c: Likewise.
* gcc.target/powerpc/p9-vec-length-epil-5.c: Likewise.
* gcc.target/powerpc/p9-vec-length-epil-6.c: Likewise.
* gcc.target/powerpc/p9-vec-length-epil-8.c: Likewise.
* gcc.target/powerpc/p9-vec-length-full-1.c: Likewise.
* gcc.target/powerpc/p9-vec-length-full-2.c: Likewise.
* gcc.target/powerpc/p9-vec-length-full-3.c: Likewise.
* gcc.target/powerpc/p9-vec-length-full-4.c: Likewise.
* gcc.target/powerpc/p9-vec-length-full-5.c: Likewise.
* gcc.target/powerpc/p9-vec-length-full-6.c: Likewise.
* gcc.target/powerpc/p9-vec-length-full-8.c: Likewise.
* gcc.target/powerpc/pr96373.c: New test.

(cherry picked from commit 4f5a1198065dc078f8099db628da7b06a2666f34)

17 months agoDaily bump.
GCC Administrator [Mon, 27 Feb 2023 00:19:45 +0000 (00:19 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Sun, 26 Feb 2023 00:20:22 +0000 (00:20 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Sat, 25 Feb 2023 00:20:15 +0000 (00:20 +0000)]
Daily bump.

17 months agoRTEMS: Tune multilib selection
Sebastian Huber [Wed, 22 Feb 2023 20:38:18 +0000 (21:38 +0100)]
RTEMS: Tune multilib selection

gcc/ChangeLog:

* config/riscv/t-rtems: Keep only -mcmodel=medany 64-bit multilibs.
Add non-compact 32-bit multilibs.

(cherry picked from commit 35a067020e41d97bc3be15b518b3dc2a64b4aae2)

17 months agoDaily bump.
GCC Administrator [Fri, 24 Feb 2023 00:20:15 +0000 (00:20 +0000)]
Daily bump.

17 months agolibstdc++: Simplify three helper functions into one
Matthias Kretz [Sat, 14 Jan 2023 22:32:38 +0000 (23:32 +0100)]
libstdc++: Simplify three helper functions into one

Broadcast is a very common function. This should reduce compile-time
effort.

Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:

PR libstdc++/108030
* include/experimental/bits/simd.h (__vector_broadcast):
Implement via __vector_broadcast_impl instead of
__call_with_n_evaluations + 2 lambdas.
(__vector_broadcast_impl): New.

(cherry picked from commit 2e29e2fbeb8936e5c85cefaf547cba42e17e137b)

17 months agolibstdc++: Fix -Wsign-compare issue
Matthias Kretz [Tue, 21 Feb 2023 09:31:55 +0000 (10:31 +0100)]
libstdc++: Fix -Wsign-compare issue

Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:

* include/experimental/bits/simd_builtin.h (_S_set): Compare as
int. The actual range of these indexes is very small.

(cherry picked from commit ffa39f7120f6e83a567d7a83ff4437f6b41036ea)

17 months agolibstdc++: Add missing constexpr on simd shift implementation
Matthias Kretz [Mon, 20 Feb 2023 16:35:59 +0000 (17:35 +0100)]
libstdc++: Add missing constexpr on simd shift implementation

Resolves -Wtautological-compare warnings about `if
(__builtin_is_constant_evaluated())` in the implementations of these
functions.

Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:

* include/experimental/bits/simd_x86.h (_S_bit_shift_left)
(_S_bit_shift_right): Declare constexpr. The implementation was
already expecting constexpr evaluation.

(cherry picked from commit fa37ac2b59ed1c379b35dbf9bd58f7849f9fd5b5)

17 months agolibstdc++: Fix uses of non-reserved names in simd header
Matthias Kretz [Thu, 16 Feb 2023 15:29:54 +0000 (16:29 +0100)]
libstdc++: Fix uses of non-reserved names in simd header

Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:

* include/experimental/bits/simd.h (__extract_part, split):
Use reserved name for template parameter.

(cherry picked from commit bb920f561e983c64d146f173dc4ebc098441a962)

17 months agoDaily bump.
GCC Administrator [Thu, 23 Feb 2023 00:20:49 +0000 (00:20 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Wed, 22 Feb 2023 00:21:22 +0000 (00:21 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Tue, 21 Feb 2023 00:20:40 +0000 (00:20 +0000)]
Daily bump.

17 months agoaarch64: Fix up bfmlal lane pattern [PR104921]
Alex Coplan [Mon, 6 Feb 2023 14:32:21 +0000 (14:32 +0000)]
aarch64: Fix up bfmlal lane pattern [PR104921]

As the testcase shows, this pattern had an incorrect constraint leading
to GCC's output getting rejected by the assembler.

This patch fixes the constraint accordingly.

The test is split into two: one that can run without bf16 support from
the assembler and another that checks that the output actually assembles
when such support is available.

gcc/ChangeLog:

PR target/104921
* config/aarch64/aarch64-simd.md (aarch64_bfmlal<bt>_lane<q>v4sf):
Use correct constraint for operand 3.

gcc/testsuite/ChangeLog:

PR target/104921
* gcc.target/aarch64/pr104921-1.c: New test.
* gcc.target/aarch64/pr104921-2.c: New test.
* gcc.target/aarch64/pr104921.x: Include file for new tests.

(cherry picked from commit 277e1f30a5e4e634304a7b8a532825119f0ea47f)

17 months agoDaily bump.
GCC Administrator [Mon, 20 Feb 2023 00:19:11 +0000 (00:19 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Sun, 19 Feb 2023 00:19:34 +0000 (00:19 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Sat, 18 Feb 2023 00:19:57 +0000 (00:19 +0000)]
Daily bump.

17 months agoDaily bump.
GCC Administrator [Fri, 17 Feb 2023 00:20:18 +0000 (00:20 +0000)]
Daily bump.

18 months agolibstdc++: Fix incorrect __builtin_is_constant_evaluated calls
Matthias Kretz [Thu, 2 Feb 2023 11:29:33 +0000 (12:29 +0100)]
libstdc++: Fix incorrect __builtin_is_constant_evaluated calls

Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:

* include/experimental/bits/simd_x86.h
(_SimdImplX86::_S_not_equal_to, _SimdImplX86::_S_less)
(_SimdImplX86::_S_less_equal): Do not call
__builtin_is_constant_evaluated in constexpr-if.

(cherry picked from commit 1fd3836463c65f695831ef04c7dbda1e7a1794ba)

18 months agolibstdc++: printf format string fix in testsuite
Matthias Kretz [Thu, 2 Feb 2023 11:28:39 +0000 (12:28 +0100)]
libstdc++: printf format string fix in testsuite

Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:

* testsuite/experimental/simd/tests/bits/verify.h
(verify::verify): Use %zx for size_t in format string.

(cherry picked from commit 07e4648b4ab86a76ab040ea18a756e388652c882)

18 months agolibstdc++: Ensure __builtin_constant_p isn't lost on the way
Matthias Kretz [Fri, 13 Jan 2023 15:20:36 +0000 (16:20 +0100)]
libstdc++: Ensure __builtin_constant_p isn't lost on the way

The more expensive code path should only be taken if it can be optimized
away.

Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:

* include/experimental/bits/simd.h
(_SimdWrapper::_M_is_constprop_none_of)
(_SimdWrapper::_M_is_constprop_all_of): Return false unless the
computed result still satisfies __builtin_constant_p.

(cherry picked from commit fea34ee491104f325682cc5fb75683b7d74a0a3b)

18 months agoDaily bump.
GCC Administrator [Thu, 16 Feb 2023 00:20:34 +0000 (00:20 +0000)]
Daily bump.

18 months agoFix PR target/90458
Eric Botcazou [Wed, 15 Feb 2023 22:32:12 +0000 (23:32 +0100)]
Fix PR target/90458

This is the incompatibility of -fstack-clash-protection with Windows SEH.
Now the Windows ports always enable TARGET_STACK_PROBE, which means that
the stack is always probed (out of line) so -fstack-clash-protection does
nothing more.

gcc/
PR target/90458
* config/i386/i386.c (ix86_compute_frame_layout): Disable the
effects of -fstack-clash-protection for TARGET_STACK_PROBE.
(ix86_expand_prologue): Likewise.

18 months agoDaily bump.
GCC Administrator [Wed, 15 Feb 2023 00:20:23 +0000 (00:20 +0000)]
Daily bump.

18 months agoc++: fix ICE in joust_maybe_elide_copy [PR106675]
Marek Polacek [Fri, 10 Feb 2023 22:26:57 +0000 (17:26 -0500)]
c++: fix ICE in joust_maybe_elide_copy [PR106675]

joust_maybe_elide_copy checks that the last conversion in the ICS for
the first argument is ck_ref_bind, which is reasonable, because we've
checked that we're dealing with a copy/move constructor.  But it can
also happen that we couldn't figure out which conversion function is
better to convert the argument, as in this testcase: joust couldn't
decide if we should go with

  operator foo &()

or

  operator foo const &()

so we get a ck_ambig, which then upsets joust_maybe_elide_copy.  Since
a ck_ambig can validly occur, I think we should just return early, as
in the patch below.

PR c++/106675

gcc/cp/ChangeLog:

* call.c (joust_maybe_elide_copy): Return false for ck_ambig.

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/overload-conv-5.C: New test.

(cherry picked from commit cce62625025380c2ea2a220deb10f8f355f83abf)

18 months agolibstdc++: Add missing free functions for atomic_flag [PR103934]
Thomas W Rodgers [Fri, 10 Feb 2023 17:35:11 +0000 (09:35 -0800)]
libstdc++: Add missing free functions for atomic_flag [PR103934]

This patch adds -
  atomic_flag_test
  atomic_flag_test_explicit

Which were missed when commit 491ba6 introduced C++20 atomic flag
test.

libstdc++-v3/ChangeLog:

PR libstdc++/103934
* include/std/atomic (atomic_flag_test): Add.
(atomic_flag_test_explicit): Add.
* testsuite/29_atomics/atomic_flag/test/explicit.cc: Add
test case to cover missing atomic_flag free functions.
* testsuite/29_atomics/atomic_flag/test/implicit.cc:
Likewise.

(cherry picked from commit a8d769045b43e8509490362865a85cb31a855ccf)

18 months agoDaily bump.
GCC Administrator [Tue, 14 Feb 2023 00:19:59 +0000 (00:19 +0000)]
Daily bump.

18 months agors6000: Teach rs6000_opaque_type_invalid_use_p about gcall [PR108348]
Kewen Lin [Wed, 18 Jan 2023 08:34:19 +0000 (02:34 -0600)]
rs6000: Teach rs6000_opaque_type_invalid_use_p about gcall [PR108348]

PR108348 shows one special case that MMA opaque types are
used in function arguments and treated as pass by reference,
it results in one copying from argument to a temp variable,
since this copying happens before rs6000_function_arg check,
it can cause ICE without MMA support then.  This patch is to
teach function rs6000_opaque_type_invalid_use_p to check if
any function argument in a gcall stmt has the invalid use of
MMA opaque types.

btw, I checked the handling on return value, it doesn't have
this kind of issue as its checking and error emission is quite
early, so this doesn't handle function return value.

PR target/108348

gcc/ChangeLog:

* config/rs6000/rs6000.c (rs6000_opaque_type_invalid_use_p): Add the
support for invalid uses of MMA opaque type in function arguments.

gcc/testsuite/ChangeLog:

* gcc.target/powerpc/pr108348-1.c: New test.
* gcc.target/powerpc/pr108348-2.c: New test.

(cherry picked from commit 5d9529687deb9ed009361a16c02a7f6c3e2ebbf3)

18 months agors6000: Teach rs6000_opaque_type_invalid_use_p about inline asm [PR108272]
Kewen Lin [Mon, 16 Jan 2023 08:15:39 +0000 (02:15 -0600)]
rs6000: Teach rs6000_opaque_type_invalid_use_p about inline asm [PR108272]

As PR108272 shows, there are some invalid uses of MMA opaque
types in inline asm statements.  This patch is to teach the
function rs6000_opaque_type_invalid_use_p for inline asm,
check and error any invalid use of MMA opaque types in input
and output operands.

PR target/108272

gcc/ChangeLog:

* config/rs6000/rs6000.c (rs6000_opaque_type_invalid_use_p): Add the
support for invalid uses in inline asm, factor out the checking and
erroring to lambda function check_and_error_invalid_use.

gcc/testsuite/ChangeLog:

* gcc.target/powerpc/pr108272-1.c: New test.
* gcc.target/powerpc/pr108272-2.c: New test.
* gcc.target/powerpc/pr108272-3.c: New test.
* gcc.target/powerpc/pr108272-4.c: New test.

(cherry picked from commit 074b0c03eabeb8e9c8de813c81bf87a1f88fdb65)

18 months agoDaily bump.
GCC Administrator [Mon, 13 Feb 2023 00:20:07 +0000 (00:20 +0000)]
Daily bump.

18 months agoDaily bump.
GCC Administrator [Sun, 12 Feb 2023 00:20:03 +0000 (00:20 +0000)]
Daily bump.

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