From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3643E3857C67; Sun, 7 Feb 2021 23:00:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3643E3857C67 From: "zhan3299 at purdue dot edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/98991] New: ICE: Max. number of generated reload insns per insn is achieved (90) Date: Sun, 07 Feb 2021 23:00:23 +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: 10.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: zhan3299 at purdue dot edu 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: Sun, 07 Feb 2021 23:00:24 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98991 Bug ID: 98991 Summary: ICE: Max. number of generated reload insns per insn is achieved (90) Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: zhan3299 at purdue dot edu Target Milestone: --- Created attachment 50140 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D50140&action=3Dedit poc.cc Hi all, I am not sure whether it is indeed an ICE, so I do apologize in advance for= any possible inconvenience.=20 I have a file generated by my little toy fuzzer, named poc.cc. When I compile it with: "g++ poc.cc -fpermissive", I got an "internal compi= ler error: Max. number of generated reload insns per insn is achieved (90)". Followings are the detailed information. --- poc.cc starts --- namespace{thread_local;__attribute((e()))n(){int;long;float f;__attribute(())((((__builtin_constant_p(0)))=3D=3D0));try{}catch(int){}si= zeof(reinterpret_cast(0));asm("":"=3Drmf"(f),"=3Dd"([t(reinterpret_cas= t(0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute(())class{}t= ;{__builtin_unreachable;int{reinterpret_cast(0)};(&f);}}y(){float;}}sh= ort;namespace{int;templatef(){}}struct s; --- poc.cc ends --- --- md5 of poc.cc starts --- c11f34bb78474a2a8bdcb5c5de6d19a2=20 --- md5 of poc.cc ends --- --- error trace starts --- $ ./xg++ poc.cc -fpermissive poc.cc:1:11: warning: declaration does not declare anything [-fpermissive] 1 | namespace{thread_local;__attribute((e()))n(){int;long;float f;__attribute(())((((__builtin_constant_p(0)))=3D=3D0));try{}catch(int){}si= zeof(reinterpret_cast(0));asm("":"=3Drmf"(f),"=3Dd"([t(reinterpret_cas= t(0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute(())class{}t= ;{__builtin_unreachable;int{reinterpret_cast(0)};(&f);}}y(){float;}}sh= ort;namespace{int;templatef(){}}struct s; | ^~~~~~~~~~~~ poc.cc:1:42: warning: ISO C++ forbids declaration of =E2=80=98n=E2=80=99 wi= th no type [-fpermissive] 1 | namespace{thread_local;__attribute((e()))n(){int;long;float f;__attribute(())((((__builtin_constant_p(0)))=3D=3D0));try{}catch(int){}si= zeof(reinterpret_cast(0));asm("":"=3Drmf"(f),"=3Dd"([t(reinterpret_cas= t(0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute(())class{}t= ;{__builtin_unreachable;int{reinterpret_cast(0)};(&f);}}y(){float;}}sh= ort;namespace{int;templatef(){}}struct s; | ^ poc.cc:1:44: warning: =E2=80=98e=E2=80=99 attribute directive ignored [-Wat= tributes] 1 | namespace{thread_local;__attribute((e()))n(){int;long;float f;__attribute(())((((__builtin_constant_p(0)))=3D=3D0));try{}catch(int){}si= zeof(reinterpret_cast(0));asm("":"=3Drmf"(f),"=3Dd"([t(reinterpret_cas= t(0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute(())class{}t= ;{__builtin_unreachable;int{reinterpret_cast(0)};(&f);}}y(){float;}}sh= ort;namespace{int;templatef(){}}struct s; | ^ poc.cc: In function =E2=80=98int {anonymous}::n()=E2=80=99: poc.cc:1:46: warning: declaration does not declare anything [-fpermissive] 1 | namespace{thread_local;__attribute((e()))n(){int;long;float f;__attribute(())((((__builtin_constant_p(0)))=3D=3D0));try{}catch(int){}si= zeof(reinterpret_cast(0));asm("":"=3Drmf"(f),"=3Dd"([t(reinterpret_cas= t(0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute(())class{}t= ;{__builtin_unreachable;int{reinterpret_cast(0)};(&f);}}y(){float;}}sh= ort;namespace{int;templatef(){}}struct s; | ^~~ poc.cc:1:50: warning: declaration does not declare anything [-fpermissive] 1 | namespace{thread_local;__attribute((e()))n(){int;long;float f;__attribute(())((((__builtin_constant_p(0)))=3D=3D0));try{}catch(int){}si= zeof(reinterpret_cast(0));asm("":"=3Drmf"(f),"=3Dd"([t(reinterpret_cas= t(0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute(())class{}t= ;{__builtin_unreachable;int{reinterpret_cast(0)};(&f);}}y(){float;}}sh= ort;namespace{int;templatef(){}}struct s; | ^~~~ poc.cc:1:237: warning: using rvalue as lvalue [-fpermissive] 1 | ocal;__attribute((e()))n(){int;long;float f;__attribute(())((((__builtin_constant_p(0)))=3D=3D0));try{}catch(int){}si= zeof(reinterpret_cast(0));asm("":"=3Drmf"(f),"=3Dd"([t(reinterpret_cas= t(0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute(())class{}t= ;{__builtin_unreachable;int{reinterpret_cast(0)};(&f);}}y(){float;}}sh= ort;namespace{int;templatef(){}}struct s; |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 ^ poc.cc:1:338: warning: no return statement in function returning non-void [-Wreturn-type] 1 | tch(int){}sizeof(reinterpret_cast(0));asm("":"=3Drmf"(f),"=3Dd"([t(rei= nterpret_cast(0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute= (())class{}t;{__builtin_unreachable;int{reinterpret_cast(0)};(&f);}}y(= ){float;}}short;namespace{int;templatef(){}}struct s; |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 ^ poc.cc: At global scope: poc.cc:1:339: warning: ISO C++ forbids declaration of =E2=80=98y=E2=80=99 w= ith no type [-fpermissive] 1 | ch(int){}sizeof(reinterpret_cast(0));asm("":"=3Drmf"(f),"=3Dd"([t(rein= terpret_cast(0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute(= ())class{}t;{__builtin_unreachable;int{reinterpret_cast(0)};(&f);}}y()= {float;}}short;namespace{int;templatef(){}}struct s; |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 ^ poc.cc: In function =E2=80=98int {anonymous}::y()=E2=80=99: poc.cc:1:343: warning: declaration does not declare anything [-fpermissive] 1 | nt){}sizeof(reinterpret_cast(0));asm("":"=3Drmf"(f),"=3Dd"([t(reinterp= ret_cast(0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute(())c= lass{}t;{__builtin_unreachable;int{reinterpret_cast(0)};(&f);}}y(){flo= at;}}short;namespace{int;templatef(){}}struct s; |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 ^~~~~ poc.cc:1:349: warning: no return statement in function returning non-void [-Wreturn-type] 1 | izeof(reinterpret_cast(0));asm("":"=3Drmf"(f),"=3Dd"([t(reinterpret_ca= st(0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute(())class{}= t;{__builtin_unreachable;int{reinterpret_cast(0)};(&f);}}y(){float;}}s= hort;namespace{int;templatef(){}}struct s; |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 ^ poc.cc: At global scope: poc.cc:1:351: warning: declaration does not declare anything [-fpermissive] 1 | eof(reinterpret_cast(0));asm("":"=3Drmf"(f),"=3Dd"([t(reinterpret_cast= (0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute(())class{}t;= {__builtin_unreachable;int{reinterpret_cast(0)};(&f);}}y(){float;}}sho= rt;namespace{int;templatef(){}}struct s; |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 ^~~~~ poc.cc:1:367: warning: declaration does not declare anything [-fpermissive] 1 | cast(0));asm("":"=3Drmf"(f),"=3Dd"([t(reinterpret_cast(0))]{}):"0= "(((0))),""((0)));static_assert(1);__attribute(())class{}t;{__builtin_unrea= chable;int{reinterpret_cast(0)};(&f);}}y(){float;}}short;namespace{int= ;templatef(){}}struct s; |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 ^~~ poc.cc:1:389: warning: ISO C++ forbids declaration of =E2=80=98f=E2=80=99 w= ith no type [-fpermissive] 1 | =3Drmf"(f),"=3Dd"([t(reinterpret_cast(0))]{}):"0"(((0))),""((0)));stat= ic_assert(1);__attribute(())class{}t;{__builtin_unreachable;int{reinterpret= _cast(0)};(&f);}}y(){float;}}short;namespace{int;templatef()= {}}struct s; |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 ^ poc.cc: In function =E2=80=98int {anonymous}::f()=E2=80=99: poc.cc:1:393: warning: no return statement in function returning non-void [-Wreturn-type] 1 | "(f),"=3Dd"([t(reinterpret_cast(0))]{}):"0"(((0))),""((0)));static_ass= ert(1);__attribute(())class{}t;{__builtin_unreachable;int{reinterpret_cast<= int>(0)};(&f);}}y(){float;}}short;namespace{int;templatef(){}}str= uct s; |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 ^ during RTL pass: reload poc.cc: In function =E2=80=98int {anonymous}::n()=E2=80=99: poc.cc:1:338: internal compiler error: maximum number of generated reload i= nsns per insn achieved (90) 1 | tch(int){}sizeof(reinterpret_cast(0));asm("":"=3Drmf"(f),"=3Dd"([t(rei= nterpret_cast(0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute= (())class{}t;{__builtin_unreachable;int{reinterpret_cast(0)};(&f);}}y(= ){float;}}short;namespace{int;templatef(){}}struct s; |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 ^ 0xb37790 lra_constraints(bool) ../../gcc/gcc/lra-constraints.c:4952 0xb259e4 lra(_IO_FILE*) ../../gcc/gcc/lra.c:2440 0xae38d1 do_reload ../../gcc/gcc/ira.c:5523 0xae38d1 execute ../../gcc/gcc/ira.c:5709 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. --- error trace ends ---=