Methylation of 5,7-dihydro-4H-pyrano[2,3-d:6,5-d']dipyrimidine-4,6(3H)-dione and its 5-phenyl analog with dimethyl sulfate in the presence of LiOH in aqueous solution gives rise to the corresponding 3,7-dimethyl derivatives. The same isomers are formed by methylation of 5-phenyl-5,7-dihydro-4H-pyrano[2,3-d:6,5-d']dipyrimidine-4,6(3H)-dione with methyl iodide in the presence of K2CO3 in N,N-dimethylacetamide. However, with ethyl bromide, propyl iodide, or butyl bromide instead of methyl iodide, mixtures of 3,7- and 1,7-dialkyl-5-phenyl-5,7-dihydro-4H-pyrano[2,3-d:6,5-d']dipyrimidine-4,6-diones were obtained.