public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/96425] New: [8/9/10/11 regression] internal compiler error in maybe_process_partial_specialization()
@ 2020-08-03  6:58 slyfox at gcc dot gnu.org
  2020-08-03  7:00 ` [Bug c++/96425] " slyfox at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: slyfox at gcc dot gnu.org @ 2020-08-03  6:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96425

            Bug ID: 96425
           Summary: [8/9/10/11 regression] internal compiler error in
                    maybe_process_partial_specialization()
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: slyfox at gcc dot gnu.org
  Target Milestone: ---

In attempt to find why boost is able to crash gcc at
https://bugs.gentoo.org/730406 creduce stumbled on another crash on invalid
fine:

  //$ cat a.cc
  struct a {
    template <typename> static char ao;
    template <class> struct ao<>:

The crash seems to happen on gcc-8.4.0, gcc-9.3.0, gcc-10.2.0 and gcc-11:

$ LANG=C g++-8.4.0 -c a.cc
a.cc:3:27: internal compiler error: Segmentation fault
   template <class> struct ao<>:
                           ^~~~
0x9d685f crash_signal
        /usr/src/debug/sys-devel/gcc-8.4.0-r1/gcc-8.4.0/gcc/toplev.c:325
0x7f01a75ffc3f ???
       
/usr/src/debug/sys-libs/glibc-2.31-r6/glibc-2.31/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0x552fce maybe_process_partial_specialization(tree_node*)
        /usr/src/debug/sys-devel/gcc-8.4.0-r1/gcc-8.4.0/gcc/cp/pt.c:966
0x51344a cp_parser_class_head

$ LANG=C g++-11.0.0 -c a.cc
a.cc:3:27: internal compiler error: Segmentation fault
    3 |   template <class> struct ao<>:
      |                           ^~~~
0xc76a0f crash_signal
       
/usr/src/debug/sys-devel/gcc-11.0.0_pre9999/gcc-11.0.0_pre9999/gcc/toplev.c:328
0x7f790b9d3c3f ???
       
/usr/src/debug/sys-libs/glibc-2.31-r6/glibc-2.31/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0x75948e maybe_process_partial_specialization(tree_node*)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c++/96425] [8/9/10/11 regression] internal compiler error in maybe_process_partial_specialization()
  2020-08-03  6:58 [Bug c++/96425] New: [8/9/10/11 regression] internal compiler error in maybe_process_partial_specialization() slyfox at gcc dot gnu.org
@ 2020-08-03  7:00 ` slyfox at gcc dot gnu.org
  2020-08-03  7:01 ` slyfox at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: slyfox at gcc dot gnu.org @ 2020-08-03  7:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96425

--- Comment #1 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
Backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x000000000069f0d6 in maybe_process_partial_specialization (type=0x0) at
../../gcc/gcc/cp/pt.c:976
976       if (CLASS_TYPE_P (type) && CLASSTYPE_LAMBDA_EXPR (type))
(gdb) bt
#0  0x000000000069f0d6 in maybe_process_partial_specialization (type=0x0) at
../../gcc/gcc/cp/pt.c:976
#1  0x0000000000658ad0 in cp_parser_class_head (parser=0x7ffff7890850,
nested_name_specifier_p=0x7fffffffc5bc) at ../../gcc/gcc/cp/parser.c:24625
#2  0x0000000000656bf7 in cp_parser_class_specifier_1 (parser=0x7ffff7890850)
at ../../gcc/gcc/cp/parser.c:23920
#3  0x000000000065810e in cp_parser_class_specifier (parser=0x7ffff7890850) at
../../gcc/gcc/cp/parser.c:24294
#4  0x00000000006496a0 in cp_parser_type_specifier (parser=0x7ffff7890850,
flags=33, decl_specs=0x7fffffffc960, is_declaration=true,
declares_class_or_enum=0x7fffffffc820,
    is_cv_qualifier=0x7fffffffc81c) at ../../gcc/gcc/cp/parser.c:17797
#5  0x0000000000643c0d in cp_parser_decl_specifier_seq (parser=0x7ffff7890850,
flags=33, decl_specs=0x7fffffffc960, declares_class_or_enum=0x7fffffffc94c) at
../../gcc/gcc/cp/parser.c:14436
#6  0x0000000000662b58 in cp_parser_single_declaration (parser=0x7ffff7890850,
checks=0x0, member_p=true, explicit_specialization_p=false,
friend_p=0x7fffffffca4a)
    at ../../gcc/gcc/cp/parser.c:29499
#7  0x0000000000661a2d in cp_parser_template_declaration_after_parameters
(parser=0x7ffff7890850, parameter_list=0x7ffff79bd7a0, member_p=true) at
../../gcc/gcc/cp/parser.c:29163
#8  0x00000000006629d4 in cp_parser_explicit_template_declaration
(parser=0x7ffff7890850, member_p=true) at ../../gcc/gcc/cp/parser.c:29428
#9  0x0000000000662a32 in cp_parser_template_declaration_after_export
(parser=0x7ffff7890850, member_p=true) at ../../gcc/gcc/cp/parser.c:29447
#10 0x00000000006463a2 in cp_parser_template_declaration
(parser=0x7ffff7890850, member_p=true) at ../../gcc/gcc/cp/parser.c:15947
#11 0x00000000006595a5 in cp_parser_member_declaration (parser=0x7ffff7890850)
at ../../gcc/gcc/cp/parser.c:24963
#12 0x000000000065947d in cp_parser_member_specification_opt
(parser=0x7ffff7890850) at ../../gcc/gcc/cp/parser.c:24890
#13 0x0000000000656fc0 in cp_parser_class_specifier_1 (parser=0x7ffff7890850)
at ../../gcc/gcc/cp/parser.c:23987
#14 0x000000000065810e in cp_parser_class_specifier (parser=0x7ffff7890850) at
../../gcc/gcc/cp/parser.c:24294
#15 0x00000000006496a0 in cp_parser_type_specifier (parser=0x7ffff7890850,
flags=1, decl_specs=0x7fffffffd200, is_declaration=true,
declares_class_or_enum=0x7fffffffd080,
    is_cv_qualifier=0x7fffffffd07c) at ../../gcc/gcc/cp/parser.c:17797
#16 0x0000000000643c0d in cp_parser_decl_specifier_seq (parser=0x7ffff7890850,
flags=1, decl_specs=0x7fffffffd200, declares_class_or_enum=0x7fffffffd1ac) at
../../gcc/gcc/cp/parser.c:14436
#17 0x0000000000642072 in cp_parser_simple_declaration (parser=0x7ffff7890850,
function_definition_allowed_p=true, maybe_range_for_decl=0x0) at
../../gcc/gcc/cp/parser.c:13690
#18 0x0000000000641fd4 in cp_parser_block_declaration (parser=0x7ffff7890850,
statement_p=false) at ../../gcc/gcc/cp/parser.c:13637
#19 0x0000000000641c9f in cp_parser_declaration (parser=0x7ffff7890850) at
../../gcc/gcc/cp/parser.c:13510
#20 0x0000000000641da3 in cp_parser_toplevel_declaration
(parser=0x7ffff7890850) at ../../gcc/gcc/cp/parser.c:13539
#21 0x000000000062ea32 in cp_parser_translation_unit (parser=0x7ffff7890850) at
../../gcc/gcc/cp/parser.c:4793
#22 0x0000000000691564 in c_parse_file () at ../../gcc/gcc/cp/parser.c:44081
#23 0x000000000086a20a in c_common_parse_file () at
../../gcc/gcc/c-family/c-opts.c:1188
#24 0x000000000111b2f9 in compile_file () at ../../gcc/gcc/toplev.c:458
#25 0x000000000111e6f5 in do_compile () at ../../gcc/gcc/toplev.c:2327
#26 0x000000000111ea0e in toplev::main (this=0x7fffffffd556, argc=21,
argv=0x7fffffffd668) at ../../gcc/gcc/toplev.c:2466
#27 0x000000000229a285 in main (argc=21, argv=0x7fffffffd668) at
../../gcc/gcc/main.c:39

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c++/96425] [8/9/10/11 regression] internal compiler error in maybe_process_partial_specialization()
  2020-08-03  6:58 [Bug c++/96425] New: [8/9/10/11 regression] internal compiler error in maybe_process_partial_specialization() slyfox at gcc dot gnu.org
  2020-08-03  7:00 ` [Bug c++/96425] " slyfox at gcc dot gnu.org
