  Let k be a field of characteristic zero, V a smooth, positive-dimensional,
quasiprojective variety over k, and D a nonempty effective divisor on V. Let K
be the function field of V, and A the semilocal ring of D in K.
  In this paper, we prove the Diophantine undecidability of:
  (1) A, in all cases;
  (2) K, when k is (formally) real and V has a real point;
  (3) K, when k is a subfield of a p-adic field, for some odd prime p.
  To achieve this, we use Denef's method: from an elliptic curve E over Q,
without complex multiplication, one constructs a quadratic twist E' of E over
Q(t), which has Mordell-Weil rank one. Most of the paper is devoted to proving
(using a theorem of R. Noot) that one can choose f in K, vanishing at D, such
that the group E'(K) deduced from the field extension K/Q(f)=Q(t) is equal to
E'(Q(t)). Then we mimic the arguments of Denef (for the real case) and of Kim
and Roush (for the p-adic case).
