+2010-09-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/45660
+ * dwarf2out.c (gen_decl_die): Call gen_type_die for origin before
+ gen_type_die for function/method return type.
+
2010-09-14 Ira Rosen <irar@il.ibm.com>
PR tree-optimization/45470
else if (debug_info_level > DINFO_LEVEL_TERSE)
{
/* Before we describe the FUNCTION_DECL itself, make sure that we
- have described its return type. */
+ have its containing type. */
+ if (!origin)
+ origin = decl_class_context (decl);
+ if (origin != NULL_TREE)
+ gen_type_die (origin, context_die);
+
+ /* And its return type. */
gen_type_die (TREE_TYPE (TREE_TYPE (decl)), context_die);
/* And its virtual context. */
if (DECL_VINDEX (decl) != NULL_TREE)
gen_type_die (DECL_CONTEXT (decl), context_die);
- /* And its containing type. */
- if (!origin)
- origin = decl_class_context (decl);
+ /* Make sure we have a member DIE for decl. */
if (origin != NULL_TREE)
gen_type_die_for_member (origin, decl, context_die);
+2010-09-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/45660
+ * g++.dg/debug/pr45660.C: New test.
+
2010-09-14 Ira Rosen <irar@il.ibm.com>
PR tree-optimization/45470
--- /dev/null
+// PR debug/45660
+// { dg-do compile }
+// { dg-options "-g -fno-inline" }
+
+void
+test ()
+{
+ struct S
+ {
+ typedef void (**T) (void);
+ static T i (void) { return 0; }
+ };
+ S s;
+ if (s.i ())
+ *s.i () = 0;
+}