Commit Graph

104227 Commits

Author SHA1 Message Date
Jason Merrill 2b08f2c561 c-common.c (c_common_reswords): Add __is_literal_type.
gcc/c-family/
	* c-common.c (c_common_reswords): Add __is_literal_type.
	* c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
gcc/cp/
	* cp-tree.h (cp_trait_kind): Add CPTK_IS_LITERAL_TYPE.
	* cxx-pretty-print.c (pp_cxx_trait_expression): Handle it.
	* semantics.c (trait_expr_value, finish_trait_expr): Likewise.
	* parser.c (cp_parser_primary_expression): Handle RID_IS_LITERAL_TYPE.
	(cp_parser_trait_expr): Likewise.
libstdc++-v3/
	* include/std/type_traits (is_literal_type): New.

From-SVN: r166020
2010-10-27 17:43:33 -04:00
Jason Merrill 81f0bab25e c-common.c (check_case_value): Remove special C++ code.
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
2010-10-27 17:42:36 -04:00
Janus Weil 5ac13b8e0c re PR fortran/46161 ([OOP] Invalid: Passing non-polymorphic to allocatable polymorphic dummy)
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
2010-10-27 23:41:52 +02:00
Eric Botcazou cfc839a4b2 trans.c (gigi): Fix formatting issues.
* 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
2010-10-27 21:15:06 +00:00
Eric Botcazou 4a8f6a635a sol2-unwind.h (sparc64_fallback_frame_state): Adjust for newer Solaris 10 release.
* config/sparc/sol2-unwind.h (sparc64_fallback_frame_state): Adjust
	for newer Solaris 10 release.
	(sparc_fallback_frame_state): Likewise.

From-SVN: r166015
2010-10-27 20:34:36 +00:00
Gabriel Dos Reis 225a658415 method.c (synthesized_method_walk): Track constexprness too.
* 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
2010-10-27 16:11:29 -04:00
Gabriel Dos Reis 91ea6df357 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
2010-10-27 15:31:33 -04:00
Gabriel Dos Reis 3b49d762b5 class.c (check_bases): Propagate non-literality.
* 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
2010-10-27 15:04:06 -04:00
Jason Merrill 61f8d16512 call.c (build_integral_nontype_arg_conv): New.
* call.c (build_integral_nontype_arg_conv): New.
	* cp-tree.h: Declare it.
	* pt.c (convert_nontype_argument): Use it.

From-SVN: r166011
2010-10-27 11:59:54 -04:00
Jason Merrill 2842beb62d * error.c (dump_simple_decl): Print constexpr.
From-SVN: r166010
2010-10-27 11:54:45 -04:00
Jason Merrill efd7ad5c5e * cvt.c (build_up_reference): Use target_type for the temporary var.
From-SVN: r166009
2010-10-27 11:54:35 -04:00
Jason Merrill 73808ca6a4 * except.c (build_throw): Set EXPR_LOCATION.
From-SVN: r166008
2010-10-27 11:48:26 -04:00
Jason Merrill 236fd18cba * tree.c (build_cplus_new): Handle CONSTRUCTOR.
From-SVN: r166007
2010-10-27 11:48:16 -04:00
Jason Merrill e02927a11a semantics.c (finish_compound_stmt): Avoid creating an unnecessary BIND_EXPR.
* semantics.c (finish_compound_stmt): Avoid creating an
	unnecessary BIND_EXPR.

From-SVN: r166006
2010-10-27 11:48:09 -04:00
Jason Merrill bc8a0bd9fc call.c (convert_like_real): Don't check narrowing if the element is also an initializer-list.
* call.c (convert_like_real): Don't check narrowing if the element
	is also an initializer-list.

From-SVN: r166005
2010-10-27 11:48:01 -04:00
Jason Merrill 221925596f gimplify.c (gimplify_decl_expr): Handle anonymous artificial variables sooner.
* gimplify.c (gimplify_decl_expr): Handle anonymous artificial
	variables sooner.

