public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/102630] New: [12 Regression] Spurious -Warray-bounds with named address space
@ 2021-10-06 16:15 jsm28 at gcc dot gnu.org
  2021-10-06 17:01 ` [Bug middle-end/102630] " msebor at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2021-10-06 16:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102630

            Bug ID: 102630
           Summary: [12 Regression] Spurious -Warray-bounds with named
                    address space
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jsm28 at gcc dot gnu.org
                CC: msebor at gcc dot gnu.org
  Target Milestone: ---
            Target: x86_64-*-*

Created attachment 51560
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51560&action=edit
preprocessed source

This is the issue breaking building glibc for x86_64 with current mainline GCC
(since July), as previously discussed in threads starting at
https://gcc.gnu.org/pipermail/gcc/2021-July/236922.html and
https://gcc.gnu.org/pipermail/gcc/2021-July/236933.html (discussion continues
into August).

Compile the attached file with -O2 -Wall -Werror and get the errors:

loadmsgcat.c: In function '_nl_load_domain':
loadmsgcat.c:770:22: error: array subscript 0 is outside array bounds of
'__seg_fs struct pthread * __seg_fs[0]' [-Werror=array-bounds]

As discussed in the previous discussions, the code generating this
-Warray-bounds warning needs to check targetm.addr_space.zero_address_valid to
determine whether zero or small constant addresses are valid in the given
address space (there's already a suitable definition of that hook for x86, but
the warning is failing to check it).

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-10-13 17:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-06 16:15 [Bug middle-end/102630] New: [12 Regression] Spurious -Warray-bounds with named address space jsm28 at gcc dot gnu.org
2021-10-06 17:01 ` [Bug middle-end/102630] " msebor at gcc dot gnu.org
2021-10-06 17:18 ` joseph at codesourcery dot com
2021-10-06 17:55 ` msebor at gcc dot gnu.org
2021-10-06 22:53 ` msebor at gcc dot gnu.org
2021-10-06 23:10 ` msebor at gcc dot gnu.org
2021-10-07  2:00 ` msebor at gcc dot gnu.org
2021-10-09 18:44 ` msebor at gcc dot gnu.org
2021-10-13 16:34 ` cvs-commit at gcc dot gnu.org
2021-10-13 17:09 ` msebor at gcc dot gnu.org

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).