public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59955] New: G++ 4.8 internal compiler error: Segmentation fault on (re?)defining a struct template as function template, when inside a struct tempate
@ 2014-01-27 10:49 wouter at voti dot nl
  2014-01-27 10:54 ` [Bug c++/59955] " wouter at voti dot nl
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: wouter at voti dot nl @ 2014-01-27 10:49 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59955
           Summary: G++ 4.8 internal compiler error: Segmentation fault on
                    (re?)defining a struct template as function template,
                    when inside a struct tempate
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: wouter at voti dot nl

Created attachment 31960
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31960&action=edit
then offending source file

The following code gives an 
   internal compiler error: Segmentation fault

template< int xyz >
struct wovo {

   template< int n >
   void us(){}

   template< int n >
   struct us< n > {};
};

using G++ 4.8 cross-compiler for ARM, running on Windows

"C:/Program Files (x86)/GNU Tools ARM Embedded/4.8
2013q4/bin/arm-none-eabi-g++" -fno-builtin -nostartfiles -fno-exceptions 
-mcpu=cortex-m0 -mthumb -fomit-frame-pointer -fno-threadsafe-statics
-fno-use-cxa-get-exception-ptr -I. -Ic:/bmptk/bmptk/bmptk/bmptk  -Ichips 
-Itargets -Ic:/bmptk/bmptk/bmptk/bmptk/stdlib
-Ic:/bmptk/bmptk/bmptk/bmptk/targets/cortex/cmsis
-Ic:/bmptk/bmptk/bmptk/bmptk/targets/cortex
-Ic:/bmptk/bmptk/bmptk/bmptk/targets/cortex/cmsis/11xx/inc -DLANGUAGE_CPP   
-DBMPTK_EMBEDDED_HEAP -DBMPTK_TARGET=db103 -DBMPTK_TARGET_db103
-DBMPTK_CHIP=lpc1114fn28 -DBMPTK_CHIP_lpc1114fn28 -DBMPTK_XTAL=12000000
-DBMPTK_BAUDRATE=38400 -DBMPTK_VERSION=V02.00-work-in-progress-2013-11-11
-DBMPTK_TICKS_PER_US=6 -DBMPTK_GRAPHICS -Ic:/bmptk/bmptk/bmptk/bmptk  -Werror 
-fno-rtti -fno-exceptions  -std=c++11 -Wall  -Wno-unused-local-typedefs
-Wno-unused-function -fdata-sections -ffunction-sections -Os  -c -o main.o
main.cpp


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

* [Bug c++/59955] G++ 4.8 internal compiler error: Segmentation fault on (re?)defining a struct template as function template, when inside a struct tempate
  2014-01-27 10:49 [Bug c++/59955] New: G++ 4.8 internal compiler error: Segmentation fault on (re?)defining a struct template as function template, when inside a struct tempate wouter at voti dot nl
@ 2014-01-27 10:54 ` wouter at voti dot nl
  2014-01-28  6:01 ` y.gribov at samsung dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: wouter at voti dot nl @ 2014-01-27 10:54 UTC (permalink / raw)
  To: gcc-bugs

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

Wouter van Ooijen <wouter at voti dot nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |ARM
               Host|                            |windows
            Version|unknown                     |4.8.3

--- Comment #1 from Wouter van Ooijen <wouter at voti dot nl> ---
-v retrun:

Using built-in specs.
COLLECT_GCC=arm-none-eabi-g++
Target: arm-none-eabi
Configured with: /home/build/work/GCC-4-8-build/src/gcc/configure
--build=i686-linux-gnu --host=i586-mingw32 --target=arm-none-eabi
--prefix=/home/build/work/GCC-4-8-build/install-mingw
--libexecdir=/home/build/work/GCC-4-8-build/install-mingw/lib
--infodir=/home/build/work/GCC-4-8-build/install-mingw/share/doc/gcc-arm-none-eabi/info
--mandir=/home/build/work/GCC-4-8-build/install-mingw/share/doc/gcc-arm-none-eabi/man
--htmldir=/home/build/work/GCC-4-8-build/install-mingw/share/doc/gcc-arm-none-eabi/html
--pdfdir=/home/build/work/GCC-4-8-build/install-mingw/share/doc/gcc-arm-none-eabi/pdf
--enable-languages=c,c++ --disable-decimal-float --disable-libffi
--disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp
--disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads
--disable-tls --with-gnu-as --with-gnu-ld --with-headers=yes --with-newlib
--with-python-dir=share/gcc-arm-none-eabi
--with-sysroot=/home/build/work/GCC-4-8-build/install-mingw/arm-none-eabi
--with-libiconv-prefix=/home/build/work/GCC-4-8-build/build-mingw/host-libs/usr
--with-gmp=/home/build/work/GCC-4-8-build/build-mingw/host-libs/usr
--with-mpfr=/home/build/work/GCC-4-8-build/build-mingw/host-libs/usr
--with-mpc=/home/build/work/GCC-4-8-build/build-mingw/host-libs/usr
--with-isl=/home/build/work/GCC-4-8-build/build-mingw/host-libs/usr
--with-cloog=/home/build/work/GCC-4-8-build/build-mingw/host-libs/usr
--with-libelf=/home/build/work/GCC-4-8-build/build-mingw/host-libs/usr
--with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm'
--with-pkgversion='GNU Tools for ARM Embedded Processors'
--with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r
Thread model: single
gcc version 4.8.3 20131129 (release) [ARM/embedded-4_8-branch revision 205641]
(GNU Tools for ARM Embedded Processors)


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

* [Bug c++/59955] G++ 4.8 internal compiler error: Segmentation fault on (re?)defining a struct template as function template, when inside a struct tempate
  2014-01-27 10:49 [Bug c++/59955] New: G++ 4.8 internal compiler error: Segmentation fault on (re?)defining a struct template as function template, when inside a struct tempate wouter at voti dot nl
  2014-01-27 10:54 ` [Bug c++/59955] " wouter at voti dot nl
