------- Comment #18 from ubizjak at gmail dot com  2008-02-07 20:47 -------
(In reply to comment #17)
> P2 - this should not block the release (it's not that profiledbootstrap was
> never
> broken in released compilers).  It's also hard to analyze (no, I'm not on it,
> volunteers welcome).

It looks that ten_to_ptwo() returns wrong result for argumens >= 7.

Try this debug session:

< non-profiled (correct) cc1>:

(gdb) set args -E -quiet /dev/null
(gdb) break real_to_decimal
Breakpoint 3 at 0x599580: file ../../gcc-svn/trunk/gcc/real.c, line 1453.
(gdb) run
Breakpoint ...

(gdb) p *ten_to_ptwo (7)
$1 = {cl = 1, decimal = 0, sign = 0, signalling = 0, canonical = 0, 
  uexp = 426, sig = {159020156881263929, 14298703881791668535, 
    10644899600020376799}}
---

<profiled (wrong) cc1>:

<repeat all of the above commands>

(gdb) p *ten_to_ptwo (7)
$1 = {cl = 1, decimal = 0, sign = 0, signalling = 0, canonical = 0, 
  uexp = 423, sig = {5021769561911101971, 862341187440057448, 
    11372220470965069550}}

You can see that the results are different.

Suprisingly, result when passing 6 as an argument differs only for one LSB.

(correct):
(gdb) p *ten_to_ptwo (6)
$2 = {cl = 1, decimal = 0, sign = 0, signalling = 0, canonical = 0, 
  uexp = 213, sig = {5834422113351499776, 4377335499248575995, 
    14012984643248170709}}

(wrong):
(gdb) p *ten_to_ptwo (6)
$2 = {cl = 1, decimal = 0, sign = 0, signalling = 0, canonical = 0, 
  uexp = 213, sig = {5834422113351499776, 4377335499248575995, 
    14012984643248170708}}

Luckily, ten_to_ptwo() from real.c has only ~20 lines.


-- 


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

Reply via email to