(SELECT_SECTION): Put object in sdata only if size is known, i.e.
authorJim Wilson <wilson@gcc.gnu.org>
Thu, 19 Aug 1993 03:36:41 +0000 (20:36 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Thu, 19 Aug 1993 03:36:41 +0000 (20:36 -0700)
(SELECT_SECTION): Put object in sdata only if size is
known, i.e. greater than 0.

From-SVN: r5185

gcc/config/mips/mips.h

index 46742125dae5bbd0d16c3df4849bf8dca56f3933..d92801f5ed9799d40b2b97a5afee0c425d735498 100644 (file)
@@ -3448,7 +3448,9 @@ rdata_section ()                                                  \
 
 #define SELECT_SECTION(DECL, RELOC)                                    \
 {                                                                      \
-  if (int_size_in_bytes (TREE_TYPE (DECL)) <= mips_section_threshold   \
+  int size = int_size_in_bytes (TREE_TYPE (DECL));                     \
+                                                                       \
+  if (size <= mips_section_threshold && size > 0                       \
       && mips_section_threshold > 0)                                   \
     sdata_section ();                                                  \
                                                                        \