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++/11637] New: [3.3.1 prerelease] g++ invalid assembly with -fnon-call-exceptions


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: [3.3.1 prerelease] g++ invalid assembly with -fnon-call-
                    exceptions
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: nick at ilm dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu

using the gcc-3.3.1-20030720 prerelease,
binutils-2.4
the following code 

----
#include <iostream>

void foo(float f);

void
split1()
{
    std::cout << .1f ;
    foo(.1f);
}
---

causes:

> /dept/rnd/vendor/gcc-3.3.1-20030720/bin/g++ -fnon-call-exceptions -O2 -c
asmbug.C -o /dev/null
/usr/tmp/cchhQIen.s: Assembler messages:
/usr/tmp/cchhQIen.s:25: Error: junk `.00000001490116119384766e-1' after expression
/usr/tmp/cchhQIen.s:25: Error: too many memory references for `mov'


the assembly generated for split1 is:

---
.globl _Z6split1v
        .type   _Z6split1v, @function
_Z6split1v:
.LFB1607:
        pushl   %ebp
.LCFI0:
        movl    %esp, %ebp
.LCFI1:
        subl    $24, %esp
.LCFI2:
        flds    .LC1
        movl    $_ZSt4cout, (%esp)
        fstpl   4(%esp)
        call    _ZNSolsEd
        movl    1.00000001490116119384766e-1, (%esp)
        call    _Z3foof
        movl    %ebp, %esp
        popl    %ebp
        ret
---

I'll attach preprocessed source and resulting assembly to the bug.

-nick


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