public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58504] New: ICE with type trait as default template parameter
@ 2013-09-22 19:13 reichelt at gcc dot gnu.org
  2013-09-22 21:26 ` [Bug c++/58504] [4.6/4.7/4.8/4.9 regression] " redi at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-09-22 19:13 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58504
           Summary: ICE with type trait as default template parameter
           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 triggers an ICE since GCC 4.6.0:

=============================================================
template<bool = __has_nothrow_assign(void)> struct A {};

A<> a;
=============================================================

bug.cc:3:3: internal compiler error: in tsubst_copy, at cp/pt.c:12809
 A<> a;
   ^
0x5b2723 tsubst_copy
        ../../gcc/gcc/cp/pt.c:12809
0x591061 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../gcc/gcc/cp/pt.c:14738
0x59a4e2 tsubst_expr
        ../../gcc/gcc/cp/pt.c:13628
0x5a755d tsubst_template_arg
        ../../gcc/gcc/cp/pt.c:9235
0x5a3449 coerce_template_parms
        ../../gcc/gcc/cp/pt.c:6802
0x5abc6a lookup_template_class_1
        ../../gcc/gcc/cp/pt.c:7398
0x5abc6a lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
        ../../gcc/gcc/cp/pt.c:7695
0x6ad202 finish_template_type(tree_node*, tree_node*, int)
        ../../gcc/gcc/cp/semantics.c:2856
0x6456c0 cp_parser_template_id
        ../../gcc/gcc/cp/parser.c:13218
0x6458d2 cp_parser_class_name
        ../../gcc/gcc/cp/parser.c:18746
0x63b5ef cp_parser_qualifying_entity
        ../../gcc/gcc/cp/parser.c:5448
0x63b5ef cp_parser_nested_name_specifier_opt
        ../../gcc/gcc/cp/parser.c:5173
0x6462b7 cp_parser_constructor_declarator_p
        ../../gcc/gcc/cp/parser.c:22076
0x6462b7 cp_parser_decl_specifier_seq
        ../../gcc/gcc/cp/parser.c:11313
0x64a1a9 cp_parser_simple_declaration
        ../../gcc/gcc/cp/parser.c:10918
0x64c1b0 cp_parser_block_declaration
        ../../gcc/gcc/cp/parser.c:10867
0x6551ce cp_parser_declaration
        ../../gcc/gcc/cp/parser.c:10764
0x653f2d cp_parser_declaration_seq_opt
        ../../gcc/gcc/cp/parser.c:10650
0x655806 cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.c:3939
0x655806 c_parse_file()
        ../../gcc/gcc/cp/parser.c:28893
Please submit a full bug report, [etc.]


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

* [Bug c++/58504] [4.6/4.7/4.8/4.9 regression] ICE with type trait as default template parameter
  2013-09-22 19:13 [Bug c++/58504] New: ICE with type trait as default template parameter reichelt at gcc dot gnu.org
@ 2013-09-22 21:26 ` redi at gcc dot gnu.org
  2013-11-19  9:49 ` [Bug c++/58504] [4.7/4.8/4.9 " rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2013-09-22 21:26 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-09-22
     Ever confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Confirmed, the docs say the type can be (possibly cv-qualified) void.


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

* [Bug c++/58504] [4.7/4.8/4.9 regression] ICE with type trait as default template parameter
  2013-09-22 19:13 [Bug c++/58504] New: ICE with type trait as default template parameter reichelt at gcc dot gnu.org
  2013-09-22 21:26 ` [Bug c++/58504] [4.6/4.7/4.8/4.9 regression] " redi at gcc dot gnu.org
@ 2013-11-19  9:49 ` rguenth at gcc dot gnu.org
  2013-11-19  9:54 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-19  9:49 UTC (permalink / raw)
  To: gcc-bugs

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

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

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


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

* [Bug c++/58504] [4.7/4.8/4.9 regression] ICE with type trait as default template parameter
  2013-09-22 19:13 [Bug c++/58504] New: ICE with type trait as default template parameter reichelt at gcc dot gnu.org
  2013-09-22 21:26 ` [Bug c++/58504] [4.6/4.7/4.8/4.9 regression] " redi at gcc dot gnu.org
  2013-11-19  9:49 ` [Bug c++/58504] [4.7/4.8/4.9 " rguenth at gcc dot gnu.org
@ 2013-11-19  9:54 ` rguenth at gcc dot gnu.org
  2014-01-27 18:29 ` jason at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-19  9:54 UTC (permalink / raw)
  To: gcc-bugs

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

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

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


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

* [Bug c++/58504] [4.7/4.8/4.9 regression] ICE with type trait as default template parameter
  2013-09-22 19:13 [Bug c++/58504] New: ICE with type trait as default template parameter reichelt at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2013-11-19  9:54 ` rguenth at gcc dot gnu.org
@ 2014-01-27 18:29 ` jason at gcc dot gnu.org
  2014-01-28  4:32 ` jason at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-27 18:29 UTC (permalink / raw)
  To: gcc-bugs

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

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++/58504] [4.7/4.8/4.9 regression] ICE with type trait as default template parameter
  2013-09-22 19:13 [Bug c++/58504] New: ICE with type trait as default template parameter reichelt at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2014-01-27 18:29 ` jason at gcc dot gnu.org
@ 2014-01-28  4:32 ` jason at gcc dot gnu.org
  2014-01-28 13:45 ` jason at gcc dot gnu.org
  2014-01-28 14:02 ` jason at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-28  4:32 UTC (permalink / raw)
  To: gcc-bugs

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

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

URL: http://gcc.gnu.org/viewcvs?rev=207168&root=gcc&view=rev
Log:
    PR c++/58504
    * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
    types.

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


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

* [Bug c++/58504] [4.7/4.8/4.9 regression] ICE with type trait as default template parameter
  2013-09-22 19:13 [Bug c++/58504] New: ICE with type trait as default template parameter reichelt at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2014-01-28  4:32 ` jason at gcc dot gnu.org
@ 2014-01-28 13:45 ` jason at gcc dot gnu.org
  2014-01-28 14:02 ` jason at gcc dot gnu.org
  6 siblings, 0 replies; 8+ 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=58504

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

URL: http://gcc.gnu.org/viewcvs?rev=207190&root=gcc&view=rev
Log:
    PR c++/58504
    * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
    types.

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


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

* [Bug c++/58504] [4.7/4.8/4.9 regression] ICE with type trait as default template parameter
  2013-09-22 19:13 [Bug c++/58504] New: ICE with type trait as default template parameter reichelt at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2014-01-28 13:45 ` jason at gcc dot gnu.org
@ 2014-01-28 14:02 ` jason at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-28 14:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|4.7.4                       |4.8.3

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 4.8.3/4.9.  Not applying to 4.7 unless someone cares.


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

end of thread, other threads:[~2014-01-28 14:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-22 19:13 [Bug c++/58504] New: ICE with type trait as default template parameter reichelt at gcc dot gnu.org
2013-09-22 21:26 ` [Bug c++/58504] [4.6/4.7/4.8/4.9 regression] " redi at gcc dot gnu.org
2013-11-19  9:49 ` [Bug c++/58504] [4.7/4.8/4.9 " rguenth at gcc dot gnu.org
2013-11-19  9:54 ` rguenth at gcc dot gnu.org
2014-01-27 18:29 ` jason at gcc dot gnu.org
2014-01-28  4:32 ` jason at gcc dot gnu.org
2014-01-28 13:45 ` jason at gcc dot gnu.org
2014-01-28 14:02 ` 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).