[Bug c/79969] C FE emits locus of forward enum declaration rather than definition into debug info

2017-03-09 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79969

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Jakub Jelinek  ---
Fixed.

[Bug c/79969] C FE emits locus of forward enum declaration rather than definition into debug info

2017-03-09 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79969

--- Comment #3 from Jakub Jelinek  ---
Author: jakub
Date: Thu Mar  9 16:42:45 2017
New Revision: 246009

URL: https://gcc.gnu.org/viewcvs?rev=246009=gcc=rev
Log:
PR c/79969
* c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
TYPE_STUB_DECL.

* gcc.dg/debug/dwarf2/enum-loc1.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/debug/dwarf2/enum-loc1.c
Modified:
trunk/gcc/c/ChangeLog
trunk/gcc/c/c-decl.c
trunk/gcc/testsuite/ChangeLog

[Bug c/79969] C FE emits locus of forward enum declaration rather than definition into debug info

2017-03-08 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79969

--- Comment #2 from Jakub Jelinek  ---
https://gcc.gnu.org/ml/gcc-patches/2009-09/msg01161.html
was the corresponding change for structs.

[Bug c/79969] C FE emits locus of forward enum declaration rather than definition into debug info

2017-03-08 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79969

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-03-09
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
Created attachment 40928
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40928=edit
gcc7-pr79969.patch

Untested fix.