This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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 c/13132] New: long-double code leads to unresolved reference to __trunctfxf2


Compiling the test-program below results in an undefined reference to __tructfxf2:

$ gcc -v
Reading specs from /opt/gcc-pre3.4/lib/gcc/ia64-hp-linux/3.4/specs
Configured with:  : (reconfigured)  : (reconfigured)  : (reconfigured) 
Thread model: posix
gcc version 3.4 20031119 (experimental)
$ cat t.c
long double f (int g)
{
        union {
                int g;
                long double d;
        } u;
        u.g = g;
        return u.d;
}

int main (int argc, char **argv)
{
        return f(argc);
}
$ gcc -O /tmp/t.c
/tmp/cc6b8Pzg.o(.text+0x32): In function `f':
: undefined reference to `__trunctfxf2'
collect2: ld returned 1 exit status

It doesn't matter whether -O or -O2 is specified.  Dropping -O makes the problem
disppear, however.

I discovered this problem while trying to compile libc with gcc-pre3.4.

-- 
           Summary: long-double code leads to unresolved reference to
                    __trunctfxf2
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: davidm at hpl dot hp dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: ia64-hp-linux
  GCC host triplet: ia64-hp-linux
GCC target triplet: ia64-hp-linux


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


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