Add rules to strip away unneeded type casts in expressions
This patch moves part of the type conversion code from convert.c to match.pd because match.pd is able to apply these transformations in the presence of intermediate temporary variables. Concretely it makes both these cases behave the same float e = (float)a * (float)b; *c = (_Float16)e; and *c = (_Float16)((float)a * (float)b); gcc/ChangeLog: * convert.c (convert_to_real_1): Move part of conversion code... * match.pd: ...To here. gcc/testsuite/ChangeLog: * gcc.dg/type-convert-var.c: New test. From-SVN: r273826
Showing
gcc/testsuite/gcc.dg/type-convert-var.c
0 → 100644
Please
register
or
sign in
to comment