This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/60336] empty struct value is passed differently in C and C++
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 26 Feb 2014 19:32:46 +0000
- Subject: [Bug target/60336] empty struct value is passed differently in C and C++
- Auto-submitted: auto-generated
- References: <bug-60336-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #11 from H.J. Lu <hjl.tools at gmail dot com> ---
This patch may be better:
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 00773d8..426146a 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -6842,7 +6842,7 @@ examine_argument (enum machine_mode mode, const_tree
type, int in_return,
case X86_64_MEMORY_CLASS:
gcc_unreachable ();
}
- return 1;
+ return *int_nregs || *sse_nregs;
}
/* Construct container for the argument used by GCC interface. See