PR20227: materialize a temporary when dynamic_casting a class prvalue to a
reference type.