This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/12282] New: builtin function return value ignored
- From: "pbrook at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Sep 2003 23:21:38 -0000
- Subject: [Bug optimization/12282] New: builtin function return value ignored
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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);
}