[Bug c++/77482] [6/7 Regression] Segfault when compiling ill-formed constexpr code

2016-09-16 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77482

--- Comment #4 from Jakub Jelinek  ---
Author: jakub
Date: Fri Sep 16 20:25:17 2016
New Revision: 240198

URL: https://gcc.gnu.org/viewcvs?rev=240198&root=gcc&view=rev
Log:
PR c++/77482
* error.c (dump_simple_decl): Only check DECL_DECLARED_CONCEPT_P
if DECL_LANG_SPECIFIC is non-NULL.  Fix up formatting.

* g++.dg/cpp0x/constexpr-77482.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-77482.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/error.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/77482] [6/7 Regression] Segfault when compiling ill-formed constexpr code

2016-09-05 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77482

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #3 from Jakub Jelinek  ---
Created attachment 39562
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39562&action=edit
gcc7-pr77482.patch

Untested fix.

[Bug c++/77482] [6/7 Regression] Segfault when compiling ill-formed constexpr code

2016-09-05 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77482

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|--- |6.3

[Bug c++/77482] [6/7 Regression] Segfault when compiling ill-formed constexpr code

2016-09-05 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77482

Markus Trippelsdorf  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #2 from Markus Trippelsdorf  ---
Started with r238558:

commit f59602ada5cb864a78e24e53b3ba2e67b5d26bf8
Author: jason 
Date:   Thu Jul 21 06:05:24 2016 +

Improving concepts performance and diagnostics.

PR c++/67565
PR c++/67579
PR c++/71843

[Bug c++/77482] [6/7 Regression] Segfault when compiling ill-formed constexpr code

2016-09-05 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77482

Markus Trippelsdorf  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-09-05
 CC||trippels at gcc dot gnu.org
  Known to work||6.0
Summary|Segfault when compiling |[6/7 Regression] Segfault
   |ill-formed constexpr code   |when compiling ill-formed
   ||constexpr code
 Ever confirmed|0   |1
  Known to fail||6.2.1, 7.0

--- Comment #1 from Markus Trippelsdorf  ---
markus@x4 tmp % echo "constexpr auto a;" | g++-6 -x c++ -
‘
:1: confused by earlier errors, bailing out

markus@x4 tmp % echo "constexpr auto a;" | g++-5.4.1 -std=c++11 -x c++ -
:1:16: error: declaration of ‘constexpr const auto a’ has no initializer

markus@x4 tmp % echo "constexpr auto a;" | g++-trunk -x c++ -
‘
Segmentation fault
0xd9fed7 crash_signal
../../gcc/gcc/toplev.c:336
0x7ff89ae1ac8f ???
   
/home/markus/glibc/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0x73e043 dump_simple_decl
../../gcc/gcc/cp/error.c:965
0x73e5e5 dump_decl
../../gcc/gcc/cp/error.c:1071
0x749f91 decl_to_string
../../gcc/gcc/cp/error.c:2979
0x749f91 cp_printer
../../gcc/gcc/cp/error.c:3559
0x15484aa pp_format(pretty_printer*, text_info*)
../../gcc/gcc/pretty-print.c:643
0x153bde0 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
../../gcc/gcc/diagnostic.c:941
0x153c0f8 diagnostic_impl
../../gcc/gcc/diagnostic.c:1064
0x153c94f error(char const*, ...)
../../gcc/gcc/diagnostic.c:1264
0x65d78a start_decl_1(tree_node*, bool)
../../gcc/gcc/cp/decl.c:5149
0x68a6c6 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int,
tree_node*, tree_node*, tree_node**)
../../gcc/gcc/cp/decl.c:5079
0x783f5e cp_parser_init_declarator
../../gcc/gcc/cp/parser.c:18699
0x784b77 cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:12487
0x784ebd cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:12363
0x78d6c0 cp_parser_declaration
../../gcc/gcc/cp/parser.c:12260
0x78c040 cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:12139
0x78c3b2 cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:4356
0x78c3b2 c_parse_file()
../../gcc/gcc/cp/parser.c:37673
0x8f8c02 c_common_parse_file()
../../gcc/gcc/c-family/c-opts.c:1073