* config/rs6000/rs6000.c (rs6000_issue_rate): Don't artificially
restrict issue_rate in first pass when scheduling for register
pressure.
From-SVN: r152291
2009-09-29 Basile Starynkevitch <basile@starynkevitch.net>
Rafael Avila de Espindola <espindola@google.com>
* gengtype.c (plugin_output): New.
(get_output_file_with_visibility): Return plugin_output for plugins.
(main): Parse and use the -P option.
* gty.texi: Update the command line format.
Co-Authored-By: Rafael Avila de Espindola <espindola@google.com>
From-SVN: r152286
2009-09-29 Richard Guenther <rguenther@suse.de>
* alias.c (ao_ref_from_mem): Properly deal with off decl accesses
resulting from stack temporaries on STRICT_ALIGNMENT targets.
From-SVN: r152278
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Factor out
common code processing the component type into...
<E_Array_Subtype>: Likewise.
(gnat_to_gnu_component_type): ...this new static function.
(maybe_pad_type): Minor cleanup.
From-SVN: r152273
* decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Rewrite the handling
of constrained discriminated record subtypes.
(components_to_record): Declare the type of the variants and of the
qualified union.
(build_subst_list): Move around.
(compute_field_positions): Rename into...
(build_position_list): ...this. Return a TREE_VEC.
(annotate_rep): Adjust for above renaming.
(build_variant_list): New static function.
(create_field_decl_from): Likewise.
(get_rep_part): Likewise.
(get_variant_part): Likewise.
(create_variant_part_from): Likewise.
(copy_and_substitute_in_size): Likewise.
From-SVN: r152272
2009-09-29 Daniel Kraft <d@domob.eu>
PR fortran/39626
* gfortran.h (enum gfc_statement): Add ST_BLOCK and ST_END_BLOCK.
(struct gfc_namespace): Convert flags to bit-fields and add flag
`construct_entities' for use with BLOCK constructs.
(enum gfc_exec_code): Add EXEC_BLOCK.
(struct gfc_code): Add namespace field to union for EXEC_BLOCK.
* match.h (gfc_match_block): New prototype.
* parse.h (enum gfc_compile_state): Add COMP_BLOCK.
* trans.h (gfc_process_block_locals): New prototype.
(gfc_trans_deferred_vars): Made public, new prototype.
* trans-stmt.h (gfc_trans_block_construct): New prototype.
* decl.c (gfc_match_end): Handle END BLOCK correctly.
(gfc_match_intent): Error if inside of BLOCK.
(gfc_match_optional), (gfc_match_value): Ditto.
* match.c (gfc_match_block): New routine.
* parse.c (decode_statement): Handle BLOCK statement.
(case_exec_markers): Add ST_BLOCK.
(case_end): Add ST_END_BLOCK.
(gfc_ascii_statement): Handle ST_BLOCK and ST_END_BLOCK.
(parse_spec): Check for statements not allowed inside of BLOCK.
(parse_block_construct): New routine.
(parse_executable): Parse BLOCKs.
(parse_progunit): Disallow CONTAINS in BLOCK constructs.
* resolve.c (is_illegal_recursion): Find real container procedure and
don't get confused by BLOCK constructs.
(resolve_block_construct): New routine.
(gfc_resolve_blocks), (resolve_code): Handle EXEC_BLOCK.
* st.c (gfc_free_statement): Handle EXEC_BLOCK statements.
* trans-decl.c (saved_local_decls): New static variable.
(add_decl_as_local): New routine.
(gfc_finish_var_decl): Add variable as local if inside BLOCK.
(gfc_trans_deferred_vars): Make public.
(gfc_process_block_locals): New routine.
* trans-stmt.c (gfc_trans_block_construct): New routine.
* trans.c (gfc_trans_code): Handle EXEC_BLOCK statements.
2009-09-29 Daniel Kraft <d@domob.eu>
PR fortran/39626
* gfortran.dg/block_1.f08: New test.
* gfortran.dg/block_2.f08: New test.
* gfortran.dg/block_3.f90: New test.
* gfortran.dg/block_4.f08: New test.
* gfortran.dg/block_5.f08: New test.
* gfortran.dg/block_6.f08: New test.
* gfortran.dg/block_7.f08: New test.
* gfortran.dg/block_8.f08: New test.
From-SVN: r152266
2009-09-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/35862
* io.h (gfc_unit): Add round_status.
(format_token): Add enumerators for rounding format specifiers.
* transfer.c (round_opt): New options table.
(formatted_transfer_scalar_read): Add set round_status for each rounding
format token. (formatted_transfer_scalar_write): Likewise.
* format.c (format_lex): Tokenize the rounding format specifiers.
(parse_format_list): Parse the rounding format specifiers.
* write_float.def (outout_float): Modify rounding code to use new
variable rchar to set the appropriate rounding. Fix some whitespace.
* unit.c (get_internal_unit): Initialize rounding mode for internal
units. (init_units): Likewise.
From-SVN: r152263
2009-09-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/35862
* io.c (format_token): Add enumerators for rounding format specifiers.
(format_lex): Tokenize the rounding format specifiers.
(gfc_match_open): Enable rounding modes in OPEN statement.
From-SVN: r152262
2009-09-28 Kai Tietz <kai.tietz@onevision.com>
* src/x86/win64.S (_ffi_call_win64 stack): Remove for gnu
assembly version use of ___chkstk.
From-SVN: r152256
* gcc-interface/targtyps.c
* (get_target_default_allocator_alignment):
Account for observable alignments out of default allocators.
testsuite/
* gnat.dg (tagged_alloc_free.adb): New testcase.
From-SVN: r152243
* builtins.c (interclass_mathfn_icode): New helper.
(expand_builtin_interclass_mathfn): Use it here, and split folding
into ...
(fold_builtin_interclass_mathfn): ... this new folder.
(build_call_nofold_loc): New static helper.
(build_call_nofold): New wrapper macro for above.
(expand_builtin_int_roundingfn): Use it instead of build_call_expr.
(expand_builtin_pow): Ditto.
(expand_builtin_memset_args): Ditto.
(expand_builtin_printf): Ditto.
(expand_builtin_fprintf): Ditto.
(expand_builtin_sprintf): Ditto.
(expand_builtin_memory_chk): Ditto.
(expand_builtin_mempcpy_args): Ditto and don't call folders.
(expand_builtin_stpcpy): Ditto.
(expand_builtin_strcmp): Ditto.
(expand_builtin_strncmp): Ditto.
(expand_builtin_strcpy): Remove FNDECL and MODE arguments.
(expand_builtin_strcpy_args): Don't call folders.
(expand_builtin_memcmp): Ditto.
(expand_builtin_strncpy): Ditto, and use target.
(expand_builtin_memcpy): Ditto.
(expand_builtin_strstr, expand_builtin_strchr, expand_builtin_strrchr,
expand_builtin_strpbrk, expand_builtin_memmove,
expand_builtin_memmove_args, expand_builtin_bcopy,
expand_builtin_memchr, expand_builtin_strcat, expand_builtin_strncat,
expand_builtin_strspn, expand_builtin_strcspn,
expand_builtin_fputs): Remove these.
(expand_builtin): Don't call the above, change calls to other
expanders that changed prototype.
(fold_builtin_stpcpy): New folder split out from expand_builtin_stpcpy.
(fold_builtin_1 <ISFINITE, ISINF, ISNORMAL>): Call
fold_builtin_interclass_mathfn.
(fold_builtin_2 <STPCPY>): Call fold_builtin_stpcpy.
(fold_builtin_strcat): Add folding split from expand_builtin_strcat.
* fold-const.c (fold_binary_loc <NE_EXPR>): Add !exp != 0 -> !exp.
* passes.c (init_optimization_passes): Move pass_fold_builtins
after last phiopt pass.
* tree-inline.c (fold_marked_statements): When folding builtins
iterate over all instruction potentially generated.
* tree-ssa-ccp.c (gimplify_and_update_call_from_tree): Declare
earlier.
(fold_gimple_call): Use it to always fold calls (into potentially
multiple instructions).
* tree-ssa-dom.c (optimize_stmt): Resolve __builtin_constant_p
calls into zero at this time.
* tree-ssa-propagate.c (substitute_and_fold): Ignore multiple
statements generated by builtin folding.
testsuite/
* gcc.dg/builtins-44.c: Use __builtin_isinf_sign when checking
for sign of -Inf.
From-SVN: r152236
* loop-iv.c (iv_analyze_op): Use function_invariant_p, not CONSTANT_P,
to test for GRD_INVARIANT.
(simple_rhs_p): Anything that's function_invariant_p is fine.
From-SVN: r152226
2009-09-27 Basile Starynkevitch <basile@starynkevitch.net>
Rafael Avila de Espindola <espindola@google.com>
* gengtype.c (write_root, write_roots): Add a emit_pch argument.
Don't print pch related info if it is false.
(main): Don't print pch info in plugin mode.
Co-Authored-By: Rafael Avila de Espindola <espindola@google.com>
From-SVN: r152223
* dwarf2out.c (enum dw_val_class): Replace dw_val_class_long_long
with dw_val_class_const_double.
(struct dw_val_struct): Replace val_long_long with val_double and
adjust for above change.
(output_loc_operands): Likewise.
(add_AT_long_long): Rename into...
(add_AT_double): ...this.
(print_die): Replace dw_val_class_long_long with
dw_val_class_const_double and adjust.
(attr_checksum): Likewise.
(same_dw_val_p): Likewise.
(size_of_die): Likewise.
(value_format): Likewise.
(output_die): Likewise.
(loc_descriptor) <CONST_DOUBLE>: Likewise.
(add_const_value_attribute) <CONST_DOUBLE>: Call add_AT_double
instead of add_AT_long_long.
(add_bound_info) <INTEGER_CST>: Generate the bound as an unsigned
value with the precision of its type.
From-SVN: r152222
PR c/41476
* c-typeck.c (build_conditional_expr): Use the readonly and
volatile flags of the operand types, not of the operands itself.
testsuite/:
* gcc.dg/cond-constqual-1.c: New test.
From-SVN: r152220