aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/go-lang.c
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2010-12-07 19:28:44 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2010-12-07 19:28:44 +0000
commit0e29f7e5af0d4b5c1369fc5052b94476eadde83c (patch)
tree2eb0cff40c7533160c5833a9b21ab4fb6a2b0fc7 /gcc/go/go-lang.c
parent128aaeedf407def236eefa58efa18327e81b72eb (diff)
downloadgcc-0e29f7e5af0d4b5c1369fc5052b94476eadde83c.zip
gcc-0e29f7e5af0d4b5c1369fc5052b94476eadde83c.tar.gz
gcc-0e29f7e5af0d4b5c1369fc5052b94476eadde83c.tar.bz2
re PR tree-optimization/46805 (ICE: SIGSEGV in optab_for_tree_code (optabs.c:407) with -O -fno-tree-scev-cprop -ftree-vectorize)
PR tree-optimization/46805 PR tree-optimization/46833 * go-lang.c (go_langhook_type_for_mode): Handle vector modes. From-SVN: r167563
Diffstat (limited to 'gcc/go/go-lang.c')
-rw-r--r--gcc/go/go-lang.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/go/go-lang.c b/gcc/go/go-lang.c
index 0f3c183..323f8c5 100644
--- a/gcc/go/go-lang.c
+++ b/gcc/go/go-lang.c
@@ -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);
}