/* Output variables, constants and external declarations, for GNU compiler.
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
- 2010, 2011 Free Software Foundation, Inc.
+ 2010, 2011, 2012 Free Software Foundation, Inc.
This file is part of GCC.
if (decl == 0)
decl = sect->named.decl;
gcc_assert (decl);
- error ("%+D causes a section type conflict with %D",
- decl, sect->named.decl);
- if (decl != sect->named.decl)
- inform (DECL_SOURCE_LOCATION (sect->named.decl),
- "%qD was declared here", sect->named.decl);
+ if (sect->named.decl == NULL)
+ error ("%+D causes a section type conflict", decl);
+ else
+ {
+ error ("%+D causes a section type conflict with %D",
+ decl, sect->named.decl);
+ if (decl != sect->named.decl)
+ inform (DECL_SOURCE_LOCATION (sect->named.decl),
+ "%qD was declared here", sect->named.decl);
+ }
/* Make sure we don't error about one section multiple times. */
sect->common.flags |= SECTION_OVERRIDE;
}