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

            Bug ID: 68015
           Summary: ICE in s390_emit_compare
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: matz at gcc dot gnu.org
  Target Milestone: ---

$ cat s390x-ice-datetime.i
/* -O2 -march=z196 --> ICE in s390_emit_compare */
extern long useme (long, ...);

void foo (void)
{
        long secs = useme (41);
        long utc_secs = useme (42);
        long h, m;

        utc_secs = useme (42);
        h = secs / 3600;
        m = secs / 60;
        if (utc_secs >= 86400) {
                m = 59;
                h--;
                if (h < 0) {
                        h = 23;
                }
        }
        useme(h,m);
}

$ ./cc1 -fpreprocessed -march=z196 -O2 s390x-ice-datetime.i 
s390x-ice-datetime.i: In function ‘foo’:
s390x-ice-datetime.i:21:1: internal compiler error: in s390_emit_compare, at
config/s390/s390.c:1708
 }
 ^
0x10f3155 s390_emit_compare(rtx_code, rtx_def*, rtx_def*)
        ../../gcc/gcc/config/s390/s390.c:1707
0x1262985 gen_movdicc(rtx_def*, rtx_def*, rtx_def*, rtx_def*)
        ../../gcc/gcc/config/s390/s390.md:6112
0xc2beb2 insn_gen_fn::operator()(rtx_def*, rtx_def*, rtx_def*, rtx_def*) const
        ../../gcc/gcc/recog.h:303
0xc2b98e maybe_gen_insn(insn_code, unsigned int, expand_operand*)
        ../../gcc/gcc/optabs.c:6721
0xc2bc8b maybe_expand_insn(insn_code, unsigned int, expand_operand*)
        ../../gcc/gcc/optabs.c:6751
0xc259b8 emit_conditional_move(rtx_def*, rtx_code, rtx_def*, rtx_def*,
machine_mode, rtx_def*, rtx_def*, machine_mode, int)
        ../../gcc/gcc/optabs.c:4201
0x13d8f38 noce_emit_cmove
        ../../gcc/gcc/ifcvt.c:1607
0x13dd882 cond_move_convert_if_block
        ../../gcc/gcc/ifcvt.c:3449
0x13ddc09 cond_move_process_if_block
        ../../gcc/gcc/ifcvt.c:3536
0x13de284 noce_find_if_block
        ../../gcc/gcc/ifcvt.c:3704
0x13de93b find_if_header
        ../../gcc/gcc/ifcvt.c:3905
0x13e1434 if_convert
        ../../gcc/gcc/ifcvt.c:5051
0x13e1773 execute
        ../../gcc/gcc/ifcvt.c:5198

Reply via email to