+2015-09-29 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/67741
+ * tree-ssa-math-opts.c (pass_cse_sincos::execute): Only recognize
+ builtin calls with correct signature.
+
2015-09-29 Ilya Enkovich <enkovich.gnu@gmail.com>
PR target/65105
+2015-09-29 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/67741
+ * gcc.dg/torture/pr67741.c: New testcase.
+
2015-09-29 Uros Bizjak <ubizjak@gmail.com>
* gcc.dg/tg-tests.h (foo_1) [UNSAFE]: Also check if f and ld are
--- /dev/null
+/* { dg-do compile } */
+
+struct singlecomplex { float real, imag ; } ;
+struct doublecomplex { double real, imag ; } ;
+struct extendedcomplex { long double real, imag ; } ;
+extern double cabs();
+float cabsf(fc)
+ struct singlecomplex fc; /* { dg-warning "doesn't match" } */
+{
+ struct doublecomplex dc ;
+ dc.real=fc.real; dc.imag=fc.imag;
+ return (float) cabs(dc);
+}
of a basic block. */
cleanup_eh = false;
- if (is_gimple_call (stmt)
- && gimple_call_lhs (stmt)
- && (fndecl = gimple_call_fndecl (stmt))
- && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL)
+ if (gimple_call_builtin_p (stmt, BUILT_IN_NORMAL)
+ && gimple_call_lhs (stmt))
{
tree arg, arg0, arg1, result;
HOST_WIDE_INT n;
location_t loc;
+ fndecl = gimple_call_fndecl (stmt);
switch (DECL_FUNCTION_CODE (fndecl))
{
CASE_FLT_FN (BUILT_IN_COS):