]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR tree-optimization/46805 (ICE: SIGSEGV in optab_for_tree_code (optabs.c:407...
authorIan Lance Taylor <iant@google.com>
Tue, 7 Dec 2010 19:28:44 +0000 (19:28 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 7 Dec 2010 19:28:44 +0000 (19:28 +0000)
PR tree-optimization/46805
PR tree-optimization/46833
* go-lang.c (go_langhook_type_for_mode): Handle vector modes.

From-SVN: r167563

gcc/go/ChangeLog
gcc/go/go-lang.c

index d70dc40c4c6ccb4645d5abe0d844b282d6afca33..380c70955f1c0ee01e16d335abccebf536d2d8ea 100644 (file)
@@ -1,3 +1,9 @@
+2010-12-07  Ian Lance Taylor  <iant@google.com>
+
+       PR tree-optimization/46805
+       PR tree-optimization/46833
+       * go-lang.c (go_langhook_type_for_mode): Handle vector modes.
+
 2010-12-06  Ian Lance Taylor  <iant@google.com>
 
        PR other/46789
index 0f3c1838f4b743226d520a774349648a814fc91c..323f8c5331c923ec8d68355bfe6d7610dcf75c14 100644 (file)
@@ -285,6 +285,20 @@ go_langhook_type_for_size (unsigned int bits, int unsignedp)
 static tree
 go_langhook_type_for_mode (enum machine_mode mode, int unsignedp)
 {
+  /* Go has no vector types.  Build them here.  FIXME: It does not
+     make sense for the middle-end to ask the frontend for a type
+     which the frontend does not support.  However, at least for now
+     it is required.  See PR 46805.  */
+  if (VECTOR_MODE_P (mode))
+    {
+      tree inner;
+
+      inner = go_langhook_type_for_mode (GET_MODE_INNER (mode), unsignedp);
+      if (inner != NULL_TREE)
+       return build_vector_type_for_mode (inner, mode);
+      return NULL_TREE;
+    }
+
   return go_type_for_mode (mode, unsignedp);
 }