The scene where the two hoods walk into the tavern to rob it, only to find that it's full of cops is based on an actual event that took place in an infamous after-hours bar on Chicago's near North Side where policemen gathered after their shifts. Among the cast are several veterans of the Chicago Police force including Dennis Farina.
The script was originally offered to Clint Eastwood as the fourth Dirty Harry film with a working title of "Dirty Harry IV: Code of Silence". but Eastwood turned it down. In 1979, the screenplay had been written and offered to Warner Bros., the studio that made the "Dirty Harry" movies. The fourth installment in that film franchise ended up being another movie instead which was Sudden Impact (1983). Eastwood already was working on Pale Rider (1985) the same year with the same screen writers of this film.
Actor Dennis Farina, who plays the cop Detective Dorato, was actually working as a real life police officer in Chicago, Illinois during the production of this picture.
After Dennis Farina gets shot and the ambulance is on the scene, you can see that one of the EMTs that lifts Farina into the ambulance is Lou Ferrigno.