public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/102643] New: Segfault in alias template deduction
@ 2021-10-07 19:19 michael at cadilhac dot name
  2021-10-11  9:59 ` [Bug c++/102643] " marxin at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: michael at cadilhac dot name @ 2021-10-07 19:19 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102643
           Summary: Segfault in alias template deduction
           Product: gcc
           Version: 11.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: michael at cadilhac dot name
  Target Milestone: ---

Created attachment 51566
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51566&action=edit
File witnessing bug.

$ uname -a
Linux pin 5.14.7-arch1-1 #1 SMP PREEMPT Wed, 22 Sep 2021 21:35:11 +0000 x86_64
GNU/Linux
$ g++ --version
g++ (GCC) 11.1.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ g++ bug.cc -std=c++20 
In file included from /usr/include/c++/11.1.0/vector:67,
                 from bug.cc:1:
/usr/include/c++/11.1.0/bits/stl_vector.h: In function
‘vector(std::initializer_list<_Tp>, const std::allocator<_Up>&)->
std::vector<T> [with T = char]’:
/usr/include/c++/11.1.0/bits/stl_vector.h:626:42: internal compiler error:
Segmentation fault
  626 |              const allocator_type& __a = allocator_type())
      |                                          ^~~~~~~~~~~~~~~~
0x1797368 internal_error(char const*, ...)
        ???:0
0x7e73b1 tsubst(tree_node*, tree_node*, int, tree_node*)
        ???:0
0x7fa400 tsubst_template_args(tree_node*, tree_node*, int, tree_node*)
        ???:0
0x7e875d tsubst(tree_node*, tree_node*, int, tree_node*)
        ???:0
0x7fc222 tsubst_default_argument(tree_node*, int, tree_node*, tree_node*, int)
        ???:0
0x68bb2b convert_default_arg(tree_node*, tree_node*, tree_node*, int, int)
        ???:0
0x69950a build_new_function_call(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
        ???:0
0x7e0ba8 do_auto_deduction(tree_node*, tree_node*, tree_node*, int,
auto_deduction_context, tree_node*, int)
        ???:0
0x851e94 build_functional_cast(unsigned int, tree_node*, tree_node*, int)
        ???:0
0x7ce2fe c_parse_file()
        ???:0
0x8a252d c_common_parse_file()
        ???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://bugs.archlinux.org/> for instructions.
$

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

* [Bug c++/102643] Segfault in alias template deduction
  2021-10-07 19:19 [Bug c++/102643] New: Segfault in alias template deduction michael at cadilhac dot name
@ 2021-10-11  9:59 ` marxin at gcc dot gnu.org
  2021-10-11 16:25 ` ppalka at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-10-11  9:59 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org,
                   |                            |ppalka at gcc dot gnu.org

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed with r12-1744-g3eecc1db4c691a87, so likely dup of PR86439.

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

* [Bug c++/102643] Segfault in alias template deduction
  2021-10-07 19:19 [Bug c++/102643] New: Segfault in alias template deduction michael at cadilhac dot name
  2021-10-11  9:59 ` [Bug c++/102643] " marxin at gcc dot gnu.org
@ 2021-10-11 16:25 ` ppalka at gcc dot gnu.org
  2021-10-11 16:34 ` cvs-commit at gcc dot gnu.org
  2021-10-11 16:35 ` ppalka at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-10-11 16:25 UTC (permalink / raw)
  To: gcc-bugs

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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-10-11
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |ppalka at gcc dot gnu.org

--- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Reduced testcase (needs a checking compiler to reliably crash):

template<class _Tp, class = int>
struct vector {
  typedef int allocator_type;
  vector(_Tp, allocator_type = allocator_type());
};
template<class T> using vector_mm = vector<T>;
vector_mm v(0);

I suppose we should add this testcase to the testsuite before closing the PR.

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

* [Bug c++/102643] Segfault in alias template deduction
  2021-10-07 19:19 [Bug c++/102643] New: Segfault in alias template deduction michael at cadilhac dot name
  2021-10-11  9:59 ` [Bug c++/102643] " marxin at gcc dot gnu.org
  2021-10-11 16:25 ` ppalka at gcc dot gnu.org
@ 2021-10-11 16:34 ` cvs-commit at gcc dot gnu.org
  2021-10-11 16:35 ` ppalka at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-10-11 16:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:

https://gcc.gnu.org/g:0de8c2f8104b74f46e63d0d5d7b9e8fd3f04bb98

commit r12-4323-g0de8c2f8104b74f46e63d0d5d7b9e8fd3f04bb98
Author: Patrick Palka <ppalka@redhat.com>
Date:   Mon Oct 11 12:33:30 2021 -0400

    c++: Add testcase for already-fixed PR [PR102643]

    Fixed with r12-1744.

            PR c++/102643

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp2a/class-deduction-alias11.C: New test.

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

* [Bug c++/102643] Segfault in alias template deduction
  2021-10-07 19:19 [Bug c++/102643] New: Segfault in alias template deduction michael at cadilhac dot name
                   ` (2 preceding siblings ...)
  2021-10-11 16:34 ` cvs-commit at gcc dot gnu.org
@ 2021-10-11 16:35 ` ppalka at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-10-11 16:35 UTC (permalink / raw)
  To: gcc-bugs

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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=86439
         Resolution|---                         |FIXED
   Target Milestone|---                         |12.0

--- Comment #4 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed

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

end of thread, other threads:[~2021-10-11 16:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-07 19:19 [Bug c++/102643] New: Segfault in alias template deduction michael at cadilhac dot name
2021-10-11  9:59 ` [Bug c++/102643] " marxin at gcc dot gnu.org
2021-10-11 16:25 ` ppalka at gcc dot gnu.org
2021-10-11 16:34 ` cvs-commit at gcc dot gnu.org
2021-10-11 16:35 ` ppalka 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).