aboutsummaryrefslogtreecommitdiff
path: root/gcc
AgeCommit message (Collapse)AuthorFilesLines
2023-04-13Ensure PHI equivalencies do not dominate the argument edge.Andrew MacLeod2-10/+22
When we create an equivalency between a PHI definition and an argument, ensure the definition does not dominate the incoming argument edge. PR tree-optimization/108139 PR tree-optimization/109462 * gimple-range-cache.cc (ranger_cache::fill_block_cache): Remove equivalency check for PHI nodes. * gimple-range-fold.cc (fold_using_range::range_of_phi): Ensure def does not dominate single-arg equivalency edges.
2023-04-13PR modula2/109488 Typo in lang.opt: libraries maybeGaius Mulley1-1/+1
Correct spelling of "maybe" to "may be" in the modula-2 language options. gcc/m2/ChangeLog: PR modula2/109488 * lang.opt: Fix typo "maybe" to "may be". Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2023-04-13PR modula2/109496 Fix constant char parameter passing to an array of charGaius Mulley10-25/+157
This patch fixes PR modula2/109496 and PR modula2/109497. The fix for PR modula2/109496 promotes a char constant to a string. The PR modula2/109497 allows for constant chars to be added to form a string. The fixes for both PR's occur in M2GenGCC.mod and M2GCCDeclare.mod after the resolving of constant declarations. gcc/m2/ChangeLog: * gm2-compiler/M2ALU.def (PopChar): New procedure function. * gm2-compiler/M2ALU.mod (PopChar): New procedure function. * gm2-compiler/M2GCCDeclare.mod (PromoteToString): Detect a single constant char and build a C string. * gm2-compiler/M2GenGCC.mod (IsConstStr): New procedure function. (GetStr): New procedure function. (FoldAdd): Use IsConstStr. * gm2-compiler/M2Quads.mod: Formatting changes. * gm2-gcc/m2expr.cc (m2expr_GetCstInteger): New function. * gm2-gcc/m2expr.def (GetCstInteger): New procedure function. * gm2-gcc/m2expr.h (m2expr_GetCstInteger): New prototype. gcc/testsuite/ChangeLog: PR modula2/109497 * gm2/pim/run/pass/addcharconst.mod: New test. PR modula2/109496 * gm2/pim/run/pass/singlechar.mod: New test. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2023-04-13aarch64: Don't trust TYPE_ALIGN for pointers [PR108910]Richard Sandiford2-1/+22
The aarch64 PCS rules ignore user alignment for scalars and vectors and use the "natural" alignment of the type. GCC tried to calculate that natural alignment using: TYPE_ALIGN (TYPE_MAIN_VARIANT (type)) But as discussed in the PR, it's possible that the main variant of a pointer type is an overaligned type (although that's usually accidental). This isn't known to be a problem for other types, so this patch changes the bare minimum. It might be that we need to ignore TYPE_ALIGN in other cases too. gcc/ PR target/108910 * config/aarch64/aarch64.cc (aarch64_function_arg_alignment): Do not trust TYPE_ALIGN for pointer types; use POINTER_SIZE instead. gcc/testsuite/ PR target/108910 * gcc.dg/torture/pr108910.c: New test.
2023-04-13tree-optimization/109491 - ICE in expressions_equal_pRichard Biener1-0/+7
At some point I elided the NULL pointer check in expressions_equal_p because it shouldn't be necessary not realizing that for example TARGET_MEM_REF has optional operands we cannot substitute with something non-NULL with the same semantics. The following does the simple thing and restore the check removed in r11-4982. PR tree-optimization/109491 * tree-ssa-sccvn.cc (expressions_equal_p): Restore the NULL operands test.
2023-04-13Daily bump.GCC Administrator6-1/+180
2023-04-12Update gcc de.poJoseph Myers1-111/+74
* de.po: Update.
2023-04-12Update gcc .po filesJoseph Myers19-145373/+147801
* be.po, da.po, de.po, el.po, es.po, fi.po, fr.po, hr.po, id.po, ja.po, nl.po, ru.po, sr.po, sv.po, tr.po, uk.po, vi.po, zh_CN.po, zh_TW.po: Update.
2023-04-12RISC-V: Fix supporting data type according to RVV ISA. [PR109479]Ju-Zhe Zhong11-246/+349
For vint64m*_t, we should only allow them in zve64* instead of zve32*_zvl64b (>=64b). Ideally, we should make error message more friendly like Clang. https://godbolt.org/z/f9GMv4dMo to report the RVV type require extenstion name. However, I failed to find a way to do that. So current GCC can only report "unknown" type. And I added comments to remind us doing this in the future. gcc/ChangeLog: PR target/109479 * config/riscv/riscv-vector-builtins-types.def (vint8mf8_t): Fix predicate. (vint16mf4_t): Ditto. (vint32mf2_t): Ditto. (vint64m1_t): Ditto. (vint64m2_t): Ditto. (vint64m4_t): Ditto. (vint64m8_t): Ditto. (vuint8mf8_t): Ditto. (vuint16mf4_t): Ditto. (vuint32mf2_t): Ditto. (vuint64m1_t): Ditto. (vuint64m2_t): Ditto. (vuint64m4_t): Ditto. (vuint64m8_t): Ditto. (vfloat32mf2_t): Ditto. (vbool64_t): Ditto. * config/riscv/riscv-vector-builtins.cc (register_builtin_type): Add comments. (register_vector_type): Ditto. (check_required_extensions): Fix condition. * config/riscv/riscv-vector-builtins.h (RVV_REQUIRE_ZVE64): Remove it. (RVV_REQUIRE_ELEN_64): New define. (RVV_REQUIRE_MIN_VLEN_64): Ditto. * config/riscv/riscv-vector-switch.def (TARGET_VECTOR_FP32): Remove it. (TARGET_VECTOR_FP64): Ditto. (ENTRY): Fix predicate. * config/riscv/vector-iterators.md: Fix predicate. gcc/testsuite/ChangeLog: PR target/109479 * gcc.target/riscv/rvv/base/pr109479-1.c: New test. * gcc.target/riscv/rvv/base/pr109479-2.c: New test. * gcc.target/riscv/rvv/base/pr109479-3.c: New test. * gcc.target/riscv/rvv/base/pr109479-4.c: New test. * gcc.target/riscv/rvv/base/pr109479-5.c: New test. * gcc.target/riscv/rvv/base/pr109479-6.c: New test.
2023-04-12reassoc: Fix up another ICE with returns_twice call [PR109410]Jakub Jelinek2-0/+28
The following testcase ICEs in reassoc, unlike the last case I've fixed there here SSA_NAME_USED_IN_ABNORMAL_PHI is not the case anywhere. build_and_add_sum places new statements after the later appearing definition of an operand but if both operands are default defs or constants, we place statement at the start of the function. If the very first statement of a function is a call to returns_twice function, this doesn't work though, because that call has to be the first thing in its basic block, so the following patch splits the entry successor edge such that the new statements are added into a different block from the returns_twice call. I think we should in stage1 reconsider such placements, I think it unnecessarily enlarges the lifetime of the new lhs if its operand(s) are used more than once in the function. Unless something sinks those again. Would be nice to place it closer to the actual uses (or where they will be placed). 2023-04-12 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/109410 * tree-ssa-reassoc.cc (build_and_add_sum): Split edge from entry block if first statement of the function is a call to returns_twice function. * gcc.dg/pr109410.c: New test.
2023-04-12i386: Fix up z operand modifier diagnostics on inline-asm [PR109458]Jakub Jelinek2-3/+24
On the following testcase, we emit weird diagnostics. User used the z modifier, but diagnostics talks about Z instead. This is because z is implemented by doing some stuff and then falling through into the Z case. The following patch adjusts the Z diagnostics, such that it prints whatever modifier user actually uses in places which could happen with either modifier. Furthermore, in case of the non-integer operand used with operand code %<z%> warning the warning location was incorrect (and of function), so I've used warning_for_asm to get it a proper location in case it is a user inline-asm. 2023-04-12 Jakub Jelinek <jakub@redhat.com> PR target/109458 * config/i386/i386.cc: Include rtl-error.h. (ix86_print_operand): For z modifier warning, use warning_for_asm if this_is_asm_operands. For Z modifier errors, use %c and code instead of hardcoded Z. * gcc.target/i386/pr109458.c: New test.
2023-04-12mingw: Support building with older gcc versionsCostas Argyris1-2/+4
The $@ argument to the compiler is causing only a warning in some gcc versions but an error in others. In any case, $@ was never necessary so remove it completely, just like the rules in x-mingw32 where the object file gets named after the source file. This fixes both warnings and errors about sym-mingw32.o appearing in the command line unnecessarily. The -nostdlib flag is required along with -r for older gcc versions that don't apply it automatically with -r, resulting in main functions erroneously entering a partial link. Signed-off-by: Jonathan Yong <10walls@gmail.com> gcc/ChangeLog: * config/i386/x-mingw32-utf8: Remove extrataneous $@
2023-04-12c++: Fix Solaris bootstraps across midnightJakub Jelinek1-6/+15
When working on the PR109040 fix, I wanted to test it on some WORD_REGISTER_OPERATIONS target and tried sparc-solaris on GCC Farm. My bootstrap failed in comparison failure on cp/module.o, because Solaris date doesn't support the -r option and one stage's cp/module.o was built before midnight and next stage's cp/module.o after midnight, so they had different -DMODULE_VERSION= value. Now, I think the advice (don't bootstrap at midnight) is something we shouldn't have, so the following patch stores the module version (still generated through the same way, date -r cp/module.cc if it works, otherwise just date) into a temporary file, makes sure that temporary file is updated when cp/module.cc source is updated and when date -r doesn't work copies file from previous stage if it is newer than cp/module.cc. 2023-04-12 Jakub Jelinek <jakub@redhat.com> * Make-lang.in (s-cp-module-version): New target. (cp/module.o): Depend on it. (MODULE_VERSION): Remove variable. (CFLAGS-cp/module.o): For -DMODULE_VERSION= argument just cat s-cp-module-version.
2023-04-12testsuite: Add testcase for recently fixed PR [PR109462]Jakub Jelinek1-0/+94
This adds a runtime testcase for just fixed PR. 2023-04-12 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/109462 * g++.dg/opt/pr109462.C: New test.
2023-04-12Don't use ANY PHI equivalences in range-on-entry.Andrew MacLeod2-2/+4
PR 108139 dissallows PHI equivalencies in the on-entry calculator, but it was only checking if the equivlaence was a PHI. In this case, NAME itself is a PHI with an equivlaence caused by an undefined value, so we also need to check that case. Unfortunately this un-fixes 101912. PR tree-optimization/109462 gcc/ * gimple-range-cache.cc (ranger_cache::fill_block_cache): Don't check for equivalences if NAME is a phi node. gcc/testsuite/ * gcc.dg/uninit-pr101912.c: XFAIL the warning.
2023-04-12tree-optimization/109473 - ICE with reduction epilog adjustment opRichard Biener2-2/+21
The following makes sure to carry out the reduction epilog adjustment in the original computation type which for pointers is an unsigned integer type. There's a similar issue with signed vs. unsigned ops and overflow which is fixed by this as well. PR tree-optimization/109473 * tree-vect-loop.cc (vect_create_epilog_for_reduction): Convert scalar result to the computation type before performing the reduction adjustment. * gcc.dg/vect/pr109473.c: New testcase.
2023-04-12Fortran: fix functions with entry and pointer/allocatable result [PR104312]Harald Anlauf5-1/+152
gcc/fortran/ChangeLog: PR fortran/104312 * resolve.cc (resolve_entries): Handle functions with ENTRY and ALLOCATABLE results. * trans-expr.cc (gfc_conv_procedure_call): Functions with a result with the POINTER or ALLOCATABLE attribute shall not get any special treatment with -ff2c, as they cannot be written in Fortran 77. * trans-types.cc (gfc_return_by_reference): Likewise. (gfc_get_function_type): Likewise. gcc/testsuite/ChangeLog: PR fortran/104312 * gfortran.dg/entry_26.f90: New test. * gfortran.dg/entry_27.f90: New test.
2023-04-12Fortran: resolve correct generic with TYPE(C_PTR) arguments [PR61615,PR99982]Harald Anlauf2-1/+112
gcc/fortran/ChangeLog: PR fortran/61615 PR fortran/99982 * interface.cc (compare_parameter): Enable type and rank checks for arguments of derived type from the intrinsic module ISO_C_BINDING. gcc/testsuite/ChangeLog: PR fortran/61615 PR fortran/99982 * gfortran.dg/interface_49.f90: New test.
2023-04-12tree-optimization/109469 - SLP with returns-twice region startRichard Biener2-3/+31
The following avoids an SLP region starting with a returns-twice call where we cannot insert stmts at the head. PR tree-optimization/109469 * tree-vect-slp.cc (vect_slp_function): Skip region starts with a returns-twice call. * gcc.dg/torture/pr109469.c: New testcase.
2023-04-12tree-optimization/109434 - bogus DSE of throwing call LHSRichard Biener2-1/+30
The byte tracking of call LHS didn't properly handle possibly throwing calls correctly which cases bogus DSE and in turn, for the testcase a bogus uninit diagnostic and (unreliable) wrong-code. PR tree-optimization/109434 * tree-ssa-dse.cc (initialize_ao_ref_for_dse): Properly handle possibly throwing calls when processing the LHS and may-defs are not OK. * g++.dg/opt/pr109434.C: New testcase.
2023-04-11testsuite: Adjust powerpc pr83677.c for BE [PR108815]Kewen Lin1-3/+27
The test case gcc.target/powerpc/pr83677.c was written for LE environment, this patch is to make it work on BE as well. PR testsuite/108815 gcc/testsuite/ChangeLog: * gcc.target/powerpc/pr83677.c (v_expand_u8, v_expand_u16, v_load_deinterleave_f32, v_store_interleave_f32): Adjust some code by considering BE.
2023-04-12Update gcc sv.poJoseph Myers1-181/+120
* sv.po: Update.
2023-04-12Daily bump.GCC Administrator3-1/+106
2023-04-11RISC-V: avoid splitting small constant in <or_optab>i<mode>_extrabit patternLin Sinan2-1/+15
there is no need to split an xori/ori with an small constant. take the test case `int foo(int idx) { return idx|3; }` as an example, rv64im_zba generates: ori a0,a0,3 ret but, rv64im_zba_zbs generates: ori a0,a0,1 ori a0,a0,2 ret with this change, insn `ori r2,r1,3` will not be splitted in zbs. gcc/ * config/riscv/predicates.md (uimm_extra_bit_or_twobits): Adjust predicate to avoid splitting arith constants. gcc/testsuite * gcc.target/riscv/zbs-extra-bit-or-twobits.c: New test.
2023-04-11RISC-V: Fix regression of -fzero-call-used-regs=all [PR109104]Yanzhang Wang6-3/+177
This patch registers a riscv specific function to TARGET_ZERO_CALL_USED_REGS instead of default in targhooks.cc. It will clean gpr and vector relevant registers. gcc/ChangeLog: PR target/109104 * config/riscv/riscv-protos.h (emit_hard_vlmax_vsetvl): New. * config/riscv/riscv-v.cc (emit_hard_vlmax_vsetvl): New. (emit_vlmax_vsetvl): Use emit_hard_vlmax_vsetvl. * config/riscv/riscv.cc (vector_zero_call_used_regs): New. (riscv_zero_call_used_regs): New. (TARGET_ZERO_CALL_USED_REGS): New. gcc/testsuite/ChangeLog: PR target/109104 * gcc.target/riscv/zero-scratch-regs-1.c: New test. * gcc.target/riscv/zero-scratch-regs-2.c: New test. * gcc.target/riscv/zero-scratch-regs-3.c: New test. Signed-off-by: Yanzhang Wang <yanzhang.wang@intel.com> Co-authored-by: Pan Li <pan2.li@intel.com> Co-authored-by: Ju-Zhe Zhong <juzhe.zhong@rivai.ai> Co-authored-by: Kito Cheng <kito.cheng@sifive.com>
2023-04-11gfortran.dg/gomp/affinity-clause-1.f90: Fix scan-tree-dumpTobias Burnus1-2/+1
Commit r13-7120-g46fe32cb4d887d44a62f9c4ff2a72532d4eb5a19 added the missing hyphen to 'dg-final', which exposed an -m32 pattern mismatch. gcc/testsuite/ * gfortran.dg/gomp/affinity-clause-1.f90: Update scan-tree pattern for -m32.
2023-04-11driver: drop flag_var_tracking_assignments flagMartin Liska3-1/+65
The revision r13-259-g76db543db88727 moved a condition from one file to another, but now we do not drop x_flag_var_tracking_assignments as it was done before the mentioned revision. PR driver/108241 gcc/ChangeLog: * opts.cc (finish_options): Drop also x_flag_var_tracking_assignments. gcc/testsuite/ChangeLog: * gcc.dg/pr108241.c: New test. * gcc.dg/pr79570.c: Add also -g option.
2023-04-11if-conv: Restore MASK_CALL conversion [PR108888]Andre Vieira4-5/+6
The original patch to fix this PR broke the if-conversion of calls into IFN_MASK_CALL. This patch restores that original behaviour and makes sure the tests added earlier specifically test inbranch SIMD clones. gcc/ChangeLog: PR tree-optimization/108888 * tree-if-conv.cc (predicate_statements): Fix gimple call check. gcc/testsuite/ChangeLog: * gcc.dg/vect/vect-simd-clone-16.c: Make simd clone inbranch only. * gcc.dg/vect/vect-simd-clone-17.c: Likewise. * gcc.dg/vect/vect-simd-clone-18.c: Likewise.
2023-04-11rs6000: correct vector sign extend builtins on Big EndianHaochen Gui6-89/+50
gcc/ PR target/108812 * config/rs6000/vsx.md (vsx_sign_extend_qi_<mode>): Rename to... (vsx_sign_extend_v16qi_<mode>): ... this. (vsx_sign_extend_hi_<mode>): Rename to... (vsx_sign_extend_v8hi_<mode>): ... this. (vsx_sign_extend_si_v2di): Rename to... (vsx_sign_extend_v4si_v2di): ... this. (vsignextend_qi_<mode>): Remove. (vsignextend_hi_<mode>): Remove. (vsignextend_si_v2di): Remove. (vsignextend_v2di_v1ti): Remove. (*xxspltib_<mode>_split): Replace gen_vsx_sign_extend_qi_v2di with gen_vsx_sign_extend_v16qi_v2di and gen_vsx_sign_extend_qi_v4si with gen_vsx_sign_extend_v16qi_v4si. * config/rs6000/rs6000.md (split for DI constant generation): Replace gen_vsx_sign_extend_qi_si with gen_vsx_sign_extend_v16qi_si. (split for HSDI constant generation): Replace gen_vsx_sign_extend_qi_di with gen_vsx_sign_extend_v16qi_di and gen_vsx_sign_extend_qi_si with gen_vsx_sign_extend_v16qi_si. * config/rs6000/rs6000-builtins.def (__builtin_altivec_vsignextsb2d): Set bif-pattern to vsx_sign_extend_v16qi_v2di. (__builtin_altivec_vsignextsb2w): Set bif-pattern to vsx_sign_extend_v16qi_v4si. (__builtin_altivec_visgnextsh2d): Set bif-pattern to vsx_sign_extend_v8hi_v2di. (__builtin_altivec_vsignextsh2w): Set bif-pattern to vsx_sign_extend_v8hi_v4si. (__builtin_altivec_vsignextsw2d): Set bif-pattern to vsx_sign_extend_si_v2di. (__builtin_altivec_vsignext): Set bif-pattern to vsx_sign_extend_v2di_v1ti. * config/rs6000/rs6000-builtin.cc (lxvrse_expand_builtin): Replace gen_vsx_sign_extend_qi_v2di with gen_vsx_sign_extend_v16qi_v2di, gen_vsx_sign_extend_hi_v2di with gen_vsx_sign_extend_v8hi_v2di and gen_vsx_sign_extend_si_v2di with gen_vsx_sign_extend_v4si_v2di. gcc/testsuite/ PR target/108812 * gcc.target/powerpc/p9-sign_extend-runnable.c: Set corresponding expected vectors for Big Endian. * gcc.target/powerpc/int_128bit-runnable.c: Likewise.
2023-04-11Daily bump.GCC Administrator3-1/+60
2023-04-09Do not generate vmaddfp and vnmsubfpMichael Meissner2-17/+58
This is version 3 of the patch. This is essentially version 1 with the removal of changes to altivec.md, and cleanup of the comments. Version 2 generated the vmaddfp and vnmsubfp instructions if -Ofast was used, and those changes are deleted in this patch. The Altivec instructions vmaddfp and vnmsubfp have different rounding behaviors than the VSX xvmaddsp and xvnmsubsp instructions due to VSCR[NJ] and other corner cases. In particular, generating these instructions seems to break Eigen on big endian systems. 2023-04-09 Michael Meissner <meissner@linux.ibm.com> gcc/ PR target/70243 * config/rs6000/vsx.md (vsx_fmav4sf4): Do not generate vmaddfp. (vsx_nfmsv4sf4): Do not generate vnmsubfp. gcc/testsuite/ PR target/70243 * gcc.target/powerpc/pr70243.c: New test.
2023-04-10i386: Add AMX-COMPLEX to Granite RapidsHaochen Jiang1-1/+1
gcc/Changelog: * config/i386/i386.h (PTA_GRANITERAPIDS): Add PTA_AMX_COMPLEX.
2023-04-10Support Intel AMX-COMPLEXHaochen Jiang30-17/+270
gcc/ChangeLog: * common/config/i386/cpuinfo.h (get_available_features): Detect AMX-COMPLEX. * common/config/i386/i386-common.cc (OPTION_MASK_ISA2_AMX_COMPLEX_SET, OPTION_MASK_ISA2_AMX_COMPLEX_UNSET): New. (ix86_handle_option): Handle -mamx-complex. * common/config/i386/i386-cpuinfo.h (enum processor_features): Add FEATURE_AMX_COMPLEX. * common/config/i386/i386-isas.h: Add ISA_NAME_TABLE_ENTRY for amx-complex. * config.gcc: Add amxcomplexintrin.h. * config/i386/cpuid.h (bit_AMX_COMPLEX): New. * config/i386/i386-c.cc (ix86_target_macros_internal): Define __AMX_COMPLEX__. * config/i386/i386-isa.def (AMX_COMPLEX): Add DEF_PTA(AMX_COMPLEX). * config/i386/i386-options.cc (ix86_valid_target_attribute_inner_p): Handle amx-complex. * config/i386/i386.opt: Add option -mamx-complex. * config/i386/immintrin.h: Include amxcomplexintrin.h. * doc/extend.texi: Document amx-complex. * doc/invoke.texi: Document -mamx-complex. * doc/sourcebuild.texi: Document target amx-complex. * config/i386/amxcomplexintrin.h: New file. gcc/testsuite/ChangeLog: * g++.dg/other/i386-2.C: Add -mamx-complex. * g++.dg/other/i386-3.C: Ditto. * gcc.target/i386/amx-check.h: Add cpu check for AMX-COMPLEX. * gcc.target/i386/amx-helper.h: Add amx-complex support. * gcc.target/i386/funcspec-56.inc: Add new target attribute. * gcc.target/i386/sse-12.c: Add -mamx-complex. * gcc.target/i386/sse-13.c: Ditto. * gcc.target/i386/sse-14.c: Ditto. * gcc.target/i386/sse-22.c: Add amx-complex. * gcc.target/i386/sse-23.c: Ditto. * lib/target-supports.exp (check_effective_target_amx_complex): New. * gcc.target/i386/amxcomplex-asmatt-1.c: New test. * gcc.target/i386/amxcomplex-asmintel-1.c: Ditto. * gcc.target/i386/amxcomplex-cmmimfp16ps-2.c: Ditto. * gcc.target/i386/amxcomplex-cmmrlfp16ps-2.c: Ditto.
2023-04-10Daily bump.GCC Administrator2-1/+6
2023-04-09c++, coroutines: Fix block nests when the function has no top-level bind.Iain Sandoe1-0/+4
When the function contains no local vars and also no nested scopes, there is no top-level bind expression. Because the rewritten coroutine body will require both local vars and contain nested scopes, we add a bind expression to such functions. When this was done the necessary scope blocks were omitted which leads to disconnected function content. Fixed by adding a new block to the added bind expression. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> gcc/cp/ChangeLog: * coroutines.cc (coro_rewrite_function_body): Ensure that added bind expressions have scope blocks.
2023-04-09Daily bump.GCC Administrator4-1/+111
2023-04-08PR tree-optimization/109392Jakub Jelinek2-1/+25
If we have an object with SSA_NAME_OCCURS_IN_ABNORMAL_PHI, then maybe_push_res_to_seq may fail. Directly build the extraction for that case. PR tree-optimization/109392 gcc/ * tree-vect-generic.cc (tree_vec_extract): Handle failure of maybe_push_res_to_seq better. gcc/testsuite/ * gcc.dg/pr109392.c: New test.
2023-04-08xfail gcc.dg/long_branch.c on hppa.John David Anglin1-1/+1
2023-04-08 John David Anglin <danglin@gcc.gnu.org> gcc/testsuite/ChangeLog: * gcc.dg/pr84877.c: xfail on hppa*-*-*.
2023-04-08Fix gcc.dg/long_branch.c on hppa.John David Anglin1-0/+1
2023-04-08 John David Anglin <danglin@gcc.gnu.org> gcc/testsuite/ChangeLog: * gcc.dg/long_branch.c: Use timeout factor 2.0 on hppa*-*-*.
2023-04-08riscv: Fix genrvv-type-indexer dependenciesJakub Jelinek2-4/+6
I've noticed make: Circular build/genrvv-type-indexer.o <- gtype-desc.h dependency dropped. The following patch fixes that. The RTL_BASE_H variable includes a lot of headers which the generator doesn't include, including gtype-desc.h. I've preprocessed it and checked all gcc/libiberty headers against what is included in the other dependency variables and here is what I found: 1) coretypes.h includes align.h, poly-int.h and poly-int-types.h which weren't listed (most of dependencies are thankfully done automatically, so it isn't that big deal except for these generators and the like) 2) system.h includes filenames.h (already listed) but filenames.h includes hashtab.h; instead of adding FILENAMES_H I've just added the dependency to SYSTEM_H 3) $(RTL_BASE_H) wasn't really needed at all and insn-modes.h is already included in $(CORETYPES_H) 2023-04-08 Jakub Jelinek <jakub@redhat.com> * Makefile.in (CORETYPES_H): Depend on align.h, poly-int.h and poly-int-types.h. (SYSTEM_H): Depend on $(HASHTAB_H). * config/riscv/t-riscv (build/genrvv-type-indexer.o): Remove unused dependency on $(RTL_BASE_H), remove redundant dependency on insn-modes.h.
2023-04-08Fortran: Fix some of the bugs in associate [PR87477]Paul Thomas13-41/+310
2023-04-08 Paul Thomas <pault@gcc.gnu.org> gcc/fortran PR fortran/87477 * iresolve.cc (gfc_resolve_adjustl, gfc_resolve_adjustr): if string length is deferred use the string typespec for result. * resolve.cc (resolve_assoc_var): Handle parentheses around the target expression. (resolve_block_construct): Remove unnecessary static decls. * trans-array.cc (gfc_conv_expr_descriptor): Guard string len expression in condition. Improve handling of string length and span, especially for substrings of the descriptor. (duplicate_allocatable): Make element type more explicit with 'eltype'. * trans-decl.cc (gfc_get_symbol_decl): Emit a fatal error with appropriate message instead of ICE if symbol type is unknown. (gfc_generate_function_code): Set current locus to proc_sym declared_at. * trans-expr.cc (gfc_get_expr_charlen): Retain last charlen in 'previous' and use if end expression in substring reference is null. (gfc_conv_string_length): Use gfc_conv_expr_descriptor if 'expr_flat' is an array. Add post block to catch deallocation of temporaries. (gfc_conv_procedure_call): Assign the parmse string length to the expression string length, if it is deferred. (gfc_trans_alloc_subarray_assign): If this is a deferred string length component, store the string length in the hidden comp. Update the typespec length accordingly. Generate a new type spec for the call to gfc_duplicate-allocatable in this case. * trans-io.cc (gfc_trans_transfer): Scalarize transfer of deferred character array components. gcc/testsuite/ PR fortran/87477 * gfortran.dg/associate_47.f90 : Enable substring test. * gfortran.dg/associate_51.f90 : Update an error message. * gfortran.dg/goacc/array-with-dt-2.f90 : Add span to uninitialzed dg-warnings. PR fortran/85686 PR fortran/88247 PR fortran/91941 PR fortran/92779 PR fortran/93339 PR fortran/93813 PR fortran/100948 PR fortran/102106 * gfortran.dg/associate_60.f90 : New test PR fortran/98408 * gfortran.dg/pr98408.f90 : New test PR fortran/105205 * gfortran.dg/pr105205.f90 : New test PR fortran/106918 * gfortran.dg/pr106918.f90 : New test
2023-04-08Fortran: Fix dg directives and remove trailing whitespaces in testsuitePaul Thomas23-72/+72
2023-04-08 Paul Thomas <pault@gcc.gnu.org> * gfortran.dg/c-interop/allocatable-optional-pointer.f90 : Fix dg directive and remove trailing whitespace. * gfortran.dg/c-interop/c407a-1.f90 : ditto * gfortran.dg/c-interop/c407b-1.f90 : ditto * gfortran.dg/c-interop/c407b-2.f90 : ditto * gfortran.dg/c-interop/c407c-1.f90 : ditto * gfortran.dg/c-interop/c535a-1.f90 : ditto * gfortran.dg/c-interop/c535a-2.f90 : ditto * gfortran.dg/c-interop/c535b-1.f90 : ditto * gfortran.dg/c-interop/c535b-2.f90 : ditto * gfortran.dg/c-interop/c535b-3.f90 : ditto * gfortran.dg/c-interop/c535c-1.f90 : ditto * gfortran.dg/c-interop/c535c-2.f90 : ditto * gfortran.dg/c-interop/deferred-character-1.f90 : ditto * gfortran.dg/c-interop/removed-restrictions-1.f90 : ditto * gfortran.dg/c-interop/removed-restrictions-2.f90 : ditto * gfortran.dg/c-interop/removed-restrictions-4.f90 : ditto * gfortran.dg/c-interop/tkr.f90 : ditto * gfortran.dg/class_result_10.f90 : ditto * gfortran.dg/dtio_35.f90 : ditto * gfortran.dg/gomp/affinity-clause-1.f90 : ditto * gfortran.dg/pr103258.f90 : ditto * gfortran.dg/pr59107.f90 : ditto * gfortran.dg/pr93835.f08 : ditto
2023-04-08Daily bump.GCC Administrator2-1/+6
2023-04-07mime: remove test ordering dependencyIan Lance Taylor1-1/+1
Backport CL 421442 from upstream. Original description: Arrange for tests that call setMimeInit to fully restore the old values, by clearing the sync.Once that controls initialization. Once we've done that, call initMime in initMimeUnixTest because otherwise the test types loaded there will be cleared by the call to initMime that previously was not being done. For golang/go#51648 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/483117
2023-04-07[testsuite] [ppc] skip ppc-fortran if fortran is disabledAlexandre Oliva1-0/+10
Skip ppc-fortran.exp if a trivial fortran program cannot be compiled. for gcc/testsuite/ChangeLog * gcc.target/powerpc/ppc-fortran/ppc-fortran.exp: Test for fortran compiler, skip if missing.
2023-04-07Daily bump.GCC Administrator4-1/+1267
2023-04-06arm: remove unused variables from testStam Markianos-Wright2-18/+0
This is just a minor issue I found with a previous test of mine that caused it to fail in C++ mode due to these unused const variables being uninitialised. I forgot to remove these after removing some test cases that did use them. I removed the test cases, because I came to the conclusion that the const-ness of the immediate was irrelevant to the test itself. Removing the variables now makes the test PASS for C++. gcc/testsuite/ChangeLog: * gcc.target/arm/mve/intrinsics/mve_intrinsic_type_overloads-fp.c: Remove unused variables. * gcc.target/arm/mve/intrinsics/mve_intrinsic_type_overloads-int.c: Remove unused variables.
2023-04-06arm: mve: fix auto-inc generation [PR107674]Richard Earnshaw1-3/+16
My change r13-416-g485a0ae0982abe caused the compiler to stop generating auto-inc operations on mve loads and stores. The fix is to check whether there is a replacement register available when in strict mode and the register is still a pseudo. gcc: PR target/107674 * config/arm/arm.cc (arm_effective_regno): New function. (mve_vector_mem_operand): Use it.
2023-04-06Check if dependency is valid before using in may_recompute_p.Andrew MacLeod2-1/+27
When the IL is rewritten after a statement has been processed and dependencies cached, its possible that an ssa-name in the dependency cache is no longer in the IL. Check this before trying to recompute. PR tree-optimization/109417 gcc/ * gimple-range-gori.cc (gori_compute::may_recompute_p): Check if dependency is in SSA_NAME_FREE_LIST. gcc/testsuite/ * gcc.dg/pr109417.c: New.
2023-04-06gccrs: Fix issue with parsing unsafe block expression statementsOwen Avery2-1/+16
gcc/rust/ChangeLog: * parse/rust-parse-impl.h (Parser::parse_stmt): Handle unsafe expression statements. gcc/testsuite/ChangeLog: * rust/compile/issue-1422.rs: New test. Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>