From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 392593851C2B; Wed, 24 Jun 2020 15:30:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 392593851C2B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1593012643; bh=GnttfuSiuIWdxcEJZg0NwvBOWg0Xdocns1d1Yiy6eLY=; h=From:To:Subject:Date:From; b=Swj9FNA3I+rCCjLbSTnRhIzZOrQR43l5/WI4PdBNWmxSZwyFWKXHF2Gx2kmQpWPrs q4dImwLaFaZ+JWcWBGIfHIAy65JYHtEYrRju34ogEA9YjqVeHZsDnpjgmYpYZjDo8B /P/HWLlQSs4g6WredZZqev1g76izqqyHj9XxC+H8= From: "viktor.rosendahl at bmw dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/95870] New: ICE(segmentation fault) in most_general_template(), in gcc/cp/pt.c Date: Wed, 24 Jun 2020 15:30:42 +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: 9.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: viktor.rosendahl at bmw dot de 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, 24 Jun 2020 15:30:43 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95870 Bug ID: 95870 Summary: ICE(segmentation fault) in most_general_template(), in gcc/cp/pt.c Product: gcc Version: 9.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: viktor.rosendahl at bmw dot de Target Milestone: --- Created attachment 48780 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D48780&action=3Dedit Selfcontained example (preprocessed cource code) I can reproduce this bug with the following gcc versions: 9.3.0 10.1.0 11.0.0 20200624 (experimental) [this was built with revision eb0ff770e29 fr= om git://gcc.gnu.org/git/gcc.git, which was the tip of the master branch on 24= th of June, 2020] The bug does not happen with: 7.5.0 I have not tested any 8.x version. All compilers were built from pristine sources, no patches added. My system is a x86_64 machine with Ubuntu 18.04.4 LTS. I configured all compiler builds like this: ./configure --disable-multilib --prefix=3D/home/viktor/gcc-bin-9.3.0 --enable-languages=3Dc,c++ Steps to reproduce: xz -dc preproc_example4.ii.xz > preproc_example4.ii g++ -c -pipe -O2 -Wall -std=3Dc++17 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DE= BUG -DQT_GUI_LIB -DQT_CORE_LIB -o obj/example4.o preproc_example4.ii I get the following output (with gcc-9.3.0): example4.cpp: In instantiation of =E2=80=98BungleFooBar::BungleFooBar= () [with U =3D FailFoo; V =3D BotchFoo]=E2=80=99: example4.cpp:44:22: required from here example4.cpp:17:5: internal compiler error: Segmentation fault 17 | MACRO_FOOBAR(foofoobar, bar); | ^ 0xb8ff1f crash_signal ../.././gcc/toplev.c:326 0x6e4260 most_general_template(tree_node*) ../.././gcc/cp/pt.c:23652 0x6e457d enclosing_instantiation_of ../.././gcc/cp/pt.c:13424 0x701c53 tsubst_function_decl ../.././gcc/cp/pt.c:12943 0x6fe2b8 tsubst_decl ../.././gcc/cp/pt.c:13464 0x6f9ee7 tsubst(tree_node*, tree_node*, int, tree_node*) ../.././gcc/cp/pt.c:14365 0x70263a lookup_template_class_1 ../.././gcc/cp/pt.c:9483 0x70263a lookup_template_class(tree_node*, tree_node*, tree_node*, tree_nod= e*, int, int) ../.././gcc/cp/pt.c:9771 0x700e5d tsubst_aggr_type ../.././gcc/cp/pt.c:12764 0x6f9cbf tsubst(tree_node*, tree_node*, int, tree_node*) ../.././gcc/cp/pt.c:14447 0x6fe940 tsubst_decl ../.././gcc/cp/pt.c:13731 0x6f9ee7 tsubst(tree_node*, tree_node*, int, tree_node*) ../.././gcc/cp/pt.c:14365 0x6f42ce tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../.././gcc/cp/pt.c:17173 0x6f2378 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../.././gcc/cp/pt.c:17088 0x6f24ec tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../.././gcc/cp/pt.c:17389 0x6f24ec tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../.././gcc/cp/pt.c:17389 0x6f5885 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../.././gcc/cp/pt.c:17073 0x6f5885 tsubst_lambda_expr(tree_node*, tree_node*, int, tree_node*) ../.././gcc/cp/pt.c:18301 0x6f7775 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, boo= l, bool) ../.././gcc/cp/pt.c:19666 0x6f618e tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, boo= l, bool) ../.././gcc/cp/pt.c:18918 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions.=