Is the T tapped (flap) in the compound noun: heart attack? I'm talking about the T in the word "heart".
The /t/ in heart will become a voiced tap in the string heart attack for many speakers of American Englishes. This means that the compound nouns heart attack and hard attack will be homophones. The /d/ in hard attack will also become a tap in this position for many speakers.
Syllable final /t/ is liable to become a tap for such speakers when at the end of a syllable and surrounded by vowels, or if preceding a vowel and following a voiced sonorant, in other words after a nasal or the liquid, /r/.
[In case anyone is wondering what a hard attack is, it's when we use a glottal stop before a word beginning with a vowel!]