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]

c++ ICE in expand_expr on invalid code



hi -

The following (invalid) c++ code causes an ICE in expand_expr.
This is with the cvs version of gcc (2.96 20000222 (experimental)),
on a i686-pc-linux-gnu platform.
[Nb, in this version of the compiler, there was another, trivial,
problem in init_output_buffer that caused an ICE.  But that's already
been fixed in cvs.]

- y.cc -------------------------------------------------------------
namespace std {
class basic_string;
}


class bitset
{
 public:
  explicit bitset(const std::basic_string& __s);
};

int main ()
{
  bitset (std::basic_string("0"));
}
--------------------------------------------------------------------


$ g++ -c y.cc
y.cc: In function `int main ()':
y.cc:14: `basic_string' specified as declarator-id
y.cc:14: multiple declarations `int' and `bitset'
y.cc:14: cannot convert `const char *' to `int' in initialization
y.cc:14: Internal compiler error in `expand_expr', at expr.c:5904
y.cc:14: Please submit a full bug report.
y.cc:14: See <URL:http://www.gnu.org/software/gcc/bugs.html> for
y.cc:14: instructions.


thanks,
sss

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