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]
Other format: [Raw text]

[Bug c++/11670] New: ICE in convert_like_real on illegal code


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11670

           Summary: ICE in convert_like_real on illegal code
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: redi at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-unknown-freebsd4.8
  GCC host triplet: i386-unknown-freebsd4.8
GCC target triplet: i386-unknown-freebsd4.8

The following _illegal_ code causes an ICE with latest CVS build as of today.
GCC 2.95, 3.0.4 and 3.2 compile it happily, without any errors or warnings.

$ cat ice.cc
struct A {};
struct B : A {};
B*& f()
{
    B b;
    A* ap = &b;
    return static_cast<B*>(ap);
}

$ g++3 -v
Reading specs from
/data/development/jw/gcc3/bin/../lib/gcc-lib/i386-unknown-freebsd4.8/3.4/specs
Configured with: /home/jw/src/cvs/gcc/configure --prefix=/home/jw/gcc3/
--enable-languages=c,c++ --enable-concept-checks --enable-libstdcxx-pch
Thread model: posix
gcc version 3.4 20030725 (experimental)
$ g++3 ice.cc -c
ice.cc: In function `B*& f()':
ice.cc:7: internal compiler error: in convert_like_real, at cp/call.c:4131
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
$


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