public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58606] New: [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template
@ 2013-10-03 20:41 reichelt at gcc dot gnu.org
  2013-10-03 22:52 ` [Bug c++/58606] " paolo.carlini at oracle dot com
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-10-03 20:41 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58606
           Summary: [4.8/4.9 Regression] [c++11] ICE with specialization
                    in variadic template
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org

The following valid code snippet (compiled with "-std=c++11") triggers an ICE
since GCC 4.8.0:

========================================
template<int&...> struct A
{
  template<typename> struct B;

  template<typename T> struct B<T*> {};
};
========================================

bug.cc:5:35: internal compiler error: tree check: expected record_type or
union_type or qual_union_type, have template_decl in lookup_template_class_1,
at cp/pt.c:7645
   template<typename T> struct B<T*> {};
                                   ^
0xcd83ea tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc/gcc/tree.c:9176
0x54c851 tree_check3(tree_node*, char const*, int, char const*, tree_code,
tree_code, tree_code)
        ../../gcc/gcc/tree.h:2649
0x5b44be lookup_template_class_1
        ../../gcc/gcc/cp/pt.c:7645
0x5b44be lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
        ../../gcc/gcc/cp/pt.c:7695
0x6b4572 finish_template_type(tree_node*, tree_node*, int)
        ../../gcc/gcc/cp/semantics.c:2856
0x64cc60 cp_parser_template_id
        ../../gcc/gcc/cp/parser.c:13219
0x64ce92 cp_parser_class_name
        ../../gcc/gcc/cp/parser.c:18752
0x642b6f cp_parser_qualifying_entity
        ../../gcc/gcc/cp/parser.c:5448
0x642b6f cp_parser_nested_name_specifier_opt
        ../../gcc/gcc/cp/parser.c:5173
0x6362ce cp_parser_class_head
        ../../gcc/gcc/cp/parser.c:19194
0x6362ce cp_parser_class_specifier_1
        ../../gcc/gcc/cp/parser.c:18833
0x638180 cp_parser_class_specifier
        ../../gcc/gcc/cp/parser.c:19102
0x638180 cp_parser_type_specifier
        ../../gcc/gcc/cp/parser.c:14081
0x64d679 cp_parser_decl_specifier_seq
        ../../gcc/gcc/cp/parser.c:11328
0x651cf3 cp_parser_single_declaration
        ../../gcc/gcc/cp/parser.c:22580
0x654b18 cp_parser_template_declaration_after_export
        ../../gcc/gcc/cp/parser.c:22456
0x6347e2 cp_parser_member_declaration
        ../../gcc/gcc/cp/parser.c:19704
0x6357de cp_parser_member_specification_opt
        ../../gcc/gcc/cp/parser.c:19631
0x6357de cp_parser_class_specifier_1
        ../../gcc/gcc/cp/parser.c:18886
0x638180 cp_parser_class_specifier
        ../../gcc/gcc/cp/parser.c:19102
Please submit a full bug report, [etc.]


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

* [Bug c++/58606] [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template
  2013-10-03 20:41 [Bug c++/58606] New: [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template reichelt at gcc dot gnu.org
@ 2013-10-03 22:52 ` paolo.carlini at oracle dot com
  2013-10-10 11:40 ` rguenth at gcc dot gnu.org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-10-03 22:52 UTC (permalink / raw)
  To: gcc-bugs

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

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

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


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

* [Bug c++/58606] [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template
  2013-10-03 20:41 [Bug c++/58606] New: [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template reichelt at gcc dot gnu.org
  2013-10-03 22:52 ` [Bug c++/58606] " paolo.carlini at oracle dot com
@ 2013-10-10 11:40 ` rguenth at gcc dot gnu.org
  2013-10-16  9:49 ` jakub at gcc dot gnu.org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-10-10 11:40 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.8.2


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

* [Bug c++/58606] [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template
  2013-10-03 20:41 [Bug c++/58606] New: [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template reichelt at gcc dot gnu.org
  2013-10-03 22:52 ` [Bug c++/58606] " paolo.carlini at oracle dot com
  2013-10-10 11:40 ` rguenth at gcc dot gnu.org
@ 2013-10-16  9:49 ` jakub at gcc dot gnu.org
  2014-01-27 18:24 ` jason at gcc dot gnu.org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-10-16  9:49 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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


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

* [Bug c++/58606] [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template
  2013-10-03 20:41 [Bug c++/58606] New: [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template reichelt at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2013-10-16  9:49 ` jakub at gcc dot gnu.org
@ 2014-01-27 18:24 ` jason at gcc dot gnu.org
  2014-01-28  4:31 ` jason at gcc dot gnu.org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-27 18:24 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2014-01-27
                 CC|                            |jason at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org
     Ever confirmed|0                           |1


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

* [Bug c++/58606] [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template
  2013-10-03 20:41 [Bug c++/58606] New: [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template reichelt at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2014-01-27 18:24 ` jason at gcc dot gnu.org
@ 2014-01-28  4:31 ` jason at gcc dot gnu.org
  2014-01-28 13:45 ` jason at gcc dot gnu.org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-28  4:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Tue Jan 28 04:31:14 2014
New Revision: 207167

URL: http://gcc.gnu.org/viewcvs?rev=207167&root=gcc&view=rev
Log:
    PR c++/58606
    * pt.c (template_parm_to_arg): Call convert_from_reference.
    (tsubst_template_arg): Don't strip reference refs.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/variadic146.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c


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

* [Bug c++/58606] [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template
  2013-10-03 20:41 [Bug c++/58606] New: [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template reichelt at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2014-01-28  4:31 ` jason at gcc dot gnu.org
@ 2014-01-28 13:45 ` jason at gcc dot gnu.org
  2014-01-28 14:01 ` jason at gcc dot gnu.org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-28 13:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Tue Jan 28 13:44:57 2014
New Revision: 207189

URL: http://gcc.gnu.org/viewcvs?rev=207189&root=gcc&view=rev
Log:
    PR c++/58606
    * pt.c (template_parm_to_arg): Call convert_from_reference.
    (tsubst_template_arg): Don't strip reference refs.

Added:
    branches/gcc-4_8-branch/gcc/testsuite/g++.dg/cpp0x/variadic146.C
Modified:
    branches/gcc-4_8-branch/gcc/cp/ChangeLog
    branches/gcc-4_8-branch/gcc/cp/pt.c


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

* [Bug c++/58606] [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template
  2013-10-03 20:41 [Bug c++/58606] New: [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template reichelt at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2014-01-28 13:45 ` jason at gcc dot gnu.org
@ 2014-01-28 14:01 ` jason at gcc dot gnu.org
  2014-02-21  4:43 ` jason at gcc dot gnu.org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-28 14:01 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 4.8.3/4.9.


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

* [Bug c++/58606] [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template
  2013-10-03 20:41 [Bug c++/58606] New: [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template reichelt at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2014-01-28 14:01 ` jason at gcc dot gnu.org
@ 2014-02-21  4:43 ` jason at gcc dot gnu.org
  2014-02-21 14:01 ` jason at gcc dot gnu.org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu.org @ 2014-02-21  4:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Fri Feb 21 04:42:59 2014
New Revision: 207978

URL: http://gcc.gnu.org/viewcvs?rev=207978&root=gcc&view=rev
Log:
    PR c++/60274
    Revert:
    PR c++/58606
    * pt.c (template_parm_to_arg): Call convert_from_reference.
    (tsubst_template_arg): Don't strip reference refs.

Added:
    branches/gcc-4_8-branch/gcc/testsuite/g++.dg/template/ref7.C
Removed:
    branches/gcc-4_8-branch/gcc/testsuite/g++.dg/cpp0x/variadic146.C
Modified:
    branches/gcc-4_8-branch/gcc/cp/ChangeLog
    branches/gcc-4_8-branch/gcc/cp/pt.c


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

* [Bug c++/58606] [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template
  2013-10-03 20:41 [Bug c++/58606] New: [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template reichelt at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2014-02-21  4:43 ` jason at gcc dot gnu.org
@ 2014-02-21 14:01 ` jason at gcc dot gnu.org
  2014-02-21 21:07 ` [Bug c++/58606] [4.8 " reichelt at gcc dot gnu.org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu.org @ 2014-02-21 14:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Fri Feb 21 14:00:44 2014
New Revision: 207994

URL: http://gcc.gnu.org/viewcvs?rev=207994&root=gcc&view=rev
Log:
    PR c++/60167
    PR c++/60222
    PR c++/58606
    * parser.c (cp_parser_template_argument): Restore dereference.
    * pt.c (template_parm_to_arg): Dereference non-pack expansions too.
    (process_partial_specialization): Handle deref.
    (unify): Likewise.

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


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

* [Bug c++/58606] [4.8 Regression] [c++11] ICE with specialization in variadic template
  2013-10-03 20:41 [Bug c++/58606] New: [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template reichelt at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2014-02-21 14:01 ` jason at gcc dot gnu.org
@ 2014-02-21 21:07 ` reichelt at gcc dot gnu.org
  2014-05-22  9:03 ` rguenth at gcc dot gnu.org
  2014-07-31 15:55 ` jason at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-02-21 21:07 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
      Known to work|                            |4.9.0
         Resolution|FIXED                       |---
            Summary|[4.8/4.9 Regression]        |[4.8 Regression] [c++11]
                   |[c++11] ICE with            |ICE with specialization in
                   |specialization in variadic  |variadic template
                   |template                    |
      Known to fail|4.9.0                       |

--- Comment #7 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
Since the patch was reverted on the 4.8 branch, the bug is again open there.


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

* [Bug c++/58606] [4.8 Regression] [c++11] ICE with specialization in variadic template
  2013-10-03 20:41 [Bug c++/58606] New: [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template reichelt at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2014-02-21 21:07 ` [Bug c++/58606] [4.8 " reichelt at gcc dot gnu.org
@ 2014-05-22  9:03 ` rguenth at gcc dot gnu.org
  2014-07-31 15:55 ` jason at gcc dot gnu.org
  11 siblings, 0 replies; 13+ 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=58606

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

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

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


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

* [Bug c++/58606] [4.8 Regression] [c++11] ICE with specialization in variadic template
  2013-10-03 20:41 [Bug c++/58606] New: [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template reichelt at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2014-05-22  9:03 ` rguenth at gcc dot gnu.org
@ 2014-07-31 15:55 ` jason at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu.org @ 2014-07-31 15:55 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|4.8.4                       |4.9.0

--- Comment #9 from Jason Merrill <jason at gcc dot gnu.org> ---
I think this is riskier than I want to apply to 4.8.


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

end of thread, other threads:[~2014-07-31 15:55 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-03 20:41 [Bug c++/58606] New: [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template reichelt at gcc dot gnu.org
2013-10-03 22:52 ` [Bug c++/58606] " paolo.carlini at oracle dot com
2013-10-10 11:40 ` rguenth at gcc dot gnu.org
2013-10-16  9:49 ` jakub at gcc dot gnu.org
2014-01-27 18:24 ` jason at gcc dot gnu.org
2014-01-28  4:31 ` jason at gcc dot gnu.org
2014-01-28 13:45 ` jason at gcc dot gnu.org
2014-01-28 14:01 ` jason at gcc dot gnu.org
2014-02-21  4:43 ` jason at gcc dot gnu.org
2014-02-21 14:01 ` jason at gcc dot gnu.org
2014-02-21 21:07 ` [Bug c++/58606] [4.8 " reichelt at gcc dot gnu.org
2014-05-22  9:03 ` rguenth at gcc dot gnu.org
2014-07-31 15:55 ` jason 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).