OK, I get that CDG-MAD was within Schengen, but that doesn't explain WBOTM's experience. Seems like somewhere it would be necessary to visit an immigration officer upon entering EU... especially when one of the points in the linked document on Schengen says, "a variety of measures have been taken as e.g. coordination of visa controls at the external borders".
Come to think of it, when I last did a US-->Schengen-->Schengen connection, I had to clear immigration at the final destination. It seems that's the implication here, that I'll do so at BCN. WBOTM, if you're still reading...have you at least been cleared at immigration at BCN, or is the CDG-BCN flight treated as purely "domestic"?