The carbostyril compounds of the formula (II) wherein R1 represents R1 ' which represents a group as defined by R1 except for a hydrogen atom and R2 represents R2 ' which is as defined above, can be prepared by reacting a compound of the formula (VII) with a 2,3-dihydropyran of the formula (VIII) to produce a tetrahydropyranyl compound of the formula (IX) wherein the hydroxyl group at the 5-positi