Commit 426d6333 by Steve Ellcey Committed by Steve Ellcey

re PR middle-end/44878 (Build fails when compiling libstdc++)

2010-07-22  Steve Ellcey  <sje@cup.hp.com>

	PR middle-end/44878
	* stmt.c (expand_value_return):  Call promote_function_mode with
	a for_return argument of 2 when returning by reference.

From-SVN: r162423
parent bd3a5d17
2010-07-22 Steve Ellcey <sje@cup.hp.com>
PR middle-end/44878
* stmt.c (expand_value_return): Call promote_function_mode with
a for_return argument of 2 when returning by reference.
2010-07-22 Dodji Seketeli <dodji@redhat.com>
PR debug/45024
......
......@@ -1595,8 +1595,11 @@ expand_value_return (rtx val)
tree type = TREE_TYPE (decl);
int unsignedp = TYPE_UNSIGNED (type);
enum machine_mode old_mode = DECL_MODE (decl);
enum machine_mode mode = promote_function_mode (type, old_mode,
&unsignedp, funtype, 1);
enum machine_mode mode;
if (DECL_BY_REFERENCE (decl))
mode = promote_function_mode (type, old_mode, &unsignedp, funtype, 2);
else
mode = promote_function_mode (type, old_mode, &unsignedp, funtype, 1);
if (mode != old_mode)
val = convert_modes (mode, old_mode, val, unsignedp);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment