Nicola Pero [Tue, 21 Sep 2010 20:47:04 +0000 (20:47 +0000)]
re PR objc/23710 (objc front-end should not "abort" after erroring out about method definition not in class context)
PR objc/23710
In gcc/:
* c-family/c-common.h (objc_start_method_definition): Return bool
instead of void.
* c-family/stub-objc.c (objc_start_method_definition): Return bool
instead of void.
* c-parser.c (c_parser_objc_method_definition): Check the return
value of objc_start_method_definition and if false is returned,
parse the method definition but emit no code.
In gcc/objc/:
* objc-act.c (objc_start_method_definition): Do not abort upon a
'method definition not in @implementation context' error. Return
'false' instead.
In gcc/testsuite/:
* objc.dg/invalid-method-1.m: New.
Mikael Morin [Tue, 21 Sep 2010 19:04:09 +0000 (19:04 +0000)]
re PR fortran/45648 (Unnecessary temporary for transpose calls as actual argument.)
2010-09-21 Mikael Morin <mikael@gcc.gnu.org>
PR fortran/45648
* trans-array.c (gfc_conv_expr_descriptor): Calculate dim out of n and
info->dim.
PR fortran/45648
* trans-array.c (gfc_conv_expr_descriptor): Unset full if we are
accessing dimensions in reversed order.
PR fortran/45648
* trans-array.c (gfc_conv_expr_descriptor): Special case noncopying
intrinsic function call.
* trans-array.c (gfc_conv_expr_descriptor): Remove ss lookup.
Update asserts accordingly.
PR fortran/45648
* trans.h (gfc_se): New field force_tmp.
* trans-expr.c (gfc_conv_procedure_call): Check for argument alias
and set parmse.force_tmp if some alias is found.
* trans-array.c (gfc_conv_expr_descriptor): Force a temporary creation
if se->force_tmp is set.
2010-09-21 Mikael Morin <mikael@gcc.gnu.org>
PR fortran/45648
* gfortran.dg/inline_transpose_1.f90: Update temporary's locations
and counts. Add non-elemental function call check.
PR fortran/45648
* gfortran.dg/inline_transpose_1.f90: Add function calls with aliasing
arguments checks. Update temporary counts.
* gfortran.dg/transpose_optimization_1.f90: New.
Nicola Pero [Tue, 21 Sep 2010 18:51:34 +0000 (18:51 +0000)]
re PR objc/25965 (Allows duplicate member names in objc subclasses)
PR objc/25965
In gcc/objc/:
* objc-act.c (objc_get_interface_ivars): New function.
(objc_collecting_ivars): New variable.
(continue_class): Set and reset objc_collecting_ivars for context.
In gcc/:
* c-decl.c (detect_field_duplicates): If compiling Objective-C,
call objc_get_interface_ivars ().
* c-family/c-common.h (objc_get_interface_ivars): New declaration.
* c-family/stub-objc.c (objc_get_interface_ivars): New stub.
In gcc/objcp/:
* objcp-decl.c (objcp_finish_struct): Call
objc_get_interface_ivars() and check for duplicate ivars.
In gcc/testsuite/:
Merge from 'apple/trunk' branch on FSF servers.
Richard Guenther [Tue, 21 Sep 2010 15:21:48 +0000 (15:21 +0000)]
dwarf2out.c (is_cu_die): New function.
2010-09-21 Richard Guenther <rguenther@suse.de>
* dwarf2out.c (is_cu_die): New function.
(add_pubtype): Use it.
(gen_subprogram_die): Likewise.
(gen_struct_or_union_type_die): Likewise.
(dwarf2out_finish): Likewise.
(comp_unit_die): Rename to ...
(single_comp_unit_die): ... this.
(comp_unit_die): New function lazily constructing and
returning single_comp_unit_die.
(is_cxx, is_fortran, is_ada, debug_dwarf, break_out_comdat_types,
base_type_die, subrange_type_die, modified_type_die,
lower_bound_default, add_bound_info, add_prototyped_attribute,
dwarf2out_vms_debug_main_pointer, scope_die_for, retry_incomplete_types,
dwarf2out_abstract_function, gen_type_die_with_usage, get_context_die,
force_decl_die, gen_namespace_die, dwarf2out_decl,
dwarf2out_start_source_file, dwarf2out_end_source_file,
prune_unused_types, dwarf2out_finish): Use it.
(gen_compile_unit_die): For GNU GIMPLE derive DW_AT_language from
the global list of translation-unit decls.
(dwarf2out_init): Do not create single_comp_unit_die here.
(force_decl_die): Handle TRANSLATION_UNIT_DECL.
* config/arm/iterators.md (qhs_extenddi_op): New mode_attr.
(qhs_extenddi_cstr): Likewise.
* config/arm/arm.md (zero_extend<mode>di2, extend<mode>di2): Use
them for the source operand.
Richard Guenther [Tue, 21 Sep 2010 09:52:00 +0000 (09:52 +0000)]
re PR tree-optimization/45580 (Building WebKit fails with compiler catching SIGSEGV in gimple_fold_obj_type_ref_known_binfo())
2010-09-21 Richard Guenther <rguenther@suse.de>
PR tree-optimization/45580
* tree-ssa-propagate.c (substitute_and_fold): Always replace
regular uses.
* gimple-fold.c (gimple_fold_obj_type_ref): For a BINFO without
virtuals fold the call into a regular indirect one.
Jakub Jelinek [Mon, 20 Sep 2010 20:41:08 +0000 (22:41 +0200)]
re PR rtl-optimization/45728 (ICE: in gen_lowpart_general, at rtlhooks.c:59 at -O1 when comparing union members)
PR rtl-optimization/45728
* expr.c (expand_expr_real_1): If op0 isn't REG or MEM, try
gen_lowpart_common first and if that fails, force_reg first
before calling gen_lowpart.
Jakub Jelinek [Mon, 20 Sep 2010 20:37:10 +0000 (22:37 +0200)]
re PR rtl-optimization/45678 (crash on vector code with -m32 -msse)
PR middle-end/45678
* cfgexpand.c (expand_one_stack_var_at): Use
crtl->max_used_stack_slot_alignment as max_align, instead
of maximum of that and PREFERRED_STACK_BOUNDARY.
Don't call update_stack_alignment.
Paul Thomas [Mon, 20 Sep 2010 18:55:12 +0000 (18:55 +0000)]
re PR fortran/45081 (ICE in gfc_conv_array_initializer, at fortran/trans-array.c:4208)
2010-09-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/45081
* simplify.c (is_constant_array_expr): Allow structure array
elements as well as constants.
(gfc_simplify_pack, gfc_simplify_reshape, gfc_simplify_spread,
gfc_simplify_transpose, gfc_simplify_unpack): Copy the derived
type of source to the result.
2010-09-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/45081
* gfortran.dg/derived_array_intrinsics_1.f90 : New test.
Jakub Jelinek [Mon, 20 Sep 2010 16:49:58 +0000 (18:49 +0200)]
dwarf2out.c (any_cfis_emitted): New static variable.
* dwarf2out.c (any_cfis_emitted): New static variable.
(add_fde_cfi): Set it.
(dwarf2out_frame_debug): Clear it before processing,
if it is set afterwards, flush any queued reg saves.
Jakub Jelinek [Mon, 20 Sep 2010 16:48:29 +0000 (18:48 +0200)]
re PR debug/45124 (No DW_AT_accessibility for public DIEs in DW_TAG_class_type)
PR debug/45124
* dwarf2out.c (add_accessibility_attribute): Assume
DW_ACCESS_private as the default for dwarf_version > 2
and DW_TAG_class_type parent.
(gen_inheritance_die): Assume DW_ACCESS_public as the default
for dwarf_version > 2 and parent other than DW_TAG_class_type.
Jakub Jelinek [Mon, 20 Sep 2010 13:24:23 +0000 (15:24 +0200)]
re PR rtl-optimization/45695 (-O1 wrong-code by cmove)
PR rtl-optimization/45695
* combine.c (try_combine): When splitting a two set pattern,
make sure the pattern which will be put into i2 doesn't use REGs
or MEMs set by insns in between i2 and i3.
Eric Botcazou [Sun, 19 Sep 2010 14:55:28 +0000 (14:55 +0000)]
trans.c (gnat_pushdecl): Do not do anything special for PARM_DECLs.
* gcc-interface/trans.c (gnat_pushdecl): Do not do anything special
for PARM_DECLs.
(end_subprog_body): If the body is a BIND_EXPR, make its associated
block the top-level one.
(build_function_stub): Build a statement group for the whole function.
* gcc-interface/utils.c (Subprogram_Body_to_gnu): If copy-in/copy-out
is used, create the enclosing block early and process first the OUT
parameters.
Ira Rosen [Sun, 19 Sep 2010 14:23:40 +0000 (14:23 +0000)]
re PR tree-optimization/45714 (Vectorization of double pow function causes a segmentation fault)
PR tree-optimization/45714
* tree-vect-stmts.c (vect_transform_stmt): Use a dummy statement
created in vectorizable_call instead of the original statement in
def stmt updates.
Eric Botcazou [Sun, 19 Sep 2010 13:55:36 +0000 (13:55 +0000)]
decl.c (gnat_to_gnu_entity): Use record type instead of enumeral type as the dummy type built for the...
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Use record
type instead of enumeral type as the dummy type built for the template
type of fat pointers.
Eric Botcazou [Sun, 19 Sep 2010 13:48:51 +0000 (13:48 +0000)]
gigi.h (get_elaboration_procedure): Declare.
* gcc-interface/gigi.h (get_elaboration_procedure): Declare.
(gnat_zaplevel): Likewise.
* gcc-interface/decl.c (gnat_to_gnu_entity): Do not force global
binding level for an external constant.
<E_Constant>: Force the local context and create a fake scope before
translating the defining expression of an external constant.
<object>: Treat external constants at the global level explicitly for
renaming declarations.
(elaborate_expression_1): Force the variable to be static if the
expression is global.
* gcc-interface/trans.c (get_elaboration_procedure): New function.
(call_to_gnu): Use it.
(gnat_to_gnu): Likewise.
<N_Object_Declaration>: Do not test Is_Public to force the creation of
an initialization variable.
(add_decl_expr): Discard the statement if the declaration is external.
* gcc-interface/utils.c (gnat_pushdecl): Do not put the declaration in
the current block if it is external.
(create_var_decl_1): Do not test Is_Public to set TREE_STATIC.
(gnat_zaplevel): New global function.
Eric Botcazou [Sun, 19 Sep 2010 13:18:26 +0000 (13:18 +0000)]
decl.c (gnat_to_gnu_entity): Explicitly test _LEVEL variables against zero in all cases.
* gcc-interface/decl.c (gnat_to_gnu_entity): Explicitly test _LEVEL
variables against zero in all cases.
(rest_of_type_decl_compilation): Likewise.
* gcc-interface/trans.c (gigi): Pass properly typed constants to
create_var_decl.
(call_to_gnu): Fix formatting.
(Handled_Sequence_Of_Statements_to_gnu): Likewise.
(Exception_Handler_to_gnu_zcx): Likewise.
(gnat_to_gnu) <N_Object_Declaration>: Short-circuit handling of
constant
expressions in presence of a freeze node.
Eric Botcazou [Sun, 19 Sep 2010 13:12:13 +0000 (13:12 +0000)]
decl.c (gnat_to_gnu_entity): Look into expressions for external constants that are aggregates.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Look into
expressions for external constants that are aggregates.
* gcc-interface/utils2.c (build_simple_component_ref): If the field
is an inherited component in an extension, look through the extension.
Jan Hubicka [Sat, 18 Sep 2010 21:25:29 +0000 (23:25 +0200)]
re PR tree-optimization/45605 (Missed devirtualization)
PR tree-optimization/45605
* cgraphunit.c (cgraph_analyze_functions): Allocate bitmap obstack.
* gimple-fold.c (static_object_in_other_unit_p): New function.
(canonicalize_constructor_val): Use it.
(get_symbol_constant_value): Be reaqdy for canonicalize_constructor_val
returning NULL.
(gimple_fold_obj_type_ref_known_binfo): Use static_object_in_other_unit_p.
Nicola Pero [Sat, 18 Sep 2010 09:34:58 +0000 (09:34 +0000)]
In libobjc/:
* hash.c: Include objc-private/hash.h instead of objc/hash.h.
* objc/sarray.h: Moved into objc/deprecated/sarray.h;
objc/sarray.h replaced with a placeholder including the file from
the deprecated/ directory.
* objc-private/sarray.h: New file (private copy of sarray.h).
* hash.c: Include <assert.h> instead of "assert.h"
* sarray.c: Include <assert.h> instead of "assert.h". Include
objc-private/sarray.h instead of objc/sarray.h.
* selector.c: Include objc-private/sarray.h instead of
objc/sarray.h.
* sendmsg.c: Include <assert.h>. Include objc-private/sarray.h
instead of objc/sarray.h.
* Makefile.in (OBJC_DEPRECATED_H): Added sarray.h.
H.J. Lu [Fri, 17 Sep 2010 21:07:09 +0000 (21:07 +0000)]
Pad short functions with NOPs for Atom.
gcc/
2010-09-17 H.J. Lu <hongjiu.lu@intel.com>
Richard Henderson <rth@redhat.com>
* config/i386/i386.c (initial_ix86_tune_features): Add
X86_TUNE_PAD_SHORT_FUNCTION.
(ix86_code_end): Pad with 8 NOPs for TARGET_PAD_SHORT_FUNCTION.
(ix86_count_insn): New.
(ix86_pad_short_function): Likewise.
(ix86_reorg): Support TARGET_PAD_SHORT_FUNCTION.
H.J. Lu [Fri, 17 Sep 2010 18:00:40 +0000 (18:00 +0000)]
Make sure that all variable sized adjustments are multiple of preferred
stack boundary after stack alignment.
gcc/
2010-09-17 H.J. Lu <hongjiu.lu@intel.com>
PR middle-end/45234
* calls.c (expand_call): Make sure that all variable sized
adjustments are multiple of preferred stack boundary after
stack alignment.
DJ Delorie [Fri, 17 Sep 2010 17:51:43 +0000 (13:51 -0400)]
rx.c (valid_psw_flag): New.
* config/rx/rx.c (valid_psw_flag): New.
(rx_expand_builtin): Call it for setpsw/clrpsw.
(rx_expand_builtin_mvtipl): Pass an integer to IN_RANGE, not an
RTX.
* config/rx/rx.md (bitclr): Don't mark the output as early-clobber.
(bitclr_in_memory): Likewise.
(clrspw, setpsw, mvfc, mvtc, mvtipl): Make volatile.
Nicola Pero [Fri, 17 Sep 2010 16:52:36 +0000 (16:52 +0000)]
In libobjc/:
* objc-private/objc-list.h (list_remove_elem): Unused function
removed. (list_nth): Unused function removed. (list_find):
Unused function removed. (list_lenght): Unused function removed.
Also, fixed an error in my last commit by adding back
objc/hash.h and objc/objc-list.h that had not been committed.
Nicola Pero [Fri, 17 Sep 2010 16:35:15 +0000 (16:35 +0000)]
In libobjc/:
* objc/hash.h: Moved into objc/deprecated/hash.h; objc/hash.h
replaced with a placeholder including the file from the
deprecated/ directory.
* objc/objc-api.h: Updated includes.
* objc/typedstream.h: Updated includes.
* objc-private/hash.h: New file (private copy of hash.h).
* objc/objc-list.h: Moved into objc/deprecated/objc-list.h;
objc/objc-list.h replaced with a placeholder including the file
from the deprecated/ directory.
* objc-private/objc-list.h: New file (private copy of objc-list.h).
* init.c: Include objc-private/hash.h and objc-private/objc-list.h
instead of objc/hash.h and objc/objc-list.h.
* selector.c: Same change.
* class.c: Added include <string.h>, which used to be implicitly included
when hash.h was included.
* exception.c: Same change.
* objects.c: Same change.
* sarray.c: Same change.
* sendmsg.c: Same change.
* Makefile.in (OBJC_DEPRECATED_H): Added hash.h and objc-list.h.
(OBJC_H): Removed hash.h and objc-list.h
Jan Hubicka [Fri, 17 Sep 2010 00:35:22 +0000 (02:35 +0200)]
lto-cgraph.c (input_overwrite_node): Do not set DECL_EXTERNAL when processing clone.
* lto-cgraph.c (input_overwrite_node): Do not set DECL_EXTERNAL when
processing clone.
* lto.c (lto_materialize_function): Do not tamper with STATIC and
EXTERNAL flags.
Paolo Carlini [Thu, 16 Sep 2010 12:39:13 +0000 (12:39 +0000)]
complex (complex<float>::operator=(float), [...]): Simplify a tad...
2010-09-16 Paolo Carlini <paolo.carlini@oracle.com>
* include/std/complex (complex<float>::operator=(float),
complex<float>::operator+=(float),
complex<float>::operator-=(float),
complex<double>::operator=(double),
complex<double>::operator+=(double),
complex<double>::operator-=(double),
complex<long double>::operator=(long double),
complex<long double>::operator+=(long double),
complex<long double>::operator-=(long double)): Simplify a tad,
just forward to the underlying __complex__ T operators, as
operator*= and operator/= already do.
* include/std/complex (complex<float>, complex<double>,
complex<long double>): Simplify spelling of return types, just
say complex, instead of complex<float>, complex<double>,
complex<long double>, respectively.