This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
egcs-19980824 ICE with named return values
- To: egcs-bugs at cygnus dot com
- Subject: egcs-19980824 ICE with named return values
- From: Derrick Bass <derrick at tapir dot Caltech dot EDU>
- Date: Fri, 28 Aug 1998 02:04:56 -0700
I got an internal compiler error expanding an inline function with a named
return value when the optimizer is on.
If the function is not inline, or the optimizer is off, or I refrain from
named return values, then everything works okay.
Here is the code:
class A {
public:
inline int GetInteger();
};
inline int A::GetInteger() return i {
&i;
}
main() {
A a;
a.GetInteger();
}
Here is the output of g++ -v:
eg++-latest -O -c -v ml.gack3.cc
Reading specs from /ufs/murphy/derrick/gnu/egcs-19980824/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.55/specs
gcc version egcs-2.91.55 19980824 (gcc2 ss-980609 experimental)
/ufs/murphy/derrick/gnu/egcs-19980824/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.55/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__EXCEPTIONS -D__OPTIMIZE__ -Asystem(unix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di686 -Dpentiumpro -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__ ml.gack3.cc /tmp/cchmoYnQ.ii
GNU CPP version egcs-2.91.55 19980824 (gcc2 ss-980609 experimental) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
/ufs/murphy/derrick/gnu/egcs-19980824/include/g++
/usr/local/include
/ufs/murphy/derrick/gnu/egcs-19980824/i686-pc-linux-gnulibc1/include
/ufs/murphy/derrick/gnu/egcs-19980824/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.55/include
/usr/include
End of search list.
/ufs/murphy/derrick/gnu/egcs-19980824/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.55/cc1plus /tmp/cchmoYnQ.ii -quiet -dumpbase ml.gack3.cc -O -version -o /tmp/ccYkcdcD.s
GNU C++ version egcs-2.91.55 19980824 (gcc2 ss-980609 experimental) (i686-pc-linux-gnulibc1) compiled by GNU C version egcs-2.91.55 19980824 (gcc2 ss-980609 experimental).
../../egcs-19980824/gcc/integrate.c:1733: Internal compiler error in function expand_inline_function
-- Derrick Bass