diff options
author | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2015-11-10 00:45:03 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2015-11-10 00:45:03 +0000 |
commit | fbae25c0084e592c1e97fc0c8cf1650772d8c93a (patch) | |
tree | e102a1abb3a9716a05e485d07fc6c08fe10f2f01 /gcc/config/sparc | |
parent | 3a40d81dcd1bae2c8dea064cdd0f28c9269813da (diff) | |
download | gcc-fbae25c0084e592c1e97fc0c8cf1650772d8c93a.zip gcc-fbae25c0084e592c1e97fc0c8cf1650772d8c93a.tar.gz gcc-fbae25c0084e592c1e97fc0c8cf1650772d8c93a.tar.bz2 |
re PR target/57845 (ICE with -freg-struct-return on SPARC)
PR target/57845
* config/sparc/sparc.c (sparc_function_value_1): In 32-bit mode, do
not promote the mode for aggregate types.
From-SVN: r230074
Diffstat (limited to 'gcc/config/sparc')
-rw-r--r-- | gcc/config/sparc/sparc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 7fa702e..23f1125 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -7329,9 +7329,10 @@ sparc_function_value_1 (const_tree type, machine_mode mode, mode = word_mode; } - /* We should only have pointer and integer types at this point. This must - match sparc_promote_function_mode. */ + /* We should only have pointer and integer types at this point, except with + -freg-struct-return. This must match sparc_promote_function_mode. */ else if (TARGET_ARCH32 + && !(type && AGGREGATE_TYPE_P (type)) && mclass == MODE_INT && GET_MODE_SIZE (mode) < UNITS_PER_WORD) mode = word_mode; |