diff mbox

[c-family] Minor tweak to -fdump-ada-spec

Message ID 201308091254.23855.ebotcazou@adacore.com
State New
Headers show

Commit Message

Eric Botcazou Aug. 9, 2013, 10:54 a.m. UTC
This fixes a segfault on specific C++ code using <vector> when -fdump-ada-spec 
is passed to the compiler.

Tested on x86_64-suse-linux, applied on the mainline and 4.8 branch as obvious.


2013-08-09  Arnaud Charlet  <charlet@adacore.com>

	* c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
diff mbox

Patch

Index: c-ada-spec.c
===================================================================
--- c-ada-spec.c	(revision 201592)
+++ c-ada-spec.c	(working copy)
@@ -2900,7 +2900,7 @@  print_ada_declaration (pretty_printer *b
       pp_string (buffer, "  -- ");
       dump_sloc (buffer, t);
 
-      if (is_abstract)
+      if (is_abstract || !DECL_ASSEMBLER_NAME (t))
 	return 1;
 
       newline_and_indent (buffer, spc);