diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1995-03-22 13:01:51 -0800 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1995-03-22 13:01:51 -0800 |
commit | 1d306530f70ea17fbf1fb0aee4f66e428e326cdb (patch) | |
tree | 25d6c3f58dac059f4826149b90b9401b172d20ca /gcc | |
parent | 6f1a5942f2eefac5fc03f4e898f816180a1a4ad7 (diff) | |
download | gcc-1d306530f70ea17fbf1fb0aee4f66e428e326cdb.zip gcc-1d306530f70ea17fbf1fb0aee4f66e428e326cdb.tar.gz gcc-1d306530f70ea17fbf1fb0aee4f66e428e326cdb.tar.bz2 |
(mips_select_section): Apply constant DEC_INITIAL tests
only to VAR_DECLs.
From-SVN: r9221
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/mips/mips.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 5881fa2..2d0c8a7 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -5417,7 +5417,8 @@ mips_select_section (decl, reloc) /* For embedded applications, always put an object in read-only data if possible, in order to reduce RAM usage. */ - if (((TREE_READONLY (decl) && !TREE_SIDE_EFFECTS (decl) + if (((TREE_CODE (decl) == VAR_DECL + && TREE_READONLY (decl) && !TREE_SIDE_EFFECTS (decl) && DECL_INITIAL (decl) && (DECL_INITIAL (decl) == error_mark_node || TREE_CONSTANT (DECL_INITIAL (decl)))) @@ -5439,7 +5440,8 @@ mips_select_section (decl, reloc) if (size > 0 && size <= mips_section_threshold) sdata_section (); - else if (((TREE_READONLY (decl) && !TREE_SIDE_EFFECTS (decl) + else if (((TREE_CODE (decl) == VAR_DECL + && TREE_READONLY (decl) && !TREE_SIDE_EFFECTS (decl) && DECL_INITIAL (decl) && (DECL_INITIAL (decl) == error_mark_node || TREE_CONSTANT (DECL_INITIAL (decl)))) |