Nicola Pero [Sat, 6 Nov 2010 13:14:55 +0000 (13:14 +0000)]
In gcc/objc/: 2010-11-05 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-05 Nicola Pero <nicola.pero@meta-innovation.com>
Fixed using the Objective-C 2.0 syntax with self and super.
* objc-act.c (OBJC_LOOKUP_NO_INSTANCE_METHODS_OF_ROOT_CLASS): New.
(maybe_make_artificial_property_decl): Added 'implementation'
argument. Use OBJC_LOOKUP_NO_INSTANCE_METHODS_OF_ROOT_CLASS when
looking up getters or setters for a class. If an implementation
is specified, search it as well for a getter or setter.
(objc_maybe_build_component_ref): Updated calls to
maybe_make_artificial_property_decl; added code to deal with
'self' and 'super' and with methods declared locally in the
implementation. Store the getter call expression in the
PROPERTY_REF instead of throwing it away.
(objc_build_class_component_ref): Updated calls to
maybe_make_artificial_property_decl, and store the getter call
expression in PROPERTY_REF instead of throwing it away.
(lookup_method_static): Implemented
OBJC_LOOKUP_NO_INSTANCE_METHODS_OF_ROOT_CLASS option.
(objc_gimplify_property_ref): Do not build the getter method call
here; instead use the one stored in the PROPERTY_REF. If it's not
there, produce helpful error messages.
* objc-tree.def (PROPERTY_REF): Increased the number of operands
from 2 to 3. Updated comments.
* objc-act.h (PROPERTY_REF_GETTER_CALL): New.
In gcc/testsuite/:
2010-11-05 Nicola Pero <nicola.pero@meta-innovation.com>
PR target/44981
* c-format.c (format_type): New type gcc_objc_string_format_type.
(valid_stringptr_type_p): New.
(handle_format_arg_attribute): Use valid_stringptr_type_p ().
(check_format_string): Pass expected type, use
valid_stringptr_type_p (), check that the format string types are
consistent with the format specification.
(decode_format_attr): Warn if NSString is used outside objective-c.
(format_types_orig): Add NSString.
(format_name): New.
(format_flags): New.
(check_format_arg): Handle format strings requiring an external parser.
first_target_format_type: New variable.
(handle_format_attribute): Set up first_target_format_type, pass the
expected format arg string type to check_format_string().
* c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
* stub-objc.c (objc_string_ref_type_p): New.
(objc_check_format_arg): New.
re PR target/46084 (gcc.dg/split-4.c failed with -mavx -m32)
gcc/:
PR target/46084
* explow.c (allocate_dynamic_stack_space): If flag_split_stack,
request enough additional space for alignment, and force
alignment.
testsuite/:
* gcc.target/i386/pr46084.c: New test.
* config/i386/i386.c (legitimate_pic_address_disp_p):
Handle UNSPEC_PCREL.
(ix86_legitimate_address_p): Likewise.
(legitimize_pic_address): Likewise.
(output_pic_addr_const): Likewise.
(ix86_delegitimize_address): Likewise.
(ix86_find_base_term): Likewise.
(memory_address_length): Likewise.
(x86_output_mi_thunk): Handle special case x64
for non local binding.
* config/i386/i386.md (UNSPEC_PCREL): New.
* config/i386/winnt.c (i386_pe_binds_local_p):
Allow weak symbol for x64 windows with non-local binding.
Janus Weil [Fri, 5 Nov 2010 18:14:52 +0000 (19:14 +0100)]
re PR fortran/45451 ([OOP] Inconsistent status of ALLOCATABLE components inside CLASS variables.)
2010-11-05 Janus Weil <janus@gcc.gnu.org>
PR fortran/45451
PR fortran/46174
* class.c (gfc_find_derived_vtab): Improved search for existing vtab.
Add component '$copy' to vtype symbol for polymorphic deep copying.
* expr.c (gfc_check_pointer_assign): Make sure the vtab is generated
during resolution stage.
* resolve.c (resolve_codes): Don't resolve code if namespace is already
resolved.
* trans-stmt.c (gfc_trans_allocate): Call '$copy' procedure for
polymorphic ALLOCATE statements with SOURCE.
H.J. Lu [Fri, 5 Nov 2010 12:53:39 +0000 (12:53 +0000)]
Check 256bit AVX register in move expanders.
gcc/
2010-11-05 H.J. Lu <hongjiu.lu@intel.com>
Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (ix86_expand_move): Set use_avx256_p if
256bit AVX register is used.
(ix86_expand_vector_move_misalign): Likewise.
(ix86_expand_vector_move): Replace use_avx256_p with
VALID_AVX256_REG_MODE.
Jakub Jelinek [Fri, 5 Nov 2010 11:15:28 +0000 (12:15 +0100)]
re PR tree-optimization/46099 (ICE: in replace_ssa_name, at tree-cfg.c:5643 with -ftree-parallelize-loops -g)
PR tree-optimization/46099
* tree-parloops.c (take_address_of): Add GSI argument. Return NULL
if it is NULL and uid wasn't found in the hash table. Just fold the
result if it is NULL otherwise. Insert other potentially needed
stmts right before current stmt instead of on the entry edge.
(struct elv_data): Add gsi and reset fields.
(eliminate_local_variables_1): Adjust caller. If take_address_of
failed for debug stmt, set dta->reset and return.
(eliminate_local_variables_stmt): Change STMT argument for GSI,
pass GSI through to the callback, handle resetting of debug stmts.
(eliminate_local_variables): Adjust caller. Process debug stmts
in second phase.
Chao-ying Fu [Fri, 5 Nov 2010 00:26:14 +0000 (00:26 +0000)]
configure.ac: Test assembler support for DSP Rev1 mult.
2010-11-04 Chao-ying Fu <fu@mips.com>
* configure.ac: Test assembler support for DSP Rev1 mult.
* configure: Regenerate.
* config.in: Regenerate.
* config/mips/mips.h (ISA_HAS_DSP_MULT): New define.
* config/mips/mips.c (CODE_FOR_mips_mult): New define.
(CODE_FOR_mips_multu): New define.
(mips_builtins): Move madd, maddu, msub, msubu, mult, multu from
dspr2_32 to dsp_32.
(mips_mulsidi3_gen_fn): Test (TARGET_FIX_R4000 && !ISA_HAS_DSP).
Delete returns when ISA_HAS_DSPR2, because the old patterns are deleted.
* config/mips/mips-dsp.md (mips_madd<u>, mips_msub<u>):
New define_expand patterns.
* config/mips/constraints.md (ka): Update the constraint to test
ISA_HAS_DSP_MULT instead of ISA_HAS_DSPR2.
* config/mips/mips-dspr2.md (mips_madd<u>, mips_msub<u>, mips_mult,
mips_multu): Delete.
* config/mips/mips.md (<u>mulsidi3_32bit): Add comments.
Change target constraint to "ka".
Use (!TARGET_FIX_R4000 || ISA_HAS_DSP), instead of
(!TARGET_FIX_R4000 && !ISA_HAS_DSPR2).
Emit the accumulator destination when ISA_HAS_DSP_MULT.
(<u>msubsidi4): Add comments.
Test ISA_HAS_DSP.
Emit the accumulator destination when ISA_HAS_DSP_MULT.
(<u>maddsidi4): Likewise.
* doc/extend.texi (MIPS DSP Built-in Functions): Move madd, maddu,
msub, msubu, mult, multu built-in functions from DSP r2 to DSP r1.
Nicola Pero [Thu, 4 Nov 2010 20:59:47 +0000 (20:59 +0000)]
In gcc/: 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
Fixed using the Objective-C 2.0 dot-syntax with class names.
* c-parser.c (c_parser_next_token_starts_declspecs): In
Objective-C, detect Objective-C 2.0 dot-syntax with a class name.
(c_parser_next_token_starts_declaration): Same.
(c_parser_postfix_expression): Parse the Objective-C 2.0
dot-syntax with a class name.
In gcc/cp/:
2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
Fixed using the Objective-C 2.0 dot-syntax with class names.
* parser.c (cp_parser_primary_expression): Recognize Objective-C
2.0 dot-syntax with class names and process it.
(cp_parser_nonclass_name): Recognize Objective-C 2.0 dot-syntax
with class names.
(cp_parser_class_name): Same change.
(cp_parser_simple_type_specifier): Tidied comments.
In gcc/c-family/:
2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
Fixed using the Objective-C 2.0 dot-syntax with class names.
* c-common.h (objc_build_class_component_ref): New.
* stub-objc.c (objc_build_class_component_ref): New.
In gcc/objc/:
2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
Fixed using the Objective-C 2.0 dot-syntax with class names.
* objc-act.c (objc_build_class_component_ref): New.
In gcc/testsuite/:
2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
Fixed using the Objective-C 2.0 dot-syntax with class names.
* objc.dg/property/dotsyntax-3.m: New.
* objc.dg/property/dotsyntax-4.m: New.
* obj-c++.dg/property/dotsyntax-3.mm: New.
* obj-c++.dg/property/dotsyntax-4.mm: New.
* objc.dg/fobjc-std-1.m: Added test for warnings when the
Objective-C 2.0 dot-syntax is used with class names.
* obj-c++.dg/fobjc-std-1.mm: Same change.
Ralf Wildenhues [Thu, 4 Nov 2010 19:57:17 +0000 (19:57 +0000)]
Fix PR driver/45703: let --help -v show linker help.
gcc/:
PR driver/45703
* collect2.c (main): Print --help output to stdout. Do not
exit right away, so ld --help is appended. Add empty lines
to separate output suitably.
Paolo Carlini [Thu, 4 Nov 2010 17:02:25 +0000 (17:02 +0000)]
re PR libstdc++/46303 ('mutex' is not a member of 'std' failures in 30_threads/call_once/constexpr.cc, 30_threads/mutex/cons/constexpr.cc, 30_threads/once_flag/cons/constexpr.cc)
2010-11-04 Paolo Carlini <paolo.carlini@oracle.com>
2010-11-04 Paolo Carlini <paolo.carlini@oracle.com>
* include/std/ratio (ratio_add, ratio_subtract, ratio_multiply,
ratio_divide): Declare the data members constexpr.
* testsuite/20_util/ratio/requirements/constexpr_data.cc: Extend.
Uros Bizjak [Thu, 4 Nov 2010 16:06:45 +0000 (17:06 +0100)]
re PR middle-end/46292 (FAIL: gcc.c-torture/execute/vector-shift2.c compilation, -O3 -g)
PR middle-end/46292
* lower-suberg.c (simplify_subreg_concatn): For VOIDmode elements,
if the innermode is not vector mode, determine the mode of a subreg
by using mode_for_size of inner_size.
Jason Merrill [Thu, 4 Nov 2010 15:52:18 +0000 (11:52 -0400)]
semantics.c (speculative_access_check): New.
* semantics.c (speculative_access_check): New.
* cp-tree.h: Declare it.
* call.c (build_over_call): Use it.
* class.c (type_has_constexpr_default_constructor): Use locate_ctor.
* method.c (locate_ctor): Use push/pop_deferring_access_checks.
Ira Rosen [Thu, 4 Nov 2010 11:51:09 +0000 (11:51 +0000)]
re PR tree-optimization/46213 (gfortran.dg/aliasing_array_result_1.f90 ICE: in vectorizable_reduction, at tree-vect-loop.c:4046 with custom compiler flags)
PR tree-optimization/46213
* tree-vect-loop.c (vect_is_simple_reduction_1): Handle
MINUS_EXPR only if the first operand is reduction operand.
Nicola Pero [Wed, 3 Nov 2010 23:52:18 +0000 (23:52 +0000)]
In gcc/c-family/: 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/c-family/:
2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
* c.opt (Wproperty-assign-default): New option.
In gcc/objc/:
2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-act.c (objc_add_dynamic_declaration): Allow @dynamic in a
category.
(objc_type_valid_for_messaging): Added 'accept_classes' argument;
if set to 'true', return 'true' for Class objects. Do not remove
more than on pointer indirection.
(objc_add_property_declaration): Only warn about 'assign'
semantics for Objective-C objects if warn_property_assign_default;
and do not warn if the property is readonly or if the type is a Class.
(objc_finish_foreach_loop): Updated calls to
objc_type_valid_for_messaging.
In gcc/testsuite/:
2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/property/dynamic-2.m: Updated for the fact that @dynamic
is now allowed in categories.
* obj-c++.dg/property/dynamic-2.mm: Same change.
* objc.dg/property/dynamic-3.m: New.
* obj-c++.dg/property/dynamic-3.mm: New.
* objc.dg/property/at-property-14.m: New.
* objc.dg/property/at-property-15.m: New.
* obj-c++.dg/property/at-property-14.mm: New.
* obj-c++.dg/property/at-property-15.mm: New.
* objc.dg/foreach-6.m: Added a few more tests for valid and
invalid iterating variables and collections.
Thomas Koenig [Wed, 3 Nov 2010 17:49:05 +0000 (17:49 +0000)]
dump-parse-tree.c (code_indent): Take label into acount when calculating indent.
2010-11-03 Thomas Koenig <tkoenig@gcc.gnu.org>
Paul Thomas <pault@gcc.gnu.org>
* dump-parse-tree.c (code_indent): Take label into acount
when calculating indent.
(show_typespec): Also display class.
(show_attr): Add module name to argument.
Don't show UNKNOWN for flavor, access and save. Don't show
SAVE_NONE. Don't show INTENT_UNKNOWN. Show module for use
association. Show intent only for dummy arguments.
Set length of shown symbol names to minimum of 12.
Show attributes header.
(show_symbol): Adjust show_level.
(show_symtree): Clear up display for ambiguous. Show if symbol
was imported from namespace.
(show_code_node): Clear up indenting. Traverse symtree and
show code directly instead of calling show_namespace.
Co-Authored-By: Paul Thomas <pault@gcc.gnu.org>
From-SVN: r166262
Paolo Carlini [Wed, 3 Nov 2010 17:33:54 +0000 (17:33 +0000)]
limits (__glibcxx_digits10, [...]): Use 643L instead of 643 to avoid overflows on 16-bit machines.
2010-11-03 Paolo Carlini <paolo.carlini@oracle.com>
* include/std/limits (__glibcxx_digits10, __glibcxx_max_digits10):
Use 643L instead of 643 to avoid overflows on 16-bit machines.
* include/ext/numeric_traits.h (__glibcxx_max_digits10): Likewise.