@ 2020-08-03  7:01 ` slyfox at gcc dot gnu.org
  2020-08-03 19:45 ` mpolacek at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: slyfox at gcc dot gnu.org @ 2020-08-03  7:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96425

--- Comment #2 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
Compiler version and target details:

$ ./xg++ -B. -v
Reading specs from ./specs
COLLECT_GCC=./xg++
COLLECT_LTO_WRAPPER=./lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--enable-languages=c,c++ --disable-bootstrap --with-multilib-list=m64
--prefix=/home/slyfox/dev/git/gcc-native-quick-ggdb3/../gcc-native-quick-installed
--disable-nls --without-isl --disable-libsanitizer --disable-libvtv
--disable-libgomp --disable-libstdcxx-pch --disable-libunwind-exceptions
CFLAGS='-O0 -ggdb3 ' CXXFLAGS='-O0 -ggdb3 '
--with-sysroot=/usr/x86_64-HEAD-linux-gnu --enable-valgrind-annotations
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.0.0 20200802 (experimental) (GCC)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c++/96425] [8/9/10/11 regression] internal compiler error in maybe_process_partial_specialization()
  2020-08-03  6:58 [Bug c++/96425] New: [8/9/10/11 regression] internal compiler error in maybe_process_partial_specialization() slyfox at gcc dot gnu.org
  2020-08-03  7:00 ` [Bug c++/96425] " slyfox at gcc dot gnu.org
  2020-08-03  7:01 ` slyfox at gcc dot gnu.org
