2009-06-17 David Daney <ddaney@caviumnetworks.com>
* jump.c (cleanup_barriers): Handle case of no insns before a
barrier.
2009-06-17 David Daney <ddaney@caviumnetworks.com>
* gcc.dg/builtin-unreachable-3.c: New test.
From-SVN: r148624
./: * c-pch.c (get_ident): Don't set size of templ array.
(pch_init): Don't set size of partial_pch array.
* c-typeck.c (digest_init): If -Wc++-compat, warn about using a
string constant to intialize an array whose size is the length of
the string.
testsuite/:
* gcc.dg/Wcxx-compat-14.c: New testcase.
From-SVN: r148611
2009-06-17 Richard Guenther <rguenther@suse.de>
PR middle-end/40460
* tree-chrec.h (build_polynomial_chrec): If we cannot determine
if there is no evolution of left in the loop bail out.
* tree-chrec.c (chrec_fold_multiply_poly_poly): CSE one
chrec_fold_multiply.
* g++.dg/torture/pr40460.C: New testcase.
From-SVN: r148593
* sem_prag.adb (Check_Arg_Is_Static_Expression): Allow for
missing type.
(Analyze_Attribute, case Machine_Attribute): Allow any type for
arg 3.
* gcc-interface/decl.c (prepend_attributes): Accept static
expressions of any type as attribute arguments, not only string
literals.
* gnat_rm.texi (pragma Machine_Attribute section): Adjust to
reflect the relaxation of the restriction on the Info argument type.
Co-Authored-By: Olivier Hainque <hainque@adacore.com>
From-SVN: r148589
PR target/39254
* config/rs6000/rs6000.c (rs6000_emit_move): Don't emit a USE
for the symbol ref of a constant that is the source of a move
- nor for any other not-obvious-label-ref constants.
Co-Authored-By: Janis Johnson <janis187@us.ibm.com>
From-SVN: r148568
* vec.h (VEC_stack_alloc): Define different version if
GATHER_STATISTICS is defined, to accept and ignore MEM_STAT.
(DEF_VEC_ALLOC_FUNC_P_STACK): Remove MEM_STAT_DECL.
(DEF_VEC_ALLOC_FUNC_O_STACK): Likewise.
(DEF_VEC_ALLOC_FUNC_I_STACK): Likewise.
From-SVN: r148562
2009-06-16 Jonathan Wakely <jwakely.gcc@gmail.com>
* libsupc++/exception_ptr.h (exception_ptr::swap(exception_ptr&&)):
Remove.
(exception_ptr::operator=(exception_ptr&&)): Cast source to
rvalue-reference so that move constructor is called.
* testsuite/18_support/exception_ptr/move.cc: New.
From-SVN: r148555
* config/rs6000/aix.h (LIBSTDCXX_STATIC): Remove -lstdc++.
cp/
* g++-spec.c (LIBSTDCXX_STATIC): Default to NULL.
(lang_specific_driver): Always allocate extra argument.
Add LIBSTDCXX_STATIC to arglist if defined and linking
statically.
From-SVN: r148546
2009-06-16 Wim Lewis <wiml@hhhh.org>
* src/powerpc/ffi.c: Avoid clobbering cr3 and cr4, which are
supposed to be callee-saved.
* src/powerpc/sysv.S (small_struct_return_value): Fix overrun of
return buffer for odd-size structs.
From-SVN: r148543
* toplev.h (floor_log2): If GCC_VERSION >= 3004, declare as static
inline, not extern inline.
(exact_log2): Likewise.
* toplev.c (floor_log2): Only define if GCC_VERSION < 3004. Don't
test CLZ_HWI.
(exact_log2): Likewise, but don't test CTZ_HWI.
From-SVN: r148540
./: * c-common.c (skip_evaluation): Don't define.
(c_inhibit_evaluation_warnings): Define global variable.
(overflow_warning): Check c_inhibit_evaluation_warnings rather
than skip_evaluation.
(convert_and_check, warn_for_div_by_zero): Likewise.
* c-common.h (skip_evaluation): Don't declare.
(c_inhibit_evaluation_warnings): Declare.
* c-parser.c (c_parser_typeof_specifier): Set
c_inhibit_evaluation_warnings rather than skip_evaluation.
(c_parser_conditional_expression): Likewise.
(c_parser_binary_expression): Likewise.
(c_parser_sizeof_expression): Likewise.
(c_parser_alignof_expression): Likewise.
* c-typeck.c (build_indirect_ref): Check
c_inhibit_evaluation_warnings rather than skip_evaluation.
(build_conditional_expr, build_binary_op): Likewise.
cp/:
* parser.c (cp_unevaluated_operand): Define global variable.
(cp_parser_question_colon_clause): Increment
c_inhibit_evaluation_warnings when evaluating an expression which
will never be executed.
(cp_parser_decltype): Increment cp_unevaluated_operand and
c_inhibit_evaluation_warnings, not skip_evaluation.
(cp_parser_sizeof_operand): Likewise.
(cp_parser_enclosed_template_argument_list): Save
cp_unevaluated_operand and c_inhibit_evaluation_warnings, not
skip_evaluation.
* cp-tree.h (struct saved_scope): Remove skip_evaluation field.
Add unevaluated_operand and inhibit_evaluation_warnings fields.
(cp_unevaluated_operand): Declare.
* name-lookup.c (push_to_top_level): Save cp_unevaluated_operand
and c_inhibit_evaluation_warnings rather than skip_evaluation.
(pop_from_top_level): Restore cp_unevaluated_operand and
c_inhibit_evaluation_warnings rather than skip_evaluation.
* class.c (build_base_path): Check cp_unevaluated_operand rather
than skip_evaluation.
* typeck.c (build_class_member_access_expr): Likewise.
(cp_build_binary_op): Don't warn about bad shift counts if
c_inhibit_evaluation_warnings is non-zero.
* pt.c (coerce_template_parms): Save state of
cp_unevaluated_operand and c_inhibit_evaluation_warnings, not
skip_evaluation.
(tsubst_aggr_type): Likewise.
(tsubst_pack_expansion): Check cp_unevaluated_operand rather than
skip_evaluation.
(tsubst_copy): Likewise.
(tsubst): Set cp_unevaluated_operand and
c_inhibit_evaluation_warnings, not skip_evaluation.
(tsubst_copy_and_build): Likewise.
* call.c (convert_arg_to_ellipsis): Check cp_unevaluated_operand
rather than skip_evaluation.
* decl2.c (mark_used): Likewise.
* semantics.c (finish_non_static_data_member): Likewise.
* cvt.c (cp_convert_and_check): Check
c_inhibit_evaluation_warnings rather than skip_evaluation.
* mangle.c (write_type): Set cp_unevaluated_operand rather than
skip_evaluation.
testsuite/:
* g++.dg/warn/skip-1.C: New testcase.
From-SVN: r148535
2009-06-16 Richard Guenther <rguenther@suse.de>
* tree-ssa-structalias.c (do_ds_constraint): Stores in global
variables add them to ESCAPED.
(find_func_aliases): Do not make all indirectly stored values
escaped.
* gcc.dg/tree-ssa/pta-escape-1.c: New testcase.
* gcc.dg/tree-ssa/pta-escape-2.c: Likewise.
* gcc.dg/tree-ssa/pta-escape-3.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-27.c: Likewise.
From-SVN: r148525
2009-06-16 Rafael Avila de Espindola <espindola@google.com>
* config/i386/winnt.c (i386_pe_encode_section_info): Update call to
make_decl_one_only.
From-SVN: r148523
2009-06-16 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/40432
* tree-sra.c (sra_modify_assign): When creating VIEW_CONVERT_EXPR,
check whether we need to force gimple register operand.
* testsuite/gcc.c-torture/compile/pr40432.c: New file.
From-SVN: r148522
2009-06-16 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/40413
* tree-sra.c (load_assign_lhs_subreplacements): Pass offset to
build_ref_for_offset.
(propagate_subacesses_accross_link): Fix a typo in a comment.
* testsuite/gfortran.fortran-torture/compile/pr40413.f90: New file.
From-SVN: r148520
2009-06-16 Basile Starynkevitch <basile@starynkevitch.net>
* gcc/doc/plugins.texi (Interacting with the GCC Garbage Collector):
Mention the plugin mode of gengtype.
* gcc/doc/gty.texi (Source Files Containing Type Information):
Likewise.
* gcc/gengtype.c: Updated copyright.
(plugin_files, nb_plugin_files) Added new static variables.
(measure_input_list) Care about plugin_files.
(write_rtx_next): Added early return in plugin mode.
(create_file): Updated copyright year in generated file. Added
asserts.
(oprintf): Added early return if NULL outf.
(get_output_file_with_visibility): Care of plugin_files.
(get_output_file_name): May return null.
(write_local): Added early return.
(put_mangled_filename): Ditto.
(finish_root_table): Added check for base_files.
(write_roots): Care about null when plugins.
(main): Added plugin mode.
From-SVN: r148515