public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/115053] New: gcc crashed without back trace
@ 2024-05-12 21:03 rungecc at gmail dot com
  2024-05-13 18:36 ` [Bug c++/115053] " mpolacek at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: rungecc at gmail dot com @ 2024-05-12 21:03 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115053
           Summary: gcc crashed without back trace
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rungecc at gmail dot com
  Target Milestone: ---

Minimal example(https://godbolt.org/z/qPKaYdj4o):

```c++
template < typename... Ts >
struct list {};

template < typename... Ts >
constexpr
bool ice = []( list<decltype([](Ts){})...> x = {}) { 
        return true;
    }();

constexpr auto r = ice<int>;
```

GCC just crashes, without any useful diagnostics or internal reports, possibly
runs into an infinite loop when it performs mangling (the crash of clang is
this type).

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

* [Bug c++/115053] gcc crashed without back trace
  2024-05-12 21:03 [Bug c++/115053] New: gcc crashed without back trace rungecc at gmail dot com
@ 2024-05-13 18:36 ` mpolacek at gcc dot gnu.org
  2024-06-15  0:12 ` rungecc at gmail dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2024-05-13 18:36 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Can't reproduce:

$ time ./cc1plus -quiet 115053.C -std=c++20

real    0m0.016s
user    0m0.010s
sys     0m0.006s

same with gcc 14 and 13.

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

* [Bug c++/115053] gcc crashed without back trace
  2024-05-12 21:03 [Bug c++/115053] New: gcc crashed without back trace rungecc at gmail dot com
  2024-05-13 18:36 ` [Bug c++/115053] " mpolacek at gcc dot gnu.org
@ 2024-06-15  0:12 ` rungecc at gmail dot com
  2024-06-15  0:13 ` rungecc at gmail dot com
  2024-06-15  0:17 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rungecc at gmail dot com @ 2024-06-15  0:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Chromo Runge <rungecc at gmail dot com> ---
Created attachment 58434
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58434&action=edit
local crash

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

* [Bug c++/115053] gcc crashed without back trace
  2024-05-12 21:03 [Bug c++/115053] New: gcc crashed without back trace rungecc at gmail dot com
  2024-05-13 18:36 ` [Bug c++/115053] " mpolacek at gcc dot gnu.org
  2024-06-15  0:12 ` rungecc at gmail dot com
