------- Comment #10 from dominiq at lps dot ens dot fr  2007-03-13 12:56 -------
The problem seems to come from a broken/unavailable __builtin_cexpi,
see PR31161.

My understanding is that __builtin_cexpi and __builtin_sincos are twin
objects(?). Now I see in gcc/tree-ssa-math-opts.c:

...
static bool       
gate_cse_sincos (void)
{                   
  /* Make sure we have either sincos or cexp.  */
  return (TARGET_HAS_SINCOS
          || TARGET_C99_FUNCTIONS)
         && optimize;
}

struct tree_opt_pass pass_cse_sincos =
{
  "sincos",                             /* name */
  gate_cse_sincos,                      /* gate */
  execute_cse_sincos,                   /* execute */
  NULL,                                 /* sub */
  NULL,                                 /* next */
  0,                                    /* static_pass_number */
  0,                                    /* tv_id */
  PROP_ssa,                             /* properties_required */
  0,                                    /* properties_provided */
  0,                                    /* properties_destroyed */
  0,                                    /* todo_flags_start */
  TODO_dump_func | TODO_update_ssa | TODO_verify_ssa
    | TODO_verify_stmts,                /* todo_flags_finish */
  0                                     /* letter */
};
...

And TARGET_C99_FUNCTIONS is set to 1 on Darwin -> gate_cse_sincos returns
true even if TARGET_HAS_SINCOS is 0.


-- 


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

Reply via email to