[Bug debug/65980] New: [6 Regression] -fcompare-debug building Linux kernel

trippels at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat May 2 09:17:00 GMT 2015


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

            Bug ID: 65980
           Summary: [6 Regression] -fcompare-debug building Linux kernel
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trippels at gcc dot gnu.org
  Target Milestone: ---

markus@x4 /tmp % cat qib_sdma.i
enum qib_sdma_events { qib_sdma_event_e40_sw_cleaned } fn3();
enum qib_sdma_events a;
int b;
int fn1() {
  asm goto(".pushsection .smp_locks\"a\"\n.balign 4\n.long  "
           ".\n.popsection\n671:\n\tlock subl %1,0; je %l[cc_label]"
           :
           : ""(0)
           :
           : cc_label);
  return 0;
cc_label:
  return 1;
}
static inline int fn2(void p1()) {
  if (fn1()) {
    p1(0);
    return 1;
  }
  return 0;
}
void fn4(enum qib_sdma_events p1) {
  switch (b) {
  case 0:
    switch (p1)
    case 1: {
      void *c = fn3;
      fn2(c);
    }
    switch (p1)
    case 0: {
      void *d = fn3;
      fn2(d);
    } break;
  case 1: {
    void *e = fn3;
    fn2(e);
  }
  }
  a = 0;
}

markus@x4 /tmp % gcc --save-temps -O2 -c -fcompare-debug qib_sdma.i
gcc: error: qib_sdma.i: -fcompare-debug failure (length)

markus@x4 /tmp % diff -u qib_sdma.gkd qib_sdma.gk.gkd
--- qib_sdma.gkd        2015-05-02 11:16:58.224148129 +0200
+++ qib_sdma.gk.gkd     2015-05-02 11:16:58.257480705 +0200
@@ -122,7 +122,7 @@
      (expr_list:REG_DEAD (reg:CCZ 17 flags)
         (int_list:REG_BR_PROB 5000 (nil)))
  -> 7)
-(code_label # 0 0 4 20 "" [2 uses])
+(code_label # 0 0 4 9 "" [2 uses])
 (note # 0 0 [bb 4] NOTE_INSN_BASIC_BLOCK)
 (jump_insn:TI # 0 0 4 (parallel [
             (asm_operands/v (".pushsection .smp_locks"a"
@@ -228,7 +228,7 @@
             (pc))) qib_sdma.i:25# {*jcc_1}
      (expr_list:REG_DEAD (reg:CCZ 17 flags)
         (int_list:REG_BR_PROB 2900 (nil)))
- -> 20)
+ -> 9)
 (note # 0 0 [bb 8] NOTE_INSN_BASIC_BLOCK)
 (insn:TI # 0 0 8 (set (reg:CCZ 17 flags)
         (compare:CCZ (reg/v:SI 5 di [orig:88 p1 ] [88])
@@ -242,7 +242,7 @@
             (pc))) qib_sdma.i:30# {*jcc_1}
      (expr_list:REG_DEAD (reg:CCZ 17 flags)
         (int_list:REG_BR_PROB 4085 (nil)))
- -> 20)
+ -> 9)
 (note # 0 0 [bb 9] NOTE_INSN_BASIC_BLOCK)
 (insn:TI # 0 0 9 (set (mem/c:SI (symbol_ref:DI ("a") [flags 0x2]  <var_decl #
a>) [ a+0 S4 A32])
         (const_int 0 [0])) qib_sdma.i:40# {*movsi_internal}



More information about the Gcc-bugs mailing list