summaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2017-10-11 16:35:18 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2017-10-11 16:35:18 +0000
commita92f67261ace8c269ae588394bf77ac017bdad3b (patch)
tree3391663508708f07e1d69dd68f414f42a8bb0a94 /gcc/c
parent4e7d02606ea8b0dac11887b1f759ea61d5394d86 (diff)
downloadgcc-a92f67261ace8c269ae588394bf77ac017bdad3b.tar.gz
[PATCH] DECL_ASSEMBLER_NAME and friends
https://gcc.gnu.org/ml/gcc-patches/2017-10/msg00582.html * tree.h (DECL_ASSEMBLER_NAME_SET_P): Don't check HAS_DECL_ASSEMBLER_NAME_P. * gimple-expr.c (gimple_decl_printable_name: Check HAS_DECL_ASSEMBLER_NAME_P too. * ipa-utils.h (type_in_anonymous_namespace_p): Check DECL_ASSEMBLER_NAME_SET_P of TYPE_NAME. (odr_type_p): No need to assert TYPE_NAME is a TYPE_DECL. * passes.c (rest_of_decl_compilation): Check HAS_DECL_ASSEMBLER_NAME_P too. * recog.c (verify_changes): Likewise. * tree-pretty-print.c (dump_decl_name): Likewise. * tree-ssa-structalias.c (alias_get_name): Likewise. Reimplement. c/ * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too. From-SVN: r253649
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/ChangeLog4
-rw-r--r--gcc/c/c-decl.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 822d0227ee8..baf57c1f95a 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-11 Nathan Sidwell <nathan@acm.org>
+
+ * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
+
2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
* c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c
index 724d193f01f..26b34ab3e50 100644
--- a/gcc/c/c-decl.c
+++ b/gcc/c/c-decl.c
@@ -7011,7 +7011,8 @@ grokdeclarator (const struct c_declarator *declarator,
/* This is the earliest point at which we might know the assembler
name of a variable. Thus, if it's known before this, die horribly. */
- gcc_assert (!DECL_ASSEMBLER_NAME_SET_P (decl));
+ gcc_assert (!HAS_DECL_ASSEMBLER_NAME_P (decl)
+ || !DECL_ASSEMBLER_NAME_SET_P (decl));
if (warn_cxx_compat
&& VAR_P (decl)