This patch to the Go frontend gives an error if a file attempts to
import the same package twice under the same name. Bootstrapped and ran
Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline and 4.7
branch.
Ian
diff -r c6d54ab88baf go/gogo.cc
--- a/go/gogo.cc Thu May 03 10:39:39 2012 -0700
+++ b/go/gogo.cc Thu May 03 22:20:07 2012 -0700
@@ -4946,11 +4946,6 @@
break;
case Named_object::NAMED_OBJECT_PACKAGE:
- if (new_object->is_package()
- && (old_object->package_value()->name()
- == new_object->package_value()->name()))
- return old_object;
-
break;
}