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]

Go patch committed: Layout undefined type


In the Go frontend I forgot to actually layout an empty struct
representing an undefined type.  This caused a crash in some code which
expected TYPE_SIZE_UNIT to be valid.  This patch fixes the problem.
Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu.
Committed to mainline.

Ian

diff -r 1e7383629b34 go/types.cc
--- a/go/types.cc	Tue Dec 21 10:50:54 2010 -0800
+++ b/go/types.cc	Tue Dec 21 10:56:00 2010 -0800
@@ -8061,6 +8061,7 @@
   tree id = no->get_id(gogo);
   tree decl = build_decl(no->location(), TYPE_DECL, id, type_tree);
   TYPE_NAME(type_tree) = decl;
+  layout_type(type_tree);
   return type_tree;
 }
 

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