Bug 41170 - namespace DIE not generated when it contains only a typedef
Summary: namespace DIE not generated when it contains only a typedef
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: debug (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: ---
Assignee: Dodji Seketeli
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-25 20:54 UTC by Dodji Seketeli
Modified: 2009-08-27 07:14 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2009-08-25 21:00:32


Attachments
fix candidate (1.01 KB, patch)
2009-08-25 21:08 UTC, Dodji Seketeli
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dodji Seketeli 2009-08-25 20:54:31 UTC
for the exemple below g++ does not generate any DIE representing the namespace which name is "not_emitted".

struct strukt
{
  int m;
};

namespace not_emitted
{
  typedef strukt T;
}

int
main()
{
  not_emitted::T t;
  t.m = 0;
  return 0;
}
Comment 1 Dodji Seketeli 2009-08-25 21:08:21 UTC
Created attachment 18424 [details]
fix candidate

I am testing this patch ...
Comment 2 Dodji Seketeli 2009-08-26 06:41:29 UTC
Patch submitted to http://gcc.gnu.org/ml/gcc-patches/2009-08/msg01405.html .
Comment 3 Dodji Seketeli 2009-08-27 07:05:45 UTC
Subject: Bug 41170

Author: dodji
Date: Thu Aug 27 07:05:24 2009
New Revision: 151138

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=151138
Log:
Fix for PR debug/41170

gcc/ChangeLog:
	PR debug/41770
	* dwarf2out.c (get_context_die): Declare this static function.
	(gen_type_die_with_usage): Make sure a DIE is a generated for
	the context of a typedef.

gcc/testsuite/ChangeLog:
	PR debug/41770
	* debug/dwarf2/namespace-1.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/dwarf2out.c
    trunk/gcc/testsuite/ChangeLog

Comment 4 Dodji Seketeli 2009-08-27 07:14:10 UTC
Fixed in trunk (4.5).
Comment 5 hjl@gcc.gnu.org 2009-08-30 01:52:38 UTC
Subject: Bug 41170

Author: hjl
Date: Sun Aug 30 01:52:18 2009
New Revision: 151217

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=151217
Log:
Fix ChangeLog entries for PR debug/41170.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog