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]

Internal compiler error using g++ 970924


Hi!

(I have reported this bug a few days ago, but perhaps the subject
was mistakable.)
The error occured compiling the following code with gcc -O[2] -c:

------------snip-----------
class string
{
public:
    string();
    string(const string& x);
    string(const char* t);

    ~string();
};

void set_status(string message);

class StatusDelay {
private:
    string cause;

public:
    StatusDelay(const string& c)
        : cause(c)
    {
        set_status(cause);
    }

    ~StatusDelay()
    {
        set_status(cause);
    }
};

static char delay_message[] = "Filtering files";

static void searchRemote()
{
    StatusDelay delay(delay_message);
    return;
}
------------snip-----------
g++ -c -O[2] foo.C
foo.C: In function `void searchRemote()':
foo.C:36: Internal compiler error.
foo.C:36: Please submit a full bug report to `egcs-bugs@cygnus.com'.

Without optimization it compiles fine.

My configuration:
linux-2.0.30, libc.so.5.4.39, libg++.so.27.2.8, libstdc++.so.27.2.8

gcc -v
Reading specs from
/usr/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.90.10/specs
gcc version egcs-2.90.10 970924 (gcc2-970802 experimental)

Bernd




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