From 11.1.3.3 Other attributes of associate names
The associating entity does not have the ALLOCATABLE or POINTER attributes;
And from 11.1.11.1 Purpose and form of the SELECT TYPE construct
The associate name of a SELECT TYPE construct is the associate-name if specified; otherwise it is the name that constitutes the selector.
So your comment pointing out the error is correct. Within the body of the SELECT TYPE, a1 does not have the allocatable attribute.