[Bug c++/84705] [6/7/8 Regression] internal compiler error: in add_stmt, at cp/semantics.c:390

2018-10-26 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84705

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|6.5 |7.4

--- Comment #8 from Jakub Jelinek  ---
GCC 6 branch is being closed

[Bug c++/84705] [6/7/8 Regression] internal compiler error: in add_stmt, at cp/semantics.c:390

2018-10-17 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84705

--- Comment #7 from Paolo Carlini  ---
Note, the cp/ change in fact is in tree.c:
https://gcc.gnu.org/viewcvs/gcc?view=revision=265234

[Bug c++/84705] [6/7/8 Regression] internal compiler error: in add_stmt, at cp/semantics.c:390

2018-10-17 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84705

Paolo Carlini  changed:

   What|Removed |Added

 Status|ASSIGNED|NEW
   Assignee|paolo.carlini at oracle dot com|unassigned at gcc dot 
gnu.org
Summary|[6/7/8/9 Regression]|[6/7/8 Regression] internal
   |internal compiler error: in |compiler error: in
   |add_stmt, at|add_stmt, at
   |cp/semantics.c:390  |cp/semantics.c:390

--- Comment #6 from Paolo Carlini  ---
Done.

[Bug c++/84705] [6/7/8 Regression] internal compiler error: in add_stmt, at cp/semantics.c:390

2018-03-23 Thread vegard.nossum at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84705

Vegard Nossum  changed:

   What|Removed |Added

 CC||vegard.nossum at oracle dot com

--- Comment #3 from Vegard Nossum  ---
Slightly different test case + maybe a bit more info from asan:

template  struct d {
  short : 1e31 || [] {
struct b {
  int a = const_cast < struct c;
};
  };
};

$ cc1plus 
 d< >::/home/vegard/git/gcc/gcc/cp/semantics.c:390:3:
