Coral reefs will stop growing and many will start to erode if global warming hits 2°C, according to a new study of 400 sites.