From-SVN: r166004
2010-10-27 11:47:52 -04:00
Jie Zhang 84fabdde09 haifa-sched.c (ISSUE_POINTS): Remove.
* 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
2010-10-27 14:30:17 +00:00
Ian Lance Taylor 9c042d80ae Replace UNSPEC_STACK_CHECK with UNSPECV_SPLIT_STACK_RETURN.
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
2010-10-27 06:32:54 -07:00
H.J. Lu 2767a7f210 Add -mvzeroupper to x86.
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
2010-10-27 05:36:15 -07:00
Eric Botcazou 22bc122eca t-mingw32 (SHLIB_LC): Add -lmingwthrd.
* 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
2010-10-27 11:21:00 +00:00
Eric Botcazou 5d0d156482 w32-unwind.h (i386_w32_fallback_frame_state): Fix regnum of EBP.
* 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
2010-10-27 11:18:45 +00:00
Nicola Pero 200290f239 In gcc/: 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
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
2010-10-27 05:23:08 +00:00
Nicola Pero f614132bc7 In gcc/: 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
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
2010-10-27 04:37:47 +00:00
H.J. Lu 3e1484c9ee Put back unspec_volatile on split_stack_return.
2010-10-26  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.md (split_stack_return): Put back
	unspec_volatile.

From-SVN: r165995
2010-10-26 19:48:42 -07:00
GCC Administrator 78b9aee5d7 Daily bump.
From-SVN: r165994
2010-10-27 00:18:01 +00:00
Jan Hubicka ed62e0d9b7 ipa.c (process_references): Enqueue all referenced nodes; mark as reachable only non-external nodes.
* ipa.c (process_references): Enqueue all referenced nodes;
	mark as reachable only non-external nodes.
	(cgraph_remove_unreachable_nodes): All referenced nodes should
	be enqueued; remove bogues node->needed check.

From-SVN: r165990
2010-10-26 22:42:53 +00:00
Jan Hubicka 8c3800373f * cgraphbuild.c (build_cgraph_edges): Use ipa-reference to represent OMP.
From-SVN: r165989
2010-10-26 22:32:47 +00:00
Jan Hubicka d5fae4575b ipa.c (process_references): Enqueue all referenced nodes; mark as reachable only non-external nodes.
* ipa.c (process_references): Enqueue all referenced nodes;
	mark as reachable only non-external nodes.
	(cgraph_remove_unreachable_nodes): All referenced nodes should
	be enqueued; remove bogues node->needed check.

From-SVN: r165988
2010-10-26 21:33:37 +00:00
H.J. Lu 74288524a6 Replace unspec_volatile with unspec in split_stack_return.
From-SVN: r165987
2010-10-26 14:20:19 -07:00
Jan Hubicka eac8df5d45 Add missing testcase.
From-SVN: r165986
2010-10-26 21:20:00 +00:00
Jan Hubicka 030cd86c6d lto.c (add_cgraph_node_to_partition, [...]): Add debug info.
* lto.c (add_cgraph_node_to_partition,
	add_varpool_node_to_partition): Add debug info.
	(lto_1_to_1_map, lto_balanced_map): Do not re-add already
	partitioned nodes.
	(do_whole_program_analysis): Set function flags before dumping.

From-SVN: r165984
2010-10-26 20:10:03 +00:00
Jason Merrill 859b9bfa86 revert: pt.c (lookup_template_class): push_tinst_level around call to coerce_template_parms.
Revert
	* pt.c (lookup_template_class): push_tinst_level around call to
	coerce_template_parms.

From-SVN: r165982
2010-10-26 15:45:55 -04:00
Jerry DeLisle 33ede059c0 re PR fortran/46010 (I/O: Namelist-reading bug)
2010-10-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/46010
	* gfortran.dg/namelist_66.f90: New test.
	* gfortran.dg/fmt_t_6.f: Fix whitespace.

From-SVN: r165981
2010-10-26 19:34:21 +00:00
Jonathan Wakely d47abcca6d install.texi: Fix typo in --with-sysroot description.
2010-10-26  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* doc/install.texi: Fix typo in --with-sysroot description.

From-SVN: r165980
2010-10-26 20:07:01 +01:00
Jerry DeLisle 5609699aff re PR fortran/46010 (I/O: Namelist-reading bug)
2010-10-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/46010
	* io/list_read.c (nml_parse_qualifier): Add additional conditions for
	setting the end index for loop specification. Fix some whitespace.
	* io/write.c (write_default_char4): Const-ify the source argument.

From-SVN: r165979
2010-10-26 19:05:08 +00:00
Jan Hubicka 892ae21cc7 ipa.c (cgraph_externally_visible_p, [...]): Use info provided by linker plugin.
* ipa.c (cgraph_externally_visible_p, varpool_externally_visible_p):
	Use info provided by linker plugin.

From-SVN: r165978
2010-10-26 18:34:03 +00:00
Ralf Wildenhues 0e0f02ff92 Patch by Ralf Wildenhues.
* aclocal.m4 (AC_LANG_FUNC_LINK_TRY(C)): Delete.
	* configure: Regenerate.

