aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2003-04-17 00:34:34 -0700
committerRichard Henderson <rth@gcc.gnu.org>2003-04-17 00:34:34 -0700
commit1b8135a411e5ba31ce74b9645481a50c34d7f3d5 (patch)
tree0630a6f75e02a0384bb1d5521d6742074c9df781 /gcc
parent6d7fe8b31ff02652f8090903eb5882587b681a1d (diff)
downloadgcc-1b8135a411e5ba31ce74b9645481a50c34d7f3d5.zip
gcc-1b8135a411e5ba31ce74b9645481a50c34d7f3d5.tar.gz
gcc-1b8135a411e5ba31ce74b9645481a50c34d7f3d5.tar.bz2
varasm.c (default_encode_section_info): Don't set SYMBOL_FLAG_EXTERNAL if not TREE_PUBLIC.
* varasm.c (default_encode_section_info): Don't set SYMBOL_FLAG_EXTERNAL if not TREE_PUBLIC. * config/i370/i370.c (i370_encode_section_info): Remove. * config/i370/i370.h (CONSTANT_ADDRESS_P): Use SYMBOL_REF_EXTERNAL_P. (PRINT_OPERAND, PRINT_OPERAND_ADDRESS): Likewise. * config/i370/i370.md (movsi): Likewise. * config/i370/t-i370: Add missing backslash. From-SVN: r65728
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/config/i370/i370.c14
-rw-r--r--gcc/config/i370/i370.h14
-rw-r--r--gcc/config/i370/i370.md4
-rw-r--r--gcc/config/i370/t-i3702
-rw-r--r--gcc/varasm.c5
6 files changed, 25 insertions, 25 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 354b753..5c32003 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,14 @@
+2003-04-17 Richard Henderson <rth@redhat.com>
+
+ * varasm.c (default_encode_section_info): Don't set
+ SYMBOL_FLAG_EXTERNAL if not TREE_PUBLIC.
+ * config/i370/i370.c (i370_encode_section_info): Remove.
+ * config/i370/i370.h (CONSTANT_ADDRESS_P): Use SYMBOL_REF_EXTERNAL_P.
+ (PRINT_OPERAND, PRINT_OPERAND_ADDRESS): Likewise.
+ * config/i370/i370.md (movsi): Likewise.
+
+ * config/i370/t-i370: Add missing backslash.
+
2003-04-17 Eric Botcazou <ebotcazou@libertysurf.fr>
* doc/invoke.texi (inline-limit): Fix pasto.
diff --git a/gcc/config/i370/i370.c b/gcc/config/i370/i370.c
index e83fa7a..d5ab6ce 100644
--- a/gcc/config/i370/i370.c
+++ b/gcc/config/i370/i370.c
@@ -110,7 +110,6 @@ static void i370_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
#ifdef LONGEXTERNAL
static int mvs_hash_alias PARAMS ((const char *));
#endif
-static void i370_encode_section_info PARAMS ((tree, int));
static void i370_internal_label PARAMS ((FILE *, const char *, unsigned long));
static bool i370_rtx_costs PARAMS ((rtx, int, int, int *));
@@ -314,8 +313,6 @@ static const unsigned char ebcasc[256] =
#define TARGET_ASM_FUNCTION_PROLOGUE i370_output_function_prologue
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE i370_output_function_epilogue
-#undef TARGET_ENCODE_SECTION_INFO
-#define TARGET_ENCODE_SECTION_INFO i370_encode_section_info
#undef TARGET_ASM_INTERNAL_LABEL
#define TARGET_ASM_INTERNAL_LABEL i370_internal_label
#undef TARGET_RTX_COSTS
@@ -1594,17 +1591,6 @@ i370_output_function_epilogue (file, l)
fprintf (file, "\tDC\tA(PG%d)\n", i);
}
-/* Mark external references. */
-
-static void
-i370_encode_section_info (decl, first)
- tree decl;
- int first ATTRIBUTE_UNUSED;
-{
- if (DECL_EXTERNAL (decl) && TREE_PUBLIC (decl))
- SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1;
-}
-
static void
i370_internal_label (stream, prefix, labelno)
FILE *stream;
diff --git a/gcc/config/i370/i370.h b/gcc/config/i370/i370.h
index 61f296d7..a3db42e 100644
--- a/gcc/config/i370/i370.h
+++ b/gcc/config/i370/i370.h
@@ -700,7 +700,7 @@ enum reg_class
&& GET_CODE (XEXP (XEXP (X, 0), 0)) == LABEL_REF) \
|| (GET_CODE (X) == CONST \
&& GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF \
- && !SYMBOL_REF_FLAG (XEXP (XEXP (X, 0), 0))))
+ && !SYMBOL_REF_EXTERNAL_P (XEXP (XEXP (X, 0), 0))))
/* Nonzero if the constant value X is a legitimate general operand.
It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
@@ -1266,7 +1266,7 @@ enum reg_class
case SYMBOL_REF: \
case LABEL_REF: \
mvs_page_lit += 4; \
- if (SYMBOL_REF_FLAG (XV)) fprintf (FILE, "=V("); \
+ if (SYMBOL_REF_EXTERNAL_P (XV)) fprintf (FILE, "=V("); \
else fprintf (FILE, "=A("); \
output_addr_const (FILE, XV); \
fprintf (FILE, ")"); \
@@ -1356,7 +1356,7 @@ enum reg_class
&& GET_CODE (XEXP (XEXP (XV, 0), 0)) == SYMBOL_REF) \
{ \
mvs_page_lit += 4; \
- if (SYMBOL_REF_FLAG (XEXP (XEXP (XV, 0), 0))) \
+ if (SYMBOL_REF_EXTERNAL_P (XEXP (XEXP (XV, 0), 0))) \
{ \
fprintf (FILE, "=V("); \
ASM_OUTPUT_LABELREF (FILE, \
@@ -1467,7 +1467,7 @@ enum reg_class
break; \
default: \
mvs_page_lit += 4; \
- if (SYMBOL_REF_FLAG (ADDR)) fprintf (FILE, "=V("); \
+ if (SYMBOL_REF_EXTERNAL_P (ADDR)) fprintf (FILE, "=V("); \
else fprintf (FILE, "=A("); \
output_addr_const (FILE, ADDR); \
fprintf (FILE, ")"); \
@@ -1560,7 +1560,7 @@ enum reg_class
case SYMBOL_REF: \
case LABEL_REF: \
mvs_page_lit += 4; \
- if (SYMBOL_REF_FLAG (XV)) fprintf (FILE, "=V("); \
+ if (SYMBOL_REF_EXTERNAL_P (XV)) fprintf (FILE, "=V("); \
else fprintf (FILE, "=A("); \
output_addr_const (FILE, XV); \
fprintf (FILE, ")"); \
@@ -1650,7 +1650,7 @@ enum reg_class
&& GET_CODE (XEXP (XEXP (XV, 0), 0)) == SYMBOL_REF) \
{ \
mvs_page_lit += 4; \
- if (SYMBOL_REF_FLAG (XEXP (XEXP (XV, 0), 0))) \
+ if (SYMBOL_REF_EXTERNAL_P (XEXP (XEXP (XV, 0), 0))) \
{ \
fprintf (FILE, "=V("); \
ASM_OUTPUT_LABELREF (FILE, \
@@ -1765,7 +1765,7 @@ abort(); \
break; \
default: \
mvs_page_lit += 4; \
- if (SYMBOL_REF_FLAG (ADDR)) fprintf (FILE, "=V("); \
+ if (SYMBOL_REF_EXTERNAL_P (ADDR)) fprintf (FILE, "=V("); \
else fprintf (FILE, "=A("); \
output_addr_const (FILE, ADDR); \
fprintf (FILE, ")"); \
diff --git a/gcc/config/i370/i370.md b/gcc/config/i370/i370.md
index 9564cb3..5bdbec8 100644
--- a/gcc/config/i370/i370.md
+++ b/gcc/config/i370/i370.md
@@ -855,7 +855,7 @@ check_label_emit ();
; op0 = operands[0];
; if (GET_CODE (op0) == CONST
; && GET_CODE (XEXP (XEXP (op0, 0), 0)) == SYMBOL_REF
-; && SYMBOL_REF_FLAG (XEXP (XEXP (op0, 0), 0)))
+; && SYMBOL_REF_EXTERNAL_P (XEXP (XEXP (op0, 0), 0)))
; {
; op0 = gen_rtx_MEM (SImode, copy_to_mode_reg (SImode, XEXP (op0, 0)));
; }
@@ -863,7 +863,7 @@ check_label_emit ();
; op1 = operands[1];
; if (GET_CODE (op1) == CONST
; && GET_CODE (XEXP (XEXP (op1, 0), 0)) == SYMBOL_REF
-; && SYMBOL_REF_FLAG (XEXP (XEXP (op1, 0), 0)))
+; && SYMBOL_REF_EXTERNAL_P (XEXP (XEXP (op1, 0), 0)))
; {
; op1 = gen_rtx_MEM (SImode, copy_to_mode_reg (SImode, XEXP (op1, 0)));
; }
diff --git a/gcc/config/i370/t-i370 b/gcc/config/i370/t-i370
index 96138a1..fccd163 100644
--- a/gcc/config/i370/t-i370
+++ b/gcc/config/i370/t-i370
@@ -1,3 +1,3 @@
-i370-c.o: $(srcdir)/config/i370/i370-c.c $(CONFIG_H) $(SYSTEM_H) coretypes.h
+i370-c.o: $(srcdir)/config/i370/i370-c.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(TREE_H) toplev.h $(CPPLIB_H) c-pragma.h $(TM_P_H)
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/i370/i370-c.c
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 684a824..a517450 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -5371,7 +5371,10 @@ default_encode_section_info (decl, first)
flags |= SYMBOL_FLAG_SMALL;
if (TREE_CODE (decl) == VAR_DECL && DECL_THREAD_LOCAL (decl))
flags |= decl_tls_model (decl) << SYMBOL_FLAG_TLS_SHIFT;
- if (DECL_P (decl) && DECL_EXTERNAL (decl))
+ /* ??? Why is DECL_EXTERNAL ever set for non-PUBLIC names? Without
+ being PUBLIC, the thing *must* be defined in this translation unit.
+ Prevent this buglet from being propagated into rtl code as well. */
+ if (DECL_P (decl) && DECL_EXTERNAL (decl) && TREE_PUBLIC (decl))
flags |= SYMBOL_FLAG_EXTERNAL;
SYMBOL_REF_FLAGS (symbol) = flags;