2009-06-20 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/40497
* include/bits/stl_iterator_base_funcs.h (next, prev): Fix the
signature per the current C++1x draft (N2857).
* testsuite/24_iterators/operations/40497.cc: Add.
From-SVN: r148751
2009-06-20 Richard Guenther <rguenther@suse.de>
* tree-ssa-structalias.c (find_func_aliases): For memset use
a constraint from NULL if we memset to zero.
* tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Add builtins
we explicitly handle that do not read from memory.
(call_may_clobber_ref_p_1): Properly handle builtins that may
set errno.
From-SVN: r148747
2009-06-20 Ed Schonberg <schonberg@adacore.com>
* exp_ch3.adb (Build_Record_Init_Proc): When copying initial
expressions (possibly from a parent type) indicate that the scope of
the new itypes is the initialization procedure being built.
2009-06-20 Robert Dewar <dewar@adacore.com>
* a-nudira.adb (Fits_In_32_Bits): New name (inverted sense) for
Needs_64, and now computed without anomolies for some dynamic types.
2009-06-20 Thomas Quinot <quinot@adacore.com>
* sem_prag.adb: Minor reformatting
* exp_disp.ads: Minor reformatting
From-SVN: r148745
2009-06-20 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Is_OK_For_Limited_Init): An unchecked conversion of a
function call is a legal expression to initialize a limited object.
* exp_ch3.adb: Rename various freeze operations that perform expansion
actions, to prevent confusion with subprograms in the freeze package.
From-SVN: r148744
2009-06-20 Ed Schonberg <schonberg@adacore.com>
* sem.adb (Walk_Library_Units): Check instantiations first.
* sem_ch6.adb (Analyze_Subprogram_Declaration): Mark a subprogram as a
private primitive if it is a function with a controlling result that is
a type extension with progenitors.
* exp_ch9.adb (Build_Wrapper_Spec, Build_Wrapper_Body): Handle properly
a primitive operation of a synchronized tagged type that has a
controlling result.
2009-06-20 Thomas Quinot <quinot@adacore.com>
* einfo.ads: Fix typo.
2009-06-20 Ed Falis <falis@adacore.com>
* s-vxwext.ads, s-vxwext-kernel.adb: Complete previous change.
From-SVN: r148743
2009-06-20 Richard Guenther <rguenther@suse.de>
PR tree-optimization/40495
* tree-ssa-structalias.c (get_constraint_exp_for_temp): Remove.
(new_scalar_tmp_constraint_exp): New function.
(process_constraint): Do not create temporary decls.
(process_all_all_constraints): Likewise.
(handle_const_call): Likewise.
(create_function_info_for): Do not set decl.
From-SVN: r148742
2009-06-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/40440
* trans-expr.c (gfc_conv_procedure_call): Do not deallocate
allocatable components if the argument is a pointer.
2009-06-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/40440
* gfortran.dg/alloc_comp_result_2.f90: New test.
From-SVN: r148731
* tree.c (substitute_in_expr) <COMPONENT_REF>: Tweak and reformat.
<tcc_vl_exp>: Call process_call_operands on the new CALL_EXPR.
Propagate the TREE_READONLY flag without overwriting it.
(substitute_placeholder_in_expr) <tcc_vl_exp>: Likewise.
Propagate the TREE_READONLY flag onto the result.
(process_call_operands): Move around. Use correct constant value.
From-SVN: r148729
* gcc-interface/trans.c (emit_check): Do not wrap up the result
in a SAVE_EXPR.
(protect_multiple_eval): Always protect complex expressions.
From-SVN: r148723
* config/i386/i386.c (ix86_function_specific_save): Test that
fields match values, rather than testing the values are in a
certain range.
From-SVN: r148721
2009-06-19 Richard Guenther <rguenther@suse.de>
* tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Handle
ADDR_EXPR pointers.
(ptr_derefs_may_alias_p): Likewise.
(ptr_deref_may_alias_ref_p_1): New function.
(ptr_deref_may_alias_ref_p): Likewise.
(ref_maybe_used_by_call_p_1): Handle builtins that are not
covered by looking at the ESCAPED solution.
(call_may_clobber_ref_p_1): Likewise.
* tree-ssa-structalias.c (get_constraint_for_ptr_offset):
Handle NULL_TREE offset. Do not produce redundant constraints.
(process_all_all_constraints): New helper function.
(do_structure_copy): Use it.
(handle_lhs_call): Likewise.
(find_func_aliases): Handle some builtins with pointer arguments
and/or return values explicitly.
* gcc.c-torture/execute/20090618-1.c: New testcase.
From-SVN: r148718
./: * dse.c (struct store_info): Rename bitmap field to bmap. Change
all uses.
* c-decl.c (in_struct, struct_types): Remove.
(struct c_binding): Add in_struct field.
(c_binding_ptr): Define type, along with VEC.
(struct c_struct_parse_info): Define.
(struct_parse_info): New static variable.
(bind): Initialize in_struct field.
(start_struct): Remove enclosing_in_struct and
enclosing_struct_types parameters. Add
enclosing_struct_parse_info parameter. Change all callers. Set
struct_parse_info rather than in_struct and struct_types.
(grokfield): If -Wc++-compat and there is a symbol binding for the
field name, set the in_struct flag and push it on the
struct_parse_info->fields vector.
(warn_cxx_compat_finish_struct): New static function.
(finish_struct): Remove enclosing_in_struct and
enclosing_struct_types parameters. Add
enclosing_struct_parse_info parameter. Change all callers. Don't
set C_TYPE_DEFINED_IN_STRUCT here. Call
warn_cxx_compat_finish_struct. Free struct_parse_info and set to
parameter. Only push on struct_types if warn_cxx_compat.
(finish_enum): Only push on struct_types if warn_cxx_compat.
(declspecs_add_type): Add loc parameter. Change all callers.
Change all error calls to error_at. Pass loc, not input_location,
to pedwarn calls. Warn if -Wc++-compat and a typedef name is
defined in a struct. If -Wc++-compat and parsing a struct, record
that a typedef name was used.
* c-parser.c (c_parser_declspecs): Get location to pass to
declspecs_add_type.
(c_parser_struct_or_union_specifier): Update calls to start_struct
and finish_struct.
* c-tree.h (struct c_struct_parse_info): Declare.
(finish_struct, start_struct): Update declarations.
(declspecs_add_type): Update declaration.
objc/:
* objc-act.c (objc_in_struct, objc_struct_types): Remove.
(objc_struct_info): New static variable.
(objc_start_struct): Pass &objc_struct_info, not &objc_in_struct
and &objc_struct_types, to start_struct.
(objc_finish_struct): Likewise for finish_struct.
objcp/:
* objcp-decl.h (start_struct): Remove in_struct and struct_types
parameters. Add struct_info parameter.
(finish_struct): Likewise.
testsuite/:
* gcc.dg/Wcxx-compat-15.c: New testcase.
From-SVN: r148709
./: * c-decl.c (grokdeclarator): If -Wc++-compat, warn about a global
variable with an anonymous type.
fortran/:
* cpp.c (struct gfc_cpp_option_data): Give this struct, used for
the global variable gfc_cpp_option, a name.
testsuite/:
* gcc.dg/Wcxx-compat-16.c: New testcase.
From-SVN: r148708
2009-06-19 Emmanuel Briot <briot@adacore.com>
* prj-ext.adb, makeutl.adb, makeutl.ads (Executable_Prefix_Path): Now
make sure we always return a name ending with a path separator.
2009-06-19 Javier Miranda <miranda@adacore.com>
* sem_ch12.adb (Instantiate_Package_Body, Instantiate_Subprogram_Body):
Save and restore the visibility of the parent when installed.
2009-06-19 Jose Ruiz <ruiz@adacore.com>
* s-tposen.ads (Protection_Entry): Replace fields L, Ceiling, and Owner
by Common which contains all these fields.
* s-tposen.adb (Initialize_Protection_Entry, Lock_Entry,
Lock_Read_Only_Entry, Timed_Protected_Single_Entry_Call, Unlock_Entry):
Remove code duplication in this package by means of calling the
equivalent code in s-taprob.
2009-06-19 Robert Dewar <dewar@adacore.com>
* a-einuoc.ads: Minor reformatting
From-SVN: r148701
2009-06-19 Eric Botcazou <ebotcazou@adacore.com>
* einfo.ads (Handling of Type'Size Values): Fix Object_Size values.
2009-06-19 Robert Dewar <dewar@adacore.com>
* a-nudira.adb (Need_64): Handle negative ranges and also dynamic
ranges
* checks.adb (Determine_Range): Move the test for generic types later.
* sem_eval.adb (Compile_Time_Compare): Improve circuitry to catch more
cases.
(Eval_Relational_Op): Fold more cases including string compares
* sem_util.ads, sem_util.adb (References_Generic_Formal_Type): New
function.
From-SVN: r148697
2009-06-19 Robert Dewar <dewar@adacore.com>
* sem_type.ads, sem_ch12.adb: Minor reformatting
* s-wchcnv.adb (UTF_32_To_Char_Sequence): Handle invalid data properly
2009-06-19 Ed Schonberg <schonberg@adacore.com>
* exp_ch9.adb (Build_Wrapper_Spec): Handle properly an overridden
primitive operation of a rivate extension whose controlling argument
is an out parameter.
* sem.adb (Walk_Library_Units): exclude generic package declarations
from check.
From-SVN: r148696
* sem.adb (Walk_Library_Items): Include bodies in the list of units to
traverse, to account for front-end inlining and instantiations in a
spec or in the main unit.
From-SVN: r148695
2009-06-19 Thomas Quinot <quinot@adacore.com>
* i-vxwoio.ads: Add comments
2009-06-19 Thomas Quinot <quinot@adacore.com>
* socket.c, g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
g-socthi-vxworks.ads, g-socthi-mingw.adb, g-socthi-mingw.ads,
g-socthi.adb, g-socthi.ads, g-socket.adb, g-sothco.ads
(GNAT.Sockets.Thin.C_Ioctl): Rename to Socket_Ioctl.
(GNAT.Sockets.Thin.Socket_Ioctl): Use new function
Thin_Common.Socket_Ioctl.
(GNAT.Sockets.Thin_Common.Socket_Ioctl): Binding to new C wrapper
__gnat_socket_ioctl.
(__gnat_socket_ioctl): Wrapper for ioctl(2) called with a single int*
argument after the file descriptor and request code.
2009-06-19 Robert Dewar <dewar@adacore.com>
* checks.adb: Minor reformatting
From-SVN: r148694
2009-06-19 Jose Ruiz <ruiz@adacore.com>
* env.c (__gnat_environ): RTX does not support this functionality.
2009-06-19 Sergey Rybin <rybin@adacore.com>
* gnat_ugn.texi, vms_data.ads: Fix VMS qualifiers.
2009-06-19 Ed Schonberg <schonberg@adacore.com>
* sem.adb (Walk_Library_Items): Include bodies in the list of units to
traverse, to account for front-end inlining and instantiations in a
spec or in the main unit.
2009-06-19 Robert Dewar <dewar@adacore.com>
* checks.adb (Determine_Range): Do not attempt to get range of generic
type.
From-SVN: r148693
2009-06-19 Sergey Rybin <rybin@adacore.com>
* gnat_ugn.texi, vms_data.ads: Add the documentation for the new
gnatmetric option for generating the schema file for gnatmetric XML
output. Add corresponding VMS qualifier.
From-SVN: r148692
2009-06-19 Robert Dewar <dewar@adacore.com>
* g-cgi.adb: Minor reformatting
2009-06-19 Eric Botcazou <ebotcazou@adacore.com>
* s-intman-solaris.adb (Notify_Exception): Do not discriminate on the
signal code for SIGFPE and raise Program_Error for SIGILL.
* s-osinte-solaris.ads: Remove signal code constants for SIGFPE.
2009-06-19 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (Nvis_Messages): Do not list an entity declared in a
generic package if there is a visibility candidate that is declared in
a regular package.
From-SVN: r148691
2009-06-19 Janus Weil <janus@gcc.gnu.org>
PR fortran/40450
* trans-expr.c (gfc_conv_procedure_call): Only add an extra addr_expr
to a procedure pointer actual argument, if it is not itself a
dummy arg.
2009-06-19 Janus Weil <janus@gcc.gnu.org>
PR fortran/40450
* gfortran.dg/proc_ptr_20.f90: New.
From-SVN: r148690