According to [Using .toc external files](https://tex.stackexchange.com/q/211419/18401), the following file should display the table of contents twice:

```
\documentclass{report}
\begin{document}
\tableofcontents
\chapter*{Contents (manual input)}
\makeatletter
\input{\jobname.toc}
\makeatother
\chapter{Foo}
\section{Bar}
\end{document}

```

but the manual input of `\jobname.toc` is empty.

If `\jobname.toc` does exist (e.g. after a first compilation of the previous `.tex` file), this manual input gives the expected (non empty) result as soon as are removed or commented:

* either `\tableofcontents`,
* or `\chapter{Foo}`.

Do you understand what's going on?