@ 2020-08-03 19:45 ` mpolacek at gcc dot gnu.org
  2020-10-16 12:19 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-08-03 19:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96425

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-08-03
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c++/96425] [8/9/10/11 regression] internal compiler error in maybe_process_partial_specialization()
  2020-08-03  6:58 [Bug c++/96425] New: [8/9/10/11 regression] internal compiler error in maybe_process_partial_specialization() slyfox at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-08-03 19:45 ` mpolacek at gcc dot gnu.org
@ 2020-10-16 12:19 ` rguenth at gcc dot gnu.org
  2021-01-14  9:12 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-16 12:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96425

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |8.5

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c++/96425] [8/9/10/11 regression] internal compiler error in maybe_process_partial_specialization()
  2020-08-03  6:58 [Bug c++/96425] New: [8/9/10/11 regression] internal compiler error in maybe_process_partial_specialization() slyfox at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-10-16 12:19 ` rguenth at gcc dot gnu.org
@ 2021-01-14  9:12 ` rguenth at gcc dot gnu.org
  2021-01-14 12:25 ` [Bug c++/96425] " slyfox at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-01-14  9:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96425

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 7.5 also crashes.  What version doesn't?  Why is this marked as regression?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c++/96425] internal compiler error in maybe_process_partial_specialization()
  2020-08-03  6:58 [Bug c++/96425] New: [8/9/10/11 regression] internal compiler error in maybe_process_partial_specialization() slyfox at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-01-14  9:12 ` rguenth at gcc dot gnu.org
@ 2021-01-14 12:25 ` slyfox at gcc dot gnu.org
  2021-05-17  8:08 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: slyfox at gcc dot gnu.org @ 2021-01-14 12:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96425

Sergei Trofimovich <slyfox at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[8/9/10/11 regression]      |internal compiler error in
                   |internal compiler error in  |maybe_process_partial_speci
                   |maybe_process_partial_speci |alization()
                   |alization()                 |

--- Comment #5 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
Good point! Checked on 6.5.0. It SIGSEGVs g++ as well. Dropping regression from
the title.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c++/96425] internal compiler error in maybe_process_partial_specialization()
  2020-08-03  6:58 [Bug c++/96425] New: [8/9/10/11 regression] internal compiler error in maybe_process_partial_specialization() slyfox at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2021-01-14 12:25 ` [Bug c++/96425] " slyfox at gcc dot gnu.org
@ 2021-05-17  8:08 ` jakub at gcc dot gnu.org
  2022-11-30 21:01 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-05-17  8:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96425

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|8.5                         |---

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c++/96425] internal compiler error in maybe_process_partial_specialization()
  2020-08-03  6:58 [Bug c++/96425] New: [8/9/10/11 regression] internal compiler error in maybe_process_partial_specialization() slyfox at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2021-05-17  8:08 ` jakub at gcc dot gnu.org
@ 2022-11-30 21:01 ` pinskia at gcc dot gnu.org
  2022-11-30 23:15 ` slyfox at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-30 21:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96425

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
      Known to fail|                            |10.4.0, 5.1.0
      Known to work|                            |11.1.0

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Seems fixed in GCC 11.1.0.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c++/96425] internal compiler error in maybe_process_partial_specialization()
  2020-08-03  6:58 [Bug c++/96425] New: [8/9/10/11 regression] internal compiler error in maybe_process_partial_specialization() slyfox at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2022-11-30 21:01 ` pinskia at gcc dot gnu.org
