public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/94751] New: [9/10] ICE on invalid code in maybe_instantiate_noexcept
@ 2020-04-24 18:52 sss@li-snyder.org
  2020-04-24 22:29 ` [Bug c++/94751] " mpolacek at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: sss@li-snyder.org @ 2020-04-24 18:52 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94751
           Summary: [9/10] ICE on invalid code in
                    maybe_instantiate_noexcept
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sss@li-snyder.org
  Target Milestone: ---

hi -

gcc version:

gcc version 10.0.1 20200329 (experimental) (GCC) 

ICEs on the following (invalid) input:

-- x.cc -----------------------------------------------------
struct  Algorithm
{
  Algorithm( float );
};


template <class BASE>
struct ToolWithConstants
  : public Algorithm
{
  using Algorithm::Algorithm;

  struct Constant
  {
    Constant (int name);
  };

  Constant c { "order" };
};

class unique_ptr {};

unique_ptr make()
{
  return unique_ptr (new ToolWithConstants<Algorithm> (10.5));
}

------------------------------------------------------------


like this:

[sss@karma rootaccess]$ g++ -c x.cc
x.cc: In function ‘unique_ptr make()’:
x.cc:25:60: internal compiler error: Segmentation fault
   25 |   return unique_ptr (new ToolWithConstants<Algorithm> (10.5));
      |                                                            ^
0xc4fe4f crash_signal
        /home/sss/gcc/gcc/gcc/toplev.c:328
0x7f4d24bf8ebf ???
       
/usr/src/debug/glibc-2.29-51-g845278f2c6/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0x759eff maybe_instantiate_noexcept(tree_node*, int)
        /home/sss/gcc/gcc/gcc/cp/pt.c:25032
0x6b8388 mark_used(tree_node*, int)
        /home/sss/gcc/gcc/gcc/cp/decl2.c:5512
0x644892 build_over_call
        /home/sss/gcc/gcc/gcc/cp/call.c:9048
0x646ade build_new_method_call_1
        /home/sss/gcc/gcc/gcc/cp/call.c:10338
0x647796 build_new_method_call(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, tree_node*, int, tree_node**, int)
        /home/sss/gcc/gcc/gcc/cp/call.c:10413
0x647796 build_special_member_call(tree_node*, tree_node*, vec<tree_node*,
va_gc, vl_embed>**, tree_node*, int, int)
        /home/sss/gcc/gcc/gcc/cp/call.c:9814
0x6cec5f build_new_1
        /home/sss/gcc/gcc/gcc/cp/init.c:3588
0x6cf9f8 build_new(unsigned int, vec<tree_node*, va_gc, vl_embed>**,
tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed>**, int, int)
        /home/sss/gcc/gcc/gcc/cp/init.c:3905
0x729a37 cp_parser_new_expression
        /home/sss/gcc/gcc/gcc/cp/parser.c:8825
0x72a057 cp_parser_unary_expression
        /home/sss/gcc/gcc/gcc/cp/parser.c:8418
0x706b1a cp_parser_binary_expression
        /home/sss/gcc/gcc/gcc/cp/parser.c:9554
0x7081ce cp_parser_assignment_expression
        /home/sss/gcc/gcc/gcc/cp/parser.c:9859
0x70a668 cp_parser_parenthesized_expression_list
        /home/sss/gcc/gcc/gcc/cp/parser.c:7981
0x70ada2 cp_parser_functional_cast
        /home/sss/gcc/gcc/gcc/cp/parser.c:29572
0x721f24 cp_parser_postfix_expression
        /home/sss/gcc/gcc/gcc/cp/parser.c:7180
0x706b1a cp_parser_binary_expression
        /home/sss/gcc/gcc/gcc/cp/parser.c:9554
0x7081ce cp_parser_assignment_expression
        /home/sss/gcc/gcc/gcc/cp/parser.c:9859
0x7084e2 cp_parser_expression
        /home/sss/gcc/gcc/gcc/cp/parser.c:10027
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.



A crash is also observed with a 20200424 version as well as

gcc version 9.2.1 20190827 (Red Hat 9.2.1-1) (GCC) 


thanks,
sss

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

end of thread, other threads:[~2021-03-25 20:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-24 18:52 [Bug c++/94751] New: [9/10] ICE on invalid code in maybe_instantiate_noexcept sss@li-snyder.org
2020-04-24 22:29 ` [Bug c++/94751] " mpolacek at gcc dot gnu.org
2020-04-24 22:44 ` [Bug c++/94751] [9/10 Regression] " mpolacek at gcc dot gnu.org
2021-01-14  8:39 ` [Bug c++/94751] [9/10/11 " rguenth at gcc dot gnu.org
2021-01-19 15:35 ` dcb314 at hotmail dot com
2021-01-19 20:52 ` mpolacek at gcc dot gnu.org
2021-01-19 20:54 ` mpolacek at gcc dot gnu.org
2021-03-12  0:49 ` mpolacek at gcc dot gnu.org
2021-03-25 20:13 ` cvs-commit at gcc dot gnu.org
2021-03-25 20:15 ` 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).