After comparing the PDF tables of SD7, titled "SD7 and SD80", and of SD-40, I was happy to find out that the SD-40 is NOT 100% identical to the SD-7, but even has MORE NEW sounds!

While voice banks A to D are completely identical (also regarding the additional features like S-stereo, M-multi and V-Varitone), bank E of the SD-7 is mostly empty except a few sounds. Bank E of the SD-40 is fully loaded with 128 sounds, e.g. "Mexican trumpet" not found in SD-7.

The 65 drum kits as well as the list of styles are 100% identical as far as I checked.