[Bug c++/91032] [9/10 Regression] ICE in ocp_convert, at cp/cvt.c:766

2019-06-29 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91032

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||mpolacek at gcc dot gnu.org
 Resolution|--- |DUPLICATE

--- Comment #3 from Marek Polacek  ---
Started with r260272; most likely a dup.

*** This bug has been marked as a duplicate of bug 90393 ***

[Bug c++/91032] [9/10 Regression] ICE in ocp_convert, at cp/cvt.c:766

2019-06-28 Thread f.heckenb...@fh-soft.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91032

Frank Heckenbach  changed:

   What|Removed |Added

 CC||f.heckenb...@fh-soft.de

--- Comment #2 from Frank Heckenbach  ---
Got a similar ICE, hopefully the same issue.

It worked without ICE with g++ 6.3.0 and 7.3.0.

g++ 9.1.0 on Linux 4.14.0-0.bpo.3-amd64

Configured with: ../gcc-9.1.0/configure --prefix=/usr/local --disable-multilib

% g++-9 ice.cpp
ice.cpp: In function 'auto foo(bool, c)':
ice.cpp:9:24: internal compiler error: in ocp_convert, at cp/cvt.c:766
9 |   return e ? throw 0 : v;
  |^
0x58ad41 ocp_convert(tree_node*, tree_node*, int, int, int)
../../gcc-9.1.0/gcc/cp/cvt.c:766
0x71b652 check_return_expr(tree_node*, bool*)
../../gcc-9.1.0/gcc/cp/typeck.c:9799
0x6ea80f finish_return_stmt(tree_node*)
../../gcc-9.1.0/gcc/cp/semantics.c:894
0x68fccd cp_parser_jump_statement
../../gcc-9.1.0/gcc/cp/parser.c:12919
0x68fccd cp_parser_statement
../../gcc-9.1.0/gcc/cp/parser.c:11191
0x690338 cp_parser_statement_seq_opt
../../gcc-9.1.0/gcc/cp/parser.c:11657
0x6903f0 cp_parser_compound_statement
../../gcc-9.1.0/gcc/cp/parser.c:11611
0x6a6970 cp_parser_function_body
../../gcc-9.1.0/gcc/cp/parser.c:22660
0x6a6970 cp_parser_ctor_initializer_opt_and_function_body
../../gcc-9.1.0/gcc/cp/parser.c:22711
0x6a7151 cp_parser_function_definition_after_declarator
../../gcc-9.1.0/gcc/cp/parser.c:27802
0x6a7e1b cp_parser_function_definition_from_specifiers_and_declarator
../../gcc-9.1.0/gcc/cp/parser.c:27718
0x6a7e1b cp_parser_init_declarator
../../gcc-9.1.0/gcc/cp/parser.c:20297
0x68cfce cp_parser_simple_declaration
../../gcc-9.1.0/gcc/cp/parser.c:13541
0x6ad140 cp_parser_declaration
../../gcc-9.1.0/gcc/cp/parser.c:13238
0x6ad869 cp_parser_translation_unit
../../gcc-9.1.0/gcc/cp/parser.c:4701
0x6ad869 c_parse_file()
../../gcc-9.1.0/gcc/cp/parser.c:41181
0x76814b c_common_parse_file()
../../gcc-9.1.0/gcc/c-family/c-opts.c:1156
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

% cat ice.cpp
struct c
{
  c () = default;
  c (const c &) { }
};

auto foo (bool e, const c v)
{
  return e ? throw 0 : v;
}

int main ()
{
}

[Bug c++/91032] [9/10 Regression] ICE in ocp_convert, at cp/cvt.c:766

2019-06-28 Thread doko at debian dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91032

Matthias Klose  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
  Known to work||8.3.1
Summary|[9 Regression] ICE in   |[9/10 Regression] ICE in
   |ocp_convert, at |ocp_convert, at
   |cp/cvt.c:766|cp/cvt.c:766
  Known to fail||10.0, 9.1.1

--- Comment #1 from Matthias Klose  ---
also seen with r271670 on the trunk.