* modulo-sched.c (sms_order_nodes, permute_partial_schedule,
generate_prolog_epilog, duplicate_insns_of_cycles): Fix prototypes.
(calculate_order_params, sms_order_nodes): New parameter pmax_asap.
Save calculated max_asap in it.
(sms_schedule): Calculate maxii using max_asap.
Samuel Tardieu [Wed, 7 Nov 2007 14:51:05 +0000 (14:51 +0000)]
tracebak.c (i386 alternative): Remove useless comparaison which is always false...
gcc/ada/
* tracebak.c (i386 alternative): Remove useless comparaison
which is always false; LOWEST_ADDRESS is 0 and is never greater
than an unsigned integer.
Samuel Tardieu [Wed, 7 Nov 2007 14:49:46 +0000 (14:49 +0000)]
a-tasatt.adb: Use 'Access instead of 'Unchecked_Access when applicable.
gcc/ada/
* a-tasatt.adb: Use 'Access instead of 'Unchecked_Access when
applicable. Local lifetime is the one of the package.
(Set_Value): W is allocated on the heap.
* g-socket.adb: Use 'Access instead of 'Unchecked_Access when
applicable.
(Get_Socket_Option): Optlen formal of C_Getsockopt is of an anonymous
access type.
(Receive_Socket): Fromlen formal of C_Recvfrom is of an anonymous
access type.
* s-taasde.adb: Use 'Access instead of 'Unchecked_Access when
applicable.
(elaboration code): Timer_Queue lifetime is the one of the
package.
Paolo Carlini [Wed, 7 Nov 2007 00:36:33 +0000 (00:36 +0000)]
vector.tcc (vector<>::_M_insert_aux<>(iterator, _Args&&...)): In C++0x mode do not use temporary copies.
2007-11-06 Paolo Carlini <pcarlini@suse.de>
* include/bits/vector.tcc (vector<>::_M_insert_aux<>(iterator,
_Args&&...)): In C++0x mode do not use temporary copies.
(insert(iterator, const value_type&)): Copy to a temporary
when not reallocating.
* include/bits/vector.tcc (insert(iterator, value_type&&)):
Minor tweaks in C++0x mode.
PR c++/33977
PR c++/33886
* c-common.c (c_build_qualified_type): Moved to c-typeck.c.
(complete_array_type): Set canonical type appropriately.
* c-typeck.c (c_build_qualified_type): Moved from c-common.c. The
C and C++ front ends now have different versions of this function,
because the C++ version needs to maintain canonical types here.
Douglas Gregor [Tue, 6 Nov 2007 14:37:56 +0000 (14:37 +0000)]
re PR c++/31439 (ICE with variadic template and broken specialization)
2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
PR c++/31439
PR c++/32114
PR c++/32115
PR c++/32125
PR c++/32126
PR c++/32127
PR c++/32128
PR c++/32253
PR c++/32566
* typeck.c (check_return_expr): Pass address of retval to
check_for_bare_parameter_packs.
* class.c (build_base_field): Tolerate bases that have no layout
due to errors.
(end_of_base): Ditto.
* tree.c (canonical_type_variant): Be careful with
ERROR_MARK_NODE.
* cp-tree.h (check_for_bare_parameter_packs): Now accepts a
tree*.
* pt.c (find_parameter_pack_data): Add set_packs_to_error field,
which states whether parameter packs should be replaced with
ERROR_MARK_NODE.
(find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
possible. If set_packs_to_error is set true, replace the parameter
pack with ERROR_MARK_NODE. Manage our own pointer sets.
(uses_parameter_packs): Don't set parameter packs to
ERROR_MARK_NODE.
(check_for_bare_parameter_packs): Now takes a pointer to a tree,
which may be modified (if it is a parameter pack). Instructs
find_parameter_packs_r to replace parameter packs with
ERROR_MARK_NODE (so that they won't cause errors later on).
(process_template_parm): Pass pointer to
check_for_bare_parameter_packs.
(process_partial_specialization): Replace pack expansions before
the end of the template argument list with ERROR_MARK_NODE.
(push_template_decl_real): Pass pointer to
check_for_bare_parameter_packs. Replace parameter packs not at the
end of the template parameter list with ERROR_MARK_NODE.
(convert_template_argument): Be more careful about using DECL_NAME
on only declarations.
(unify): Can't unify against ERROR_MARK_NODE.
* semantics.c (finish_cond): Pass pointer to
check_for_bare_parameter_packs.
(finish_expr_stmt): Ditto.
(finish_for_expr): Ditto.
(finish_switch_cond): Pass pointer to
check_for_bare_parameter_packs, and call it before we put the
condition into the statement.
(finish_mem_initializers): Pass pointer to
check_for_bare_parameter_packs.
(finish_member_declaration): Ditto.
* parser.c (cp_parser_base_clause): Ditto.
Jakub Jelinek [Tue, 6 Nov 2007 08:33:25 +0000 (09:33 +0100)]
re PR target/33168 (GCC Boot failure, building libstc++)
PR target/33168
* decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
with the final TREE_READONLY flag in place. processing_template_decl
is known to be 0 in this part of function.
Jakub Jelinek [Tue, 6 Nov 2007 08:29:48 +0000 (09:29 +0100)]
re PR tree-optimization/33458 (ICE "PHI def is not a GIMPLE value")
PR tree-optimization/33458
* tree-inline.c (copy_phis_for_bb): If PHI arg substitution creates
!is_gimple_val PHI argument, gimplify it and insert it on edge.
Jakub Jelinek [Tue, 6 Nov 2007 08:28:37 +0000 (09:28 +0100)]
re PR tree-optimization/33993 (ICE: verify_stmts failed (invalid reference prefix))
PR tree-optimization/33993
* tree-vect-transform.c (vect_get_constant_vectors): Use build_vector
rather than build_constructor_from_list if all list values are
constants.
(get_initial_def_for_induction): Use build_vector instead of
build_constructor_from_list.
Jakub Jelinek [Tue, 6 Nov 2007 08:26:50 +0000 (09:26 +0100)]
re PR c++/33894 (pragma omp atomic broken)
PR c++/33894
* cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
* pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
* semantics.c (finish_omp_atomic): Revert most of the
2007-02-05 changes, just keep the new representation of
OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
Mark Mitchell [Tue, 6 Nov 2007 00:30:52 +0000 (00:30 +0000)]
re PR target/33579 (INIT_PRIORITY is broken)
PR target/33579
* tree.h (DECL_INIT_PRIORITY): Do not require
DECL_HAS_INIT_PRIORITY_P.
(DECL_FINI_PRIORITY): Likewise.
* tree.c (decl_init_priority_lookup): Remove assert.
(decl_fini_priority_insert): Likewise.
* cgraphunit.c (static_ctors): Make it a VEC.
(static_dtors): Likewise.
(record_cdtor_fn): Adjust accordingly.
(build_cdtor): Generate multiple functions for each initialization
priority.
(compare_ctor): New function.
(compare_dtor): Likewise.
(cgraph_build_cdtor_fns): Sort the functions by priority before
calling build_cdtor.
(cgraph_build_static_cdtor): Put the priority in the function's
name.
Nick Clifton [Mon, 5 Nov 2007 15:42:30 +0000 (15:42 +0000)]
re PR tree-optimization/32540 (Exponential time behavior in PRE)
2007-11-05 Nick Clifton <nickc@redhat.com>
Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/32540
PR tree-optimization/33922
* doc/invoke.texi: Document PARAM_MAX_PARTIAL_ANTIC_LENGTH.
* tree-ssa-pre.c: Include params.h.
(compute_partial_antic_aux): Use PARAM_MAX_PARTIAL_ANTIC_LENGTH
to limit the maximum length of the PA set for a given block.
* Makefile.in: Add a dependency upon params.h for tree-ssa-pre.c
* params.def (PARAM_MAX_PARTIAL_ANTIC_LENGTH): New parameter.
Nathan Sidwell [Mon, 5 Nov 2007 11:41:40 +0000 (11:41 +0000)]
libgcc2.c (__fixunstfDI, [...]): Make return type unsigned.
* libgcc2.c (__fixunstfDI, __fixunsxfDI, __fixunsdfDI,
__fixunssfDI): Make return type unsigned.
* libgcc2.h (__fixunstfDI, __fixunsxfDI, __fixunsdfDI,
__fixunssfDI): Make return type unsigned.
typeck.c (build_binary_op): Use pedwarn instead of error for consistency.
2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
cp/
* typeck.c (build_binary_op): Use pedwarn instead of error for
consistency.
testsuite/
* g++dg/warn/pointer-integer-comparison.C: New.
Jakub Jelinek [Mon, 5 Nov 2007 08:44:23 +0000 (09:44 +0100)]
re PR tree-optimization/33856 (Segfault in create_data_ref/compute_data_dependences_for_loop)
PR tree-optimization/33856
* tree-data-ref.c (get_references_in_stmt): Don't add
REFERENCE_CLASS_P trees to references vector if get_base_address
returns NULL on them.
Jakub Jelinek [Mon, 5 Nov 2007 08:18:03 +0000 (09:18 +0100)]
re PR c++/33836 (ICE with invalid use of &&)
PR c++/33836
* parser.c (cp_parser_unary_expression): For &&label call
cp_parser_non_integral_constant_expression and return error_mark_node
if it returned true.
re PR fortran/10220 (attribute DW_AT_calling_convention not correct for fortran)
PR fortran/10220
* dwarf2out.c (add_calling_convention_attribute): Change
second argument. Set calling convention to DW_CC_program for
Fortran main program.
(gen_subprogram_die): Adjust to new prototype for
add_calling_convention_attribute.
Paolo Carlini [Sat, 3 Nov 2007 23:27:55 +0000 (23:27 +0000)]
random (variate_generator<>::min, [...]): Return non-trivial values when _Engine_result_type is a floating point type and...
2007-11-03 Paolo Carlini <pcarlini@suse.de>
Kai-Uwe Bux <bux@kubux.net>
* include/tr1_impl/random (variate_generator<>::min, max,
operator()()): Return non-trivial values when _Engine_result_type
is a floating point type and result_type is an integer type.
re PR c/29062 (unclear diagnostic for declaration after label)
2007-11-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c/29062
* c-parser.c (c_parser_statement_after_labels): Error if a
declaration is parsed after a label.
testsuite/
* gcc.dg/20031223-1.c: Adjust error output.
* gcc.dg/parse-decl-after-label.c: New.
* gfortran.h: Shorten comment.
* trans-types.c (gfc_get_function_type): Allow argument to have
flavor FL_PROGRAM.
* trans-decl.c (gfc_sym_mangled_function_id): Mangle main program
name into MAIN__.
(build_function_decl): Fix comment.
* parse.c (main_program_symbol): Give the main program its proper
name, if any. Set its flavor to FL_PROGRAM.
(gfc_parse_file): Likewise.
Jakub Jelinek [Fri, 2 Nov 2007 21:37:35 +0000 (22:37 +0100)]
re PR c++/33516 (Rejects typedef qualified name-lookup)
PR c++/33516
* parser.c (cp_parser_nested_name_specifier_opt): Use
TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
typedef of currently open class.
Jakub Jelinek [Fri, 2 Nov 2007 20:38:11 +0000 (21:38 +0100)]
ia64.c (struct reg_write_state): Change into unsigned short bitfields rather than unsigned int...
* config/ia64/ia64.c (struct reg_write_state): Change into
unsigned short bitfields rather than unsigned int, decrease
first_pred to just 10 bits.
(rws_insn): Change into a bitmap or if not ENABLE_CHECKING
into two char array.
(rws_insn_set, rws_insn_test): New functions.
(in_safe_group_barrier): New variable.
(rws_update): Remove first argument, always set rws_sum array.
(rws_access_regno): Use rws_insn_set macro. Only call rws_update
or update rws_sum if !in_safe_group_barrier, adjust rws_update
args.
(rtx_needs_barrier): Use rws_insn_test macro.
(safe_group_barrier_needed): Don't save/restore rws_sum array,
instead set/clear in_safe_group_barrier flag.
Janis Johnson [Fri, 2 Nov 2007 17:54:12 +0000 (17:54 +0000)]
re PR testsuite/32076 ("gcc.dg/tree-ssa/pr17141-1.c scan-tree-dump locp.*->i =" is the same name twice)
PR testsuite/32076
* lib/scandump.exp (dump-suffix): New.
(scan-dump, scan-dump-times, scan-dump-dem, scan-dump-dem-not):
Include dump suffix in pass/fail messages, put regexp in quotes.
Bob Wilson [Fri, 2 Nov 2007 16:06:41 +0000 (16:06 +0000)]
xtensa.c (xtensa_expand_prologue): Put a REG_FRAME_RELATED_EXPR note on the last insn that sets up the stack...
* config/xtensa/xtensa.c (xtensa_expand_prologue): Put a
REG_FRAME_RELATED_EXPR note on the last insn that sets up the stack
pointer or frame pointer.
* config/xtensa/xtensa.h (DWARF_UNWIND_INFO): Delete.
(MUST_USE_SJLJ_EXCEPTIONS): Define.
(DWARF2_UNWIND_INFO): Define.
(INCOMING_RETURN_ADDR_RTX): Define.
(DWARF_FRAME_RETURN_COLUMN): Define.
re PR libstdc++/33892 ([libstdc++ v3 parallel mode] Parallel mode algorithms use critical sections with global scope)
2007-11-02 Johannes Singler <singler@ira.uka.de>
PR libstdc++/33892
* include/parallel/workstealing.h: Replaced pragma by function
call lock.
* include/parallel/search.h: Same
* include/parallel/partition.h: Same
* include/parallel/find.h: Same
Diego Novillo [Fri, 2 Nov 2007 11:12:30 +0000 (07:12 -0400)]
langhooks.h (struct lang_hooks_for_callgraph): Remove third argument from function pointer ANALYZE_EXPR.
* langhooks.h (struct lang_hooks_for_callgraph): Remove third
argument from function pointer ANALYZE_EXPR. Update all
users.
* cgraph.c (debug_cgraph_node): New.
(debug_cgraph): New.
Jason Merrill [Fri, 2 Nov 2007 05:50:06 +0000 (01:50 -0400)]
re PR c++/30897 (ICE with default argument in template template parameter)
PR c++/30897
* pt.c (push_template_decl_real): Set DECL_CONTEXT on template
template parms.
(lookup_template_class): Use it to get the outer template args
for instantiating one.
PR c++/29236
* pt.c (reduce_template_parm_level): tsubst the parameters
of a template template parm.
Jakub Jelinek [Thu, 1 Nov 2007 22:54:39 +0000 (23:54 +0100)]
re PR c++/32384 (Pseudo-dtor in template class rejected)
PR c++/32384
* parser.c (cp_parser_postfix_dot_deref_expression): If
POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
first and if that succeeds and type is SCALAR_TYPE_P, create
PSEUDO_DTOR_EXPR.
* g++.dg/template/pseudodtor1.C: New test.
* g++.dg/template/pseudodtor2.C: New test.
Jakub Jelinek [Thu, 1 Nov 2007 22:50:32 +0000 (23:50 +0100)]
re PR c++/32260 (too many warning: dereferencing type-punned pointer will break strict-aliasing rules)
PR c++/32260
* rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
(typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
as for std::type_info.
Eric Botcazou [Thu, 1 Nov 2007 20:48:21 +0000 (21:48 +0100)]
optabs.c (prepare_cmp_insn): Merge a couple of conditional blocks.
* optabs.c (prepare_cmp_insn): Merge a couple of conditional blocks.
* sched-rgn.c (compute_trg_info): Zero 'el' local variable.
* tree-if-conv.c (process_phi_nodes): Zero 'cond' local variable.
Tom Tromey [Thu, 1 Nov 2007 19:37:32 +0000 (19:37 +0000)]
Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
* Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
(java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h.
(java/jcf-io.o): Depend on zipfile.h.
Janis Johnson [Thu, 1 Nov 2007 16:34:48 +0000 (16:34 +0000)]
invoke.texi (Optimize Options): Under -fcse-follow-jumps, show that CSE means common subexpression elimination.
* doc/invoke.texi (Optimize Options): Under -fcse-follow-jumps,
show that CSE means common subexpression elimination. Change wording
for -fsee and define LCM. Remove capitalization of optimizations
for -ftree-reassoc, -ftree-pre, and -ftree-fre.