The present invention relates to compounds of formula (I) or pharmaceutically acceptable salts thereof, wherein Q, G, ring A, ring B, R1, R2, R3, R4, R5, R5a, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, R16, R17, R18, R19, R20, R21, R22, R23, R24, and m are defined herein. The novel purine derivatives are useful in the treatment of abnormal cell growth, such as cancer, in mammals. Additional embodiments relate to pharmaceutical compositions containing the compounds and to methods of using the compounds and compositions in the treatment of abnormal cell growth in mammals.