runtime error: member call on null pointer of type 'struct vec'
/home/vegard/git/gcc/gcc/vec.h:568:54: runtime error: member access within null
pointer of type 'const struct vec'
ASAN:SIGSEGV
=
==16541==ERROR: AddressSanitizer: SEGV on unknown address 0x0004 (pc
0x04edb008 bp 0x7f6282534b40 sp 0x7ffc93cb64d0 T0)
#0 0x4edb007 in vec::is_empty() const
/home/vegard/git/gcc/gcc/vec.h:568
#1 0x4edb007 in add_stmt(tree_node*)
/home/vegard/git/gcc/gcc/cp/semantics.c:390
#2 0x393ff85 in do_pushtag /home/vegard/git/gcc/gcc/cp/name-lookup.c:6485
#3 0x393ff85 in pushtag(tree_node*, tree_node*, tag_scope)
/home/vegard/git/gcc/gcc/cp/name-lookup.c:6524
#4 0x2604599 in xref_tag_1 /home/vegard/git/gcc/gcc/cp/decl.c:13761
#5 0x2604599 in xref_tag(tag_types, tree_node*, tag_scope, bool)
/home/vegard/git/gcc/gcc/cp/decl.c:13818
#6 0x3f23b08 in cp_parser_elaborated_type_specifier
/home/vegard/git/gcc/gcc/cp/parser.c:17920
#7 0x3d1beb4 in cp_parser_type_specifier
/home/vegard/git/gcc/gcc/cp/parser.c:16804
#8 0x3d5bd8c in cp_parser_type_specifier_seq
/home/vegard/git/gcc/gcc/cp/parser.c:21114
#9 0x3e9b6ad in cp_parser_type_id_1
/home/vegard/git/gcc/gcc/cp/parser.c:20957
#10 0x3ee22f0 in cp_parser_type_id
/home/vegard/git/gcc/gcc/cp/parser.c:21025
#11 0x3ee22f0 in cp_parser_postfix_expression
/home/vegard/git/gcc/gcc/cp/parser.c:6728
#12 0x3d6d95e in cp_parser_unary_expression
/home/vegard/git/gcc/gcc/cp/parser.c:8324
#13 0x3b80029 in cp_parser_cast_expression
/home/vegard/git/gcc/gcc/cp/parser.c:9092
#14 0x3b8cff5 in cp_parser_binary_expression
/home/vegard/git/gcc/gcc/cp/parser.c:9193
#15 0x3b9a71a in cp_parser_assignment_expression
/home/vegard/git/gcc/gcc/cp/parser.c:9488
#16 0x3bb6708 in cp_parser_constant_expression
/home/vegard/git/gcc/gcc/cp/parser.c:9772
#17 0x3bd90c3 in cp_parser_initializer_clause
/home/vegard/git/gcc/gcc/cp/parser.c:21930
#18 0x3c02785 in cp_parser_initializer
/home/vegard/git/gcc/gcc/cp/parser.c:21870
#19 0x3c0444e in cp_parser_late_parse_one_default_arg
/home/vegard/git/gcc/gcc/cp/parser.c:27785
#20 0x3d2e490 in cp_parser_late_parsing_nsdmi
/home/vegard/git/gcc/gcc/cp/parser.c:27837
#21 0x3d2e490 in cp_parser_class_specifier_1
/home/vegard/git/gcc/gcc/cp/parser.c:22739
#22 0x3d2e490 in cp_parser_class_specifier
/home/vegard/git/gcc/gcc/cp/parser.c:22792
#23 0x3d2e490 in cp_parser_type_specifier
/home/vegard/git/gcc/gcc/cp/parser.c:16776
#24 0x3f3fdff in cp_parser_decl_specifier_seq
/home/vegard/git/gcc/gcc/cp/parser.c:13631
#25 0x4043abe in cp_parser_single_declaration
/home/vegard/git/gcc/gcc/cp/parser.c:27211
#26 0x4049117 in cp_parser_template_declaration_after_parameters
/home/vegard/git/gcc/gcc/cp/parser.c:26900
#27 0x405c5db in cp_parser_explicit_template_declaration
/home/vegard/git/gcc/gcc/cp/parser.c:27138
#28 0x405c5db in cp_parser_template_declaration_after_export
/home/vegard/git/gcc/gcc/cp/parser.c:27156
#29 0x41bb796 in cp_parser_declaration
/home/vegard/git/gcc/gcc/cp/parser.c:12739
#30 0x4188c5f in cp_parser_declaration_seq_opt
/home/vegard/git/gcc/gcc/cp/parser.c:12658
#31 0x419308b in cp_parser_translation_unit
/home/vegard/git/gcc/gcc/cp/parser.c:4563
#32 0x419308b in c_parse_file() /home/vegard/git/gcc/gcc/cp/parser.c:39019
#33 0x613101d in c_common_parse_file()
/home/vegard/git/gcc/gcc/c-family/c-opts.c:1132
#34 0x10cb4551 in compile_file /home/vegard/git/gcc/gcc/toplev.c:455
#35 0x14c07ed in do_compile /home/vegard/git/gcc/gcc/toplev.c:2132
#36 0x14c07ed in toplev::main(int, char**)
/home/vegard/git/gcc/gcc/toplev.c:2267
#37 0x14eca1c in main /home/vegard/git/gcc/gcc/main.c:39
#38 0x7f628691282f in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
#39 0x14ef478 in _start
(/home/vegard/personal/programming/gcc/install/libexec/gcc/x86_64-pc-linux-gnu/8.0.1/cc1plus+0x14ef478)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/vegard/git/gcc/gcc/vec.h:568
vec::is_empty() const
==16541==ABORTING

Version:

GNU C++14 (GCC) version 8.0.1 20180306 (experimental) (x86_64-pc-linux-gnu)

[Bug c++/84705] [6/7/8 Regression] internal compiler error: in add_stmt, at cp/semantics.c:390

2018-03-05 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84705

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P4

[Bug c++/84705] [6/7/8 Regression] internal compiler error: in add_stmt, at cp/semantics.c:390

2018-03-05 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84705

--- Comment #2 from Marek Polacek  ---
Started with r188473 or r188474.

[Bug c++/84705] [6/7/8 Regression] internal compiler error: in add_stmt, at cp/semantics.c:390

2018-03-05 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84705

Marek Polacek  changed:

   What|Removed |Added

   Keywords||error-recovery
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-03-05
 CC||mpolacek at gcc dot gnu.org
   Target Milestone|--- |6.5
Summary|internal compiler error: in |[6/7/8 Regression] internal
   |add_stmt, at|compiler error: in
   |cp/semantics.c:390  |add_stmt, at
   ||cp/semantics.c:390
 Ever confirmed|0   |1

--- Comment #1 from Marek Polacek  ---
Confirmed.