Wouldn't such a law stop Google from releasing Android as open source? AOSP cost hundreds of millions of dollars to develop, but it doesn't cost anything to use.
In such a world, could companies even contribute patches to Linux? Making Linux better without expectation of profit could be considered predatory pricing against Microsoft.