This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/30980] [4.3 Regression] Recent complex miscompilation
- From: "dominiq at lps dot ens dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Mar 2007 12:56:47 -0000
- Subject: [Bug target/30980] [4.3 Regression] Recent complex miscompilation
- References: <bug-30980-133@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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