public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53492] New: [g++ (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 ] internal compiler error: in retrieve_specialization, at cp/pt.c:985
@ 2012-05-25 23:14 endight at gmail dot com
  2012-05-26 18:08 ` [Bug c++/53492] " pinskia at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: endight at gmail dot com @ 2012-05-25 23:14 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53492
           Summary: [g++ (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 ] internal
                    compiler error: in retrieve_specialization, at
                    cp/pt.c:985
    Classification: Unclassified
           Product: gcc
           Version: new-ra
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: endight@gmail.com


Created attachment 27501
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27501
Preprocessed source stored into /tmp/ccTNE1Sa.out file, please attach this to
your bugreport.

template<typename T>
struct foo{
    struct bat;
        template<typename X>
        class quux;
};

template<typename T>
class foo<T>::bat
{};

template<>
template<typename T>
class foo<T>::quux{
    quux(typename foo<T>::bat*){}
};


template<typename T>
struct buz: public foo<T>::template bar<T>{};

int main()
{
    foo<int>::quux<int> lol; // bug
}
// gives this
../main.cpp: In instantiation of 'foo<int>::quux<int>':
../main.cpp:24:22:   instantiated from here
../main.cpp:15:2: internal compiler error: in retrieve_specialization, at
cp/pt.c:985


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

* [Bug c++/53492] [g++ (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 ] internal compiler error: in retrieve_specialization, at cp/pt.c:985
  2012-05-25 23:14 [Bug c++/53492] New: [g++ (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 ] internal compiler error: in retrieve_specialization, at cp/pt.c:985 endight at gmail dot com
@ 2012-05-26 18:08 ` pinskia at gcc dot gnu.org
  2012-05-29 10:29 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-05-26 18:08 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-05-26
     Ever Confirmed|0                           |1
      Known to fail|                            |4.3.5, 4.4.5, 4.7.0, 4.8.0

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-05-26 17:29:55 UTC ---
t.cc: In instantiation of ‘class foo<int>::quux<int>’:
t.cc:24:25:   required from here
t.cc:15:5: internal compiler error: in retrieve_specialization, at cp/pt.c:1013
     quux(typename foo<T>::bat*){}
     ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


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

* [Bug c++/53492] [g++ (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 ] internal compiler error: in retrieve_specialization, at cp/pt.c:985
  2012-05-25 23:14 [Bug c++/53492] New: [g++ (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 ] internal compiler error: in retrieve_specialization, at cp/pt.c:985 endight at gmail dot com
  2012-05-26 18:08 ` [Bug c++/53492] " pinskia at gcc dot gnu.org
@ 2012-05-29 10:29 ` rguenth at gcc dot gnu.org
  2014-01-22 11:06 ` [Bug c++/53492] " mpolacek at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-29 10:29 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-29 10:29:17 UTC ---
3.4.6 rejects it with

t.C: In function `int main()':
t.C:24: error: no matching function for call to `foo<int>::quux<int>::quux()'
t.C:14: note: candidates are: foo<int>::quux<int>::quux(const
foo<int>::quux<int>&)
t.C:15: note:                 foo<T>::quux<X>::quux(foo<T>::bat*) [with T =
int]


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

* [Bug c++/53492] internal compiler error: in retrieve_specialization, at cp/pt.c:985
  2012-05-25 23:14 [Bug c++/53492] New: [g++ (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 ] internal compiler error: in retrieve_specialization, at cp/pt.c:985 endight at gmail dot com
  2012-05-26 18:08 ` [Bug c++/53492] " pinskia at gcc dot gnu.org
  2012-05-29 10:29 ` rguenth at gcc dot gnu.org
@ 2014-01-22 11:06 ` mpolacek at gcc dot gnu.org
  2014-03-01 22:50 ` [Bug c++/53492] [4.7/4.8/4.9 Regression] ICE " reichelt at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-01-22 11:06 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burrows.labs at gmail dot com

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
*** Bug 59901 has been marked as a duplicate of this bug. ***


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

* [Bug c++/53492] [4.7/4.8/4.9 Regression] ICE in retrieve_specialization, at cp/pt.c:985
  2012-05-25 23:14 [Bug c++/53492] New: [g++ (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 ] internal compiler error: in retrieve_specialization, at cp/pt.c:985 endight at gmail dot com
                   ` (2 preceding siblings ...)
  2014-01-22 11:06 ` [Bug c++/53492] " mpolacek at gcc dot gnu.org
@ 2014-03-01 22:50 ` reichelt at gcc dot gnu.org
  2014-03-08  4:36 ` jason at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-03-01 22:50 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid
   Last reconfirmed|2012-05-26 00:00:00         |2014-03-01
                 CC|                            |reichelt at gcc dot gnu.org
   Target Milestone|---                         |4.7.4
            Summary|internal compiler error: in |[4.7/4.8/4.9 Regression]
                   |retrieve_specialization, at |ICE in
                   |cp/pt.c:985                 |retrieve_specialization, at
                   |                            |cp/pt.c:985

--- Comment #4 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
Here's an even simpler testcase:

=====================================================
template<typename> struct A
{
  template<typename> struct B;
};

template<> template<typename T> struct A<T>::B
{
  B(int) {}
};

A<int>::B<int> b;
=====================================================

It crashes since GCC 4.0.0, but was correctly rejected before.
So this qualifies as a regression.

A slightly modified and still invalid testcase also crashes since GCC 4.0.0
but was wrongly accepted before:

=====================================================
template<typename> struct A
{
  template<typename> struct B;
};

template<> template<typename T> struct A<T>::B
{
  B() {}
};

A<int>::B<int> b;
=====================================================

Another variation is wrongly accepted since at least GCC 3.2:

=====================================================
template<typename> struct A
{
  template<typename> struct B;
};

template<> template<typename T> struct A<T>::B {};

A<int>::B<int> b;
=====================================================


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

* [Bug c++/53492] [4.7/4.8/4.9 Regression] ICE in retrieve_specialization, at cp/pt.c:985
  2012-05-25 23:14 [Bug c++/53492] New: [g++ (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 ] internal compiler error: in retrieve_specialization, at cp/pt.c:985 endight at gmail dot com
                   ` (3 preceding siblings ...)
  2014-03-01 22:50 ` [Bug c++/53492] [4.7/4.8/4.9 Regression] ICE " reichelt at gcc dot gnu.org
@ 2014-03-08  4:36 ` jason at gcc dot gnu.org
  2014-03-10 15:45 ` jason at gcc dot gnu.org
  2014-06-12 13:48 ` [Bug c++/53492] [4.7/4.8 " rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2014-03-08  4:36 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |jason at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org


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

* [Bug c++/53492] [4.7/4.8/4.9 Regression] ICE in retrieve_specialization, at cp/pt.c:985
  2012-05-25 23:14 [Bug c++/53492] New: [g++ (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 ] internal compiler error: in retrieve_specialization, at cp/pt.c:985 endight at gmail dot com
                   ` (4 preceding siblings ...)
  2014-03-08  4:36 ` jason at gcc dot gnu.org
@ 2014-03-10 15:45 ` jason at gcc dot gnu.org
  2014-06-12 13:48 ` [Bug c++/53492] [4.7/4.8 " rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2014-03-10 15:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Mon Mar 10 15:44:50 2014
New Revision: 208455

URL: http://gcc.gnu.org/viewcvs?rev=208455&root=gcc&view=rev
Log:
    PR c++/53492
    * parser.c (cp_parser_class_head): Also check PRIMARY_TEMPLATE_P
    when deciding whether to call push_template_decl for a member class.
    * pt.c (push_template_decl_real): Return after wrong levels error.

Added:
    trunk/gcc/testsuite/g++.dg/template/memtmpl4.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/cp/pt.c


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

* [Bug c++/53492] [4.7/4.8 Regression] ICE in retrieve_specialization, at cp/pt.c:985
  2012-05-25 23:14 [Bug c++/53492] New: [g++ (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 ] internal compiler error: in retrieve_specialization, at cp/pt.c:985 endight at gmail dot com
                   ` (5 preceding siblings ...)
  2014-03-10 15:45 ` jason at gcc dot gnu.org
@ 2014-06-12 13:48 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-06-12 13:48 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
The 4.7 branch is being closed, moving target milestone to 4.8.4.


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

end of thread, other threads:[~2014-06-12 13:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-25 23:14 [Bug c++/53492] New: [g++ (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 ] internal compiler error: in retrieve_specialization, at cp/pt.c:985 endight at gmail dot com
2012-05-26 18:08 ` [Bug c++/53492] " pinskia at gcc dot gnu.org
2012-05-29 10:29 ` rguenth at gcc dot gnu.org
2014-01-22 11:06 ` [Bug c++/53492] " mpolacek at gcc dot gnu.org
2014-03-01 22:50 ` [Bug c++/53492] [4.7/4.8/4.9 Regression] ICE " reichelt at gcc dot gnu.org
2014-03-08  4:36 ` jason at gcc dot gnu.org
2014-03-10 15:45 ` jason at gcc dot gnu.org
2014-06-12 13:48 ` [Bug c++/53492] [4.7/4.8 " rguenth 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).