diff options
author | Jakub Jelinek <jakub@redhat.com> | 2012-02-01 19:58:44 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2012-02-01 19:58:44 +0100 |
commit | c2b13bb66d214425e2c616b34de09111c5b0e3a6 (patch) | |
tree | 8733721d4d87a2fab2bb03415cba49bf9b89624c /gcc/go/go-lang.c | |
parent | f4f3b9d396227387fbf6ad25e49dd886aa13321f (diff) | |
download | gcc-c2b13bb66d214425e2c616b34de09111c5b0e3a6.zip gcc-c2b13bb66d214425e2c616b34de09111c5b0e3a6.tar.gz gcc-c2b13bb66d214425e2c616b34de09111c5b0e3a6.tar.bz2 |
re PR target/52079 (ICE in aggregate_value_p while building libgo on arm-linux-gnueabihf)
PR target/52079
* go-lang.c (go_langhook_type_for_mode): For TImode and 64-bit HWI
return build_nonstandard_integer_type result if possible.
From-SVN: r183806
Diffstat (limited to 'gcc/go/go-lang.c')
-rw-r--r-- | gcc/go/go-lang.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/gcc/go/go-lang.c b/gcc/go/go-lang.c index 9fa5c45..1d4c18b 100644 --- a/gcc/go/go-lang.c +++ b/gcc/go/go-lang.c @@ -1,5 +1,5 @@ /* go-lang.c -- Go frontend gcc interface. - Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. + Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This file is part of GCC. @@ -277,6 +277,7 @@ go_langhook_type_for_size (unsigned int bits, int unsignedp) static tree go_langhook_type_for_mode (enum machine_mode mode, int unsignedp) { + tree type; /* 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 @@ -291,7 +292,22 @@ go_langhook_type_for_mode (enum machine_mode mode, int unsignedp) return NULL_TREE; } - return go_type_for_mode (mode, unsignedp); + type = go_type_for_mode (mode, unsignedp); + if (type) + return type; + +#if HOST_BITS_PER_WIDE_INT >= 64 + /* The middle-end and some backends rely on TImode being supported + for 64-bit HWI. */ + if (mode == TImode) + { + type = build_nonstandard_integer_type (GET_MODE_BITSIZE (TImode), + unsignedp); + if (type && TYPE_MODE (type) == TImode) + return type; + } +#endif + return NULL_TREE; } /* Record a builtin function. We just ignore builtin functions. */ |