c-parser.c (c_parser_postfix_expression): Convert operands of __builtin_complex to...
authorJoseph Myers <joseph@codesourcery.com>
Fri, 19 Aug 2011 21:55:44 +0000 (22:55 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Fri, 19 Aug 2011 21:55:44 +0000 (22:55 +0100)
* c-parser.c (c_parser_postfix_expression): Convert operands of
__builtin_complex to their semantic types.

From-SVN: r177915

gcc/ChangeLog
gcc/c-parser.c

index b94e583b80b148e525e89ead51ffd25348932139..6457234b57390a95c39fb00a43af72ebe4f72a46 100644 (file)
@@ -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
index 92821b17261f9b842d0a659910c63d60dc5ab68f..ff376dfb8ff9499bb8c145b8b5023dcdc151c803 100644 (file)
@@ -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))