Bob Wilson [Fri, 18 Jan 2008 01:37:53 +0000 (01:37 +0000)]
unwind-dw2-xtensa.h (_Unwind_FrameState): Remove pc field and add signal_ra.
* config/xtensa/unwind-dw2-xtensa.h (_Unwind_FrameState): Remove pc
field and add signal_ra.
* config/xtensa/unwind-dw2-xtensa.c (uw_frame_state_for): Remove
assignments to frame state pc. Move end of stack check after
MD_FALLBACK_FRAME_STATE_FOR.
(uw_update_context_1): Use frame state signal_regs if set, instead
of checking signal_frame flag.
(uw_update_context): Use frame state signal_ra if set.
* config/xtensa/linux.h (MD_UNWIND_SUPPORT): Define.
* config/xtensa/linux-unwind.h: New file.
* match.c (gfc_match_common): Call gfc_free_common_tree () with
gfc_current_ns->common_root and set gfc_current_ns->common_root
to NULL on syntax error.
Seongbae Park [Thu, 17 Jan 2008 20:02:56 +0000 (20:02 +0000)]
re PR middle-end/34400 (bad interaction between DF and SJLJ exceptions)
2008-01-17 Seongbae Park <seongbae.park@gmail.com>
PR rtl-optimization/34400
* df-core.c (df_worklist_dataflow_overeager,
df_worklist_dataflow_doublequeue): New functions.
(df_worklist_dataflow): Two different worklist solvers.
* params.def (PARAM_DF_DOUBLE_QUEUE_THRESHOLD_FACTOR):
New param.
Andreas Krebbel [Thu, 17 Jan 2008 16:18:59 +0000 (16:18 +0000)]
global.c (find_reg): Mark the eh regs as used if necessary.
2008-01-17 Andreas Krebbel <krebbel1@de.ibm.com>
* global.c (find_reg): Mark the eh regs as used if necessary.
* ra-conflict.c (global_conflicts): Set no_eh_reg flag.
* ra.h (struct allocno): no_eh_reg field added. Changed
no_stack_reg type to bitfield.
Paul Thomas [Thu, 17 Jan 2008 07:19:04 +0000 (07:19 +0000)]
re PR fortran/34429 (Fails: character(len=use_associated_const) function foo())
2008-01-17 Paul Thomas <pault@gcc.gnu.org>
PR fortran/34429
PR fortran/34431
PR fortran/34471
* decl.c : Remove gfc_function_kind_locus and
gfc_function_type_locus. Add gfc_matching_function.
(match_char_length): If matching a function and the length
does not match, return MATCH_YES and try again later.
(gfc_match_kind_spec): The same.
(match_char_kind): The same.
(gfc_match_type_spec): The same for numeric and derived types.
(match_prefix): Rename as gfc_match_prefix.
(gfc_match_function_decl): Except for function valued character
lengths, defer applying kind, type and charlen info until the
end of specification block.
gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
parse.c (decode_specification_statement): New function.
(decode_statement): Call it when a function has kind = -1. Set
and reset gfc_matching function, as function statement is being
matched.
(match_deferred_characteristics): Simplify with a single call
to gfc_match_prefix. Do appropriate error handling. In any
case, make sure that kind = -1 is reset or corrected.
(parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
Throw an error if kind = -1 after last specification statement.
parse.h : Prototype for gfc_match_prefix.
2008-01-17 Paul Thomas <pault@gcc.gnu.org>
PR fortran/34429
* gfortran.dg/function_charlen_1.f90: New test.
PR fortran/34431
* gfortran.dg/function_types_1.f90: New test.
* gfortran.dg/function_types_2.f90: New test.
PR fortran/34471
* gfortran.dg/function_kinds_4.f90: New test.
* gfortran.dg/function_kinds_5.f90: New test.
* gfortran.dg/defined_operators_1.f90: Errors now at function
declarations.
* gfortran.dg/private_type_4.f90: The same.
* gfortran.dg/interface_15.f90: The same.
* gfortran.dg/elemental_args_check_2.f90: The same.
* gfortran.dg/auto_internal_assumed.f90: The same.
Richard Guenther [Wed, 16 Jan 2008 21:51:57 +0000 (21:51 +0000)]
re PR middle-end/32628 (bogus integer overflow warning)
2008-01-16 Richard Guenther <rguenther@suse.de>
PR middle-end/32628
* fold-const.c (fold_convert_const_int_from_int): Do not
set overflow if that occured only because of a sign extension
change when converting from/to a sizetype with the same
precision and signedness.
Sebastian Pop [Wed, 16 Jan 2008 16:23:20 +0000 (16:23 +0000)]
gcc.c (LINK_COMMAND_SPEC): Add includes and link options for libgomp when...
* gcc.c (LINK_COMMAND_SPEC): Add includes and link options for
libgomp when compiling with ftree-parallelize-loops.
(GOMP_SELF_SPECS): Add -pthread for ftree-parallelize-loops.
Richard Guenther [Wed, 16 Jan 2008 16:00:17 +0000 (16:00 +0000)]
re PR tree-optimization/34769 (gcc.dg/vect/no-vfa-pr29145.c)
2008-01-16 Richard Guenther <rguenther@suse.de>
PR tree-optimization/34769
* tree-data-ref.c (initialize_matrix_A): Revert fix for PR34458.
* tree.c (int_cst_value): Instead make this function more
permissive in what it accepts as valid input. Document this
function always sign-extends the value.
Jakub Jelinek [Wed, 16 Jan 2008 13:41:13 +0000 (14:41 +0100)]
re PR middle-end/34668 (ICE in find_compatible_field with -combine)
2008-01-16 Jakub Jelinek <jakub@redhat.com>
Richard Guenther <rguenther@suse.de>
PR c/34668
* gimplify.c (fold_indirect_ref_rhs): Rename to ...
(gimple_fold_indirect_ref_rhs): ... this.
(gimple_fold_indirect_ref): New function with foldings
that preserve lvalueness.
(gimplify_modify_expr_rhs): Call gimple_fold_indirect_ref_rhs.
* tree-flow.h (gimple_fold_indirect_ref): Declare.
* tree-inline.c (copy_body_r): Use gimple_fold_indirect_ref
to fold an INDIRECT_REF, fall back to the old use of
fold_indirect_ref_1.
* gcc.dg/pr34668-1.c: New test.
* gcc.dg/pr34668-2.c: Likewise.
Co-Authored-By: Richard Guenther <rguenther@suse.de>
From-SVN: r131572
Steven Bosscher [Wed, 16 Jan 2008 09:13:39 +0000 (09:13 +0000)]
re PR libfortran/34669 (libgfortran doesn't build with -pipe)
2008-01-16 Steven Bosscher <steven@gcc.gnu.org>
PR libfortran/34669
* mk-kinds-h.sh: Compile with -S to avoid calling the assembler,
to avoid piping the -fdump-parse-tree output to the assembler
when configuring with -pipe.
* mk-sik-inc.sh: Likewise.
* mk-srk-inc.sh: Likewise.
Tobias Burnus [Wed, 16 Jan 2008 07:12:00 +0000 (08:12 +0100)]
re PR fortran/34796 (Too strict error checking for assumed-shaped array)
2008-01-16 Tobias Burnus <burnus@net-b.de>
PR fortran/34796
* interface.c (compare_parameter): Allow AS_DEFERRED array
elements and reject attr.pointer array elemenents.
(get_expr_storage_size): Return storage size of elements of
assumed-shape and pointer arrays.
Douglas Gregor [Tue, 15 Jan 2008 18:49:47 +0000 (18:49 +0000)]
re PR c++/34751 (ICE with pointer to member and variadic templates)
2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
PR c++/34751
* pt.c (coerce_template_parameter_pack): When substituting into
the type of a non-type template parameter pack. use the
deduced/substituted arguments.
* parser.c (declarator_can_be_parameter_pack): A pointer-to-member
can be a parameter pack with the ellipsis following it. When we
have an erroneous declaration, allow it to be a parameter pack.
(cp_parser_template_parameter): Complain about default
arguments on non-type template parameter packs, and parse them
using the new cp_parser_default_argument.
(cp_parser_parameter_declaration): Complain about parameter packs
with default arguments. Move parsing of default arguments into a
new function, cp_parser_default_argument.
(cp_parser_default_argument): New; extracted from
cp_parser_parameter_declaration.
Douglas Gregor [Tue, 15 Jan 2008 18:08:00 +0000 (18:08 +0000)]
re PR c++/34051 (ICE in dependent_type_p with variadic templates)
2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
PR c++/34051
PR c++/34055
PR c++/34102
PR c++/34103
* typeck.c (check_return_expr): If there are bare parameter packs
in the return value, set it to error_mark_node.
* tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
* pt.c (find_parameter_packs_r): Look at the type of
IDENTIFIER_NODEs (e.g., for user-defined conversions).
(check_for_bare_parameter_packs): Flip the result: now returns
TRUE when there were bare parameter packs, FALSE otherwise.
(push_template_decl_real): Deal with flipped result of
check_for_bare_parameter_packs.
* semantics.c (finish_cond): If there are bare parameter packs in
the conditional, set it to error_mark_node.
(finish_expr_stmt): If there are bare parameter packs in the
expression, set it to error_mark_node.
(finish_for_expr): Ditto.
(finish_switch_cond): If there are bare parameter packs in
the conditional, set it to error_mark_node.
(finish_mem_initializers): If there are bare parameter packs in
the member initializer, set it to error_mark_node.
(finish_member_declaration): Check the attributes of the
declaration for bare parameter packs, and remove the attributes if
any have bare parameter packs.
* parser.c (cp_parser_using_declaration): Check the using
declaration for bare parameter packs.
(cp_parser_base_clause): If there are bare parameter packs in a
base specifier, don't add it to the chain.
Douglas Gregor [Tue, 15 Jan 2008 17:59:44 +0000 (17:59 +0000)]
re PR c++/34314 (ICE on invalid code (with variadic templates): tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in template_class_depth)
2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
PR c++/34314
* error.c (dump_simple_decl): Display ellipsis for template
non-type parameter packs.
(dump_decl): Display ellipsis for template type parameter packs.
(dump_template_decl): Display ellipsis for template template
parameter packs.
* pt.c (redeclare_class_template): When redeclaring a class
template, check for collisions between template parameters and
template parameter packs.
2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
PR c++/34314
* g++.dg/cpp0x/vt-34314.C: New.
* g++.dg/cpp0x/variadic79.C: Fix the error message to reflect
reality (the error message was wrong previously).
Douglas Gregor [Tue, 15 Jan 2008 16:09:28 +0000 (16:09 +0000)]
re PR c++/33964 (internal compiler error: in dependent_type_p, at cp/pt.c:15319 (vararg templates))
2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
PR c++/33964
* pt.c (process_partial_specialization): Don't mark template
parameters that occur in non-deduced contexts.
(struct pair_fn_data): Add include_nondeduced_p.
(for_each_template_parm_r): Only visit non-deduced contexts if
include_nondeduced_p is set.
(for_each_template_parm): Added parameter include_nondeduced_p,
which states whether template parameters found in non-deduced
contexts should be visited.
(uses_template_parms): Visit all template parameters, even those
in non-deduced contexts.
Douglas Gregor [Tue, 15 Jan 2008 16:06:48 +0000 (16:06 +0000)]
re PR c++/34052 (Trouble with variadic templates as template-template parameter)
2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
PR c++/34052
* pt.c (check_default_tmpl_args): Check for parameter packs that
aren't at the end of a primary template.
(push_template_decl_real): Remove check for parameter packs that
aren't at the end of a primary template; that now happens in
check_default_tmpl_args.
* semantics.c (finish_template_template_parm): Use
check_default_tmpl_args to check for errors in the template
parameter list.
Eric Botcazou [Mon, 14 Jan 2008 19:32:10 +0000 (19:32 +0000)]
decl.c (gnat_to_gnu_entity): Process renamings before converting the expression to the type of the object.
* decl.c (gnat_to_gnu_entity) <object>: Process renamings
before converting the expression to the type of the object.
* trans.c (maybe_stabilize_reference) <CONSTRUCTOR>: New case.
Stabilize constructors for special wrapping types.
Eric Botcazou [Mon, 14 Jan 2008 12:16:58 +0000 (12:16 +0000)]
re PR rtl-optimization/31944 (Endless loop while building a 64-bit 2.6.20 kernel)
PR rtl-optimization/31944
* cse.c (remove_pseudo_from_table): New function.
(merge_equiv_classes): Use above function to remove pseudo-registers.
(invalidate): Likewise.
Tobias Burnus [Sun, 13 Jan 2008 21:35:33 +0000 (22:35 +0100)]
re PR fortran/34665 (Cannot pass scalar to array argument 'a')
2008-01-13 Tobias Burnus <burnus@net-b.de>
PR fortran/34665
* resolve.c (resolve_actual_arglist): For expressions,
also check for assume-sized arrays.
* interface.c (compare_parameter): Move F2003 character checks
here, print error messages here, reject elements of
assumed-shape array as argument to dummy arrays.
(compare_actual_formal): Update for the changes above.
Eric Botcazou [Sun, 13 Jan 2008 21:00:39 +0000 (21:00 +0000)]
* trans.c (call_to_gnu):Invoke the addressable_p predicate only
when necessary. Merge some conditional statements. Update comments.
Rename unchecked_convert_p local variable to suppress_type_conversion.
Do not suppress conversions in the In case.
(addressable_p) <VIEW_CONVERT_EXPR>: Do not take alignment issues
into account on non strict-alignment platforms.
Jan Hubicka [Sun, 13 Jan 2008 11:18:08 +0000 (12:18 +0100)]
re PR middle-end/32135 (bogus array-ref fold triggering array overflow warning)
PR middle-end/32135
* tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): Do not construct
references above array bounds. This might trigger bounds checks for
pointers to arrays.
Doug Kwan [Sun, 13 Jan 2008 00:22:38 +0000 (00:22 +0000)]
c-decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers instead of OPT_Wreturn_type in...
ChangeLog:
2008-01-12 Doug Kwan <dougkwan@google.com>
* c-decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
instead of OPT_Wreturn_type in warning due to ignored return type
qualifiers.
* c-opt.c (c_common_post_option): Add -Wignored-qualifiers to
options included in -Wextra.
* c.opt: New option -Wignored_qualifiers.
* doc/invoke.texi (Warning Options, -Wextra): Add new option
-Wignore_qualifiers.
(-Wignored-qualifiers): Document.
(-Wreturn-type): Remove description of functionality now handled
by -Wignored-qualifiers.
cp/ChangeLog:
2008-01-12 Doug Kwan <dougkwan@google.com>
* decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
instead of OPT_Wreturn_type in warning due to ignored return type
qualifiers.
* pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
instead of OPT_Wreturn_type in warning due to ignored return type
qualifiers.
testsuite/ChangeLog:
2008-01-12 Doug Kwan <dougkwan@google.com>
* gcc.dg/qual-return-1.c: Add -Wignored-qualifiers.
* g++.dg/warn/Wreturn-type-4.C: Replace -Wreturn-type by
-Wignored-qualifiers.
Eric Botcazou [Sun, 13 Jan 2008 00:17:45 +0000 (00:17 +0000)]
utils.c (aggregate_type_contains_array_p): New predicate.
* utils.c (aggregate_type_contains_array_p): New predicate.
(create_field_decl): In a packed record, force byte alignment
for fields without specified position that contain an array.
Anatoly Sokolov [Fri, 11 Jan 2008 20:33:50 +0000 (23:33 +0300)]
avr.c (expand_prologue, [...]): Don't save/restore frame pointer register and don't use 'call-prologues' ...
* config/avr/avr.c (expand_prologue, expand_epilogue): Don't
save/restore frame pointer register and don't use 'call-prologues'
optimization in function with "OS_task" attribute.
PR libfortran/34670
* all_bounds_1.f90: New test case.
* maxloc_bounds_1.f90: New test case.
* maxloc_bounds_2.f90: New test case.
* maxloc_bounds_3.f90: New test case.
* maxloc_bounds_4.f90: New test case.
* maxloc_bounds_5.f90: New test case.
* maxloc_bounds_6.f90: New test case.
* maxloc_bounds_7.f90: New test case.
* maxloc_bounds_8.f90: New test case.