public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/46857] New: internal compiler error: Segmentation fault (in -std=c++0x mode)
@ 2010-12-08 23:45 gcc at abeckmann dot de
  2011-05-02 16:14 ` [Bug c++/46857] [C++0x] ICE: Segmentation fault paolo.carlini at oracle dot com
  0 siblings, 1 reply; 2+ messages in thread
From: gcc at abeckmann dot de @ 2010-12-08 23:45 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: internal compiler error: Segmentation fault (in
                    -std=c++0x mode)
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: gcc@abeckmann.de


The following piece of invalid code gives an ICE SIGSEGV when compiling in
c++0x mode:

===== 8< =====
template < class >
struct
pair
{
:
first ()
===== >8 =====

$ g++-trunk -c -std=c++0x ice-SIGSEGV-cxx0x.min.ii
ice-SIGSEGV-cxx0x.min.ii:6:8: error: there are no arguments to ‘first’ that
depend on a template parameter, so a declaration of ‘first’ must be available
[-fpermissive]
ice-SIGSEGV-cxx0x.min.ii:6:8: note: (if you use ‘-fpermissive’, G++ will accept
your code, but allowing the use of an undeclared name is deprecated)
ice-SIGSEGV-cxx0x.min.ii:6:8: error: ISO C++ forbids declaration of ‘type name’
with no type [-fpermissive]
ice-SIGSEGV-cxx0x.min.ii:6:8: internal compiler error: Segmentation fault
Please submit a full bug report,

$ g++-trunk -c ice-SIGSEGV-cxx0x.min.ii
ice-SIGSEGV-cxx0x.min.ii:6:8: error: a function call cannot appear in a
constant-expression
ice-SIGSEGV-cxx0x.min.ii:6:8: error: ISO C++ forbids declaration of ‘type name’
with no type [-fpermissive]
ice-SIGSEGV-cxx0x.min.ii:6:8: error: expected ‘;’ at end of member declaration
ice-SIGSEGV-cxx0x.min.ii:6:8: error: expected ‘}’ at end of input
ice-SIGSEGV-cxx0x.min.ii:6:8: error: expected ‘;’ after struct definition

$ g++-4.5.x -c -std=c++0x ice-SIGSEGV-cxx0x.min.ii
ice-SIGSEGV-cxx0x.min.ii:6:8: error: a function call cannot appear in a
constant-expression
ice-SIGSEGV-cxx0x.min.ii:6:8: error: ISO C++ forbids declaration of ‘type name’
with no type
ice-SIGSEGV-cxx0x.min.ii:6:8: error: expected ‘;’ at end of input
ice-SIGSEGV-cxx0x.min.ii:6:8: error: expected ‘;’ at end of input
ice-SIGSEGV-cxx0x.min.ii:6:8: error: expected ‘}’ at end of input
ice-SIGSEGV-cxx0x.min.ii:6:8: error: expected unqualified-id at end of input

$ g++-trunk -v -c -std=c++0x ice-SIGSEGV-cxx0x.min.ii
Using built-in specs.
COLLECT_GCC=/opt/software/x86_64/gcc-trunk/bin/g++-trunk
COLLECT_LTO_WRAPPER=/opt/software/x86_64/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper
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++ --enable-checking
Thread model: posix
gcc version 4.6.0 20101207 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-v' '-c' '-std=c++0x' '-shared-libgcc' '-mtune=generic'
'-march=x86-64'

/opt/software/x86_64/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/cc1plus
-fpreprocessed ice-SIGSEGV-cxx0x.min.ii -quiet -dumpbase
ice-SIGSEGV-cxx0x.min.ii -mtune=generic -march=x86-64 -auxbase
ice-SIGSEGV-cxx0x.min -std=c++0x -version -o /tmp/ccK3LaxI.s
GNU C++ (GCC) version 4.6.0 20101207 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.6.0 20101207 (experimental), 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
GNU C++ (GCC) version 4.6.0 20101207 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.6.0 20101207 (experimental), 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: 58dd45b357216c1e9d23aab2b8f87581
ice-SIGSEGV-cxx0x.min.ii:6:8: error: there are no arguments to ‘first’ that
depend on a template parameter, so a declaration of ‘first’ must be available
[-fpermissive]
ice-SIGSEGV-cxx0x.min.ii:6:8: note: (if you use ‘-fpermissive’, G++ will accept
your code, but allowing the use of an undeclared name is deprecated)
ice-SIGSEGV-cxx0x.min.ii:6:8: error: ISO C++ forbids declaration of ‘type name’
with no type [-fpermissive]
ice-SIGSEGV-cxx0x.min.ii:6:8: internal compiler error: Segmentation fault
Please submit a full bug report,


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

* [Bug c++/46857] [C++0x] ICE: Segmentation fault
  2010-12-08 23:45 [Bug c++/46857] New: internal compiler error: Segmentation fault (in -std=c++0x mode) gcc at abeckmann dot de
@ 2011-05-02 16:14 ` paolo.carlini at oracle dot com
  0 siblings, 0 replies; 2+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-05-02 16:14 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
      Known to work|                            |4.6.1, 4.7.0
         Resolution|                            |WORKSFORME

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-05-02 16:13:06 UTC ---
Mainline and 4_6-branch are currently fine.


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

end of thread, other threads:[~2011-05-02 16:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-08 23:45 [Bug c++/46857] New: internal compiler error: Segmentation fault (in -std=c++0x mode) gcc at abeckmann dot de
2011-05-02 16:14 ` [Bug c++/46857] [C++0x] ICE: Segmentation fault paolo.carlini at oracle dot com

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