[Bug debug/87039] New: [8/9 Regression] DW_OP_fbreg used without a frame base on a C++ code w/ -fopenmp

marxin at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Aug 21 10:37:00 GMT 2018


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

            Bug ID: 87039
           Summary: [8/9 Regression] DW_OP_fbreg used without a frame base
                    on a C++ code w/ -fopenmp
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Keywords: wrong-debug
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---

Starting from r257510, GCC emits debug info about which elfutils is not happy
about:

$ cat filter.ii
template <typename a, typename b, typename d> void e(a, d, b);
template <int f> void g(double[][f]) {
  for (int c; c;)
    ;
}
template <typename, int h, int>
void i(int, int, int, int, int, int, int, int, double[], double[], double *[],
       int) {
#pragma omp parallel
  {
    int j;
    double k[1][h];
    e(j, h, k);
    g(k);
  }
}
double *l;
int m;
double n[1], o[1];
void p() { i<char, 1, false>(0, 0, 1, 0, 0, 1, 0, 0, n, o, &l, m); }

$ g++ filter.ii -c -g -O2 -fopenmp &&
/home/marxin/Programming/elfutils/tests/varlocs -e filter.o
module 'filter.o'
[b] CU 'filter.ii'@0
  [229] inlined function 'i<char, 1, 0>'@20
    [24e] parameter '<unknown>'
      <constant value>
    [254] parameter '<unknown>'
      <constant value>
    [25a] parameter '<unknown>'
      <constant value>
    [260] parameter '<unknown>'
      <constant value>
    [266] parameter '<unknown>'
      <constant value>
    [26c] parameter '<unknown>'
      <constant value>
    [272] parameter '<unknown>'
      <constant value>
    [278] parameter '<unknown>'
      <constant value>
    [27e] parameter '<unknown>'
      [20,30) {addr(0x38), stack_value}
    [28e] parameter '<unknown>'
      [20,30) {addr(0x30), stack_value}
    [29e] parameter '<unknown>'
      [20,30) {addr(0x48), stack_value}
    [2ae] parameter '<unknown>'
      [20,2f) {addr(0x40)}
  [18f] function '_Z1iIcLi1ELi0EEviiiiiiiiPdS0_PS0_i._omp_fn.0'@0
    frame_base: XXX zero address
    [1a6] parameter '<unknown>'
      [0,b) {reg5}
      [b,1a) {GNU_entry_value(1) {reg5}, stack_value}
  [13d] inlined function 'g<1>'@15
    [162] parameter '<unknown>'
      [15,1a) {/home/marxin/Programming/elfutils/tests/varlocs: DW_OP_fbreg
used without a frame base

The test-case is isolated from Inkscape program.


More information about the Gcc-bugs mailing list