public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/96676] New: Segmentation fault on parsing simple variadic template function call
@ 2020-08-18 10:58 ivan.leonov.d at yandex dot ru
2020-08-18 11:01 ` [Bug c++/96676] " ivan.leonov.d at yandex dot ru
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: ivan.leonov.d at yandex dot ru @ 2020-08-18 10:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96676
Bug ID: 96676
Summary: Segmentation fault on parsing simple variadic template
function call
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ivan.leonov.d at yandex dot ru
Target Milestone: ---
Sample code:
template < typename T, typename... TYPES >
struct A {
template < TYPES... types >
void Get() { }
};
void f() {}
int main() {
A<int, decltype(&f)> a;
a.Get<&f>();
}
Error and Backtrace:
prog.cc: In function 'int main()':
prog.cc:13:15: internal compiler error: Segmentation fault
13 | a.Get<&f>();
| ^
0xc026af crash_signal
../../source/gcc/toplev.c:327
0x73a995 tsubst_pack_expansion(tree_node*, tree_node*, int, tree_node*)
../../source/gcc/cp/pt.c:12871
0x7356d1 coerce_template_parameter_pack
../../source/gcc/cp/pt.c:8538
0x7356d1 coerce_template_parms
../../source/gcc/cp/pt.c:8830
0x747bc8 fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node*
const*, unsigned int, tree_node*, unification_kind_t, int, conversion**, bool,
bool)
../../source/gcc/cp/pt.c:21078
0x619282 add_template_candidate_real
../../source/gcc/cp/call.c:3417
0x6199bc add_template_candidate
../../source/gcc/cp/call.c:3502
0x6199bc add_candidates
../../source/gcc/cp/call.c:5883
0x61a9cc add_candidates
../../source/gcc/cp/call.c:5798
0x61a9cc build_new_method_call_1
../../source/gcc/cp/call.c:10271
0x61b6ff build_new_method_call(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, tree_node*, int, tree_node**, int)
../../source/gcc/cp/call.c:10478
0x6fcdd7 cp_parser_postfix_expression
../../source/gcc/cp/parser.c:7513
0x6dfa9a cp_parser_binary_expression
../../source/gcc/cp/parser.c:9641
0x6e13de cp_parser_assignment_expression
../../source/gcc/cp/parser.c:9946
0x6e16e2 cp_parser_expression
../../source/gcc/cp/parser.c:10114
0x6e41b8 cp_parser_expression_statement
../../source/gcc/cp/parser.c:11774
0x6eef10 cp_parser_statement
../../source/gcc/cp/parser.c:11570
0x6f076d cp_parser_statement_seq_opt
../../source/gcc/cp/parser.c:11921
0x6f0820 cp_parser_compound_statement
../../source/gcc/cp/parser.c:11871
0x7078da cp_parser_function_body
../../source/gcc/cp/parser.c:23170
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/96676] Segmentation fault on parsing simple variadic template function call
2020-08-18 10:58 [Bug c++/96676] New: Segmentation fault on parsing simple variadic template function call ivan.leonov.d at yandex dot ru
@ 2020-08-18 11:01 ` ivan.leonov.d at yandex dot ru
2020-08-18 16:47 ` mpolacek at gcc dot gnu.org
2020-08-18 16:52 ` mpolacek at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: ivan.leonov.d at yandex dot ru @ 2020-08-18 11:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96676
--- Comment #1 from Ivan Leonov <ivan.leonov.d at yandex dot ru> ---
Output of gcc -v:
Using built-in specs.
COLLECT_GCC=/opt/wandbox/gcc-head/bin/g++
COLLECT_LTO_WRAPPER=/opt/wandbox/gcc-head/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../source/configure --prefix=/opt/wandbox/gcc-head
--enable-languages=c,c++ --disable-multilib --without-ppl --without-cloog-ppl
--enable-checking=release --disable-nls --enable-lto
LDFLAGS=-Wl,-rpath,/opt/wandbox/gcc-head/lib,-rpath,/opt/wandbox/gcc-head/lib64,-rpath,/opt/wandbox/gcc-head/lib32
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.0 20200816 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-o' 'prog.exe' '-I' '/opt/wandbox/boost-sml/include' '-I'
'/opt/wandbox/boost-di/include' '-I' '/opt/wandbox/range-v3/include' '-I'
'/opt/wandbox/nlohmann-json/include' '-I' '/opt/wandbox/cmcstl2/include' '-I'
'/opt/wandbox/te/include' '-std=gnu++20' '-Wall' '-Wextra' '-I'
'/opt/wandbox/boost-1.68.0/gcc-head/include'
'-L/opt/wandbox/boost-1.68.0/gcc-head/lib' '-v' '-shared-libgcc'
'-mtune=generic' '-march=x86-64'
/opt/wandbox/gcc-head/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/cc1plus -quiet -v
-I /opt/wandbox/boost-sml/include -I /opt/wandbox/boost-di/include -I
/opt/wandbox/range-v3/include -I /opt/wandbox/nlohmann-json/include -I
/opt/wandbox/cmcstl2/include -I /opt/wandbox/te/include -I
/opt/wandbox/boost-1.68.0/gcc-head/include -imultiarch x86_64-linux-gnu
-D_GNU_SOURCE prog.cc -quiet -dumpbase prog.cc -dumpbase-ext .cc -mtune=generic
-march=x86-64 -Wall -Wextra -std=gnu++20 -version -o /tmp/ccDLpOFA.s
GNU C++20 (GCC) version 11.0.0 20200816 (experimental) (x86_64-pc-linux-gnu)
compiled by GNU C version 11.0.0 20200816 (experimental), GMP version
6.1.0, MPFR version 3.1.4, MPC version 1.0.3, isl version none
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory
"/opt/wandbox/gcc-head/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../x86_64-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/opt/wandbox/boost-sml/include
/opt/wandbox/boost-di/include
/opt/wandbox/range-v3/include
/opt/wandbox/nlohmann-json/include
/opt/wandbox/cmcstl2/include
/opt/wandbox/te/include
/opt/wandbox/boost-1.68.0/gcc-head/include
/opt/wandbox/gcc-head/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0
/opt/wandbox/gcc-head/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/x86_64-pc-linux-gnu
/opt/wandbox/gcc-head/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/backward
/opt/wandbox/gcc-head/lib/gcc/x86_64-pc-linux-gnu/11.0.0/include
/opt/wandbox/gcc-head/include
/opt/wandbox/gcc-head/lib/gcc/x86_64-pc-linux-gnu/11.0.0/include-fixed
/usr/include/x86_64-linux-gnu
/usr/include
End of search list.
GNU C++20 (GCC) version 11.0.0 20200816 (experimental) (x86_64-pc-linux-gnu)
compiled by GNU C version 11.0.0 20200816 (experimental), GMP version
6.1.0, MPFR version 3.1.4, MPC version 1.0.3, isl version none
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 3d112d3862b6c6b3c098fd9068684321
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/96676] Segmentation fault on parsing simple variadic template function call
2020-08-18 10:58 [Bug c++/96676] New: Segmentation fault on parsing simple variadic template function call ivan.leonov.d at yandex dot ru
2020-08-18 11:01 ` [Bug c++/96676] " ivan.leonov.d at yandex dot ru
@ 2020-08-18 16:47 ` mpolacek at gcc dot gnu.org
2020-08-18 16:52 ` mpolacek at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-08-18 16:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96676
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
CC| |mpolacek at gcc dot gnu.org
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Thanks for the report. I think it's a dup.
*** This bug has been marked as a duplicate of bug 84796 ***
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/96676] Segmentation fault on parsing simple variadic template function call
2020-08-18 10:58 [Bug c++/96676] New: Segmentation fault on parsing simple variadic template function call ivan.leonov.d at yandex dot ru
2020-08-18 11:01 ` [Bug c++/96676] " ivan.leonov.d at yandex dot ru
2020-08-18 16:47 ` mpolacek at gcc dot gnu.org
@ 2020-08-18 16:52 ` mpolacek at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-08-18 16:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96676
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |NEW
Last reconfirmed| |2020-08-18
Ever confirmed|0 |1
Resolution|DUPLICATE |---
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Actually, it probably isn't.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-08-18 16:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-18 10:58 [Bug c++/96676] New: Segmentation fault on parsing simple variadic template function call ivan.leonov.d at yandex dot ru
2020-08-18 11:01 ` [Bug c++/96676] " ivan.leonov.d at yandex dot ru
2020-08-18 16:47 ` mpolacek at gcc dot gnu.org
2020-08-18 16:52 ` mpolacek 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).