aboutsummaryrefslogtreecommitdiff
path: root/gcc
AgeCommit message (Collapse)AuthorFilesLines
2023-02-06Daily bump.GCC Administrator3-1/+123
2023-02-05Fortran: ICE in transformational_result [PR108529]Harald Anlauf2-0/+10
gcc/fortran/ChangeLog: PR fortran/108529 * simplify.c (simplify_transformation): Do not try to simplify transformational intrinsic when the ARRAY argument has a NULL shape. gcc/testsuite/ChangeLog: PR fortran/108529 * gfortran.dg/pr108529.f90: New test. (cherry picked from commit 6c96382eed96a9285611f2e3e2e59557094172b8)
2023-02-05Fortran: error recovery for bad initializers of implied-shape arrays [PR106209]Harald Anlauf2-2/+22
gcc/fortran/ChangeLog: PR fortran/106209 * decl.c (add_init_expr_to_sym): Handle bad initializers for implied-shape arrays. gcc/testsuite/ChangeLog: PR fortran/106209 * gfortran.dg/pr106209.f90: New test. Co-authored-by: Steven G. Kargl <kargl@gcc.gnu.org> (cherry picked from commit 748f8a8b145dde59c7b63aa68b5a59515b7efc49)
2023-02-05Fortran: avoid ICE on invalid array subscript triplets [PR108501]Harald Anlauf2-7/+30
gcc/fortran/ChangeLog: PR fortran/108501 * interface.c (get_expr_storage_size): Check array subscript triplets that we actually have integer values before trying to extract with mpz_get_si. gcc/testsuite/ChangeLog: PR fortran/108501 * gfortran.dg/pr108501.f90: New test. (cherry picked from commit 771d793df1622a476e1cf8d05f0a6aee350fa56b)
2023-02-05Fortran: fix NULL pointer dereference in gfc_check_dependency [PR108502]Harald Anlauf2-0/+17
gcc/fortran/ChangeLog: PR fortran/108502 * dependency.c (gfc_check_dependency): Prevent NULL pointer dereference while recursively checking expressions. gcc/testsuite/ChangeLog: PR fortran/108502 * gfortran.dg/pr108502.f90: New test. (cherry picked from commit 51767f31878a95161142254dca7119b409699670)
2023-02-05Fortran: fix ICE in get_expr_storage_size [PR108421]Harald Anlauf2-1/+13
gcc/fortran/ChangeLog: PR fortran/108421 * interface.c (get_expr_storage_size): Check that we actually have an integer value before trying to extract it with mpz_get_si. gcc/testsuite/ChangeLog: PR fortran/108421 * gfortran.dg/pr108421.f90: New test. (cherry picked from commit a75760374ee54768e5fd6a27080698bfbbd041ab)
2023-02-05Fortran: fix ICE in check_charlen_present [PR108420]Harald Anlauf2-3/+16
gcc/fortran/ChangeLog: PR fortran/108420 * iresolve.c (check_charlen_present): Preserve character length if there is no array constructor. gcc/testsuite/ChangeLog: PR fortran/108420 * gfortran.dg/pr108420.f90: New test. (cherry picked from commit e6669c0a50ed8aee9e5997d61e6271668d149218)
2023-02-05Fortran: diagnose USE associated symbols in COMMON blocks [PR108453]Harald Anlauf2-0/+24
gcc/fortran/ChangeLog: PR fortran/108453 * match.c (gfc_match_common): A USE associated name shall not appear in a COMMON block (F2018:C8121). gcc/testsuite/ChangeLog: PR fortran/108453 * gfortran.dg/common_27.f90: New test. (cherry picked from commit aba9ff8f30d4245294ea2583de1dc28f1c7ccf7b)
2023-02-05Daily bump.GCC Administrator1-1/+1
2023-02-04Daily bump.GCC Administrator2-1/+9
2023-02-03varasm: Fix type confusion bugAlex Coplan1-1/+1
This patch fixes a type confusion bug in varasm.c:assemble_variable. The problem is that the current code calls: sect = get_variable_section (decl, false); and then accesses sect->named.name without checking whether the section is in fact a named section. In the surrounding else clause, we only know that SECTION_STYLE (sect) != SECTION_NOSWITCH, so it is possible that the section is an unnamed section. In practice, this means that we end up doing a wild string compare between a function pointer and the string literal ".vtable_map_vars". This is because sect->named.name aliases sect->unnamed.callback in the section union. This can be seen in GDB with a simple testcase such as "int x;". This patch fixes the issue by checking the SECTION_STYLE of the section is in fact SECTION_NAMED before trying to do the string comparison. We drop the existing check of whether sect->named.name is non-NULL because this should presumably always be the case for a named section. gcc/ChangeLog: * varasm.c (assemble_variable): Fix type confusion bug when checking for ".vtable_map_vars" section. (cherry picked from commit de144fdab17dbbb64ccb540056ab78b4ffb3fbbc)
2023-02-03Daily bump.GCC Administrator1-1/+1
2023-02-02Daily bump.GCC Administrator1-1/+1
2023-02-01Daily bump.GCC Administrator1-1/+1
2023-01-31Daily bump.GCC Administrator1-1/+1
2023-01-30Daily bump.GCC Administrator1-1/+1
2023-01-29Daily bump.GCC Administrator1-1/+1
2023-01-28Daily bump.GCC Administrator1-1/+1
2023-01-27Daily bump.GCC Administrator3-1/+84
2023-01-26restrict gcc.dg/pr107554.c to 64bit platformsRichard Biener1-1/+1
The following avoids exceeding the maximum object size on 32bit platforms. * gcc.dg/pr107554.c: Restrict to lp64. (cherry picked from commit e7ebdf51ea514ad0b2272ecfa97d6ec72a527e40)
2023-01-26tree-optimization/107554 - fix ICE in stlen optimizationRichard Biener2-1/+13
The following fixes a wrongly typed variable causing an ICE. PR tree-optimization/107554 * tree-ssa-strlen.c (strlen_pass::count_nonzero_bytes): Use unsigned HOST_WIDE_INT type for the strlen. * gcc.dg/pr107554.c: New testcase. Co-Authored-By: Nikita Voronov <nik_1357@mail.ru> (cherry picked from commit 81de4037454275f8ed6d858fbc129e832c6147ef)
2023-01-26tree-optimization/107323 - loop distribution partition ordering issueRichard Biener2-14/+64
The following reverts part of the PR94125 fix which causes us to use a bogus partition ordering after applying versioning for alias to the testcase in PR107323. Instead PR94125 is fixed by appropriately considering to be merged SCCs when skipping edges we want to ignore because of the alias versioning. PR tree-optimization/107323 * tree-loop-distribution.c (pg_unmark_merged_alias_ddrs): New function. (loop_distribution::break_alias_scc_partitions): Revert postorder save/restore from the PR94125 fix. Instead make sure to not ignore edges from SCCs we are going to merge. * gcc.dg/tree-ssa/pr107323.c: New testcase. (cherry picked from commit 09f9814dc02c161ed78604c6df70b19b596f7524)
2023-01-26tree-optimization/107107 - tail-merging VN wrong-codeRichard Biener2-14/+28
The following fixes an unintended(?) side-effect of the special MODIFY_EXPR expression entries we add for tail-merging during VN. We shouldn't value-number the virtual operand differently here. PR tree-optimization/107107 * tree-ssa-sccvn.c (visit_reference_op_store): Do not affect value-numbering when doing the tail merging MODIFY_EXPR lookup. * gcc.dg/pr107107.c: New testcase. (cherry picked from commit 85333b9265720fc4e49397301cb16324d2b89aa7)
2023-01-26tree-optimization/106934 - avoid BIT_FIELD_REF of bitfieldsRichard Biener2-0/+13
The following avoids creating BIT_FIELD_REF of bitfields in update-address-taken. The patch doesn't implement punning to a full precision integer type but leaves a comment according to that. PR tree-optimization/106934 * tree-ssa.c (non_rewritable_mem_ref_base): Avoid BIT_FIELD_REFs of bitfields. (maybe_rewrite_mem_ref_base): Likewise. * gfortran.dg/pr106934.f90: New testcase. (cherry picked from commit 05f5c42cb42c5088187d44cc45a5f671d19ad8c5)
2023-01-26Daily bump.GCC Administrator3-1/+39
2023-01-25[PATCH] aarch64: fix warning emission for ABI break since GCC 9.1Christophe Lyon15-6/+1132
While looking at PR 105549, which is about fixing the ABI break introduced in GCC 9.1 in parameter alignment with bit-fields, we noticed that the GCC 9.1 warning is not emitted in all the cases where it should be. This patch fixes that and the next patch in the series fixes the GCC 9.1 break. We split this into two patches since patch #2 introduces a new ABI break starting with GCC 13.1. This way, patch #1 can be back-ported to release branches if needed to fix the GCC 9.1 warning issue. The main idea is to add a new global boolean that indicates whether we're expanding the start of a function, so that aarch64_layout_arg can emit warnings for callees as well as callers. This removes the need for aarch64_function_arg_boundary to warn (with its incomplete information). However, in the first patch there are still cases where we emit warnings were we should not; this is fixed in patch #2 where we can distinguish between GCC 9.1 and GCC.13.1 ABI breaks properly. The fix in aarch64_function_arg_boundary (replacing & with &&) looks like an oversight of a previous commit in this area which changed 'abi_break' from a boolean to an integer. We also take the opportunity to fix the comment above aarch64_function_arg_alignment since the value of the abi_break parameter was changed in a previous commit, no longer matching the description. 2022-11-28 Christophe Lyon <christophe.lyon@arm.com> Richard Sandiford <richard.sandiford@arm.com> gcc/ChangeLog: * config/aarch64/aarch64.c (aarch64_function_arg_alignment): Fix comment. (aarch64_layout_arg): Factorize warning conditions. (aarch64_function_arg_boundary): Fix typo. * function.c (currently_expanding_function_start): New variable. (expand_function_start): Handle currently_expanding_function_start. * function.h (currently_expanding_function_start): Declare. gcc/testsuite/ChangeLog: * gcc.target/aarch64/bitfield-abi-warning-align16-O2.c: New test. * gcc.target/aarch64/bitfield-abi-warning-align16-O2-extra.c: New test. * gcc.target/aarch64/bitfield-abi-warning-align32-O2.c: New test. * gcc.target/aarch64/bitfield-abi-warning-align32-O2-extra.c: New test. * gcc.target/aarch64/bitfield-abi-warning-align8-O2.c: New test. * gcc.target/aarch64/bitfield-abi-warning.h: New test. * g++.target/aarch64/bitfield-abi-warning-align16-O2.C: New test. * g++.target/aarch64/bitfield-abi-warning-align16-O2-extra.C: New test. * g++.target/aarch64/bitfield-abi-warning-align32-O2.C: New test. * g++.target/aarch64/bitfield-abi-warning-align32-O2-extra.C: New test. * g++.target/aarch64/bitfield-abi-warning-align8-O2.C: New test. * g++.target/aarch64/bitfield-abi-warning.h: New test. (cherry picked from commit 3df1a115be22caeab3ffe7afb12e71adb54ff132)
2023-01-25Daily bump.GCC Administrator2-1/+10
2023-01-24driver: fix environ corruption after putenv() [PR106624]Sergei Trofimovich1-1/+1
The bug appeared afte r13-2010-g1270ccda70ca09 "Factor out jobserver_active_p" slightly changed `putenv()` use from allocating to non-allocating: -xputenv (concat ("MAKEFLAGS=", dup, NULL)); +xputenv (jinfo.skipped_makeflags.c_str ()); `xputenv()` (and `putenv()`) don't copy strings and only store the pointer in the `environ` global table. As a result `environ` got corrupted as soon as `jinfo.skipped_makeflags` store got deallocated. This started causing bootstrap crashes in `execv()` calls: xgcc: fatal error: cannot execute '/build/build/./prev-gcc/collect2': execv: Bad address The change restores memory allocation for `xputenv()` argument. gcc/ PR driver/106624 * gcc.c (driver::detect_jobserver): Allocate storage xputenv() argument using xstrdup(). (cherry picked from commit 2b403297b111c990c331b5bbb6165b061ad2259b)
2023-01-24Daily bump.GCC Administrator1-1/+1
2023-01-23Daily bump.GCC Administrator1-1/+1
2023-01-22Daily bump.GCC Administrator1-1/+1
2023-01-21Daily bump.GCC Administrator1-1/+1
2023-01-20Daily bump.GCC Administrator1-1/+1
2023-01-19Daily bump.GCC Administrator1-1/+1
2023-01-18Daily bump.GCC Administrator1-1/+1
2023-01-17Daily bump.GCC Administrator1-1/+1
2023-01-16Daily bump.GCC Administrator1-1/+1
2023-01-15Daily bump.GCC Administrator1-1/+1
2023-01-14Daily bump.GCC Administrator1-1/+1
2023-01-13Daily bump.GCC Administrator1-1/+1
2023-01-12Daily bump.GCC Administrator1-1/+1
2023-01-11Daily bump.GCC Administrator1-1/+1
2023-01-10Daily bump.GCC Administrator1-1/+1
2023-01-09Daily bump.GCC Administrator3-1/+20
2023-01-08Fortran: incorrect array bounds when bound intrinsic used in decl [PR108131]Harald Anlauf3-7/+30
gcc/fortran/ChangeLog: PR fortran/108131 * array.c (match_array_element_spec): Avoid too early simplification of matched array element specs that can lead to a misinterpretation when used as array bounds in array declarations. gcc/testsuite/ChangeLog: PR fortran/108131 * gfortran.dg/pr103505.f90: Adjust expected patterns. * gfortran.dg/pr108131.f90: New test. (cherry picked from commit 6a95f0e0a06d78d94138d4c3dd64d41591197281)
2023-01-08Daily bump.GCC Administrator1-1/+1
2023-01-07Daily bump.GCC Administrator2-1/+19
2023-01-06LTO: Prune some warnings in the testsuiteFrancois-Xavier Coudert1-0/+7
Warnings like: warning: using serial compilation of 2 LTRANS jobs warning: visibility attribute not supported in this configuration; ignored\[^\n\]*" $text "" text are pruned by lto.exp, but not for LTO testcases when run in other parts of the testsuite. They will be, now. gcc/testsuite/ChangeLog: PR testsuite/47334 PR testsuite/103823 * lib/prune.exp: Prune some warnings related to LTO and visibility. (cherry picked from commit 05edf6c470ae0ab50d42f16e78e476dbcc774842)
2023-01-06lto-wrapper: silent warnings in testsMartin Liska1-0/+3
Silents the following warning: lto-wrapper: warning: using serial compilation of 2 LTRANS jobs gcc/testsuite/ChangeLog: * lib/lto.exp: When running tests without jobserver, one can see the following warning for tests that use 1to1 partitioning. (cherry picked from commit fc186594e3ee86a57841442e96306dddfd8eb85d)
2023-01-06Daily bump.GCC Administrator3-1/+23