Use -fipa-cp option to compile with g++