This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/77676] powerpc64 and powerpc64le stage2 bootstrap fail
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 21 Sep 2016 14:00:58 +0000
- Subject: [Bug target/77676] powerpc64 and powerpc64le stage2 bootstrap fail
- Auto-submitted: auto-generated
- References: <bug-77676-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77676
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Perhaps it would be enough to just disable the pass for now (comment out in the
gate), so that the whole file isn't reverted.
It breaks i686-linux bootstrap as well, on the following testcase reduced from
vec.c:
struct A
{
const char *a;
int b;
const char *c;
};
void bar (char *);
void
foo (struct A *p)
{
char s[4096];
const char *u = p->a;
const char *t;
while ((t = __builtin_strstr (u, "gcc/")))
u = t + 4;
__builtin_sprintf (s, "%s:%i (%s)", u, p->b, p->c);
bar (s);
}
I'm getting with -O2 -Wformat-length -m32:
vec.c: In function ‘foo’:
vec.c:17:26: warning: ‘%s’ directive writing between 0 and 4294967295 bytes
into a region of size 4096 [-Wformat-length=]
__builtin_sprintf (s, "%s:%i (%s)", u, p->b, p->c);
^~
vec.c:17:3: note: format output between 6 and 4294967311 bytes into a
destination of size 4096
__builtin_sprintf (s, "%s:%i (%s)", u, p->b, p->c);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
while no warnings at -O2 -Wformat-length -m64.