US credit downgrade risk grows as debt hits $40 trillion