https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92201
Bug ID: 92201
Summary: "internal compiler error: ‘verify_gimple’ failed" with
-std=c++2a
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: sbergman at redhat dot com
Target Milestone: ---
With recent trunk:
> $ gcc/trunk/inst/bin/g++ --version
> g++ (GCC) 10.0.0 20191023 (experimental)
> Copyright (C) 2019 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> $ cat test.cc
> int f(void (*p)()) { return (*reinterpret_cast<int (*)()>(p))(); }
> $ gcc/trunk/inst/bin/g++ -std=c++2a -c test.cc
> test.cc: In function ‘int f(void (*)())’:
> test.cc:1:5: error: invalid conversion in gimple call
> 1 | int f(void (*p)()) { return (*reinterpret_cast<int (*)()>(p))(); }
> | ^
> int
>
> void
>
> D.2079 = p.0_1 ();
> test.cc:1:5: internal compiler error: ‘verify_gimple’ failed
> 0xeebc2d verify_gimple_in_seq(gimple*)
> ../../src/gcc/tree-cfg.c:5079
> 0xc4ea46 gimplify_body(tree_node*, bool)
> ../../src/gcc/gimplify.c:14440
> 0xc4ec13 gimplify_function_tree(tree_node*)
> ../../src/gcc/gimplify.c:14530
> 0xada597 cgraph_node::analyze()
> ../../src/gcc/cgraphunit.c:667
> 0xadcdcf analyze_functions
> ../../src/gcc/cgraphunit.c:1126
> 0xadd9b2 symbol_table::finalize_compilation_unit()
> ../../src/gcc/cgraphunit.c:2840
> Please submit a full bug report,
> with preprocessed source if appropriate.
> Please include the complete backtrace with any bug report.
> See <https://gcc.gnu.org/bugs/> for instructions.