[Bug optimization/12282] New: builtin function return value ignored
pbrook at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Sep 14 23:56:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12282
Summary: builtin function return value ignored
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Keywords: wrong-code
Severity: critical
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pbrook at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-unknown-linux-gnu
GCC host triplet: i686-unknown-linux-gnu
GCC target triplet: i686-unknown-linux-gnu
The following testcase fails when compiled with -O on tree-ssa branch. Removal
of the second assignment to q also seems to be removing part of the code which
assigns the value to r.
void foo (float * p)
{
if (*p != __builtin_sqrtf(2.0))
abort();
}
int main()
{
float r;
double q;
r = 2.0;
q = 2.0;
r = __builtin_sqrtf (r);
q = __builtin_sqrtf (q);
foo (&r);
exit(0);
}
More information about the Gcc-bugs
mailing list