While thinking about backporting this patch, I noticed a thinko: I was
applying SCALAR_TYPE_P to the expression itself, not its type. Oops.
Tested x86_64-pc-linux-gnu, applying to trunk.
commit 17f3af8efbf2fe2483fd922b42b30585a33095a9
Author: Jason Merrill
Date: Fri May 20 16:02:53 2011 -040
Here the issue was that build_new_1 wants to stabilize any constructor
arguments so that the EH region for deleting the allocated memory can be
as small as possible. But stabilize_expr was being over-eager, making a
copy of a class with trivial constructors, but a non-trivial (and indeed
non-c