@ 2022-11-30 23:15 ` slyfox at gcc dot gnu.org
  2022-12-27 14:25 ` [Bug c++/96425] ICE in maybe_process_partial_specialization() since r11-2735-g634046d1a81b48 marxin at gcc dot gnu.org
  2023-07-08 21:03 ` slyfox at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: slyfox at gcc dot gnu.org @ 2022-11-30 23:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96425

--- Comment #7 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
If I bisected correctly SIGSEGV disappeared in r11-2735-g634046d1a81b48

commit 634046d1a81b48a48b3564ff2f90974f6b7b087b
Author: Nathan Sidwell <nathan@acm.org>
Date:   Tue Aug 18 06:02:37 2020 -0700

    c++: Move hidden-lambda entity lookup checking

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c++/96425] ICE in maybe_process_partial_specialization() since r11-2735-g634046d1a81b48
  2020-08-03  6:58 [Bug c++/96425] New: [8/9/10/11 regression] internal compiler error in maybe_process_partial_specialization() slyfox at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2022-11-30 23:15 ` slyfox at gcc dot gnu.org
@ 2022-12-27 14:25 ` marxin at gcc dot gnu.org
  2023-07-08 21:03 ` slyfox at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-12-27 14:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96425

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org,
                   |                            |nathan at gcc dot gnu.org
           Keywords|needs-bisection             |
            Summary|internal compiler error in  |ICE in
                   |maybe_process_partial_speci |maybe_process_partial_speci
                   |alization()                 |alization() since
                   |                            |r11-2735-g634046d1a81b48

--- Comment #8 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Sergei Trofimovich from comment #7)
> If I bisected correctly SIGSEGV disappeared in r11-2735-g634046d1a81b48

Yes, I can confirm that.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c++/96425] ICE in maybe_process_partial_specialization() since r11-2735-g634046d1a81b48
  2020-08-03  6:58 [Bug c++/96425] New: [8/9/10/11 regression] internal compiler error in maybe_process_partial_specialization() slyfox at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2022-12-27 14:25 ` [Bug c++/96425] ICE in maybe_process_partial_specialization() since r11-2735-g634046d1a81b48 marxin at gcc dot gnu.org
@ 2023-07-08 21:03 ` slyfox at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: slyfox at gcc dot gnu.org @ 2023-07-08 21:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96425

Sergei Trofimovich <slyfox at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #9 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
Let's close it as fixed as gcc-10 branch was closed and gcc-11+ should be fine.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-07-08 21:03 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-03  6:58 [Bug c++/96425] New: [8/9/10/11 regression] internal compiler error in maybe_process_partial_specialization() slyfox at gcc dot gnu.org
2020-08-03  7:00 ` [Bug c++/96425] " slyfox at gcc dot gnu.org
2020-08-03  7:01 ` slyfox at gcc dot gnu.org
2020-08-03 19:45 ` mpolacek at gcc dot gnu.org
2020-10-16 12:19 ` rguenth at gcc dot gnu.org
2021-01-14  9:12 ` rguenth at gcc dot gnu.org
2021-01-14 12:25 ` [Bug c++/96425] " slyfox at gcc dot gnu.org
2021-05-17  8:08 ` jakub at gcc dot gnu.org
2022-11-30 21:01 ` pinskia at gcc dot gnu.org
2022-11-30 23:15 ` slyfox at gcc dot gnu.org
2022-12-27 14:25 ` [Bug c++/96425] ICE in maybe_process_partial_specialization() since r11-2735-g634046d1a81b48 marxin at gcc dot gnu.org
2023-07-08 21:03 ` slyfox 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).