obscure bug in optimisation on OSF/alpha machine
Andreas Ernst
Andreas.Ernst@cmis.CSIRO.AU
Tue Feb 8 20:01:00 GMT 2000
Hi,
Please find below a bug report on a relatively obscure bug in
the compiler. This bug does not occur:
- Without optimisation
- On other machines (eg intel/linux or solaris)
While I have your attention let me also add that the last couple
of versions of gcc seem to have problems interacting nicely with
gdb on DEC alphas (the 'next' command invariably steps into
rather than over functions :-( Again this seems to be a problem
specific to Alpha/OSF machines
Thanks for your attention,
Andreas
+--------------------------------------------------------+
| A T Ernst, CSIRO Mathematical and Information Sciences |
| Private Bag 10, Clayton South MDC Vic 3169, Australia |
| Email: Andreas.Ernst@cmis.csiro.au Fax: (03) 95458080 |
| Web Page: http://www.cmis.csiro.au/Andreas.Ernst/ |
+--------------------------------------------------------+
===================== File: xxx.cc ===================================
template <class T> class X {
public:
X() { }
virtual ~X() {}
};
class A {};
class B {
public:
virtual int g(X<const A>) const { throw 2; }
};
int main(int argc,char **argv)
{ B b; }
======================================================================
gcc -v --save-temps -O3 xxx.cc output:
Reading specs from /usr/local/gnu/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.1/specs
gcc version 2.95.1 19990816 (release)
/usr/local/gnu/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.1/cpp -lang-c++ -v -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -Dunix -D__osf__ -D_LONGLONG -DSYSTYPE_BSD -D_SYSTYPE_BSD -D__unix__ -D__osf__ -D_LONGLONG -D__SYSTYPE_BSD__ -D_SYSTYPE_BSD -D__unix -D__SYSTYPE_BSD -Asystem(unix) -Asystem(xpg4) -D__EXCEPTIONS -D__OPTIMIZE__ -D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus -Acpu(alpha) -Amachine(alpha) -D__alpha -D__alpha__ -D__alpha_ev6__ -Acpu(ev6) -D__alpha_bwx__ -Acpu(bwx) -D__alpha_max__ -Acpu(max) -D__alpha_fix__ -Acpu(fix) xxx.cc xxx.ii
GNU CPP version 2.95.1 19990816 (release)
#include "..." search starts here:
#include <...> search starts here:
/usr/local/gnu/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.1/../../../../include/g++-3
/usr/local/include
/usr/local/gnu/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.1/../../../../alphaev6-dec-osf4.0f/include
/usr/local/gnu/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.1/include
/usr/include
End of search list.
The following default directories have been omitted from the search path:
End of omitted list.
/usr/local/gnu/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.1/cc1plus xxx.ii -quiet -dumpbase xxx.cc -O3 -version -o xxx.s
GNU C++ version 2.95.1 19990816 (release) (alphaev6-dec-osf4.0f) compiled by GNU C version 2.95.1 19990816 (release).
xxx.cc: In method `int B::g(X<const A>) const':
xxx.cc:15: Internal compiler error.
xxx.cc:15: Please submit a full bug report.
xxx.cc:15: See <URL: http://www.gnu.org/software/gcc/faq.html#bugreport > for instructions.
More information about the Gcc-bugs
mailing list