public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105523] Wrong warning array subscript [0] is outside array bounds Date: Mon, 12 Feb 2024 17:08:05 +0000 [thread overview] Message-ID: <bug-105523-4-Q606cYiCQp@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-105523-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523 --- Comment #36 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Georg-Johann Lay <gjl@gcc.gnu.org>: https://gcc.gnu.org/g:83e9075ed22c0c5f27328b4be7d8eb9df5c8778b commit r13-8319-g83e9075ed22c0c5f27328b4be7d8eb9df5c8778b Author: Senthil Kumar Selvaraj <saaadhu@gcc.gnu.org> Date: Mon Jun 19 12:23:25 2023 +0530 avr: Fix wrong array bounds warning on SFR access The warning was raised on accessing SFRs at addresses below the default page size, as gcc considers accessing addresses in the first page of memory as suspicious. This doesn't apply to an embedded target like the avr, where both flash and RAM have zero as a valid address. Zero is also a valid address in named address spaces (__memx, flash<n> etc..). This commit implements TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID for the avr target and reports to gcc that zero is a valid address on all address spaces. It also disables flag_delete_null_pointer_checks based on the target hook, and modifies target-supports.exp to add avr to the list of targets that always keep null pointer checks. This fixes a bunch of DejaGNU failures that occur otherwise. PR target/105523 gcc/ChangeLog: * common/config/avr/avr-common.cc: Remove setting of OPT_fdelete_null_pointer_checks. * config/avr/avr.cc (avr_option_override): Clear flag_delete_null_pointer_checks if zero_address_valid. (avr_addr_space_zero_address_valid): New function. (TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID): Provide target hook. gcc/testsuite/ChangeLog: * lib/target-supports.exp (check_effective_target_keeps_null_pointer_checks): Add avr. * gcc.target/avr/pr105523.c: New test. (cherry picked from commit 58e1bc2b1c8420773b16452d47932a6ca0d003fb)
next prev parent reply other threads:[~2024-02-12 17:08 UTC|newest] Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-08 12:12 [Bug c++/105523] New: " klaus.doldinger64 at googlemail dot com 2022-05-08 19:53 ` [Bug target/105523] " pinskia at gcc dot gnu.org 2022-05-09 4:00 ` klaus.doldinger64 at googlemail dot com 2022-05-09 4:54 ` klaus.doldinger64 at googlemail dot com 2022-05-09 6:59 ` klaus.doldinger64 at googlemail dot com 2022-05-11 11:50 ` rudi at heitbaum dot com 2022-10-21 5:57 ` lh_mouse at 126 dot com 2022-11-23 17:49 ` gjl at gcc dot gnu.org 2022-11-23 17:53 ` pinskia at gcc dot gnu.org 2022-11-23 17:56 ` pinskia at gcc dot gnu.org 2022-11-23 18:04 ` lh_mouse at 126 dot com 2022-11-23 18:07 ` pinskia at gcc dot gnu.org 2022-11-23 18:11 ` konrad at silmor dot de 2022-11-24 3:35 ` lh_mouse at 126 dot com 2022-12-07 6:32 ` ahmad at a3f dot at 2023-01-22 23:44 ` westfw at westfw dot info 2023-03-31 10:02 ` dcrocker at eschertech dot com 2023-03-31 20:32 ` pinskia at gcc dot gnu.org 2023-04-24 15:21 ` david at westcontrol dot com 2023-04-24 18:41 ` gjl at gcc dot gnu.org 2023-04-25 7:18 ` david at westcontrol dot com 2023-04-25 7:30 ` david at westcontrol dot com 2023-04-25 7:30 ` lh_mouse at 126 dot com 2023-04-25 7:46 ` david at westcontrol dot com 2023-04-25 16:30 ` pinskia at gcc dot gnu.org 2023-04-25 16:45 ` david at westcontrol dot com 2023-04-25 16:57 ` klaus.doldinger64 at googlemail dot com 2023-04-25 16:58 ` klaus.doldinger64 at googlemail dot com 2023-04-25 17:04 ` pinskia at gcc dot gnu.org 2023-04-25 19:02 ` gjl at gcc dot gnu.org 2023-04-25 19:07 ` konrad at silmor dot de 2023-04-28 5:17 ` lh_mouse at 126 dot com 2023-04-28 5:25 ` pinskia at gcc dot gnu.org 2023-06-19 8:23 ` cvs-commit at gcc dot gnu.org 2023-08-01 13:45 ` gjl at gcc dot gnu.org 2023-08-09 18:53 ` gjl at gcc dot gnu.org 2024-02-12 17:08 ` cvs-commit at gcc dot gnu.org [this message] 2024-02-12 17:10 ` gjl at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-105523-4-Q606cYiCQp@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).