@ 2014-01-28  6:01 ` y.gribov at samsung dot com
  2014-01-29 13:52 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: y.gribov at samsung dot com @ 2014-01-28  6:01 UTC (permalink / raw)
  To: gcc-bugs

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

Yury Gribov <y.gribov at samsung dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |y.gribov at samsung dot com

--- Comment #2 from Yury Gribov <y.gribov at samsung dot com> ---
Reproduced in trunk (both ARM and x64).


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

* [Bug c++/59955] G++ 4.8 internal compiler error: Segmentation fault on (re?)defining a struct template as function template, when inside a struct tempate
  2014-01-27 10:49 [Bug c++/59955] New: G++ 4.8 internal compiler error: Segmentation fault on (re?)defining a struct template as function template, when inside a struct tempate wouter at voti dot nl
  2014-01-27 10:54 ` [Bug c++/59955] " wouter at voti dot nl
  2014-01-28  6:01 ` y.gribov at samsung dot com
@ 2014-01-29 13:52 ` rguenth at gcc dot gnu.org
  2015-01-09 17:02 ` [Bug c++/59955] " paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-01-29 13:52 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-01-29
     Ever confirmed|0                           |1

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.  Crashes only with -std=c++11, otherwise is rejected.


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

* [Bug c++/59955] Segmentation fault on (re?)defining a struct template as function template, when inside a struct tempate
  2014-01-27 10:49 [Bug c++/59955] New: G++ 4.8 internal compiler error: Segmentation fault on (re?)defining a struct template as function template, when inside a struct tempate wouter at voti dot nl
                   ` (2 preceding siblings ...)
  2014-01-29 13:52 ` rguenth at gcc dot gnu.org
@ 2015-01-09 17:02 ` paolo.carlini at oracle dot com
  2015-04-30  8:57 ` paolo.carlini at oracle dot com
  2015-04-30  9:04 ` paolo at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-01-09 17:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |paolo.carlini at oracle dot com

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Mine.


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

* [Bug c++/59955] Segmentation fault on (re?)defining a struct template as function template, when inside a struct tempate
  2014-01-27 10:49 [Bug c++/59955] New: G++ 4.8 internal compiler error: Segmentation fault on (re?)defining a struct template as function template, when inside a struct tempate wouter at voti dot nl
                   ` (3 preceding siblings ...)
  2015-01-09 17:02 ` [Bug c++/59955] " paolo.carlini at oracle dot com
@ 2015-04-30  8:57 ` paolo.carlini at oracle dot com
  2015-04-30  9:04 ` paolo at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-04-30  8:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> ---
This is already fixed in mainline, I'm adding the testcase and closing the bug.


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

* [Bug c++/59955] Segmentation fault on (re?)defining a struct template as function template, when inside a struct tempate
  2014-01-27 10:49 [Bug c++/59955] New: G++ 4.8 internal compiler error: Segmentation fault on (re?)defining a struct template as function template, when inside a struct tempate wouter at voti dot nl
                   ` (4 preceding siblings ...)
  2015-04-30  8:57 ` paolo.carlini at oracle dot com
@ 2015-04-30  9:04 ` paolo at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: paolo at gcc dot gnu.org @ 2015-04-30  9:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Thu Apr 30 09:04:04 2015
New Revision: 222612

URL: https://gcc.gnu.org/viewcvs?rev=222612&root=gcc&view=rev
Log:
2015-04-30  Paolo Carlini  <paolo.carlini@oracle.com>

        PR c++/59955
        * g++.dg/template/crash121.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/template/crash121.C
Modified:
    trunk/gcc/testsuite/ChangeLog


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

end of thread, other threads:[~2015-04-30  9:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-27 10:49 [Bug c++/59955] New: G++ 4.8 internal compiler error: Segmentation fault on (re?)defining a struct template as function template, when inside a struct tempate wouter at voti dot nl
2014-01-27 10:54 ` [Bug c++/59955] " wouter at voti dot nl
2014-01-28  6:01 ` y.gribov at samsung dot com
2014-01-29 13:52 ` rguenth at gcc dot gnu.org
2015-01-09 17:02 ` [Bug c++/59955] " paolo.carlini at oracle dot com
2015-04-30  8:57 ` paolo.carlini at oracle dot com
2015-04-30  9:04 ` paolo 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).