diff options
author | John David Anglin <danglin@gcc.gnu.org> | 2014-09-16 23:39:28 +0000 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2014-09-16 23:39:28 +0000 |
commit | cbf6bcbe723e596f5e90ba5443049d8d1d3634ca (patch) | |
tree | f7f108c61640d904f779f8e80199e48fe5f0675b /gcc | |
parent | 0e05c303e5c3c7882d5e36a4d5b66f0563ae6478 (diff) | |
download | gcc-cbf6bcbe723e596f5e90ba5443049d8d1d3634ca.zip gcc-cbf6bcbe723e596f5e90ba5443049d8d1d3634ca.tar.gz gcc-cbf6bcbe723e596f5e90ba5443049d8d1d3634ca.tar.bz2 |
re PR target/61853 (ICE: SIGSEGV in store_field)
PR target/61853
* config/pa/pa.c (pa_function_value): Directly handle aggregates
that fit exactly in a word or double word.
From-SVN: r215309
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/pa/pa.c | 10 |
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d446d2c..da2bcee 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-09-16 John David Anglin <danglin@gcc.gnu.org> + + PR target/61853 + * config/pa/pa.c (pa_function_value): Directly handle aggregates + that fit exactly in a word or double word. + 2014-09-16 Ilya Tocar <ilya.tocar@intel.com> * config/i386/driver-i386.c (host_detect_local_cpu): Detect lack of diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 6db4f3d..20f2ef6 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -9298,6 +9298,12 @@ pa_function_value (const_tree valtype, || TREE_CODE (valtype) == COMPLEX_TYPE || TREE_CODE (valtype) == VECTOR_TYPE) { + HOST_WIDE_INT valsize = int_size_in_bytes (valtype); + + /* Handle aggregates that fit exactly in a word or double word. */ + if ((valsize & (UNITS_PER_WORD - 1)) == 0) + return gen_rtx_REG (TYPE_MODE (valtype), 28); + if (TARGET_64BIT) { /* Aggregates with a size less than or equal to 128 bits are @@ -9306,7 +9312,7 @@ pa_function_value (const_tree valtype, memory. */ rtx loc[2]; int i, offset = 0; - int ub = int_size_in_bytes (valtype) <= UNITS_PER_WORD ? 1 : 2; + int ub = valsize <= UNITS_PER_WORD ? 1 : 2; for (i = 0; i < ub; i++) { @@ -9318,7 +9324,7 @@ pa_function_value (const_tree valtype, return gen_rtx_PARALLEL (BLKmode, gen_rtvec_v (ub, loc)); } - else if (int_size_in_bytes (valtype) > UNITS_PER_WORD) + else if (valsize > UNITS_PER_WORD) { /* Aggregates 5 to 8 bytes in size are returned in general registers r28-r29 in the same manner as other non |