[Bug c++/86648] [9 Regression] ICE on class template argument deduction

2019-01-16 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86648

Alexandre Oliva  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Alexandre Oliva  ---
Fixed

[Bug c++/86648] [9 Regression] ICE on class template argument deduction

2019-01-16 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86648

--- Comment #7 from Alexandre Oliva  ---
Author: aoliva
Date: Thu Jan 17 07:32:16 2019
New Revision: 268005

URL: https://gcc.gnu.org/viewcvs?rev=268005=gcc=rev
Log:
[PR86648] use auto identifier for class placeholder templates

dwarf2out recognizes unspecified auto types by the identifier.  C++
template class placeholders are unspecified auto types that take the
identifier of the class rather than those used by preexisting auto
types, so dwarf2out ICEs when it finds one of those.  Alas, they may
be visible to dwarf2out, since the types of e.g. static data members
of templates are only deduced at member instantiation, i.e., if the
data member is actually referenced, but the data member is added as a
field, still with unspecified auto placeholder type, when the
enclosing class is instantiated.

I've changed placeholder creator to use an auto identifier instead,
which allowed dropping the placeholder test in C++'s is_auto (alas, it
can't be used in dwarf2out, think LTO).  To avoid losing information
in error messages and dumps and whatnot, I've added code to recognize
placeholders for template classes say A and print them out as
A<...auto...>.

for  gcc/cp/ChangeLog

PR c++/86648
* pt.c (make_template_placeholder): Use auto_identifier.
(is_auto): Drop CLASS_PLACEHOLDER_TEMPLATE test.
* error.c (dump_type): Handle template placeholders.
* cxx-pretty-print.c (pp_cx_unqualified_id): Likewise.

for  gcc/testsuite/ChangeLog

PR c++/86648
* gcc.dg/cpp1z/pr86648.C: New.

Added:
trunk/gcc/testsuite/g++.dg/cpp1z/pr86648.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cxx-pretty-print.c
trunk/gcc/cp/error.c
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/86648] [9 Regression] ICE on class template argument deduction

2018-12-28 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86648

--- Comment #6 from Alexandre Oliva  ---
https://gcc.gnu.org/ml/gcc-patches/2018-12/msg01740.html

[Bug c++/86648] [9 Regression] ICE on class template argument deduction

2018-12-27 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86648

Alexandre Oliva  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||aoliva at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |aoliva at gcc dot 
gnu.org

--- Comment #5 from Alexandre Oliva  ---
Created attachment 45293
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45293=edit
candidate patch

dwarf2out.c only recognizes auto and declspec(auto) as C++ auto identifiers
possibly mapped to unspecified types.

[Bug c++/86648] [9 Regression] ICE on class template argument deduction

2018-12-20 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86648

Richard Biener  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
   Priority|P3  |P1

[Bug c++/86648] [9 Regression] ICE on class template argument deduction

2018-12-04 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86648

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-12-04
 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #4 from Jakub Jelinek  ---
Reduced testcase:
template  class A;
template  struct B { static A a{T::a}; };
void foo () { B a; }
Started to ICE with -std=c++17 -g when this started to be accepted in r260150.
Or e.g.
template  struct A {};
template  struct B { static A a{T::a}; };
template  struct C { static A a; };
void foo () { B> a; }
ICEs too.

[Bug c++/86648] [9 Regression] ICE on class template argument deduction

2018-07-24 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86648

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |9.0

[Bug c++/86648] [9 Regression] ICE on class template argument deduction

2018-07-24 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86648

--- Comment #3 from Marek Polacek  ---
Locally, with the latest trunk.  Could've been fixed already.

[Bug c++/86648] [9 Regression] ICE on class template argument deduction

2018-07-24 Thread boris_oncev at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86648

--- Comment #2 from Boris  ---
(In reply to Marek Polacek from comment #1)
> I don't see any ICE with -std=c++17.

Did you try it on godbolt, or locally(maybe you have newer version than
godbolt) ?

[Bug c++/86648] [9 Regression] ICE on class template argument deduction

2018-07-23 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86648

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek  ---
I don't see any ICE with -std=c++17.