public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59004] New: ICE generated by __func__
@ 2013-11-05 13:22 bmerry at gmail dot com
  2013-11-05 13:32 ` [Bug c++/59004] " daniel.kruegler at googlemail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: bmerry at gmail dot com @ 2013-11-05 13:22 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59004
           Summary: ICE generated by __func__
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bmerry at gmail dot com

Created attachment 31159
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31159&action=edit
Preprocessed source

This minimal example causes GCC to ICE:


template<int z> class A {};

template<int x>
class B {
public:
    static const int y = (x != -1 ? 0 : 0);

    template<int z> void g(const A<y> &a) {
        const char *x = __func__;
    }
};
template void B<0>::g<0>(const A<0> &);


Error message when compiling with "g++ -c ice_func.cpp":

ice_func.cpp: In member function ‘void B<x>::g(const A<B<x>::y>&) [with int z =
0; int x = 0]’:
ice_func.cpp:9:25: internal compiler error: Segmentation fault
         const char *x = __func__;
                         ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.
Preprocessed source stored into /tmp/ccseXGe8.out file, please attach this to
your bugreport.


GCC info:

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.8.1-10ubuntu8' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.8 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin
--with-system-zlib --disable-browser-plugin --enable-java-awt=gtk
--enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre
--enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu8)
>From gcc-bugs-return-433556-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Nov 05 13:25:02 2013
Return-Path: <gcc-bugs-return-433556-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 30497 invoked by alias); 5 Nov 2013 13:25:02 -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 27475 invoked by uid 48); 5 Nov 2013 13:23:00 -0000
From: "mtewoodbury at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug preprocessor/58687] "#line __LINE__ ..." changes subsequent line numbers
Date: Tue, 05 Nov 2013 13:25:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: preprocessor
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mtewoodbury at gmail dot com
X-Bugzilla-Status: UNCONFIRMED
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:
Message-ID: <bug-58687-4-WFkUzlqJMO@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58687-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58687-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: 2013-11/txt/msg00333.txt.bz2
Content-length: 224

http://gcc.gnu.org/bugzilla/show_bug.cgi?idX687

--- Comment #17 from Max TenEyck Woodbury <mtewoodbury at gmail dot com> ---
It might be better to put the CUR__LINE__ definition in 'internal.h' instead of
in 'cpplib.h'.


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

* [Bug c++/59004] ICE generated by __func__
  2013-11-05 13:22 [Bug c++/59004] New: ICE generated by __func__ bmerry at gmail dot com
@ 2013-11-05 13:32 ` daniel.kruegler at googlemail dot com
  2014-02-14 20:02 ` [Bug c++/59004] [4.8 Regression] " reichelt at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2013-11-05 13:32 UTC (permalink / raw)
  To: gcc-bugs

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

Daniel Krügler <daniel.kruegler at googlemail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |daniel.kruegler@googlemail.
                   |                            |com

--- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
Let me add that the code itself is invalid, because the local name x hides the
template parameter name x. A revised valid code example:

//-------------------
template<int z> class A {};

template<int x>
class B {
public:
    static const int y = (x != -1 ? 0 : 0);

    template<int z> void g(const A<y> &a) {
        const char *x2 = __func__;
    }
};
template void B<0>::g<0>(const A<0> &);
//-------------------

The problem still exists in 4.8.2 but seems to be fixed in 4.9.0 trunk.
>From gcc-bugs-return-433560-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Nov 05 13:35:08 2013
Return-Path: <gcc-bugs-return-433560-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 13774 invoked by alias); 5 Nov 2013 13:35:08 -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 12691 invoked by uid 48); 5 Nov 2013 13:33:06 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug gcov-profile/59003] [4.9 Regression] profiledbootstrap miscompiles gcc during stagefeedback
Date: Tue, 05 Nov 2013 13:35:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: gcov-profile
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: target_milestone
Message-ID: <bug-59003-4-7OOX6rQV29@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59003-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59003-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: 2013-11/txt/msg00337.txt.bz2
Content-length: 293

http://gcc.gnu.org/bugzilla/show_bug.cgi?idY003

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.9.0


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

* [Bug c++/59004] [4.8 Regression] ICE generated by __func__
  2013-11-05 13:22 [Bug c++/59004] New: ICE generated by __func__ bmerry at gmail dot com
  2013-11-05 13:32 ` [Bug c++/59004] " daniel.kruegler at googlemail dot com
@ 2014-02-14 20:02 ` reichelt at gcc dot gnu.org
  2014-02-16 19:36 ` reichelt at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-02-14 20:02 UTC (permalink / raw)
  To: gcc-bugs

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

Volker Reichelt <reichelt at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
      Known to work|                            |4.5.0, 4.6.0, 4.7.0, 4.9.0
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|                            |2014-02-14
                 CC|                            |reichelt at gcc dot gnu.org
     Ever confirmed|0                           |1
            Summary|ICE generated by __func__   |[4.8 Regression] ICE
                   |                            |generated by __func__
   Target Milestone|---                         |4.8.4
      Known to fail|                            |4.8.0, 4.8.1, 4.8.2

