Commit 8351bca7 by Iain Sandoe

re PR bootstrap/43684 (multiple 'set but not used' errors.)

gcc/
2010-04-09  Iain Sandoe  <iains@gcc.gnu.org>

	PR bootstrap/43684
	* varasm.c (default_assemble_visibility): Wrap vars that are 
	set, but unused, by targets without GAS.
	* config/rs6000/rs6000.c: (paired_emit_vector_compare): 
	Remove set, but unused, vars.
	(rs6000_legitimize_tls_address): Likewise.
	(altivec_expand_dst_builtin): Likewise.
	* config/darwin.c (machopic_classify_symbol): Likewise.
	(machopic_indirection_name): Likewise.

gcc/fortran/
2010-04-09  Iain Sandoe  <iains@gcc.gnu.org>

	PR bootstrap/43684
	* gfortranspec.c (lang_specific_driver): Do not expose vars 
	only used by HAVE_LD_STATIC_DYNAMIC targets unless compiling
	for such.

From-SVN: r158164
parent 014753cc
2010-04-09 Iain Sandoe <iains@gcc.gnu.org>
PR bootstrap/43684
* varasm.c (default_assemble_visibility): Wrap vars that are
set, but unused, by targets without GAS.
* config/rs6000/rs6000.c: (paired_emit_vector_compare):
Remove set, but unused, vars.
(rs6000_legitimize_tls_address): Likewise.
(altivec_expand_dst_builtin): Likewise.
* config/darwin.c (machopic_classify_symbol): Likewise.
(machopic_indirection_name): Likewise.
2010-04-09 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (DWI): New mode iterator.
......
......@@ -188,10 +188,8 @@ machopic_symbol_defined_p (rtx sym_ref)
enum machopic_addr_class
machopic_classify_symbol (rtx sym_ref)
{
int flags;
bool function_p;
flags = SYMBOL_REF_FLAGS (sym_ref);
function_p = SYMBOL_REF_FUNCTION_P (sym_ref);
if (machopic_symbol_defined_p (sym_ref))
return (function_p
......@@ -363,7 +361,6 @@ machopic_indirection_name (rtx sym_ref, bool stub_p)
size_t namelen = strlen (name);
machopic_indirection *p;
void ** slot;
bool saw_star = false;
bool needs_quotes;
const char *suffix;
const char *prefix = user_label_prefix;
......@@ -386,7 +383,6 @@ machopic_indirection_name (rtx sym_ref, bool stub_p)
if (name[0] == '*')
{
saw_star = true;
prefix = "";
++name;
--namelen;
......
......@@ -4183,7 +4183,7 @@ paired_emit_vector_compare (enum rtx_code rcode,
rtx cc_op0, rtx cc_op1)
{
rtx tmp = gen_reg_rtx (V2SFmode);
rtx tmp1, max, min, equal_zero;
rtx tmp1, max, min;
gcc_assert (TARGET_PAIRED_FLOAT);
gcc_assert (GET_MODE (op0) == GET_MODE (op1));
......@@ -4210,8 +4210,8 @@ paired_emit_vector_compare (enum rtx_code rcode,
tmp1 = gen_reg_rtx (V2SFmode);
max = gen_reg_rtx (V2SFmode);
min = gen_reg_rtx (V2SFmode);
equal_zero = gen_reg_rtx (V2SFmode);
gen_reg_rtx (V2SFmode);
emit_insn (gen_subv2sf3 (tmp, cc_op0, cc_op1));
emit_insn (gen_selv2sf4
(max, tmp, cc_op0, cc_op1, CONST0_RTX (SFmode)));
......@@ -5412,14 +5412,14 @@ rs6000_legitimize_tls_address (rtx addr, enum tls_model model)
else
{
rtx tmp3, mem;
rtx first, last;
rtx last;
tmp1 = gen_reg_rtx (Pmode);
tmp2 = gen_reg_rtx (Pmode);
tmp3 = gen_reg_rtx (Pmode);
mem = gen_const_mem (Pmode, tmp1);
first = emit_insn (gen_load_toc_v4_PIC_1b (gsym));
emit_insn (gen_load_toc_v4_PIC_1b (gsym));
emit_move_insn (tmp1,
gen_rtx_REG (Pmode, LR_REGNO));
emit_move_insn (tmp2, mem);
......@@ -10148,7 +10148,7 @@ altivec_expand_dst_builtin (tree exp, rtx target ATTRIBUTE_UNUSED,
tree fndecl = TREE_OPERAND (CALL_EXPR_FN (exp), 0);
unsigned int fcode = DECL_FUNCTION_CODE (fndecl);
tree arg0, arg1, arg2;
enum machine_mode mode0, mode1, mode2;
enum machine_mode mode0, mode1;
rtx pat, op0, op1, op2;
const struct builtin_description *d;
size_t i;
......@@ -10168,7 +10168,6 @@ altivec_expand_dst_builtin (tree exp, rtx target ATTRIBUTE_UNUSED,
op2 = expand_normal (arg2);
mode0 = insn_data[d->icode].operand[0].mode;
mode1 = insn_data[d->icode].operand[1].mode;
mode2 = insn_data[d->icode].operand[2].mode;
/* Invalid arguments, bail out before generating bad rtl. */
if (arg0 == error_mark_node
......
2010-04-09 Iain Sandoe <iains@gcc.gnu.org>
PR bootstrap/43684
* gfortranspec.c (lang_specific_driver): Do not expose vars
only used by HAVE_LD_STATIC_DYNAMIC targets unless compiling
for such.
2010-04-09 Tobias Burnus <burnus@net-b.de>
PR fortran/18918
......
......@@ -275,11 +275,13 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
/* By default, we throw on the math library if we have one. */
int need_math = (MATH_LIBRARY[0] != '\0');
/* Whether we should link a static libgfortran. */
int static_lib = 0;
#ifdef HAVE_LD_STATIC_DYNAMIC
/* Whether we should link a static libgfortran. */
int static_lib = 0;
/* Whether we need to link statically. */
int static_linking = 0;
#endif
/* The number of input and output files in the incoming arg list. */
int n_infiles = 0;
......@@ -340,11 +342,17 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
break;
case OPTION_static_libgfortran:
#ifdef HAVE_LD_STATIC_DYNAMIC
static_lib = 1;
#endif
break;
case OPTION_static:
#ifdef HAVE_LD_STATIC_DYNAMIC
static_linking = 1;
#endif
/* Fall through, count OPTION_static as an item included in
the rewritten command line. */
case OPTION_l:
++n_infiles;
......
......@@ -5803,8 +5803,10 @@ assemble_alias (tree decl, tree target)
the visibility type VIS, which must not be VISIBILITY_DEFAULT. */
void
default_assemble_visibility (tree decl, int vis)
default_assemble_visibility (tree decl ATTRIBUTE_UNUSED,
int vis ATTRIBUTE_UNUSED)
{
#ifdef HAVE_GAS_HIDDEN
static const char * const visibility_types[] = {
NULL, "protected", "hidden", "internal"
};
......@@ -5814,7 +5816,6 @@ default_assemble_visibility (tree decl, int vis)
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
type = visibility_types[vis];
#ifdef HAVE_GAS_HIDDEN
fprintf (asm_out_file, "\t.%s\t", type);
assemble_name (asm_out_file, name);
fprintf (asm_out_file, "\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment