This doesn't sound right. I believe simple algorithms with well defined limits always work, because that's their nature. But sometimes the dungeon generation is too complex and layered for everything to work in all possible situations. Even then there are ways to prevent the generation of totally unplayable levels.
This is of course assuming you know exactly what is going on in the compiler and the compiler itself is guaranteed to be absolutely bug free, that all the supporting libraries are bug free, that the OS doesn't have any bugs in it ...
A simple Hello World program in reality is not so simple and is dependent upon a large chain of events that have started long before you wrote a single line of code. Many people seem to forget that compilers, libraries, OSes are programs too, and are subject to the same problems as any program. A problem in any part of the chain that ends in your simple Hello World program can affect this simple algorithm.
This is why you can never say with absolute certainty that any algorithm, even a Hello World, will operate correctly in every case.