2009-07-25 Martin Jambor <mjambor@suse.cz>
* doc/extend.texi (Labels as Values): Document need for noclone.
(Function Attributes): Document noclone attribute.
* c-common.c (c_common_attribute_table): New element for noclone.
(handle_noclone_attribute): New function. Forward-declare.
* tree-inline.c (tree_versionable_function_p): Check for noclone
attribute.
* testsuite/gcc.c-torture/execute/pr17377.c: Add noclone attribute to
function y.
* testsuite/gcc.dg/ipa/noclone-1.c: New test.
From-SVN: r150086
2009-07-25 Richard Guenther <rguenther@suse.de>
PR fortran/40005
* trans-types.c (gfc_get_array_type_bounds): Use
build_distinct_type_copy with a proper TYPE_CANONICAL and
re-use the type-decl of the original type.
* trans-decl.c (build_entry_thunks): Signal cgraph we may not
garbage collect.
(create_main_function): Likewise.
(gfc_generate_function_code): Likewise.
* trans-expr.c (gfc_trans_subcomponent_assign): Do not use
fold_convert on record types.
From-SVN: r150079
2009-07-25 Janus Weil <janus@gcc.gnu.org>
PR fortran/39630
* decl.c (match_ppc_decl): Implement the PASS attribute for procedure
pointer components.
(match_binding_attributes): Ditto.
* gfortran.h (gfc_component): Add member 'tb'.
(gfc_typebound_proc): Add member 'ppc' and make 'pass_arg' const.
* module.c (MOD_VERSION): Bump module version.
(binding_ppc): New string constants.
(mio_component): Only use formal args if component is a procedure
pointer and add 'tb' member.
(mio_typebound_proc): Include pass_arg and take care of procedure
pointer components.
* resolve.c (update_arglist_pass): Add argument 'name' and take care of
optional arguments.
(extract_ppc_passed_object): New function, analogous to
extract_compcall_passed_object, but for procedure pointer components.
(update_ppc_arglist): New function, analogous to
update_compcall_arglist, but for procedure pointer components.
(resolve_typebound_generic_call): Added argument to update_arglist_pass.
(resolve_ppc_call, resolve_expr_ppc): Take care of PASS attribute.
(resolve_fl_derived): Check the PASS argument for procedure pointer
components.
* symbol.c (verify_bind_c_derived_type): Reject procedure pointer
components in BIND(C) types.
2009-07-25 Janus Weil <janus@gcc.gnu.org>
PR fortran/39630
* gfortran.dg/proc_ptr_comp_3.f90: Modified.
* gfortran.dg/proc_ptr_comp_pass_1.f90: New.
* gfortran.dg/proc_ptr_comp_pass_2.f90: New.
* gfortran.dg/proc_ptr_comp_pass_3.f90: New.
* gfortran.dg/proc_ptr_comp_pass_4.f90: New.
* gfortran.dg/proc_ptr_comp_pass_5.f90: New.
* gfortran.dg/typebound_call_10.f03: New.
From-SVN: r150078
Core issue 901
* libsupc++/vec.cc (__cxa_vec_new2, __cxa_vec_new3): Handle NULL
dealloc.
* call.c (build_op_delete_call): If this is for a new-expression
and the op delete is deleted, do nothing.
From-SVN: r150073
PR rtl-optimization/34999
* dwarf2out.c (struct dw_fde_struct): Add dw_fde_switch_cfi
and dw_fde_switched_cold_to_hot fields.
(output_cfi_p): New function.
(output_call_frame_info): If fde->dw_fde_switched_sections,
output 2 FDEs instead of one with corrupted header.
(dwarf2out_do_cfi_startproc): New function.
(dwarf2out_begin_prologue): Use it. Initialize fde->dw_fde_switch_cfi
and fde->dw_fde_switched_cold_to_hot.
(dwarf2out_switch_text_section): Compute
fde->dw_fde_switched_cold_to_hot. Switch to new text section here.
If dwarf2out_do_cfi_asm, emit .cfi_endproc before it and call
dwarf2out_do_cfi_startproc plus emit again currently active CFI insns.
Otherwise, compute fde->dw_fde_switch_cfi.
From-SVN: r150069
* cfghooks.c (split_block): Copy discriminator to new block.
* tree-cfg.c (assign_discriminator): Check location of last
instruction in block as well as first.
From-SVN: r150065
* include/c_global/cwchar (swprintf, vswprintf): Do not use if
_GLIBCXX_HAVE_BROKEN_VSWPRINTF.
* testsuite/lib/libstdc++.exp (check_v3_target_swprintf): New.
* testsuite/lib/dg-options.exp (dg-require-swprintf): New.
* testsuite/21_strings/headers/cwchar/functions_std.cc,
testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/4402.cc,
testsuite/27_io/basic_ostream/inserters_other/wchar_t/error_code.cc:
Use dg-require-swprintf.
From-SVN: r150063
2009-07-24 Kai Tietz <kai.tietz@onevision.com>
* gnu/java/security/jce/prng/natVMSecureRandomWin32.cc: New Win32
specific implementation.
From-SVN: r150048
2009-07-24 Janus Weil <janus@gcc.gnu.org>
PR fortran/40822
* array.c (gfc_resolve_character_array_constructor): Use new function
gfc_new_charlen.
* decl.c (add_init_expr_to_sym,variable_decl,match_char_spec,
gfc_match_implicit): Ditto.
* expr.c (gfc_simplify_expr): Ditto.
* gfortran.h (gfc_new_charlen): New prototype.
* iresolve.c (check_charlen_present,gfc_resolve_char_achar): Use new
function gfc_new_charlen.
* module.c (mio_charlen): Ditto.
* resolve.c (gfc_resolve_substring_charlen,
gfc_resolve_character_operator,fixup_charlen,resolve_fl_derived,
resolve_symbol): Ditto.
* symbol.c (gfc_new_charlen): New function to create a new gfc_charlen
structure and add it to a namespace.
(gfc_copy_formal_args_intr): Make sure ts.cl is present
for CHARACTER variables.
2009-07-24 Janus Weil <janus@gcc.gnu.org>
PR fortran/40822
* gfortran.dg/char_length_16.f90: New.
From-SVN: r150047
PR libffi/40807
* src/x86/ffi.c (ffi_prep_cif_machdep): Also use sign/zero-extending
return types for X86_WIN32.
* src/x86/win32.S (_ffi_call_SYSV): Handle omitted return types.
(_ffi_call_STDCALL, _ffi_closure_SYSV, _ffi_closure_raw_SYSV,
_ffi_closure_STDCALL): Likewise.
* src/closures.c (is_selinux_enabled): Define to const 0 for Cygwin.
(dlmmap, dlmunmap): Also use these functions on Cygwin.
From-SVN: r150042
2009-07-24 Kai Tietz <kai.tietz@onevision.com>
* config/i386/mingw-w64.h (STANDARD_INCLUDE_DIR): Remove and
use default set in mingw32.h header.
* config/i386/mingw32.h (STANDARD_INCLUDE_DIR): Use for 32-bit and
64-bit /mingw/include path.
(STANDARD_STARTFILE_PREFIX_1): Use for 32-bit and 64-bit /mingw/lib
path.
From-SVN: r150040
* config/i386/i386.c: Use ASM_LONG instead of .long. Concatenate
ASM_LONG, LPREFIX, MCOUNT_NAME and PROFILE_COUNT_REGISTER strings
with the rest of string where appropriate. Use fputs or putc
instead of fprintf where appropriate.
From-SVN: r150030
PR fortran/40839
* io.c (gfc_resolve_dt): Add LOC argument. Fail if
dt->io_unit is NULL. Return FAILURE after issuing error about
negative UNIT number.
(match_io_element): Don't segfault if current_dt->io_unit is NULL.
* gfortran.h (gfc_resolve_dt): Adjust prototype.
* resolve.c (resolve_code): Adjust caller.
* gfortran.dg/pr40839.f90: New test.
From-SVN: r150021
2009-07-23 Ed Schonberg <schonberg@adacore.com>
* sem.adb (Do_Unit_And_Dependents): Now that specs and bodies are not
done at the same time, guard against listing a body more than once.
2009-07-23 Robert Dewar <dewar@adacore.com>
* exp_ch6.adb: Minor reformatting
2009-07-23 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Analyze_Object_Declaration): A scalar constant with a
static expression is known valid.
* sem_eval.adb (Compile_Time_Compare): Handle properly non-static
operands of a subtype with a single value.
From-SVN: r150009
2009-07-23 Sergey Rybin <rybin@adacore.com>
* gnat_ugn.texi (Misnamed_Controlling_Parameters gnatcheck rule): Fix
misprint in rule description.
2009-07-23 Gary Dismukes <dismukes@adacore.com>
* exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Replace
test that the object declaration is within an extended return statement
with direct test of whether the declared object associated with the
build-in-place call is a return object, since the enclosing function
might not even be a build-in-place function.
2009-07-23 Robert Dewar <dewar@adacore.com>
* freeze.adb, prj-nmsc.adb, errout.adb: Minor reformatting
Minor code reorganization
2009-07-23 Arnaud Charlet <charlet@adacore.com>
* sem_prag.adb (Analyze_Pragma): Do not ignore pragma Pack on records
for static analysis, only packed arrays are causing troubles.
From-SVN: r150007
2009-07-23 Arnaud Charlet <charlet@adacore.com>
* freeze.adb (Set_Small_Size): Remove extra space for consistency with
other similar messages.
* sem_prag.adb (Freeze_Record_Type, Freeze_Entity): Disable error
messages/implicit packing in CodePeer mode.
(Analyze_Pragma [case pragma Pack]): Ignore pragma in CodePeer mode.
* errout.adb (Special_Msg_Delete): Suppress 'size too small' message in
CodePeer mode.
From-SVN: r150005
2009-07-23 Gary Dismukes <dismukes@adacore.com>
* sem_aggr.adb (Resolve_Extension_Aggregate): Report an error when the
ancestor part is a call to a limited function with an unconstrained
result subtype unless the aggregate has a null extension type.
* sem_ch3.adb (Is_Null_Extension): Use the base type when retrieving
the parent type declaration to avoid blowups on subtype cases.
From-SVN: r150002