All the faith he had had had had no effect on the outcome of his life.
Well, talk about lexical ambiguity. But as strange as this sentence might sound, it is actually grammatically correct. The sentence relies on a double use of the past perfect. The two instances of “had had” play different grammatical roles in the sentences—the first is a modifier while the second is the main verb of the sentence.
I don't understand the grammatical explanation given for this sentence. How does had had had had make sense and is grammatical? I understand that had had is correct, but not had had had had.