PR c++/22464
* semantics.c (finish_id_expression): Issue errors about uses of
local variables in containing functions even in templates.
PR c++/22180
* call.c (build_new_method_call): Correct pretty-printing of
destructor names.
* pt.c (tsubst_qualified_id): Recognize invalid uses of "~T" as an
identifier.
PR c++/23694
* decl.c (start_method): Return error_mark_node for errors.
PR c++/23307
* pt.c (push_template_decl_real): Complain about attempts to
declare template variables.
PR c++/22352
* pt.c (tsubst_template_parms): Set processing_template_decl while
processing the parameters.
(tsubst_decl): Set processing_template_decl when substituting into
a TEMPLATE_DECL.
PR c++/22405
* pt.c (most_specialized_instantiation): Robustify.
PR c++/22464
* g++.dg/template/crash/41.C: New test.
PR c++/22180
* g++.dg/template/crash40.C: New test.
PR c++/23694
* g++.dg/parse/friend5.C: New test.
PR c++/23307
* g++.dg/template/crash38.C: New test.
PR c++/22352
* g++.dg/template/friend38.C: New test.
PR c++/22405
* g++.dg/template/crash39.C: New test.
From-SVN: r105365
2005-10-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/24092
* trans-types.c (gfc_get_derived_type): Insert code to obtain backend
declaration for derived types, building if necessary. Return the
derived type if the fields have been built by this process. Otherwise,
continue as before but using the already obtained backend_decls for the
derived type components. Change the gcc_assert to act on the field.
2005-10-10 Paul Thomas <pault@gcc.gnu.org>
PR fortran/24092
* gfortran.dg/derived_pointer_recursion.f90: New test.
From-SVN: r105331
2005-10-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/18082
* decl.c (variable_decl): Make a new copy of the character
length for each variable, when the expression is not a
constant.
2005-10-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/18082
gfortran.dg/automatic_char_len_1.f90: New test.
From-SVN: r105329
* gfortran.h: Add bitmasks for different FPE traps. Add fpe
member to options_t.
* invoke.texi: Document the new -ffpe-trap option.
* lang.opt: Add -ffpe-trap option.
* options.c (gfc_init_options): Initialize the FPE option.
(gfc_handle_fpe_trap_option): New function to parse the argument
of the -ffpe-trap option.
(gfc_handle_option): Add case for -ffpe-trap.
* trans-decl.c: Declare a tree for the set_fpe library function.
(gfc_build_builtin_function_decls): Build this tree.
(gfc_generate_function_code): Generate a call to set_fpe at
the beginning of the main program.
* trans.h: New tree for the set_fpe library function.
* Makefile.am: Add fpu.c to the build process, and
target-dependent code as fpu-target.h.
* Makefile.in: Regenerate.
* configure.ac: Add call to configure.host to set
FPU_HOST_HEADER.
* configure: Regenerate.
* config.h.in: Regenerate.
* aclocal.m4: Regenerate.
* configure.host: New script to determine which host-dependent
code should go in.
* libgfortran.h: Add fpe option, remove previous fpu_ options.
Add bitmasks for different FPE traps. Add prototype for set_fpu.
* runtime/environ.c: Remove environment variables to control
fpu behaviour.
* runtime/fpu.c (set_fpe): New function for the front-end.
* runtime/main.c (init): Set FPU state.
* config: New directory to store host-dependent code.
* config/fpu-387.h: New file with code handling the i387 FPU.
* config/fpu-glibc.h: New file with code for glibc systems.
* config/fpu-generic.h: Fallback for the most generic host. Issue
warnings.
From-SVN: r105328
2005-10-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/20847
PR fortran/20856
* symbol.c (check_conflict): Prevent common variables and
function results from having the SAVE attribute,as required
by the standard.
2005-10-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/20847
gfortran.dg/save_common.f90: New test.
PR fortran/20856
gfortran.dg/save_result.f90: New test.
From-SVN: r105325
2005-10-12 Janne Blomqvist <jblomqvi@cc.hut.fi>
* io/unix.c: Remove parts of patch of 2005/10/07 that cause
input from the terminal to hang.
From-SVN: r105324
cp:
PR c++/21592
* pt.c (build_non_dependent_expr): Don't wrap a COMPONENT_REF
with already looked up member functions. Assert we're not
returning a NON_DEPENDENT_EXPR with unknown type.
* typeck.c (finish_class_member_access_expr): We can get
non-template-id-expr baselinks. If the lookup finds a baselink,
remember it even inside templates.
testsuite:
PR c++/21592
* g++.dg/template/dependent-expr1.C: Add new expected error.
* g++.dg/template/dependent-expr2.C: Adjust error text.
* g++.dg/template/overload6.C: New.
From-SVN: r105313
cp:
PR c++/23797
* parser.c (cp_parser_functional_cast): Cope when TYPE is not a
TYPE_DECL. Use dependent_type_p to check type.
* pt.c (uses_template_parms_p): Use dependent_type_p for a
TYPE_DECL.
(type_dependent_expression_p): Assert we've not been given a
TYPE_DECL.
testsuite:
PR c++/23797
* g++.dg/other/typename8.C: New.
From-SVN: r105312
cp:
PR c++/21117
* decl.c (check_function_type): Correctly overwrite incomplete
return type with void type.
* typeck.c (check_return_expr): If the function's return type is
void, don't try and convert a return expr.
testsuite:
PR c++/21117
* g++.dg/other/return1.C: New.
From-SVN: r105310
2005-10-12 Paolo Bonzini <bonzini@gnu.org>
PR c++/24052
* error.c (dump_expr): Pass LABEL_DECL to dump_decl. Print
an ADDR_EXPR of a LABEL_DECL as &&.
==> testsuite/ChangeLog <==
2005-10-12 Paolo Bonzini <bonzini@gnu.org>
PR c++/24052
* g++.dg/ext/label5.C: New.
From-SVN: r105297
PR c++/19964
* stor-layout.c (place_field): Set DECL_FIELD_OFFSET and
DECL_FIELD_BIT_OFFSET of FIELD_DECLs, even if they have an invalid
type.
cp:
PR c++/19964
* cp/class.c (walk_subobject_offsets): Don't walk error_mark_node.
testsuite:
PR c++/19964
* g++.dg/parse/crash31.C: New.
From-SVN: r105293
* gcc.dg/ipa/ipa-1.c: New test.
* gcc.dg/ipa/ipa-2.c: New test.
* gcc.dg/ipa/ipa-3.c: New test.
* gcc.dg/ipa/ipa-4.c: New test.
* gcc.dg/ipa/ipa-5.c: New test.
* gcc.dg/ipa/ipa.exp: New file.
From-SVN: r105291
2005-10-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/24207
* resolve.c (resolve_symbol): Exclude use and host associated
symbols from the test for private objects in a public namelist.
2005-10-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/24207
gfortran.dg/private_type_3.f90: New test.
From-SVN: r105289
* trans-common.c (build_field): Fix comment typo.
(create_common): Set backend_decl of COMMON or EQUIVALENCEd
variables to a VAR_DECL with the COMPONENT_REF in
DECL_HAS_VALUE_EXPR rather than COMPONENT_REF directly.
* f95-lang.c (gfc_expand_function): Emit debug info for
EQUIVALENCEd variables if the equiv union is going to be output.
From-SVN: r105288
PR fortran/20786
* iresolve.c (gfc_resolve_aint, gfc_resolve_anint ): Type conversion
of the argument.
gfortran.dg/aint_anint_1.f90: New test.
From-SVN: r105276
PR rtl-optimization/13931
* combine.c: Revert patch of 2003-05-14, and:
(try_combine): Only set elim_i1 and elim_i2 if the destination is
completely killed in the appropriate insn.
(distribute_notes): Don't skip multiple hard register test for
elim_i1 and elim_i2.
From-SVN: r105275
PR libgfortran/24313
* c99_functions.c (csqrtf, csqrt): Fix choice of branch cut. Note
csqrt{f} were imported from glibc, and this bug is still present
there. glibc PR is 1146.
From-SVN: r105274
PR c/24255
* c-typeck.c (convert_for_assignment): Use build_constructor_single
to initialize a transparent union instead of a nop_expr.
From-SVN: r105270
PR c++/21089
* call.c (convert_like_real): Use decl_constant_value, not
integral_constant_value.
* init.c (constant_value_1): New function.
(integral_constant_value): Use it.
(decl_constant_value): Likewise.
* typeck.c (decay_conversion): Use decl_constant_value, not
integral_constant_value.
PR c++/21089
* g++.dg/init/float1.C: New test.
From-SVN: r105256
PR middle-end/24263
* convert.c (convert_to_real): Revert 2005-10-05 patch.
Only apply the optimization for rounding builtins if the inner
cast is also an extension.
From-SVN: r105249
PR c++/21369
* parser.c (cp_parser_elaborated_type_specifier): Don't treat
class types as templates if the type is not appearing as part of a
type definition or declaration.
PR c++/21369
* g++.dg/parse/ret-type3.C: New test.
From-SVN: r105241
* config/i386/i386.md (movsi_1, movdi_1_rex64): Use mmxadd type
for setting MMX register to 0 rather than mmx.
* g++.dg/opt/mmx2.C: New test.
From-SVN: r105230