check-read-error.cpp: initial commit