How do you pronounce gaol? If you are in Brunei, you might not know this spelling; but it occurs in the UK. Here is a street sign in Hereford:
In fact, it should be pronounced as /dʒeɪl/, and it is an alternative pronunciation for jail.
The problem with gaol is that it starts with 'ga', and when 'g' is followed by 'a', it is nearly always pronounced as /g/ (e.g. in gas, gap, gastric, gallant, gander, gain, gate, ...). Although 'g' can be pronounced as /dʒ/, this is only when it is followed by 'e', 'i', or 'y' (e.g. gender, generation, gel, gene; ginger, gin, Giles; gym, gyrate, gyroscope ...). Although most speakers of English are unable to state this rule explicitly, they subconsciously know it, which is why they do not expect gaol to be pronounced as /dʒeɪl/.
Although there are no residential properties on Gaol Street in Hereford, there are some offices in addition to the police station, and I was told that when people in those offices need to give their address, they often pronounce it as /gaʊl/, as saying /dʒeɪl/ is unlikely to be understood.
I suspect that the spelling jail may be a pronunciation spelling (in which the spelling of a word changes to reflect its pronunciation), but I need to check that. It is possible that gaol and jail have always been alternative spellings of the word.