public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98991] New: ICE: Max. number of generated reload insns per insn is achieved (90)
@ 2021-02-07 23:00 zhan3299 at purdue dot edu
  2021-02-08  9:06 ` [Bug c++/98991] " marxin at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: zhan3299 at purdue dot edu @ 2021-02-07 23:00 UTC (permalink / raw)
  To: gcc-bugs

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

            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=50140&action=edit
poc.cc

Hi all,

I am not sure whether it is indeed an ICE, so I do apologize in advance for any
possible inconvenience. 

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 compiler
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)))==0));try{}catch(int){}sizeof(reinterpret_cast<int>(0));asm("":"=rmf"(f),"=d"([t(reinterpret_cast<int>(0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute(())class{}t;{__builtin_unreachable;int{reinterpret_cast<int>(0)};(&f);}}y(){float;}}short;namespace{int;template<typename>f(){}}struct
s;
--- poc.cc ends ---


--- md5 of poc.cc starts ---
c11f34bb78474a2a8bdcb5c5de6d19a2 
--- 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)))==0));try{}catch(int){}sizeof(reinterpret_cast<int>(0));asm("":"=rmf"(f),"=d"([t(reinterpret_cast<int>(0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute(())class{}t;{__builtin_unreachable;int{reinterpret_cast<int>(0)};(&f);}}y(){float;}}short;namespace{int;template<typename>f(){}}struct
s;
      |           ^~~~~~~~~~~~
poc.cc:1:42: warning: ISO C++ forbids declaration of ‘n’ with no type
[-fpermissive]
    1 | namespace{thread_local;__attribute((e()))n(){int;long;float
f;__attribute(())((((__builtin_constant_p(0)))==0));try{}catch(int){}sizeof(reinterpret_cast<int>(0));asm("":"=rmf"(f),"=d"([t(reinterpret_cast<int>(0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute(())class{}t;{__builtin_unreachable;int{reinterpret_cast<int>(0)};(&f);}}y(){float;}}short;namespace{int;template<typename>f(){}}struct
s;
      |                                          ^
poc.cc:1:44: warning: ‘e’ attribute directive ignored [-Wattributes]
    1 | namespace{thread_local;__attribute((e()))n(){int;long;float
f;__attribute(())((((__builtin_constant_p(0)))==0));try{}catch(int){}sizeof(reinterpret_cast<int>(0));asm("":"=rmf"(f),"=d"([t(reinterpret_cast<int>(0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute(())class{}t;{__builtin_unreachable;int{reinterpret_cast<int>(0)};(&f);}}y(){float;}}short;namespace{int;template<typename>f(){}}struct
s;
      |                                            ^
poc.cc: In function ‘int {anonymous}::n()’:
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)))==0));try{}catch(int){}sizeof(reinterpret_cast<int>(0));asm("":"=rmf"(f),"=d"([t(reinterpret_cast<int>(0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute(())class{}t;{__builtin_unreachable;int{reinterpret_cast<int>(0)};(&f);}}y(){float;}}short;namespace{int;template<typename>f(){}}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)))==0));try{}catch(int){}sizeof(reinterpret_cast<int>(0));asm("":"=rmf"(f),"=d"([t(reinterpret_cast<int>(0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute(())class{}t;{__builtin_unreachable;int{reinterpret_cast<int>(0)};(&f);}}y(){float;}}short;namespace{int;template<typename>f(){}}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)))==0));try{}catch(int){}sizeof(reinterpret_cast<int>(0));asm("":"=rmf"(f),"=d"([t(reinterpret_cast<int>(0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute(())class{}t;{__builtin_unreachable;int{reinterpret_cast<int>(0)};(&f);}}y(){float;}}short;namespace{int;template<typename>f(){}}struct
s;
      |                                                                        
                                                                               
                                                                  ^

poc.cc:1:338: warning: no return statement in function returning non-void
[-Wreturn-type]
    1 |
tch(int){}sizeof(reinterpret_cast<int>(0));asm("":"=rmf"(f),"=d"([t(reinterpret_cast<int>(0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute(())class{}t;{__builtin_unreachable;int{reinterpret_cast<int>(0)};(&f);}}y(){float;}}short;namespace{int;template<typename>f(){}}struct
s;
      |                                                                        
                                                                               
                                                                  ^

poc.cc: At global scope:
poc.cc:1:339: warning: ISO C++ forbids declaration of ‘y’ with no type
[-fpermissive]
    1 |
ch(int){}sizeof(reinterpret_cast<int>(0));asm("":"=rmf"(f),"=d"([t(reinterpret_cast<int>(0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute(())class{}t;{__builtin_unreachable;int{reinterpret_cast<int>(0)};(&f);}}y(){float;}}short;namespace{int;template<typename>f(){}}struct
s;
      |                                                                        
                                                                               
                                                                  ^

poc.cc: In function ‘int {anonymous}::y()’:
poc.cc:1:343: warning: declaration does not declare anything [-fpermissive]
    1 |
nt){}sizeof(reinterpret_cast<int>(0));asm("":"=rmf"(f),"=d"([t(reinterpret_cast<int>(0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute(())class{}t;{__builtin_unreachable;int{reinterpret_cast<int>(0)};(&f);}}y(){float;}}short;namespace{int;template<typename>f(){}}struct
s;
      |                                                                        
                                                                               
                                                                  ^~~~~

poc.cc:1:349: warning: no return statement in function returning non-void
[-Wreturn-type]
    1 |
izeof(reinterpret_cast<int>(0));asm("":"=rmf"(f),"=d"([t(reinterpret_cast<int>(0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute(())class{}t;{__builtin_unreachable;int{reinterpret_cast<int>(0)};(&f);}}y(){float;}}short;namespace{int;template<typename>f(){}}struct
s;
      |                                                                        
                                                                               
                                                                  ^

poc.cc: At global scope:
poc.cc:1:351: warning: declaration does not declare anything [-fpermissive]
    1 |
eof(reinterpret_cast<int>(0));asm("":"=rmf"(f),"=d"([t(reinterpret_cast<int>(0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute(())class{}t;{__builtin_unreachable;int{reinterpret_cast<int>(0)};(&f);}}y(){float;}}short;namespace{int;template<typename>f(){}}struct
s;
      |                                                                        
                                                                               
                                                                  ^~~~~

poc.cc:1:367: warning: declaration does not declare anything [-fpermissive]
    1 |
cast<int>(0));asm("":"=rmf"(f),"=d"([t(reinterpret_cast<int>(0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute(())class{}t;{__builtin_unreachable;int{reinterpret_cast<int>(0)};(&f);}}y(){float;}}short;namespace{int;template<typename>f(){}}struct
s;
      |                                                                        
                                                                               
                                                                  ^~~

poc.cc:1:389: warning: ISO C++ forbids declaration of ‘f’ with no type
[-fpermissive]
    1 |
=rmf"(f),"=d"([t(reinterpret_cast<int>(0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute(())class{}t;{__builtin_unreachable;int{reinterpret_cast<int>(0)};(&f);}}y(){float;}}short;namespace{int;template<typename>f(){}}struct
s;
      |                                                                        
                                                                               
                                                                  ^

poc.cc: In function ‘int {anonymous}::f()’:
poc.cc:1:393: warning: no return statement in function returning non-void
[-Wreturn-type]
    1 |
"(f),"=d"([t(reinterpret_cast<int>(0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute(())class{}t;{__builtin_unreachable;int{reinterpret_cast<int>(0)};(&f);}}y(){float;}}short;namespace{int;template<typename>f(){}}struct
s;
      |                                                                        
                                                                               
                                                                  ^

during RTL pass: reload
poc.cc: In function ‘int {anonymous}::n()’:
poc.cc:1:338: internal compiler error: maximum number of generated reload insns
per insn achieved (90)
    1 |
tch(int){}sizeof(reinterpret_cast<int>(0));asm("":"=rmf"(f),"=d"([t(reinterpret_cast<int>(0))]{}):"0"(((0))),""((0)));static_assert(1);__attribute(())class{}t;{__builtin_unreachable;int{reinterpret_cast<int>(0)};(&f);}}y(){float;}}short;namespace{int;template<typename>f(){}}struct
s;
      |                                                                        
                                                                               
                                                                  ^

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 <https://gcc.gnu.org/bugs/> for instructions.
--- error trace ends ---

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

end of thread, other threads:[~2021-09-14  7:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-07 23:00 [Bug c++/98991] New: ICE: Max. number of generated reload insns per insn is achieved (90) zhan3299 at purdue dot edu
2021-02-08  9:06 ` [Bug c++/98991] " marxin at gcc dot gnu.org
2021-02-08  9:34 ` [Bug inline-asm/98991] " rguenth at gcc dot gnu.org
2021-02-08 15:31 ` zhan3299 at purdue dot edu
2021-02-08 15:36 ` zhan3299 at purdue dot edu
2021-09-14  7:34 ` [Bug target/98991] " pinskia 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).