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 report for egcs-1.1.1 on solaris2.6



It appears as though -mcpu=ultrasparc has a problem.  If I change the
code from 
  bool f(const foo &b) const { return (bar >= b.bar); }
to
  bool f(const foo &b) const { if (bar >= b.bar) return true; else return false; }
then things work fine.  And if I remove the -mcpu flag, or change it
to -mcpu=supersparc, it also works fine.

I whittled the bug down to a tiny example.  Here is the verbose output
and save-temps output to complete the bug report.

-- David Magerman
magerman@rentec.com

$ g++-1.1.1 -v -mcpu=ultrasparc -c -g -O3 -I. --save-temps foo.C
Reading specs from /usr/local/gnu/install/gcc/1.1.1/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.91.60/specs
gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)
 /usr/local/gnu/install/gcc/1.1.1/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.91.60/cpp -lang-c++ -v -I. -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix -Asystem(unix) -Asystem(svr4) -D__EXCEPTIONS -D__OPTIMIZE__ -g -D__sparc_v9__ -D__GCC_NEW_VARARGS__ -Acpu(sparc) -Amachine(sparc) foo.C foo.ii
GNU CPP version egcs-2.91.60 19981201 (egcs-1.1.1 release) (sparc)
#include "..." search starts here:
#include <...> search starts here:
 .
 /usr/local/gnu/install/gcc/1.1.1/include/g++
 /usr/local/include
 /usr/local/gnu/install/gcc/1.1.1/sparc-sun-solaris2.6/include
 /usr/local/gnu/install/gcc/1.1.1/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.91.60/include
 /usr/include
End of search list.
 /usr/local/gnu/install/gcc/1.1.1/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.91.60/cc1plus foo.ii -quiet -dumpbase foo.cc -mcpu=ultrasparc -g -O3 -version -o foo.s
GNU C++ version egcs-2.91.60 19981201 (egcs-1.1.1 release) (sparc-sun-solaris2.6) compiled by GNU C version egcs-2.91.60 19981201 (egcs-1.1.1 release).
foo.C: In method `bool foo::f(const struct foo &) const':
foo.C:2: Internal compiler error.
foo.C:2: Please submit a full bug report to `egcs-bugs@cygnus.com'.
foo.C:2: See <URL:http://egcs.cygnus.com/faq.html#bugreport> for details.
===========================================================================
$ cat foo.ii
# 1 "foo.C"
#pragma implementation
# 1 "foo.H" 1
#pragma interface
struct foo {
  double bar;
  bool f(const foo &b) const { return (bar >= b.bar); }
};
# 2 "foo.C" 2


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