[Bug c++/14658] New: [lno] segfault when calling function twice in a loop

reichelt at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Mar 19 20:22:00 GMT 2004


The lno-branch segfaults when the following code snippet is compiled
with "-O2 -floop-optimize2":

==================================================
struct A
{
    ~A();
    void foo(double);
};

void bar()
{
    for ( int i=0; i<2; ++i )
    {
        A a;
        a.foo(0.5);
        a.foo(0.5);
    }
}
==================================================


The regression was introduced by the Zdenek's patch:

http://gcc.gnu.org/ml/gcc-cvs/2004-03/msg00455.html
http://gcc.gnu.org/ml/gcc-patches/2004-03/msg00772.html

Zdenek, could you please have a look?

-- 
           Summary: [lno] segfault when calling function twice in a loop
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,rakdver at gcc dot gnu
                    dot org


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



More information about the Gcc-bugs mailing list