Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile: bad position information for inlined functions #21184
In the objdump output below, we see "q.go:3", which is nonsensical because this is the import statement's line number.
This happens because these instructions are getting their position information from the p.t struct literal's field initializers, but we're currently failing to serialize position information for OSTRUCTKEY. As a result, the nod(OSTRUCTKEY, ...) calls in bimport.go instead inherit the import statement's position information from lineno.
There are a handful of other nod calls (e.g., the OCONV nodes for importing OLITERALs, and the OIND and OADDR for importing OPTRLITs). These should all use explicit position information instead.