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

            Bug ID: 84941
           Summary: internal compiler error: in reg_overlap_mentioned_p,
                    at rtlanal.c:1870
                    (reg_overlap_mentioned_p()/match_asm_constraints_1())
           Product: gcc
           Version: 8.0.1
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vegard.nossum at gmail dot com
                CC: webrown.cpp at gmail dot com
  Target Milestone: ---

Input:

struct a {
  ~a() {
    short *b[]{0};
    asm("" : "=m"(b), "=d"(b) : "1p"(b));
  }
} b;

Output:

$ cc1plus -O2
 a::~a() a::~a() a::~a() void __static_initialization_and_destruction_0(int,
int) void _GLOBAL__sub_I_b()
Analyzing compilation unit
Performing interprocedural optimizations
 <*free_lang_data> <visibility> <build_ssa_passes> <opt_local_passes>
<targetclone> <free-fnsummary> <whole-program> <profile_estimate> <icf>
<devirt> <cp> <fnsummary> <inline> <pure-const> <free-fnsummary> <static-var>
<single-use> <comdats>Assembling functions:
 <materialize-all-clones> <simdclone> a::~a()during RTL pass: asmcons

<stdin>: In destructor 'a::~a()':
<stdin>:5:3: internal compiler error: in reg_overlap_mentioned_p, at
rtlanal.c:1870
0x2f0c0e7 reg_overlap_mentioned_p(rtx_def const*, rtx_def const*)
        /home/vegard/git/gcc/gcc/rtlanal.c:1870
0x2002163 match_asm_constraints_1
        /home/vegard/git/gcc/gcc/function.c:6720
0x2005f43 execute
        /home/vegard/git/gcc/gcc/function.c:6800
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.

Version:

GNU C++14 (GCC) version 8.0.1 20180306 (experimental) (x86_64-pc-linux-gnu)

Actually compiles at -O0, get the ICE at -O1.

Reply via email to