public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/56543] New: [4.7.3/4.8 Regression] ICE on valid code in copy_node_stat
@ 2013-03-05 17:52 gcc at abeckmann dot de
  2013-03-05 19:19 ` [Bug c++/56543] [4.7/4.8 " paolo.carlini at oracle dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: gcc at abeckmann dot de @ 2013-03-05 17:52 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56543
           Summary: [4.7.3/4.8 Regression] ICE on valid code in
                    copy_node_stat
    Classification: Unclassified
           Product: gcc
           Version: 4.7.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: gcc@abeckmann.de


The following useless but valid piece of code causes a ICE Segfault in 4.8
(SVN) and 4.7.3 (SVN). It is accepted by 4.6.4 (SVN) and 4.7.2.

===== 8< =====
template < typename > struct S ;
template < typename T > struct U {
        typedef typename S < T > :: template V < > W ;
        S < W > x;
};
===== >8 =====


$ g++-trunk -c -v ice-segfault-copy_node_stat.cpp 
Using built-in specs.
COLLECT_GCC=/opt/software/x86_64/gcc-trunk/bin/g++-trunk
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/opt/software/x86_64/gcc-trunk
--program-suffix=-trunk --enable-languages=c,c++,fortran --enable-checking
Thread model: posix
gcc version 4.8.0 20130302 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-c' '-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64'

/opt/software/x86_64/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/cc1plus
-quiet -v -imultilib . -imultiarch x86_64-linux-gnu -D_GNU_SOURCE
ice-segfault-copy_node_stat.cpp -quiet -dumpbase
ice-segfault-copy_node_stat.cpp -mtune=generic -march=x86-64 -auxbase
ice-segfault-copy_node_stat -version -o /tmp/ccZwWTct.s
GNU C++ (GCC) version 4.8.0 20130302 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.8.0 20130302 (experimental), GMP version
5.0.5, MPFR version 3.1.0-p10, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory
"/opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:

/opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0

/opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/x86_64-unknown-linux-gnu/.

/opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/backward
 /opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/include
 /usr/local/include
 /opt/software/x86_64/gcc-trunk/include

/opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
GNU C++ (GCC) version 4.8.0 20130302 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.8.0 20130302 (experimental), GMP version
5.0.5, MPFR version 3.1.0-p10, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: eedf9bce273f5c2d2f3e6a014c94ec56
ice-segfault-copy_node_stat.cpp:4:8: internal compiler error: Segmentation
fault
  S < W > x;
        ^
0xa7da8f crash_signal
        ../../gcc-trunk/gcc/toplev.c:332
0xc656bd copy_node_stat(tree_node*)
        ../../gcc-trunk/gcc/tree.c:947
0x6a1819 strip_typedefs(tree_node*)
        ../../gcc-trunk/gcc/cp/tree.c:1228
0x54b82c canonicalize_type_argument
        ../../gcc-trunk/gcc/cp/pt.c:6136
0x584e1d coerce_template_parms
        ../../gcc-trunk/gcc/cp/pt.c:6706
0x586dc8 lookup_template_class_1
        ../../gcc-trunk/gcc/cp/pt.c:7265
0x586dc8 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
        ../../gcc-trunk/gcc/cp/pt.c:7562
0x677fb2 finish_template_type(tree_node*, tree_node*, int)
        ../../gcc-trunk/gcc/cp/semantics.c:2806
0x611528 cp_parser_template_id
        ../../gcc-trunk/gcc/cp/parser.c:12710
0x6118c2 cp_parser_class_name
        ../../gcc-trunk/gcc/cp/parser.c:18109
0x606dbb cp_parser_qualifying_entity
        ../../gcc-trunk/gcc/cp/parser.c:5275
0x606dbb cp_parser_nested_name_specifier_opt
        ../../gcc-trunk/gcc/cp/parser.c:5006
0x6077db cp_parser_nested_name_specifier
        ../../gcc-trunk/gcc/cp/parser.c:5199
0x6173bb cp_parser_using_declaration
        ../../gcc-trunk/gcc/cp/parser.c:15174
0x5f9d11 cp_parser_member_declaration
        ../../gcc-trunk/gcc/cp/parser.c:19127
0x5fb036 cp_parser_member_specification_opt
        ../../gcc-trunk/gcc/cp/parser.c:18990
0x5fb036 cp_parser_class_specifier_1
        ../../gcc-trunk/gcc/cp/parser.c:18243
0x5fb036 cp_parser_class_specifier
        ../../gcc-trunk/gcc/cp/parser.c:18459
0x5fb036 cp_parser_type_specifier
        ../../gcc-trunk/gcc/cp/parser.c:13573
0x6121ed cp_parser_decl_specifier_seq
        ../../gcc-trunk/gcc/cp/parser.c:10900
Please submit a full bug report,


$ g++-4.7.x -c -v ice-segfault-copy_node_stat.cpp 
Using built-in specs.
COLLECT_GCC=/opt/software/x86_64/gcc-4.7.x/bin/g++-4.7.x
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4_7-branch/configure
--prefix=/opt/software/x86_64/gcc-4.7.x --program-suffix=-4.7.x
--enable-languages=c,c++,fortran --enable-checking
Thread model: posix
gcc version 4.7.3 20130304 (prerelease) (GCC) 
COLLECT_GCC_OPTIONS='-c' '-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64'

/opt/software/x86_64/gcc-4.7.x/libexec/gcc/x86_64-unknown-linux-gnu/4.7.3/cc1plus
-quiet -v -imultilib . -imultiarch x86_64-linux-gnu -D_GNU_SOURCE
ice-segfault-copy_node_stat.cpp -quiet -dumpbase
ice-segfault-copy_node_stat.cpp -mtune=generic -march=x86-64 -auxbase
ice-segfault-copy_node_stat -version -o /tmp/ccFlTqAG.s
GNU C++ (GCC) version 4.7.3 20130304 (prerelease) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.7.3 20130304 (prerelease), GMP version
5.0.5, MPFR version 3.1.0-p10, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory
"/opt/software/x86_64/gcc-4.7.x/lib/gcc/x86_64-unknown-linux-gnu/4.7.3/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:

/opt/software/x86_64/gcc-4.7.x/lib/gcc/x86_64-unknown-linux-gnu/4.7.3/../../../../include/c++/4.7.3

/opt/software/x86_64/gcc-4.7.x/lib/gcc/x86_64-unknown-linux-gnu/4.7.3/../../../../include/c++/4.7.3/x86_64-unknown-linux-gnu/.

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

/opt/software/x86_64/gcc-4.7.x/lib/gcc/x86_64-unknown-linux-gnu/4.7.3/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
GNU C++ (GCC) version 4.7.3 20130304 (prerelease) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.7.3 20130304 (prerelease), GMP version
5.0.5, MPFR version 3.1.0-p10, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 52ed9e0a10a946085ed136449fb02111
ice-segfault-copy_node_stat.cpp:4:8: internal compiler error: Segmentation
fault
Please submit a full bug report,


$ g++-4.7.2 -v -c ice-segfault-copy_node_stat.cpp
Using built-in specs.
COLLECT_GCC=/opt/software/x86_64/gcc-4.7.2/bin/g++-4.7.2
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.7.2/configure --prefix=/opt/software/x86_64/gcc-4.7.2
--program-suffix=-4.7.2 --enable-languages=c,c++,fortran --enable-checking
Thread model: posix
gcc version 4.7.2 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'

/opt/software/x86_64/gcc-4.7.2/libexec/gcc/x86_64-unknown-linux-gnu/4.7.2/cc1plus
-quiet -v -imultilib . -imultiarch x86_64-linux-gnu -D_GNU_SOURCE
ice-segfault-copy_node_stat.cpp -quiet -dumpbase
ice-segfault-copy_node_stat.cpp -mtune=generic -march=x86-64 -auxbase
ice-segfault-copy_node_stat -version -o /tmp/ccgUf6nF.s
GNU C++ (GCC) version 4.7.2 (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.7.2, GMP version 5.0.5, MPFR version
3.1.0-p10, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory
"/opt/software/x86_64/gcc-4.7.2/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:

/opt/software/x86_64/gcc-4.7.2/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/../../../../include/c++/4.7.2

/opt/software/x86_64/gcc-4.7.2/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/../../../../include/c++/4.7.2/x86_64-unknown-linux-gnu/.

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

/opt/software/x86_64/gcc-4.7.2/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
GNU C++ (GCC) version 4.7.2 (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.7.2, GMP version 5.0.5, MPFR version
3.1.0-p10, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: cc1c0902ebb852228365f0297d9b51e8
COLLECT_GCC_OPTIONS='-v' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
 as -v --64 -o ice-segfault-copy_node_stat.o /tmp/ccgUf6nF.s
GNU assembler version 2.22 (x86_64-linux-gnu) using BFD version (GNU Binutils
for Debian) 2.22
COMPILER_PATH=/opt/software/x86_64/gcc-4.7.2/libexec/gcc/x86_64-unknown-linux-gnu/4.7.2/:/opt/software/x86_64/gcc-4.7.2/libexec/gcc/x86_64-unknown-linux-gnu/4.7.2/:/opt/software/x86_64/gcc-4.7.2/libexec/gcc/x86_64-unknown-linux-gnu/:/opt/software/x86_64/gcc-4.7.2/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/:/opt/software/x86_64/gcc-4.7.2/lib/gcc/x86_64-unknown-linux-gnu/
LIBRARY_PATH=/opt/software/x86_64/gcc-4.7.2/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/:/opt/software/x86_64/gcc-4.7.2/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/../../../../lib64/:/lib/x86_64-linux-gnu/:/lib/../lib64/:/usr/lib/x86_64-linux-gnu/:/opt/software/x86_64/gcc-4.7.2/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
$ echo $?
0


$ g++-4.6.x -W -Wall -c ice-segfault-copy_node_stat.cpp ; echo $?
0


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

end of thread, other threads:[~2013-03-06 15:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-05 17:52 [Bug c++/56543] New: [4.7.3/4.8 Regression] ICE on valid code in copy_node_stat gcc at abeckmann dot de
2013-03-05 19:19 ` [Bug c++/56543] [4.7/4.8 " paolo.carlini at oracle dot com
2013-03-06  7:45 ` jakub at gcc dot gnu.org
2013-03-06  8:57 ` rguenth at gcc dot gnu.org
2013-03-06 11:07 ` mpolacek at gcc dot gnu.org
2013-03-06 11:14 ` jakub at gcc dot gnu.org
2013-03-06 14:28 ` jason at gcc dot gnu.org
2013-03-06 14:31 ` jakub at gcc dot gnu.org
2013-03-06 15:19 ` jakub at gcc dot gnu.org
2013-03-06 15:28 ` jakub at gcc dot gnu.org
2013-03-06 15:33 ` jakub 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).