* Possible bug in C++, can someone else verify?
@ 2003-09-17 16:15 Patrick Audley
0 siblings, 0 replies; only message in thread
From: Patrick Audley @ 2003-09-17 16:15 UTC (permalink / raw)
To: gcc-help
With a recent debian gcc (3.3.2 20030908) we can no longer compile a
bit of code with optimizations. Can someone else verify that this
fails with 3.3.2 or a newer compiler? 3.3 seems to work perfectly for
me.
Is this valid C++?
----------8<-----------------------------
#include <vector>
struct blc_offset {
long start;
};
int main(void) {
std::vector<blc_offset> vec;
blc_offset b_off;
b_off.start = 1;
vec.push_back( b_off );
vec[0].start = vec[0].start == 0 ? 0 : vec[0].start - 1;
}
---------------------->8-----------------
when compiled with v3.3 at -O3 it runs fine, on v3.3.2 (debian
pre-release) it hangs in stl_vector.h somewhere in the template.
Thanks,
Patrick.
--
Patrick Audley paudley@compbio.dundee.ac.uk
Computational Biology & Bioinformatics http://www.compbio.dundee.ac.uk
University of Dundee http://blackcat.ca
Dundee, Scotland +44 1382 348721
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-09-17 16:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-17 16:15 Possible bug in C++, can someone else verify? Patrick Audley
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).