public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "lnwirz at chem dot helsinki.fi" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/99675] New: internal compiler error during template deduction
Date: Fri, 19 Mar 2021 21:55:48 +0000	[thread overview]
Message-ID: <bug-99675-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 99675
           Summary: internal compiler error during template deduction
           Product: gcc
           Version: 10.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: lnwirz at chem dot helsinki.fi
  Target Milestone: ---

Created attachment 50436
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50436&action=edit
the code file, saved temps

Hi folks,

When compiling the attached (fairly) minimal example with g++-10.2.1
(debian/testing) with

g++ --std=c++17 bug1.cpp

I get

bug1.cpp: In function ‘void lala()’:
bug1.cpp:20:19: warning: alias template deduction only available with
‘-std=c++2a’ or ‘-std=gnu++2a’
   20 |   vec3 foo(1, 2, 3);
      |                   ^
bug1.cpp:20:19: internal compiler error: in set_constraints, at
cp/constraint.cc:1191
0x7fcbcfa72d09 __libc_start_main
        ../csu/libc-start.c:308
Please submit a full bug report,

In g++-10.2.1 as shipped by debian testing, the std=c++17 is required for the
failure.  Comparing with compiler explorer (https://gcc.godbolt.org/z/d3dTff)
shows that in trunk not even the c++17 argument is required and the output is


source>: In function 'void lala()':
<source>:20:19: warning: alias template deduction only available with
'-std=c++20' or '-std=gnu++20'
   20 |   vec3 foo(1, 2, 3);
      |                   ^
<source>:20:19: internal compiler error: in set_constraints, at
cp/constraint.cc:1255
0x1cfa259 internal_error(char const*, ...)
        ???:0
0x6ba797 fancy_abort(char const*, int, char const*)
        ???:0
0x73f122 set_constraints(tree_node*, tree_node*)
        ???:0
0x909361 do_auto_deduction(tree_node*, tree_node*, tree_node*, int,
auto_deduction_context, tree_node*, int)
        ???:0
0x7b2164 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
        ???:0
0x8e136d c_parse_file()
        ???:0
0xa5f962 c_common_parse_file()
        ???:0
Please submit a full bug report,


let me know if more information is required.

cheers, Lukas Wirz

             reply	other threads:[~2021-03-19 21:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-19 21:55 lnwirz at chem dot helsinki.fi [this message]
2021-03-20 19:51 ` [Bug c++/99675] [11 Regression] ICE during template deduction since r10-5020-g1a291106384cabc7 marxin at gcc dot gnu.org
2021-03-22  8:53 ` [Bug c++/99675] [10/11 " rguenth at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2021-04-10  6:20 ` jason at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-99675-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).