On Thu, 16 Feb 2017, Prathamesh Kulkarni wrote: > Hi Richard, > The attached patch handles fma_expr in gimple-fe. > Does it look OK ?
+ tree arg0_type = TREE_TYPE (args[0]); + if (!SCALAR_FLOAT_TYPE_P (arg0_type)) + { + error_at (loc, "operands to __FMA should have" + " floating point type"); + expr.value = error_mark_node; + return expr; + } + + for (int pass = 1; pass < 3; ++pass) + { + tree type = TREE_TYPE (args[pass]); + if (arg0_type != type + || element_precision (arg0_type) != element_precision (type)) + { + error_at (loc, "operands to __FMA should have same type"); + expr.value = error_mark_node; + return expr; + } + } please omit this, other types are ok and type verification is done by the GIMPLE verifier in tree-cfg.c. Ok with that change. Thanks, Richard.