The answer from international student advisor in my schhool: """Your OPT will not be denied just because you have a pending/approved H-1B application.However, sometimes a student's SEVIS record is improperly " completed" or "terminated" when an H-1B is approved, even though the record should remain "active" until (usually) October 1. Then we have to ask for the mistake to be corrected.""" The advisor told me that he has never seen an OPT application denied in such a situation, but he guesses it could conceivably happen. He also said that we should contact him when the H-1B is approved.
I asked a lawyer about this. She said H1B won't be effective until Oct 1, it won't affect OPT, even though you got an approval notice before Oct 1. But she suggested me to apply OPT first, then do H1B. Regarding this, I don' t know the reason. Probably the answer from the ISSS advisor is the reason.