A semilinear initial–boundary value problem with a Caputo time derivative of fractional order 𝛼 ∈ (0, 1) is considered, solutions of which typically exhibit a singular behaviour at an initial time. For an L2-type discretization of order 3 −𝛼, we give sharp pointwise-in-time error bounds on graded temporal meshes with arbitrary degree of grading.