[Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap

2023-06-29 Thread ro at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073

Rainer Orth  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #11 from Rainer Orth  ---
Solaris is fine, so I think we're good.

[Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap

2023-06-29 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073

--- Comment #10 from Iain Sandoe  ---
this is fixed, at least on Darwin, right?
is there some failing case remaining on Solaris or can we close this?

[Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap

2023-06-02 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073

--- Comment #9 from David Faust  ---
(In reply to Alex Coplan from comment #8)
> Thanks for the follow-up fix and apologies for the mid-air collision, I
> didn't see the %zu problem on the target I was testing.

No problem, thanks for the fixes :) I'm slow on the patch formatting etc.
Hopefully these are all taken care of now between the two patches.

[Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap

2023-06-02 Thread acoplan at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073

Alex Coplan  changed:

   What|Removed |Added

 CC||acoplan at gcc dot gnu.org

--- Comment #8 from Alex Coplan  ---
Thanks for the follow-up fix and apologies for the mid-air collision, I didn't
see the %zu problem on the target I was testing.

[Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap

2023-06-02 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073

--- Comment #7 from CVS Commits  ---
The master branch has been updated by David Faust :

https://gcc.gnu.org/g:934da923a7295ae97e37425e269195c7d8770ef0

commit r14-1504-g934da923a7295ae97e37425e269195c7d8770ef0
Author: David Faust 
Date:   Fri Jun 2 09:28:32 2023 -0700

btf: fix bootstrap -Wformat errors [PR110073]

Commit 7aae58b04b9 "btf: improve -dA comments for testsuite" broke
bootstrap on a number of architectures because it introduced some
new -Wformat errors.

Fix those errors by properly using PRIu64 and a small refactor to
the offending code.

Based on the suggested patch from Rainer Orth.

PR debug/110073

gcc/ChangeLog:

* btfout.cc (btf_absolute_func_id): New function.
(btf_asm_func_type): Call it here.  Change index parameter from
size_t to ctf_id_t.  Use PRIu64 formatter.

[Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap

2023-06-02 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073

--- Comment #6 from David Faust  ---
(In reply to Iain Sandoe from comment #5)
> (In reply to David Faust from comment #4)
> > (In reply to Iain Sandoe from comment #3)
> > > (In reply to Iain Sandoe from comment #2)
> > > > there seems to be a second fail on x86_64 darwin on line 970.
> > > 
> > > I tried the alternate patch on a number of x86_64, i686 and power Darwin
> > > systems and bootstrap is restored.
> > 
> > Thanks for confirming. I'll go ahead and send it to the list.
> 
> I think with bootstrap fixes, you are allowed a bit more independence - i.e.
> can go ahead and apply - but now needs resolution with Alex's patch,

OK, thanks. And yes I just ran into the conflict. Rebasing now.

[Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap

2023-06-02 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073

--- Comment #5 from Iain Sandoe  ---
(In reply to David Faust from comment #4)
> (In reply to Iain Sandoe from comment #3)
> > (In reply to Iain Sandoe from comment #2)
> > > there seems to be a second fail on x86_64 darwin on line 970.
> > 
> > I tried the alternate patch on a number of x86_64, i686 and power Darwin
> > systems and bootstrap is restored.
> 
> Thanks for confirming. I'll go ahead and send it to the list.

I think with bootstrap fixes, you are allowed a bit more independence - i.e.
can go ahead and apply - but now needs resolution with Alex's patch,

[Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap

2023-06-02 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073

--- Comment #4 from David Faust  ---
(In reply to Iain Sandoe from comment #3)
> (In reply to Iain Sandoe from comment #2)
> > there seems to be a second fail on x86_64 darwin on line 970.
> 
> I tried the alternate patch on a number of x86_64, i686 and power Darwin
> systems and bootstrap is restored.

Thanks for confirming. I'll go ahead and send it to the list.

[Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap

2023-06-02 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073

--- Comment #3 from Iain Sandoe  ---
(In reply to Iain Sandoe from comment #2)
> there seems to be a second fail on x86_64 darwin on line 970.

I tried the alternate patch on a number of x86_64, i686 and power Darwin
systems and bootstrap is restored.

[Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap

2023-06-02 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073

Iain Sandoe  changed:

   What|Removed |Added

   Last reconfirmed||2023-06-02
 Ever confirmed|0   |1
 CC||iains at gcc dot gnu.org
 Target|i386-pc-solaris2.11 |i386-pc-solaris2.11,
   ||x86_64-apple-darwin*
 Status|UNCONFIRMED |NEW

--- Comment #2 from Iain Sandoe  ---
there seems to be a second fail on x86_64 darwin on line 970.

[Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap

2023-06-01 Thread david.faust at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073

--- Comment #1 from David Faust  ---
Created attachment 55234
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55234=edit
alternate proposed patch

Thank you for catching this, and for the fix!

With the proposed patch on linux x86_64 I see the following:

../../../gcc/gcc/btfout.cc: In function ‘void
btf_asm_func_type(ctf_container_ref, ctf_dtdef_ref, size_t)’:
../../../gcc/gcc/btfout.cc:952:31: warning: format ‘%u’ expects argument of
type ‘unsigned int’, but argument 4 has type ‘size_t’ {aka ‘long unsigned int’}
[-Wformat=]
  952 |"TYPE %u BTF_KIND_FUNC '%s'",
  |  ~^
  |   |
  |   unsigned int
  |  %lu
  953 |num_types_added + num_vars_added + 1 + i,
  |
  | |
  | size_t {aka
long unsigned int}

I believe %zu instead of %u should work.

Alternatively, a small refactor to the offending code makes it behave in line
with the other functions (to properly use a ctf_id_t, and then PRIu64 as in
your patch). But I haven't verified this on solaris/x86 yet.

[Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap

2023-06-01 Thread ro at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073

Rainer Orth  changed:

   What|Removed |Added

   Target Milestone|--- |14.0