(ASM_OUTPUT_SECTION): Test DECL before
authorJim Wilson <wilson@gcc.gnu.org>
Sun, 21 Apr 1996 22:17:43 +0000 (15:17 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Sun, 21 Apr 1996 22:17:43 +0000 (15:17 -0700)
dereferencing it.

From-SVN: r11865

gcc/config/m68k/coff.h

index 35556c91d290991935f66178d49595ddd5930e96..9f0a638d02c6e51951bdee03472c47f3372d2ab5 100644 (file)
@@ -99,8 +99,8 @@ Boston, MA 02111-1307, USA.  */
 #undef ASM_OUTPUT_SECTION_NAME
 #define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME) \
   fprintf((FILE), ".section\t%s,\"%c\"\n", (NAME), \
-         TREE_CODE (DECL) == FUNCTION_DECL || \
-         TREE_READONLY (DECL) ? 'x' : 'd')
+         (DECL) && (TREE_CODE (DECL) == FUNCTION_DECL || \
+                    TREE_READONLY (DECL)) ? 'x' : 'd')
 
 /* Support the ctors and dtors sections for g++.  */