[Bug debug/84456] [8 regression] gcc.dg/guality/pr49888.c fail

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Mar 8 10:46:00 GMT 2018


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-03-08
                 CC|                            |jakub at gcc dot gnu.org
          Component|testsuite                   |debug
     Ever confirmed|0                           |1

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
In gcc 7 as well as with -gvariable-location-views in trunk, the 6 problematic
tests are UNSUPPORTED, due to:
Breakpoint 1, f (p=p@entry=0x7fffffffd844) at
/usr/src/gcc-7/gcc/testsuite/gcc.dg/guality/pr49888.c:18
18        v = 0; /* { dg-final { gdb-test 18 "!c" "1" } } */
pr49888.gdb:3: Error in sourced command file:
value has been optimized out
UNSUPPORTED: gcc.dg/guality/pr49888.c   -O1  line 18 !c == 1
etc.
On the trunk without location views, it is a FAIL instead:
Breakpoint 1, f (p=p@entry=0x7fffffffd7d4) at
/usr/src/gcc/gcc/testsuite/gcc.dg/guality/pr49888.c:18
18        v = 0; /* { dg-final { gdb-test 18 "!c" "1" } } */
$1 = 0
$2 = 1
A debugging session is active.

        Inferior 1 [process 11689] will be killed.

0 != 1
FAIL: gcc.dg/guality/pr49888.c   -O1  line 18 !c == 1

The *.final dump is still correct, on the trunk:
    1: NOTE_INSN_DELETED
   25: NOTE_INSN_VAR_LOCATION{loc di:DI}    ! p var
    4: NOTE_INSN_BASIC_BLOCK 2
   17: NOTE_INSN_PROLOGUE_END
    3: NOTE_INSN_FUNCTION_BEG
   21: NOTE_INSN_BEGIN_STMT
   26: NOTE_INSN_VAR_LOCATION{loc [di:DI]}  ! c var
   22: NOTE_INSN_BEGIN_STMT
   23: NOTE_INSN_BEGIN_STMT
   11: [di:DI]=0x1
      REG_DEAD di:DI
   27: NOTE_INSN_VAR_LOCATION{loc (nil)}    ! c var
   24: NOTE_INSN_BEGIN_STMT
   13: [`v']=0
   18: NOTE_INSN_EPILOGUE_BEG
   19: simple_return
   20: barrier
   16: NOTE_INSN_DELETED
and in 7.3 similarly with the NOTE_INSN_BEGIN_STMT deleted.
    1: NOTE_INSN_DELETED
   17: NOTE_INSN_VAR_LOCATION{loc di:DI}    ! p var
    4: NOTE_INSN_BASIC_BLOCK 2
   13: NOTE_INSN_PROLOGUE_END
    3: NOTE_INSN_FUNCTION_BEG
   18: NOTE_INSN_VAR_LOCATION{loc [di:DI]}  ! c var
    8: [di:DI]=0x1
      REG_DEAD di:DI
   19: NOTE_INSN_VAR_LOCATION{loc (nil)}
    9: [`v']=0
   14: NOTE_INSN_EPILOGUE_BEG
   15: simple_return
   16: barrier
   12: NOTE_INSN_DELETED

The bug is that the trunk without -gvariable-location-views makes:
        .uleb128 0x2    # (DIE (0xb4) DW_TAG_variable)
        .ascii "c\0"    # DW_AT_name
        .byte   0x1     # DW_AT_decl_file (pr49888.c)
        .byte   0xa     # DW_AT_decl_line
        .byte   0x7     # DW_AT_decl_column
        .long   0x41    # DW_AT_type
        .uleb128 0x2    # DW_AT_location
        .byte   0x75    # DW_OP_breg5
        .sleb128 0
out of it rather than the expected:
        .uleb128 0x9    # (DIE (0xaf) DW_TAG_variable)
        .ascii "c\0"    # DW_AT_name
        .byte   0x1     # DW_AT_decl_file (pr49888.c)
        .byte   0xa     # DW_AT_decl_line
        .long   0x40    # DW_AT_type
        .long   .LLST0  # DW_AT_location
that e.g. GCC 7 emits.


More information about the Gcc-bugs mailing list