[Bug c++/83824] [6 Regression] ICE on invalid C++ code with alignas: in chainon, at tree.c:3037

2018-06-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83824

Jakub Jelinek  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Jakub Jelinek  ---
Fixed for 6.5 too.

[Bug c++/83824] [6 Regression] ICE on invalid C++ code with alignas: in chainon, at tree.c:3037

2018-06-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83824

--- Comment #7 from Jakub Jelinek  ---
Author: jakub
Date: Mon Jun 25 17:12:28 2018
New Revision: 262054

URL: https://gcc.gnu.org/viewcvs?rev=262054=gcc=rev
Log:
Backported from mainline
2018-01-18  Jakub Jelinek  

PR c++/83824
* parser.c (attr_chainon): New function.
(cp_parser_label_for_labeled_statement, cp_parser_decl_specifier_seq,
cp_parser_namespace_definition, cp_parser_init_declarator,
cp_parser_type_specifier_seq, cp_parser_parameter_declaration,
cp_parser_gnu_attributes_opt): Use it.
(cp_parser_member_declaration, cp_parser_objc_class_ivars,
cp_parser_objc_struct_declaration): Likewise.  Don't reset
prefix_attributes if attributes is error_mark_node.

* g++.dg/cpp0x/pr83824.C: New test.

Added:
branches/gcc-6-branch/gcc/testsuite/g++.dg/cpp0x/pr83824.C
Modified:
branches/gcc-6-branch/gcc/cp/ChangeLog
branches/gcc-6-branch/gcc/cp/parser.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug c++/83824] [6 Regression] ICE on invalid C++ code with alignas: in chainon, at tree.c:3037

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

Jakub Jelinek  changed:

   What|Removed |Added

Summary|[6/7 Regression] ICE on |[6 Regression] ICE on
   |invalid C++ code with   |invalid C++ code with
   |alignas: in chainon, at |alignas: in chainon, at
   |tree.c:3037 |tree.c:3037

--- Comment #6 from Jakub Jelinek  ---
Fixed also for 7.4+.