unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Martin Sebor via Libc-alpha <libc-alpha@sourceware.org>
To: Joseph Myers <joseph@codesourcery.com>
Cc: GCC Mailing List <gcc@gcc.gnu.org>,
	Martin Sebor <msebor@redhat.com>,
	libc-alpha@sourceware.org
Subject: Re: Failures building glibc with mainline GCC
Date: Tue, 3 Aug 2021 16:33:01 -0600	[thread overview]
Message-ID: <2ae709a5-5edf-268b-a7d1-7b8bc7ab3655@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2108031713210.18028@digraph.polyomino.org.uk>

On 8/3/21 11:21 AM, Joseph Myers wrote:
> On Tue, 3 Aug 2021, Martin Sebor via Gcc wrote:
> 
>> Yes, we know about that one.  What I'm asking for is the translation
>> units with the other warnings you showed with the latest GCC (including
>> the threader patches) on the other targets (including i686 and power).
>> I don't have an easy way to create them using my setup.
> 
> I've attached (all gzipped) hurdselect.i (i686-gnu, -O2 -Wall -Werror
> -Wno-parentheses):

Thanks.

> 
> hurdselect.c: In function '_hurd_select':
> hurdselect.c:555:7: error: 'ss' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> hurdselect.c:70:25: note: 'ss' was declared here

This is a false positive caused by the overly restrictive analysis
limits hardwired into GCC (like PR 85872).  I have a patch that
relaxes the limits and that avoids the warning in this case but
it's not yet ready.

> 
> and t.61.i (powerpc-linux-gnu, -O2 -Wall -Werror):
> 
> In file included from t.61.c:437:
> In function 'from_t_61_single',
>      inlined from 'gconv' at ../iconv/skeleton.c:568:15:
> ../iconv/loop.c:440:22: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
> In file included from t.61.c:437:
> ../iconv/loop.c: In function 'gconv':
> ../iconv/loop.c:382:17: note: at offset 2 into destination object 'bytebuf' of size 2

This is the same warning as Jeff noted on s390-linux-gnu and that
I explained in my reply:
   https://gcc.gnu.org/pipermail/gcc/2021-July/236943.html
There's nothing the warning alone can do to avoid triggering in these
cases (unrolling too many iterations of a loop).  The unroller does
have code to avoid doing this (infer_loop_bounds_from_undefined) but
it's not good enough.  Using -fno-aggressive-loop-optimizations
prevents the warning.

> and dl-tls.i (powerpc64-linux-gnu, -O2 -finline-limit=2000 -Wall -Werror;
> the -finline-limit=2000 option is necessary for the error and comes from
> sysdeps/powerpc/powerpc64/Makefile):
> 
> In file included from ../sysdeps/powerpc/dl-tls.c:20:
> In function '_dl_allocate_tls_init',
>      inlined from '_dl_allocate_tls' at ../elf/dl-tls.c:621:10:
> ../elf/dl-tls.c:529:10: error: array subscript -1 is outside array bounds of 'void[9223372036854775807]' [-Werror=array-bounds]
> ../elf/dl-tls.c:544:40: error: array subscript -1 is outside array bounds of 'void[9223372036854775807]' [-Werror=array-bounds]
> 

These warnings are reproducible even with a native x86_64 compiler
and the same option.  It's most likely due to the same root cause
as PR 101600 (the one in comment #0, not comment #2).  I don't have
a fix for it yet but it shouldn't be too hard.

Martin

  parent reply	other threads:[~2021-08-03 22:35 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-30 15:30 Failures building glibc with mainline GCC Joseph Myers
2021-07-30 16:19 ` Aldy Hernandez via Libc-alpha
2021-07-30 16:22   ` Jeff Law via Libc-alpha
2021-07-30 16:45   ` Jeff Law via Libc-alpha
2021-07-30 17:28     ` Martin Sebor via Libc-alpha
2021-07-30 20:52   ` Joseph Myers
2021-08-02 20:20     ` Martin Sebor via Libc-alpha
2021-08-03 15:54       ` Joseph Myers
2021-08-03 16:20         ` Martin Sebor via Libc-alpha
2021-08-03 17:21           ` Joseph Myers
2021-08-03 17:39             ` Samuel Thibault via Libc-alpha
2021-08-03 22:33             ` Martin Sebor via Libc-alpha [this message]
2021-08-03 20:50           ` Segher Boessenkool
2021-08-03 21:00             ` Joseph Myers
2021-08-03 22:02               ` Segher Boessenkool
2021-08-03 22:59               ` Martin Sebor via Libc-alpha
2021-07-30 16:38 ` Joseph Myers
2021-07-30 16:43   ` Jakub Jelinek via Libc-alpha
2021-07-30 16:53 ` Martin Sebor via Libc-alpha
2021-07-30 17:02   ` Jakub Jelinek via Libc-alpha

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

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2ae709a5-5edf-268b-a7d1-7b8bc7ab3655@gmail.com \
    --to=libc-alpha@sourceware.org \
    --cc=gcc@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    --cc=msebor@gmail.com \
    --cc=msebor@redhat.com \
    /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: link
Be 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).