From: Mark Mitchell <mmitchell@usa.net>
To: Joe Buck <jbuck@synopsys.com>
Cc: egcs@cygnus.com (egcs team)
Subject: internal compiler error in C++ front end
Date: Mon, 29 Sep 1997 09:56:00 -0000 [thread overview]
Message-ID: <199709290956.JAA01032@quickstep.stanford.edu> (raw)
In-Reply-To: <199709282248.PAA07344@atrus.synopsys.com>
>>>>> "Joe" == Joe Buck <jbuck@synopsys.com> writes:
Joe> The following program blows up egcs (every version since at
Joe> least 970910 through the present version):
Joe> #include <vector> vector<int> v(3,5);
Joe> I've verified that the crash occurs on both Linux and
Joe> Solaris/sparc.
I'll take a look at this in the next few days.
Joe> The message is
Joe> /usr/local/egcs/include/g++/vector.h:103: Internal compiler
Joe> error 97. /usr/local/egcs/include/g++/vector.h:103: Please
Joe> submit a full bug report to `egcs-bugs@cygnus.com'.
Joe> vector<double> v(5, 3.0);
Joe> works fine.
Joe> vector<double> v(3.0, 5);
Joe> is quietly accepted, but seems bogus. I suppose the compiler
Joe> can assume InputIterator == double, but this seems strange.
Joe> does not crash, but
Joe> vector<double> v(3, 5);
Joe> does: so does the illegal vector<double> v(3.0, 3.0);
Joe> It seems that there is some confusion between
Joe> vector<T>(size_type,const T&) and the template member
Joe> vector<T>(Iterator,Iterator). The odd thing is that for
Joe> vector<int>(32,3) the second seems in some ways a better
Joe> match, but STL is banking on the first one being chosen! (to
Joe> get a vector of 32 elements with value 3).
Joe> While it's likely that this particular case would not have
Joe> been caught, this does suggest that the libstdc++ tests are
Joe> too weak; tvector does not try out even 1/10 of the vector
Joe> class functionality. Tests that at least call each method of
Joe> vector (and the other STL classes) at least once would be a
Joe> great help. (Perhaps others already have something: the
Joe> ObjectSpace free tests seem too weak).
--
Mark Mitchell mmitchell@usa.net
Stanford University http://www.stanford.edu
next prev parent reply other threads:[~1997-09-29 9:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-09-28 15:49 Joe Buck
1997-09-29 9:56 ` Mark Mitchell [this message]
[not found] <199709282248.PAA07344.cygnus.egcs@atrus.synopsys.com>
1997-09-29 9:40 ` Jason Merrill
1997-09-29 12:35 ` Jan Springer
1997-09-29 15:09 ` Joe Buck
1997-09-29 18:39 ` Jason Merrill
1997-09-29 14:02 Bob Sidebotham
1997-10-03 10:59 Mark Mitchell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199709290956.JAA01032@quickstep.stanford.edu \
--to=mmitchell@usa.net \
--cc=egcs@cygnus.com \
--cc=jbuck@synopsys.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).