This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/10114] silence warning in soft-fp


------- Additional Comments From bje at sources dot redhat dot com  2009-05-08 05:57 -------
I took a closer look at this during the week.  Here is an example of the code
that produces the warning (from divsf3.c):

SFtype __divsf3(SFtype a, SFtype b)
{
  FP_DECL_EX;
  FP_DECL_S(A); FP_DECL_S(B); FP_DECL_S(R);
  SFtype r;

  FP_INIT_ROUNDMODE;
  FP_UNPACK_S(A, a);
  FP_UNPACK_S(B, b);
  FP_DIV_S(R, A, B);
  FP_PACK_S(r, R);
  FP_HANDLE_EXCEPTIONS;

  return r;
}

Compiling this file produces:
  warning: ?R_e? may be used uninitialized in this function

I have preprocessed the source file and looked very closely at how the warning
is produced -- it is triggered by FP_PACK_S -> _FP_PACK_CANONICAL.

The data flow is quite complex and I cannot convince myself that the line X##_e
+= _FP_EXPBIAS_##fs from _FP_PACK_CANONICAL always operates on an initialised
X##_e variable.  GCC seems to agree with me.  I fear there is a bug here,
whereby R_e is being incremented on an uninitialised variable.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |roland at redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=10114

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]