aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorPrathamesh Kulkarni <prathamesh.kulkarni@linaro.org>2017-02-19 09:06:30 +0000
committerPrathamesh Kulkarni <prathamesh3492@gcc.gnu.org>2017-02-19 09:06:30 +0000
commiteab1f16915926a935c4dcfce3f1026c5e80100ff (patch)
tree926b977b27bc8148dc5410521269f1781a49ddf0 /gcc/c
parent593bf80a532ab99841fe758991f98e0d8b99ae67 (diff)
downloadgcc-eab1f16915926a935c4dcfce3f1026c5e80100ff.zip
gcc-eab1f16915926a935c4dcfce3f1026c5e80100ff.tar.gz
gcc-eab1f16915926a935c4dcfce3f1026c5e80100ff.tar.bz2
gimple-pretty-print.c (dump_ternary_rhs): Adjust gimple dump format for FMA_EXPR.
2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> * gimple-pretty-print.c (dump_ternary_rhs): Adjust gimple dump format for FMA_EXPR. c/ * gimple-parser.c (c_parser_gimple_postfix_expression): Handle FMA_EXPR. testsuite/ * gcc.dg/gimplefe-26.c: New test. From-SVN: r245570
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/ChangeLog5
-rw-r--r--gcc/c/gimple-parser.c22
2 files changed, 27 insertions, 0 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 2a198ef..0626973 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,8 @@
+2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
+
+ * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
+ FMA_EXPR.
+
2017-02-16 Jakub Jelinek <jakub@redhat.com>
PR c++/79512
diff --git a/gcc/c/gimple-parser.c b/gcc/c/gimple-parser.c
index d959877..31d0a08 100644
--- a/gcc/c/gimple-parser.c
+++ b/gcc/c/gimple-parser.c
@@ -856,6 +856,28 @@ c_parser_gimple_postfix_expression (c_parser *parser)
expr.value = fold_convert (type, val);
return expr;
}
+ else if (strcmp (IDENTIFIER_POINTER (id), "__FMA") == 0)
+ {
+ c_parser_consume_token (parser);
+ auto_vec<tree> args;
+
+ if (c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>"))
+ {
+ c_parser_gimple_expr_list (parser, &args);
+ c_parser_skip_until_found (parser, CPP_CLOSE_PAREN,
+ "expected %<)%>");
+ }
+ if (args.length () != 3)
+ {
+ error_at (loc, "invalid number of operands to __FMA");
+ expr.value = error_mark_node;
+ return expr;
+ }
+ expr.value = build3_loc (loc, FMA_EXPR, TREE_TYPE (args[0]),
+ args[0], args[1], args[2]);
+ return expr;
+ }
+
/* SSA name. */
unsigned version, ver_offset;
if (! lookup_name (id)