1. 27 Oct, 2010 24 commits
    • c-common.c (check_case_value): Remove special C++ code. · 81f0bab2
      c-family/
      	* c-common.c (check_case_value): Remove special C++ code.
      cp/
      	* decl.c (finish_case_label): Use decl_constant_value.
      
      From-SVN: r166019
      Jason Merrill committed
    • re PR fortran/46161 ([OOP] Invalid: Passing non-polymorphic to allocatable polymorphic dummy) · 5ac13b8e
      2010-10-27  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/46161
      	* interface.c (compare_allocatable): Handle polymorphic allocatables.
      	(compare_parameter): Add two error messages for polymorphic dummies.
      
      2010-10-27  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/46161
      	* gfortran.dg/class_dummy_3.f03: New.
      
      From-SVN: r166018
      Janus Weil committed
    • trans.c (gigi): Fix formatting issues. · cfc839a4
      	* gcc-interface/trans.c (gigi): Fix formatting issues.
      	(build_raise_check): Likewise.
      	(gnat_to_gnu): Likewise.
      	* gcc-interface/utils2.c (build_call_raise_range): Likewise.
      	(build_call_raise_column): Likewise.
      
      From-SVN: r166017
      Eric Botcazou committed
    • sol2-unwind.h (sparc64_fallback_frame_state): Adjust for newer Solaris 10 release. · 4a8f6a63
      	* config/sparc/sol2-unwind.h (sparc64_fallback_frame_state): Adjust
      	for newer Solaris 10 release.
      	(sparc_fallback_frame_state): Likewise.
      
      From-SVN: r166015
      Eric Botcazou committed
    • method.c (synthesized_method_walk): Track constexprness too. · 225a6584
      	* method.c (synthesized_method_walk): Track constexprness too.
      	(process_subob_fn, walk_field_subobs): Likewise.
      	(implicitly_declare_fn): Set DECL_DECLARED_CONSTEXPR_P.
      	(defaulted_late_check): Handle DECL_DECLARED_CONSTEXPR_P.
      	* class.c (add_implicitly_declared_members): Handle
      	constexpr default ctor.
      
      Co-Authored-By: Jason Merrill <jason@redhat.com>
      
      From-SVN: r166014
      Gabriel Dos Reis committed
    • parser.c (cp_parser_ctor_initializer_opt_and_function_body): Make sure a… · 91ea6df3
      parser.c (cp_parser_ctor_initializer_opt_and_function_body): Make sure a constexpr ctor has an empty body.
      
      	* parser.c (cp_parser_ctor_initializer_opt_and_function_body):
      	Make sure a constexpr ctor has an empty body.
      	* class.c (type_has_constexpr_default_constructor): New.
      	* cp-tree.h: Declare it.
      	* init.c (perform_member_init): Complain about uninitialized
      	member in constexpr ctor.
      	(emit_mem_initializers): And uninitialized base.
      	* decl.c (check_tag_decl): Fix typo.
      
      	* semantics.c (valid_type_in_constexpr_fundecl_p): New fn.
      	(is_valid_constexpr_fn): New fn.
      	(validate_constexpr_fundecl): Use it.
      	* decl.c (validate_constexpr_redeclaration): New.
      	(duplicate_decls): Use it.
      	(cp_finish_decl): Call validate_constexpr_fundecl and
      	ensure_literal_type_for_constexpr_object here.
      	(start_decl): Not here.  Don't ICE on constexpr reference.
      	(check_for_uninitialized_const_var): Don't handle constexpr specially.
      	(grokfndecl): Set DECL_DECLARED_CONSTEXPR_P.
      	(check_static_variable_definition): Give friendly message about
      	missing constexpr.
      	(grokdeclarator): Complain about typedef and volatile with constexpr.
      	Reorganize.  Give sorry about non-static data members in C++0x mode.
      	(start_preparsed_function): Check validate_constexpr_fundecl here.
      	(check_function_type): Not here.
      	* decl2.c (finish_static_data_member_decl): Don't complain about
      	in-class init.
      	* parser.c (CP_PARSER_FLAGS_ONLY_TYPE_OR_CONSTEXPR): New.
      	(cp_parser_condition): Pass it to cp_parser_decl_specifier_seq.
      	(cp_parser_decl_specifier_seq): Handle it.
      	(cp_parser_explicit_instantiation): Diagnose inline and constexpr.
      
      Co-Authored-By: Jason Merrill <jason@redhat.com>
      
      From-SVN: r166013
      Gabriel Dos Reis committed
    • class.c (check_bases): Propagate non-literality. · 3b49d762
      	* class.c (check_bases): Propagate non-literality.
      	(check_field_decls): Likewise.
      	(finalize_literal_type_property): New.
      	(check_bases_and_members): Call it.
      	* cp-tree.h (TYPE_HAS_CONSTEXPR_CTOR): New.
      	(lang_type_class): Add has_constexpr_ctor field.
      	(DECL_DECLARED_CONSTEXPR_P): Strip template.
      	* decl.c (grok_special_member_properties): Set
      	TYPE_HAS_CONSTEXPR_CTOR.
      
      Co-Authored-By: Jason Merrill <jason@redhat.com>
      
      From-SVN: r166012
      Gabriel Dos Reis committed
    • call.c (build_integral_nontype_arg_conv): New. · 61f8d165
      	* call.c (build_integral_nontype_arg_conv): New.
      	* cp-tree.h: Declare it.
      	* pt.c (convert_nontype_argument): Use it.
      
      From-SVN: r166011
      Jason Merrill committed
    • * error.c (dump_simple_decl): Print constexpr. · 2842beb6
      From-SVN: r166010
      Jason Merrill committed
    • * except.c (build_throw): Set EXPR_LOCATION. · 73808ca6
      From-SVN: r166008
      Jason Merrill committed
    • * tree.c (build_cplus_new): Handle CONSTRUCTOR. · 236fd18c
      From-SVN: r166007
      Jason Merrill committed
    • semantics.c (finish_compound_stmt): Avoid creating an unnecessary BIND_EXPR. · e02927a1
      	* semantics.c (finish_compound_stmt): Avoid creating an
      	unnecessary BIND_EXPR.
      
      From-SVN: r166006
      Jason Merrill committed
    • call.c (convert_like_real): Don't check narrowing if the element is also an initializer-list. · bc8a0bd9
      	* call.c (convert_like_real): Don't check narrowing if the element
      	is also an initializer-list.
      
      From-SVN: r166005
      Jason Merrill committed
    • gimplify.c (gimplify_decl_expr): Handle anonymous artificial variables sooner. · 22192559
      	* gimplify.c (gimplify_decl_expr): Handle anonymous artificial
      	variables sooner.
      
      From-SVN: r166004
      Jason Merrill committed
    • haifa-sched.c (ISSUE_POINTS): Remove. · 84fabdde
      	* haifa-sched.c (ISSUE_POINTS): Remove.
      	(max_issue): Don't issue more than issue_rate instructions.
      
      Co-Authored-By: Maxim Kuvyrkov <maxim@codesourcery.com>
      
      From-SVN: r166002
      Jie Zhang committed
    • Replace UNSPEC_STACK_CHECK with UNSPECV_SPLIT_STACK_RETURN. · 9c042d80
      2010-10-27  Ian Lance Taylor  <iant@google.com>
      
      	PR target/46197
      	* config/i386/i386.md (UNSPECV_SPLIT_STACK_RETURN): New.
      	(split_stack_return): Replace UNSPEC_STACK_CHECK with
      	UNSPECV_SPLIT_STACK_RETURN.
      
      From-SVN: r166001
      Ian Lance Taylor committed
    • Add -mvzeroupper to x86. · 2767a7f2
      gcc/
      
      2010-10-27  H.J. Lu  <hongjiu.lu@intel.com>
      
      	* config/i386/i386-protos.h (init_cumulative_args): Add an int.
      
      	* config/i386/i386.c (block_info): New.
      	(BLOCK_INFO): Likewise.
      	(call_avx256_state): Likewise.
      	(check_avx256_stores): Likewise.
      	(move_or_delete_vzeroupper_2): Likewise.
      	(move_or_delete_vzeroupper_1): Likewise.
      	(move_or_delete_vzeroupper): Likewise.
      	(use_avx256_p): Likewise.
      	(function_pass_avx256_p): Likewise.
      	(flag_opts): Add -mvzeroupper.
      	(ix86_option_override_internal): Turn on MASK_VZEROUPPER by
      	default for TARGET_AVX.  Turn off MASK_VZEROUPPER if TARGET_AVX
      	is disabled.
      	(ix86_function_ok_for_sibcall): Disable sibcall if we need to
      	generate vzeroupper.
      	(init_cumulative_args): Add an int to indicate caller.  Set
      	use_avx256_p, callee_return_avx256_p and caller_use_avx256_p
      	based on return type.
      	(ix86_function_arg): Set use_avx256_p, callee_pass_avx256_p and
      	caller_pass_avx256_p based on argument type.
      	(ix86_expand_epilogue): Emit vzeroupper if 256bit AVX register
      	is used, but not returned by caller.
      	(ix86_expand_call): Emit vzeroupper if 256bit AVX register is
      	used.
      	(ix86_local_alignment): Set use_avx256_p if 256bit AVX register
      	is used.
      	(ix86_minimum_alignment): Likewise.
      	(ix86_expand_special_args_builtin): Set target to
      	GEN_INT (vzeroupper_intrinsic) for CODE_FOR_avx_vzeroupper.
      	(ix86_reorg): Run the vzeroupper optimization if needed.
      
      	* config/i386/i386.h (ix86_args): Add caller.
      	(INIT_CUMULATIVE_ARGS): Updated.
      	(machine_function): Add use_vzeroupper_p, use_avx256_p,
      	caller_pass_avx256_p, caller_return_avx256_p,
      	callee_pass_avx256_p and callee_return_avx256_p.
      
      	* config/i386/i386.opt (-mvzeroupper): New.
      
      	* config/i386/predicates.md (vzeroupper_operation): Removed.
      
      	* config/i386/sse.md (avx_vzeroupper): Removed.
      	(*avx_vzeroupper): Removed.
      	(avx_vzeroupper): New.
      
      	* doc/invoke.texi: Document -mvzeroupper.
      
      gcc/testsuite/
      
      2010-10-27  H.J. Lu  <hongjiu.lu@intel.com>
      
      	* gcc.target/i386/avx-vzeroupper-1.c: Add -mtune=generic.
      	* gcc.target/i386/avx-vzeroupper-2.c: Likewise.
      
      	* gcc.target/i386/avx-vzeroupper-3.c: New.
      	* gcc.target/i386/avx-vzeroupper-4.c: Likewise.
      	* gcc.target/i386/avx-vzeroupper-5.c: Likewise.
      	* gcc.target/i386/avx-vzeroupper-6.c: Likewise.
      	* gcc.target/i386/avx-vzeroupper-7.c: Likewise.
      	* gcc.target/i386/avx-vzeroupper-8.c: Likewise.
      	* gcc.target/i386/avx-vzeroupper-9.c: Likewise.
      	* gcc.target/i386/avx-vzeroupper-10.c: Likewise.
      	* gcc.target/i386/avx-vzeroupper-11.c: Likewise.
      	* gcc.target/i386/avx-vzeroupper-12.c: Likewise.
      	* gcc.target/i386/avx-vzeroupper-13.c: Likewise.
      	* gcc.target/i386/avx-vzeroupper-14.c: Likewise.
      
      From-SVN: r166000
      H.J. Lu committed
    • t-mingw32 (SHLIB_LC): Add -lmingwthrd. · 22bc122e
      	* config/i386/t-mingw32 (SHLIB_LC): Add -lmingwthrd.
      	* config/i386/t-mingw-w32 (SHLIB_LC): Likewise.
      	* config/i386/t-mingw-w64 (SHLIB_LC): Likewise.
      
      From-SVN: r165999
      Eric Botcazou committed
    • w32-unwind.h (i386_w32_fallback_frame_state): Fix regnum of EBP. · 5d0d1564
      	* config/i386/w32-unwind.h (i386_w32_fallback_frame_state): Fix regnum
      	of EBP.  Do not restore reg #9.  Remove +1 adjustment to EIP and set
      	fs->signal_frame instead.
      
      Co-Authored-By: Olivier Hainque <hainque@adacore.com>
      
      From-SVN: r165998
      Eric Botcazou committed
    • In gcc/: 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com> · 200290f2
      In gcc/:
      2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * c-parser.c (c_parser_objc_at_property_declaration): Recognize
              RID_ASSIGN, RID_COPY, RID_RETAIN, RID_READWRITE and RID_NONATOMIC.
              Do not use objc_set_property_attr, but use local variables
              instead.  Detect repeated usage of setter, getter and ivar
              attributes.  Improved error processing when a setter name does not
              end in ':'.  Do not check for CPP_CLOSE_PAREN after we determined
              that the token is a keyword.  Updated call to
              objc_add_property_declaration.
      
      In gcc/cp/:
      2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * parser.c (cp_parser_objc_at_property_declaration): Recognize
              RID_ASSIGN, RID_COPY, RID_RETAIN, RID_READWRITE and RID_NONATOMIC.
              Do not use objc_set_property_attr, but use local variables
              instead.  Detect repeated usage of setter, getter and ivar
              attributes.  Improved error processing when a setter name does not
              end in ':'.  Do not check for CPP_CLOSE_PAREN after we determined
              that the token is a keyword.  Updated call to
              objc_add_property_declaration.
      
      In gcc/c-family/:
      2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
              RID_RETAIN, RID_COPY and RID_NONATOMIC.  Updated RID_FIRST_PATTR
              and RID_LAST_PATTR.
              (objc_add_property_declaration): Added additional arguments.
              (objc_property_attribute_kind): Removed.
              (objc_set_property_attr): Removed.
              * c-common.c (c_common_reswords): Added readwrite, assign, retain,
              copy and nonatomic.
              * stub-objc.c (objc_add_property_declaration): Added additional
              arguments.
              (objc_set_property_attr): Removed.
              
      In gcc/objc/:
      2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc-act.c (objc_add_property_declaration): Added arguments to
              pass the various property attributes that were parsed with the
              property declaration.  Process arguments to determine the final
              property attributes and produce error messages as appropriate.
              Added temporary code to keep the compiler silent about variables
              set but not used - for new attributes that are only checked but
              have no effect yet.
              (property_readonly): Removed.
              (property_setter): Removed.
              (property_getter): Removed.
              (property_ivar): Removed.
              (property_copies): Removed.     
              (objc_set_property_attr): Removed.
              * objc-act.h (enum property_assign_semantics): New.
              
      In gcc/testsuite/:
      2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * obj-c.dg/property/at-property-4.m: New.
              * obj-c++.dg/property/at-property-4.mm: New.
              * obj-c++.dg/property/property-neg-5.m: Updated testcase for
              updates in warning.
              * obj-c++.dg/property/property-neg-5.mm: Updated testcase for
              updates in warning.
      
      From-SVN: r165997
      Nicola Pero committed
    • In gcc/: 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com> · f614132b
      In gcc/:
      2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * c-parser.c (c_parser_objc_at_property): Renamed to
              c_parser_objc_at_property_declaration.  Updated calls to
              objc_add_property_variable, now objc_add_property_declaration.
              Code rewritten to be much more robust in recovering from syntax
              errors.  Added comments.
              (c_parser_objc_property_attrlist): Removed.
              (c_parser_external_declaration): Updated calls to
              c_parser_objc_at_property, now
              c_parser_objc_at_property_declaration.
              (c_parser_objc_methodprotolist): Same change.
      
      In gcc/c-family/:
      2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * c-common.h (objc_add_property_variable): Renamed to
              objc_add_property_declaration.  Added location argument.
              * stub-objc.c (objc_add_property_variable): Same change.
      
      In gcc/cp/:
      2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * parser.c (cp_parser_objc_property_decl): Renamed to
              cp_parser_objc_struct_declaration.  Return the parsed trees
              instead of calling objc_add_property_variable directly.  Detect
              missing or invalid declspecs.  Implemented attributes.  Do not eat
              the ';' at the end.  Exit loop whenever a non-comma is parsed, not
              just EOF.
              (cp_parser_objc_at_property): Renamed to
              cp_parser_objc_at_property_declaration.  Updated calls to
              objc_add_property_variable, now objc_add_property_declaration, and
              to cp_parser_objc_property_decl, now
              cp_parser_objc_struct_declaration.  Rewritten all code to be more
              robust in dealing with syntax errors, and almost identical to the
              one in c_parser_objc_at_property_declaration.
              (cp_parser_objc_property_attrlist): Removed.
              (cp_parser_objc_method_prototype_list): Updated call to
              cp_parser_objc_at_property.
              (cp_parser_objc_method_definition_list): Same change.
              (cp_parser_objc_class_ivars): Detect a number of invalid
              declarations of instance variables and produce errors when they
              are found.
      
      In gcc/objc/:
      2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc-act.c (objc_add_property_variable): Renamed to
              objc_add_property_declaration.  Added location argument.  Updated
              warnings and errors to use it.  Use error, not fatal_error, if a
              property declaration is found outside an interface or
              implementation context.
      
      In gcc/testsuite/:
      2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc.dg/property/at-property-1.m: New.
              * objc.dg/property/at-property-2.m: New.
              * objc.dg/property/at-property-3.m: New.
              * objc.dg/ivar-invalid-type-1.m: New.
              * obj-c++.dg/property/at-property-1.mm: New.
              * obj-c++.dg/property/at-property-2.mm: New.
              * obj-c++.dg/property/at-property-3.mm: New.
              * obj-c++.dg/ivar-invalid-type-1.mm: New.
              * objc.dg/property/property-neg-6.m: Updated testcase for updates
              in error reporting.
      
      From-SVN: r165996
      Nicola Pero committed
    • Put back unspec_volatile on split_stack_return. · 3e1484c9
      2010-10-26  H.J. Lu  <hongjiu.lu@intel.com>
      
      	* config/i386/i386.md (split_stack_return): Put back
      	unspec_volatile.
      
      From-SVN: r165995
      H.J. Lu committed
    • Daily bump. · 78b9aee5
      From-SVN: r165994
      GCC Administrator committed
  2. 26 Oct, 2010 16 commits