- 09 Jul, 2020 9 commits
-
-
It's not difficult for multiple threads to drain the entropy available to the RDSEED instruction, at which point we throw an exception. This change will try to use RDRAND after RDSEED fails repeatedly, and only throw if RDRAND also fails repeatedly. This doesn't guarantee a random value can always be read, but reduces the likelihood of failure when using the RDSEED instruction. PR libstdc++/94087 * src/c++11/random.cc (__x86_rdseed): Allow fallback function to be passed in. (__x86_rdseed_rdrand): New function that uses rdseed with rdrand fallback. (random_device::_M_init): Use __x86_rdseed_rdrand when both instructions are available. * testsuite/26_numerics/random/random_device/94087.cc: New test. (cherry picked from commit a2d196e75cef95c2b70734ad02e94f9da0e769fe)
Jonathan Wakely committed -
- This optimization will adjust stack, but it not check/update other stack pointer use-site, the example is when the arguments put on stack, the offset become wrong after optimization. - However adjust stack frame usage after register allocation could be error prone, so we decide to turn off this optimization for such case. - Ye-Ting Kuo report this issue on github: https://github.com/riscv/riscv-gcc/pull/192 gcc/ChangeLog: * config/riscv/riscv-sr.c (riscv_remove_unneeded_save_restore_calls): Abort if any arguments on stack. gcc/testsuite/ChangeLog * gcc.target/riscv/save-restore-9.c: New. (cherry picked from commit 4c0d1322033ce979532425d336530b217f6b5fd3)
Kito Cheng committed -
- g++ will complain too few arguments for frflags builtin like bellow message: error: too few arguments to function 'unsigned int __builtin_riscv_frflags(void)' - However it's no arguments needed, it because we declare the function type with VOID arguments, that seems like require a VOID argument in the c++ front-end when GCC tried to resolve the function. gcc/ChangeLog * config/riscv/riscv-builtins.c (RISCV_FTYPE_NAME0): New. (RISCV_FTYPE_ATYPES0): New. (riscv_builtins): Using RISCV_USI_FTYPE for frflags. * config/riscv/riscv-ftypes.def: Remove VOID argument. gcc/testsuite/ChangeLog * g++.target/riscv/frflags.C: New. (cherry picked from commit 33d9794b7277a64543914bfbbfd567505e72da6c)
Kito Cheng committed -
- riscv_gpr_save_operation_p might try to match parallel on other patterns like inline asm pattern, and then it might trigger ther assertion checking there, so we could trun it into a early exit check. gcc/ChangeLog: PR target/95683 * config/riscv/riscv.c (riscv_gpr_save_operation_p): Remove assertion and turn it into a early exit check. gcc/testsuite/ChangeLog PR target/95683 * gcc.target/riscv/pr95683.c: New. (cherry picked from commit beaf12b49ae030505194cdcac18b5c8533a43921)
Kito Cheng committed -
gcc/ChangeLog: * config/riscv/riscv.c (riscv_gen_gpr_save_insn): Change type to unsigned for i. (riscv_gpr_save_operation_p): Change type to unsigned for i and len. (cherry picked from commit 82a3008e56c620008b4575a97e459e2769df54db)
Kito Cheng committed -
gcc/ChangeLog: * config/riscv/riscv-protos.h (riscv_output_gpr_save): Remove. * config/riscv/riscv-sr.c (riscv_sr_match_prologue): Update value. * config/riscv/riscv.c (riscv_output_gpr_save): Remove. * config/riscv/riscv.md (gpr_save): Update output asm pattern. (cherry picked from commit dcf41a4e6033213f5e5f80da23080df961d83996)
Kito Cheng committed -
- Verified on rv32emc/rv32gc/rv64gc bare-metal target and rv32gc/rv64gc linux target with qemu. gcc/ChangeLog: * config/riscv/predicates.md (gpr_save_operation): New. * config/riscv/riscv-protos.h (riscv_gen_gpr_save_insn): New. (riscv_gpr_save_operation_p): Ditto. * config/riscv/riscv-sr.c (riscv_remove_unneeded_save_restore_calls): Ignore USEs for gpr_save patter. * config/riscv/riscv.c (gpr_save_reg_order): New. (riscv_expand_prologue): Use riscv_gen_gpr_save_insn to gen gpr_save. (riscv_gen_gpr_save_insn): New. (riscv_gpr_save_operation_p): Ditto. * config/riscv/riscv.md (S3_REGNUM): New. (S4_REGNUM): Ditto. (S5_REGNUM): Ditto. (S6_REGNUM): Ditto. (S7_REGNUM): Ditto. (S8_REGNUM): Ditto. (S9_REGNUM): Ditto. (S10_REGNUM): Ditto. (S11_REGNUM): Ditto. (gpr_save): Model USEs correctly. gcc/testsuite/ChangeLog: * gcc.target/riscv/pr95252.c: New. (cherry picked from commit d0e0c1300f9f08608873df5571e14a61308dd0c0)
Kito Cheng committed -
default_unique_section uses ".sdata2" as a prefix for SECCAT_SRODATA unique sections, but RISC-V uses ".srodata" instead. Override the TARGET_ASM_UNIQUE_SECTION function to catch this case, allowing the default to be used for all other sections. Signed-off-by: Keith Packard <keithp@keithp.com> gcc/ * config/riscv/riscv.c (riscv_unique_section): New. (TARGET_ASM_UNIQUE_SECTION): New. (cherry picked from commit adce62f53d8ad00e8110a6a2de7962d7a850de16)
Keith Packard committed -
GCC Administrator committed
-
- 08 Jul, 2020 6 commits
-
-
The legacy "assigned GOTO" accepts only scalar integer variables. Check for proper arguments. gcc/fortran/ PR fortran/95709 * resolve.c (gfc_resolve_code): Check for valid arguments to assigned GOTO. (cherry picked from commit 824084e72e388f81015e7f67922c75f50741355a)
Harald Anlauf committed -
* sv.po: Update.
Joseph Myers committed -
Only '(' and ':' currently terminate file lists in ChangeLog entries in the ChangeLog parser. This rules out such legitimate entries as: * filename <CASE>: * filename [COND]: This patch extends the ChangeLog parser to recognize these forms. for contrib/ChangeLog * gcc-changelog/git_commit.py: Support CASE and COND. * gcc-changelog/test_patches.txt: Add test. * gcc-changelog/test_email.py: Add test. Co-Authored-By: Martin Liska <mliska@suse.cz> (cherry picked from commit a759bfc7cf238b9fc5bf97884297fc69d8cdf2b5)
Alexandre Oliva committed -
Compiling this testcase with -march=armv8.2-a+sve -msve-vector-bits=512: ---------------------------------------------------------- typedef __SVFloat32_t foo; typedef foo bar __attribute__((arm_sve_vector_bits(512))); template<typename T> struct s { T x; }; extern s<bar> a; bar &b = a.x; ---------------------------------------------------------- gave the bogus error: cannot bind non-const lvalue reference of type ‘bar&’ to an rvalue of type ‘bar’ The testcase works if the attribute is applied directly to __SVFloat32_t instead of via foo. This shows a more general problem with the way that we were handling the arm_sve_vector_bits attribute: we started by building a distinct copy of the type to which the attribute was applied, instead of starting with its main variant. This new type then became its own main variant, meaning that the relationship between types that have the attribute could be different from the relationship between types that don't have the attribute. This patch instead copies the main variant of the original type and then reapplies all the differences. gcc/ PR target/95105 * config/aarch64/aarch64-sve-builtins.cc (handle_arm_sve_vector_bits_attribute): Create a copy of the original type's TYPE_MAIN_VARIANT, then reapply all the differences between the original type and its main variant. gcc/testsuite/ PR target/95105 * gcc.target/aarch64/sve/acle/general/attributes_8.c: New test. * g++.target/aarch64/sve/acle/general-c++/attributes_1.C: Likewise.
Richard Sandiford committed -
On AIX, the compiler supports DWARF 5 but the linker does not. 2020-07-07 Clement Chigot <clement.chigot@atos.net> * configure.ac: Test linker support for DWARF5 * configure: Regenerate
Ian Lance Taylor committed -
GCC Administrator committed
-
- 07 Jul, 2020 3 commits
-
-
This fixes bogus misalignment calculation for negative steps since an assertion a previous comment indicated no longer holds: /* DR_STEP(dr) is the same as -TYPE_SIZE of the scalar type, otherwise we wouldn't be here. */ Thus the following replaces DR_STEP by -TYPE_SIZE. 2020-07-06 Richard Biener <rguenther@suse.de> PR tree-optimization/96075 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use TYPE_SIZE_UNIT of the vector component type instead of DR_STEP for the misalignment calculation for negative step. * gcc.dg/vect/slp-46.c: New testcase. (cherry picked from commit dccbf1e2a6e544f71b4a5795f0c79015db019fc3)
Richard Biener committed -
This fixes the sorting of to copy symbols in lto_output introduced with GCC 10 to not depend on the actual values of the randomness we append to LTO section names but instead on the order they appear in the unsorted array. This fixed observed debug info differences due to tree merging prevailing different early debug pointers. 2020-07-06 Richard Biener <rguenther@suse.de> * lto-streamer-out.c (cmp_symbol_files): Use the computed order map to sort symbols from the same sub-file together. (lto_output): Compute a map of sub-file to an order number it appears in the symbol output array. (cherry picked from commit c50502ca4ebb4d4bd2df9edf1eb5c53aacfa0a1e)
Richard Biener committed -
GCC Administrator committed
-
- 06 Jul, 2020 3 commits
-
-
[PATCH, PR target/94954] Fix wrong codegen for vec_pack_to_short_fp32() builtin Hi, Fix codegen for builtin vec_pack_to_short_fp32. This includes adding a define_insn for xvcvsphp, and adding a new define_expand for convert_4f32_8f16. [v2] Comment on altivec.md "convert_4f32_8f16" enhanced. Testsuite builtins-1-p9-runnable.c updated. OK for trunk and backports? Thanks -Will PR target/94954 gcc/Changelog: * config/rs6000/altivec.h (vec_pack_to_short_fp32): Update. * config/rs6000/altivec.md (UNSPEC_CONVERT_4F32_8F16): New unspec. (convert_4f32_8f16): New define_expand * config/rs6000/rs6000-builtin.def (convert_4f32_8f16): New builtin define and overload. * config/rs6000/rs6000-call.c (P9V_BUILTIN_VEC_CONVERT_4F32_8F16): New overloaded builtin entry. * config/rs6000/vsx.md (UNSPEC_VSX_XVCVSPHP): New unspec. (vsx_xvcvsphp): New define_insn. gcc/testsuite/ChangeLog: * gcc.target/powerpc/builtins-1-p9-runnable.c: Update.
Will Schmidt committed -
When declaring a polymorphic variable that is not a dummy, allocatable or pointer, an ICE occurred due to a NULL pointer dereference. Check for that situation and punt. gcc/fortran/ PR fortran/93337 * class.c (gfc_find_derived_vtab): Punt if name is not set. (cherry picked from commit d9fb6f2b4f1321b059807ff6073156f07d9d376b)
Harald Anlauf committed -
GCC Administrator committed
-
- 05 Jul, 2020 2 commits
-
-
This regression came about because of a change in the way types are displayed in error messages. The character representation is also used to calculate the hashes for our types, so this patch restores the old behavior if we are indeed calculating a hash. The test case also checks for the specific hash value because changing that would be an ABI change, which we should not be doing unintentionally. gcc/fortran/ChangeLog: 2020-06-30 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/95366 * gfortran.h (gfc_typename): Add optional argument for_hash. * misc.c (gfc_typename): When for_hash is true, just retur CHARACTER(kind). * class.c (gfc_intrinsic_hash_value): Call gfc_typename with for_hash = true. (cherry picked from commit 5958b926dcc3332aec0a2e34653c4394d2613401)
Thomas Koenig committed -
GCC Administrator committed
-
- 04 Jul, 2020 2 commits
-
-
PR 96040 revealed IPA-SRA, when checking whether an intended split is the same as the one in a called function does not also check if the types match and the transformation code does not handle any resulting type mismatches. This patch simply avoids the the split in the case of mismatches, so that we do not have to be careful about invalid floating-point values being passed in floating point registers and related issues. gcc/ChangeLog: 2020-07-03 Martin Jambor <mjambor@suse.cz> PR ipa/96040 * ipa-sra.c (all_callee_accesses_present_p): Do not accept type mismatched accesses. gcc/testsuite/ChangeLog: 2020-07-03 Martin Jambor <mjambor@suse.cz> PR ipa/96040 * gcc.dg/ipa/pr96040.c: New test. (cherry picked from commit b9a15a8325ba89b926e3c437b7961829a6b2fa2b)
Martin Jambor committed -
GCC Administrator committed
-
- 03 Jul, 2020 4 commits
-
-
[OpenACC] Revert always-copyfrom behavior for 'GOMP_MAP_FORCE_FROM' in 'libgomp/oacc-mem.c:goacc_exit_data_internal' As done for 'GOMP_MAP_FROM', also for 'GOMP_MAP_FORCE_FROM' we should only 'gomp_copy_dev2host' if 'n->refcount == 0'. This had gotten altered in commit 378da98f (r279621) "OpenACC reference count overhaul". libgomp/ * oacc-mem.c (goacc_exit_data_internal): Revert always-copyfrom behavior for 'GOMP_MAP_FORCE_FROM'. * testsuite/libgomp.oacc-c-c++-common/pr92843-1.c: Adjust XFAIL. (cherry picked from commit e7f3f7fe08bdd49367f682398e1d2f4e6b60ef84)
Thomas Schwinge committed -
[OpenACC] Remove (unused) 'GOMP_MAP_ALWAYS_FROM' handling from 'libgomp/oacc-mem.c:goacc_exit_data_internal' This had gotten added in commit 378da98f (r279621) "OpenACC reference count overhaul", but it doesn't have any use in OpenACC. libgomp/ * oacc-mem.c (goacc_exit_data_internal): Remove 'GOMP_MAP_ALWAYS_FROM' handling. (cherry picked from commit 995aba5867b1c64b2b56a200ef16b135effe85f7)
Thomas Schwinge committed -
The mechanism generating debug info for removed parameters did not adjust index of the argument in the call statement to take into account extra arguments IPA-SRA might have produced when splitting a strucutre. This patch addresses that omission and stops gdb from showing incorrect value for the removed parameter and says "value optimized out" instead. The guality testcase will end up as UNSUPPORTED in the results which is how Richi told me on IRC we deal with this. It is possible to generate debug info to actually show the value of the removed parameter but so far my approaches to do just that seem toocontroversial (https://gcc.gnu.org/pipermail/gcc-patches/2020-May/546705.html), so before I come up with something better I'd like to push this to master and the gcc-10 branch in time for the GCC 10.2 release. gcc/ChangeLog: 2020-07-01 Martin Jambor <mjambor@suse.cz> PR debug/95343 * ipa-param-manipulation.c (ipa_param_adjustments::modify_call): Adjust argument index if necessary. gcc/testsuite/ChangeLog: 2020-07-01 Martin Jambor <mjambor@suse.cz> PR debug/95343 * gcc.dg/guality/pr95343.c: New test. (cherry picked from commit 053c88093a45f175f446eda009f3312e4e508514)
Martin Jambor committed -
GCC Administrator committed
-
- 02 Jul, 2020 9 commits
-
-
2020-07-02 Segher Boessenkool <segher@kernel.crashing.org> * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Define _ARCH_PWR10 when appropriate.
Segher Boessenkool committed -
PR libstdc++/91807 * include/std/variant (_Copy_assign_base::operator=(const _Copy_assign_base&): Do the move-assignment from a temporary so that the temporary is constructed with an explicit index. * testsuite/20_util/variant/91807.cc: New. (cherry picked from commit dbca7a69f276e4829354f87f2747ebff36f6090e)
Ville Voutilainen committed -
Catch NULL pointer dereference for ASSOCIATE on allocatable coarray variable. gcc/fortran/ PR fortran/88379 * resolve.c (resolve_assoc_var): Avoid NULL pointer dereference. (cherry picked from commit 267f84c6035c9380c8d1e9cb83ffe299c23e3a85)
Harald Anlauf committed -
These tests fail with AIX double double. Use different floating point values that behave less surprisingly. libstdc++-v3/ChangeLog: PR libstdc++/91153 PR target/93224 * testsuite/29_atomics/atomic_float/1.cc: Use different values for tests. * testsuite/29_atomics/atomic_ref/float.cc: Likewise. (cherry picked from commit c6f431bba531bac3212b66069cf0f9718edf0132)
Jonathan Wakely committed -
Add support for __builtin_cpu_is ("power10"). Also add documentation for the recently added "arch_3_1" and "mma" __builtin_cpu_supports arguments. 2020-06-25 Peter Bergner <bergner@linux.ibm.com> gcc/ * config/rs6000/rs6000-call.c (cpu_is_info) <power10>: New. * doc/extend.texi (PowerPC Built-in Functions): Document power10, arch_3_1 and mma. gcc/testsuite/ * gcc.target/powerpc/cpu-builtin-1.c: Add tests for power10, arch_3_1 and mma. (cherry picked from commit 67161d24f45601e43abea98f2c3d7d7a462b6eab)
Peter Bergner committed -
This patch adds support for the two new HWCAP2 fields used by the __builtin_cpu_supports function. It adds support in the target_clones attribute for -mcpu=power10. The two new __builtin_cpu_supports tests are: __builtin_cpu_supports ("arch_3_1") __builtin_cpu_supports ("mma") The bits used are the bits that the Linux kernel engineers will be using for these new features. 2020-06-05 Michael Meissner <meissner@linux.ibm.com> gcc/ * config/rs6000/ppc-auxv.h (PPC_PLATFORM_POWER10): Allocate 'power10' PowerPC platform. (PPC_FEATURE2_ARCH_3_1): New HWCAP2 bit for ARCH 3.1. (PPC_FEATURE2_MMA): New HWCAP2 bit for MMA. * config/rs6000/rs6000-call.c (cpu_supports_info): Add ARCH 3.1 and MMA HWCAP2 bits. gcc/testsuite/ * gcc.target/powerpc/clone3.c: New test for using 'power10' with the target_clones attribute. (cherry picked from commit 2753f2f8b4a4534ab364595ba4b8a913cc7254a7) (cherry picked from commit 7ba33e898fa4a097c0f2b4d9cae35041a5933f9c)
Michael Meissner committed -
2020-06-09 Michael Meissner <meissner@linux.ibm.com> gcc/testsuite/ * lib/target-supports.exp (check_effective_target_powerpc_pcrel): New. (check_effective_target_powerpc_prefixed_addr): New. (cherry picked from commit 6e52b2297ecce1243c00d76b3f079b71016b8ffa)
Michael Meissner committed -
contrib/ChangeLog: * gcc-changelog/git_check_commit.py: New file. * gcc-changelog/git_commit.py: New file. * gcc-changelog/git_email.py: New file. * gcc-changelog/git_repository.py: New file. * gcc-changelog/git_update_version.py: New file. * gcc-changelog/test_email.py: New file. * gcc-changelog/test_patches.txt: New file.
Martin Liska committed -
GCC Administrator committed
-
- 01 Jul, 2020 2 commits
-
-
This squashes two commits, r11-674 and r11-1401. PR libstdc++/95282 * include/bits/atomic_base.h (__atomic_impl::load): Add const-qualifier to parameter so that _Tp is deduced as the non-const type, and use _Val to get the unqualified type. (__atomic_impl::exchange): Use the _Val alias to remove volatile from the reinterpret_cast result type. * testsuite/29_atomics/atomic_float/95282.cc: New test. (cherry picked from commit e40b11a91cb345db1324c3cb8f75b01e28056693)
Jonathan Wakely committed -
These functions can't be noexcept because the iterators stored in the sub_match objects can throw on any operation. libstdc++-v3/ChangeLog: PR libstdc++/94627 * include/bits/regex.h (operator==, operator!=): Remove noexcept equality comparisons for match_results. * testsuite/28_regex/match_results/94627.cc: New test. (cherry picked from commit a1a0dc4548979f8a340a7ea71624a52a20e1e0b3)
Jonathan Wakely committed
-