]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix handling of dummy types for -fdump-go-spec
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Wed, 20 Mar 2013 11:53:40 +0000 (11:53 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Wed, 20 Mar 2013 11:53:40 +0000 (11:53 +0000)
Backport from mainline:
2012-12-04  Ian Lance Taylor  <iant@google.com>

* godump.c (find_dummy_types): Output a dummy type if we couldn't
output the real type.

From-SVN: r196822

gcc/ChangeLog
gcc/godump.c

index cd1c8ddc6272cfd0f9fe6e8502a2fa6b2d3334d4..eb03093257694cb37e86b537e8943d0642604ffd 100644 (file)
@@ -1,3 +1,11 @@
+2013-03-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       Backport from mainline:
+       2012-12-04  Ian Lance Taylor  <iant@google.com>
+
+       * godump.c (find_dummy_types): Output a dummy type if we couldn't
+       output the real type.
+
 2013-03-20  Jack Howarth  <howarth@bromo.med.uc.edu>
 
        PR bootstrap/56258
index ab1edc620f916f1c92ad544bf6139dab9f463139..b5455253b6199c405f3ce00c55af9a45edaa5a70 100644 (file)
@@ -1,5 +1,5 @@
 /* Output Go language descriptions of types.
-   Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
    Written by Ian Lance Taylor <iant@google.com>.
 
 This file is part of GCC.
@@ -1164,9 +1164,11 @@ find_dummy_types (const void *ptr, void *adata)
   struct godump_container *data = (struct godump_container *) adata;
   const char *type = (const char *) ptr;
   void **slot;
+  void **islot;
 
   slot = htab_find_slot (data->type_hash, type, NO_INSERT);
-  if (slot == NULL)
+  islot = htab_find_slot (data->invalid_hash, type, NO_INSERT);
+  if (slot == NULL || islot != NULL)
     fprintf (go_dump_file, "type _%s struct {}\n", type);
   return true;
 }