From-SVN: r165977
2010-10-26 18:29:29 +00:00
Jason Merrill 534ecb1751 tree.c (build_vec_init_expr): Split out from...
* tree.c (build_vec_init_expr): Split out from...
	(build_array_copy): ...here.
	* init.c (perform_member_init): Use it.
	* cp-tree.h: Declare it.
	* cp-gimplify.c (cp_gimplify_init_expr): Don't gimplify the slot for
	VEC_INIT_EXPR and AGGR_INIT_EXPR here.  Drop pre/post parameters.
	(cp_gimplify_expr): Handle array default-initialization via
	VEC_INIT_EXPR.

From-SVN: r165976
2010-10-26 14:10:53 -04:00
Jason Merrill 73c982bc87 varasm.c (constructor_static_from_elts_p): Don't require a CONSTRUCTOR to have elements to be suitable for static...
* varasm.c (constructor_static_from_elts_p): Don't require a
	CONSTRUCTOR to have elements to be suitable for static
	initialization.  Allow ARRAY_TYPE as well.

From-SVN: r165975
2010-10-26 13:57:44 -04:00
Jason Merrill 701c0df13e pt.c (lookup_template_class): push_tinst_level around call to coerce_template_parms.
* pt.c (lookup_template_class): push_tinst_level around call to
	coerce_template_parms.

From-SVN: r165974
2010-10-26 13:57:30 -04:00
Janus Weil 2c80712872 re PR fortran/42647 ([F03] Missed initialization/dealloc of allocatable scalar DT with allocatable component)
2010-10-26  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/42647
	* trans.h (gfc_deallocate_scalar_with_status): New prototype.
	* trans.c (gfc_deallocate_scalar_with_status): New function for
	deallocation of allocatable scalars.
	* trans-array.c (structure_alloc_comps): Call it here ...
	* trans-decl.c (gfc_trans_deferred_vars): ... here ...
	* trans-stmt.c (gfc_trans_deallocate): ... and here.

2010-10-26  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/42647
	* gfortran.dg/allocatable_scalar_9.f90: Extended.
	* gfortran.dg/allocatable_scalar_10.f90: New.
	* gfortran.dg/class_19.f03: Extended.

From-SVN: r165973
2010-10-26 19:38:42 +02:00
Jan Hubicka 530f3a1bf6 re PR lto/45736 (ICE: in cgraph_remove_unreachable_nodes, at ipa.c:245 with -flto and attribute((constructor)))
PR middle-end/45736
	* cgraph.c (cgraph_set_readonly_flag): Rename to...
	(cgraph_set_const_flags) ... this one; get also looping argument;
	clear constructor/destructor flags.
	(cgraph_set_pure_flag): Likewise.
	(cgraph_set_looping_const_or_pure_flag): Remove.
	(cgraph_can_remove_if_no_direct_calls_and_refs): Do not try
	to optimize away static ctors/dtors; it does not work on inline clones;
	external functions can always be rmeoved.
	(cgraph_will_be_removed_from_program_if_no_direct_calls): Assert on inline
	clones; in LTO external functions always can go.
	(cgraph_used_from_object_file_p): Handle EXTERNAL functions correctly.
	(cgraph_mark_address_taken_node): Assert that we are not taking address of
	inline clone.
	(cgraph_can_remove_if_no_direct_calls_p): We always eventually remove
	external functions.
	* ipa-cp.c (ipcp_cloning_candidate_p): Do not clone functions with address taken.
	(ipcp_initialize_node_lattices): Only local functions can be handled without cloning.
	* cgraph.h (cgraph_set_readonly_flag,
	cgraph_set_looping_const_or_pure_flag): Remove.
	(cgraph_set_const_flag): Declare.
	(cgraph_set_pure_flag): Update.
	* ipa-pure-const (propagate_pure_const, local_pure_const): Update
	flags setting code.
	* ipa.c (cgraph_remove_unreachable_nodes): Fix formating; do not look at inline
	clones; fix handling of external definitions.
	(cgraph_postorder): Do not look at inline clones in the first pass.
	(function_and_variable_visibility): Drop constructors/destructor
	flags at pure and const functions.
	* tree-profile.c (tree_profiling): Update.
	* ipa-inline.c (cgraph_clone_inlined_nodes): Always clone functions with
	address taken; external functions do not account to whole program size.
	(cgraph_decide_inlining): Likewise; do not try to inline functions already
	inlined.
	* testsuite/gcc.dg/lto/pr45736_0.c: New function.

