public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* Internal compiler error in `instantiate_virtual_regs_1'
@ 2000-07-27 14:14 Andreas Wichmann
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Wichmann @ 2000-07-27 14:14 UTC (permalink / raw)
To: gcc-bugs; +Cc: Andreas Wichmann
Hi,
GNU C++ version 2.95.3 19991030 (prerelease) reports an
Internal compiler error in `instantiate_virtual_regs_1',
at function.c:3863
for the following code:
-----------------------------------------------------------
struct TT {
TT(int) {};
operator int() const {return 0;}
};
TT getTT() {
return 0;
}
void main() {
TT a(0),b(0);
a==1?a:TT(0); // internal compiler error
a==1?b:TT(0); // internal compiler error
getTT()==1?b:getTT(); // internal compiler error
getTT()==getTT()?b:TT(0); // internal compiler error
getTT()==1?b:b; // ok
1==1?b:getTT(); // ok
1==1?b:TT(0); // ok
a==1?b:a; // ok
a==1?TT(0):TT(0); // ok
}
-----------------------------------------------------------
This seems to occur only under very special conditions, so
it's probably not very important.
This is a complete preprocessed bug.ii that produces the error:
-----------------------------------------------------------
# 1 "bug.cc"
struct TT {
TT(int) {};
operator int() const {return 0;}
};
void main() {
TT a(0);
a==1?a:TT(0);
}
-----------------------------------------------------------
and this is the output of gcc-2.95.3:
-----------------------------------------------------------
wichmann@isis6:~/c>gcc -v --save-temps a.cc
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.95.3/specs
gcc version 2.95.3 19991030 (prerelease)
/usr/lib/gcc-lib/i386-redhat-linux/2.95.3/cpp -lang-c++ -v -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -D__ELF__ -Dunix -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__EXCEPTIONS -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ a.cc a.ii
GNU CPP version 2.95.3 19991030 (prerelease) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
/usr/include
/usr/lib/gcc-lib/i386-redhat-linux/2.95.3/include
/usr/include
End of search list.
The following default directories have been omitted from the search path:
/usr/lib/gcc-lib/i386-redhat-linux/2.95.3/../../../../include/g++-3
/usr/local/include
/usr/lib/gcc-lib/i386-redhat-linux/2.95.3/../../../../i386-redhat-linux/include
End of omitted list.
/usr/lib/gcc-lib/i386-redhat-linux/2.95.3/cc1plus a.ii -quiet -dumpbase a.cc -version -o a.s
GNU C++ version 2.95.3 19991030 (prerelease) (i386-redhat-linux) compiled by GNU C version 2.95.3 19991030 (prerelease).
bug.cc: In function `int main(...)':
bug.cc:8: Internal compiler error in `instantiate_virtual_regs_1', at function.c:3863
Please submit a full bug report.
See <URL: http://www.gnu.org/software/gcc/bugs.html > for instructions.
-----------------------------------------------------------
The code works with gcc-2.72.3
(tested gcc-2.72.3-linux-i386, gcc-2.72.3-linux-alpha),
but fails with an internal compiler error with gcc-2.9x
(tested egcs-2.91.57-linux-alpha, egcs-2.91.66-linux-i386,
gcc-2.95.2-linux-alpha, gcc-2.95.3-linux-i386).
Thank you for maintaining gcc!
Andreas Wichmann
--
----> Andreas Wichmann <----> http://www.itkp.uni-bonn.de/~wichmann <----
>From aoliva@redhat.com Thu Jul 27 14:26:00 2000
From: Alexandre Oliva <aoliva@redhat.com>
To: David Howells <David.Howells@nexor.co.uk>
Cc: gcc-bugs@gcc.gnu.org
Subject: Re: Strange g++ behaviour?
Date: Thu, 27 Jul 2000 14:26:00 -0000
Message-id: <or8zunw9hw.fsf@guarana.lsd.ic.unicamp.br>
References: <200007271107.IAA19770@cacau.lsd.ic.unicamp.br>
X-SW-Source: 2000-07/msg00729.html
Content-length: 883
On Jul 27, 2000, David Howells <David.Howells@nexor.co.uk> wrote:
> g++query.cpp:20: warning: choosing `comptr_t<int>::operator int *()' over `comptr_t<int>::operator bool() const'
> g++query.cpp:20: warning: for conversion from `pint' to `bool'
> Why is g++ reluctant to use the "operator bool() const" method?
You've already got the answer:
> g++query.cpp:20: warning: because conversion sequence for the argument is better
> And does it really need to give the warning message?
Nope, it's just that too many people ask this question, so we put the
answer in a warning message.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
^ permalink raw reply [flat|nested] 2+ messages in thread
* Internal compiler error in `instantiate_virtual_regs_1'
@ 1999-09-30 19:57 Daniel Rinehart
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Rinehart @ 1999-09-30 19:57 UTC (permalink / raw)
To: gcc-bugs
[-- Attachment #1: Type: text/plain, Size: 2872 bytes --]
In trying to compile jikes-1.04 from IBM on Solaris 2.6 I ran into an
internal compiler error.
-1825- betelgeuse (9:30am) /ccs/src/com/jikes/src/ > c++ --version
2.95.1
-1826- betelgeuse (9:30am) /ccs/src/com/jikes/src/ > uname -a
SunOS betelgeuse.ccs.neu.edu 5.6 Generic_105181-13 sun4u sparc
-1827- betelgeuse (9:31am) /ccs/src/com/jikes/src/ > c++ -funsigned-char -c
-ansi -DTYPE_bool -DUNIX -DBIGENDIAN -I/net/src/com/jikes/src -DTEST -g
/net/src/com/jikes/src/long.cpp
/net/src/com/jikes/src/long.cpp: In method `class BaseLong
BaseLong::operator <<(BaseLong)':
/net/src/com/jikes/src/long.cpp:112: Internal compiler error in
`instantiate_virtual_regs_1', at function.c:3862
Please submit a full bug report.
See <URL: http://www.gnu.org/software/gcc/faq.html#bugreport > for
instructions.
-1828- betelgeuse (9:31am) /ccs/src/com/jikes/src/ > c++ -v --save-temps
-funsigned-char -c -ansi -DTYPE_bool -DUNIX -DBIGENDIAN
-I/net/src/com/jikes/src -DTEST -g /net/src/com/jikes/src/long.cpp
Reading specs from
/arch/gnu/packages/gcc-2.95.1/lib/gcc-lib/sparc-sun-solaris2.6/2.95.1/specs
gcc version 2.95.1 19990816 (release)
/arch/gnu/packages/gcc-2.95.1/lib/gcc-lib/sparc-sun-solaris2.6/2.95.1/cpp
-lang-c++ -v -I/net/src/com/jikes/src -D__GNUC__=2 -D__GNUG__=2
-D__GNUC_MINOR__=95 -D__cplusplus -trigraphs -D__STRICT_ANSI__ -D__sparc__
-D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix
-Asystem(unix) -Asystem(svr4) -D__EXCEPTIONS -D__CHAR_UNSIGNED__ -g
-D__GCC_NEW_VARARGS__ -Acpu(sparc) -Amachine(sparc) -DTYPE_bool -DUNIX
-DBIGENDIAN -DTEST /net/src/com/jikes/src/long.cpp long.ii
GNU CPP version 2.95.1 19990816 (release) (sparc)
#include "..." search starts here:
#include <...> search starts here:
/net/src/com/jikes/src
/arch/gnu/packages/gcc-2.95.1/lib/gcc-lib/sparc-sun-solaris2.6/2.95.1/../../../../include/g++-3
/arch/gnu/packages/gcc-2.95.1/lib/gcc-lib/sparc-sun-solaris2.6/2.95.1/../../../../sparc-sun-solaris2.6/include
/arch/gnu/packages/gcc-2.95.1/lib/gcc-lib/sparc-sun-solaris2.6/2.95.1/include
/usr/include
End of search list.
The following default directories have been omitted from the search path:
/usr/local/include
End of omitted list.
/arch/gnu/packages/gcc-2.95.1/lib/gcc-lib/sparc-sun-solaris2.6/2.95.1/cc1plus
long.ii -quiet -dumpbase long.cc -g -ansi -version -funsigned-char -o
long.s
GNU C++ version 2.95.1 19990816 (release) (sparc-sun-solaris2.6) compiled
by GNU C version 2.95.1 19990816 (release).
/net/src/com/jikes/src/long.cpp: In method `class BaseLong
BaseLong::operator <<(BaseLong)':
/net/src/com/jikes/src/long.cpp:112: Internal compiler error in
`instantiate_virtual_regs_1', at function.c:3862
Please submit a full bug report.
See <URL: http://www.gnu.org/software/gcc/faq.html#bugreport > for
instructions.
- Daniel R. <danielr@ccs.neu.edu> [ http://www.ccs.neu.edu/home/danielr/ ]
long.ii.bz2
[-- Attachment #2: long.ii.bz2 --]
[-- Type: application/x-bzip2, Size: 16191 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-07-27 14:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-27 14:14 Internal compiler error in `instantiate_virtual_regs_1' Andreas Wichmann
-- strict thread matches above, loose matches on Subject: below --
1999-09-30 19:57 Daniel Rinehart
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).