This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


-- 
Eric Botcazou
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);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]