The key places of frame/component compatibilty are at the bottom bracket, headset, Brake type and position or reach and seat post.
Most likely the BB will fit, but someone might throw you a curve with a 73mm BB,
Headsets used to be easy, all you had to do was make sure one wasn't JIS, but these days even though both are probably for 1-1/8" forks, but these days there are almost as many incompatible headsets as front derailleurs.
Brakes, have to match, ie. disc, canti, or caliper, and the reach of a caliper has to match
We all know how seatposts are all over the board. If they're not both 27.2, who knows.
Then there's other details like tire width/clearance, front derailleur braze, or clamp diameter.
Lastly, depending on changes in geometry, there's a good chance that though the stem cam be moved over, you won't want to.
I listed the most common issues, odds are you'll face one, but you'd have to be awfully unlucky to have 3 or more issues.
__________________
FB
Chain-L site
An ounce of diagnosis is worth a pound of cure.
Just because I'm tired of arguing, doesn't mean you're right.
“One accurate measurement is worth a thousand expert opinions” - Adm Grace Murray Hopper - USN
WARNING, I'm from New York. Thin skinned people should maintain safe distance.