The present invention provides a prophylactic or therapeutic agent for irritable bowel syndrome, which comprises a compound represented by formula (I): wherein, R 1 represents an optionally substituted hydrocarbon group, etc., R 2 represents a hydrogen atom or an optionally substituted hydrocarbon group, R 3 represents a hydrogen atom, an optionally substituted hydrocarbon group, etc., X represents CHR 4 , NR 4 , CO, O or S (wherein, R 4 represents a hydrogen atom, an optionally substituted hydrocarbon group, etc.),Y represents C, CH or N, represents a single bond or double bond, ring A represents an optionally substituted 5- to 7-membered oxygen-containing heterocyclic ring, ring B represents an optionally substituted benzene ring, and m represents an integer of 1 to 4, or a salt thereof.