Forests can cope in a warming world only if temperatures increase in line with rises in CO2, a study finds.