diff options
author | Jakub Jelinek <jakub@redhat.com> | 2006-06-19 15:08:22 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2006-06-19 15:08:22 +0000 |
commit | 3cda30bc0b047012b90e967b624cb23ad4db243f (patch) | |
tree | 39051b1769e5a3764e9565153ac3d140a09d5c1e | |
parent | 77a6dd46ab6fb98b242ef2501cc9fac9c2c7b2d9 (diff) |
svn merge -r114555:114766 svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_1-branch
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/redhat/gcc-4_1-branch@114775 138bc75d-0d04-0410-961f-82ee72b054a4
54 files changed, 827 insertions, 448 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8e173f550bf..18ff930fe72 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,58 @@ +2006-06-18 Roger Sayle <roger@eyesopen.com> + + PR middle-end/27802 + * reg-stack.c (subst_stack_regs): Handle noreturn function calls + that (would) return their results in stack registers. + +2006-06-16 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/27830 + * tree-inline.c (copy_body_r): For copying the operand + of an ADDR_EXPR make sure to fold &* afterwards. + +2006-06-14 Roger Sayle <roger@eyesopen.com> + + PR target/27858 + Revert incorrect fix for PR target/27158 + 2006-05-11 Roger Sayle <roger@eyesopen.com> + * reload.c (find_reloads_toplev): Only return the simplified SUBREG + of a reg_equiv_constant if the result is a legitimate constant. + +2006-06-14 Roger Sayle <roger@eyesopen.com> + + PR target/27158 + * config/rs6000/rs6000.c (const_vector_elt_as_int): New function to + extract a CONST_VECTOR element and interpret it as an integer. + (vspltis_constant): Use const_vector_elt_as_int instead of the + macro CONST_VECTOR_ELT in order to handle FP vector modes. + * config/rs6000/predicates.md (easy_vector_const): Consider + floating point ALTIVEC_VECTOR_MODEs via easy_altivec_constant. + +2006-06-14 Andreas Krebbel <krebbel1@de.ibm.com> + + PR middle-end/27959 + * reload1.c (reload): Remove registers returned by update_eliminables + from used_spill_regs. + +2005-06-13 Bernd Schmidt <bernd.schmidt@analog.com> + + PR bootstrap/22541 + From Dan Kegel <dank@kegel.com>: + * Makefile.in: Strip "dir/../" combinations from SYSTEM_INCLUDE_DIR. + +2006-06-13 Paolo Bonzini <bonzini@gnu.org> + + PR middle-end/27733 + * expmed.c (struct alg_hash_entry): Fix type of field T + to match synth_mult argument. + (NUM_ALG_HASH_ENTRIES): Make it bigger for 64-bit HOST_WIDE_INT. + +2006-06-12 Volker Reichelt <reichelt@igpm.rwth-aachen.de> + + PR target/27421 + * config/i386/i386.c (classify_argument): Skip fields with invalid + types in unions. + 2006-06-09 Ralf Corsepius <ralf.corsepius@rtems.org> * config/mips/t-rtems: Add EL/EB multilib variants. diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 80296175dc2..4df857dc3eb 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20060612 +20060619 diff --git a/gcc/Makefile.in b/gcc/Makefile.in index f58661179db..61a5ac2f728 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -388,7 +388,10 @@ NATIVE_SYSTEM_HEADER_DIR = /usr/include CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@ # autoconf sets SYSTEM_HEADER_DIR to one of the above. -SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@ +# Purge it of unneccessary internal relative paths +# to directories that might not exist yet. +# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta. +SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta` # Control whether to run fixproto and fixincludes. STMP_FIXPROTO = @STMP_FIXPROTO@ @@ -3177,13 +3180,16 @@ s-macro_list : $(GCC_PASSES) ../$(build_subdir)/fixincludes/fixincl: ; @ : # Build fixed copies of system files. +# Abort if no system headers available, unless building a crosscompiler. +# FIXME: abort unless building --without-headers would be more accurate and less ugly stmp-fixinc: gsyslimits.h macro_list \ $(build_objdir)/fixincludes/fixincl \ $(build_objdir)/fixincludes/fixinc.sh @if ! $(inhibit_libc) && test ! -d ${SYSTEM_HEADER_DIR}; then \ echo The directory that should contain system headers does not exist: >&2 ; \ echo " ${SYSTEM_HEADER_DIR}" >&2 ; \ - if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \ + tooldir_sysinc=`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`; \ + if test "x${SYSTEM_HEADER_DIR}" = "x${tooldir_sysinc}"; \ then sleep 1; else exit 1; fi; \ fi rm -rf include; mkdir include diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index b693584e1fa..f2da34f8061 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -2992,6 +2992,10 @@ classify_argument (enum machine_mode mode, tree type, if (TREE_CODE (field) == FIELD_DECL) { int num; + + if (TREE_TYPE (field) == error_mark_node) + continue; + num = classify_argument (TYPE_MODE (TREE_TYPE (field)), TREE_TYPE (field), subclasses, bit_offset); diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md index 8545983d840..88833099c37 100644 --- a/gcc/config/rs6000/predicates.md +++ b/gcc/config/rs6000/predicates.md @@ -275,9 +275,6 @@ { if (zero_constant (op, mode)) return true; - if (GET_MODE_CLASS (mode) != MODE_VECTOR_INT) - return false; - return easy_altivec_constant (op, mode); } diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index de146a07f42..28434f413f2 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -2075,6 +2075,22 @@ num_insns_constant (rtx op, enum machine_mode mode) } +/* Interpret element ELT of the CONST_VECTOR OP as an integer value. + If the mode of OP is MODE_VECTOR_INT, this simply returns the + corresponding element of the vector, but for V4SFmode and V2SFmode, + the corresponding "float" is interpreted as an SImode integer. */ + +static HOST_WIDE_INT +const_vector_elt_as_int (rtx op, unsigned int elt) +{ + rtx tmp = CONST_VECTOR_ELT (op, elt); + if (GET_MODE (op) == V4SFmode + || GET_MODE (op) == V2SFmode) + tmp = gen_lowpart (SImode, tmp); + return INTVAL (tmp); +} + + /* Return true if OP can be synthesized with a particular vspltisb, vspltish or vspltisw instruction. OP is a CONST_VECTOR. Which instruction is used depends on STEP and COPIES, one of which will be 1. If COPIES > 1, @@ -2093,8 +2109,7 @@ vspltis_constant (rtx op, unsigned step, unsigned copies) unsigned bitsize = GET_MODE_BITSIZE (inner); unsigned mask = GET_MODE_MASK (inner); - rtx last = CONST_VECTOR_ELT (op, nunits - 1); - HOST_WIDE_INT val = INTVAL (last); + HOST_WIDE_INT val = const_vector_elt_as_int (op, nunits - 1); HOST_WIDE_INT splat_val = val; HOST_WIDE_INT msb_val = val > 0 ? 0 : -1; @@ -2134,7 +2149,7 @@ vspltis_constant (rtx op, unsigned step, unsigned copies) else desired_val = msb_val; - if (desired_val != INTVAL (CONST_VECTOR_ELT (op, i))) + if (desired_val != const_vector_elt_as_int (op, i)) return false; } diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 56895077bc9..e5a28a9e8cb 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,79 @@ +2006-06-16 Mark Mitchell <mark@codesourcery.com> + + PR c++/27884 + * decl.c (have_extern_spec): Remove. + (start_decl): Do not check have_extern_spec. + (start_function): Likewise. + * cp-tree.h (have_extern_spec): Remove. + * parser.c (cp_parser_linkage_specification): Don't set + have_extern_spec. + (cp_parser_init_declarator): Likewise. + (cp_parser_parameter_declaration): Do not treat parameters as + within the scope of an unbraced linkage specification. + +2006-06-15 Mark Mitchell <mark@codesourcery.com> + + PR c++/27689 + * cp-tree.h (CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P): New + macro. + * pt.c (unify): Use it. + +2006-06-15 Mark Mitchell <mark@codesourcery.com> + + PR c++/27666 + * call.c (build_conditional_expr): Robustify. + +2006-06-15 Mark Mitchell <mark@codesourcery.com> + + PR c++/27665 + * parser.c (cp_parser_unqualified_id): Use constructor_name_p to + identify destructors. + (cp_parser_nested_name_specifier_opt): Remove invalid + optimization. + (cp_parser_template_id): Refine heuristic for determining whether + we are entering a scope. + +2006-06-14 Mark Mitchell <mark@codesourcery.com> + + PR c++/27648 + * parser.c (cp_parser_declarator): Robustify. + +2006-06-14 Mark Mitchell <mark@codesourcery.com> + + PR c++/26559 + * pt.c (value_dependent_expression_p): All CALL_EXPRs are dependent. + +2006-06-13 Mark Mitchell <mark@codesourcery.com> + + PR c++/27227 + * decl.c (decls_match): Allow an extern "C" variable declarations + from different namespaces to match. + (duplicate_decls): Disallow redeclaring a variable with a + different linkage specification. + +2006-06-14 Gabriel Dos Reis <gdr@integrable-solutions.net> + + * cp-tree.def: Fix typo. + +2006-06-13 Roger Sayle <roger@eyesopen.com> + + PR c++/21210 + * typeck2.c (build_functional_cast): Use cp_convert to construct + non-aggregate initializers instead of the user-level build_c_cast. + +2006-06-12 Volker Reichelt <reichelt@igpm.rwth-aachen.de> + + PR c++/27601 + * semantics.c (finish_offsetof): Handle pseudo-destructors. + + PR c++/27933 + * name-lookup.c (lookup_qualified_name): Always return error_mark_node + if lookup fails. + + PR c++/27951 + * decl2.c (finish_anon_union): Return early if build_anon_union_vars + fails. + 2006-06-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de> PR c++/27601 diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 58bca7a82f6..4d34a4cc4dd 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -3297,12 +3297,21 @@ build_conditional_expr (tree arg1, tree arg2, tree arg3) arg2 = convert_like (conv2, arg2); arg2 = convert_from_reference (arg2); arg2_type = TREE_TYPE (arg2); + /* Even if CONV2 is a valid conversion, the result of the + conversion may be invalid. For example, if ARG3 has type + "volatile X", and X does not have a copy constructor + accepting a "volatile X&", then even if ARG2 can be + converted to X, the conversion will fail. */ + if (error_operand_p (arg2)) + result = error_mark_node; } else if (conv3 && (!conv3->bad_p || !conv2)) { arg3 = convert_like (conv3, arg3); arg3 = convert_from_reference (arg3); arg3_type = TREE_TYPE (arg3); + if (error_operand_p (arg3)) + result = error_mark_node; } /* Free all the conversions we allocated. */ diff --git a/gcc/cp/cp-tree.def b/gcc/cp/cp-tree.def index 6b04818e0c3..55ef21ef790 100644 --- a/gcc/cp/cp-tree.def +++ b/gcc/cp/cp-tree.def @@ -168,7 +168,7 @@ DEFTREECODE (TEMPLATE_TEMPLATE_PARM, "template_template_parm", tcc_type, 0) BOUND_TEMPLATE_TEMPLATE_PARM. */ /* Index into a template parameter list. This parameter must be a type. - The type.value field will be a TEMPLATE_PARM_INDEX. */ + The type.values field will be a TEMPLATE_PARM_INDEX. */ DEFTREECODE (TEMPLATE_TYPE_PARM, "template_type_parm", tcc_type, 0) /* A type designated by `typename T::t'. TYPE_CONTEXT is `T', diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index ffb8c301a6d..6acd000f0e6 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -1107,14 +1107,6 @@ struct lang_type GTY(()) #endif /* ENABLE_TREE_CHECKING */ -/* Indicates whether or not (and how) a template was expanded for this class. - 0=no information yet/non-template class - 1=implicit template instantiation - 2=explicit template specialization - 3=explicit template instantiation */ -#define CLASSTYPE_USE_TEMPLATE(NODE) \ - (LANG_TYPE_CLASS_CHECK (NODE)->use_template) - /* Fields used for storing information before the class is defined. After the class is defined, these fields hold other information. */ @@ -2074,15 +2066,15 @@ extern void decl_shadowed_for_var_insert (tree, tree); (DECL_LANG_SPECIFIC (DECL)->decl_flags.deferred) /* If non-NULL for a VAR_DECL, FUNCTION_DECL, TYPE_DECL or - TEMPLATE_DECL, the entity is a template specialization. In that - case, DECL_TEMPLATE_INFO is a TREE_LIST, whose TREE_PURPOSE is the - TEMPLATE_DECL of which this entity is a specialization. The TREE_ - TREE_VALUE is the template arguments used to specialize the - template. - - In general, DECL_TEMPLATE_INFO is non-NULL only if - DECL_USE_TEMPLATE is nonzero. However, for friends, we sometimes - have DECL_TEMPLATE_INFO even when DECL_USE_TEMPLATE is zero. + TEMPLATE_DECL, the entity is either a template specialization (if + DECL_USE_TEMPLATE is non-zero) or the abstract instance of the + template itself. + + In either case, DECL_TEMPLATE_INFO is a TREE_LIST, whose + TREE_PURPOSE is the TEMPLATE_DECL of which this entity is a + specialization or abstract instance. The TREE_VALUE is the + template arguments used to specialize the template. + Consider: template <typename T> struct S { friend void f(T) {} }; @@ -2090,7 +2082,8 @@ extern void decl_shadowed_for_var_insert (tree, tree); In this case, S<int>::f is, from the point of view of the compiler, an instantiation of a template -- but, from the point of view of the language, each instantiation of S results in a wholly unrelated - global function f. */ + global function f. In this case, DECL_TEMPLATE_INFO for S<int>::f + will be non-NULL, but DECL_USE_TEMPLATE will be zero. */ #define DECL_TEMPLATE_INFO(NODE) \ (DECL_LANG_SPECIFIC (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK (NODE)) \ ->decl_flags.u.template_info) @@ -2218,6 +2211,16 @@ extern void decl_shadowed_for_var_insert (tree, tree); are always the full set of arguments required to instantiate this declaration from the most general template specialized here. */ #define DECL_TI_ARGS(NODE) TI_ARGS (DECL_TEMPLATE_INFO (NODE)) + +/* The TEMPLATE_DECL associated with NODE, a class type. Even if NODE + will be generated from a partial specialization, the TEMPLATE_DECL + referred to here will be the original template. For example, + given: + + template <typename T> struct S {}; + template <typename T> struct S<T*> {}; + + the CLASSTPYE_TI_TEMPLATE for S<int*> will be S, not the S<T*>. */ #define CLASSTYPE_TI_TEMPLATE(NODE) TI_TEMPLATE (CLASSTYPE_TEMPLATE_INFO (NODE)) #define CLASSTYPE_TI_ARGS(NODE) TI_ARGS (CLASSTYPE_TEMPLATE_INFO (NODE)) @@ -2230,7 +2233,7 @@ extern void decl_shadowed_for_var_insert (tree, tree); (CLASSTYPE_TI_TEMPLATE ((TYPE))))) \ : (TYPE)) -/* Like DECL_TI_TEMPLATE, but for an ENUMERAL_, RECORD_, or UNION_TYPE. */ +/* Like CLASS_TI_TEMPLATE, but also works for ENUMERAL_TYPEs. */ #define TYPE_TI_TEMPLATE(NODE) \ (TI_TEMPLATE (TYPE_TEMPLATE_INFO (NODE))) @@ -2825,17 +2828,38 @@ extern void decl_shadowed_for_var_insert (tree, tree); /* Returns nonzero if NODE is a primary template. */ #define PRIMARY_TEMPLATE_P(NODE) (DECL_PRIMARY_TEMPLATE (NODE) == (NODE)) -/* Indicates whether or not (and how) a template was expanded for this - FUNCTION_DECL or VAR_DECL. - 0=normal declaration, e.g. int min (int, int); - 1=implicit template instantiation - 2=explicit template specialization, e.g. int min<int> (int, int); - 3=explicit template instantiation, e.g. template int min<int> (int, int); +/* Non-zero iff NODE is a specialization of a template. The value + indicates the type of specializations: + + 1=implicit instantiation + 2=explicit specialization, e.g. int min<int> (int, int); + 3=explicit instantiation, e.g. template int min<int> (int, int); - If DECL_USE_TEMPLATE is nonzero, then DECL_TEMPLATE_INFO will also + Note that NODE will be marked as a specialization even if the + template it is instantiating is not a primary template. For + example, given: + + template <typename T> struct O { + void f(); + struct I {}; + }; + + both O<int>::f and O<int>::I will be marked as instantiations. + + If DECL_USE_TEMPLATE is non-zero, then DECL_TEMPLATE_INFO will also be non-NULL. */ #define DECL_USE_TEMPLATE(NODE) (DECL_LANG_SPECIFIC (NODE)->decl_flags.use_template) +/* Like DECL_USE_TEMPLATE, but for class types. */ +#define CLASSTYPE_USE_TEMPLATE(NODE) \ + (LANG_TYPE_CLASS_CHECK (NODE)->use_template) + +/* True if NODE is a specialization of a primary template. */ +#define CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P(NODE) \ + (CLASS_TYPE_P (NODE) \ + && CLASSTYPE_USE_TEMPLATE (NODE) \ + && PRIMARY_TEMPLATE_P (CLASSTYPE_TI_TEMPLATE (arg))) + #define DECL_TEMPLATE_INSTANTIATION(NODE) (DECL_USE_TEMPLATE (NODE) & 1) #define CLASSTYPE_TEMPLATE_INSTANTIATION(NODE) \ (CLASSTYPE_USE_TEMPLATE (NODE) & 1) @@ -3910,8 +3934,6 @@ extern void initialize_artificial_var (tree, tree); extern tree check_var_type (tree, tree); extern tree reshape_init (tree, tree); -extern bool have_extern_spec; - /* in decl2.c */ extern bool check_java_method (tree); extern cp_cv_quals grok_method_quals (tree, tree, cp_cv_quals); diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 25c00e697d3..f8fea66e37d 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -242,10 +242,6 @@ enum deprecated_states { static enum deprecated_states deprecated_state = DEPRECATED_NORMAL; -/* True if a declaration with an `extern' linkage specifier is being - processed. */ -bool have_extern_spec; - /* A TREE_LIST of VAR_DECLs. The TREE_PURPOSE is a RECORD_TYPE or UNION_TYPE; the TREE_VALUE is a VAR_DECL with that type. At the @@ -1001,7 +997,13 @@ decls_match (tree newdecl, tree olddecl) /* Need to check scope for variable declaration (VAR_DECL). For typedef (TYPE_DECL), scope is ignored. */ if (TREE_CODE (newdecl) == VAR_DECL - && CP_DECL_CONTEXT (newdecl) != CP_DECL_CONTEXT (olddecl)) + && CP_DECL_CONTEXT (newdecl) != CP_DECL_CONTEXT (olddecl) + /* [dcl.link] + Two declarations for an object with C language linkage + with the same name (ignoring the namespace that qualify + it) that appear in different namespace scopes refer to + the same object. */ + && !(DECL_EXTERN_C_P (olddecl) && DECL_EXTERN_C_P (newdecl))) return 0; if (TREE_TYPE (newdecl) == error_mark_node) @@ -1456,14 +1458,42 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) warning (0, "prototype for %q+#D", newdecl); warning (0, "%Jfollows non-prototype definition here", olddecl); } - else if (TREE_CODE (olddecl) == FUNCTION_DECL + else if ((TREE_CODE (olddecl) == FUNCTION_DECL + || TREE_CODE (olddecl) == VAR_DECL) && DECL_LANGUAGE (newdecl) != DECL_LANGUAGE (olddecl)) { - /* extern "C" int foo (); - int foo () { bar (); } - is OK. */ + /* [dcl.link] + If two declarations of the same function or object + specify different linkage-specifications ..., the program + is ill-formed.... Except for functions with C++ linkage, + a function declaration without a linkage specification + shall not precede the first linkage specification for + that function. A function can be declared without a + linkage specification after an explicit linkage + specification has been seen; the linkage explicitly + specified in the earlier declaration is not affected by + such a function declaration. + + DR 563 raises the question why the restrictions on + functions should not also apply to objects. Older + versions of G++ silently ignore the linkage-specification + for this example: + + namespace N { + extern int i; + extern "C" int i; + } + + which is clearly wrong. Therefore, we now treat objects + like functions. */ if (current_lang_depth () == 0) - SET_DECL_LANGUAGE (newdecl, DECL_LANGUAGE (olddecl)); + { + /* There is no explicit linkage-specification, so we use + the linkage from the previous declaration. */ + if (!DECL_LANG_SPECIFIC (newdecl)) + retrofit_lang_decl (newdecl); + SET_DECL_LANGUAGE (newdecl, DECL_LANGUAGE (olddecl)); + } else { error ("previous declaration of %q+#D with %qL linkage", @@ -3784,13 +3814,6 @@ start_decl (const cp_declarator *declarator, *pushed_scope_p = NULL_TREE; - /* This should only be done once on the top most decl. */ - if (have_extern_spec) - { - declspecs->storage_class = sc_extern; - have_extern_spec = false; - } - /* An object declared as __attribute__((deprecated)) suppresses warnings of uses of other deprecated items. */ if (lookup_attribute ("deprecated", attributes)) @@ -10604,13 +10627,6 @@ start_function (cp_decl_specifier_seq *declspecs, { tree decl1; - if (have_extern_spec) - { - declspecs->storage_class = sc_extern; - /* This should only be done once on the outermost decl. */ - have_extern_spec = false; - } - decl1 = grokdeclarator (declarator, declspecs, FUNCDEF, 1, &attrs); /* If the declarator is not suitable for a function definition, cause a syntax error. */ diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 9705a3ec19c..65dc40368fa 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -1150,6 +1150,8 @@ finish_anon_union (tree anon_union_decl) } main_decl = build_anon_union_vars (type, anon_union_decl); + if (main_decl == error_mark_node) + return; if (main_decl == NULL_TREE) { warning (0, "anonymous union with no members"); diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 3ca3c18c587..8d84dc1fd2f 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -3723,6 +3723,7 @@ tree lookup_qualified_name (tree scope, tree name, bool is_type_p, bool complain) { int flags = 0; + tree t = NULL_TREE; if (TREE_CODE (scope) == NAMESPACE_DECL) { @@ -3732,17 +3733,14 @@ lookup_qualified_name (tree scope, tree name, bool is_type_p, bool complain) if (is_type_p) flags |= LOOKUP_PREFER_TYPES; if (qualified_lookup_using_namespace (name, scope, &binding, flags)) - return select_decl (&binding, flags); + t = select_decl (&binding, flags); } else if (is_aggr_type (scope, complain)) - { - tree t; - t = lookup_member (scope, name, 2, is_type_p); - if (t) - return t; - } + t = lookup_member (scope, name, 2, is_type_p); - return error_mark_node; + if (!t) + return error_mark_node; + return t; } /* Subroutine of unqualified_namespace_lookup: diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index c25dd1caf74..c8f6c28e470 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -3373,12 +3373,12 @@ cp_parser_unqualified_id (cp_parser* parser, qualifying_scope = parser->qualifying_scope; /* If the name is of the form "X::~X" it's OK. */ + token = cp_lexer_peek_token (parser->lexer); if (scope && TYPE_P (scope) - && cp_lexer_next_token_is (parser->lexer, CPP_NAME) + && token->type == CPP_NAME && (cp_lexer_peek_nth_token (parser->lexer, 2)->type == CPP_OPEN_PAREN) - && (cp_lexer_peek_token (parser->lexer)->value - == TYPE_IDENTIFIER (scope))) + && constructor_name_p (token->value, scope)) { cp_lexer_consume_token (parser->lexer); return build_nt (BIT_NOT_EXPR, scope); @@ -3547,20 +3547,6 @@ cp_parser_nested_name_specifier_opt (cp_parser *parser, cp_token_position start = 0; cp_token *token; - /* If the next token corresponds to a nested name specifier, there - is no need to reparse it. However, if CHECK_DEPENDENCY_P is - false, it may have been true before, in which case something - like `A<X>::B<Y>::C' may have resulted in a nested-name-specifier - of `A<X>::', where it should now be `A<X>::B<Y>::'. So, when - CHECK_DEPENDENCY_P is false, we have to fall through into the - main loop. */ - if (check_dependency_p - && cp_lexer_next_token_is (parser->lexer, CPP_NESTED_NAME_SPECIFIER)) - { - cp_parser_pre_parsed_nested_name_specifier (parser); - return parser->scope; - } - /* Remember where the nested-name-specifier starts. */ if (cp_parser_uncommitted_to_tentative_parse_p (parser)) { @@ -3660,6 +3646,8 @@ cp_parser_nested_name_specifier_opt (cp_parser *parser, class-or-namespace-name. */ parser->scope = old_scope; parser->qualifying_scope = saved_qualifying_scope; + if (cp_parser_uncommitted_to_tentative_parse_p (parser)) + break; /* If the next token is an identifier, and the one after that is a `::', then any valid interpretation would have found a class-or-namespace-name. */ @@ -7717,9 +7705,7 @@ cp_parser_linkage_specification (cp_parser* parser) saved_in_unbraced_linkage_specification_p = parser->in_unbraced_linkage_specification_p; parser->in_unbraced_linkage_specification_p = true; - have_extern_spec = true; cp_parser_declaration (parser); - have_extern_spec = false; parser->in_unbraced_linkage_specification_p = saved_in_unbraced_linkage_specification_p; } @@ -8771,10 +8757,19 @@ cp_parser_template_id (cp_parser *parser, template_id = build_min_nt (TEMPLATE_ID_EXPR, template, arguments); else if (DECL_CLASS_TEMPLATE_P (template) || DECL_TEMPLATE_TEMPLATE_PARM_P (template)) - template_id - = finish_template_type (template, arguments, - cp_lexer_next_token_is (parser->lexer, - CPP_SCOPE)); + { + bool entering_scope; + /* In "template <typename T> ... A<T>::", A<T> is the abstract A + template (rather than some instantiation thereof) only if + is not nested within some other construct. For example, in + "template <typename T> void f(T) { A<T>::", A<T> is just an + instantiation of A. */ + entering_scope = (template_parm_scope_p () + && cp_lexer_next_token_is (parser->lexer, + CPP_SCOPE)); + template_id + = finish_template_type (template, arguments, entering_scope); + } else { /* If it's not a class-template or a template-template, it should be @@ -11034,10 +11029,7 @@ cp_parser_init_declarator (cp_parser* parser, if (!member_p) { if (parser->in_unbraced_linkage_specification_p) - { - decl_specifiers->storage_class = sc_extern; - have_extern_spec = false; - } + decl_specifiers->storage_class = sc_extern; decl = start_decl (declarator, decl_specifiers, is_initialized, attributes, prefix_attributes, &pushed_scope); @@ -11251,7 +11243,7 @@ cp_parser_declarator (cp_parser* parser, member_p); } - if (attributes && declarator != cp_error_declarator) + if (attributes && declarator && declarator != cp_error_declarator) declarator->attributes = attributes; return declarator; @@ -12085,9 +12077,16 @@ cp_parser_parameter_declaration_list (cp_parser* parser, bool *is_error) { cp_parameter_declarator *parameters = NULL; cp_parameter_declarator **tail = ¶meters; + bool saved_in_unbraced_linkage_specification_p; /* Assume all will go well. */ *is_error = false; + /* The special considerations that apply to a function within an + unbraced linkage specifications do not apply to the parameters + to the function. */ + saved_in_unbraced_linkage_specification_p + = parser->in_unbraced_linkage_specification_p; + parser->in_unbraced_linkage_specification_p = false; /* Look for more parameters. */ while (true) @@ -12166,6 +12165,9 @@ cp_parser_parameter_declaration_list (cp_parser* parser, bool *is_error) } } + parser->in_unbraced_linkage_specification_p + = saved_in_unbraced_linkage_specification_p; + return parameters; } diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index d8c0364ea34..5ae98e58c89 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -10190,7 +10190,7 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict) /* ARG must be constructed from a template class or a template template parameter. */ if (TREE_CODE (arg) != BOUND_TEMPLATE_TEMPLATE_PARM - && (TREE_CODE (arg) != RECORD_TYPE || !CLASSTYPE_TEMPLATE_INFO (arg))) + && !CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P (arg)) return 1; { @@ -12577,32 +12577,10 @@ value_dependent_expression_p (tree expression) || value_dependent_expression_p (TREE_OPERAND (expression, 1))); case CALL_EXPR: - /* A CALL_EXPR is value-dependent if any argument is - value-dependent. Why do we have to handle CALL_EXPRs in this - function at all? First, some function calls, those for which - value_dependent_expression_p is true, man appear in constant - expressions. Second, there appear to be bugs which result in - other CALL_EXPRs reaching this point. */ - { - tree function = TREE_OPERAND (expression, 0); - tree args = TREE_OPERAND (expression, 1); - - if (value_dependent_expression_p (function)) - return true; - - if (! args) - return false; - - if (TREE_CODE (args) == TREE_LIST) - { - for (; args; args = TREE_CHAIN (args)) - if (value_dependent_expression_p (TREE_VALUE (args))) - return true; - return false; - } - - return value_dependent_expression_p (args); - } + /* A CALL_EXPR may appear in a constant expression if it is a + call to a builtin function, e.g., __builtin_constant_p. All + such calls are value-dependent. */ + return true; default: /* A constant expression is value-dependent if any subexpression is diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index d778ed98955..31d03109040 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -2882,6 +2882,12 @@ finish_typeof (tree expr) tree finish_offsetof (tree expr) { + if (TREE_CODE (expr) == PSEUDO_DTOR_EXPR) + { + error ("cannot apply %<offsetof%> to destructor %<~%T%>", + TREE_OPERAND (expr, 2)); + return error_mark_node; + } if (TREE_CODE (TREE_TYPE (expr)) == FUNCTION_TYPE || TREE_CODE (TREE_TYPE (expr)) == METHOD_TYPE || TREE_CODE (TREE_TYPE (expr)) == UNKNOWN_TYPE) diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index c6f16840baa..98d0fcf207c 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -1320,12 +1320,11 @@ build_functional_cast (tree exp, tree parms) if (! IS_AGGR_TYPE (type)) { - /* This must build a C cast. */ if (parms == NULL_TREE) - parms = integer_zero_node; - else - parms = build_x_compound_expr_from_list (parms, "functional cast"); + return cp_convert (type, integer_zero_node); + /* This must build a C cast. */ + parms = build_x_compound_expr_from_list (parms, "functional cast"); return build_c_cast (type, parms); } diff --git a/gcc/expmed.c b/gcc/expmed.c index 82ebb21f889..3dbcb962ec1 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -2386,7 +2386,7 @@ struct algorithm /* The entry for our multiplication cache/hash table. */ struct alg_hash_entry { /* The number we are multiplying by. */ - unsigned int t; + unsigned HOST_WIDE_INT t; /* The mode in which we are multiplying something by T. */ enum machine_mode mode; @@ -2401,7 +2401,11 @@ struct alg_hash_entry { }; /* The number of cache/hash entries. */ +#if HOST_BITS_PER_WIDE_INT == 64 +#define NUM_ALG_HASH_ENTRIES 1031 +#else #define NUM_ALG_HASH_ENTRIES 307 +#endif /* Each entry of ALG_HASH caches alg_code for some integer. This is actually a hash table. If we have a collision, that the older diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 28a9af363bc..feaa4feeb39 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2006-06-15 Asher Langton <langton2@llnl.gov> + + PR fortran/27786 + * trans-array.c (gfc_conv_array_ref): Eliminate bounds checking + for assumed-size Cray pointees. + 2006-06-09 Jakub Jelinek <jakub@redhat.com> PR fortran/27916 diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index d7c94992778..3f654b66cc7 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -1945,7 +1945,8 @@ gfc_conv_array_ref (gfc_se * se, gfc_array_ref * ar) gfc_add_block_to_block (&se->pre, &indexse.pre); if (flag_bounds_check && - (ar->as->type != AS_ASSUMED_SIZE || n < ar->dimen - 1)) + ((ar->as->type != AS_ASSUMED_SIZE && !ar->as->cp_was_assumed) + || n < ar->dimen - 1)) { /* Check array bounds. */ tree cond; diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c index 665311c2b6b..131f7b0c1ff 100644 --- a/gcc/reg-stack.c +++ b/gcc/reg-stack.c @@ -2269,6 +2269,16 @@ subst_stack_regs (rtx insn, stack regstack) if (NOTE_P (insn) || INSN_DELETED_P (insn)) return control_flow_insn_deleted; + /* If this a noreturn call, we can't insert pop insns after it. + Instead, reset the stack state to empty. */ + if (CALL_P (insn) + && find_reg_note (insn, REG_NORETURN, NULL)) + { + regstack->top = -1; + CLEAR_HARD_REG_SET (regstack->reg_set); + return control_flow_insn_deleted; + } + /* If there is a REG_UNUSED note on a stack register on this insn, the indicated reg must be popped. The REG_UNUSED note is removed, since the form of the newly emitted pop insn references the reg, diff --git a/gcc/reload.c b/gcc/reload.c index 16832c8bfda..39a2f06caf7 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -4594,8 +4594,7 @@ find_reloads_toplev (rtx x, int opnum, enum reload_type type, && reg_renumber[regno] < 0 && reg_equiv_constant[regno] != 0 && (tem = gen_lowpart_common (GET_MODE (x), - reg_equiv_constant[regno])) != 0 - && LEGITIMATE_CONSTANT_P (tem)) + reg_equiv_constant[regno])) != 0) return tem; if (regno >= FIRST_PSEUDO_REGISTER @@ -4606,8 +4605,7 @@ find_reloads_toplev (rtx x, int opnum, enum reload_type type, simplify_gen_subreg (GET_MODE (x), reg_equiv_constant[regno], GET_MODE (SUBREG_REG (x)), SUBREG_BYTE (x)); gcc_assert (tem); - if (LEGITIMATE_CONSTANT_P (tem)) - return tem; + return tem; } /* If the subreg contains a reg that will be converted to a mem, diff --git a/gcc/reload1.c b/gcc/reload1.c index f86c55bc4ce..42f186f7bc8 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -987,6 +987,8 @@ reload (rtx first, int global) HARD_REG_SET to_spill; CLEAR_HARD_REG_SET (to_spill); update_eliminables (&to_spill); + AND_COMPL_HARD_REG_SET(used_spill_regs, to_spill); + for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) if (TEST_HARD_REG_BIT (to_spill, i)) { diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2656c319c29..d72e2b26817 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,84 @@ +2006-06-18 Roger Sayle <roger@eyesopen.com> + + PR middle-end/27802 + * gcc.dg/pr27802-1.c: New test case. + +2006-06-16 Mark Mitchell <mark@codesourcery.com> + + PR c++/27884 + * g++.dg/parse/linkage2.C: New test + +2006-06-16 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/27830 + * g++.dg/tree-ssa/pr27830.C: New testcase. + +2006-06-15 Mark Mitchell <mark@codesourcery.com> + + PR c++/27689 + * g++.dg/template/ttp18.C: New test. + * g++.dg/template/ttp19.C: Likewise. + +2006-06-15 Mark Mitchell <mark@codesourcery.com> + + PR c++/27666 + * g++.dg/expr/cond9.C: New test. + +2006-06-15 Mark Mitchell <mark@codesourcery.com> + + PR c++/27665 + * g++.dg/template/crash52.C: New test. + +2006-06-15 Asher Langton <langton2@llnl.gov> + + PR fortran/27786 + * cray_pointers_2.f90: Add -fbounds-check compile flag. + +2006-06-15 Janis Johnson <janis187@us.ibm.com> + + * gcc.dg/vmx/pr27842.c: Remove dg-do directive; use default. + * gcc.dg/vmx/pr27006.c: Ditto. + +2006-06-14 Mark Mitchell <mark@codesourcery.com> + + PR c++/27648 + * g++.dg/ext/attrib22.C: New test. + +2006-06-14 Mark Mitchell <mark@codesourcery.com> + + PR c++/26559 + * g++.dg/template/builtin1.C: New test. + +2006-06-14 Mark Mitchell <mark@codesourcery.com> + + PR c++/27227 + * g++.dg/lookup/linkage1.C: New test. + * g++.dg/lookup/linkage2.C: Likewise. + +2006-06-14 Andreas Krebbel <krebbel1@de.ibm.com> + + PR middle-end/27959 + * gcc.dg/pr27959.c: New testcase. + +2006-06-13 Roger Sayle <roger@eyesopen.com> + + PR c++/21210 + * g++.dg/init/complex1.C: New test case. + +2006-06-12 Volker Reichelt <reichelt@igpm.rwth-aachen.de> + + PR c++/27601 + * g++.dg/ext/offsetof1.C: Add test for pseudo-destructors. + + PR target/27421 + * gcc.dg/union-3.c: New test. + + PR c++/27933 + * g++.dg/lookup/using15.C: New test. + + PR c++/27951 + * g++.dg/other/anon4.C: New test. + 2006-06-09 Jakub Jelinek <jakub@redhat.com> PR c/27747 diff --git a/gcc/testsuite/g++.dg/expr/cond9.C b/gcc/testsuite/g++.dg/expr/cond9.C new file mode 100644 index 00000000000..9e8f08c1d6b --- /dev/null +++ b/gcc/testsuite/g++.dg/expr/cond9.C @@ -0,0 +1,10 @@ +// PR c++/27666 + +struct A { // { dg-error "A" } + A(int); // { dg-error "A" } +}; + +void foo(volatile A a) { + 1 ? a : 0; // { dg-error "match|temporary" } + 1 ? 0 : a; // { dg-error "match|temporary" } +} diff --git a/gcc/testsuite/g++.dg/ext/attrib22.C b/gcc/testsuite/g++.dg/ext/attrib22.C new file mode 100644 index 00000000000..5304a35d177 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/attrib22.C @@ -0,0 +1,6 @@ +// PR c++/27648 + +void f() +{ + static_cast<float *__attribute((unused))>(0); // { dg-error "expected" } +} diff --git a/gcc/testsuite/g++.dg/ext/offsetof1.C b/gcc/testsuite/g++.dg/ext/offsetof1.C index 0cfabf8033c..e59442de4ed 100644 --- a/gcc/testsuite/g++.dg/ext/offsetof1.C +++ b/gcc/testsuite/g++.dg/ext/offsetof1.C @@ -10,3 +10,9 @@ struct bar { int a = __builtin_offsetof(bar, foo); // { dg-error "static data member" } int b = __builtin_offsetof(bar, baz); // { dg-error "member function" } int c = __builtin_offsetof(bar, ~bar); // { dg-error "member function" } + +typedef int I; +enum E { }; + +int d = __builtin_offsetof(I, ~I); // { dg-error "destructor" } +int e = __builtin_offsetof(E, ~E); // { dg-error "destructor" } diff --git a/gcc/testsuite/g++.dg/init/complex1.C b/gcc/testsuite/g++.dg/init/complex1.C new file mode 100644 index 00000000000..3f88fd902c0 --- /dev/null +++ b/gcc/testsuite/g++.dg/init/complex1.C @@ -0,0 +1,7 @@ +/* PR c++/21210 */ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +typedef float __complex__ fcomplex; +fcomplex cplx = fcomplex(); + diff --git a/gcc/testsuite/g++.dg/lookup/linkage1.C b/gcc/testsuite/g++.dg/lookup/linkage1.C new file mode 100644 index 00000000000..6f6bdfdea8a --- /dev/null +++ b/gcc/testsuite/g++.dg/lookup/linkage1.C @@ -0,0 +1,4 @@ +// DR 563 + +extern int i; // { dg-error "linkage" } +extern "C" int i; // { dg-error "linkage" } diff --git a/gcc/testsuite/g++.dg/lookup/linkage2.C b/gcc/testsuite/g++.dg/lookup/linkage2.C new file mode 100644 index 00000000000..994264d3ebc --- /dev/null +++ b/gcc/testsuite/g++.dg/lookup/linkage2.C @@ -0,0 +1,7 @@ +// PR c++/27227 + +namespace x { + extern "C" const int y; +} +using x::y; +extern "C" int const y=0; diff --git a/gcc/testsuite/g++.dg/lookup/using15.C b/gcc/testsuite/g++.dg/lookup/using15.C new file mode 100644 index 00000000000..b5ca3a876f0 --- /dev/null +++ b/gcc/testsuite/g++.dg/lookup/using15.C @@ -0,0 +1,10 @@ +// PR c++/27933 +// { dg-do compile } + +template<int> struct A +{ + int i; + A() { using i; } // { dg-error "nested-name-specifier|declared" } +}; + +A<0> a; diff --git a/gcc/testsuite/g++.dg/other/anon4.C b/gcc/testsuite/g++.dg/other/anon4.C new file mode 100644 index 00000000000..571f4ae65fb --- /dev/null +++ b/gcc/testsuite/g++.dg/other/anon4.C @@ -0,0 +1,8 @@ +// PR c++/27951 +// { dg-do compile } + +void foo() +{ + int i; // { dg-error "previously" } + union { int i; }; // { dg-error "redeclaration" } +} diff --git a/gcc/testsuite/g++.dg/parse/linkage2.C b/gcc/testsuite/g++.dg/parse/linkage2.C new file mode 100644 index 00000000000..aa204df2a10 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/linkage2.C @@ -0,0 +1,3 @@ +// PR c++/27884 + +extern "C" void foo(register int *my_perl); diff --git a/gcc/testsuite/g++.dg/template/builtin1.C b/gcc/testsuite/g++.dg/template/builtin1.C new file mode 100644 index 00000000000..a5b7271cb73 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/builtin1.C @@ -0,0 +1,11 @@ +// PR c++/26559 + +template<bool> struct cond; + +template<int> struct S { + void f(int i) { + cond<__builtin_constant_p(i)>(); + } +}; + +S<1> s; diff --git a/gcc/testsuite/g++.dg/template/crash52.C b/gcc/testsuite/g++.dg/template/crash52.C new file mode 100644 index 00000000000..9fc3f683385 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/crash52.C @@ -0,0 +1,19 @@ +// PR c++/27665 + +template<int> struct A +{ + struct B + { + struct C {}; + }; +}; + +template<int N> void foo() +{ + class A<N>::B::C X; +} + +void bar() +{ + foo<0>(); +} diff --git a/gcc/testsuite/g++.dg/template/ttp18.C b/gcc/testsuite/g++.dg/template/ttp18.C new file mode 100644 index 00000000000..095c07fb927 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/ttp18.C @@ -0,0 +1,10 @@ +template <template <typename> class T> +void f(T<int>) {} + +template <typename T> +union U {}; + +void g() { + f(U<int>()); +} + diff --git a/gcc/testsuite/g++.dg/template/ttp19.C b/gcc/testsuite/g++.dg/template/ttp19.C new file mode 100644 index 00000000000..12a37c9cd59 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/ttp19.C @@ -0,0 +1,7 @@ +// PR c++/27689 + +void f (...); +template <template <typename> class F, typename T> void f (F<T>); +template <typename> struct foo { struct bar {}; }; +void g (foo<int>::bar x) { f(x); } + diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr27830.C b/gcc/testsuite/g++.dg/tree-ssa/pr27830.C new file mode 100644 index 00000000000..01c7fc18783 --- /dev/null +++ b/gcc/testsuite/g++.dg/tree-ssa/pr27830.C @@ -0,0 +1,18 @@ +/* { dg-do compile } */ +/* { dg-options "-O" } */ + +struct gc{}; +struct transform:public gc +{ + double x, y, z, t; + transform (void){} +}; +inline transform f (void) +{ + return transform (); +}; +void transformed (void) +{ + new transform (f()); +} + diff --git a/gcc/testsuite/gcc.dg/pr27802-1.c b/gcc/testsuite/gcc.dg/pr27802-1.c new file mode 100644 index 00000000000..839459ac01a --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr27802-1.c @@ -0,0 +1,16 @@ +/* Noreturn functions returning FP types used to confuse reg-stack on x86. */ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +double bar1() __attribute__((noreturn)); +void foo1() { bar1(); } + +double bar2() __attribute__((noreturn)); +double foo2() { return bar2(); } + +void bar3() __attribute__((noreturn)); +double foo3() { bar3(); } + +double bar4() __attribute__((noreturn)); +double foo4() { bar4(); } + diff --git a/gcc/testsuite/gcc.dg/pr27959.c b/gcc/testsuite/gcc.dg/pr27959.c new file mode 100644 index 00000000000..7118aec73c6 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr27959.c @@ -0,0 +1,93 @@ +/* PR middle-end/27959 */ +/* { dg-do run } */ +/* { dg-options "-O2" } */ +/* { dg-options "-O2 -mtune=z990" { target s390*-*-* } } */ + +extern void abort (void); + +struct B +{ + unsigned int b1, b2, b3; + char b4; +}; + +struct C +{ + char c1; +}; + +struct D +{ + char *d1; + struct C **d2; + unsigned int d3; +}; + +void +__attribute__((noinline)) +foo (void *x, struct B *y, unsigned int *z) +{ + if (x) + abort (); + if (y->b1 != 7 || y->b2 != 5 || y->b3 != 3 || y->b4) + abort (); + if (*z != 2) + abort (); +} + +int +__attribute__((noinline)) +baz (unsigned int *x, unsigned int y) +{ + asm volatile ("" : : "r" (&x), "r" (&y) : "memory"); + return *x + y; +} + +inline int bar (unsigned int *x, unsigned int y) +{ + if (y < *x) + return 0; + return baz (x, y); +} + +unsigned int * +__attribute__((noinline)) +test (struct D *x, unsigned int *y) +{ + struct B b; + unsigned int c; + + bar (y, x->d3); + if ((*(x->d2))->c1) + c = ((unsigned char) x->d1[0] + + ((unsigned char) x->d1[1] << 8) + + ((unsigned char) x->d1[2] << 16) + + ((short) x->d1[3] << 24)); + else + { + int d; + ((char *) &d)[0] = x->d1[0]; + ((char *) &d)[1] = x->d1[1]; + ((char *) &d)[2] = x->d1[2]; + ((char *) &d)[3] = x->d1[3]; + c = d; + } + b.b4 = 0; + b.b1 = c / 10000L % 10000; + b.b2 = c / 100 % 100; + b.b3 = c % 100; + foo (0, &b, y); + return y; +} + +int +main (void) +{ + unsigned int x = 900070503; + unsigned int y = 2; + struct C c = { 0 }, *cptr = &c; + struct D d = { (char *) &x, &cptr, 0 }; + if (test (&d, &y) != &y) + abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/union-3.c b/gcc/testsuite/gcc.dg/union-3.c new file mode 100644 index 00000000000..3e89b755afa --- /dev/null +++ b/gcc/testsuite/gcc.dg/union-3.c @@ -0,0 +1,10 @@ +/* PR target/27421 */ +/* { dg-do compile } */ + +union A +{ + int i; + void x[1]; /* { dg-error "array of voids" } */ +}; + +void foo(union A a) {} diff --git a/gcc/testsuite/gcc.dg/vmx/pr27006.c b/gcc/testsuite/gcc.dg/vmx/pr27006.c index 1b92252b383..d34d51e92c6 100644 --- a/gcc/testsuite/gcc.dg/vmx/pr27006.c +++ b/gcc/testsuite/gcc.dg/vmx/pr27006.c @@ -1,4 +1,3 @@ -/* { dg-do run */ /* { dg-options "-maltivec" } */ extern void abort (); diff --git a/gcc/testsuite/gcc.dg/vmx/pr27842.c b/gcc/testsuite/gcc.dg/vmx/pr27842.c index 56b2970e423..ad3130d007d 100644 --- a/gcc/testsuite/gcc.dg/vmx/pr27842.c +++ b/gcc/testsuite/gcc.dg/vmx/pr27842.c @@ -1,5 +1,3 @@ -/* { dg-do run } */ - #include <altivec.h> extern void abort (void); diff --git a/gcc/testsuite/gfortran.dg/cray_pointers_2.f90 b/gcc/testsuite/gfortran.dg/cray_pointers_2.f90 index 7c958d57b0a..42cdf9b0b48 100644 --- a/gcc/testsuite/gfortran.dg/cray_pointers_2.f90 +++ b/gcc/testsuite/gfortran.dg/cray_pointers_2.f90 @@ -1,5 +1,5 @@ ! { dg-do run } -! { dg-options "-fcray-pointer" } +! { dg-options "-fcray-pointer -fbounds-check" } ! Series of routines for testing a Cray pointer implementation program craytest common /errors/errors(400) diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index e37bb26c332..013220200b5 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -666,7 +666,12 @@ copy_body_r (tree *tp, int *walk_subtrees, void *data) else if (TREE_CODE (*tp) == ADDR_EXPR) { walk_tree (&TREE_OPERAND (*tp, 0), copy_body_r, id, NULL); - recompute_tree_invarant_for_addr_expr (*tp); + /* Handle the case where we substituted an INDIRECT_REF + into the operand of the ADDR_EXPR. */ + if (TREE_CODE (TREE_OPERAND (*tp, 0)) == INDIRECT_REF) + *tp = TREE_OPERAND (TREE_OPERAND (*tp, 0), 0); + else + recompute_tree_invarant_for_addr_expr (*tp); *walk_subtrees = 0; } } diff --git a/gcc/version.c b/gcc/version.c index efead47ec0a..e8ca23ed460 100644 --- a/gcc/version.c +++ b/gcc/version.c @@ -8,7 +8,7 @@ in parentheses. You may also wish to include a number indicating the revision of your modified compiler. */ -#define VERSUFFIX " (Red Hat 4.1.1-2)" +#define VERSUFFIX " (Red Hat 4.1.1-4)" /* This is the location of the online document giving instructions for reporting bugs. If you distribute a modified version of GCC, diff --git a/libjava/ChangeLog b/libjava/ChangeLog index e816e1f2f95..109711d11df 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,15 @@ +2006-04-05 Ranjit Mathew <rmathew@gcc.gnu.org> + + * configure.host: Add -fno-omit-frame-pointer to libgcj_flags for + MinGW since EBP is used for backtracking through call frames on this + platform. + +2006-04-25 Tom Tromey <tromey@redhat.com> + + * gnu/gcj/runtime/natSharedLibLoader.cc: Include gc.h later. + Include platform.h. Set GC_DEBUG before including gc.h, if + needed. + 2006-06-01 Alan Modra <amodra@bigpond.net.au> * stacktrace.cc (_Jv_StackTrace::UpdateNCodeMap): Don't add diff --git a/libjava/classpath/ChangeLog.gcj b/libjava/classpath/ChangeLog.gcj index 835302af42d..bb7ab8d16f0 100644 --- a/libjava/classpath/ChangeLog.gcj +++ b/libjava/classpath/ChangeLog.gcj @@ -1,3 +1,10 @@ +2006-06-14 Tom Tromey <tromey@redhat.com> + + PR java/28024: + * aclocal.m4, configure: Rebuilt. + * m4/acinclude.m4 (REGEN_WITH_JAY): Use backquote, not $(...). + * configure.ac (QT_INCLUDE_DIR): Use backquote, not $(...). + 2006-04-21 Tom Tromey <tromey@redhat.com> PR classpath/27163: diff --git a/libjava/classpath/aclocal.m4 b/libjava/classpath/aclocal.m4 index 2185af96e67..7474fc9ba1a 100644 --- a/libjava/classpath/aclocal.m4 +++ b/libjava/classpath/aclocal.m4 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.9.3 -*- Autoconf -*- +# generated automatically by aclocal 1.9.6 -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,23 +11,11 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -# -*- Autoconf -*- -# Copyright (C) 2002, 2003 Free Software Foundation, Inc. -# Generated from amversion.in; do not edit by hand. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- @@ -40,26 +28,15 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.9.3])]) - -# AM_AUX_DIR_EXPAND + [AM_AUTOMAKE_VERSION([1.9.6])]) -# Copyright (C) 2001, 2003 Free Software Foundation, Inc. +# AM_AUX_DIR_EXPAND -*- Autoconf -*- -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to @@ -106,26 +83,16 @@ AC_PREREQ([2.50])dnl am_aux_dir=`cd $ac_aux_dir && pwd` ]) -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# AM_CONDITIONAL -*- Autoconf -*- -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 6 +# serial 7 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- @@ -149,26 +116,15 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# serial 7 -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - +# serial 8 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -177,7 +133,6 @@ fi])]) # CC etc. in the Makefile, will ask for an AC_PROG_CC use... - # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. @@ -317,27 +272,16 @@ AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) -# Generate code to set up dependency tracking. -*- Autoconf -*- +# Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 -# Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -#serial 2 +#serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ @@ -396,30 +340,19 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) -# Do all the work for Automake. -*- Autoconf -*- - -# This macro actually does too much some checks are only needed if -# your package does certain things. But this isn't really a big deal. +# Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# serial 12 -# serial 11 +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) @@ -521,54 +454,31 @@ for _am_header in $config_headers :; do done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. - -# Copyright (C) 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) -# Add --enable-maintainer-mode option to configure. +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004 +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 3 +# serial 4 AC_DEFUN([AM_MAINTAINER_MODE], [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) @@ -587,26 +497,15 @@ AC_DEFUN([AM_MAINTAINER_MODE], AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +# Check to see how 'make' treats includes. -*- Autoconf -*- -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 2 +# serial 3 # AM_MAKE_INCLUDE() # ----------------- @@ -650,27 +549,16 @@ AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) -# -*- Autoconf -*- - - -# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 3 +# serial 4 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ @@ -696,27 +584,16 @@ else fi ]) +# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. - -# Copyright (C) 2003, 2004 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - +# # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). @@ -770,26 +647,15 @@ else fi AC_SUBST([mkdir_p])]) -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. +# Helper functions for option handling. -*- Autoconf -*- -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 2 +# serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- @@ -814,22 +680,11 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 2001, 2003 Free Software Foundation, Inc. -*- Autoconf -*- - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- @@ -842,28 +697,16 @@ AC_DEFUN([AM_RUN_LOG], echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) -# -# Check to make sure that the build environment is sane. -# - -# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. +# Check to make sure that the build environment is sane. -*- Autoconf -*- -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 3 +# serial 4 # AM_SANITY_CHECK # --------------- @@ -906,25 +749,14 @@ Check your system clock]) fi AC_MSG_RESULT(yes)]) -# AM_PROG_INSTALL_STRIP - -# Copyright (C) 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. +# AM_PROG_INSTALL_STRIP +# --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip @@ -947,25 +779,13 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 1 +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. +# serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- diff --git a/libjava/classpath/configure b/libjava/classpath/configure index 1ba5751648f..509a8664bf4 100755 --- a/libjava/classpath/configure +++ b/libjava/classpath/configure @@ -11737,7 +11737,7 @@ echo "${ECHO_T}$QT_LIBS" >&6 fi if test "x$HAVE_QT4" = "xyes"; then - QT_INCLUDE_DIR=$($PKG_CONFIG --variable=includedir QtGui) + QT_INCLUDE_DIR=`$PKG_CONFIG --variable=includedir QtGui` EXTRA_QT_INCLUDE_DIR="$QT_INCLUDE_DIR/Qt" as_ac_File=`echo "ac_cv_file_$QT_INCLUDE_DIR/QWidget" | $as_tr_sh` echo "$as_me:$LINENO: checking for $QT_INCLUDE_DIR/QWidget" >&5 @@ -14483,7 +14483,7 @@ echo "$as_me: error: \"jay executable not found\"" >&2;} { (exit 1); exit 1; }; }; fi else - JAY_DIR_PATH=$(dirname "${withval}") + JAY_DIR_PATH=`dirname "${withval}"` JAY="${withval}" fi @@ -14509,8 +14509,8 @@ echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6 if test `eval echo '${'$as_ac_File'}'` = yes; then : else - { { echo "$as_me:$LINENO: error: \"Expected skeleton file in $(dirname ${withval})\"" >&5 -echo "$as_me: error: \"Expected skeleton file in $(dirname ${withval})\"" >&2;} + { { echo "$as_me:$LINENO: error: \"Expected skeleton file in \`dirname ${withval}\`\"" >&5 +echo "$as_me: error: \"Expected skeleton file in \`dirname ${withval}\`\"" >&2;} { (exit 1); exit 1; }; } fi diff --git a/libjava/classpath/configure.ac b/libjava/classpath/configure.ac index aab93966303..6ad12d49c65 100644 --- a/libjava/classpath/configure.ac +++ b/libjava/classpath/configure.ac @@ -374,7 +374,7 @@ if test "x${COMPILE_JNI}" = xyes; then if test "x$HAVE_QT4" = "xyes"; then dnl Check needed because in some cases the QtGui includedir dnl doesn't contain the subsystem dir. - QT_INCLUDE_DIR=$($PKG_CONFIG --variable=includedir QtGui) + QT_INCLUDE_DIR=`$PKG_CONFIG --variable=includedir QtGui` EXTRA_QT_INCLUDE_DIR="$QT_INCLUDE_DIR/Qt" AC_CHECK_FILE([$QT_INCLUDE_DIR/QWidget], AC_MSG_NOTICE([No extra QT_INCLUDE_DIR needed]), diff --git a/libjava/classpath/m4/acinclude.m4 b/libjava/classpath/m4/acinclude.m4 index e41321f89f3..c8978d75417 100644 --- a/libjava/classpath/m4/acinclude.m4 +++ b/libjava/classpath/m4/acinclude.m4 @@ -389,13 +389,13 @@ AC_DEFUN([REGEN_WITH_JAY], AC_MSG_ERROR("jay executable not found"); fi else - JAY_DIR_PATH=$(dirname "${withval}") + JAY_DIR_PATH=`dirname "${withval}"` JAY="${withval}" AC_SUBST(JAY) fi JAY_SKELETON="${JAY_DIR_PATH}/skeleton" AC_CHECK_FILE(${JAY_SKELETON}, AC_SUBST(JAY_SKELETON), - AC_MSG_ERROR("Expected skeleton file in $(dirname ${withval})")) + AC_MSG_ERROR("Expected skeleton file in `dirname ${withval}`")) JAY_FOUND=yes ], [ diff --git a/libjava/configure.host b/libjava/configure.host index 759001f0256..108f3a2c01f 100644 --- a/libjava/configure.host +++ b/libjava/configure.host @@ -260,6 +260,7 @@ EOF slow_pthread_self= ;; *-mingw*) + libgcj_flags="${libgcj_flags} -fno-omit-frame-pointer" # FIXME: win32_exception_handler( ) in win32.cc does not do the # right stuff yet w.r.t. SEH. Live with the following for now. can_unwind_signal=no diff --git a/libjava/gnu/gcj/runtime/natSharedLibLoader.cc b/libjava/gnu/gcj/runtime/natSharedLibLoader.cc index 95d2d8ea7a0..fcff8f200b4 100644 --- a/libjava/gnu/gcj/runtime/natSharedLibLoader.cc +++ b/libjava/gnu/gcj/runtime/natSharedLibLoader.cc @@ -1,6 +1,6 @@ // natSharedLibLoader.cc - Implementation of SharedLibHelper native methods. -/* Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation +/* Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation This file is part of libgcj. @@ -9,11 +9,7 @@ Libgcj License. Please consult the file "LIBGCJ_LICENSE" for details. */ #include <config.h> - -// If we're using the Boehm GC, then we need this include to override dlopen. -#ifdef HAVE_BOEHM_GC -#include <gc.h> -#endif /* HAVE_BOEHM_GC */ +#include <platform.h> #include <gcj/cni.h> #include <jvm.h> @@ -24,6 +20,15 @@ details. */ #include <java/lang/UnsupportedOperationException.h> #include <java/lang/UnknownError.h> +// If we're using the Boehm GC, then we need this include to override dlopen. +#ifdef HAVE_BOEHM_GC +// Set GC_DEBUG before including gc.h! +#ifdef LIBGCJ_GC_DEBUG +# define GC_DEBUG +#endif +#include <gc.h> +#endif /* HAVE_BOEHM_GC */ + #ifdef HAVE_DLOPEN #include <dlfcn.h> |