diff options
Diffstat (limited to 'gcc/go/go-lang.c')
-rw-r--r-- | gcc/go/go-lang.c | 14 |
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); } |