TITLE: Looking for an example of a GCD domain which is not a UFD
QUESTION [13 upvotes]: I know that every UFD (unique factorization domain) is a GCD domain i.e. g.c.d. of any two elements, not both zero, exists in the domain. 

I am looking for an example of a GCD domain which is not a UFD. 

I have not been able to find mainly for the difficulty that in a GCD domain every irreducible must be a prime and all the examples of non-UFD's I know, in them some irreducible is not prime. 
So please help. Thanks in advance.

REPLY [4 votes]: An example is the ring of holomorphic functions $\mathcal O(\Bbb C)$. This is a Bézout domain, so a GCD domain. It is not a UFD since the irreducible elements are linear polynomials, but there are holomorphic functions with infinitely many roots. Since $\mathcal O(\Bbb C)$ is not noetherian (for example, the ideal that of functions that vanish on a finite subset of $\Bbb Z$ is not finitely generated), so it is not a PID (this can be deduced from the fact it is not a UFD, however).
Add I realize this has given as an example above. In fact
Wedderburn's Lemma Given $f,g\in \mathcal O(\Bbb C)$ that are relatively prime  there always exist $h,k\in \mathcal O(\Bbb C)$ such that $fh+gk=1$. Thus given finitely many entire $f_1,\ldots,f_r$ and a gcd $f$, there always exist entire $g_i$ such that $f_1g_1+\dots+f_rg_r=f$.