@ 2024-06-15  0:13 ` rungecc at gmail dot com
  2024-06-15  0:17 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rungecc at gmail dot com @ 2024-06-15  0:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Chromo Runge <rungecc at gmail dot com> ---
(In reply to Marek Polacek from comment #1)
> Can't reproduce:
> 
> $ time ./cc1plus -quiet 115053.C -std=c++20
> 
> real	0m0.016s
> user	0m0.010s
> sys	0m0.006s
> 
> same with gcc 14 and 13.

It seems that this happens with flag `-g`, see attachment, reproduced in my
local gcc.

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

* [Bug c++/115053] gcc crashed without back trace
  2024-05-12 21:03 [Bug c++/115053] New: gcc crashed without back trace rungecc at gmail dot com
                   ` (2 preceding siblings ...)
  2024-06-15  0:13 ` rungecc at gmail dot com
@ 2024-06-15  0:17 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-15  0:17 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-06-15
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
           Keywords|ice-on-invalid-code         |ice-on-valid-code

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
#3  0x0000000000b3f34b in dump_aggr_type (t=0x7ffff79b89d8, flags=1,
pp=0x3302820 <actual_pretty_printer>) at
/home/apinski/src/upstream-gcc-new/gcc/gcc/cp/error.cc:794
#4  0x0000000000b46f23 in dump_scope (scope=<optimized out>, flags=<optimized
out>, pp=0x3302820 <actual_pretty_printer>) at
/home/apinski/src/upstream-gcc-new/gcc/gcc/cp/error.cc:249
#5  0x0000000000b3f74a in dump_aggr_type (t=<optimized out>, flags=4096,
pp=0x3302820 <actual_pretty_printer>) at
/home/apinski/src/upstream-gcc-new/gcc/gcc/cp/error.cc:825
#6  0x0000000000b4604f in dump_template_argument_list (args=0x7ffff79b9ac0,
flags=4096, pp=0x3302820 <actual_pretty_printer>) at
/home/apinski/src/upstream-gcc-new/gcc/gcc/cp/error.cc:325
#7  0x0000000000b47133 in dump_template_parms (info=<optimized out>,
primary=<optimized out>, flags=<optimized out>, pp=0x3302820
<actual_pretty_printer>) at
/home/apinski/src/upstream-gcc-new/gcc/gcc/cp/error.cc:2111
#8  0x0000000000b46326 in dump_parameters (parmtypes=0x7ffff79be640, flags=0,
pp=0x3302820 <actual_pretty_printer>) at
/home/apinski/src/upstream-gcc-new/gcc/gcc/tree.h:3633
#9  0x0000000000b3f61c in dump_aggr_type (t=0x7ffff79b89d8, flags=1,
pp=0x3302820 <actual_pretty_printer>) at
/home/apinski/src/upstream-gcc-new/gcc/gcc/cp/error.cc:849
#10 0x0000000000b46f23 in dump_scope (scope=<optimized out>, flags=<optimized
out>, pp=0x3302820 <actual_pretty_printer>) at
/home/apinski/src/upstream-gcc-new/gcc/gcc/cp/error.cc:249
#11 0x0000000000b3f74a in dump_aggr_type (t=<optimized out>, flags=4096,
pp=0x3302820 <actual_pretty_printer>) at
/home/apinski/src/upstream-gcc-new/gcc/gcc/cp/error.cc:825
#12 0x0000000000b4604f in dump_template_argument_list (args=0x7ffff79b9ac0,
flags=4096, pp=0x3302820 <actual_pretty_printer>) at
/home/apinski/src/upstream-gcc-new/gcc/gcc/cp/error.cc:325
#13 0x0000000000b47133 in dump_template_parms (info=<optimized out>,
primary=<optimized out>, flags=<optimized out>, pp=0x3302820
<actual_pretty_printer>) at
/home/apinski/src/upstream-gcc-new/gcc/gcc/cp/error.cc:2111
#14 0x0000000000b46326 in dump_parameters (parmtypes=0x7ffff79be640, flags=0,
pp=0x3302820 <actual_pretty_printer>) at
/home/apinski/src/upstream-gcc-new/gcc/gcc/tree.h:3633
#15 0x0000000000b3f61c in dump_aggr_type (t=0x7ffff79b89d8, flags=1,
pp=0x3302820 <actual_pretty_printer>) at
/home/apinski/src/upstream-gcc-new/gcc/gcc/cp/error.cc:849
#16 0x0000000000b46f23 in dump_scope (scope=<optimized out>, flags=<optimized
out>, pp=0x3302820 <actual_pretty_printer>) at
/home/apinski/src/upstream-gcc-new/gcc/gcc/cp/error.cc:249
#17 0x0000000000b3f74a in dump_aggr_type (t=<optimized out>, flags=4096,
pp=0x3302820 <actual_pretty_printer>) at
/home/apinski/src/upstream-gcc-new/gcc/gcc/cp/error.cc:825
#18 0x0000000000b4604f in dump_template_argument_list (args=0x7ffff79b9ac0,
flags=4096, pp=0x3302820 <actual_pretty_printer>) at
/home/apinski/src/upstream-gcc-new/gcc/gcc/cp/error.cc:325
#19 0x0000000000b47133 in dump_template_parms (info=<optimized out>,
primary=<optimized out>, flags=<optimized out>, pp=0x3302820
<actual_pretty_printer>) at
/home/apinski/src/upstream-gcc-new/gcc/gcc/cp/error.cc:2111
#20 0x0000000000b46326 in dump_parameters (parmtypes=0x7ffff79be640, flags=0,
pp=0x3302820 <actual_pretty_printer>) at
/home/apinski/src/upstream-gcc-new/gcc/gcc/tree.h:3633
#21 0x0000000000b3f61c in dump_aggr_type (t=0x7ffff79b89d8, flags=1,
pp=0x3302820 <actual_pretty_printer>) at
/home/apinski/src/upstream-gcc-new/gcc/gcc/cp/error.cc:849
#22 0x0000000000b46f23 in dump_scope (scope=<optimized out>, flags=<optimized
out>, pp=0x3302820 <actual_pretty_printer>) at
/home/apinski/src/upstream-gcc-new/gcc/gcc/cp/error.cc:249
#23 0x0000000000b3f74a in dump_aggr_type (t=<optimized out>, flags=4096,
pp=0x3302820 <actual_pretty_printer>) at
/home/apinski/src/upstream-gcc-new/gcc/gcc/cp/error.cc:825
#24 0x0000000000b4604f in dump_template_argument_list (args=0x7ffff79b9ac0,
flags=4096, pp=0x3302820 <actual_pretty_printer>) at
/home/apinski/src/upstream-gcc-new/gcc/gcc/cp/error.cc:325
#25 0x0000000000b47133 in dump_template_parms (info=<optimized out>,
primary=<optimized out>, flags=<optimized out>, pp=0x3302820
<actual_pretty_printer>) at
/home/apinski/src/upstream-gcc-new/gcc/gcc/cp/error.cc:2111
#26 0x0000000000b46326 in dump_parameters (parmtypes=0x7ffff79be640, flags=0,
pp=0x3302820 <actual_pretty_printer>) at
/home/apinski/src/upstream-gcc-new/gcc/gcc/tree.h:3633
#27 0x0000000000b3f61c in dump_aggr_type (t=0x7ffff79b89d8, flags=1,
pp=0x3302820 <actual_pretty_printer>) at
/home/apinski/src/upstream-gcc-new/gcc/gcc/cp/error.cc:849
#28 0x0000000000b46f23 in dump_scope (scope=<optimized out>, flags=<optimized
out>, pp=0x3302820 <actual_pretty_printer>) at
/home/apinski/src/upstream-gcc-new/gcc/gcc/cp/error.cc:249
#29 0x0000000000b3f74a in dump_aggr_type (t=<optimized out>, flags=4096,
pp=0x3302820 <actual_pretty_printer>) at
/home/apinski/src/upstream-gcc-new/gcc/gcc/cp/error.cc:825
#30 0x0000000000b4604f in dump_template_argument_list (args=0x7ffff79b9ac0,
flags=4096, pp=0x3302820 <actual_pretty_printer>) at
/home/apinski/src/upstream-gcc-new/gcc/gcc/cp/error.cc:325


Confirmed. Looks like it is going in an infinite loop.

Note you also get an ICE if you don't supply -quiet when invoking cc1plus due
to cc1plus dumping the function name.

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

end of thread, other threads:[~2024-06-15  0:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-12 21:03 [Bug c++/115053] New: gcc crashed without back trace rungecc at gmail dot com
2024-05-13 18:36 ` [Bug c++/115053] " mpolacek at gcc dot gnu.org
2024-06-15  0:12 ` rungecc at gmail dot com
2024-06-15  0:13 ` rungecc at gmail dot com
2024-06-15  0:17 ` 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).