This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Go patch committed: fix package initialization order when testing


https://golang.org/issue/15738 points out a bug in the Go frontend:
package priorities are mishandled when using 'go test', such that it
is possible for the packages to be initialized in the wrong order.
The basic problem is that the current package priority system is too
simple, and does not support constructing the correct initialization
order when the test code for a package imports some package the
imports the package being tested.  This patch by Than McIntosh fixes
the problem by changing the export data to record not simply a single
priority, but a graph of package dependencies.  Then when compiling
the main package the compiler uses that graph to initialize the
packages in the correct order.  Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu.  Committed to mainline.

Ian

Attachment: patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]