Fix PR c++/14777
gcc/cp/ChangeLog:
PR c++/14777
* cp-tree.def <TEMPLATE_INFO>: Declare new kind of tree
node.
* cp-tree.h (struct tree_template_info,
struct qualified_typedef_usage_s): New.
(cp_tree_node_structure_enum): add TS_CP_TEMPLATE_INFO.
(union lang_tree_node): Add template_info.
(TI_TEMPLATE, TI_ARGS, TI_TYPEDEFS_NEEDING_ACCESS_CHECKING):
Adjust.
(build_template_info): Declare.
(get_types_needing_access_check): Adjust return type.
(add_typedef_to_current_template_for_access_check): Declare.
* cp-objcp-common.c (cp_tree_size): Handle TEMPLATE_INFO.
* semantics.c (add_typedef_to_current_template_for_access_check):
Split from ...
(check_accessibility_of_qualified_id): ... here.
* decl.c (make_typename_type): Use it.
* pt.c (build_template_info): Define.
(check_explicit_specialization, find_parameter_packs_r,
push_template_decl_real, lookup_template_class,
for_each_template_parm_r, tsubst_decl, tsubst): Use
build_template_info.
(get_types_needing_access_check): Adjust return type.
(append_type_to_template_for_access_check_1): Record the
location of the usage point of the typedef. Adjust to TEMPLATE_INFO.
(append_type_to_template_for_access_check): Add new location
parameter. Pass it to append_type_to_template_for_access_check_1.
Adjust to TEMPLATE_INFO.
(perform_typedefs_access_check): Temporarily set input_location to
the usage point of the typedef we are checking access for. Adjust
to new TEMPLATE_INFO tree node.
* tree.c (bind_template_template_parm): Use build_template_info.
* call.c (add_template_candidate_real): Likewise.
* decl.c (grokfndecl): Likewise.
(cp_tree_node_structure): Handle TEMPLATE_INFO.
gcc/testsuite/ChangeLog:
PR c++/14777
* g++.dg/template/typedef13.C: Adjust.
* g++.dg/template/typedef19.C: Adjust.
* g++.dg/template/typedef20.C: Adjust.
* g++.dg/template/typedef22.C: New test.
From-SVN: r154443
2009-11-23 Paul Brook <paul@codesourcery.com>
gcc/
* config/arm/arm.c (arm_compute_save_reg0_reg12_mask): Add special
case for noreturn functions.
(arm_compute_save_reg_mask): Remove special noreturn handling.
From-SVN: r154441
* pex-unix.c (pex_child_error): Improve warning avoidance by
checking the results of write(3) and exiting with -2 if any write
returns a negative value.
Co-Authored-By: Ian Lance Taylor <iant@google.com>
From-SVN: r154431
./: * configure.ac: Change default of poststage1_ldflags to be empty if
poststage1_libs is set. When poststage1_libs is empty, and
ENABLE_BUILD_WITH_CXX is set, add -static-libgcc.
* configure: Rebuild.
gcc/:
* Makefile.in (HOST_LIBS): Move higher in file.
(LINKER, LINKER_FLAGS): If ENABLE_BUILD_WITH_CXX, but $(HOST_LIBS)
is not empty, set to $(CC) and $(CFLAGS).
From-SVN: r154422
2009-11-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/41807
* trans-const.c (gfc_conv_const): Fix typo in comment. Replace assert
with error message if not constant.
* resolve.c (next_data_value): Delete check for constant.
From-SVN: r154420
2009-11-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
* trans-const.c (gfc_conv_const): Fix typo in comment. Replace assert
with error message if not constant.
* resolve.c (next_data_value): Delete check for constant.
From-SVN: r154418
2009-11-22 Martin Jambor <mjambor@suse.cz>
* tree-cfg.c (verify_types_in_gimple_reference): Error out on
V_C_E of an SSA_NAME or an invariant if lvalue is required.
(verify_gimple_call): Verify LHS also with with
verify_types_in_gimple_reference.
From-SVN: r154414
2009-11-21 Martin Jambor <mjambor@suse.cz>
PR middle-end/42025
* tree-sra.c (access_precludes_ipa_sra_p): New function.
(splice_param_accesses): Check all accesses by calling
access_precludes_ipa_sra_p.
(sra_ipa_modify_expr): Rename argument erite to dont_convert and do
not convert types if it is true.
(sra_ipa_modify_assign): Convert types in case of mismatch.
* testsuite/gcc.c-torture/compile/pr42025-1.c: New test.
* testsuite/gcc.c-torture/compile/pr42025-2.c: New test.
From-SVN: r154413
* config/mips/mips-protos.h (mulsidi3_gen_fn): New typedef.
(mips_mulsidi3_gen_fn): Declare new function.
* config/mips/mips.c (mips_mulsidi3_gen_fn): New function.
* config/mips/mips.md (<u>mulsidi3): Change condition to use
mips_mulsidi3_gen_fn. Use mips_mulsidi3_gen_fn to generate the
insn.
(<u>mulsidi3_64bit): Don't match for ISA_HAS_DMUL3.
(mulsidi3_64bit_dmul): New define_insn.
testsuite/
* gcc.target/mips/mult-1.c: Forbid octeon.
* gcc.target/mips/octeon-dmul-3.c: New test.
From-SVN: r154410
PR c++/9050, DR 147, DR 318
* parser.c (cp_parser_lookup_name): If the name matches the explicit
class scope, we're naming the constructor.
(cp_parser_constructor_declarator_p): Just use cp_parser_unqualified_id
if we have a nested-name-specifier.
(cp_parser_direct_declarator): Handle getting an overload set as a
constructor declarator.
(cp_parser_unqualified_id): Avoid looking up the constructor when
naming the destructor.
(cp_parser_diagnose_invalid_type_name): Give good
diagnostic for improper use of constructor as template.
* typeck.c (finish_class_member_access_expr): Give good diagnostic
about calling constructor.
* error.c (dump_aggr_type): Don't print A::A for injected-class-name.
From-SVN: r154403
PR Testsuite/42114
* gcc-dg/c99-stdint-1.c: Condition test for target without signal.h. XFAIL ptrdiff range test for avr.
* gcc-dg/c99-stdint-2.c: XFAIL for avr target.
* gcc-dg/c99-stdint-5.c: Condition test for target without signal.h.
* gcc-dg/c99-stdint-6.c: Ditto.
From-SVN: r154392
* config/i386/i386-builtin-types.awk: New file.
* config/i386/i386-builtin-types.def: New file.
* config/i386/t-i386: Use them to build i386-builtin-types.inc.
* config/i386/i386.c: Include it.
(ix86_builtin_type_tab, ix86_get_builtin_type): New.
(ix86_builtin_func_type_tab, ix86_get_builtin_func_type): New.
(struct builtin_isa): Remove GTY marker. Replace tree type with
ix86_builtin_func_type; add set_and_not_built_p.
(def_builtin): Change type parameter to tcode; use
ix86_get_builtin_func_type; update all callers. Accept zero mask
to mean the builtin is unconditionally available.
(ix86_add_new_builtins): Use set_and_not_built_p instead of type
being set to NULL.
(enum ix86_special_builtin_type, enum ix86_builtin_type): Remove.
Update some users to rationalized enumeration codes from new include.
(enum multi_arg_type): Remove. Replace all enumeration values
with defines to new ix86_builtin_func_type.
(ix86_init_mmx_sse_builtins): Don't build any types here. Defer
all type resolution to def_builtin.
(ix86_init_builtin_types): Split out from ...
(ix86_init_builtins): ... here. Use ix86_get_builtin_func_type.
From-SVN: r154388
gcc/cp/
2009-11-20 Simon Martin <simartin@users.sourceforge.net>
PR c++/38646
* pt.c (process_partial_specialization): Do not turn wrongly located
parameter pack arguments into error_mark_node.
Split too long lines into two.
gcc/testsuite/
2009-11-20 Simon Martin <simartin@users.sourceforge.net>
PR c++/38646
* g++.dg/cpp0x/pr38646.C: New test.
From-SVN: r154378
2009-11-17 Olga Golovanevsky <olga@il.ibm.com>
PR middle-end/39960
* ipa-struct-reorg.c (find_pos_in_stmt): New parameter.
(ref_pos): New field in structure.
(insert_new_var_in_stmt): New function.
From-SVN: r154374
cp/
2009-11-20 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/42060
* except.c (build_throw): Check the tree returned by
decay_conversion for error_mark_node.
testsuite/
2009-11-20 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/42060
* g++.dg/cpp0x/initlist28.C: New.
From-SVN: r154371
2009-11-20 Paul Thomas <pault@gcc.gnu.org>
Janus Weil <janus@gcc.gnu.org>
PR fortran/42104
* trans-expr.c (gfc_conv_procedure_call): If procedure pointer
component call, use the component's 'always_explicit' attr
for array arguments.
2009-11-20 Paul Thomas <pault@gcc.gnu.org>
Janus Weil <janus@gcc.gnu.org>
PR fortran/42104
* gfortran.dg/proc_ptr_comp_23.f90 : New test.
Co-Authored-By: Janus Weil <janus@gcc.gnu.org>
From-SVN: r154358
PR c++/42115
* call.c (build_op_delete_call): Don't complain about using
op delete (void *, size_t) for placement delete if there's an
op delete (void *).
From-SVN: r154357