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.
Iain Sandoe [Sat, 13 Nov 2010 12:50:37 +0000 (12:50 +0000)]
don't emit debug sections until they are required
gcc:
* dwarf2out.c (macinfo_entry): New struct.
(output_comp_unit): Emit the section start label here and flag that we
will emit an info section.
(dwarf2out_start_source_file): Save data in a macinfo entry rather than
emitting directly.
(dwarf2out_end_source_file): Likewise.
(dwarf2out_define): Likewise.
(dwarf2out_undef): Likewise.
(output_macinfo): New.
(dwarf2out_init): Do not emit debug section switches here, allocate a
vec for macinfo, when required.
(dwarf2out_finish): First switch to debug_abbrev_section here.
debug_line_section, debug_macinfo_section, Likewise.
Check that the pubtypes table has at least one unpruned entry before
trying to emit it.
Paolo Bonzini [Sat, 13 Nov 2010 10:01:33 +0000 (10:01 +0000)]
[multiple changes]
2010-10-30 Paolo Bonzini <bonzini@gnu.org>
PR c/20385
* c-parser.c (c_parser_next_token_starts_declaration): Rename to...
(c_parser_next_tokens_start_declaration): ... this. Handle 2nd
token lookahead.
(c_parser_compound_statement_nostart, c_parser_label,
c_parser_for_statement, c_parser_omp_for_loop): Adjust calls.
(c_parser_declaration_or_fndef): Detect the case now matched by
c_parser_next_tokens_start_declaration, give error and correct it.
testsuite:
2010-11-13 Paolo Bonzini <bonzini@gnu.org>
* c-format.c (enum format_specifier_kind, kind_descriptions): New.
(struct format_wanted_type): Replace field "name" with "kind", add
"format_start" and "format_length".
(check_format_info_main): Fill in new fields. Fill in
FORMAT_WANTED_TYPES even for missing arguments. Move checks
after the final NUL outside the while loop. Do not include
width and precision modifiers in the format_start/format_length
of the main format.
(check_format_types): Remove FORMAT_START and FORMAT_LENGTH
arguments. Compute WANTED_TYPE first so that format_type_warning
can be called for missing arguments. Adjust calls to
format_type_warning.
(format_type_warning): Fetch as much information as possible
from format_wanted_type. Adjust printing now that every
warning has a "descr", as well as for missing argument warnings
and to include % sign for format specifiers.
testsuite:
2010-11-13 Paolo Bonzini <bonzini@gnu.org>
re PR rtl-optimization/46204 (g++.dg/torture/stackalign/throw-1.C fails to compile on IA64)
PR rtl-optimization/46204
* sel-sched-ir.c (maybe_tidy_empty_bb): Remove second argument.
Update all callers. Do not recompute topological order. Adjust
fallthrough edges following a degenerate conditional jump.
Ian Lance Taylor [Sat, 13 Nov 2010 01:21:12 +0000 (01:21 +0000)]
re PR other/46332 (__cxa_demangle yields excess parentheses for function types)
libiberty/:
PR other/46332
* cp-demangle.c (d_print_function_type): Don't print parentheses
if there are no modifiers to print.
* testsuite/demangle-expected: Tweak one test case, add another.
libstdc++/:
* testsuite/abi/demangle/abi_examples/14.cc (main): Change
expected demangling.
Joseph Myers [Fri, 12 Nov 2010 23:26:56 +0000 (23:26 +0000)]
Makefile.in (OPTS_H): Define.
* Makefile.in (OPTS_H): Define.
(c-decl.o, c-family/c-common.o, c-family/c-opts.o,
c-family/c-pch.o, c-family/c-pragma.o, gcc.o, gccspec.o,
cppspec.o, options.o, gcc-options.o, lto-opts.o, opts.o,
opts-common.o, toplev.o, passes.o, matrix-reorg.o,
ipa-struct-reorg.o, PLUGIN_HEADERS): Use $(OPTS_H).
* gcc.c (driver_handle_option): Take location_t parameter.
(process_command, do_self_spec): Update calls to
read_cmdline_option.
* langhooks-def.h (lhd_handle_option): Take location_t parameter.
* langhooks.c (lhd_handle_option): Take location_t parameter.
* langhooks.h (handle_option): Take location_t parameter.
* lto-opts.c (lto_reissue_options): Update call to set_option.
* opts-common.c (handle_option): Make static. Take location_t
parameter and pass it to other functions.
(handle_generated_option): Take location_t parameter and pass it
to other functions.
(read_cmdline_option): Take location_t parameter and pass it to
other functions. Use warning_at and error_at.
(set_option): Take location_t parameter and pass it to other
functions.
* opts.c (common_handle_option): Take location_t parameter and
pass it to other functions.
(enable_warning_as_error): Make static. Take location_t parameter
and pass it to other functions.
(lang_handle_option): Take location_t parameter and pass it to
other functions.
(target_handle_option): Take location_t parameter.
(read_cmdline_options, maybe_default_option,
maybe_default_options, default_options_optimization,
decode_options): Take location_t parameter and pass it to other
functions.
* opts.h: Include input.h.
(struct cl_option_handler_func, decode_options, set_option,
handle_generated_option, read_cmdline_option): Take location_t
parameters.
(handle_option, enable_warning_as_error): Remove.
* toplev.c (toplev_main): Update call to decode_options.
ada:
* gcc-interface/Make-lang.in (ada/misc.o): Use $(OPTS_H).
* gcc-interface/misc.c (gnat_handle_option): Take location_t
parameter.
c-family:
* c-common.c (parse_optimize_options): Update call to
decode_options.
* c-common.h (c_common_handle_option): Update prototype.
* c-opts.c (c_common_handle_option): Take location_t parameter and
pass it to other functions.
cp:
* Make-lang.in (g++spec.o): Use $(OPTS_H).
fortran:
* Make-lang.in (gfortranspec.o): Use $(OPTS_H).
* gfortran.h (gfc_handle_option): Take location_t parameter.
* options.c (gfc_handle_option): Take location_t parameter.
java:
* Make-lang.in (jvspec.o, java/lang.o): Use $(OPTS_H).
* lang.c (java_handle_option): Take location_t parameter.
lto:
* Make-lang.in (lto/lto.o): Use $(OPTS_H).
* lto-lang.c (lto_handle_option): Take location_t parameter.
Core 1135, 1136, 1145, 1149
* method.c (defaultable_fn_check): Do not disallow defaulting a
non-public or explicit special member function on its first
declaration.