2009-05-05 Jonathan Wakely <jwakely.gcc@gmail.com>
PR libstdc++/39909
* include/std/mutex (__get_once_functor_lock, __get_once_mutex,
__set_once_functor_lock_ptr): Replace global lock object with local
locks on global mutex.
* src/mutex.cc (__get_once_functor_lock, __get_once_mutex,
__set_once_functor_lock_ptr): Likewise, keeping old function to
preserve ABI.
(__once_proxy): Use pointer to local lock if set, global lock
otherwise.
* config/abi/pre/gnu.ver: Add new symbols to new ABI version.
* testsuite/util/testsuite_abi.cc: Add GLIBCX_3.4.12 version.
* testsuite/30_threads/call_once/39909.cc: New.
From-SVN: r147137
PR middle-end/39666
* gimplify.c (gimplify_switch_expr): If case labels cover the whole
range of the type, but default label is missing, add it with one
of the existing labels instead of adding a new label for it.
* gcc.dg/pr39666-1.c: New test.
* gcc.dg/pr39666-2.c: Likewise.
* g++.dg/warn/Wuninitialized-4.C: Likewise.
* g++.dg/warn/Wuninitialized-5.C: Likewise.
* gfortran.dg/pr39666-1.f90: Likewise.
* gfortran.dg/pr39666-2.f90: Likewise.
From-SVN: r147136
2009-05-05 Rafael Avila de Espindola <espindola@google.com>
* Makefile.in (enable_plugin, plugin_includedir): New.
(install): Depend on install-plugin.
(PLUGIN_HEADERS): New.
(install-plugin): New.
* config.gcc: Add vxworks-dummy.h to tm_file for x86 and x86-64.
From-SVN: r147130
cp/
* typeck.c (cp_build_compound_expr): Require RHS to have a known
type.
* class.c (resolve_address_of_overloaded_function): Use
OVL_CURRENT for error message.
(instantiate_type): Forbid COMPOUND_EXPRs and remove code dealing
with them. Do not copy the node.
testsuite/
* g++.old-deja/g++.other/overload11.C: Adjust expected errors.
* g++.dg/template/overload9.C: Likewise.
* g++.dg/ext/ms-1.C: New.
From-SVN: r147125
2009-05-05 Shujing Zhao <pearly.zhao@oracle.com>
* tree.h (strip_float_extensions): Remove duplicate declaration.
(build_low_bits_mask, debug_fold_checksum, expand_function_end,
expand_function_start, stack_protect_prologue, stack_protect_epilogue,
block_ultimate_origin): Rearrange the declarations line to match the
comment that indicates the .c file which the functions are defined.
(dwarf2out_*, set_decl_rtl): Add comment.
(get_base_address): Adjust comment.
(change_decl_assembler_name, maybe_fold_*, build_addr): Rearrange the
declarations line and add comment.
(is_builtin_name): Add blank after function name, for clarity.
From-SVN: r147122
PR c++/40013
* pt.c (tsubst): If magic NOP_EXPR with side-effects has no type,
set it from its operand's type after tsubst_expr.
* g++.dg/ext/vla7.C: New test.
From-SVN: r147119
* attribs.c (decl_attributes): Use %qE for identifiers in
diagnostics.
* cgraphunit.c (verify_cgraph_node): Translate function names to
locale character set in diagnostics.
* coverage.c (get_coverage_counts): Use %qE for identifiers in
diagnostics.
* doc/invoke.texi (-finstrument-functions-exclude-function-list):
Document that functions are named in UTF-8.
* expr.c (expand_expr_real_1): Translate function names to locale
character set in diagnostics.
* gimplify.c (omp_notice_variable, omp_is_private,
gimplify_scan_omp_clauses): Use %qE for identifiers in
diagnostics.
* langhooks.c (lhd_print_error_function): Translate function names
to locale character set.
* langhooks.h (decl_printable_name): Document that return value is
in internal character set.
* stmt.c: Include pretty-print.h
(tree_conflicts_with_clobbers_p): Use %qE for identifiers in
diagnostics.
(resolve_operand_name_1): Translate named operand name to locale
character set.
* stor-layout.c (finalize_record_size): Use %qE for identifiers in
diagnostics.
* toplev.c (announce_function): Translate function names to locale
character set.
(warn_deprecated_use): Use %qE for identifiers in diagnostics.
(default_tree_printer): Use pp_identifier or translate identifiers
to locale character set. Mark "<anonymous>" for translation.
* tree-mudflap.c (mx_register_decls, mudflap_finish_file): Use %qE
for identifiers in diagnostics.
* tree.c (handle_dll_attribute): Use %qE for identifiers in
diagnostics.
* varasm.c (output_constructor): Use %qE for identifiers in
diagnostics.
testsuite:
* gcc.dg/ucnid-11.c, gcc.dg/ucnid-12.c, gcc.dg/ucnid-13.c: New
tests.
From-SVN: r147111
* c-common.c (handle_mode_attribute): Use %qE for identifiers in
diagnostics.
* c-decl.c (check_bitfield_type_and_width): Make orig_name a tree
and pass value to identifier_to_locale.
(warn_variable_length_array): Make name a tree.
(grokdeclarator): Separate diagnostic texts for named and unnamed
declarators. Use %qE for named declarators.
* c-parser.c (c_lex_one_token): Use %qE for identifiers in
diagnostics.
* c-pragma.c (pop_alignment, handle_pragma_pack): Use %qE for
identifiers in diagnostics.
* c-typeck.c (push_member_name, start_init): Pass identifiers to
identifier_to_locale. Mark "anonymous" strings for translation.
testsuite:
* gcc.dg/ucnid-8.c, gcc.dg/ucnid-9.c, gcc.dg/ucnid-10.c: New
tests.
* gcc.dg/declspec-9.c, gcc.dg/declspec-10.c, gcc.dg/declspec-11.c:
Update expected errors.
From-SVN: r147108
2009-05-04 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c++/28152
cp/
* parser.c (cp_lexer_get_preprocessor_token): Do not store the
canonical spelling for keywords.
(cp_parser_attribute_list): Use the canonical spelling for
keywords in attributes.
testsuite/
* g++.dg/parse/parser-pr28152.C: New.
* g++.dg/parse/parser-pr28152-2.C: New.
From-SVN: r147097
2009-05-04 Richard Guenther <rguenther@suse.de>
PR middle-end/40015
* builtins.c (fold_builtin_memory_op): Do not decay to element
type if the size matches the whole array.
From-SVN: r147094
* expmed.c (shiftsub_cost): Rename to shiftsub0_cost.
(shiftsub1_cost): New.
(init_expmed): Compute shiftsub1_cost.
(synth_mult): Optimize multiplications by constants of the form
-(2^^m-1) for some constant positive integer m.
From-SVN: r147086
2009-05-03 Richard Guenther <rguenther@suse.de>
PR c/39983
* c-typeck.c (array_to_pointer_conversion): Do not built
ADDR_EXPRs of arrays of pointer-to-element type.
* c-gimplify.c (c_gimplify_expr): Revert change fixing
up wrong ADDR_EXPRs after-the-fact.
* c-common.c (strict_aliasing_warning): Strip pointer
conversions for obtaining the original type.
* builtins.c (fold_builtin_memset): Handle array types.
(fold_builtin_memory_op): Handle folded POINTER_PLUS_EXPRs
and array types
* gcc.c-torture/compile/pr39983.c: New testcase.
From-SVN: r147083
2009-05-03 Richard Guenther <rguenther@suse.de>
PR middle-end/23329
* tree-ssa.c (useless_type_conversion_p_1): Use get_deref_alias_set.
Do not lose casts from array types with unknown extent to array
types with known extent.
* tree-ssa-copy.c (may_propagate_copy): Remove hack checking for
alias set compatibility.
From-SVN: r147082
* expr.c (get_def_for_expr): New function.
(expand_expr_real_1) <PLUS_EXPR, MINUS_EXPR>: Adjust to work with
SSA rather than trees.
<MULT_EXPR>: Likewise. Use subexp0 and subexp1 instead of
TREE_OPERAND (exp, 0) and TREE_OPERAND (exp, 1).
Co-Authored-By: Richard Guenther <rguenther@suse.de>
From-SVN: r147078
2009-05-03 Paolo Carlini <paolo.carlini@oracle.com>
* acinclude.m4 ([GLIBCXX_ENABLE_ATOMIC_BUILTINS]): Do link tests when
possible.
* configure: Regenerate.
From-SVN: r147076
2009-05-02 Richard Guenther <rguenther@suse.de>
PR tree-optimization/39940
* tree-ssa-pre.c (eliminate): Make sure we may propagate before
doing so.
From-SVN: r147065
2009-05-02 Richard Guenther <rguenther@suse.de>
PR middle-end/40001
* tree-ssa.c (execute_update_addresses_taken): Properly check
if we can mark a variable DECL_GIMPLE_REG_P.
* gimple.c (is_gimple_reg): Re-order check for DECL_GIMPLE_REG_P
back to the end of the function.
(is_gimple_reg_type): Remove complex type special casing.
* gimplify.c (gimplify_bind_expr): Do not set DECL_GIMPLE_REG_P
if not optimizing.
* gcc.target/spu/pr40001.c: New testcase.
From-SVN: r147064
* tree-ssa-coalesce.c (coalesce_cost): Do not take ciritical
parameter; update callers.
(coalesce_cost_edge): EH edges are costier because they needs splitting
even if not critical and even more costier when there are multiple
EH predecestors.
From-SVN: r147057