Dale Johannesen [Mon, 28 Oct 2002 20:39:53 +0000 (20:39 +0000)]
re PR target/7133 (PPC: unrecognizable insn)
2002-10-21 Dale Johannesen <dalej@apple.com>
PR target/7133
* config/rs6000/rs6000.c (rs6000_reverse_condition): Handle
unsafe math reversals correctly for RTL generation.
(output_cbranch): Replace rs6000_reverse_condition call
by its former definition.
Zack Weinberg [Fri, 25 Oct 2002 22:11:19 +0000 (22:11 +0000)]
re PR c++/6994 (ICE in find_function_data)
PR middle-end/6994
* c-objc-common.c (inline_forbidden_p): Can not inline
functions containing structures or unions containing VLAs.
* tree-inline.c (walk_tree): For all class 't' nodes, walk
TYPE_SIZE and TYPE_SIZE_UNIT. #undef WALK_SUBTREE_TAIL at end.
(copy_tree_r): Copy types if they are variably modified.
* hooks.c (hook_tree_bool_false): New.
* hooks.h: Prototype it.
* langhooks.h (struct lang_hooks_for_tree_inlining): Add
var_mod_type_p.
* langhooks-def.h: Default for tree_inlining.var_mod_type_p is
hook_tree_bool_false.
* tree.c (variably_modified_type_p): Moved here from
cp/tree.c. Use lang_hooks.tree_inlining.var_mod_type_p for
language-specific cases. Due to this, must weaken some 'if
and only if' checks to merely 'if'.
* tree.h: Prototype variably_modified_type_p.
cp:
* cp-lang.c (cp_var_mod_type_p): New: C++ hook for
variably_modified_type_p.
* cp-tree.h: Remove prototype of variably_modified_type_p.
* tree.c (variably_modified_type_p): Remove; now implemented
in language-independent code.
PR c++/7266
* decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
SCOPE_REF is not null before dereferencing it.
testsuite:
* g++.dg/ext/vla1.C, gcc.dg/vla-2.c,
g++.dg/template/typename3.C: New tests.
David Edelsohn [Fri, 25 Oct 2002 15:20:30 +0000 (15:20 +0000)]
re PR c++/7228 (ICE when using member template and template function)
PR c++/7228
* cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
lang_type structure exists before accessing field.
(SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
(CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
(SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
* class.c (check_field_decls): Use new macros.
* typeck2.c (process_init_constructor): Remove redundant check for
existence of lang_type structure.
re PR rtl-optimization/7944 (gcc 3.2: Internal compiler error in find_reloads_toplev, at reload.c:4462)
PR opt/7944
* reload.c (find_reloads_toplev): Use simplify_gen_subreg; mode
of X is not important when simplifying subregs of constants.
* g++.dg/opt/reload1.C: New.
Mark Mitchell [Wed, 23 Oct 2002 21:56:55 +0000 (21:56 +0000)]
re PR c++/7679 (The compiler crashes wen a right parentesis is missing)
PR c++/7679
* spew.c (next_token): Do not return an endless stream of
END_OF_SAVED_INPUT tokens.
(snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
the cached token stream.
(snarf_defarg): Likewise.
Nathan Sidwell [Tue, 22 Oct 2002 09:06:19 +0000 (09:06 +0000)]
re PR c++/7209 (Faulty array dereferencing)
PR c++/7209
* fold_const.c (fold_binary_op_with_conditional_arg): Always
build compound_expr if we used save_expr.
testsuite:
* g++.dg/expr: New directory.
* g++.dg/expr/cond1.C: New test.
2002-06-13 Akim Demaille <akim@epita.fr>
* parse.y (class_declaration, interface_declaration): Make sure
all their rules have an action, in order to avoid meaningless `$$
= $1' and their type clashes.
Matthias Klose [Mon, 21 Oct 2002 18:38:39 +0000 (18:38 +0000)]
[multiple changes]
2002-10-21 Matthias Klose <doko@debian.org>
* Backport, without whitespace change:
2002-06-19 Akim Demaille <akim@epita.fr>
* parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
decl.h's TYPENAME.
* spew.c, lex.c: Adjust.
* parse.y (explicit_instantiation): Add empty action to override
the default $$ = $1 where it introduces a type clash.
* docs/html/install.html: Add eqs_MX, en_PH to required locales list.
2002-10-16 Benjamin Kosnik <bkoz@redhat.com>
* src/globals.cc (__gnu_cxx::c_locale_impl_compat): Add, alias to
c_locale_impl.
* testsuite/abi_check.cc (line_to_symbol_info): Collect size info.
* docs/html/abi.txt: Update.
2002-10-16 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/22_locale/static_members.cc (test02): Less provincial.
2002-10-16 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/22_locale/static_members.cc (test02): Disable for
systems without named locale support.
* testsuite/22_locale/ctor_copy_dtor.cc (test04): Don't assume
running the testsuites in "C" environment.
Add new tests.
* docs/html/22_locale/locale.html: Update.
2002-10-16 Paolo Carlini <pcarlini@unitus.it>
Benjamin Kosnik <bkoz@redhat.com>
* include/bits/localefwd.h (class locale): Add static member
_S_num_extra_categories, encoding the number of additional
categories.
Change _S_num_categories to _S_categories_size.
(class locale::_Impl): Add _M_c_cats.
(class locale::_Impl::_M_names): Change to array of chars.
(class locale::_Impl::_M_check_same_name): Use
_S_extra_categories_size, tweak.
(locale::locale(const locale&, _Facet*)): Ditto.
* src/locale.cc (locale::locale(const char* )): Rewrite to deal
with the environment in a POSIX-compliant way while being thread
safe.
(locale::name()): Update to output POSIX environment strings.
* src/localename.cc
(locale::_Impl::_Impl(const _Impl&, size_t): Use
_S_categories_size_*, tweak.
(locale::_Impl::_Impl(facet**, size_t, bool)): Ditto.
(locale::_Impl::_Impl(const char*, size_t)): Name each category
individually.
(locale::_Impl::_M_replace_categories): Use strcpy.
* include/bits/locale_facets.h (numpunct::_M_initialize_numpunct):
Change default argument to NULL from _S_c_locale.
(timepunct::_M_initialize_timepunct): Same.
_S_c_locale cleanups.
* src/codecvt.c: _S_c_locale simplification.
* src/ctype.c: Same.
* src/globals.cc: Add fake_name.
* src/locale-inst.cc: Remove extra includes.
* src/locale.cc: Remove extra includes.
Add _S_extra_categories_size definition.
Correct "C" initialization.
(locale::facet::facet): Don't initialize _S_c_locale.
(locale::facet::_M_remove_reference): Adjust.
* src/localename: Use facet_vec, facet_name.
(locale::_Impl::_Impl(facet** __f, size_t __refs, bool)): Set
facet ref counts to one. Initialize _S_c_locale.
(locale::_Impl::_M_install_facet(id*, facet*)): Adjust facet ref
counts when installing unilaterally.
Mark Mitchell [Fri, 11 Oct 2002 22:42:21 +0000 (22:42 +0000)]
re PR c++/5661 (Gcc 3.0.3 Seg faults compiling bad code)
PR c++/5661
* g++.dg/ext/vlm1.C: New test.
* g++.dg/ext/vlm2.C: Likewise.
PR c++/5661
* cp-tree.h (variably_modified_type_p): New function.
(grokdeclarator) Tighten check for variably modified types as
fields.
* pt.c (convert_template_argument): Do not allow variably modified
types as template arguments.
* tree.c (variably_modified_type_p): New function.
Jan Hubicka [Thu, 10 Oct 2002 15:40:20 +0000 (17:40 +0200)]
re PR rtl-optimization/7951 (ICE on -march=pentium4 -O2 -mfpmath=sse)
PR ice/7951
* reload1.c (emit_input_reload_insns): Use constrain_operands
instead of constraint_accepts_reg_p to verify optimization.
(constraint_accepts_reg_p): Kill
Zack Weinberg [Wed, 9 Oct 2002 21:31:03 +0000 (21:31 +0000)]
re PR c/7353 (Compiler dies on known working code (as of gcc 3.0))
PR c/7353
gcc:
* c-decl.c (start_decl): Unconditionally issue error for
'typedef foo = bar'.
(finish_decl): Remove special case for TYPE_DECL with initializer.
* doc/extend.texi: Delete "Naming Types" section. Change all
cross-references to that section to refer to "Typeof" instead.
Add the useful safe-max()-macro example from "Naming Types" to
"Typeof", rewritten using that extension.
gcc/cp:
* decl.c (start_decl): Unconditionally issue error for
'typedef foo = bar'.
(cp_finish_decl): Remove special case for TYPE_DECL with initializer.
(grokdeclarator): Remove redundant error for 'typedef foo = bar'.
gcc/testsuite:
* g++.dg/ext/typedef-init.C: New test.
* gcc.dg/typedef-init.c: New test.
Mark Mitchell [Tue, 8 Oct 2002 22:53:21 +0000 (22:53 +0000)]
re PR c++/7754 (ICE SIGSEGV on union with template parameter)
PR c++/7754
* decl2.c (finish_anon_union): Do not expand anonymous unions when
procesing template functions.
* pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
type. Call layout_decl.
(tsubst_expr, case DECL_STMT): Handle anonymous unions.