public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gcc at abeckmann dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/56534] New: [4.7/4.8 Regression] ICE Segfault on invalid code in check_elaborated_type_specifier
Date: Tue, 05 Mar 2013 13:19:00 -0000	[thread overview]
Message-ID: <bug-56534-4@http.gcc.gnu.org/bugzilla/> (raw)


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

             Bug #: 56534
           Summary: [4.7/4.8 Regression] ICE Segfault on invalid code in
                    check_elaborated_type_specifier
    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 line of invalid code causes an ICE Segfault, this is a regression
from 4.6 behavior:

===== 8< =====
template < struct template rebind < >
===== >8 =====

$ g++-4.7.x -v -c ice-segfault.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='-v' '-c' '-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.cpp -quiet -dumpbase ice-segfault.cpp -mtune=generic -march=x86-64
-auxbase ice-segfault -version -o /tmp/ccr5sP7L.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.cpp:1:37: internal compiler error: Segmentation fault
Please submit a full bug report,

$ g++-trunk -v -c ice-segfault.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='-v' '-c' '-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.cpp -quiet -dumpbase ice-segfault.cpp -mtune=generic -march=x86-64
-auxbase ice-segfault -version -o /tmp/ccVB908D.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.cpp:1:37: internal compiler error: Segmentation fault
 template < struct template rebind < >
                                     ^
0xa7da8f crash_signal
        ../../gcc-trunk/gcc/toplev.c:332
0x5331de check_elaborated_type_specifier(tag_types, tree_node*, bool)
        ../../gcc-trunk/gcc/cp/decl.c:11731
0x61d1de cp_parser_elaborated_type_specifier
        ../../gcc-trunk/gcc/cp/parser.c:14256
0x5fad08 cp_parser_type_specifier
        ../../gcc-trunk/gcc/cp/parser.c:13601
0x6121ed cp_parser_decl_specifier_seq
        ../../gcc-trunk/gcc/cp/parser.c:10900
0x612887 cp_parser_parameter_declaration
        ../../gcc-trunk/gcc/cp/parser.c:17470
0x616d9e cp_parser_template_parameter
        ../../gcc-trunk/gcc/cp/parser.c:12254
0x616d9e cp_parser_template_parameter_list
        ../../gcc-trunk/gcc/cp/parser.c:12157
0x618de9 cp_parser_template_declaration_after_export
        ../../gcc-trunk/gcc/cp/parser.c:21769
0x6207f9 cp_parser_declaration
        ../../gcc-trunk/gcc/cp/parser.c:10309
0x61f3dd cp_parser_declaration_seq_opt
        ../../gcc-trunk/gcc/cp/parser.c:10231
0x620c82 cp_parser_translation_unit
        ../../gcc-trunk/gcc/cp/parser.c:3807
0x620c82 c_parse_file()
        ../../gcc-trunk/gcc/cp/parser.c:28182
0x728794 c_common_parse_file()
        ../../gcc-trunk/gcc/c-family/c-opts.c:1046
Please submit a full bug report,


$ g++-4.6.x -c ice-segfault.cpp 
ice-segfault.cpp:1:37: error: expected identifier at end of input
ice-segfault.cpp:1:37: error: expected ‘>’ at end of input
ice-segfault.cpp:1:37: error: expected unqualified-id at end of input


             reply	other threads:[~2013-03-05 13:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-05 13:19 gcc at abeckmann dot de [this message]
2013-03-05 13:31 ` [Bug c++/56534] " paolo.carlini at oracle dot com
2013-03-05 13:43 ` rguenth at gcc dot gnu.org
2013-03-05 16:37 ` paolo.carlini at oracle dot com
2013-03-06  8:40 ` jakub at gcc dot gnu.org
2013-03-06 10:13 ` paolo.carlini at oracle dot com
2013-03-06 23:41 ` paolo.carlini at oracle dot com
2013-03-06 23:48 ` paolo at gcc dot gnu.org
2013-03-07  0:38 ` [Bug c++/56534] [4.7 " paolo.carlini at oracle dot com
2013-03-09 10:32 ` paolo.carlini at oracle dot com
2013-03-09 11:49 ` paolo at gcc dot gnu.org
2013-03-09 11:50 ` paolo.carlini at oracle dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-56534-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).