aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/c-parser.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b94e583..6457234 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2011-08-19 Joseph Myers <joseph@codesourcery.com>
+
+ * c-parser.c (c_parser_postfix_expression): Convert operands of
+ __builtin_complex to their semantic types.
+
2011-08-19 H.J. Lu <hongjiu.lu@intel.com>
PR middle-end/49721
diff --git a/gcc/c-parser.c b/gcc/c-parser.c
index 92821b1..ff376df 100644
--- a/gcc/c-parser.c
+++ b/gcc/c-parser.c
@@ -6428,7 +6428,13 @@ c_parser_postfix_expression (c_parser *parser)
c_parser_skip_until_found (parser, CPP_CLOSE_PAREN,
"expected %<)%>");
mark_exp_read (e1.value);
+ if (TREE_CODE (e1.value) == EXCESS_PRECISION_EXPR)
+ e1.value = convert (TREE_TYPE (e1.value),
+ TREE_OPERAND (e1.value, 0));
mark_exp_read (e2.value);
+ if (TREE_CODE (e2.value) == EXCESS_PRECISION_EXPR)
+ e2.value = convert (TREE_TYPE (e2.value),
+ TREE_OPERAND (e2.value, 0));
if (!SCALAR_FLOAT_TYPE_P (TREE_TYPE (e1.value))
|| DECIMAL_FLOAT_TYPE_P (TREE_TYPE (e1.value))
|| !SCALAR_FLOAT_TYPE_P (TREE_TYPE (e2.value))