An M/G/1 queue with dependence between interarrival and service times