public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/115586] New: name-independent declarations causing an internal compiler error (c++26)
@ 2024-06-22 1:59 amuly.jain at gmail dot com
2024-06-22 2:09 ` [Bug c++/115586] " amuly.jain at gmail dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: amuly.jain at gmail dot com @ 2024-06-22 1:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115586
Bug ID: 115586
Summary: name-independent declarations causing an internal
compiler error (c++26)
Product: gcc
Version: 14.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: amuly.jain at gmail dot com
Target Milestone: ---
gcc -v output:
Using built-in specs.
COLLECT_GCC=g++-14
COLLECT_LTO_WRAPPER=/home/amuhak/gcc/gcc-14/bin/../libexec/gcc/x86_64-linux-gnu/14.1.0/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../gcc/configure -v --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
--prefix=/home/amuhak/build/gcc-14 --enable-checking=release
--enable-languages=c,c++,fortran,go --disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 14.1.0 (GCC)
Command run: g++-14 main.cpp
Output:
main.cpp: In function ‘int main()’:
main.cpp:8:19: warning: name-independent declarations only available with
‘-std=c++2c’ or ‘-std=gnu++2c’ [-Wc++26-extensions]
8 | for (auto [_, _, a] : in) {
| ^
main.cpp:8:25: internal compiler error: Segmentation fault
8 | for (auto [_, _, a] : in) {
| ^
0x7f179196831f ???
./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0x7f179194d1c9 __libc_start_call_main
../sysdeps/nptl/libc_start_call_main.h:58
0x7f179194d28a __libc_start_main_impl
../csu/libc-start.c:360
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Command run: g++-14 -freport-bug main.cpp
Output:
main.cpp: In function ‘int main()’:
main.cpp:8:19: warning: name-independent declarations only available with
‘-std=c++2c’ or ‘-std=gnu++2c’ [-Wc++26-extensions]
8 | for (auto [_, _, a] : in) {
| ^
main.cpp:8:25: internal compiler error: Segmentation fault
8 | for (auto [_, _, a] : in) {
| ^
0x7f5ccf93631f ???
./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0x7f5ccf91b1c9 __libc_start_call_main
../sysdeps/nptl/libc_start_call_main.h:58
0x7f5ccf91b28a __libc_start_main_impl
../csu/libc-start.c:360
Please submit a full bug report, with preprocessed source.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.
Here is a "working" example (https://godbolt.org/z/7vdoj7z3j):
#include <vector>
#include <tuple>
#include <iostream>
int main() {
std::vector<std::tuple<int, int, int>> in;
in.emplace_back(1, 2, 3);
for (auto [_, _, a] : in) {
std::cout << a << std::endl;
}
}
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-06-22 2:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-22 1:59 [Bug c++/115586] New: name-independent declarations causing an internal compiler error (c++26) amuly.jain at gmail dot com
2024-06-22 2:09 ` [Bug c++/115586] " amuly.jain at gmail dot com
2024-06-22 2:11 ` pinskia at gcc dot gnu.org
2024-06-22 2:17 ` [Bug c++/115586] c++26: with 2 or more name-independent declarations (anonymous structure bindings) with for loop pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).