http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49170

--- Comment #3 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2011-05-26 
13:24:31 UTC ---
Rainer, please try:

Index: tree-ssa-math-opts.c
===================================================================
--- tree-ssa-math-opts.c    (revision 174277)
+++ tree-ssa-math-opts.c    (working copy)
@@ -1093,6 +1093,10 @@ execute_cse_sincos (void)
         CASE_FLT_FN (BUILT_IN_COS):
         CASE_FLT_FN (BUILT_IN_SIN):
         CASE_FLT_FN (BUILT_IN_CEXPI):
+          /* Make sure we have either sincos or cexp.  */
+          if (!TARGET_HAS_SINCOS && !TARGET_C99_FUNCTIONS)
+            break;
+
           arg = gimple_call_arg (stmt, 0);
           if (TREE_CODE (arg) == SSA_NAME)
             cfg_changed |= execute_cse_sincos_1 (arg);

and let me know if it solves the problem.

Thanks,
Bill

Reply via email to