Richard Earnshaw [Sun, 21 Jun 2009 20:48:15 +0000 (20:48 +0000)]
arm.c (thumb1_output_casesi): New function.
* arm.c (thumb1_output_casesi): New function.
* arm.h (CASE_VECTOR_PC_RELATIVE): Thumb-1 code is also relative if
optimizing for size or PIC.
(CASE_VECTOR_SHORTEN_MODE): Handle thumb-1.
* arm.md (UNSPEC_THUMB1_CASESI): New constant.
(casesi): Handle Thumb-1 when optimizing for size or PIC.
(thumb1_casesi_internal_pic): New expand rule.
(thumb1_casesi_dispatch): New pattern.
* aout.h (ASM_OUTPUT_ADDR_DIFF_ELT): Use shortened vectors for
thumb-1 mode.
* coff.h (JUMP_TABLES_IN_TEXT_SECTION): Thumb-1 jump tables are now
in the text seciton when PIC or optimizing for size.
* elf.h (JUMP_TABLES_IN_TEXT_SECTION): Likewise.
* lib1funcs.asm ([__ARM_EABI__]): Add an attribute describing stack
preservation properties of code.
(__gnu_thumb1_case_sqi, __gnu_thumb1_case_uqi): New functions.
(__gnu_thumb1_case_shi, __gnu_thumb1_case_uhi): New functions.
(__gnu_thumb1_case_si): New function.
* t-arm (LIB1ASMSRC): Define here.
(LIB1ASMFUNCS): Add some common functions.
* t-arm-elf (LIB1ASMSRC): Delete.
(LIB1ASMFUNCS): Append to existing set.
* t-pe (LIB1ASMSRC, LIB1ASMFUNCS): Likewise.
* t-strongarm-elf (LIB1ASMSRC, LIB1ASMFUNCS): Likewise.
* t-symbian (LIB1ASMFUNCS): Likewise.
* t-vxworks (LIB1ASMSRC, LIB1ASMFUNCS): Likewise.
* t-wince-pe (LIB1ASMSRC, LIB1ASMFUNCS): Likewise.
Uros Bizjak [Sun, 21 Jun 2009 19:10:30 +0000 (21:10 +0200)]
dump-noaddr.x (dump_compare): Use --dumpbase to put dump files in a subdirectory.
* gcc.c-torture/unsorted/dump-noaddr.x (dump_compare): Use --dumpbase
to put dump files in a subdirectory.
* gcc/testsuite/lib/gcc-dg.exp (cleanup-saved-temps): Also remove
".o" temporary files.
Janus Weil [Sun, 21 Jun 2009 19:05:35 +0000 (21:05 +0200)]
re PR fortran/39850 (Too strict checking for procedures as actual argument)
2009-06-21 Janus Weil <janus@gcc.gnu.org>
PR fortran/39850
* interface.c (gfc_compare_interfaces): Take care of implicit typing
when checking the function attribute. Plus another bugfix.
(compare_parameter): Set attr.function and attr.subroutine according
to the usage of a procedure as actual argument.
Uros Bizjak [Sun, 21 Jun 2009 17:38:47 +0000 (19:38 +0200)]
fre-vce-1.c: Cleanup "fre" tree dump.
* gcc.dg/tree-ssa/fre-vce-1.c: Cleanup "fre" tree dump.
* gcc.dg/vect/vect-shift-2.c: Cleanup "vect" tree dump.
* gcc.dg/vect/vect.exp (VECT_SLP_CFLAGS): Initialize with original
DEFAULT_VECTFLAGS.
Arnaud Charlet [Sun, 21 Jun 2009 13:19:57 +0000 (15:19 +0200)]
[multiple changes]
2009-06-21 Thomas Quinot <quinot@adacore.com>
* exp_ch3.adb, exp_prag.adb, exp_util.adb, exp_util.ads, freeze.adb,
sem_ch13.adb, sem_elab.adb (Exp_Prag.Expand_Pragma_Import_Or_Interface):
Factor out code to new subprogram...
(Exp_Util.Find_Init_Call): New shared routine to find the init proc call
for a default initialized variable.
(Freeze.Check_Address_Clause): Do not reset Has_Delayed_Freeze on an
entity that has an associated freeze node.
(Sem_Ch13.Analyze_Attribute_Definition_Clause, case Address):
If there is an init call for the object, defer it to the object freeze
point.
(Check_Elab_Call.Find_Init_Call): Rename to Check_Init_Call, to avoid
name clash with new subprogram introduced in Exp_Util.
* sem_disp.adb (Check_Direct_Call): New routine. Dispatching calls
where the controlling formal is of private class-wide type whose
completion is a synchronized type can be converted into direct calls.
2009-06-21 Vincent Celier <celier@adacore.com>
* gnatcmd.adb (Check_Files): When all sources of the project are to be
indicated to gnatcheck, gnatpp or gnatmetric, always specify the list
of sources using -files=, so that the distinction can be made by the
tool of a call with no source (to display the usage) from a call with
a project file that contains no source.
2009-06-21 Jerome Lambourg <lambourg@adacore.com>
* exp_ch3.adb (Build_Array_Init_Proc): Do not build the init proc in
case of VM convention arrays.
Jakub Jelinek [Sun, 21 Jun 2009 09:38:34 +0000 (11:38 +0200)]
var-tracking.c (struct shared_hash_def, [...]): New types.
* var-tracking.c (struct shared_hash_def, shared_hash): New types.
(dataflow_set): Change vars type from htab_t to shared_hash.
(shared_hash_pool, empty_shared_hash): New variables.
(vars_clear): Removed.
(shared_hash_shared, shared_hash_htab, shared_hash_copy,
shared_hash_find_slot_unshare, shared_hash_find_slot,
shared_hash_find_slot_noinsert, shared_hash_find): New
static inlines.
(shared_hash_unshare, shared_hash_destroy): New functions.
(unshare_variable): Unshare set->vars if shared, use
shared_hash_htab.
(vars_copy): Use htab_traverse_noresize instead of htab_traverse.
(get_init_value, find_src_set_src, dump_dataflow_set,
clobber_variable_part, emit_notes_for_differences): Use
shared_hash_htab.
(dataflow_set_init): Remove second argument, set vars to
empty_shared_hash instead of creating a new htab.
(dataflow_set_clear): Call shared_hash_destroy and set vars
to empty_shared_hash instead of calling vars_clear.
(dataflow_set_copy): Don't call vars_copy, instead just share
the src htab with dst.
(variable_union): Use shared_hash_*, use initially NO_INSERT
lookup if set->vars is shared. Don't keep slot cleared before
calling unshare_variable. Unshare set->vars if needed.
Even ->refcount == 1 vars must be unshared if set->vars is shared
and var needs to be modified.
(variable_canonicalize): New function.
(dataflow_set_union): If dst->vars is empty, just share src->vars
with dst->vars and traverse with variable_canonicalize to canonicalize
and unshare what is needed.
(dataflow_set_different): If old_set and new_set use the same shared
htab, they aren't different. If number of htab elements is different,
htabs are different. Use shared_hash_*.
(dataflow_set_destroy): Call shared_hash_destroy instead of
htab_delete.
(compute_bb_dataflow, emit_notes_in_bb, vt_emit_notes): Don't pass
second argument to dataflow_set_init.
(vt_initialize): Likewise. Initialize shared_hash_pool and
empty_shared_hash, move bb in/out initialization afterwards.
Use variable_htab_free instead of NULL as changed_variables del hook.
(variable_was_changed): Change type of second argument to pointer to
dataflow_set. When inserting var into changed_variables, bump
refcount. Unshare set->vars if set is shared htab and slot needs to
be cleared.
(set_variable_part): Use shared_hash_*, use initially NO_INSERT
lookup if set->vars is shared. Unshare set->vars if needed.
Even ->refcount == 1 vars must be unshared if set->vars is shared
and var needs to be modified. Adjust variable_was_changed caller.
(delete_variable_part): Use shared_hash_*. Even ->refcount == 1
vars must be unshared if set->vars is shared and var needs to be
modified. Adjust variable_was_changed caller.
(emit_note_insn_var_location): Don't pool_free var.
(emit_notes_for_differences_1): Initialize empty_var->refcount to 0
instead of 1.
(vt_finalize): Call htab_delete on empty_shared_hash->htab and
free_alloc_pool on shared_hash_pool.
Ira Rosen [Sun, 21 Jun 2009 07:25:21 +0000 (07:25 +0000)]
re PR testsuite/40475 (gcc.dg/vect/vect-nest-cycle-[12].c)
PR testsuite/40475
* gcc.dg/vect/vect-nest-cycle-1.c: Fail to vectorize on targets
without misalignment support.
* gcc.dg/vect/vect-nest-cycle-2.c: Likewise.
Paolo Carlini [Sat, 20 Jun 2009 22:27:04 +0000 (22:27 +0000)]
re PR libstdc++/40497 ([C++0x] troubles with std::next / std::prev declarations)
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.
Richard Guenther [Sat, 20 Jun 2009 12:03:16 +0000 (12:03 +0000)]
tree-ssa-structalias.c (find_func_aliases): For memset use a constraint from NULL if we memset to zero.
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.
Arnaud Charlet [Sat, 20 Jun 2009 10:32:58 +0000 (12:32 +0200)]
[multiple changes]
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.
* 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.
Richard Guenther [Sat, 20 Jun 2009 09:31:23 +0000 (09:31 +0000)]
re PR tree-optimization/40495 (libgomp.c++/task-4.C)
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.
Eric Botcazou [Fri, 19 Jun 2009 21:33:21 +0000 (21:33 +0000)]
tree.c (substitute_in_expr): Tweak and reformat.
* 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.
Ian Lance Taylor [Fri, 19 Jun 2009 20:55:27 +0000 (20:55 +0000)]
tree-cfg.c (gimple_redirect_edge_and_branch): Change ERROR_MARK to GIMPLE_ERROR_MARK.
./: * tree-cfg.c (gimple_redirect_edge_and_branch): Change ERROR_MARK
to GIMPLE_ERROR_MARK.
* c-typeck.c (build_conditional_expr): Add op1_original_type and
op2_original_type parameters. Warn about using different enum
types.
* c-parser.c (c_parser_conditional_expression): Pass original
types to build_conditional_expr.
* c-tree.h (build_conditional_expr): Update declaration.
testsuite/:
* gcc.dg/Wcxx-compat-18.c: New testcase.
* 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.
Ian Lance Taylor [Fri, 19 Jun 2009 15:29:18 +0000 (15:29 +0000)]
dse.c (struct store_info): Rename bitmap field to bmap.
./: * 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.
Ian Lance Taylor [Fri, 19 Jun 2009 15:25:16 +0000 (15:25 +0000)]
c-decl.c (grokdeclarator): If -Wc++-compat, warn about a global variable with an anonymous type.
./: * 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.
Uros Bizjak [Fri, 19 Jun 2009 14:22:16 +0000 (16:22 +0200)]
re PR testsuite/40491 (Revision 148663 caused extra failures)
* optabs.h (enum optab_index): Add new OTI_significand.
(significand_optab): Define corresponding macro.
* optabs.c (init_optabs): Initialize significand_optab.
* genopinit.c (optabs): Implement significand_optab using
significand?f2 patterns.
* builtins.c (expand_builtin_mathfn): Handle
BUILT_IN_SIGNIFICAND{,F,L}.
(expand_builtin): Expand BUILT_IN_SIGNIFICAND{,F,L} using
expand_builtin_mathfn if flag_unsafe_math_optimizations is set.
* config/i386/i386.md (significandxf2, significand<mode>2): New
expanders to implement significandf, significand and significandl
built-ins as inline x87 intrinsics.
Arnaud Charlet [Fri, 19 Jun 2009 12:23:38 +0000 (14:23 +0200)]
[multiple changes]
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.
Arnaud Charlet [Fri, 19 Jun 2009 10:54:36 +0000 (12:54 +0200)]
[multiple changes]
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.
Arnaud Charlet [Fri, 19 Jun 2009 10:49:31 +0000 (12:49 +0200)]
sem.adb (Walk_Library_Items): Include bodies in the list of units to traverse...
* 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.
Arnaud Charlet [Fri, 19 Jun 2009 10:47:49 +0000 (12:47 +0200)]
[multiple changes]
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.
* 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.
Sergey Rybin [Fri, 19 Jun 2009 10:34:46 +0000 (10:34 +0000)]
gnat_ugn.texi, [...]: Add the documentation for the new gnatmetric option for generating the schema...
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.
Arnaud Charlet [Fri, 19 Jun 2009 10:32:08 +0000 (12:32 +0200)]
[multiple changes]
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.
Janus Weil [Fri, 19 Jun 2009 08:11:21 +0000 (10:11 +0200)]
re PR fortran/40450 ([F03] procedure pointer as actual argument)
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.
Diego Novillo [Thu, 18 Jun 2009 19:48:35 +0000 (15:48 -0400)]
plugins.texi: Document plugin_is_GPL_compatible.
* doc/plugins.texi: Document plugin_is_GPL_compatible.
* plugin.c (str_license): Declare.
(try_init_one_plugin): Assert that the symbol
'plugin_is_GPL_compatible' exists.
* tree-pretty-print.c (maybe_dump_asm_name): New.
(dump_decl_name): Use it.
(PRINT_FUNCTION_NAME): Merge into...
(dump_function_name): ... here. Use maybe_dump_asm_name.
Adam Nemet [Wed, 17 Jun 2009 22:11:47 +0000 (22:11 +0000)]
tree.h (STRIP_NOPS, [...]): Use tree_strip_nop_conversions...
* tree.h (STRIP_NOPS, STRIP_SIGN_NOPS,
STRIP_USELESS_TYPE_CONVERSION): Use tree_strip_nop_conversions,
tree_strip_sign_nop_conversions and
tree_ssa_strip_useless_type_conversions rather than stripping
the operations here.
(tree_strip_nop_conversions, tree_strip_sign_nop_conversions):
Declare them.
* gimple.h (tree_ssa_strip_useless_type_conversions): Declare it.
* tree-ssa.c (tree_ssa_strip_useless_type_conversions): New function.
* tree.c (tree_nop_conversion, tree_sign_nop_conversion,
tree_strip_nop_conversions, tree_strip_sign_nop_conversions): New
functions.
testsuite/
* gcc.c-torture/execute/bitfld-5.c: New test.
Ian Lance Taylor [Wed, 17 Jun 2009 13:21:23 +0000 (13:21 +0000)]
c-pch.c (get_ident): Don't set size of templ array.
./: * 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.