public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@golang.org>
To: Nikhil Benesch <nikhil.benesch@gmail.com>
Cc: Rainer Orth <ro@cebitec.uni-bielefeld.de>,
	gcc-patches <gcc-patches@gnu.org>,
	 gofrontend-dev <gofrontend-dev@googlegroups.com>
Subject: Re: [PATCH] Correct -fdump-go-spec's handling of incomplete types
Date: Mon, 14 Dec 2020 19:34:12 -0800	[thread overview]
Message-ID: <CAKOQZ8zaD=zO5coR422KMRoMFOWq3dvCK0LMCkK2AQ_mg-CAgg@mail.gmail.com> (raw)
In-Reply-To: <fb430481-3e73-e733-cec7-efbe0778571b@gmail.com>

On Mon, Dec 14, 2020 at 7:14 PM Nikhil Benesch <nikhil.benesch@gmail.com> wrote:
>
> On 12/14/20 5:30 AM, Rainer Orth wrote:
> > with the revised godump.c patch and this one for mk*sysinfo.sh, I still
> > get failures on all of Solaris 11.3/x86, 11.4/x86, and 11.4/SPARC
> > (didn't try 11.3/SPARC):
> >
> > * Solaris 11.3/x86 and 11.4/x86:
> >
> > runtime_sysinfo.go:5995:6: error: redefinition of '_upad128_t'
> >
> >    gen-sysinfo has
> >
> > // type _upad128_t struct { _q INVALID-float-80; Godump_0_pad [4]byte; }
> > type _upad128_t struct {}
> >
> >    and mk*sysinfo.sh adds
> >
> > type _upad128_t struct { _l [4]uint32; }
> >
> > * Solaris 11.4/SPARC and x86:
> >
> > runtime_sysinfo.go:1178:55: error: use of undefined type '_in6_addr_t'
> >
> >    runtime_sysinfo.go uses _in6_addr_t in _flow_arp_desc_s,
> >    _flow_l3_desc_s, _mac_ipaddr_s, _mac_resource_props_s, and
> >    _mactun_info_s, but there's no definition and you've removed the
> >    section of mk*sysinfo.sh to replace it by [16]byte.
> >
> >    The issue is here, I believe:
> >
> > +      -e 's/\([^a-zA-Z0-9_]\)_in6_addr\([^a-zA-Z0-9_]\)/\1[16]byte\2/g' \
> > +      -e 's/\([^a-zA-Z0-9_]\)_in6_addr$/\1[16]byte/g' \
> >
> >    Neither line matches _in6_addr_t.  Removing '_' from the second char
> >    set on the first line fixes this, but I'm unsure what exactly this is
> >    going to match on different systems.
> >
> >       Rainer
> >
>
> Sigh. Thanks. Perhaps the attached will work.
>
> (I'm still waiting on my own compilation to complete. Compilation on
> gcc211 is glacial. I wonder if I'm doing something wrong.)
>
> The idea is to just rewrite both _in_addr and _in_addr_t. Perhaps
> someone smarter than me can figure out how to write a simpler set
> of basic REs.
>
> Also godump now emits a dummy `type _u?pad128_t struct {}` entry,
> so we just suppress that and conditionally add it back.

I don't understand this bit.  Why are we seeing an empty struct
definition, and why is this change the right fix?

Is the problem that because we don't know how to emit the definition
of the struct, godump.c winds up emitting an empty definition?  That
doesn't sound like the right thing to do for this case.

Ian

  reply	other threads:[~2020-12-15  3:34 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-08 22:57 Nikhil Benesch
2020-12-10  2:48 ` Ian Lance Taylor
2020-12-10 19:18   ` Rainer Orth
2020-12-10 19:31     ` Nikhil Benesch
2020-12-10 19:34       ` Rainer Orth
2020-12-10 19:49         ` Nikhil Benesch
2020-12-10 21:44           ` Rainer Orth
2020-12-13 21:55             ` Nikhil Benesch
2020-12-13 23:30               ` Nikhil Benesch
2020-12-14  7:39                 ` Ian Lance Taylor
2020-12-14  8:22                   ` Nikhil Benesch
2020-12-14 10:30               ` Rainer Orth
2020-12-15  3:14                 ` Nikhil Benesch
2020-12-15  3:34                   ` Ian Lance Taylor [this message]
2020-12-15  3:48                     ` Nikhil Benesch
2020-12-15  8:00                       ` Nikhil Benesch
2020-12-16 14:00                         ` Nikhil Benesch
2020-12-16 19:20                           ` Rainer Orth
2020-12-16 20:13                             ` Nikhil Benesch
2020-12-17  4:59                               ` Nikhil Benesch
2020-12-17 12:28                                 ` Rainer Orth
2020-12-17 16:31                                   ` Nikhil Benesch
2020-12-17 18:05                                     ` Ian Lance Taylor
2020-12-17 18:21                                       ` Nikhil Benesch
2020-12-21  4:16                                         ` Ian Lance Taylor

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

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

  git send-email \
    --in-reply-to='CAKOQZ8zaD=zO5coR422KMRoMFOWq3dvCK0LMCkK2AQ_mg-CAgg@mail.gmail.com' \
    --to=iant@golang.org \
    --cc=gcc-patches@gnu.org \
    --cc=gofrontend-dev@googlegroups.com \
    --cc=nikhil.benesch@gmail.com \
    --cc=ro@cebitec.uni-bielefeld.de \
    /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).