diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-26 13:23:35 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-26 13:23:35 +0000 |
commit | e20ea85b2bb2d755dfd35912c7481bf3638fd51c (patch) | |
tree | 9d1ce987b6de5496a2df0ca0d2c2b72db2b2d75e /gcc/varasm.c | |
parent | 77a3387dd148b81882d77ea3f6b995c1ebef7a32 (diff) | |
download | gcc-e20ea85b2bb2d755dfd35912c7481bf3638fd51c.tar.gz |
2012-04-26 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 186872 using svnmerge
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@186874 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index c3d289eb91a..03ac49b4677 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -1,7 +1,7 @@ /* 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. @@ -314,11 +314,16 @@ get_section (const char *name, unsigned int flags, tree decl) 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; } @@ -3929,6 +3934,13 @@ compute_reloc_for_constant (tree exp) tem = TREE_OPERAND (tem, 0)) ; + if (TREE_CODE (tem) == MEM_REF + && TREE_CODE (TREE_OPERAND (tem, 0)) == ADDR_EXPR) + { + reloc = compute_reloc_for_constant (TREE_OPERAND (tem, 0)); + break; + } + if (TREE_PUBLIC (tem)) reloc |= 2; else @@ -3997,6 +4009,9 @@ output_addressed_constants (tree exp) if (CONSTANT_CLASS_P (tem) || TREE_CODE (tem) == CONSTRUCTOR) output_constant_def (tem, 0); + + if (TREE_CODE (tem) == MEM_REF) + output_addressed_constants (TREE_OPERAND (tem, 0)); break; case PLUS_EXPR: |