+2015-11-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR target/57845
+ * config/sparc/sparc.c (sparc_function_value_1): In 32-bit mode, do
+ not promote the mode for aggregate types.
+
2015-11-09 Renlin Li <renlin.li@arm.com>
Backport from mainline
2014-09-12 Wilco Dijkstra <wilco.dijkstra@arm.com>
- * gcc/ree.c (combine_reaching_defs): Ensure inserted copy don't change
+ * ree.c (combine_reaching_defs): Ensure inserted copy don't change
the number of hard registers.
2015-11-02 Martin Jambor <mjambor@suse.cz>
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;
+2015-11-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.target/sparc/sparc-ret.c: Rename to...
+ * gcc.target/sparc/sparc-ret-1.c: ...this.
+ * gcc.target/sparc/sparc-ret-2.c: New test.
+
2015-11-02 Martin Jambor <mjambor@suse.cz>
- Backport from mainline
+ Backport from mainline
2015-10-09 Martin Jambor <mjambor@suse.cz>
- * gcc.dg/ipa/ipa-sra-10.c: New test.
- * gcc.dg/torture/pr67794.c: Likewise.
+ * gcc.dg/ipa/ipa-sra-10.c: New test.
+ * gcc.dg/torture/pr67794.c: Likewise.
2015-10-22 Paul Thomas <pault@gcc.gnu.org>
--- /dev/null
+/* PR target/57845 */
+
+/* { dg-do compile } */
+/* { dg-options "-freg-struct-return" } */
+
+struct S { short int i; };
+
+struct S foo (short int i)
+{
+ struct S s;
+ s.i = i;
+ return s;
+}