Look up the vehicle code for your state and see what it says. In PA, bicycles are vehicles so all of the same laws apply unless bicycles are specifically excluded (such as shoulder riding, not having to pull off the road to let faster traffic move past, riding on the sidewalk, etc.). I'm pretty sure most states operate the same way.
So for your example, yes it would be an illegal u-turn. But as many others have posted, the police aren't going to care as long as it was safe to do so.