This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/79367] New: ICE on valid C++11 code on x86_64-linux-gnu: verify_gimple failed
- From: "su at cs dot ucdavis.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 03 Feb 2017 19:45:31 +0000
- Subject: [Bug c++/79367] New: ICE on valid C++11 code on x86_64-linux-gnu: verify_gimple failed
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79367
Bug ID: 79367
Summary: ICE on valid C++11 code on x86_64-linux-gnu:
verify_gimple failed
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: su at cs dot ucdavis.edu
Target Milestone: ---
All 4.8.x and later ICE, but not 4.7.x.
The code is correctly accepted by Clang.
$ g++-trunk -v
Using built-in specs.
COLLECT_GCC=g++-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/7.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 7.0.1 20170203 (experimental) [trunk revision 245148] (GCC)
$
$ clang++ -c -std=c++11 small.cpp
$
$ g++-trunk -c -std=c++11 small.cpp
small.cpp: In lambda function:
small.cpp:6:5: error: Local declaration from a different function
[&] { decltype (b) c; } ();
^
D.2056
small.cpp:6:22: note: in statement
[&] { decltype (b) c; } ();
^
_1 = (sizetype) D.2056;
small.cpp:6:5: error: Local declaration from a different function
[&] { decltype (b) c; } ();
^
D.2056
small.cpp:6:22: note: in statement
[&] { decltype (b) c; } ();
^
_5 = (sizetype) D.2056;
small.cpp:6:5: internal compiler error: verify_gimple failed
[&] { decltype (b) c; } ();
^
0xe5e15d verify_gimple_in_cfg(function*, bool)
../../gcc-source-trunk/gcc/tree-cfg.c:5266
0xd3ac27 execute_function_todo
../../gcc-source-trunk/gcc/passes.c:1966
0xd3b595 execute_todo
../../gcc-source-trunk/gcc/passes.c:2016
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
$
-----------------------------------
int a = 1;
void foo ()
{
int b[a];
[&] { decltype (b) c; } ();
}