Nicola Pero [Wed, 17 Nov 2010 01:01:49 +0000 (01:01 +0000)]
In gcc/objc/: 2010-11-17 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-17 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-act.c (lookup_method_in_protocol_list): Search methods in
PROTOCOL_OPTIONAL_CLS_METHODS / PROTOCOL_OPTIONAL_NST_METHODS if
they are not found in PROTOCOL_CLS_METHODS / PROTOCOL_NST_METHODS.
In gcc/testsuite/:
2010-11-17 Nicola Pero <nicola.pero@meta-innovation.com>
* config/spu/spu.md (fma<VSF>4): Rename from fma_<VSF>.
(fnma<VSF>4): Rename from fnms_<VSF>.
(fms<VSF>4): Rename from fms_<VSF>.
(fma<VDF>4): Rename from fma_<VDF>.
(fms<VDF>4): Rename from fms_<VDF>.
(nfma<VDF>4): Rename from fnma_<VDF>.
(nfms<VDF>4): Rename from fnms_<VDF>.
(fnma<VDF>4, fnms<VDF>4): New expanders.
(floatunsdisf2): Update for the renames.
(*div<VSF>3_fast, *div<VSF>3_adjusted): Likewise.
* config/spu/spu-builtins.def: Update CODE_FOR_* for the renames.
re PR target/46470 ("add $0x8,%rsp" no longer optimized to pop)
PR target/46470
* recog.c (peep2_attempt): Convert frame-related info when possible.
(peep2_fill_buffer): Allow frame-related insns into the buffer.
(peephole2_optimize): Allow peep2_attempt to fail.
Eric Botcazou [Tue, 16 Nov 2010 22:13:52 +0000 (22:13 +0000)]
re PR rtl-optimization/46315 (-O2 -fno-strict-overflow causes wrong code generation)
PR rtl-optimization/46315
* rtl.h (remove_reg_equal_equiv_notes_for_regno): Declare.
* rtlanal.c (remove_reg_equal_equiv_notes_for_regno): New function
extracted from...
* dce.c (delete_corresponding_reg_eq_notes): ...here. Rename into...
(remove_reg_equal_equiv_notes_for_defs): ...this.
(delete_unmarked_insns): Adjust to above renaming.
* ifcvt.c (dead_or_predicable): Remove REG_EQUAL and REG_EQUIV notes
referring to registers set in the insns being moved, if any.
* df-core.c (df_ref_dump): New function extracted from...
(df_refs_chain_dump): ...here. Call it.
(df_regs_chain_dump): Likewise.
* df-problems.c (df_chain_dump): Print 'e' for uses in notes.
* df-scan.c (df_scan_start_dump): Likewise. Fix long line.
PR fortran/32049
* gfortran.dg/quad_1.f90: New.
* lib/gcc-defs.exp (gcc-set-multilib-library-path): Use also
compiler arguments.
* lib/gfortran.exp (gfortran_link_flags): Add libquadmath to
library search path; call gcc-set-multilib-library-path with
arguments such that libgfortran.spec is found.
(gfortran_init): Add path for libgfortran.spec to
GFORTRAN_UNDER_TEST.
Jan Hubicka [Tue, 16 Nov 2010 18:15:17 +0000 (19:15 +0100)]
cgraph.h (+varpool_can_remove_if_no_refs): Move here from ......
* cgraph.h (+varpool_can_remove_if_no_refs): Move here from ...;
when !flag_toplevel_reorder do not remove unless variable is
COMDAT or ARTIFICIAL.
* ipa.c (varpool_can_remove_if_no_refs): ... here.
(cgraph_remove_unreachable_nodes): Only analyzed nodes needs to stay.
* cgraphunit.c (cgraph_analyze_functions): Dump varpool, too.
* varpool.c (decide_is_variable_needed): Do not handle visibility issues.
(varpool_finalize_decl): Likewise.
(varpool_remove_unreferenced_decls): Use varpool_mark_needed_node; update
outdated comment on DECL_RTL_SET_P check.
Nick Clifton [Tue, 16 Nov 2010 16:51:14 +0000 (16:51 +0000)]
v850.md (maddsf4): Rename to fmasf4 and use fma rtx_code.
* config/v850/v850.md (maddsf4): Rename to fmasf4 and use fma
rtx_code.
(msubsf4): Rename to fmssf4, and use fma.
(nmaddsf4): Rename to fnmasf4 and use fma.
(nmsubsf4): Rename to fnmssf4 and use fma.
Nathan Froyd [Tue, 16 Nov 2010 14:18:02 +0000 (14:18 +0000)]
gcc.c (char_p): Define.
* gcc.c (char_p): Define. Define a VEC of it.
(n_linker_options, n_assembler_options, n_preprocessor_options):
Delete.
(linker_options, assembler_options, preprocessor_options): Convert
to a VEC.
(add_preprocessor_option): Adjust.
(add_assembler_option): Adjust.
(add_linker_option): Adjust.
(do_specs_vec): New function.
(do_spec_1): Call it. Adjust for new types.
* gcc.dg/torture/builtin-math-2.c: Split out fma tests...
* gcc.dg/torture/builtin-math-8.c: ... here. New file.
Use builtin_constant_p rather than scanning for builtin name.
Joseph Myers [Tue, 16 Nov 2010 01:01:57 +0000 (01:01 +0000)]
gcc.c: Include "vec.h".
* gcc.c: Include "vec.h".
(argbuf): Make into a VEC.
(argbuf_length, argbuf_index): Remove.
(alloc_args, clear_args, store_arg, execute, insert_wrapper,
do_spec, do_self_spec, do_spec_1, eval_spec_function, main,
compare_debug_dump_opt_spec_function: Use VEC interfaces on
argbuf.
* Makefile.in (GCC_OBJS): Add vec.o and ggc-none.o.
(gcc.o): Depend on $(VEC_H).
Nicola Pero [Mon, 15 Nov 2010 23:12:49 +0000 (23:12 +0000)]
In gcc/objc/: 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-act.c (objc_build_setter_call): New.
(objc_maybe_build_modify_expr): Rewritten to build a compound
statement.
(objc_build_incr_expr_for_property_ref): Updated calls to
objc_maybe_build_modify_expr to call objc_build_setter_call
instead. Use build_modify_expr () instead of build2 (MODIFY_EXPR,
...). Use convert () instead of build1 (NOP_EXPR, ...). Use
TREE_NO_WARNING on the final compound statement to silence C++
warnings.
In gcc/testsuite/:
2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/property/dotsyntax-18.m: New.
* objc.dg/property/dotsyntax-19.m: New.
* objc.dg/property/dotsyntax-20.m: New.
* obj-c++.dg/property/dotsyntax-18.mm: New.
* obj-c++.dg/property/dotsyntax-19.mm: New.
* obj-c++.dg/property/dotsyntax-20.mm: New.
* objc.dg/property/dotsyntax-4.m: Removed some unused variables and code.
* objc.dg/property/dotsyntax-6.m: Same change.
* objc.dg/property/dotsyntax-16.m: Same change.
* objc.dg/property/dotsyntax-17.m: Same change.
* obj-c++.dg/property/dotsyntax-4.mm: Same change.
* obj-c++.dg/property/dotsyntax-6.mm: Same change.
* obj-c++.dg/property/dotsyntax-16.mm: Same change.
* obj-c++.dg/property/dotsyntax-17.mm: Same change.
* objc.dg/property/at-property-22.m: Added missing casts.
* obj-c++.dg/property/at-property-22.mm: Same change.
Ian Lance Taylor [Mon, 15 Nov 2010 21:38:40 +0000 (21:38 +0000)]
godump.c: New file.
gcc/:
* godump.c: New file.
* common.opt (fdump-go-spec=): New option.
* tree.h: Add comments for TYPE_SYMTAB_ADDRESS and friends.
(TYPE_SYMTAB_IS_ADDRESS, TYPE_SYMTAB_IS_POINTER): Define.
(TYPE_SYMTAB_IS_DIE): Define.
(struct tree_type): Change GTY for symtab field to use
TYPE_SYMTAB_IS_ADDRESS and friends and to use a debug_hooks field
to pick the union field.
* debug.h (struct gcc_debug_hooks): Add tree_type_symtab_field.
(dump_go_spec_init): Declare.
* toplev.c (process_options): Handle flag_dump_go_spec.
* debug.c: Include "tree.h".
(do_nothing_debug_hooks): Set tree_type_symtab_field.
* dwarf2out.c (dwarf2_debug_hooks): Likewise.
* dbxout.c (dbx_debug_hooks): Likewise.
(xcoff_debug_hooks): Likewise.
* vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
* sdbout.c (sdb_debug_hooks): Likewise. Do not define if
SDB_DEBUGGING_INFO is not defined.
* doc/invoke.texi (Option Summary): Mention -fdump-go-spec.
(Overall Options): Document -fdump-go-spec.
* Makefile.in (OBJS-common): Add godump.o.
(debug.o): Add dependency on $(TREE_H).
(godump.o): New target.
(GTFILES): Add $(srcdir)/godump.c.
gcc/c-family/:
* c-lex.c (init_c_lex): Set macro debug callbacks if
flag_dump_go_spec is set.
Jakub Jelinek [Mon, 15 Nov 2010 20:09:24 +0000 (21:09 +0100)]
re PR debug/46095 (ICE: in dwarf2out_frame_debug_expr, at dwarf2out.c:2341 with -fstack-protector)
PR debug/46095
* config/i386/i386.c (pro_epilogue_adjust_stack): Instead of
marking r11 set RTX_FRAME_RELATED_P if offset is too large for
style < 0, add REG_FRAME_RELATED_EXPR.
Jakub Jelinek [Mon, 15 Nov 2010 20:07:39 +0000 (21:07 +0100)]
re PR debug/46387 (ICE in add_stores, at var-tracking.c:5415)
PR debug/46387
* rtl.h (vt_equate_reg_base_value): New prototype.
* alias.c (vt_equate_reg_base_value): New function.
* var-tracking.c (vt_init_cfa_base): Use it.
Nicola Pero [Mon, 15 Nov 2010 18:46:42 +0000 (18:46 +0000)]
In gcc/: 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
* c-typeck.c (build_unary_op): Use
objc_build_incr_expr_for_property_ref to build the pre/post
increment/decrement of an Objective-C property ref, and skip the
lvalue_or_else check in that case.
In gcc/c-family/:
2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/cp/:
2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
* typeck.c (cp_build_unary_op): Use
objc_build_incr_expr_for_property_ref to build the pre/post
increment/decrement of an Objective-C property ref.
In gcc/objc/:
2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-act.c (objc_build_incr_expr_for_property_ref): New.
(objc_create_temporary_var): Moved it towards the beginning of the
file so that objc_build_incr_expr_for_property_ref can use it.
In gcc/testsuite/:
2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/property/dotsyntax-16.m: New.
* objc.dg/property/dotsyntax-17.m: New.
* obj-c++.dg/property/dotsyntax-16.mm: New.
* obj-c++.dg/property/dotsyntax-17.mm: New.
* objc.dg/property/at-property-10.m: Uncommented using 'x++'
syntax with properties, which now works.
* obj-c++.dg/property/at-property-10.mm: Same change.
Joern Rennecke [Mon, 15 Nov 2010 09:44:16 +0000 (09:44 +0000)]
Makefile.in (tm.texi): Replace with rule for: ($(srcdir)/doc/tm.texi).
* Makefile.in (tm.texi): Replace with rule for:
($(srcdir)/doc/tm.texi).
(s-tm-texi): Depend on $(srcdir)/doc/../doc/tm.texi instead of on
$(srcdir)/doc/tm.texi .
(TEXI_GCCINT_FILES): Depend on $(srcdir)/doc/tm.texi instead of on
tm.texi .
Paolo Bonzini [Sun, 14 Nov 2010 13:10:41 +0000 (13:10 +0000)]
re PR c/46462 (Revision 166700 caused new C test failures)
2010-11-13 Paolo Bonzini <bonzini@gnu.org>
PR c/46462
* c-decl.c (declspecs_add_type): Make variables with error types
integers.
* c-parser.c (c_parser_next_tokens_start_declaration): Two IDs
do not start a declaration before an Objective-C foreach.
(c_parser_declaration_or_fndef): Improve recovery after unknown
type name.
(c_parser_for_statement): Hoist entrance of "foreach context"
before ifs, add corresponding reset where it was missing. Do
not set objc_could_be_foreach_context for C.
Eric Botcazou [Sun, 14 Nov 2010 11:24:47 +0000 (11:24 +0000)]
re PR tree-optimization/45722 (FAIL: gcc.c-torture/execute/20040709-2.c execution at -O1 and -Os)
PR tree-optimization/45722
* tree-sra.c (build_ref_for_model): Always build a COMPONENT_REF if
this is a reference to a component.
* ipa-prop.c (ipa_get_member_ptr_load_param): Accept COMPONENT_REF.
(ipa_note_param_call): Adjust comment.
Nicola Pero [Sun, 14 Nov 2010 11:11:18 +0000 (11:11 +0000)]
In gcc/objc/: 2010-11-14 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-14 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-act.c (objc_add_property_declaration): Check that the decl
we received from the parser is a FIELD_DECL; reject array and
bitfield properties. Convert the warning when a property is
readonly and a setter is specified into an error. Convert errors
when a property declaration does not match a property declaration
in a superclass into warnings.
(objc_add_synthesize_declaration_for_property): Use
DECL_BIT_FIELD_TYPE to determine the type of an instance variable
if it is a bitfield. Throw an error if we are asked to synthesize
setters/getters for a bitfield instance variable but the property
is not appropriate - it must be assign and nonatomic. If the
property is readonly, allow the instance variable type to be a
specialization of the property type.
(objc_type_valid_for_messaging): Fixed returning 'false' for a
Class qualified with a protocol when the 'accept_classes' argument
is 'false'.
In gcc/testsuite/:
2010-11-14 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/property/at-property-4.m: Updated to match new compiler
where some errors have been converted into warnings and vice versa.
* objc.dg/property/at-property-16.m: Same change.
* objc.dg/property/at-property-18.m: Same change.
* objc.dg/property/property-neg-5.m: Same change.
* obj-c++.dg/property/at-property-4.mm: Same change.
* obj-c++.dg/property/at-property-16.mm: Same change.
* obj-c++.dg/property/at-property-18.mm: Same change.
* obj-c++.dg/property/property-neg-5.mm: Same change.
* obj-c++.dg/property/dynamic-2.mm: Enable tests that were
commented out because of testsuite problems; I found out that
using dg-warning instead of dg-message gets them to work.
* obj-c++.dg/property/property-neg-3.mm: Same change.
* obj-c++.dg/property/synthesize-6.mm: Same change.
* obj-c++.dg/property/at-property-5.mm: Same change.
* obj-c++.dg/property/at-property-14.mm: Same change.
* obj-c++.dg/property/at-property-18.mm: Same change.
* obj-c++.dg/property/at-property-16.mm: Same change (in this file,
some tests still do not work due to some other testsuite issue).
gcc/
* config/mips/mips.c (machine_function): Remove
initialized_mips16_gp_pseudo_p.
(mips16_gp_pseudo_reg): Use cfun->machine->mips16_gp_pseudo_rtx to
detect whether a pseudo has already been created. Unconditionally
create a new one if not.
(mips_pic_base_register): Only call mips16_gp_pseudo_reg when
expanding to rtl. Create a new pseudo otherwise, if allowed.
Eric Botcazou [Sat, 13 Nov 2010 22:38:04 +0000 (22:38 +0000)]
stor-layout.c (place_union_field): Do not put location information on offset expressions.
* stor-layout.c (place_union_field): Do not put location information
on offset expressions.
(place_field): Likewise.
(finalize_record_size): Likewise on size expressions.
(finalize_type_size): Likewise.
(layout_type): Likewise.
Nicola Pero [Sat, 13 Nov 2010 15:53:32 +0000 (15:53 +0000)]
In gcc/objc/: 2010-11-13 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-13 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-act.c (objc_get_protocol_qualified_type): detect cases
where we are asked to attach a protocol to something which is not
an Objective-C object type, and produce an error.
In gcc/testsuite/:
2010-11-13 Nicola Pero <nicola.pero@meta-innovation.com>
* objc/compile/20060406-1.m: Fixed testcase not to try to qualify
a pointer to an arbitrary C struct with an Objective-C protocol.
Test various valid uses of typedef with Objective-C objects and
protocols instead.
* objc.dg/invalid-type-1.m: New.
* obj-c++.dg/invalid-type-1.m: New.