public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/67935] New: internal compiler error: Segmentation fault
@ 2015-10-12 14:36 niqingliang2003 at gmail dot com
  2015-10-13  9:35 ` [Bug c++/67935] " niqingliang2003 at gmail dot com
  2015-10-15  9:12 ` paolo.carlini at oracle dot com
  0 siblings, 2 replies; 3+ messages in thread
From: niqingliang2003 at gmail dot com @ 2015-10-12 14:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67935

            Bug ID: 67935
           Summary: internal compiler error: Segmentation fault
           Product: gcc
           Version: 5.2.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: niqingliang2003 at gmail dot com
  Target Milestone: ---

Created attachment 36484
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36484&action=edit
compiled with command: g++ -std=c++11 main.cpp

main.cpp is the smallest code for generating the compiling error.
compile command: g++ -std=c++11 main.cpp
platform: archlinux
gcc version: 5.2

error info:
internal compiler error: Segmentation fault
  void serialize(_T & o)

workaround 1:
change 'typedef struct { ... } base_t' to 'typedef struct xxx {...} base_t'

workaround 2:
move the '#include <array>' in the first line.


when change the 'array' to 'vector' (both header and declaration of 'p' in
base_t), result become:

internal compiler error: Segmentation fault
 typedef struct {
                ^


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

* [Bug c++/67935] internal compiler error: Segmentation fault
  2015-10-12 14:36 [Bug c++/67935] New: internal compiler error: Segmentation fault niqingliang2003 at gmail dot com
@ 2015-10-13  9:35 ` niqingliang2003 at gmail dot com
  2015-10-15  9:12 ` paolo.carlini at oracle dot com
  1 sibling, 0 replies; 3+ messages in thread
From: niqingliang2003 at gmail dot com @ 2015-10-13  9:35 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 5945 bytes --]

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67935

Yi Qingliang <niqingliang2003 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #36484|0                           |1
        is obsolete|                            |
                 CC|                            |niqingliang2003 at gmail dot com

--- Comment #2 from Yi Qingliang <niqingliang2003 at gmail dot com> ---
Created attachment 36492
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36492&action=edit
the array version

the array version compile result:

$ gcc -v -save-temps -std=c++11 main.cpp 
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc/src/gcc-5.2.0/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --enable-libmpx --with-system-zlib --with-isl
--enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu
--disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object
--enable-linker-build-id --enable-lto --enable-plugin
--enable-install-libiberty --with-linker-hash-style=gnu
--enable-gnu-indirect-function --disable-multilib --disable-werror
--enable-checking=release --with-default-libstdcxx-abi=gcc4-compatible
Thread model: posix
gcc version 5.2.0 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++11' '-mtune=generic'
'-march=x86-64'
 /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/cc1plus -E -quiet -v -D_GNU_SOURCE
main.cpp -mtune=generic -march=x86-64 -std=c++11 -fpch-preprocess -o main.ii
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0

/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/x86_64-unknown-linux-gnu

/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/backward
 /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include
 /usr/local/include
 /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++11' '-mtune=generic'
'-march=x86-64'
 /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/cc1plus -fpreprocessed main.ii
-quiet -dumpbase main.cpp -mtune=generic -march=x86-64 -auxbase main -std=c++11
-version -o main.s
GNU C++11 (GCC) version 5.2.0 (x86_64-unknown-linux-gnu)
        compiled by GNU C version 5.2.0, GMP version 6.0.0, MPFR version
3.1.3-p4, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++11 (GCC) version 5.2.0 (x86_64-unknown-linux-gnu)
        compiled by GNU C version 5.2.0, GMP version 6.0.0, MPFR version
3.1.3-p4, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 9ed1d81099b98de89457560501a9ea0c
main.cpp: In substitution of ‘template<class _T> void base_t::serialize(_T&)
[with _T = packer_rp]’:
main.cpp:16:3:   required from ‘void packer_rp::pack_data(const _T&) [with _T =
base_t]’
main.cpp:6:3:   required from ‘void packer_rp::operator()(const _T&) [with _T =
base_t]’
main.cpp:45:3:   required from ‘void test::serialize(_T&) const [with _T =
packer_rp]’
main.cpp:53:30:   required from here
main.cpp:34:22: error: invalid use of ‘restrict’
  void serialize(_T & o)
>From gcc-bugs-return-499411-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 13 09:36:38 2015
Return-Path: <gcc-bugs-return-499411-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 29845 invoked by alias); 13 Oct 2015 09:36:38 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 29475 invoked by uid 48); 13 Oct 2015 09:36:34 -0000
From: "niqingliang2003 at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/67935] internal compiler error: Segmentation fault
Date: Tue, 13 Oct 2015 09:36:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 5.2.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: critical
X-Bugzilla-Who: niqingliang2003 at gmail dot com
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: attachments.created
Message-ID: <bug-67935-4-ZlMArIWlag@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-67935-4@http.gcc.gnu.org/bugzilla/>
References: <bug-67935-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-10/txt/msg00966.txt.bz2
Content-length: 298

https://gcc.gnu.org/bugzilla/show_bug.cgi?idg935

--- Comment #3 from Yi Qingliang <niqingliang2003 at gmail dot com> ---
Created attachment 36493
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id6493&actioníit
the array version 'save-temps' result

the array version 'save-temps' result


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

* [Bug c++/67935] internal compiler error: Segmentation fault
  2015-10-12 14:36 [Bug c++/67935] New: internal compiler error: Segmentation fault niqingliang2003 at gmail dot com
  2015-10-13  9:35 ` [Bug c++/67935] " niqingliang2003 at gmail dot com
@ 2015-10-15  9:12 ` paolo.carlini at oracle dot com
  1 sibling, 0 replies; 3+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-10-15  9:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67935

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|niqingliang2003 at gmail dot com   |
           Severity|critical                    |normal


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

end of thread, other threads:[~2015-10-15  9:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-12 14:36 [Bug c++/67935] New: internal compiler error: Segmentation fault niqingliang2003 at gmail dot com
2015-10-13  9:35 ` [Bug c++/67935] " niqingliang2003 at gmail dot com
2015-10-15  9:12 ` 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).