This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/60336] empty struct value is passed differently in C and C++


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]