(ASM_OUTPUT_SECTION_NAME): Don't crash if DECL is null.
authorRichard Kenner <kenner@gcc.gnu.org>
Wed, 28 Jun 1995 19:24:21 +0000 (15:24 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Wed, 28 Jun 1995 19:24:21 +0000 (15:24 -0400)
From-SVN: r10067

gcc/config/svr4.h

index 5ae252cc0c51d4085af5250bd2e7edf572914bac..41c6ffa0e10bb04e04df789706888d4c6934b953 100644 (file)
@@ -579,8 +579,8 @@ dtors_section ()                                                    \
    read-only for a const data decl, and writable for a non-const data decl.  */
 #define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME) \
   fprintf (FILE, ".section\t%s,\"%s\",@progbits\n", NAME, \
-          TREE_CODE (DECL) == FUNCTION_DECL ? "ax" : \
-          TREE_READONLY (DECL) ? "a" : "aw")
+          (DECL) && TREE_CODE (DECL) == FUNCTION_DECL ? "ax" : \
+          (DECL) && TREE_READONLY (DECL) ? "a" : "aw")
 
 
 /* A C statement (sans semicolon) to output an element in the table of