Does sugar inhibit mold growth?
Water activity is the big issue in preventing microorganism growth in sugary solutions.

Water Activity of Foods Table     Includes limit points for various types of bugs. A few molds will grow down to 0.60Aw.

Another foods Aw table

Water Activity of Sucrose and NaCl Solutions     From which: 180 g sucrose + 100 g water will give you a 64% sucrose solution. That'll have a water activity of 0.87, which is low enough to prevent proliferation of most bacteria, but not molds or quite, yeasts.

Oh yes, the question: A water activity below 0.8 will prevent growth of most molds, so at room temp. your syrup (Aw ~.85) will likely eventually pick up some mold, but not much in the way of bacteria.