* c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
authorArnaud Charlet <charlet@adacore.com>
Fri, 9 Aug 2013 10:51:54 +0000 (10:51 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Fri, 9 Aug 2013 10:51:54 +0000 (10:51 +0000)
From-SVN: r201625

gcc/c-family/ChangeLog
gcc/c-family/c-ada-spec.c

index 823c0f7..1e053bd 100644 (file)
@@ -1,3 +1,7 @@
+2013-08-09  Arnaud Charlet  <charlet@adacore.com>
+
+       * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
+
 2013-08-05  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/58080
index 8670b94..22784c9 100644 (file)
@@ -2900,7 +2900,7 @@ print_ada_declaration (pretty_printer *buffer, tree t, tree type,
       pp_string (buffer, "  -- ");
       dump_sloc (buffer, t);
 
-      if (is_abstract)
+      if (is_abstract || !DECL_ASSEMBLER_NAME (t))
        return 1;
 
       newline_and_indent (buffer, spc);