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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|middle-end                  |c
            Summary|Basic blocks in generated   |Function argument column
                   |CFG referencing the         |info seems to have been
                   |incorrect source token      |lost
                   |column                      |

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Take the reduced testcase we get using the C front-end:
```
int proc_dostring (struct ctl_table * table, int write, void * buffer, int *
lenp, int * ppos)
[/app/example.cpp:13:1] {
  int D.2793;

  [/app/example.cpp:14:5] if (write != 0) goto <D.2791>; else goto <D.2792>;
  <D.2791>:
  [/app/example.cpp:15:3] proc_first_pos_non_zero_ignore (ppos, table);
  <D.2792>:
  [/app/example.cpp:17:9] _1 = [/app/example.cpp:17:9] table->maxlen;
  [/app/example.cpp:17:9] _2 = [/app/example.cpp:17:9] table->data;
  [/app/example.cpp:17:9] D.2793 = _proc_do_string (_2, _1, write, buffer,
lenp, ppos);
  [/app/example.cpp:17:9] return D.2793;
}

```

The column 9 is the start of the call. But really the first statement should
have a column of 24.

Note with the C++ FE we get:

  [/app/example.cpp:17:24] _1 = [/app/example.cpp:17:24] table->maxlen;
  [/app/example.cpp:17:24] _2 = [/app/example.cpp:17:24] table->data;
  [/app/example.cpp:17:24] D.2822 = _proc_do_string (_2, _1, write, buffer,
lenp, ppos);
  [/app/example.cpp:17:24 discrim 1] D.2820 = D.2822;

the :24 is the column after `(`.

But _2 statement really should be the column after the first `,`.

I remember seeing this before ...

Reply via email to