From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9AF023858C2C; Wed, 2 Feb 2022 17:08:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9AF023858C2C From: "dev at gutoehrlein dot eu" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/104347] New: internal compiler error- default template arguments - missing angle brackets Date: Wed, 02 Feb 2022 17:08:58 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dev at gutoehrlein dot eu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Feb 2022 17:08:58 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104347 Bug ID: 104347 Summary: internal compiler error- default template arguments - missing angle brackets Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: dev at gutoehrlein dot eu Target Milestone: --- Created attachment 52330 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D52330&action=3Dedit code which crashes the compiler command to compile: g++ -o test -std=3Dc++20 -O2 test.cpp ----- Version of g++: 11.2 OS: Ubuntu (Kernel: 5.13.0) ----- The code contains a missing "<>" in line 327. Line 328 (comment) contains t= he correct code. g++ crashes with an internal compiler error instead of displa= ying an error message. Additional info: * Can be also reproduced on https://godbolt.org/ * The current VS compiler also produces an internal compiler error. * Clang 13 parses the file and displays the appropriate error message:=20 :327:11: error: alias template 'SISpeed' requires template argume= nts; argument deduction only allowed for class templates ----- : In function 'int main(int, char**)': :327:19: internal compiler error: Segmentation fault 327 | SISpeed v =3D l / t; | ^ 0x1786229 internal_error(char const*, ...) ???:0 0x7d2840 template_parms_to_args(tree_node*) ???:0 0x7d68ed do_auto_deduction(tree_node*, tree_node*, tree_node*, int, auto_deduction_context, tree_node*, int) ???:0 0x7002b6 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) ???:0 0x7c47db c_parse_file() ???:0 0x896762 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 for instructions. Compiler returned: 1=