[Bug bootstrap/93962] [10 regression] bootstrap fails with gcc/value-prof.c:268:28 : error: format '%lld' expects argument of type 'long long int', but argument 3 hastype 'int'

gerald at pfeifer dot com gcc-bugzilla@gcc.gnu.org
Wed Mar 4 16:12:00 GMT 2020


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

--- Comment #6 from Gerald Pfeifer <gerald at pfeifer dot com> ---
(In reply to Jeffrey A. Law from comment #3)
> Gerald, I wanted to reproduce the error so that I could in turn verify the
> proposed fix of using std:abs would work.

I verified that the fix of using std::abs works in the situation where I
had failures without.

> So I installed FreeBSD 11.3 (i686) in a VM.  Bootstrap with GCC went fine.  
> I couldn't get the failure building with clang either.

I looked into this.  Indeed my regular bootstraps do not fail, even without
this patch.

It is building the lang/gcc10-devel port, based on our weekly snapshots,
that exhibited this behavior.

> How are you configuring & building?

Are you familiar with the FreeBSD ports system?  The port resides in
ports/lang/gcc10-devel and to reproduce the issue you need to remove
ports/lang/gcc10-devel/files/patch-value-prof.c-buildfix that I added.

I have not found yet why a "regular" bootstrap succeeds and fails in
my environment when I build it as a port, but will try to dig into it
this evening.

> So while I believe Andrew is right that this should be using std::abs, I'd
> still like to reproduce the problem and verify that using std::abs is
> sufficient to fix.

The fix is confirmed, and part of the FreeBSD ports tree now.  However, I
am not yet able to explain why it does occur in one case and not in the
other.


More information about the Gcc-bugs mailing list