Bug 18790 - ICE in make_decl_rtl
Summary: ICE in make_decl_rtl
Status: RESOLVED DUPLICATE of bug 16951
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-02 17:57 UTC by Dmitry Tsarkov
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Preprocessed sources (47.59 KB, application/x-bzip2)
2004-12-02 17:59 UTC, Dmitry Tsarkov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Tsarkov 2004-12-02 17:57:18 UTC
I discovered a bug on new mainline tree.  Use option -O3 to see the bug

> cat a.cpp
#include <string>

struct a
{
  int f ( const std::string& Id ) const;
  int f ( void ) const { return f ( "default" ); }
};

int a :: f ( const std::string& id ) const
{
  if ( id == "" )
    return f ();
  return 0;
}

> /mnt/d/gcc/bin/g++-4.0 -v -save-temps -O3 -c a.cpp
Reading specs from /mnt/d/gcc/lib/gcc/i686-pc-linux-gnu/4.0.0/specs
Configured with: ../gcc/configure --prefix=/mnt/d/gcc --enable-shared
--enable-threads --program-suffix=-4.0 --enable-__cxa_at
xit --disable-nls --enable-languages=c,c++,java : (reconfigured)
../gcc/configure --prefix=/mnt/d/gcc --enable-shared --enable
threads --program-suffix=-4.0 --enable-__cxa_atexit --disable-nls
--with-gcc-version-trigger=/mnt/d/.src/gcc-cvs/gcc/gcc/versi
n.c --enable-languages=c,c++,java --no-create --no-recursion
Thread model: posix
gcc version 4.0.0 20041202 (experimental)
 /mnt/d/gcc/libexec/gcc/i686-pc-linux-gnu/4.0.0/cc1plus -E -quiet -v
-D_GNU_SOURCE a.cpp -mtune=pentiumpro -O3 -fpch-preproces
 -o a.ii
ignoring nonexistent directory
"/mnt/d/gcc/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /mnt/d/gcc/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../include/c++/4.0.0
 /mnt/d/gcc/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../include/c++/4.0.0/i686-pc-linux-gnu
 /mnt/d/gcc/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../include/c++/4.0.0/backward
 /usr/local/include
 /mnt/d/gcc/include
 /mnt/d/gcc/lib/gcc/i686-pc-linux-gnu/4.0.0/include
 /usr/include
End of search list.
 /mnt/d/gcc/libexec/gcc/i686-pc-linux-gnu/4.0.0/cc1plus -fpreprocessed a.ii
-quiet -dumpbase a.cpp -mtune=pentiumpro -auxbase
 -O3 -version -o a.s
GNU C++ version 4.0.0 20041202 (experimental) (i686-pc-linux-gnu)
        compiled by GNU C version 4.0.0 20041202 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
/mnt/d/gcc/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../include/c++/4.0.0/bits/basic_string.h:
In member function 'int a::f(con
t std::string&) const':
/mnt/d/gcc/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../include/c++/4.0.0/bits/basic_string.h:2140:
internal compiler error: in
make_decl_rtl, at varasm.c:867
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Dmitry Tsarkov 2004-12-02 17:59:24 UTC
Created attachment 7662 [details]
Preprocessed sources
Comment 2 Andrew Pinski 2004-12-02 18:37:40 UTC

*** This bug has been marked as a duplicate of 16951 ***