* gcc.dg/tree-ssa/foldaddr-3.c: New file.
* tree-ssa-ccp (maybe_fold_offset_to_component_ref): Recurse into
multiple fields of union.
From-SVN: r123674
* cfgloopmanip.c (create_preheader): Do not use loop_preheader_edge.
(create_preheaders): Check that loops are available.
(fix_loop_structure): Clean up, improve comments.
* tree-ssa-loop-manip.c (rewrite_into_loop_closed_ssa):
Check that loops are available. Set LOOP_CLOSED_SSA to the loops
state flags.
* tree-scalar-evolution.c (scev_finalize): Clear scalar_evolution_info.
* predict.c (tree_estimate_probability): Do not call
calculate_dominance_info. Call create_preheaders.
* tree-cfgcleanup.c (cleanup_tree_cfg_loop): Only call
rewrite_into_loop_closed_ssa if LOOP_CLOSED_SSA is set in loops state
flags.
* cfgloop.c (loop_preheader_edge): Assert that loops have preheaders.
* cfgloop.h (LOOP_CLOSED_SSA): New constant.
* tree-cfg.c (tree_split_edge): Make an assert more precise.
* tree-ssa-threadedge.c (thread_across_edge): Comment the function
arguments.
From-SVN: r123670
* langhooks.c (lhd_tree_inlining_add_pending_fn_decls,
lhd_tree_inlining_anon_aggr_type_p, lhd_tree_inlining_start_inlining,
lhd_tree_inlining_end_inlining): Remove.
* langhooks.h (struct lang_hooks_for_tree_inlining): Remove then
add_pending_fn_decls, anon_aggr_type_p, start_inlining, and
end_inlining hooks.
* langhooks-def.h (lhd_tree_inlining_add_pending_fn_decls,
lhd_tree_inlining_anon_aggr_type_p, lhd_tree_inlining_start_inlining,
lhd_tree_inlining_end_inlining): Remove prototypes.
(LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
LANG_HOOKS_TREE_INLINING_START_INLINING,
LANG_HOOKS_TREE_INLINING_END_INLINING): Remove.
* c-objc-common.h (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do
not set it.
cp/
* cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
Do not set it.
(LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
* tree.c (cp_add_pending_fn_decls): Remove.
* cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
From-SVN: r123658
2007-04-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31257
* intrinsic.c (add_functions): Add ref. to gfc_resolve_achar.
* intrinsic.h : Add prototype for gfc_resolve_achar.
* iresolve.c (gfc_resolve_achar): New function.
2007-04-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31257
* gfortran.dg/achar_4.f90: New test.
From-SVN: r123646
2007-04-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30880
* resolve.c (resolve_fl_variable): Set flag to 2 for automatic
arrays. Make condition for automatic array error explicit.
If a dummy, no error on an INTENT(OUT) derived type.
2007-04-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30880
* gfortran.dg/used_dummy_types_8.f90: New test.
From-SVN: r123645
2007-04-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30872
* expr.c (find_array_element): Correct arithmetic for rank > 1.
2007-04-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30872
* gfortran.dg/parameter_array_element_1.f90: New test.
From-SVN: r123644
2007-04-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31222
* check.c (numeric_check): If an expresson has not got a type,
see if it is a symbol for which a default type applies.
2007-04-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31222
* gfortran.dg/default_numeric_type_1.f90: New test.
From-SVN: r123643
2007-04-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31214
* trans-decl.c (gfc_get_symbol_decl): Allow unreferenced use
associated symbols.
2007-04-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31424
* gfortran.dg/unreferenced_use_assoc_1.f90: New test.
From-SVN: r123642
2007-04-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31293
* symbol.c (gfc_check_function_type): New function.
* gfortran.h : Add prototype for previous.
* parse.c (parse_progunit): Call it after parsing specification
statements.
2007-04-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31293
* gfortran.dg/interface_12.f90: New test.
From-SVN: r123641
2007-04-06 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/31117
* config/locale/gnu/c_locale.cc (__convert_to_v): Do not use errno,
just check that the value is finite.
* config/locale/generic/c_locale.cc (__convert_to_v): Likewise.
From-SVN: r123635
* tree-ssa-loop-niter.c (idx_infer_loop_bounds): Add and use
argument "reliable".
(infer_loop_bounds_from_ref, infer_loop_bounds_from_array):
Add argument "reliable". Propagate it through calls.
(infer_loop_bounds_from_undefined): Derive number of iterations
estimates from references in blocks that do not dominate loop latch.
(gcov_type_to_double_int): New function.
(estimate_numbers_of_iterations_loop): Use gcov_type_to_double_int
and expected_loop_iterations_unbounded.
* cfgloopanal.c (expected_loop_iterations_unbounded): New function.
(expected_loop_iterations): Use expected_loop_iterations_unbounded.
* tree-data-ref.c (estimated_loop_iterations): Export.
(get_references_in_stmt): Fix -- do not return addresses of local
objects.
* cfgloop.h (expected_loop_iterations_unbounded,
estimated_loop_iterations): Declare.
From-SVN: r123630
* config/i386/i386.md (extend<mode>xf2): Rename from extendsfxf2
and extenddfxf2. Macroize expander using X87MODEF12 mode macro.
(*truncdfsf_mixed, *truncdfsf_i387, *truncdfsf2_i387_1):
Use output_387_reg_move().
(*truncxf<mode>2): Rename from *truncxfsf2 and truncxfdf2. Macroize
expander using X87MODEF12 mode macro.
(*truncxfsf2_mixed): Combine alternatives, ignore "r" alternative when
choosing register preferences. Use output_387_reg_move().
(*truncxfdf2_mixed): Combine alternatives, use "r" alternative
instead of "x". Use output_387_reg_move().
(*truncxf<mode>2_i387_noop): Rename from *truncxfsf2_i387_noop and
*truncxfdf2_i387_noop. Macroize insn using X87MODEF12 mode macro.
(*truncxf<mode>2_i387): Rename from *truncxfsf2_i387 and
*truncxfdf2_i387. Macroize insn using X87MODEF12 mode macro.
Use output_387_reg_move().
(*truncxf?f_mixed splitter): Macroize splitter using X87MODEF12
mode macro.
(*truncxf?f_i387 splitter): Ditto.
From-SVN: r123626
* configure.ac: Tidy target case.
(HAVE_LONG_DOUBLE): Allow the target to override.
* configure: Regenerate.
* include/ffi.h.in: Don't define ffi_type_foo if
LIBFFI_HIDE_BASIC_TYPES is defined.
(ffi_type_longdouble): If not HAVE_LONG_DOUBLE, define
to ffi_type_double.
* types.c (LIBFFI_HIDE_BASIC_TYPES): Define.
(FFI_TYPEDEF, ffi_type_void): Mark the data const.
(ffi_type_longdouble): Special case for Alpha. Don't define
if long double == double.
* src/alpha/ffi.c (FFI_TYPE_LONGDOUBLE): Assert unique value.
(ffi_prep_cif_machdep): Handle it as the 128-bit type.
(ffi_call, ffi_closure_osf_inner): Likewise.
(ffi_closure_osf_inner): Likewise. Mark hidden.
(ffi_call_osf, ffi_closure_osf): Mark hidden.
* src/alpha/ffitarget.h (FFI_LAST_ABI): Tidy definition.
* src/alpha/osf.S (ffi_call_osf, ffi_closure_osf): Mark hidden.
(load_table): Handle 128-bit long double.
* testsuite/libffi.call/float4.c: Add -mieee for alpha.
From-SVN: r123622
2007-04-06 Arnaud Charlet <charlet@adacore.com>
Eric Botcazou <botcazou@adacore.com>
* gnatvsn.ads, comperr.adb (Get_Gnat_build_Type): Renamed Build_Type
and made constant.
* comperr.ads, comperr.adb (Compiler_Abort): Add third parameter
Fallback_Loc. Use it as the sloc info when Current_Error_Node doesn't
carry any.
* fe.h (Compiler_Abort): Add third parameter.
* misc.c (internal_error_function): Build third argument from current
input location and pass it to Compiler_Abort.
From-SVN: r123610
2007-04-06 Eric Botcazou <botcazou@adacore.com>
Olivier Hainque <hainque@adacore.com>
* utils.c (update_pointer_to): Make a copy of the couple of FIELD_DECLs
when updating the contents of the old pointer to an unconstrained array.
(end_subprog_body): Set error_gnat_node to Empty.
(write_record_type_debug_info): Do not be unduly sparing with our bytes.
(unchecked_convert): For subtype to base type conversions, require that
the source be a subtype if it is an integer type.
(builtin_decls): New global, vector of available builtin functions.
(gnat_pushdecl): Add global builtin function declaration nodes to the
builtin_decls list.
(gnat_install_builtins): Adjust comments.
(builtin_function): Set DECL_BUILTIN_CLASS and DECL_FUNCTION_CODE before
calling gnat_pushdecl, so that it knows when it handed a builtin
function declaration node.
(builtin_decl_for): Search the builtin_decls list.
From-SVN: r123609
2007-04-06 Olivier Hainque <hainque@adacore.com>
Eric Botcazou <botcazou@adacore.com>
* trans.c (call_to_gnu) <TYPE_RETURNS_BY_TARGET_PTR_P>: Return an
expression with a COMPOUND_EXPR including the call instead of emitting
the call directly here.
(gnat_to_gnu) <N_Slice>: Do not return a non-constant low bound if the
high bound is constant and the slice is empty. Tidy.
(tree_transform, case N_Op_Not): Handle properly the case where the
operation applies to a private type whose full view is a modular type.
(Case_Statement_To_gnu): If an alternative is an E_Constant with an
Address_Clause, use the associated Expression as the GNAT tree
representing the choice value to ensure the corresponding GCC tree is
of the proper kind.
(maybe_stabilize_reference): Stabilize COMPOUND_EXPRs as a whole
instead of just the operands, as the base GCC stabilize_reference does.
<CALL_EXPR>: New case. Directly stabilize the call if an lvalue is not
requested; otherwise fail.
(addressable_p) <COMPONENT_REF>: Do not test DECL_NONADDRESSABLE_P.
From-SVN: r123608
2007-04-06 Robert Dewar <dewar@adacore.com>
Arnaud Charlet <charlet@adacore.com>
* a-diroro.ads: Inserted the pragma Unimplemented_Unit
* bindgen.adb (Gen_Output_File_Ada): Generate pragma Ada_95 at start
of files
Add mention of -Sev (set initialize_scalars option from environment
variable at run time) in gnatbind usage message.
* elists.ads, elists.adb: (Append_Unique_Elmt): New procedure
* fname-uf.ads: Minor comment fix
* osint.ads: Change pragma Elaborate to Elaborate_All
* par-load.adb: Add documentation.
* sem_cat.ads, sem_cat.adb: Minor code reorganization
* s-parint.ads (RCI_Locator) : Add 'Version' generic formal
* s-secsta.ads: Extra comments
* s-soflin.ads: Minor comment fixes
* s-stratt.ads (Block_Stream_Ops_OK): Removed.
* s-wchcon.ads: Minor comment addition
* treepr.adb: Minor change in message
(Print_Name,Print_Node): Make these debug printouts more robust: print
"no such..." instead of crashing on bad input.
From-SVN: r123606
2007-04-06 Eric Botcazou <botcazou@adacore.com>
* s-stchop-vxworks.adb:
(Stack_Check): Raise Storage_Error if the argument has wrapped around.
From-SVN: r123605