aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2011-08-19 22:55:44 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2011-08-19 22:55:44 +0100
commit02ee3d31539a74740040921e34e38035fbd8ac72 (patch)
treededb875c748827bdc9c66d163a7cce230835bd29 /gcc
parent54f6892e4b7baa65bd5a16e5800258c319710e3c (diff)
downloadgcc-02ee3d31539a74740040921e34e38035fbd8ac72.zip
gcc-02ee3d31539a74740040921e34e38035fbd8ac72.tar.gz
gcc-02ee3d31539a74740040921e34e38035fbd8ac72.tar.bz2
c-parser.c (c_parser_postfix_expression): Convert operands of __builtin_complex to their semantic types.
* c-parser.c (c_parser_postfix_expression): Convert operands of __builtin_complex to their semantic types. From-SVN: r177915
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))