diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 2a4aa2dbb0389c9d130d7c5ea9f55412e7ffbbec..17239fd1e5ccc2440be5e261be4689a58ee48182 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-369e1efe19adfc5393d2235992327f39360e0554
+ec49c69df1df4d62f3751fcd7e930d6508d67bf2
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
diff --git a/gcc/go/gofrontend/gogo.cc b/gcc/go/gofrontend/gogo.cc
index daf2ba4cb0bfa728df34453325a4d945181d2f71..26f6441d5b16078d9fcaca1697b46e6bb2f8dfed 100644
--- a/gcc/go/gofrontend/gogo.cc
+++ b/gcc/go/gofrontend/gogo.cc
@@ -689,7 +689,13 @@ Gogo::init_imports(std::vector<Bstatement*>& init_stmts, Bfunction *bfunction)
 	 this->imported_init_fns_.begin();
        p != this->imported_init_fns_.end();
        ++p)
-    v.push_back(*p);
+    {
+      if ((*p)->priority() < 0)
+	go_error_at(Linemap::unknown_location(),
+		    "internal error: failed to set init priority for %s",
+		    (*p)->package_name().c_str());
+      v.push_back(*p);
+    }
   std::sort(v.begin(), v.end(), priority_compare);
 
   // We build calls to the init functions, which take no arguments.