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]

Bug in calls.c on i686-pc-linux-gnu and Debian 2.2


This is a bug in the latest CVS sources. The compiler, compiled today
(Thu Apr 20, 2000), identifies itself as

gcc version 2.96 20000420 (experimental)

Here is the source that produces the error:

(file: callsbug.cc)
*********************

#include <string>

std::string m(size_t);
void f(const std::string& st);

int main()
{
   f(m(2));
   return 0;
}

*********************

(Notes: No error if std::string is replaced by a builtin type, like
double. Same error with more complicated constructs, like std::stringbuf
or std::filebuf.)

The preprocessor output is attached as a gzipped file, callsbug.ii.gz.

The command line that produced the error was

g++ -c -O callsbug.cc

(Note: No error without the "-O" flag.)

My computer is a Pentium 2 (400 MHz), running Linux kernel 2.2.9 and
Debian 2.2. gcc identifies the system as i686-pc-linux-gnu.

The configure command used before compiling the compiler was

configure --prefix /home/russell/local --enable-shared
--enable-languages=c++ --enable-libstdcxx-v3

(Note: as per instructions with latest CVS sources of libstdc++-v3.)

After configuring, I did only

make bootstrap-lean
make install

Compilation of callsbug.cc halts with the message

callsbug.cc: In function `int main ()':
callsbug.cc:9: Internal compiler error in `expand_call', at
callsbug.cc:9: calls.c:2806

followed by the request to submit a full bug report.

In case the CVS sources have changed even in the time since I got them
earlier today, here is the context of line 2806 of calls.c

#ifdef PREFERRED_STACK_BOUNDARY
      /* Stack must to be properly aligned now.  */
      if (stack_pointer_delta & (preferred_stack_boundary / BITS_PER_UNIT - 1))
        abort();
#endif

The actual offending line is of course that with "abort();".

(Note: I located this bug yesterday with yesterday's CVS sources, and did
today's update to see if the bug had gone away - not so, unfortunately.)

I hope this helps.

Russell Davidson                    email: russell@ehess.cnrs-mrs.fr
GREQAM,
Centre de la Vieille Charite,       telephone: +33-4.91.14.07.40 
F-13002 Marseille                   fax:       +33-4.91.90.02.27

callsbug.ii.gz


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