public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/45894] New: ICE: segmentation fault with -Wall
@ 2010-10-05 12:47 gcc at abeckmann dot de
  2010-10-05 13:08 ` [Bug c++/45894] [4.5/4.6 Regression] [C++0x] " redi at gcc dot gnu.org
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: gcc at abeckmann dot de @ 2010-10-05 12:47 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: ICE: segmentation fault with -Wall
           Product: gcc
           Version: 4.5.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: gcc@abeckmann.de


I get an "internal compiler error: Segmentation fault" when compiling this code
with 4.5.2/4.6.0 and -Wall. The problem disappears if I remove -Wall.
4.4.5 and 4.3.x report "error: statement cannot resolve address of overloaded
function"

========== 8< ===========
struct FOO
{
        template < typename = void >
        void Bar () ;
} ;
template < typename = void >
struct V
{
        V ( const V &)
        {
                FOO :: Bar < > ;
        }
} ;
struct C
{
        V < > v ;
} ;
struct B
{
        C f () ;
} ;
struct A
{
        C c ;
        B b ;
        A () : c ( b . f () )
        { }
} ;
========== >8 ===========

$ g++-4.5.x -v -std=c++0x -Wall -c segfault-ice.min.cpp
Using built-in specs.
COLLECT_GCC=/opt/software/x86_64/gcc-4.5.x/bin/g++-4.5.x
COLLECT_LTO_WRAPPER=/opt/software/x86_64/gcc-4.5.x/libexec/gcc/x86_64-unknown-linux-gnu/4.5.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4_5-branch/configure
--prefix=/opt/software/x86_64/gcc-4.5.x --program-suffix=-4.5.x
--enable-languages=c,c++ --enable-checking
Thread model: posix
gcc version 4.5.2 20101004 (prerelease) (GCC)
COLLECT_GCC_OPTIONS='-v' '-std=c++0x' '-Wall' '-c' '-shared-libgcc'
'-mtune=generic' '-march=x86-64'

/opt/software/x86_64/gcc-4.5.x/libexec/gcc/x86_64-unknown-linux-gnu/4.5.2/cc1plus
-quiet -v -D_GNU_SOURCE segfault-ice.min.cpp -quiet -dumpbase
segfault-ice.min.cpp -mtune=generic -march=x86-64 -auxbase segfault-ice.min
-Wall -std=c++0x -version -o /tmp/cco6qHiQ.s
GNU C++ (GCC) version 4.5.2 20101004 (prerelease) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.5.2 20101004 (prerelease), GMP version
4.3.2, MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
ignoring nonexistent directory
"/opt/software/x86_64/gcc-4.5.x/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:

/opt/software/x86_64/gcc-4.5.x/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../include/c++/4.5.2

/opt/software/x86_64/gcc-4.5.x/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../include/c++/4.5.2/x86_64-unknown-linux-gnu

/opt/software/x86_64/gcc-4.5.x/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../include/c++/4.5.2/backward
 /usr/local/include
 /opt/software/x86_64/gcc-4.5.x/include
 /opt/software/x86_64/gcc-4.5.x/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/include

/opt/software/x86_64/gcc-4.5.x/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/include-fixed
 /usr/include
End of search list.
GNU C++ (GCC) version 4.5.2 20101004 (prerelease) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.5.2 20101004 (prerelease), GMP version
4.3.2, MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 8c3e00fe3cfb9293e6e3b31a6f7f6d80
segfault-ice.min.cpp: In copy constructor ‘V< <template-parameter-1-1>
>::V(const V< <template-parameter-1-1> >&)’:
segfault-ice.min.cpp:11:18: warning: statement is a reference, not call, to
function ‘FOO::Bar [with <template-parameter-1-1> = void]’
segfault-ice.min.cpp: In copy constructor ‘V< <template-parameter-1-1>
>::V(const V< <template-parameter-1-1> >&) [with <template-parameter-1-1> =
void, V< <template-parameter-1-1> > = V<>]’:
segfault-ice.min.cpp:15:1:   instantiated from here
segfault-ice.min.cpp:11:3: internal compiler error: Segmentation fault
Please submit a full bug report,


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2011-02-03 22:35 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-05 12:47 [Bug c++/45894] New: ICE: segmentation fault with -Wall gcc at abeckmann dot de
2010-10-05 13:08 ` [Bug c++/45894] [4.5/4.6 Regression] [C++0x] " redi at gcc dot gnu.org
2010-10-05 13:33 ` paolo.carlini at oracle dot com
2010-10-05 13:41 ` redi at gcc dot gnu.org
2010-10-06  2:05 ` hjl.tools at gmail dot com
2010-10-06 10:32 ` rguenth at gcc dot gnu.org
2010-10-26 13:35 ` jakub at gcc dot gnu.org
2010-11-05 12:50 ` jakub at gcc dot gnu.org
2010-11-08 14:28 ` dodji at gcc dot gnu.org
2010-11-08 17:40 ` jakub at gcc dot gnu.org
2010-11-09 11:53 ` jakub at gcc dot gnu.org
2010-11-09 11:56 ` [Bug c++/45894] [4.5 " jakub at gcc dot gnu.org
2010-11-09 11:57 ` jakub at gcc dot gnu.org
2010-11-11 20:42 ` jakub at gcc dot gnu.org
2010-11-11 22:14 ` jakub at gcc dot gnu.org
2011-02-02 16:08 ` redi at gcc dot gnu.org
2011-02-02 16:28 ` redi at gcc dot gnu.org
2011-02-02 17:08 ` redi at gcc dot gnu.org
2011-02-03 22:35 ` redi at gcc dot gnu.org

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).