Well, contrary to my initial thoughts I found that it was indeed that the class A had been registered incorrectly. Even though this class doesn't have it's own destructor, copy constructor, or assignment operator it should still be registered with the flags asOBJ_APP_CLASS_CDAK. Why? Because the member 'string text' has all of these.
Even I wasn't aware of this, and I'll have to update the manual with this new knowledge.
I'm not sure why this didn't break with MinGW 4.4.1, as I don't have that version of MinGW to test with. But I did test it with MinGW 4.6.2 and it also failed in the same way as MinGW 4.7.1 so this was not related to the ABI changes that were made in MinGW 4.7.
The new asGetTypeTraits<type>() helper function that you helped me implement returns the correct flags.
int r = engine->RegisterObjectType("A", sizeof(A), asOBJ_VALUE | asGetTypeTraits<A>()); assert( r >= 0 );