--- Comment #2 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
Confirmed. Still happens on 4.8 branch, but not on trunk.


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

* [Bug c++/59004] [4.8 Regression] ICE generated by __func__
  2013-11-05 13:22 [Bug c++/59004] New: ICE generated by __func__ bmerry at gmail dot com
  2013-11-05 13:32 ` [Bug c++/59004] " daniel.kruegler at googlemail dot com
  2014-02-14 20:02 ` [Bug c++/59004] [4.8 Regression] " reichelt at gcc dot gnu.org
@ 2014-02-16 19:36 ` reichelt at gcc dot gnu.org
  2014-05-22  9:03 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-02-16 19:36 UTC (permalink / raw)
  To: gcc-bugs

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

Volker Reichelt <reichelt at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.4                       |4.8.3


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

* [Bug c++/59004] [4.8 Regression] ICE generated by __func__
  2013-11-05 13:22 [Bug c++/59004] New: ICE generated by __func__ bmerry at gmail dot com
                   ` (2 preceding siblings ...)
  2014-02-16 19:36 ` reichelt at gcc dot gnu.org
@ 2014-05-22  9:03 ` rguenth at gcc dot gnu.org
  2014-12-10 12:48 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-05-22  9:03 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.3                       |4.8.4

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 4.8.3 is being released, adjusting target milestone.


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

* [Bug c++/59004] [4.8 Regression] ICE generated by __func__
  2013-11-05 13:22 [Bug c++/59004] New: ICE generated by __func__ bmerry at gmail dot com
                   ` (3 preceding siblings ...)
  2014-05-22  9:03 ` rguenth at gcc dot gnu.org
@ 2014-12-10 12:48 ` rguenth at gcc dot gnu.org
  2014-12-19 13:26 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-12-10 12:48 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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

* [Bug c++/59004] [4.8 Regression] ICE generated by __func__
  2013-11-05 13:22 [Bug c++/59004] New: ICE generated by __func__ bmerry at gmail dot com
                   ` (4 preceding siblings ...)
  2014-12-10 12:48 ` rguenth at gcc dot gnu.org
@ 2014-12-19 13:26 ` jakub at gcc dot gnu.org
  2015-01-08 18:00 ` paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-12-19 13:26 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.4                       |4.8.5

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.8.4 has been released.


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

* [Bug c++/59004] [4.8 Regression] ICE generated by __func__
  2013-11-05 13:22 [Bug c++/59004] New: ICE generated by __func__ bmerry at gmail dot com
                   ` (5 preceding siblings ...)
  2014-12-19 13:26 ` jakub at gcc dot gnu.org
@ 2015-01-08 18:00 ` paolo.carlini at oracle dot com
  2015-01-08 18:04 ` paolo at gcc dot gnu.org
  2015-01-08 18:05 ` paolo.carlini at oracle dot com
  8 siblings, 0 replies; 10+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-01-08 18:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> ---
At this point I think we can add the testcase to be safe and close the bug.


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

* [Bug c++/59004] [4.8 Regression] ICE generated by __func__
  2013-11-05 13:22 [Bug c++/59004] New: ICE generated by __func__ bmerry at gmail dot com
                   ` (6 preceding siblings ...)
  2015-01-08 18:00 ` paolo.carlini at oracle dot com
@ 2015-01-08 18:04 ` paolo at gcc dot gnu.org
  2015-01-08 18:05 ` paolo.carlini at oracle dot com
  8 siblings, 0 replies; 10+ messages in thread
From: paolo at gcc dot gnu.org @ 2015-01-08 18:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Thu Jan  8 18:04:03 2015
New Revision: 219353

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

    PR c++/59004
    * g++.dg/ext/fnname4.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/ext/fnname4.C
Modified:
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/59004] [4.8 Regression] ICE generated by __func__
  2013-11-05 13:22 [Bug c++/59004] New: ICE generated by __func__ bmerry at gmail dot com
                   ` (7 preceding siblings ...)
  2015-01-08 18:04 ` paolo at gcc dot gnu.org
@ 2015-01-08 18:05 ` paolo.carlini at oracle dot com
  8 siblings, 0 replies; 10+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-01-08 18:05 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|4.8.5                       |4.9.0

--- Comment #7 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Done.


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

end of thread, other threads:[~2015-01-08 18:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-05 13:22 [Bug c++/59004] New: ICE generated by __func__ bmerry at gmail dot com
2013-11-05 13:32 ` [Bug c++/59004] " daniel.kruegler at googlemail dot com
2014-02-14 20:02 ` [Bug c++/59004] [4.8 Regression] " reichelt at gcc dot gnu.org
2014-02-16 19:36 ` reichelt at gcc dot gnu.org
2014-05-22  9:03 ` rguenth at gcc dot gnu.org
2014-12-10 12:48 ` rguenth at gcc dot gnu.org
2014-12-19 13:26 ` jakub at gcc dot gnu.org
2015-01-08 18:00 ` paolo.carlini at oracle dot com
2015-01-08 18:04 ` paolo at gcc dot gnu.org
2015-01-08 18:05 ` 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).