aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorJoseph Myers <jsm@polyomino.org.uk>2003-10-20 23:03:34 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2003-10-20 23:03:34 +0100
commitac054e28e69292ed10814619d7c822042b318d0a (patch)
treea16b9dae3d728b41ee5440ba9e0129514a33e701 /gcc/c-common.c
parentd1132e0bef04e44f652a0ac5e0141022d2d77e0a (diff)
downloadgcc-ac054e28e69292ed10814619d7c822042b318d0a.zip
gcc-ac054e28e69292ed10814619d7c822042b318d0a.tar.gz
gcc-ac054e28e69292ed10814619d7c822042b318d0a.tar.bz2
c-common.c (expand_tree_builtin): Ensure creal and cimag functions do not return lvalues.
* c-common.c (expand_tree_builtin): Ensure creal and cimag functions do not return lvalues. testsuite: * gcc.dg/builtins-28.c: New test. From-SVN: r72727
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 96186d8e..1d32d96 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -3752,14 +3752,16 @@ expand_tree_builtin (tree function, tree params, tree coerced_params)
case BUILT_IN_CREALL:
if (coerced_params == 0)
return integer_zero_node;
- return build_unary_op (REALPART_EXPR, TREE_VALUE (coerced_params), 0);
+ return non_lvalue (build_unary_op (REALPART_EXPR,
+ TREE_VALUE (coerced_params), 0));
case BUILT_IN_CIMAG:
case BUILT_IN_CIMAGF:
case BUILT_IN_CIMAGL:
if (coerced_params == 0)
return integer_zero_node;
- return build_unary_op (IMAGPART_EXPR, TREE_VALUE (coerced_params), 0);
+ return non_lvalue (build_unary_op (IMAGPART_EXPR,
+ TREE_VALUE (coerced_params), 0));
case BUILT_IN_ISGREATER:
return expand_unordered_cmp (function, params, UNLE_EXPR, LE_EXPR);