This is the mail archive of the gcc-patches@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]

[gccgo] Permit using "big" channel routines with small data


The "big" channel routines are used for data which more than 64 bits.
They are also used for structs, since the small channel routines
expect to send integers back and forth.  The "big" routines had
assertions which triggered when sending small structs.  This patch
removes those incorrect assertions.  Committed to gccgo branch.

Ian

diff -r ef07f240fcb0 libgo/runtime/go-rec-nb-big.c
--- a/libgo/runtime/go-rec-nb-big.c	Fri Jun 04 11:02:24 2010 -0700
+++ b/libgo/runtime/go-rec-nb-big.c	Sat Jun 05 10:16:17 2010 -0700
@@ -15,8 +15,6 @@
   size_t alloc_size;
   size_t offset;
 
-  assert (channel->element_size > sizeof (uint64_t));
-
   alloc_size = ((channel->element_size + sizeof (uint64_t) - 1)
 		/ sizeof (uint64_t));
 
diff -r ef07f240fcb0 libgo/runtime/go-send-nb-big.c
--- a/libgo/runtime/go-send-nb-big.c	Fri Jun 04 11:02:24 2010 -0700
+++ b/libgo/runtime/go-send-nb-big.c	Sat Jun 05 10:16:17 2010 -0700
@@ -15,8 +15,6 @@
   size_t alloc_size;
   size_t offset;
 
-  assert (channel->element_size > sizeof (uint64_t));
-
   alloc_size = ((channel->element_size + sizeof (uint64_t) - 1)
 		/ sizeof (uint64_t));
 

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