aboutsummaryrefslogtreecommitdiff
path: root/gcc/langhooks.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/langhooks.c')
-rw-r--r--gcc/langhooks.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/langhooks.c b/gcc/langhooks.c
index 8ff91ba..7d4c294 100644
--- a/gcc/langhooks.c
+++ b/gcc/langhooks.c
@@ -147,6 +147,11 @@ lhd_set_decl_assembler_name (tree decl)
{
tree id;
+ /* set_decl_assembler_name may be called on TYPE_DECL to record ODR
+ name for C++ types. By default types have no ODR names. */
+ if (TREE_CODE (decl) == TYPE_DECL)
+ return;
+
/* The language-independent code should never use the
DECL_ASSEMBLER_NAME for lots of DECLs. Only FUNCTION_DECLs and
VAR_DECLs for variables with static storage duration need a real