[Bug c++/84798] [6/7/8 Regression] ICE (Segmentation fault) if `auto` appears in a template argument

2018-03-13 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84798

--- Comment #6 from Jason Merrill  ---
Author: jason
Date: Tue Mar 13 15:55:07 2018
New Revision: 258493

URL: https://gcc.gnu.org/viewcvs?rev=258493=gcc=rev
Log:
PR c++/84798 - ICE with auto in abstract function declarator.

* parser.c (cp_parser_parameter_declaration_clause): Check
parser->default_arg_ok_p.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/auto51.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/g++.dg/cpp1y/pr60393.C

[Bug c++/84798] [6/7/8 Regression] ICE (Segmentation fault) if `auto` appears in a template argument

2018-03-13 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84798

--- Comment #5 from Jason Merrill  ---
*** Bug 84840 has been marked as a duplicate of this bug. ***

[Bug c++/84798] [6/7/8 Regression] ICE (Segmentation fault) if `auto` appears in a template argument

2018-03-13 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84798

Jason Merrill  changed:

   What|Removed |Added

   Keywords|ice-on-valid-code   |ice-on-invalid-code
 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org

[Bug c++/84798] [6/7/8 Regression] ICE (Segmentation fault) if `auto` appears in a template argument

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

--- Comment #4 from Jakub Jelinek  ---
Outside of lambdas the patch essentially changed an error diagnostic to
else if (cxx_dialect < cxx1y)
  pedwarn (location_of (type), 0,
  "use of % in parameter declaration "
  "only available with "
  "-std=c++1y or -std=gnu++1y");
   else
 pedwarn (location_of (type), OPT_Wpedantic,
  "ISO C++ forbids use of % in parameter "
  "declaration");
Do we really want that extension and what uses it?

[Bug c++/84798] [6/7/8 Regression] ICE (Segmentation fault) if `auto` appears in a template argument

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

Jakub Jelinek  changed:

   What|Removed |Added

   Priority|P3  |P2
 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org
   Target Milestone|--- |6.5
Summary|ICE (Segmentation fault) if |[6/7/8 Regression] ICE
   |`auto` appears in a |(Segmentation fault) if
   |template argument   |`auto` appears in a
   ||template argument

--- Comment #3 from Jakub Jelinek  ---
Is auto valid among parameters except for generic lambdas?