From-SVN: r165972
2010-10-26 16:40:16 +00:00
Jie Zhang 0d600fce5b invoke.texi: Improve documentation of -fstrict-volatile-bitfields.
* doc/invoke.texi: Improve documentation of
	-fstrict-volatile-bitfields.

From-SVN: r165971
2010-10-26 16:13:04 +00:00
Ira Rosen 75264e61bd re PR tree-optimization/46167 (ICE: SIGSEGV in flow_bb_inside_loop_p (cfgloop.c:776) with -O -ftree-vectorize)
PR tree-optimization/46167
	* tree-vect-patterns.c (vect_recog_dot_prod_pattern): Check that there
	is basic block for the statement.

From-SVN: r165970
2010-10-26 15:53:28 +00:00
Jason Merrill 883fff6cf7 * tree.c (stabilize_expr): Handle xvalues properly.
From-SVN: r165969
2010-10-26 11:02:54 -04:00
Jason Merrill 2dfa30b4c8 * call.c (build_over_call): Use argarray[0] for 'this' argument.
From-SVN: r165968
2010-10-26 11:02:47 -04:00
Jason Merrill d70a517942 * decl.c (finish_function): Don't look at function_depth.
From-SVN: r165967
2010-10-26 11:02:39 -04:00
Paul Koning 6e2f8c15bc pdp11.c (pdp11_f_format, [...]): Update to current definition of struct_real_format.
* config/pdp11/pdp11.c (pdp11_f_format, pdp11_d_format): Update to
current definition of struct_real_format.

From-SVN: r165966
2010-10-26 11:00:54 -04:00
H.J. Lu f28e93a8a5 Properly align parameters on stack for x86.
gcc/

2010-10-26  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/44948
	* config/i386/i386.c (ix86_old_function_arg_boundary): New.
	(ix86_function_arg_boundary): Always align parameters on stack
	in 64bit and align parameters with alignment >= 16byte on stack 
	in 32bit.  Warn alignment change.

gcc/testsuite/

2010-10-26  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/44948
	* g++.dg/abi/param2.C: Add -Wno-psabi for ilp32 x86.
	* g++.dg/vect/pr33860a.cc: Likewise.
	* gcc.c-torture/compile/20070522-1.c: Likewise.
	* gcc.dg/compat/struct-align-1_x.c: Likewise.
	* gcc.dg/compat/struct-align-1_y.c: Likewise.
	* gcc.dg/compat/struct-align-2_x.c: Likewise.
	* gcc.dg/compat/struct-align-2_y.c: Likewise.
	* gcc.dg/pr44136.c: Likewise.

	* gcc.c-torture/compile/pr33617.c: Add -Wno-psabi for x86.
	* gcc.dg/compat/vector-1_x.c: Likewise.
	* gcc.dg/compat/vector-1_y.c: Likewise.
	* gcc.dg/compat/vector-2_x.c: Likewise.
	* gcc.dg/compat/vector-2_y.c: Likewise.
	* gcc.dg/pr43300.c: Likewise.

	* gcc.dg/compat/vector-1a_x.c: Add -Wno-psabi.
	* gcc.dg/compat/vector-1a_y.c: Likewise.
	* gcc.dg/compat/vector-1b_x.c: Likewise.
	* gcc.dg/compat/vector-1b_y.c: Likewise.
	* gcc.dg/compat/vector-2a_x.c: Likewise.
	* gcc.dg/compat/vector-2a_y.c: Likewise.
	* gcc.dg/compat/vector-2b_x.c: Likewise.
	* gcc.dg/compat/vector-2b_y.c: Likewise.
	* gcc.target/i386/pr39162.c: Likewise.
	* gcc.target/i386/pr40906-2.c: Likewise.
	* gcc.target/i386/sse-5.c: Likewise.

	* gcc.dg/pr35442.c: Prune ABI change warnings.

	* gcc.c-torture/execute/pr38151.x: New.
	* gcc.target/i386/pr44948-1a.c: Likewise.
	* gcc.target/i386/pr44948-1b.c: Likewise.
	* gcc.target/i386/pr44948-2a.c: Likewise.
	* gcc.target/i386/pr44948-2b.c: Likewise.

From-SVN: r165965
2010-10-26 06:56:42 -07:00
Ian Lance Taylor 76d8a30aaf re PR middle-end/45687 (possible wrong code bug)
gcc/:
	PR middle-end/45687
	* ipa-prop.c (ipa_modify_call_arguments): Correct type of MEM_REF
	offset.
gcc/testsuite:
	* gcc.c-torture/execute/20101025-1.c: New test.

From-SVN: r165964
2010-10-26 13:39:37 +00:00