http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
H.J. Lu <hjl.tools at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hjl.tools at gmail dot com --- Comment #16 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Jason Merrill from comment #15) > (In reply to Andrew Pinski from comment #7) > > No this testcase is not valid at all. See > > http://gcc.gnu.org/onlinedocs/gcc-4.8.2/gcc/Empty-Structures.html#Empty- > > Structures where it is documented it is not valid. > > That only documents that sizeof is different for C and C++, the calling > convention should be the same. And it seems like classify_argument should > already be returning 1 with classes[0]==NO_CLASS for both C and C++. Why > are we getting different results? X86 backend has some issues. But the C/C++ calling convention issue affects most, if not all, targets. You can try the test case in comment 4 on non-x86 targets.