diff --git a/contrib/gcc_build b/contrib/gcc_build
index 899ae3ecd08116c71693cb491f255240c2c56a71..722645ed10345e8a8b12cd0cb80bbb5a8298ebf3 100755
--- a/contrib/gcc_build
+++ b/contrib/gcc_build
@@ -287,9 +287,9 @@ fi
 
 # Validate the branch name.
 if test -n "${SVN_BRANCH}"; then
-    SVN_BRANCH="trunk";
-else
     SVN_BRANCH="branches/${SVN_BRANCH}";
+else
+    SVN_BRANCH="trunk";
 fi
 
 # Checkout the tree.