2005-10-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/24440
* resolve.c (resolve_symbol): Correct error in check for
assumed size array with default initializer by testing
for arrayspec before dereferencing it.
From-SVN: r105596
PR c++/23293
* pt.c (convert_template_argument): Use canonical type variants in
template specializations.
PR c++/23293
* g++.dg/template/error19.C: New test.
From-SVN: r105561
PR middle-end/23522
* fold-const.c (fold_widened_comparison): Do not allow range based
constant folding when right operand cannot be unwidened.
Co-Authored-By: Ian Lance Taylor <ian@airs.com>
From-SVN: r105536
* config/sparc/sparc.c (function_arg_slotno): In 64-bit mode, align
the slot on an even boundary for any type with 16-byte alignment.
From-SVN: r105524
PR c++/23440
* parser.c (cp_parser_statement): If the parser reached CPP_EOF,
only complain about missing statement.
* g++.dg/parse/for1.C: New test.
From-SVN: r105520
2005-10-17 Paul Thomas <pault@gcc.gnu.org>
PR fortran/23446
* gfortran.h: Primitive for gfc_is_formal_arg.
* resolve.c(gfc_is_formal_arg): New function to signal across
several function calls that formal argument lists are being
processed.
(resolve_formal_arglist): Set/reset the flag for gfc_is_formal_arg.
*expr.c(check_restricted): Add check, via gfc_is_formal_arg, if
symbol is part of an formal argument declaration.
PR fortran/21459
* decl.c (add_init_expr_to_sym): Make a new character
length for each variable, when the expression is NULL
and link to cl_list.
PR fortran/20866
* match.c (recursive_stmt_fcn): New function that tests if
a statement function resurses through itself or other other
statement functions.
(gfc_match_st_function): Call recursive_stmt_fcn to check
if this is recursive and to raise error if so.
PR fortran/20849
PR fortran/20853
* resolve.c (resolve_symbol): Errors for assumed size arrays
with default initializer and for external objects with an
initializer.
PR fortran/20837
* decl.c (match_attr_spec): Prevent PUBLIC from being used
outside a module.
2005-10-17 Paul Thomas <pault@gcc.gnu.org>
PR fortran/23446
* gfortran.dg/host_dummy_index_1.f90: New test.
PR fortran/21459
gfortran.dg/automatic_char_len_2.f90: New test.
PR fortran/20866
gfortran.dg/recursive_statement_functions.f90: New test.
PR fortran/20853
gfortran.dg/assumed_size_dt_dummy.f90: New test.
PR fortran/20849
gfortran.dg/external_initializer.f90: New test.
PR fortran/20837
non_module_public.f90: New test.
From-SVN: r105518
2005-10-17 Jonathan Wakely <redi@gcc.gnu.org>
PR libstdc++/24244
* include/tr1/boost_shared_ptr.h (_Sp_counted_base::_Sp_counted_base()):
When __GTHREAD_MUTEX_INIT is defined, initialize the mutex.
From-SVN: r105506
2005-10-17 Andreas Krebbel <krebbel1@de.ibm.com>
* objc-act.c (objc_build_component_ref): Adjust call to
finish_class_member_access_expr due to a changed prototype.
From-SVN: r105503
* config/sh/sh.h (OPTIMIZATION_OPTIONS): Set flag_schedule_insns
to 2 if it's already non-zero.
(OVERRIDE_OPTIONS): Clear flag_schedule_insns if flag_exceptions
is set and warn about it if flag_schedule_insns is 1.
From-SVN: r105496
2005-10-16 Andrew Pinski <pinskia@physics.uc.edu>
PR driver/22544
* gcc.c (have_c): New static variable.
(have_o): Likewise.
(process_command): Remove declation of have_c.
Set have_o to 1 when handling -o.
(main): Add a fatel error if there are multiple
files specified and -o and -c/-S is passed witout
-combine or multiple languages.
From-SVN: r105487
2005-10-16 Daniel Berlin <dberlin@dberlin.org>
Fix PR tree-optimization/22444
* tree-ssa-alias.c (compute_flow_insensitive_aliasing):
Assert that we don't hit something with subvars.
(setup_pointers_and_addressables): Don't add things with subvars,
because we'll already process the subvars for aliasing purposes.
From-SVN: r105486
2005-10-16 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/23959
* decl.c (pop_switch): Only call c_do_switch_warnings
when not processing templates.
2005-10-16 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/23959
* g++.dg/warn/Wswitch-default-1.C: New test.
* g++.dg/warn/Wswitch-default-2.C: New test.
From-SVN: r105466
PR c++/22137
* cp-tree.h (QUALIFIED_NAME_IS_TEMPLATE): New macro.
(check_template_keyword): New function.
(finish_id_expression): Change prototoype.
(finish_qualified_id_expr): Change prototype.
(build_qualified_name): New function.
(finish_class_member_access_expr): Change prototype.
* init.c (build_offset_ref): Use build_qualified_name.
* mangle.c (write_expression): Likewise.
* parser.c (cp_parser_primary_expression): Remove qualifying_class
parameter. Add address_p and template_arg_p. Use
build_qualified_name.
(cp_parser_id_expression): Default *template_p to
template_keyword_p. Check for invalid uses of the template
keyword.
(cp_parser_postfix_expression): Eliminate special handling for
qualified names. Adjust call to cp_parser_primary_expression.
(cp_parser_postfix_dot_deref_expression): Adjust call to
cp_parser_id_expression and finish_class_member_access_expr.
(cp_parser_template_argument_list): Add comment.
(cp_parser_template_argument): Adjust use of
cp_parser_primary_expression. Remove call to
finish_qualified_id_expr.
(cp_parser_lookup_name): Use build_qualified_name.
* pt.c (tsubst): Use build_qualified_name.
(tsubst_qualified_id): Likewise. Adjust call to
finish_qualified_id_expr.
(tsubst_copy): Use build_qualified_name.
(tsubst_copy_and_build): Adjusts call to finish_id_expression and
finish_class_member_access_expr.
* semantics.c (finish_non_static_data_member): Use
build_qualified_name.
(finish_qualified_id_expr): Add template_p and template_arg_p
parameters.
(finish_id_expression): Remove qualifiying_class parameter. Add
template_p, done, address_p, and template_arg_p. Use
build_qualified_name. Adjust calls to
finish_class_member_acess_expr.
* tree.c (build_qualified_name): New function.
* typeck.c (check_template_keyword): New function.
(finish_class_member_access_expr): Add template_p argument. Check
for invalid uses of the template keyword.
PR c++/22137
* g++.dg/parse/template18.C: New test.
* g++.dg/template/nontype15.C: Likewise.
From-SVN: r105463
* gimplify.c (gimplify_var_or_parm_decl): Split out from ...
(gimplify_expr): ... here.
(gimplify_compound_lval): Use it in initial scan loop. Allow
fb_lvalue in base expression.
From-SVN: r105458