The C++ front end sets DECL_EXTERNAL on functions and variables with vague linkage during most of compilation, and then clears the flag at EOF if we actually want to emit them. But we were failing to clear DECL_EXTERNAL in the case of inlines that we are emitting because of -fkeep-inline-functions. Tested x86_64-pc-linux-gnu, applying to trunk.