import GCC 4.1 branch from today. it includes these bugs fixed since
our last 4.1 branch import, plus a few other changes: c/27718 26242 c++/27451 c/26818 tree-optimization/26622 target/27758 middle-end/27743 middle-end/27620 tree-optimization/27549 tree-optimization/27283 target/26600 c++/26757 driver/26885 tree-optimization/27603 rtl-optimization/14261 rtl-optimization/22563 middle-end/26729 rtl-optimization/27335 target/27421 middle-end/27384 middle-end/27488 target/27158 bootstrap/26872 target/26545 tree-optimization/27136 tree-optimization/27409 middle-end/27260 tree-optimization/27151 target/26481 target/26765 target/26481 tree-optimization/27285 optimization/25985 tree-optimization/27364 c/25309 target/27387 target/27374 middle-end/26565 target/26826 tree-optimization/27236 middle-end/26869 tree-optimization/27218 rtl-optimization/26685 tree-optimization/26865 target/26961 target/21283 c/26774 c/25875 mudflap/26789
This commit is contained in:
parent
1083f0866d
commit
761e8f140b
152
gnu/dist/gcc4/gcc/cp/ChangeLog
vendored
152
gnu/dist/gcc4/gcc/cp/ChangeLog
vendored
@ -1,3 +1,155 @@
|
||||
2006-05-31 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/27801
|
||||
* call.c (perform_implicit_conversion): Do not actually perform
|
||||
conversions in templates.
|
||||
|
||||
PR c++/26496
|
||||
* call.c (resolve_args): Check for invalid uses of bound
|
||||
non-static member functions.
|
||||
* init.c (build_offset_ref): Return error_mark_node for errors.
|
||||
|
||||
PR c++/27385
|
||||
* decl.c (reshape_init): Robustify.
|
||||
(reshape_init_array_1): Likewise.
|
||||
|
||||
2006-05-30 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/26433
|
||||
* cp-tree.h (begin_function_try_block): Change prototype.
|
||||
(finish_function_handler_sequence): Likewise.
|
||||
* parser.c (cp_parser_function_try_block): Adjust calls.
|
||||
* pt.c (tsubst_expr): Adjust calls.
|
||||
* semantics.c (begin_function_try_block): Create an artificial
|
||||
outer scope.
|
||||
(finish_function_handler_sequence): Close it.
|
||||
|
||||
2006-05-30 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/26068
|
||||
* parser.c (cp_parser_set_storage_class): Check for
|
||||
invalid uses of storage classes on unbraced linkage
|
||||
specifications.
|
||||
(cp_parser_decl_specifier_seq): Pass keywords, not storage classes,
|
||||
to cp_parser_set_storage_class.
|
||||
|
||||
2006-05-30 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/20173
|
||||
* pt.c (determine_specialization): Disallow partial
|
||||
specializations of templates.
|
||||
|
||||
2006-05-29 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/27713
|
||||
* pt.c (push_template_decl_real): Return error_mark_node instead
|
||||
of broken decl.
|
||||
|
||||
PR c++/27447
|
||||
* decl2.c (grok_method_quals): Skip invalid functions and class types.
|
||||
|
||||
PR c++/27716
|
||||
* typeck.c (build_modify_expr): Test arguments for error_operand_p.
|
||||
|
||||
2006-05-24 Release Manager
|
||||
|
||||
* GCC 4.1.1 released.
|
||||
|
||||
2006-05-17 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* Make-lang.in: Undo the last change.
|
||||
|
||||
2006-05-17 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/27491
|
||||
* semantics.c (finish_compound_literal): Only set TREE_HAS_CONSTRUCTOR
|
||||
on CONSTRUCTORs.
|
||||
|
||||
2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR driver/26885
|
||||
* Make-lang.in (GXX_OBJS): Replace gcc.o with $(GCC_OBJS).
|
||||
|
||||
2006-05-15 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/27339
|
||||
* cp-tree.h (perform_access_checks): New function.
|
||||
* semantics.c (perform_access_checks): New function.
|
||||
(perform_deferred_access_checks): Use it.
|
||||
* parser.c (cp_parser_simple_declaration): Adjust call to
|
||||
cp_parser_init_declarator.
|
||||
(cp_parser_type_parameter): Do not defer checks in default
|
||||
arguments.
|
||||
(cp_parser_explicit_specialization): Adjust call to
|
||||
cp_parser_single_declaration.
|
||||
(cp_parser_init_declarator): Perform template-parameter access
|
||||
checks.
|
||||
(cp_parser_parameter_declaration): Do not defer checks for
|
||||
template parameter default arguments.
|
||||
(cp_parser_template_declaration_after_export): Gather access
|
||||
checks for template parameters, and pass them to
|
||||
cp_parser_single_declaration.
|
||||
(cp_parser_template_parameter_access_checks): New function.
|
||||
(cp_parser_single_declaration): Add checks parameter.
|
||||
|
||||
2006-05-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/27582
|
||||
* pt.c (any_dependent_template_arguments_p): Return early on invalid
|
||||
argument list.
|
||||
|
||||
PR c++/27581
|
||||
* search.c (adjust_result_of_qualified_name_lookup): Skip on
|
||||
invalid context_class.
|
||||
|
||||
PR c++/27315
|
||||
* pt.c (do_decl_instantiation): Return early on invalid decl.
|
||||
|
||||
2006-05-11 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/27547
|
||||
* decl.c (copy_fn_p): Return early on non-member functions.
|
||||
|
||||
2006-05-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/27427
|
||||
* pt.c (convert_nontype_argument): Return early on invalid arguments.
|
||||
|
||||
PR c++/27422
|
||||
* typeck.c (convert_arguments): Return early on args with
|
||||
invalid types.
|
||||
|
||||
2006-05-01 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/26912
|
||||
* decl.c (grokdeclarator): Qualify "this" pointer when forming
|
||||
member function types.
|
||||
|
||||
2006-04-30 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/26534
|
||||
* cp-tree.h (adjust_bitfield_initializer): Declare.
|
||||
* typeck.c (build_modify_expr): Use it.
|
||||
* typeck2.c (adjust_bitfield_initializer): Define.
|
||||
(process_init_constructor_record): Use it.
|
||||
|
||||
PR c++/27094
|
||||
* pt.c (tsubst_default_argument): Increment function_depth around
|
||||
call to tsubst_expr.
|
||||
* parser.c (cp_parser_parameter_declaration): Likewise.
|
||||
* decl2.c (mark_used): Tidy.
|
||||
|
||||
2006-04-30 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/27278
|
||||
* decl.c (grok_op_properties): Skip operators with invalid args
|
||||
when checking for class-type or enum-type args.
|
||||
|
||||
2006-04-29 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/27279
|
||||
* decl.c (copy_fn_p): Skip functions with invalid first arg.
|
||||
|
||||
2006-04-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/26558
|
||||
|
10
gnu/dist/gcc4/gcc/cp/call.c
vendored
10
gnu/dist/gcc4/gcc/cp/call.c
vendored
@ -2693,6 +2693,8 @@ resolve_args (tree args)
|
||||
error ("invalid use of void expression");
|
||||
return error_mark_node;
|
||||
}
|
||||
else if (invalid_nonstatic_memfn_p (arg))
|
||||
return error_mark_node;
|
||||
}
|
||||
return args;
|
||||
}
|
||||
@ -6353,6 +6355,14 @@ perform_implicit_conversion (tree type, tree expr)
|
||||
error ("could not convert %qE to %qT", expr, type);
|
||||
expr = error_mark_node;
|
||||
}
|
||||
else if (processing_template_decl)
|
||||
{
|
||||
/* In a template, we are only concerned about determining the
|
||||
type of non-dependent expressions, so we do not have to
|
||||
perform the actual conversion. */
|
||||
if (TREE_TYPE (expr) != type)
|
||||
expr = build_nop (type, expr);
|
||||
}
|
||||
else
|
||||
expr = convert_like (conv, expr);
|
||||
|
||||
|
6
gnu/dist/gcc4/gcc/cp/cp-tree.h
vendored
6
gnu/dist/gcc4/gcc/cp/cp-tree.h
vendored
@ -4136,6 +4136,7 @@ extern void stop_deferring_access_checks (void);
|
||||
extern void pop_deferring_access_checks (void);
|
||||
extern tree get_deferred_access_checks (void);
|
||||
extern void pop_to_parent_deferring_access_checks (void);
|
||||
extern void perform_access_checks (tree);
|
||||
extern void perform_deferred_access_checks (void);
|
||||
extern void perform_or_defer_access_check (tree, tree);
|
||||
extern int stmts_are_full_exprs_p (void);
|
||||
@ -4173,9 +4174,9 @@ extern void finish_try_block (tree);
|
||||
extern tree begin_eh_spec_block (void);
|
||||
extern void finish_eh_spec_block (tree, tree);
|
||||
extern void finish_handler_sequence (tree);
|
||||
extern tree begin_function_try_block (void);
|
||||
extern tree begin_function_try_block (tree *);
|
||||
extern void finish_function_try_block (tree);
|
||||
extern void finish_function_handler_sequence (tree);
|
||||
extern void finish_function_handler_sequence (tree, tree);
|
||||
extern void finish_cleanup_try_block (tree);
|
||||
extern tree begin_handler (void);
|
||||
extern void finish_handler_parms (tree, tree);
|
||||
@ -4389,6 +4390,7 @@ extern void complete_type_check_abstract (tree);
|
||||
extern int abstract_virtuals_error (tree, tree);
|
||||
|
||||
extern tree store_init_value (tree, tree);
|
||||
extern tree adjust_bitfield_initializer (tree, tree);
|
||||
extern tree digest_init (tree, tree);
|
||||
extern tree build_scoped_ref (tree, tree, tree *);
|
||||
extern tree build_x_arrow (tree);
|
||||
|
21
gnu/dist/gcc4/gcc/cp/decl.c
vendored
21
gnu/dist/gcc4/gcc/cp/decl.c
vendored
@ -4235,6 +4235,8 @@ reshape_init_array_1 (tree elt_type, tree max_index, reshape_iter *d)
|
||||
}
|
||||
|
||||
elt_init = reshape_init_r (elt_type, d, /*first_initializer_p=*/false);
|
||||
if (elt_init == error_mark_node)
|
||||
return error_mark_node;
|
||||
CONSTRUCTOR_APPEND_ELT (CONSTRUCTOR_ELTS (new_init), NULL_TREE, elt_init);
|
||||
}
|
||||
|
||||
@ -4513,6 +4515,8 @@ reshape_init (tree type, tree init)
|
||||
d.end = d.cur + VEC_length (constructor_elt, v);
|
||||
|
||||
new_init = reshape_init_r (type, &d, true);
|
||||
if (new_init == error_mark_node)
|
||||
return error_mark_node;
|
||||
|
||||
/* Make sure all the element of the constructor were used. Otherwise,
|
||||
issue an error about exceeding initializers. */
|
||||
@ -7598,9 +7602,11 @@ grokdeclarator (const cp_declarator *declarator,
|
||||
are always static functions. */
|
||||
;
|
||||
else
|
||||
type = build_method_type_directly (ctype,
|
||||
TREE_TYPE (type),
|
||||
TYPE_ARG_TYPES (type));
|
||||
type = (build_method_type_directly
|
||||
(cp_build_qualified_type (ctype,
|
||||
quals & ~TYPE_QUAL_RESTRICT),
|
||||
TREE_TYPE (type),
|
||||
TYPE_ARG_TYPES (type)));
|
||||
}
|
||||
else if (declspecs->specs[(int)ds_typedef]
|
||||
|| COMPLETE_TYPE_P (complete_type (ctype)))
|
||||
@ -8669,7 +8675,9 @@ copy_fn_p (tree d)
|
||||
tree arg_type;
|
||||
int result = 1;
|
||||
|
||||
gcc_assert (DECL_FUNCTION_MEMBER_P (d));
|
||||
if (!DECL_FUNCTION_MEMBER_P (d))
|
||||
/* Non-members are invalid. We complained, but kept the declaration. */
|
||||
return 0;
|
||||
|
||||
if (DECL_TEMPLATE_INFO (d)
|
||||
&& DECL_MEMBER_TEMPLATE_P (DECL_TI_TEMPLATE (d)))
|
||||
@ -8684,6 +8692,8 @@ copy_fn_p (tree d)
|
||||
return 0;
|
||||
|
||||
arg_type = TREE_VALUE (args);
|
||||
if (arg_type == error_mark_node)
|
||||
return 0;
|
||||
|
||||
if (TYPE_MAIN_VARIANT (arg_type) == DECL_CONTEXT (d))
|
||||
{
|
||||
@ -8939,6 +8949,9 @@ grok_op_properties (tree decl, bool complain)
|
||||
for (p = argtypes; p && p != void_list_node; p = TREE_CHAIN (p))
|
||||
{
|
||||
tree arg = non_reference (TREE_VALUE (p));
|
||||
if (arg == error_mark_node)
|
||||
return;
|
||||
|
||||
/* IS_AGGR_TYPE, rather than CLASS_TYPE_P, is used
|
||||
because these checks are performed even on
|
||||
template functions. */
|
||||
|
6
gnu/dist/gcc4/gcc/cp/decl2.c
vendored
6
gnu/dist/gcc4/gcc/cp/decl2.c
vendored
@ -119,6 +119,12 @@ grok_method_quals (tree ctype, tree function, cp_cv_quals quals)
|
||||
type_quals = quals & ~TYPE_QUAL_RESTRICT;
|
||||
this_quals = quals & TYPE_QUAL_RESTRICT;
|
||||
|
||||
if (fntype == error_mark_node || ctype == error_mark_node)
|
||||
{
|
||||
TREE_TYPE (function) = error_mark_node;
|
||||
return this_quals;
|
||||
}
|
||||
|
||||
ctype = cp_build_qualified_type (ctype, type_quals);
|
||||
fntype = build_method_type_directly (ctype, TREE_TYPE (fntype),
|
||||
(TREE_CODE (fntype) == METHOD_TYPE
|
||||
|
2
gnu/dist/gcc4/gcc/cp/init.c
vendored
2
gnu/dist/gcc4/gcc/cp/init.c
vendored
@ -1545,7 +1545,7 @@ build_offset_ref (tree type, tree name, bool address_p)
|
||||
}
|
||||
error ("invalid use of non-static member function %qD",
|
||||
TREE_OPERAND (member, 1));
|
||||
return member;
|
||||
return error_mark_node;
|
||||
}
|
||||
else if (TREE_CODE (member) == FIELD_DECL)
|
||||
{
|
||||
|
163
gnu/dist/gcc4/gcc/cp/parser.c
vendored
163
gnu/dist/gcc4/gcc/cp/parser.c
vendored
@ -1543,7 +1543,7 @@ static void cp_parser_linkage_specification
|
||||
/* Declarators [gram.dcl.decl] */
|
||||
|
||||
static tree cp_parser_init_declarator
|
||||
(cp_parser *, cp_decl_specifier_seq *, bool, bool, int, bool *);
|
||||
(cp_parser *, cp_decl_specifier_seq *, tree, bool, bool, int, bool *);
|
||||
static cp_declarator *cp_parser_declarator
|
||||
(cp_parser *, cp_parser_declarator_kind, int *, bool *, bool);
|
||||
static cp_declarator *cp_parser_direct_declarator
|
||||
@ -1738,8 +1738,10 @@ static tree cp_parser_function_definition_after_declarator
|
||||
(cp_parser *, bool);
|
||||
static void cp_parser_template_declaration_after_export
|
||||
(cp_parser *, bool);
|
||||
static void cp_parser_perform_template_parameter_access_checks
|
||||
(tree);
|
||||
static tree cp_parser_single_declaration
|
||||
(cp_parser *, bool, bool *);
|
||||
(cp_parser *, tree, bool, bool *);
|
||||
static tree cp_parser_functional_cast
|
||||
(cp_parser *, tree);
|
||||
static tree cp_parser_save_member_function_body
|
||||
@ -1757,7 +1759,7 @@ static tree cp_parser_sizeof_operand
|
||||
static bool cp_parser_declares_only_class_p
|
||||
(cp_parser *);
|
||||
static void cp_parser_set_storage_class
|
||||
(cp_decl_specifier_seq *, cp_storage_class);
|
||||
(cp_parser *, cp_decl_specifier_seq *, enum rid);
|
||||
static void cp_parser_set_decl_spec_type
|
||||
(cp_decl_specifier_seq *, tree, bool);
|
||||
static bool cp_parser_friend_p
|
||||
@ -7179,6 +7181,7 @@ cp_parser_simple_declaration (cp_parser* parser,
|
||||
|
||||
/* Parse the init-declarator. */
|
||||
decl = cp_parser_init_declarator (parser, &decl_specifiers,
|
||||
/*checks=*/NULL_TREE,
|
||||
function_definition_allowed_p,
|
||||
/*member_p=*/false,
|
||||
declares_class_or_enum,
|
||||
@ -7368,39 +7371,13 @@ cp_parser_decl_specifier_seq (cp_parser* parser,
|
||||
GNU Extension:
|
||||
thread */
|
||||
case RID_AUTO:
|
||||
/* Consume the token. */
|
||||
cp_lexer_consume_token (parser->lexer);
|
||||
cp_parser_set_storage_class (decl_specs, sc_auto);
|
||||
break;
|
||||
case RID_REGISTER:
|
||||
/* Consume the token. */
|
||||
cp_lexer_consume_token (parser->lexer);
|
||||
cp_parser_set_storage_class (decl_specs, sc_register);
|
||||
break;
|
||||
case RID_STATIC:
|
||||
/* Consume the token. */
|
||||
cp_lexer_consume_token (parser->lexer);
|
||||
if (decl_specs->specs[(int) ds_thread])
|
||||
{
|
||||
error ("%<__thread%> before %<static%>");
|
||||
decl_specs->specs[(int) ds_thread] = 0;
|
||||
}
|
||||
cp_parser_set_storage_class (decl_specs, sc_static);
|
||||
break;
|
||||
case RID_EXTERN:
|
||||
/* Consume the token. */
|
||||
cp_lexer_consume_token (parser->lexer);
|
||||
if (decl_specs->specs[(int) ds_thread])
|
||||
{
|
||||
error ("%<__thread%> before %<extern%>");
|
||||
decl_specs->specs[(int) ds_thread] = 0;
|
||||
}
|
||||
cp_parser_set_storage_class (decl_specs, sc_extern);
|
||||
break;
|
||||
case RID_MUTABLE:
|
||||
/* Consume the token. */
|
||||
cp_lexer_consume_token (parser->lexer);
|
||||
cp_parser_set_storage_class (decl_specs, sc_mutable);
|
||||
cp_parser_set_storage_class (parser, decl_specs, token->keyword);
|
||||
break;
|
||||
case RID_THREAD:
|
||||
/* Consume the token. */
|
||||
@ -8481,7 +8458,9 @@ cp_parser_type_parameter (cp_parser* parser)
|
||||
/* Consume the `=' token. */
|
||||
cp_lexer_consume_token (parser->lexer);
|
||||
/* Parse the default-argument. */
|
||||
push_deferring_access_checks (dk_no_deferred);
|
||||
default_argument = cp_parser_type_id (parser);
|
||||
pop_deferring_access_checks ();
|
||||
}
|
||||
else
|
||||
default_argument = NULL_TREE;
|
||||
@ -8538,6 +8517,7 @@ cp_parser_type_parameter (cp_parser* parser)
|
||||
/* Consume the `='. */
|
||||
cp_lexer_consume_token (parser->lexer);
|
||||
/* Parse the id-expression. */
|
||||
push_deferring_access_checks (dk_no_deferred);
|
||||
default_argument
|
||||
= cp_parser_id_expression (parser,
|
||||
/*template_keyword_p=*/false,
|
||||
@ -8561,6 +8541,7 @@ cp_parser_type_parameter (cp_parser* parser)
|
||||
/* See if the default argument is valid. */
|
||||
default_argument
|
||||
= check_template_template_default_arg (default_argument);
|
||||
pop_deferring_access_checks ();
|
||||
}
|
||||
else
|
||||
default_argument = NULL_TREE;
|
||||
@ -9407,6 +9388,7 @@ cp_parser_explicit_specialization (cp_parser* parser)
|
||||
else
|
||||
/* Parse the dependent declaration. */
|
||||
cp_parser_single_declaration (parser,
|
||||
/*checks=*/NULL_TREE,
|
||||
/*member_p=*/false,
|
||||
/*friend_p=*/NULL);
|
||||
/* We're done with the specialization. */
|
||||
@ -10773,10 +10755,14 @@ cp_parser_asm_definition (cp_parser* parser)
|
||||
function-definition:
|
||||
__extension__ function-definition
|
||||
|
||||
The DECL_SPECIFIERS and PREFIX_ATTRIBUTES apply to this declarator.
|
||||
Returns a representation of the entity declared. If MEMBER_P is TRUE,
|
||||
then this declarator appears in a class scope. The new DECL created
|
||||
by this declarator is returned.
|
||||
The DECL_SPECIFIERS apply to this declarator. Returns a
|
||||
representation of the entity declared. If MEMBER_P is TRUE, then
|
||||
this declarator appears in a class scope. The new DECL created by
|
||||
this declarator is returned.
|
||||
|
||||
The CHECKS are access checks that should be performed once we know
|
||||
what entity is being declared (and, therefore, what classes have
|
||||
befriended it).
|
||||
|
||||
If FUNCTION_DEFINITION_ALLOWED_P then we handle the declarator and
|
||||
for a function-definition here as well. If the declarator is a
|
||||
@ -10790,6 +10776,7 @@ cp_parser_asm_definition (cp_parser* parser)
|
||||
static tree
|
||||
cp_parser_init_declarator (cp_parser* parser,
|
||||
cp_decl_specifier_seq *decl_specifiers,
|
||||
tree checks,
|
||||
bool function_definition_allowed_p,
|
||||
bool member_p,
|
||||
int declares_class_or_enum,
|
||||
@ -10999,6 +10986,9 @@ cp_parser_init_declarator (cp_parser* parser,
|
||||
current_function_decl = decl;
|
||||
}
|
||||
|
||||
/* Perform access checks for template parameters. */
|
||||
cp_parser_perform_template_parameter_access_checks (checks);
|
||||
|
||||
/* Perform the access control checks for the declarator and the
|
||||
the decl-specifiers. */
|
||||
perform_deferred_access_checks ();
|
||||
@ -12328,10 +12318,21 @@ cp_parser_parameter_declaration (cp_parser *parser,
|
||||
saved_local_variables_forbidden_p
|
||||
= parser->local_variables_forbidden_p;
|
||||
parser->local_variables_forbidden_p = true;
|
||||
/* The default argument expression may cause implicitly
|
||||
defined member functions to be synthesized, which will
|
||||
result in garbage collection. We must treat this
|
||||
situation as if we were within the body of function so as
|
||||
to avoid collecting live data on the stack. */
|
||||
++function_depth;
|
||||
/* Parse the assignment-expression. */
|
||||
if (template_parm_p)
|
||||
push_deferring_access_checks (dk_no_deferred);
|
||||
default_argument
|
||||
= cp_parser_assignment_expression (parser, /*cast_p=*/false);
|
||||
if (template_parm_p)
|
||||
pop_deferring_access_checks ();
|
||||
/* Restore saved state. */
|
||||
--function_depth;
|
||||
parser->greater_than_is_operator_p
|
||||
= saved_greater_than_is_operator_p;
|
||||
parser->local_variables_forbidden_p
|
||||
@ -14110,6 +14111,7 @@ cp_parser_try_block (cp_parser* parser)
|
||||
static bool
|
||||
cp_parser_function_try_block (cp_parser* parser)
|
||||
{
|
||||
tree compound_stmt;
|
||||
tree try_block;
|
||||
bool ctor_initializer_p;
|
||||
|
||||
@ -14117,7 +14119,7 @@ cp_parser_function_try_block (cp_parser* parser)
|
||||
if (!cp_parser_require_keyword (parser, RID_TRY, "`try'"))
|
||||
return false;
|
||||
/* Let the rest of the front-end know where we are. */
|
||||
try_block = begin_function_try_block ();
|
||||
try_block = begin_function_try_block (&compound_stmt);
|
||||
/* Parse the function-body. */
|
||||
ctor_initializer_p
|
||||
= cp_parser_ctor_initializer_opt_and_function_body (parser);
|
||||
@ -14126,7 +14128,7 @@ cp_parser_function_try_block (cp_parser* parser)
|
||||
/* Parse the handlers. */
|
||||
cp_parser_handler_seq (parser);
|
||||
/* We're done with the handlers. */
|
||||
finish_function_handler_sequence (try_block);
|
||||
finish_function_handler_sequence (try_block, compound_stmt);
|
||||
|
||||
return ctor_initializer_p;
|
||||
}
|
||||
@ -15305,6 +15307,7 @@ static void
|
||||
cp_parser_template_declaration_after_export (cp_parser* parser, bool member_p)
|
||||
{
|
||||
tree decl = NULL_TREE;
|
||||
tree checks;
|
||||
tree parameter_list;
|
||||
bool friend_p = false;
|
||||
bool need_lang_pop;
|
||||
@ -15329,6 +15332,12 @@ cp_parser_template_declaration_after_export (cp_parser* parser, bool member_p)
|
||||
}
|
||||
else
|
||||
need_lang_pop = false;
|
||||
|
||||
/* We cannot perform access checks on the template parameter
|
||||
declarations until we know what is being declared, just as we
|
||||
cannot check the decl-specifier list. */
|
||||
push_deferring_access_checks (dk_deferred);
|
||||
|
||||
/* If the next token is `>', then we have an invalid
|
||||
specialization. Rather than complain about an invalid template
|
||||
parameter, issue an error message here. */
|
||||
@ -15346,6 +15355,12 @@ cp_parser_template_declaration_after_export (cp_parser* parser, bool member_p)
|
||||
parameter_list = end_template_parm_list (parameter_list);
|
||||
}
|
||||
|
||||
/* Get the deferred access checks from the parameter list. These
|
||||
will be checked once we know what is being declared, as for a
|
||||
member template the checks must be performed in the scope of the
|
||||
class containing the member. */
|
||||
checks = get_deferred_access_checks ();
|
||||
|
||||
/* Look for the `>'. */
|
||||
cp_parser_skip_until_found (parser, CPP_GREATER, "`>'");
|
||||
/* We just processed one more parameter list. */
|
||||
@ -15360,11 +15375,10 @@ cp_parser_template_declaration_after_export (cp_parser* parser, bool member_p)
|
||||
/* There are no access checks when parsing a template, as we do not
|
||||
know if a specialization will be a friend. */
|
||||
push_deferring_access_checks (dk_no_check);
|
||||
|
||||
decl = cp_parser_single_declaration (parser,
|
||||
checks,
|
||||
member_p,
|
||||
&friend_p);
|
||||
|
||||
pop_deferring_access_checks ();
|
||||
|
||||
/* If this is a member template declaration, let the front
|
||||
@ -15383,6 +15397,8 @@ cp_parser_template_declaration_after_export (cp_parser* parser, bool member_p)
|
||||
/* We are done with the current parameter list. */
|
||||
--parser->num_template_parameter_lists;
|
||||
|
||||
pop_deferring_access_checks ();
|
||||
|
||||
/* Finish up. */
|
||||
finish_template_decl (parameter_list);
|
||||
|
||||
@ -15404,6 +15420,18 @@ cp_parser_template_declaration_after_export (cp_parser* parser, bool member_p)
|
||||
TREE_VALUE (parser->unparsed_functions_queues));
|
||||
}
|
||||
|
||||
/* Perform the deferred access checks from a template-parameter-list.
|
||||
CHECKS is a TREE_LIST of access checks, as returned by
|
||||
get_deferred_access_checks. */
|
||||
|
||||
static void
|
||||
cp_parser_perform_template_parameter_access_checks (tree checks)
|
||||
{
|
||||
++processing_template_parmlist;
|
||||
perform_access_checks (checks);
|
||||
--processing_template_parmlist;
|
||||
}
|
||||
|
||||
/* Parse a `decl-specifier-seq [opt] init-declarator [opt] ;' or
|
||||
`function-definition' sequence. MEMBER_P is true, this declaration
|
||||
appears in a class scope.
|
||||
@ -15413,6 +15441,7 @@ cp_parser_template_declaration_after_export (cp_parser* parser, bool member_p)
|
||||
|
||||
static tree
|
||||
cp_parser_single_declaration (cp_parser* parser,
|
||||
tree checks,
|
||||
bool member_p,
|
||||
bool* friend_p)
|
||||
{
|
||||
@ -15474,6 +15503,9 @@ cp_parser_single_declaration (cp_parser* parser,
|
||||
decl = TYPE_NAME (decl);
|
||||
else
|
||||
decl = error_mark_node;
|
||||
|
||||
/* Perform access checks for template parameters. */
|
||||
cp_parser_perform_template_parameter_access_checks (checks);
|
||||
}
|
||||
}
|
||||
/* If it's not a template class, try for a template function. If
|
||||
@ -15486,6 +15518,7 @@ cp_parser_single_declaration (cp_parser* parser,
|
||||
|| decl_specifiers.type != error_mark_node))
|
||||
decl = cp_parser_init_declarator (parser,
|
||||
&decl_specifiers,
|
||||
checks,
|
||||
/*function_definition_allowed_p=*/true,
|
||||
member_p,
|
||||
declares_class_or_enum,
|
||||
@ -15974,16 +16007,56 @@ cp_parser_declares_only_class_p (cp_parser *parser)
|
||||
|| cp_lexer_next_token_is (parser->lexer, CPP_COMMA));
|
||||
}
|
||||
|
||||
/* Update the DECL_SPECS to reflect the STORAGE_CLASS. */
|
||||
/* Update the DECL_SPECS to reflect the storage class indicated by
|
||||
KEYWORD. */
|
||||
|
||||
static void
|
||||
cp_parser_set_storage_class (cp_decl_specifier_seq *decl_specs,
|
||||
cp_storage_class storage_class)
|
||||
cp_parser_set_storage_class (cp_parser *parser,
|
||||
cp_decl_specifier_seq *decl_specs,
|
||||
enum rid keyword)
|
||||
{
|
||||
if (decl_specs->storage_class != sc_none)
|
||||
decl_specs->multiple_storage_classes_p = true;
|
||||
else
|
||||
decl_specs->storage_class = storage_class;
|
||||
cp_storage_class storage_class;
|
||||
|
||||
if (parser->in_unbraced_linkage_specification_p)
|
||||
{
|
||||
error ("invalid use of %qD in linkage specification",
|
||||
ridpointers[keyword]);
|
||||
return;
|
||||
}
|
||||
else if (decl_specs->storage_class != sc_none)
|
||||
{
|
||||
decl_specs->multiple_storage_classes_p = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if ((keyword == RID_EXTERN || keyword == RID_STATIC)
|
||||
&& decl_specs->specs[(int) ds_thread])
|
||||
{
|
||||
error ("%<__thread%> before %qD", ridpointers[keyword]);
|
||||
decl_specs->specs[(int) ds_thread] = 0;
|
||||
}
|
||||
|
||||
switch (keyword)
|
||||
{
|
||||
case RID_AUTO:
|
||||
storage_class = sc_auto;
|
||||
break;
|
||||
case RID_REGISTER:
|
||||
storage_class = sc_register;
|
||||
break;
|
||||
case RID_STATIC:
|
||||
storage_class = sc_static;
|
||||
break;
|
||||
case RID_EXTERN:
|
||||
storage_class = sc_extern;
|
||||
break;
|
||||
case RID_MUTABLE:
|
||||
storage_class = sc_mutable;
|
||||
break;
|
||||
default:
|
||||
gcc_unreachable ();
|
||||
}
|
||||
decl_specs->storage_class = storage_class;
|
||||
}
|
||||
|
||||
/* Update the DECL_SPECS to reflect the TYPE_SPEC. If USER_DEFINED_P
|
||||
|
60
gnu/dist/gcc4/gcc/cp/pt.c
vendored
60
gnu/dist/gcc4/gcc/cp/pt.c
vendored
@ -150,7 +150,6 @@ static tree get_template_base (tree, tree, tree, tree);
|
||||
static tree try_class_unification (tree, tree, tree, tree);
|
||||
static int coerce_template_template_parms (tree, tree, tsubst_flags_t,
|
||||
tree, tree);
|
||||
static tree determine_specialization (tree, tree, tree *, int, int);
|
||||
static int template_args_equal (tree, tree);
|
||||
static void tsubst_default_arguments (tree);
|
||||
static tree for_each_template_parm_r (tree *, int *, void *);
|
||||
@ -1342,6 +1341,11 @@ print_candidates (tree fns)
|
||||
template classes that appeared in the name of the function. See
|
||||
check_explicit_specialization for a more accurate description.
|
||||
|
||||
TSK indicates what kind of template declaration (if any) is being
|
||||
declared. TSK_TEMPLATE indicates that the declaration given by
|
||||
DECL, though a FUNCTION_DECL, has template parameters, and is
|
||||
therefore a template function.
|
||||
|
||||
The template args (those explicitly specified and those deduced)
|
||||
are output in a newly created vector *TARGS_OUT.
|
||||
|
||||
@ -1353,7 +1357,8 @@ determine_specialization (tree template_id,
|
||||
tree decl,
|
||||
tree* targs_out,
|
||||
int need_member_template,
|
||||
int template_count)
|
||||
int template_count,
|
||||
tmpl_spec_kind tsk)
|
||||
{
|
||||
tree fns;
|
||||
tree targs;
|
||||
@ -1466,6 +1471,18 @@ determine_specialization (tree template_id,
|
||||
(current_template_parms))))
|
||||
continue;
|
||||
|
||||
/* Function templates cannot be specializations; there are
|
||||
no partial specializations of functions. Therefore, if
|
||||
the type of DECL does not match FN, there is no
|
||||
match. */
|
||||
if (tsk == tsk_template)
|
||||
{
|
||||
if (compparms (TYPE_ARG_TYPES (TREE_TYPE (fn)),
|
||||
decl_arg_types))
|
||||
candidates = tree_cons (NULL_TREE, fn, candidates);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* See whether this function might be a specialization of this
|
||||
template. */
|
||||
targs = get_bindings (fn, decl, explicit_targs, /*check_ret=*/true);
|
||||
@ -1592,10 +1609,14 @@ determine_specialization (tree template_id,
|
||||
/* We have one, and exactly one, match. */
|
||||
if (candidates)
|
||||
{
|
||||
tree fn = TREE_VALUE (candidates);
|
||||
/* DECL is a re-declaration of a template function. */
|
||||
if (TREE_CODE (fn) == TEMPLATE_DECL)
|
||||
return fn;
|
||||
/* It was a specialization of an ordinary member function in a
|
||||
template class. */
|
||||
*targs_out = copy_node (DECL_TI_ARGS (TREE_VALUE (candidates)));
|
||||
return DECL_TI_TEMPLATE (TREE_VALUE (candidates));
|
||||
*targs_out = copy_node (DECL_TI_ARGS (fn));
|
||||
return DECL_TI_TEMPLATE (fn);
|
||||
}
|
||||
|
||||
/* It was a specialization of a template. */
|
||||
@ -2049,7 +2070,8 @@ check_explicit_specialization (tree declarator,
|
||||
tmpl = determine_specialization (declarator, decl,
|
||||
&targs,
|
||||
member_specialization,
|
||||
template_count);
|
||||
template_count,
|
||||
tsk);
|
||||
|
||||
if (!tmpl || tmpl == error_mark_node)
|
||||
/* We couldn't figure out what this declaration was
|
||||
@ -2095,8 +2117,8 @@ check_explicit_specialization (tree declarator,
|
||||
revert_static_member_fn (decl);
|
||||
|
||||
/* If this is a specialization of a member template of a
|
||||
template class. In we want to return the TEMPLATE_DECL,
|
||||
not the specialization of it. */
|
||||
template class, we want to return the TEMPLATE_DECL, not
|
||||
the specialization of it. */
|
||||
if (tsk == tsk_template)
|
||||
{
|
||||
SET_DECL_TEMPLATE_SPECIALIZATION (tmpl);
|
||||
@ -3013,7 +3035,7 @@ push_template_decl_real (tree decl, bool is_friend)
|
||||
template. ... Template allocation functions shall
|
||||
have two or more parameters. */
|
||||
error ("invalid template declaration of %qD", decl);
|
||||
return decl;
|
||||
return error_mark_node;
|
||||
}
|
||||
}
|
||||
else if (DECL_IMPLICIT_TYPEDEF_P (decl)
|
||||
@ -3461,6 +3483,8 @@ convert_nontype_argument (tree type, tree expr)
|
||||
instantiated -- but here we need the resolved form so that we can
|
||||
convert the argument. */
|
||||
expr = fold_non_dependent_expr (expr);
|
||||
if (error_operand_p (expr))
|
||||
return error_mark_node;
|
||||
expr_type = TREE_TYPE (expr);
|
||||
|
||||
/* HACK: Due to double coercion, we can get a
|
||||
@ -5163,7 +5187,8 @@ tsubst_friend_function (tree decl, tree args)
|
||||
tmpl = determine_specialization (template_id, new_friend,
|
||||
&new_args,
|
||||
/*need_member_template=*/0,
|
||||
TREE_VEC_LENGTH (args));
|
||||
TREE_VEC_LENGTH (args),
|
||||
tsk_none);
|
||||
return instantiate_template (tmpl, new_args, tf_error);
|
||||
}
|
||||
|
||||
@ -6152,8 +6177,15 @@ tsubst_default_argument (tree fn, tree type, tree arg)
|
||||
}
|
||||
|
||||
push_deferring_access_checks(dk_no_deferred);
|
||||
/* The default argument expression may cause implicitly defined
|
||||
member functions to be synthesized, which will result in garbage
|
||||
collection. We must treat this situation as if we were within
|
||||
the body of function so as to avoid collecting live data on the
|
||||
stack. */
|
||||
++function_depth;
|
||||
arg = tsubst_expr (arg, DECL_TI_ARGS (fn),
|
||||
tf_error | tf_warning, NULL_TREE);
|
||||
--function_depth;
|
||||
pop_deferring_access_checks();
|
||||
|
||||
/* Restore the "this" pointer. */
|
||||
@ -8386,8 +8418,10 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl)
|
||||
}
|
||||
else
|
||||
{
|
||||
tree compound_stmt = NULL_TREE;
|
||||
|
||||
if (FN_TRY_BLOCK_P (t))
|
||||
stmt = begin_function_try_block ();
|
||||
stmt = begin_function_try_block (&compound_stmt);
|
||||
else
|
||||
stmt = begin_try_block ();
|
||||
|
||||
@ -8400,7 +8434,7 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl)
|
||||
|
||||
tsubst_expr (TRY_HANDLERS (t), args, complain, in_decl);
|
||||
if (FN_TRY_BLOCK_P (t))
|
||||
finish_function_handler_sequence (stmt);
|
||||
finish_function_handler_sequence (stmt, compound_stmt);
|
||||
else
|
||||
finish_handler_sequence (stmt);
|
||||
}
|
||||
@ -11111,7 +11145,7 @@ do_decl_instantiation (tree decl, tree storage)
|
||||
tree result = NULL_TREE;
|
||||
int extern_p = 0;
|
||||
|
||||
if (!decl)
|
||||
if (!decl || decl == error_mark_node)
|
||||
/* An error occurred, for which grokdeclarator has already issued
|
||||
an appropriate message. */
|
||||
return;
|
||||
@ -12651,6 +12685,8 @@ any_dependent_template_arguments_p (tree args)
|
||||
|
||||
if (!args)
|
||||
return false;
|
||||
if (args == error_mark_node)
|
||||
return true;
|
||||
|
||||
for (i = 0; i < TMPL_ARGS_DEPTH (args); ++i)
|
||||
{
|
||||
|
3
gnu/dist/gcc4/gcc/cp/search.c
vendored
3
gnu/dist/gcc4/gcc/cp/search.c
vendored
@ -1479,7 +1479,8 @@ adjust_result_of_qualified_name_lookup (tree decl,
|
||||
tree qualifying_scope,
|
||||
tree context_class)
|
||||
{
|
||||
if (context_class && CLASS_TYPE_P (qualifying_scope)
|
||||
if (context_class && context_class != error_mark_node
|
||||
&& CLASS_TYPE_P (qualifying_scope)
|
||||
&& DERIVED_FROM_P (qualifying_scope, context_class)
|
||||
&& BASELINK_P (decl))
|
||||
{
|
||||
|
46
gnu/dist/gcc4/gcc/cp/semantics.c
vendored
46
gnu/dist/gcc4/gcc/cp/semantics.c
vendored
@ -265,6 +265,21 @@ pop_to_parent_deferring_access_checks (void)
|
||||
}
|
||||
}
|
||||
|
||||
/* Perform the access checks in CHECKS. The TREE_PURPOSE of each node
|
||||
is the BINFO indicating the qualifying scope used to access the
|
||||
DECL node stored in the TREE_VALUE of the node. */
|
||||
|
||||
void
|
||||
perform_access_checks (tree checks)
|
||||
{
|
||||
while (checks)
|
||||
{
|
||||
enforce_access (TREE_PURPOSE (checks),
|
||||
TREE_VALUE (checks));
|
||||
checks = TREE_CHAIN (checks);
|
||||
}
|
||||
}
|
||||
|
||||
/* Perform the deferred access checks.
|
||||
|
||||
After performing the checks, we still have to keep the list
|
||||
@ -284,14 +299,7 @@ pop_to_parent_deferring_access_checks (void)
|
||||
void
|
||||
perform_deferred_access_checks (void)
|
||||
{
|
||||
tree deferred_check;
|
||||
|
||||
for (deferred_check = get_deferred_access_checks ();
|
||||
deferred_check;
|
||||
deferred_check = TREE_CHAIN (deferred_check))
|
||||
/* Check access. */
|
||||
enforce_access (TREE_PURPOSE (deferred_check),
|
||||
TREE_VALUE (deferred_check));
|
||||
perform_access_checks (get_deferred_access_checks ());
|
||||
}
|
||||
|
||||
/* Defer checking the accessibility of DECL, when looked up in
|
||||
@ -967,12 +975,18 @@ begin_try_block (void)
|
||||
return r;
|
||||
}
|
||||
|
||||
/* Likewise, for a function-try-block. */
|
||||
/* Likewise, for a function-try-block. The block returned in
|
||||
*COMPOUND_STMT is an artificial outer scope, containing the
|
||||
function-try-block. */
|
||||
|
||||
tree
|
||||
begin_function_try_block (void)
|
||||
begin_function_try_block (tree *compound_stmt)
|
||||
{
|
||||
tree r = begin_try_block ();
|
||||
tree r;
|
||||
/* This outer scope does not exist in the C++ standard, but we need
|
||||
a place to put __FUNCTION__ and similar variables. */
|
||||
*compound_stmt = begin_compound_stmt (0);
|
||||
r = begin_try_block ();
|
||||
FN_TRY_BLOCK_P (r) = 1;
|
||||
return r;
|
||||
}
|
||||
@ -1026,13 +1040,16 @@ finish_handler_sequence (tree try_block)
|
||||
check_handlers (TRY_HANDLERS (try_block));
|
||||
}
|
||||
|
||||
/* Likewise, for a function-try-block. */
|
||||
/* Finish the handler-seq for a function-try-block, given by
|
||||
TRY_BLOCK. COMPOUND_STMT is the outer block created by
|
||||
begin_function_try_block. */
|
||||
|
||||
void
|
||||
finish_function_handler_sequence (tree try_block)
|
||||
finish_function_handler_sequence (tree try_block, tree compound_stmt)
|
||||
{
|
||||
in_function_try_handler = 0;
|
||||
finish_handler_sequence (try_block);
|
||||
finish_compound_stmt (compound_stmt);
|
||||
}
|
||||
|
||||
/* Begin a handler. Returns a HANDLER if appropriate. */
|
||||
@ -2026,7 +2043,8 @@ finish_compound_literal (tree type, VEC(constructor_elt,gc) *initializer_list)
|
||||
}
|
||||
|
||||
/* Mark it as a compound-literal. */
|
||||
TREE_HAS_CONSTRUCTOR (compound_literal) = 1;
|
||||
if (TREE_CODE (compound_literal) == CONSTRUCTOR)
|
||||
TREE_HAS_CONSTRUCTOR (compound_literal) = 1;
|
||||
|
||||
return compound_literal;
|
||||
}
|
||||
|
8
gnu/dist/gcc4/gcc/cp/typeck.c
vendored
8
gnu/dist/gcc4/gcc/cp/typeck.c
vendored
@ -2621,7 +2621,7 @@ convert_arguments (tree typelist, tree values, tree fndecl, int flags)
|
||||
tree type = typetail ? TREE_VALUE (typetail) : 0;
|
||||
tree val = TREE_VALUE (valtail);
|
||||
|
||||
if (val == error_mark_node)
|
||||
if (val == error_mark_node || type == error_mark_node)
|
||||
return error_mark_node;
|
||||
|
||||
if (type == void_type_node)
|
||||
@ -5363,7 +5363,7 @@ build_modify_expr (tree lhs, enum tree_code modifycode, tree rhs)
|
||||
bool plain_assign = (modifycode == NOP_EXPR);
|
||||
|
||||
/* Avoid duplicate error messages from operands that had errors. */
|
||||
if (lhs == error_mark_node || rhs == error_mark_node)
|
||||
if (error_operand_p (lhs) || error_operand_p (rhs))
|
||||
return error_mark_node;
|
||||
|
||||
/* Handle control structure constructs used as "lvalues". */
|
||||
@ -5630,6 +5630,10 @@ build_modify_expr (tree lhs, enum tree_code modifycode, tree rhs)
|
||||
if (newrhs == error_mark_node)
|
||||
return error_mark_node;
|
||||
|
||||
if (TREE_CODE (lhs) == COMPONENT_REF)
|
||||
newrhs = adjust_bitfield_initializer (TREE_OPERAND (lhs, 1),
|
||||
newrhs);
|
||||
|
||||
if (c_dialect_objc () && flag_objc_gc)
|
||||
{
|
||||
result = objc_generate_write_barrier (lhs, modifycode, newrhs);
|
||||
|
23
gnu/dist/gcc4/gcc/cp/typeck2.c
vendored
23
gnu/dist/gcc4/gcc/cp/typeck2.c
vendored
@ -838,6 +838,28 @@ process_init_constructor_array (tree type, tree init)
|
||||
return flags;
|
||||
}
|
||||
|
||||
/* INIT is the initializer for FIELD. If FIELD is a bitfield, mask
|
||||
INIT so that its range is bounded by that of FIELD. Returns the
|
||||
(possibly adjusted) initializer. */
|
||||
|
||||
tree
|
||||
adjust_bitfield_initializer (tree field, tree init)
|
||||
{
|
||||
int width;
|
||||
tree mask;
|
||||
|
||||
if (!DECL_C_BIT_FIELD (field))
|
||||
return init;
|
||||
|
||||
width = tree_low_cst (DECL_SIZE (field), /*pos=*/1);
|
||||
if (width < TYPE_PRECISION (TREE_TYPE (field)))
|
||||
{
|
||||
mask = build_low_bits_mask (TREE_TYPE (field), width);
|
||||
init = cp_build_binary_op (BIT_AND_EXPR, init, mask);
|
||||
}
|
||||
return init;
|
||||
}
|
||||
|
||||
/* Subroutine of process_init_constructor, which will process an initializer
|
||||
INIT for a class of type TYPE. Returns the flags (PICFLAG_*) which describe
|
||||
the initializers. */
|
||||
@ -891,6 +913,7 @@ process_init_constructor_record (tree type, tree init)
|
||||
|
||||
gcc_assert (ce->value);
|
||||
next = digest_init (TREE_TYPE (field), ce->value);
|
||||
next = adjust_bitfield_initializer (field, next);
|
||||
++idx;
|
||||
}
|
||||
else if (TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (field)))
|
||||
|
6
gnu/dist/gcc4/gcc/doc/install.texi
vendored
6
gnu/dist/gcc4/gcc/doc/install.texi
vendored
@ -1272,8 +1272,6 @@ will be run on these files to make them compatible with GCC@.
|
||||
Tells GCC not use any target headers from a libc when building a cross
|
||||
compiler. When crossing to GNU/Linux, you need the headers so GCC
|
||||
can build the exception handling for libgcc.
|
||||
See @uref{http://www.objsw.com/CrossGCC/,,CrossGCC} for more information
|
||||
on this option.
|
||||
|
||||
@item --with-libs
|
||||
@itemx --with-libs=``@var{dir1} @var{dir2} @dots{} @var{dirN}''
|
||||
@ -1583,10 +1581,6 @@ need to disable comparison in the @file{Makefile}.)
|
||||
|
||||
@section Building a cross compiler
|
||||
|
||||
We recommend reading the
|
||||
@uref{http://www.objsw.com/CrossGCC/,,crossgcc FAQ}
|
||||
for information about building cross compilers.
|
||||
|
||||
When building a cross compiler, it is not generally possible to do a
|
||||
3-stage bootstrap of the compiler. This makes for an interesting problem
|
||||
as parts of GCC can only be built with GCC@.
|
||||
|
141
gnu/dist/gcc4/gcc/doc/passes.texi
vendored
141
gnu/dist/gcc4/gcc/doc/passes.texi
vendored
@ -246,7 +246,7 @@ and is described by @code{pass_referenced_vars}.
|
||||
This pass rewrites the function such that it is in SSA form. After
|
||||
this pass, all @code{is_gimple_reg} variables will be referenced by
|
||||
@code{SSA_NAME}, and all occurrences of other variables will be
|
||||
annotated with @code{VDEFS} and @code{VUSES}; phi nodes will have
|
||||
annotated with @code{VDEFS} and @code{VUSES}; PHI nodes will have
|
||||
been inserted as necessary for each basic block. This pass is
|
||||
located in @file{tree-ssa.c} and is described by @code{pass_build_ssa}.
|
||||
|
||||
@ -276,9 +276,9 @@ expression simplification, and jump threading. It is run multiple times
|
||||
throughout the optimization process. It it located in @file{tree-ssa-dom.c}
|
||||
and is described by @code{pass_dominator}.
|
||||
|
||||
@item Redundant phi elimination
|
||||
@item Redundant PHI elimination
|
||||
|
||||
This pass removes phi nodes for which all of the arguments are the same
|
||||
This pass removes PHI nodes for which all of the arguments are the same
|
||||
value, excluding feedback. Such degenerate forms are typically created
|
||||
by removing unreachable code. The pass is run multiple times throughout
|
||||
the optimization process. It is located in @file{tree-ssa.c} and is
|
||||
@ -302,7 +302,7 @@ located in @file{tree-ssa-copyrename.c} and is described by
|
||||
|
||||
@item PHI node optimizations
|
||||
|
||||
This pass recognizes forms of phi inputs that can be represented as
|
||||
This pass recognizes forms of PHI inputs that can be represented as
|
||||
conditional expressions and rewrites them into straight line code.
|
||||
It is located in @file{tree-ssa-phiopt.c} and is described by
|
||||
@code{pass_phiopt}.
|
||||
@ -368,6 +368,12 @@ divisions to multiplications by the reciprocal. The pass is located
|
||||
in @file{tree-ssa-math-opts.c} and is described by
|
||||
@code{pass_cse_reciprocal}.
|
||||
|
||||
@item Full redundancy elimination
|
||||
|
||||
This is a simpler form of PRE that only eliminate redundancies that
|
||||
occur an all paths. It is located in @file{tree-ssa-pre.c} and
|
||||
described by @code{pass_fre}.
|
||||
|
||||
@item Loop optimization
|
||||
|
||||
The main driver of the pass is placed in @file{tree-ssa-loop.c}
|
||||
@ -421,11 +427,12 @@ Analysis of data references is in @file{tree-data-ref.c}.
|
||||
@item Tree level if-conversion for vectorizer
|
||||
|
||||
This pass applies if-conversion to simple loops to help vectorizer.
|
||||
We identify if convertable loops, if-convert statements and merge
|
||||
We identify if convertible loops, if-convert statements and merge
|
||||
basic blocks in one big block. The idea is to present loop in such
|
||||
form so that vectorizer can have one to one mapping between statements
|
||||
and available vector operations. This patch re-introduces COND_EXPR
|
||||
at GIMPLE level. This pass is located in @file{tree-if-conv.c}.
|
||||
at GIMPLE level. This pass is located in @file{tree-if-conv.c} and is
|
||||
described by @code{pass_if_conversion}.
|
||||
|
||||
@item Conditional constant propagation
|
||||
|
||||
@ -434,9 +441,38 @@ that must be constant even in the presence of conditional branches.
|
||||
The pass is located in @file{tree-ssa-ccp.c} and is described
|
||||
by @code{pass_ccp}.
|
||||
|
||||
@item Folding builtin functions
|
||||
A related pass that works on memory loads and stores, and not just
|
||||
register values, is located in @file{tree-ssa-ccp.c} and described by
|
||||
@code{pass_store_ccp}.
|
||||
|
||||
This pass simplifies builtin functions, as applicable, with constant
|
||||
@item Conditional copy propagation
|
||||
|
||||
This is similar to constant propagation but the lattice of values is
|
||||
the ``copy-of'' relation. It eliminates redundant copies from the
|
||||
code. The pass is located in @file{tree-ssa-copy.c} and described by
|
||||
@code{pass_copy_prop}.
|
||||
|
||||
A related pass that works on memory copies, and not just register
|
||||
copies, is located in @file{tree-ssa-copy.c} and described by
|
||||
@code{pass_store_copy_prop}.
|
||||
|
||||
@item Value range propagation
|
||||
|
||||
This transformation is similar to constant propagation but
|
||||
instead of propagating single constant values, it propagates
|
||||
known value ranges. The implementation is based on Patterson's
|
||||
range propagation algorithm (Accurate Static Branch Prediction by
|
||||
Value Range Propagation, J. R. C. Patterson, PLDI '95). In
|
||||
contrast to Patterson's algorithm, this implementation does not
|
||||
propagate branch probabilities nor it uses more than a single
|
||||
range per SSA name. This means that the current implementation
|
||||
cannot be used for branch prediction (though adapting it would
|
||||
not be difficult). The pass is located in @file{tree-vrp.c} and is
|
||||
described by @code{pass_vrp}.
|
||||
|
||||
@item Folding built-in functions
|
||||
|
||||
This pass simplifies built-in functions, as applicable, with constant
|
||||
arguments or with inferrable string lengths. It is located in
|
||||
@file{tree-ssa-ccp.c} and is described by @code{pass_fold_builtins}.
|
||||
|
||||
@ -446,12 +482,6 @@ This pass identifies critical edges and inserts empty basic blocks
|
||||
such that the edge is no longer critical. The pass is located in
|
||||
@file{tree-cfg.c} and is described by @code{pass_split_crit_edges}.
|
||||
|
||||
@item Partial redundancy elimination
|
||||
|
||||
This pass answers the question ``given a hypothetical temporary
|
||||
variable, what expressions could we eliminate?'' It is located
|
||||
in @file{tree-ssa-pre.c} and is described by @code{pass_pre}.
|
||||
|
||||
@item Control dependence dead code elimination
|
||||
|
||||
This pass is a stronger form of dead code elimination that can
|
||||
@ -495,7 +525,88 @@ is described by @code{pass_mudflap_2}.
|
||||
This pass rewrites the function such that it is in normal form. At
|
||||
the same time, we eliminate as many single-use temporaries as possible,
|
||||
so the intermediate language is no longer GIMPLE, but GENERIC@. The
|
||||
pass is located in @file{tree-ssa.c} and is described by @code{pass_del_ssa}.
|
||||
pass is located in @file{tree-outof-ssa.c} and is described by
|
||||
@code{pass_del_ssa}.
|
||||
|
||||
@item Merge PHI nodes that feed into one another
|
||||
|
||||
This is part of the CFG cleanup passes. It attempts to join PHI nodes
|
||||
from a forwarder CFG block into another block with PHI nodes. The
|
||||
pass is located in @file{tree-cfgcleanup.c} and is described by
|
||||
@code{pass_merge_phi}.
|
||||
|
||||
@item Return value optimization
|
||||
|
||||
If a function always returns the same local variable, and that local
|
||||
variable is an aggregate type, then the variable is replaced with the
|
||||
return value for the function (i.e., the function's DECL_RESULT). This
|
||||
is equivalent to the C++ named return value optimization applied to
|
||||
GIMPLE. The pass is located in @file{tree-nrv.c} and is described by
|
||||
@code{pass_nrv}.
|
||||
|
||||
@item Return slot optimization
|
||||
|
||||
If a function returns a memory object and is called as @code{var =
|
||||
foo()}, this pass tries to change the call so that the address of
|
||||
@code{var} is sent to the caller to avoid an extra memory copy. This
|
||||
pass is located in @code{tree-nrv.c} and is described by
|
||||
@code{pass_return_slot}.
|
||||
|
||||
@item Optimize calls to @code{__builtin_object_size}
|
||||
|
||||
This is a propagation pass similar to CCP that tries to remove calls
|
||||
to @code{__builtin_object_size} when the size of the object can be
|
||||
computed at compile-time. This pass is located in
|
||||
@file{tree-object-size.c} and is described by
|
||||
@code{pass_object_sizes}.
|
||||
|
||||
@item Loop invariant motion
|
||||
|
||||
This pass removes expensive loop-invariant computations out of loops.
|
||||
The pass is located in @file{tree-ssa-loop.c} and described by
|
||||
@code{pass_lim}.
|
||||
|
||||
@item Loop nest optimizations
|
||||
|
||||
This is a family of loop transformations that works on loop nests. It
|
||||
includes loop interchange, scaling, skewing and reversal and they are
|
||||
all geared to the optimization of data locality in array traversals
|
||||
and the removal of dependencies that hamper optimizations such as loop
|
||||
parallelization and vectorization. The pass is located in
|
||||
@file{tree-loop-linear.c} and described by
|
||||
@code{pass_linear_transform}.
|
||||
|
||||
@item Removal of empty loops
|
||||
|
||||
This pass removes loops with no code in them. The pass is located in
|
||||
@file{tree-ssa-loop-ivcanon.c} and described by
|
||||
@code{pass_empty_loop}.
|
||||
|
||||
@item Unrolling of small loops
|
||||
|
||||
This pass completely unrolls loops with few iterations. The pass
|
||||
is located in @file{tree-ssa-loop-ivcanon.c} and described by
|
||||
@code{pass_complete_unroll}.
|
||||
|
||||
@item Reassociation
|
||||
|
||||
This pass rewrites arithmetic expressions to enable optimizations that
|
||||
operate on them, like redundancy elimination and vectorization. The
|
||||
pass is located in @file{tree-ssa-reassoc.c} and described by
|
||||
@code{pass_reassoc}.
|
||||
|
||||
@item Optimization of @code{stdarg} functions
|
||||
|
||||
This pass tries to avoid the saving of register arguments into the
|
||||
stack on entry to @code{stdarg} functions. If the function doesn't
|
||||
use any @code{va_start} macros, no registers need to be saved. If
|
||||
@code{va_start} macros are used, the @code{va_list} variables don't
|
||||
escape the function, it is only necessary to save registers that will
|
||||
be used in @code{va_arg} macros. For instance, if @code{va_arg} is
|
||||
only used with integral types in the function, floating point
|
||||
registers don't need to be saved. This pass is located in
|
||||
@code{tree-stdarg.c} and described by @code{pass_stdarg}.
|
||||
|
||||
@end itemize
|
||||
|
||||
@node RTL passes
|
||||
|
9
gnu/dist/gcc4/gcc/objc/ChangeLog
vendored
9
gnu/dist/gcc4/gcc/objc/ChangeLog
vendored
@ -1,3 +1,12 @@
|
||||
2006-05-24 Release Manager
|
||||
|
||||
* GCC 4.1.1 released.
|
||||
|
||||
2006-05-05 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR objc/27240
|
||||
* objc-act.c (objc_is_public): Return early on invalid type.
|
||||
|
||||
2006-02-28 Release Manager
|
||||
|
||||
* GCC 4.1.0 released.
|
||||
|
3
gnu/dist/gcc4/gcc/objc/objc-act.c
vendored
3
gnu/dist/gcc4/gcc/objc/objc-act.c
vendored
@ -7167,6 +7167,9 @@ objc_is_public (tree expr, tree identifier)
|
||||
return 1;
|
||||
#endif
|
||||
|
||||
if (TREE_TYPE (expr) == error_mark_node)
|
||||
return 1;
|
||||
|
||||
basetype = TYPE_MAIN_VARIANT (TREE_TYPE (expr));
|
||||
|
||||
if (basetype && TREE_CODE (basetype) == RECORD_TYPE)
|
||||
|
4
gnu/dist/gcc4/gcc/objcp/ChangeLog
vendored
4
gnu/dist/gcc4/gcc/objcp/ChangeLog
vendored
@ -1,3 +1,7 @@
|
||||
2006-05-24 Release Manager
|
||||
|
||||
* GCC 4.1.1 released.
|
||||
|
||||
2006-02-28 Release Manager
|
||||
|
||||
* GCC 4.1.0 released.
|
||||
|
2
gnu/dist/gcc4/gcc/params.def
vendored
2
gnu/dist/gcc4/gcc/params.def
vendored
@ -384,7 +384,7 @@ DEFPARAM(PARAM_MAX_CSE_PATH_LENGTH,
|
||||
"The maximum length of path considered in cse",
|
||||
10, 0, 0)
|
||||
DEFPARAM(PARAM_MAX_CSE_INSNS,
|
||||
"max-flow-memory-locations",
|
||||
"max-cse-insns",
|
||||
"The maximum instructions CSE process before flushing",
|
||||
1000, 0, 0)
|
||||
|
||||
|
17
gnu/dist/gcc4/gcc/po/ChangeLog
vendored
17
gnu/dist/gcc4/gcc/po/ChangeLog
vendored
@ -1,3 +1,20 @@
|
||||
2006-05-24 Release Manager
|
||||
|
||||
* GCC 4.1.1 released.
|
||||
|
||||
2006-05-24 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* gcc.pot: Regenerated.
|
||||
|
||||
2006-05-20 Joseph S. Myers <joseph@codesourcery.com>
|
||||
|
||||
* sv.po, tr.po: Update.
|
||||
|
||||
2006-04-21 Joseph S. Myers <joseph@codesourcery.com>
|
||||
|
||||
* de.po, es.po, sv.po: Update.
|
||||
* zh_TW.po: New.
|
||||
|
||||
2006-03-31 Joseph S. Myers <joseph@codesourcery.com>
|
||||
|
||||
* sv.po: Update.
|
||||
|
8891
gnu/dist/gcc4/gcc/po/es.po
vendored
8891
gnu/dist/gcc4/gcc/po/es.po
vendored
File diff suppressed because it is too large
Load Diff
3351
gnu/dist/gcc4/gcc/po/gcc.pot
vendored
3351
gnu/dist/gcc4/gcc/po/gcc.pot
vendored
File diff suppressed because it is too large
Load Diff
6
gnu/dist/gcc4/gcc/stmt.c
vendored
6
gnu/dist/gcc4/gcc/stmt.c
vendored
@ -694,7 +694,11 @@ expand_asm_operands (tree string, tree outputs, tree inputs,
|
||||
CLEAR_HARD_REG_SET (clobbered_regs);
|
||||
for (tail = clobbers; tail; tail = TREE_CHAIN (tail))
|
||||
{
|
||||
const char *regname = TREE_STRING_POINTER (TREE_VALUE (tail));
|
||||
const char *regname;
|
||||
|
||||
if (TREE_VALUE (tail) == error_mark_node)
|
||||
return;
|
||||
regname = TREE_STRING_POINTER (TREE_VALUE (tail));
|
||||
|
||||
i = decode_reg_name (regname);
|
||||
if (i >= 0 || i == -4)
|
||||
|
451
gnu/dist/gcc4/gcc/testsuite/ChangeLog
vendored
451
gnu/dist/gcc4/gcc/testsuite/ChangeLog
vendored
@ -1,3 +1,454 @@
|
||||
2006-06-01 Paul Thomas <pault@gcc.gnu.org>
|
||||
|
||||
PR fortran/25098
|
||||
* gfortran.dg/dummy_procedure_1.f90: New test.
|
||||
|
||||
PR fortran/25147
|
||||
* gfortran.dg/dummy_procedure_2.f90: New test.
|
||||
|
||||
* gfortran.dg/associated_2.f90: Correct to make consistent with
|
||||
standard.
|
||||
|
||||
2006-05-31 Thomas Koenig <Thomas.Koenig@online.de>
|
||||
|
||||
PR fortran/23151
|
||||
Backport from mainline.
|
||||
* gfortran.dg/inquire_9.f90: Fix illegal print syntax.
|
||||
* gfortran.dg/print_parentheses_1.f: New test.
|
||||
* gfortran.dg/print_parentheses_2.f90: New test.
|
||||
|
||||
2006-05-31 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/27801
|
||||
* g++.dg/template/cond6.C: New test.
|
||||
|
||||
PR c++/26496
|
||||
* g++.dg/template/crash51.C: New test.
|
||||
* g++.old-deja/g++.mike/net36.C: Tweak error markers.
|
||||
|
||||
PR c++/27385
|
||||
* g++.dg/init/array20.C: New test.
|
||||
|
||||
2006-05-30 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/26433
|
||||
* g++.dg/template/fntry1.C: New test.
|
||||
|
||||
2006-05-30 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/26068
|
||||
* g++.dg/opt/pr17697-3.C: Remove invalid extern specifier.
|
||||
* g++.dg/parse/linkage1.C: New test.
|
||||
|
||||
2006-05-30 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/20173
|
||||
* g++.dg/template/error21.C: New test.
|
||||
|
||||
2006-05-30 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR fortran/27662
|
||||
Backport from mainline
|
||||
2006-05-18 H.J. Lu <hongjiu.lu@intel.com>
|
||||
* gfortran.dg/temporary_1.f90: New file.
|
||||
|
||||
2006-05-30 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c/27718
|
||||
* gcc.dg/sizeof-1.c: New test.
|
||||
|
||||
2006-05-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR libgfortran/27757
|
||||
* gfortran.dg/direct_io_5.f90: New test.
|
||||
|
||||
2006-05-29 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/27713
|
||||
* g++.dg/template/new6.C: New test.
|
||||
|
||||
PR c++/27447
|
||||
* g++.dg/other/ptrmem7.C: New test.
|
||||
|
||||
PR c++/27716
|
||||
* g++.dg/other/assign1.C: New test.
|
||||
|
||||
PR c++/27451
|
||||
* g++.dg/ext/asm9.C: New test.
|
||||
|
||||
PR c/26818
|
||||
* gcc.dg/struct-incompl-1.c: New test.
|
||||
|
||||
2006-05-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR libgfortran/24459
|
||||
* gfortran.dg/namelist_24.f90: New test.
|
||||
|
||||
2005-05-28 Thomas Koenig <Thomas.Koenig@online.de>
|
||||
|
||||
PR fortran/27470
|
||||
Backport from trunk.
|
||||
* gfortran.dg/multiple_allocation_2.f90: New test case.
|
||||
|
||||
2006-05-28 Paul Thomas <pault@gcc.gnu.org>
|
||||
|
||||
PR fortran/25082
|
||||
* gfortran.dg/scalar_return_1.f90: New test.
|
||||
|
||||
PR fortran/27411
|
||||
* gfortran.dg/derived_comp_array_ref_1.f90: New test.
|
||||
|
||||
PR fortran/25746
|
||||
* gfortran.dg/elemental_subroutine_3.f90: New test.
|
||||
|
||||
PR fortran/27584
|
||||
* gfortran.dg/associated_target_1.f90: New test.
|
||||
|
||||
PR fortran/19015
|
||||
* gfortran.dg/maxloc_shape_1.f90: New test.
|
||||
|
||||
PR fortran/27613
|
||||
* gfortran.dg/recursive_reference_1.f90: New test.
|
||||
|
||||
PR fortran/27709
|
||||
* gfortran.dg/spec_expr_4.f90: New test.
|
||||
|
||||
PR fortran/27155
|
||||
* gfortran.dg/transfer_array_intrinsic_4.f90: New test.
|
||||
|
||||
* gfortran.dg/associated_2.f90: New test.
|
||||
|
||||
2006-05-28 Kazu Hirata <kazu@codesourcery.com>
|
||||
|
||||
PR tree-optimization/26622.
|
||||
* gcc.c-torture/compile/pr26622.c: New.
|
||||
|
||||
2006-05-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
|
||||
|
||||
PR fortran/26551
|
||||
* gfortran.dg/recursive_check_1.f: New test.
|
||||
* gfortran.dg/recursive_check_2.f90: New test.
|
||||
|
||||
2006-05-26 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/27758
|
||||
* gcc.dg/pr27758.c: New test.
|
||||
|
||||
2006-05-26 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/27743
|
||||
* gcc.dg/torture/pr27743.c: New testcase.
|
||||
|
||||
2006-05-24 Release Manager
|
||||
|
||||
* GCC 4.1.1 released.
|
||||
|
||||
2005-05-17 Bernd Schmidt <bernd.schmidt@analog.com>
|
||||
|
||||
* g++.dg/opt/temp2.C: New test.
|
||||
|
||||
2006-05-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
|
||||
|
||||
PR fortran/27553
|
||||
* gfortran.dg/label_5.f90: New test.
|
||||
|
||||
2006-05-17 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/27491
|
||||
* g++.dg/init/brace5.C: New test.
|
||||
|
||||
2006-05-17 Zdenek Dvorak <dvorakz@suse.cz>
|
||||
|
||||
PR tree-optimization/27548
|
||||
* g++.dg/tree-ssa/pr27548.C: New test.
|
||||
|
||||
2006-05-17 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/27549
|
||||
* g++.dg/tree-ssa/pr27549.C: New test.
|
||||
|
||||
Backported from mainline
|
||||
2006-05-01 Zdenek Dvorak <dvorakz@suse.cz>
|
||||
PR tree-optimization/27283
|
||||
* g++.dg/tree-ssa/pr27283.C: New test.
|
||||
|
||||
2006-05-16 Roger Sayle <roger@eyesopen.com>
|
||||
|
||||
PR target/26600
|
||||
* gcc.target/i386/pr26600.c: New test case.
|
||||
|
||||
2006-05-15 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/27339
|
||||
* g++.dg/parser/access8.C: Adjust error marker.
|
||||
* g++.dg/template/access17.C: New test.
|
||||
* g++.dg/template/access18.C: Likewise.
|
||||
|
||||
2006-05-16 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/27603
|
||||
* gcc.dg/torture/pr27603.c: New testcase.
|
||||
|
||||
2006-05-15 Andreas Krebbel <krebbel1@de.ibm.com>
|
||||
|
||||
* gcc.dg/20060515-1.c: New testcase.
|
||||
|
||||
2006-05-15 Andreas Krebbel <krebbel1@de.ibm.com>
|
||||
|
||||
PR rtl-optimization/14261
|
||||
* gcc.c-torture/compile/20060515-1.c: New testcase.
|
||||
|
||||
2006-05-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/27582
|
||||
* g++.dg/template/dependent-args1.C: New test.
|
||||
|
||||
PR c++/27581
|
||||
* g++.dg/lookup/this1.C: New test.
|
||||
|
||||
PR c++/27315
|
||||
* g++.dg/template/operator6.C: New test.
|
||||
* g++.dg/template/incomplete3.C: New test.
|
||||
|
||||
2006-05-13 Roger Sayle <roger@eyesopen.com>
|
||||
|
||||
PR middle-end/26729
|
||||
* gcc.dg/pr26729-1.c: New test case.
|
||||
|
||||
2005-05-13 Zdenek Dvorak <dvorakz@suse.cz>
|
||||
|
||||
PR rtl-optimization/27335
|
||||
* gcc.dg/pr27335.c: New test.
|
||||
|
||||
2006-05-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
|
||||
|
||||
PR fortran/24549
|
||||
* gfortran.dg/error_recovery_1.f90: New test.
|
||||
|
||||
2006-05-11 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR target/27421
|
||||
* gcc.dg/array-9.c: New test.
|
||||
|
||||
PR middle-end/27384
|
||||
* g++.dg/other/fold1.C: New test.
|
||||
|
||||
PR middle-end/27488
|
||||
* gcc.dg/fold-nonneg-1.c: New test.
|
||||
|
||||
PR c++/27547
|
||||
* g++.dg/other/operator1.C: New test.
|
||||
|
||||
2006-05-11 Roger Sayle <roger@eyesopen.com>
|
||||
|
||||
PR target/27158
|
||||
* gcc.target/powerpc/pr27158.c: New test case.
|
||||
|
||||
2006-05-09 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/27136
|
||||
* gcc.dg/torture/pr27136.c: New testcase.
|
||||
|
||||
2006-05-09 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/27409
|
||||
* gcc.dg/torture/pr27409.c: New testcase.
|
||||
|
||||
2006-05-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
|
||||
|
||||
PR libfortran/18271
|
||||
* gfortran.dg/spec_expr_3.f90: New test.
|
||||
|
||||
2006-05-08 Paul Thomas <pault@gcc.gnu.org>
|
||||
|
||||
PR fortran/24813
|
||||
* gfortran.dg/char_cons_len.f90: New test.
|
||||
|
||||
PR fortran/27269
|
||||
PR fortran/27324
|
||||
* gfortran.dg/module_equivalence_2.f90: New test.
|
||||
|
||||
PR fortran/25099
|
||||
* gfortran.dg/elemental_subroutine_4.f90: New test.
|
||||
* gfortran.dg/assumed_size_refs_1.f90: Add error to non-conforming
|
||||
call sub (m, x).
|
||||
|
||||
2006-05-07 Francois-Xavier Coudert <coudert@clipper.ens.fr>
|
||||
|
||||
PR libfortran/26985
|
||||
* gfortran.dg/matmul_2.f90: New test.
|
||||
|
||||
2006-05-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/27427
|
||||
* g++.dg/template/incomplete2.C: New test.
|
||||
|
||||
2006-05-06 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/27151
|
||||
* gcc.dg/vect/pr27151.c: New testcase.
|
||||
|
||||
2006-05-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/27422
|
||||
* g++.dg/conversion/void1.C: New test.
|
||||
|
||||
2006-05-05 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR objc/27240
|
||||
* objc.dg/member-1.m: New test.
|
||||
|
||||
2006-05-05 Francois-Xavier Coudert <coudert@clipper.ens.fr>
|
||||
|
||||
PR fortran/25681
|
||||
* gfortran.df/char_type_len.f90: New test.
|
||||
|
||||
2006-05-04 Kazu Hirata <kazu@codesourcery.com>
|
||||
|
||||
PR target/26765
|
||||
* gcc.target/mips/pr26765.c: New.
|
||||
|
||||
2006-05-04 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/27285
|
||||
* gcc.c-torture/execute/pr27285.c: New test.
|
||||
|
||||
2006-05-02 Jeff Law <law@redhat.com>
|
||||
|
||||
PR tree-optimization/27364
|
||||
* gcc.c-torture/execute/pr27364.c: New test.
|
||||
|
||||
2006-05-02 Roger Sayle <roger@eyesopen.com>
|
||||
|
||||
PR c/25309
|
||||
* gcc.dg/large-size-array-2.c: New test case.
|
||||
|
||||
2006-05-02 Kazu Hirata <kazu@codesourcery.com>
|
||||
|
||||
PR target/27387
|
||||
* gcc.target/arm/arm.exp: New.
|
||||
* gcc.target/arm/pr27387.C: Likewise.
|
||||
|
||||
2006-05-01 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/26912
|
||||
* g++.dg/template/friend41.C: New test.
|
||||
|
||||
2006-04-30 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/26534
|
||||
* g++.dg/opt/bitfield1.C: New test.
|
||||
|
||||
PR c++/27094
|
||||
* g++.dg/template/defarg8.C: New test.
|
||||
|
||||
2006-04-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR libgfortran/27304
|
||||
* gfortran.dg/fmt_exhaust.f90: New test.
|
||||
|
||||
2006-04-30 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/27278
|
||||
* g++.dg/parse/operator7.C: New test.
|
||||
|
||||
2006-04-29 Thomas Koenig <Thomas.Koenig@online.de>
|
||||
|
||||
PR fortran/26017
|
||||
* gfortran.dg/allocate_zerosize.f90: New test.
|
||||
|
||||
2006-04-29 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/27279
|
||||
* g++.dg/parse/ctor4.C: New test.
|
||||
|
||||
2006-04-28 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR target/26826
|
||||
* gcc.target/i386/pr26826.c: New testcase.
|
||||
|
||||
2006-04-28 Andrew Pinski <pinskia@gcc.gnu.org>
|
||||
Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/27236
|
||||
* gcc.dg/tree-ssa/pr27236.c: New testcase.
|
||||
|
||||
2006-04-28 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/26869
|
||||
* gcc.dg/torture/pr26869.c: New testcase.
|
||||
|
||||
2006-04-28 Andrew Pinski <pinskia@gcc.gnu.org>
|
||||
Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/27218
|
||||
* g++.dg/tree-ssa/pr27218.C: New testcase.
|
||||
|
||||
2006-04-25 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/26865
|
||||
* gcc.dg/pr26865.c: New test.
|
||||
|
||||
2006-04-24 Roger Sayle <roger@eyesopen.com>
|
||||
|
||||
PR target/26961
|
||||
* gcc.dg/fold-cond-1.c: New test case.
|
||||
* gcc.dg/pr26961-1.c: Likewise.
|
||||
|
||||
2006-04-23 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gcc.dg/sibcall-7.c: New test.
|
||||
* gcc.dg/tree-ssa/tailrecursion-1.c: Pass -foptimize-sibling-calls.
|
||||
* gcc.dg/tree-ssa/tailrecursion-2.c: Likewise.
|
||||
* gcc.dg/tree-ssa/tailrecursion-3.c: Likewise.
|
||||
* gcc.dg/tree-ssa/tailrecursion-4.c: Likewise.
|
||||
* gcc.dg/tree-ssa/tailrecursion-5.c: Likewise.
|
||||
|
||||
2006-04-23 Paul Thomas <pault@gcc.gnu.org>
|
||||
|
||||
PR fortran/27122
|
||||
* gfortran.dg/defined_operators_1.f90: New test.
|
||||
* gfortran.dg/assumed_charlen_function_1.f90: Add new error and
|
||||
remove old ones associated, incorrectly, with Note 5.46.
|
||||
|
||||
PR fortran/26787
|
||||
* gfortran.dg/proc_assign_1.f90: New test.
|
||||
* gfortran.dg/procedure_lvalue.f90: Change message.
|
||||
* gfortran.dg/namelist_4.f90: Add new error.
|
||||
|
||||
PR fortran/27089
|
||||
* gfortran.dg/specification_type_resolution_1.f90
|
||||
|
||||
PR fortran/18803
|
||||
PR fortran/25669
|
||||
PR fortran/26834
|
||||
* gfortran.dg/bounds_temporaries_1.f90: New test.
|
||||
|
||||
PR fortran/27124
|
||||
* gfortran.dg/array_return_value_1.f90: New test.
|
||||
|
||||
2006-04-21 Carlos O'Donell <carlos@codesourcery.com>
|
||||
|
||||
Backport from mainline:
|
||||
2006-04-19 Carlos O'Donell <carlos@codesourcery.com>
|
||||
PR c/26774
|
||||
* gcc.dg/struct-parse-1.c: New test case.
|
||||
|
||||
2006-04-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c/25875
|
||||
* gcc.dg/init-bad-4.c: New test.
|
||||
|
||||
2006-04-21 Paul Brook <paul@codesourcery.com>
|
||||
|
||||
Backport from mainline.
|
||||
* gcc.dg/arm-vfp1.c: Skip on iWMMXt cpus.
|
||||
|
||||
2006-04-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR libgfortran/27138
|
||||
* gfortran.dg/read_bad_advance.f90: New test.
|
||||
|
||||
2006-04-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/26558
|
||||
|
5
gnu/dist/gcc4/gcc/testsuite/g++.dg/conversion/void1.C
vendored
Normal file
5
gnu/dist/gcc4/gcc/testsuite/g++.dg/conversion/void1.C
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
// PR c++/27422
|
||||
// { dg-do compile }
|
||||
|
||||
void foo(void i); // { dg-error "incomplete type|invalid use" }
|
||||
void bar() { foo(0); }
|
7
gnu/dist/gcc4/gcc/testsuite/g++.dg/ext/asm9.C
vendored
Normal file
7
gnu/dist/gcc4/gcc/testsuite/g++.dg/ext/asm9.C
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
// PR 27451
|
||||
// { dg-do compile }
|
||||
|
||||
void foo()
|
||||
{
|
||||
asm("" ::: X); // { dg-error "before" }
|
||||
}
|
5
gnu/dist/gcc4/gcc/testsuite/g++.dg/init/array20.C
vendored
Normal file
5
gnu/dist/gcc4/gcc/testsuite/g++.dg/init/array20.C
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
// PR c++/27385
|
||||
|
||||
struct A {};
|
||||
A a[] = { 0 }; // { dg-error "initializer" }
|
||||
|
7
gnu/dist/gcc4/gcc/testsuite/g++.dg/init/brace5.C
vendored
Normal file
7
gnu/dist/gcc4/gcc/testsuite/g++.dg/init/brace5.C
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
// PR c++/27491
|
||||
// { dg-do compile }
|
||||
// { dg-options "" }
|
||||
|
||||
int i = (int) { 0 };
|
||||
int j = (int) { i };
|
||||
int k = (int) { k };
|
8
gnu/dist/gcc4/gcc/testsuite/g++.dg/lookup/this1.C
vendored
Normal file
8
gnu/dist/gcc4/gcc/testsuite/g++.dg/lookup/this1.C
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
// PR c++/27581
|
||||
// { dg-do compile }
|
||||
|
||||
struct A
|
||||
{
|
||||
template<int> static void foo();
|
||||
static void bar() { this->A::foo<0>(); } // { dg-error "unavailable" }
|
||||
};
|
18
gnu/dist/gcc4/gcc/testsuite/g++.dg/opt/bitfield1.C
vendored
Normal file
18
gnu/dist/gcc4/gcc/testsuite/g++.dg/opt/bitfield1.C
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
// PR c++/26534
|
||||
// { dg-do run }
|
||||
// { dg-options "-w -O2" }
|
||||
|
||||
struct X
|
||||
{
|
||||
unsigned a:4;
|
||||
};
|
||||
|
||||
unsigned i;
|
||||
|
||||
int main()
|
||||
{
|
||||
struct X x = { 63u };
|
||||
i = x.a;
|
||||
if (i != 15)
|
||||
return 1;
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
// { dg-do run }
|
||||
// { dg-options "-O2" }
|
||||
|
||||
extern "C" extern int strcmp (const char *s, const char *t);
|
||||
extern "C" int strcmp (const char *s, const char *t);
|
||||
|
||||
namespace A
|
||||
{
|
||||
|
62
gnu/dist/gcc4/gcc/testsuite/g++.dg/opt/temp2.C
vendored
Normal file
62
gnu/dist/gcc4/gcc/testsuite/g++.dg/opt/temp2.C
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
// { dg-do run }
|
||||
|
||||
// Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
|
||||
// Originally from PR 16681, found also in init/array15.C
|
||||
// This variant of the testcase verifies that we do not create
|
||||
// a temporary on the stack, which is PR 27620.
|
||||
|
||||
int i;
|
||||
|
||||
extern "C"
|
||||
void *memcpy (void *dest, const void *src, __SIZE_TYPE__ n)
|
||||
{
|
||||
char *d = (char *) dest;
|
||||
const char *s = (const char *) src;
|
||||
while (n--)
|
||||
d[n] = s[n];
|
||||
++i;
|
||||
return dest;
|
||||
}
|
||||
|
||||
struct foo {
|
||||
unsigned char buffer[41112];
|
||||
foo() ;
|
||||
bool check () const;
|
||||
};
|
||||
|
||||
foo::foo ()
|
||||
: buffer()
|
||||
{}
|
||||
|
||||
bool foo::check () const
|
||||
{
|
||||
for (unsigned ix = sizeof (buffer); ix--;)
|
||||
if (buffer[ix])
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void *operator new (__SIZE_TYPE__ size, void *p)
|
||||
{
|
||||
return p;
|
||||
}
|
||||
|
||||
char heap[50000];
|
||||
|
||||
int main ()
|
||||
{
|
||||
for (unsigned ix = sizeof (heap); ix--;)
|
||||
heap[ix] = ix;
|
||||
|
||||
i = 0;
|
||||
foo *f = new (heap) foo ();
|
||||
|
||||
if (i != 0)
|
||||
return 1;
|
||||
if (!f->check ())
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
7
gnu/dist/gcc4/gcc/testsuite/g++.dg/other/assign1.C
vendored
Normal file
7
gnu/dist/gcc4/gcc/testsuite/g++.dg/other/assign1.C
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
// PR c++/27716
|
||||
// { dg-do compile }
|
||||
|
||||
int foo()
|
||||
{
|
||||
return i ""= i; // { dg-error "not declared|string constant" }
|
||||
}
|
8
gnu/dist/gcc4/gcc/testsuite/g++.dg/other/fold1.C
vendored
Normal file
8
gnu/dist/gcc4/gcc/testsuite/g++.dg/other/fold1.C
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
// PR middle-end/27384
|
||||
// { dg-do compile }
|
||||
|
||||
struct A
|
||||
{
|
||||
static const int i = i; // { dg-error "not declared" }
|
||||
int x[i]; // { dg-error "variable-size array" }
|
||||
};
|
9
gnu/dist/gcc4/gcc/testsuite/g++.dg/other/operator1.C
vendored
Normal file
9
gnu/dist/gcc4/gcc/testsuite/g++.dg/other/operator1.C
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
// PR c++/27547
|
||||
// { dg-do compile }
|
||||
|
||||
int operator=(int); // { dg-error "member function" }
|
||||
|
||||
void foo()
|
||||
{
|
||||
operator=(0);
|
||||
}
|
4
gnu/dist/gcc4/gcc/testsuite/g++.dg/other/ptrmem7.C
vendored
Normal file
4
gnu/dist/gcc4/gcc/testsuite/g++.dg/other/ptrmem7.C
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
// PR c++/27447
|
||||
// { dg-do compile }
|
||||
|
||||
void (A::* p)(); // { dg-error "declared|token" }
|
@ -5,8 +5,8 @@ class foo
|
||||
typedef int memfun; // { dg-error "private" }
|
||||
};
|
||||
|
||||
template<foo::memfun> // { dg-error "context" }
|
||||
struct fm_obj { };
|
||||
template<foo::memfun>
|
||||
struct fm_obj { }; // { dg-error "context" }
|
||||
|
||||
template <typename T = foo::memfun> // { dg-error "context" }
|
||||
struct S {};
|
||||
|
7
gnu/dist/gcc4/gcc/testsuite/g++.dg/parse/ctor4.C
vendored
Normal file
7
gnu/dist/gcc4/gcc/testsuite/g++.dg/parse/ctor4.C
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
// PR c++/27279
|
||||
// { dg-do compile }
|
||||
|
||||
struct A
|
||||
{
|
||||
A(void,void); // { dg-error "incomplete type|invalid use" }
|
||||
};
|
11
gnu/dist/gcc4/gcc/testsuite/g++.dg/parse/linkage1.C
vendored
Normal file
11
gnu/dist/gcc4/gcc/testsuite/g++.dg/parse/linkage1.C
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// PR c++/26068
|
||||
|
||||
extern "C" auto int a; // { dg-error "linkage" }
|
||||
extern "C" register int b; // { dg-error "linkage" }
|
||||
extern "C" static void c(); // { dg-error "linkage" }
|
||||
extern "C" extern void d(); // { dg-error "linkage" }
|
||||
extern "C" mutable int e; // { dg-error "linkage" }
|
||||
|
||||
extern "C" {
|
||||
static void f();
|
||||
}
|
4
gnu/dist/gcc4/gcc/testsuite/g++.dg/parse/operator7.C
vendored
Normal file
4
gnu/dist/gcc4/gcc/testsuite/g++.dg/parse/operator7.C
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
// PR c++/27278
|
||||
// { dg-do compile }
|
||||
|
||||
int operator+(void,void); // { dg-error "incomplete type|invalid use" }
|
23
gnu/dist/gcc4/gcc/testsuite/g++.dg/template/access17.C
vendored
Normal file
23
gnu/dist/gcc4/gcc/testsuite/g++.dg/template/access17.C
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
// PR c++/27339
|
||||
|
||||
class A
|
||||
{
|
||||
private:
|
||||
enum private_enum {a};
|
||||
|
||||
template<A::private_enum v> // OK
|
||||
struct B
|
||||
{
|
||||
void bm();
|
||||
};
|
||||
public:
|
||||
void am()
|
||||
{
|
||||
B<a> instance; //OK
|
||||
instance.bm();
|
||||
}
|
||||
};
|
||||
|
||||
template<A::private_enum v> // FAIL
|
||||
void
|
||||
A::B<v>::bm(){}
|
19
gnu/dist/gcc4/gcc/testsuite/g++.dg/template/access18.C
vendored
Normal file
19
gnu/dist/gcc4/gcc/testsuite/g++.dg/template/access18.C
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
// DR 401
|
||||
|
||||
class X {
|
||||
typedef int a; // { dg-error "private" }
|
||||
static const int b = 5; // { dg-error "private" }
|
||||
template <typename>
|
||||
struct c; // { dg-error "private" }
|
||||
};
|
||||
|
||||
template <typename = X::a> // { dg-error "context" }
|
||||
struct A;
|
||||
|
||||
template <int = X::b> // { dg-error "context" }
|
||||
struct B;
|
||||
|
||||
template <template <typename> class T = X::c> // { dg-error "context" }
|
||||
struct C;
|
||||
|
||||
|
6
gnu/dist/gcc4/gcc/testsuite/g++.dg/template/cond6.C
vendored
Normal file
6
gnu/dist/gcc4/gcc/testsuite/g++.dg/template/cond6.C
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
// PR c++/27801
|
||||
|
||||
template<int> int foo(int i)
|
||||
{
|
||||
return !( (1 && i) ? 0 : 1 );
|
||||
}
|
11
gnu/dist/gcc4/gcc/testsuite/g++.dg/template/crash51.C
vendored
Normal file
11
gnu/dist/gcc4/gcc/testsuite/g++.dg/template/crash51.C
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// PR c++/26496
|
||||
|
||||
template< typename _Generator> int generate_n(_Generator __gen);
|
||||
struct Distribution { };
|
||||
typedef double (Distribution::* Pstd_mem)();
|
||||
int main(void)
|
||||
{
|
||||
Distribution* rng;
|
||||
Pstd_mem ptr;
|
||||
generate_n(rng->*ptr); // { dg-error "non-static member" }
|
||||
}
|
19
gnu/dist/gcc4/gcc/testsuite/g++.dg/template/defarg8.C
vendored
Normal file
19
gnu/dist/gcc4/gcc/testsuite/g++.dg/template/defarg8.C
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
// PR c++/27094
|
||||
// { dg-options "--param ggc-min-expand=0 --param ggc-min-heapsize=0" }
|
||||
|
||||
struct A
|
||||
{
|
||||
~A();
|
||||
};
|
||||
|
||||
struct B : A
|
||||
{
|
||||
B();
|
||||
};
|
||||
|
||||
template<int> struct C
|
||||
{
|
||||
C(const B& = B());
|
||||
};
|
||||
|
||||
C<0> c;
|
11
gnu/dist/gcc4/gcc/testsuite/g++.dg/template/dependent-args1.C
vendored
Normal file
11
gnu/dist/gcc4/gcc/testsuite/g++.dg/template/dependent-args1.C
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// PR c++/27582
|
||||
// { dg-do compile }
|
||||
|
||||
struct A
|
||||
{
|
||||
template<int> void foo();
|
||||
};
|
||||
|
||||
template<int N, void (A::*)() = &A::foo<N> > struct B {};
|
||||
|
||||
B<int> b; // { dg-error "type/value mismatch|expected a constant|invalid type" }
|
15
gnu/dist/gcc4/gcc/testsuite/g++.dg/template/error21.C
vendored
Normal file
15
gnu/dist/gcc4/gcc/testsuite/g++.dg/template/error21.C
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
// PR c++/20173
|
||||
|
||||
template<typename AT>
|
||||
struct A{
|
||||
template<typename T>
|
||||
void function(T){}
|
||||
};
|
||||
|
||||
template<>
|
||||
template<typename T>
|
||||
void A<int>::function(T){}
|
||||
|
||||
template<>
|
||||
template<typename T>
|
||||
void A<double>::function(T*){} // { dg-error "match|invalid" }
|
43
gnu/dist/gcc4/gcc/testsuite/g++.dg/template/fntry1.C
vendored
Normal file
43
gnu/dist/gcc4/gcc/testsuite/g++.dg/template/fntry1.C
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
// PR c++/26433
|
||||
// { dg-do link }
|
||||
|
||||
int get_int()
|
||||
{
|
||||
throw 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
template <class _T> class Test
|
||||
{
|
||||
public:
|
||||
Test()
|
||||
try
|
||||
: i(get_int())
|
||||
{
|
||||
i++;
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
// Syntax error caused by undefined __FUNCTION__.
|
||||
const char* ptr = __FUNCTION__;
|
||||
}
|
||||
|
||||
private:
|
||||
int i;
|
||||
_T t;
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
try
|
||||
{
|
||||
Test<int> test;
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
11
gnu/dist/gcc4/gcc/testsuite/g++.dg/template/friend41.C
vendored
Normal file
11
gnu/dist/gcc4/gcc/testsuite/g++.dg/template/friend41.C
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// PR c++/26912
|
||||
|
||||
struct Foo {
|
||||
template<class T> int func() const;
|
||||
};
|
||||
|
||||
class Bar {
|
||||
friend int Foo::func<int>() const;
|
||||
};
|
||||
|
||||
|
13
gnu/dist/gcc4/gcc/testsuite/g++.dg/template/incomplete2.C
vendored
Normal file
13
gnu/dist/gcc4/gcc/testsuite/g++.dg/template/incomplete2.C
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
// PR c++/27427
|
||||
// { dg-do compile }
|
||||
|
||||
struct A;
|
||||
|
||||
template<A&> void foo();
|
||||
|
||||
A a; // { dg-error "incomplete type" }
|
||||
|
||||
void bar()
|
||||
{
|
||||
foo<a>(); // { dg-error "no matching function" }
|
||||
}
|
5
gnu/dist/gcc4/gcc/testsuite/g++.dg/template/incomplete3.C
vendored
Normal file
5
gnu/dist/gcc4/gcc/testsuite/g++.dg/template/incomplete3.C
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
// PR c++/27315
|
||||
// { dg-do compile }
|
||||
|
||||
struct A; // { dg-error "forward declaration" }
|
||||
template void A::foo<0>(); // { dg-error "before|undefined" }
|
7
gnu/dist/gcc4/gcc/testsuite/g++.dg/template/new6.C
vendored
Normal file
7
gnu/dist/gcc4/gcc/testsuite/g++.dg/template/new6.C
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
// PR c++/27713
|
||||
// { dg-do compile }
|
||||
|
||||
struct A
|
||||
{
|
||||
template<int> friend void* operator new(__SIZE_TYPE__); // { dg-error "invalid template" }
|
||||
};
|
4
gnu/dist/gcc4/gcc/testsuite/g++.dg/template/operator6.C
vendored
Normal file
4
gnu/dist/gcc4/gcc/testsuite/g++.dg/template/operator6.C
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
// PR c++/27315
|
||||
// { dg-do compile }
|
||||
|
||||
template void operator+; // { dg-error "non-function" }
|
17
gnu/dist/gcc4/gcc/testsuite/g++.dg/tree-ssa/pr27218.C
vendored
Normal file
17
gnu/dist/gcc4/gcc/testsuite/g++.dg/tree-ssa/pr27218.C
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2" } */
|
||||
|
||||
struct Vector
|
||||
{
|
||||
double _x, _y;
|
||||
};
|
||||
typedef Vector Point;
|
||||
Vector d;
|
||||
static inline Vector f(void)
|
||||
{
|
||||
return d;
|
||||
}
|
||||
void add_duck (void)
|
||||
{
|
||||
new Point (f());
|
||||
}
|
57
gnu/dist/gcc4/gcc/testsuite/g++.dg/tree-ssa/pr27283.C
vendored
Normal file
57
gnu/dist/gcc4/gcc/testsuite/g++.dg/tree-ssa/pr27283.C
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2" } */
|
||||
|
||||
namespace Gambit
|
||||
{
|
||||
template < class T > class Array
|
||||
{
|
||||
protected:int mindex, maxdex;
|
||||
T *data;
|
||||
int InsertAt (const T & t, int n)
|
||||
{
|
||||
T *new_data = new T[++this->maxdex - this->mindex + 1] - this->mindex;
|
||||
int i;
|
||||
for (i = this->mindex; i <= n - 1; i++)
|
||||
new_data[i] = this->data[i];
|
||||
}
|
||||
public: Array (unsigned int len = 0):mindex (1), maxdex (len),
|
||||
data ((len) ? new T[len] -
|
||||
1 : 0)
|
||||
{
|
||||
}
|
||||
virtual ~ Array ()
|
||||
{
|
||||
if (maxdex >= mindex)
|
||||
delete[](data + mindex);
|
||||
}
|
||||
const T & operator[] (int index) const
|
||||
{
|
||||
}
|
||||
int Append (const T & t)
|
||||
{
|
||||
return InsertAt (t, this->maxdex + 1);
|
||||
}
|
||||
};
|
||||
}
|
||||
class gIndexOdometer
|
||||
{
|
||||
private:Gambit::Array < int >MinIndices;
|
||||
Gambit::Array < int >CurIndices;
|
||||
gIndexOdometer (const Gambit::Array < int >, const Gambit::Array < int >);
|
||||
void SetIndex (const int &, const int &);
|
||||
int NoIndices () const;
|
||||
gIndexOdometer AfterExcisionOf (int &) const;
|
||||
};
|
||||
gIndexOdometer
|
||||
gIndexOdometer::AfterExcisionOf (int &to_be_zapped) const
|
||||
{
|
||||
Gambit::Array < int >NewMins, NewMaxs;
|
||||
int i;
|
||||
for (i = 1; i <= NoIndices (); i++)
|
||||
{
|
||||
NewMins.Append (MinIndices[i]);
|
||||
}
|
||||
gIndexOdometer NewOdo (NewMins, NewMaxs);
|
||||
NewOdo.SetIndex (i, CurIndices[i]);
|
||||
}
|
||||
|
60
gnu/dist/gcc4/gcc/testsuite/g++.dg/tree-ssa/pr27548.C
vendored
Normal file
60
gnu/dist/gcc4/gcc/testsuite/g++.dg/tree-ssa/pr27548.C
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
// PR tree-optimization/27548
|
||||
// { dg-do compile }
|
||||
// { dg-options "-O1" }
|
||||
|
||||
namespace Gambit
|
||||
{
|
||||
template < class T > class Array
|
||||
{
|
||||
protected:int mindex, maxdex;
|
||||
T *data;
|
||||
int InsertAt (const T & t, int n)
|
||||
{
|
||||
T *new_data = new T[++this->maxdex - this->mindex + 1] - this->mindex;
|
||||
int i;
|
||||
for (i = this->mindex; i <= n - 1; i++)
|
||||
new_data[i] = this->data[i];
|
||||
new_data[i++] = t;
|
||||
}
|
||||
public: Array (unsigned int len = 0):mindex (1), maxdex (len),
|
||||
data ((len) ? new T[len] -
|
||||
1 : 0)
|
||||
{
|
||||
}
|
||||
virtual ~ Array ()
|
||||
{
|
||||
if (maxdex >= mindex)
|
||||
delete[](data + mindex);
|
||||
}
|
||||
const T & operator[] (int index) const
|
||||
{
|
||||
}
|
||||
int Append (const T & t)
|
||||
{
|
||||
return InsertAt (t, this->maxdex + 1);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
class gIndexOdometer
|
||||
{
|
||||
private:Gambit::Array < int >MinIndices;
|
||||
Gambit::Array < int >CurIndices;
|
||||
gIndexOdometer (const Gambit::Array < int >, const Gambit::Array < int >);
|
||||
void SetIndex (const int &, const int &);
|
||||
int NoIndices () const;
|
||||
gIndexOdometer AfterExcisionOf (int &) const;
|
||||
};
|
||||
gIndexOdometer
|
||||
gIndexOdometer::AfterExcisionOf (int &to_be_zapped) const
|
||||
{
|
||||
Gambit::Array < int >NewMins, NewMaxs;
|
||||
int i;
|
||||
for (i = 1; i <= NoIndices (); i++)
|
||||
{
|
||||
NewMins.Append (MinIndices[i]);
|
||||
}
|
||||
gIndexOdometer NewOdo (NewMins, NewMaxs);
|
||||
for (i = 1; i < to_be_zapped; i++)
|
||||
NewOdo.SetIndex (i, CurIndices[i]);
|
||||
}
|
78
gnu/dist/gcc4/gcc/testsuite/g++.dg/tree-ssa/pr27549.C
vendored
Normal file
78
gnu/dist/gcc4/gcc/testsuite/g++.dg/tree-ssa/pr27549.C
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
// PR tree-optimization/27549
|
||||
// { dg-do compile }
|
||||
// { dg-options "-O2" }
|
||||
|
||||
typedef __SIZE_TYPE__ size_t;
|
||||
|
||||
struct E
|
||||
{
|
||||
virtual ~E () {}
|
||||
virtual size_t e () const = 0;
|
||||
virtual void f (char *x) const = 0;
|
||||
};
|
||||
|
||||
struct F : public E
|
||||
{
|
||||
virtual ~F () {}
|
||||
virtual size_t e () const { return 0; }
|
||||
virtual void f (char *x) const { *x = '\0'; }
|
||||
};
|
||||
|
||||
struct S
|
||||
{
|
||||
S () { a = new char[32]; b = 32; c = 0; a[0] = 0; }
|
||||
void s (const char *x, size_t y) { v (c + y + 1); __builtin_memcpy(a + c, x, y); c += y; a[c] = '\0'; }
|
||||
void s (const E *x) { size_t l = x->e(); v (c + l + 1); x->f (a + c); c += l; }
|
||||
const char *t () { return a; }
|
||||
void v (size_t n)
|
||||
{
|
||||
if (b >= n) return;
|
||||
|
||||
size_t b2 = b;
|
||||
char *a2 = a;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
b *= 2;
|
||||
if (b >= n)
|
||||
break;
|
||||
}
|
||||
|
||||
a = new char[b];
|
||||
|
||||
if (b2)
|
||||
{
|
||||
__builtin_memcpy(a, a2, c);
|
||||
a2[0] = 0;
|
||||
for (size_t i = 1; i < b2; i++)
|
||||
a2[i] = a2[i - 1];
|
||||
delete[] a2;
|
||||
}
|
||||
}
|
||||
|
||||
~S ()
|
||||
{
|
||||
if (b)
|
||||
{
|
||||
a[0] = 0;
|
||||
for (size_t i = 1; i < b; i++)
|
||||
a[i] = a[i - 1];
|
||||
}
|
||||
delete[] a;
|
||||
}
|
||||
char * a;
|
||||
size_t b, c;
|
||||
};
|
||||
|
||||
const char *p;
|
||||
size_t q;
|
||||
const F u;
|
||||
|
||||
const char *
|
||||
foo ()
|
||||
{
|
||||
S s;
|
||||
s.s (p, q);
|
||||
s.s (&u);
|
||||
return s.t ();
|
||||
}
|
@ -11,7 +11,7 @@ typedef void (A::*handler) (X*);
|
||||
|
||||
class B {
|
||||
public:
|
||||
void setHandler(handler); // { dg-error "candidate" }
|
||||
void setHandler(handler);
|
||||
};
|
||||
|
||||
void f(B* b) {
|
||||
|
@ -1,3 +1,7 @@
|
||||
2006-05-24 Release Manager
|
||||
|
||||
* GCC 4.1.1 released.
|
||||
|
||||
2006-02-28 Release Manager
|
||||
|
||||
* GCC 4.1.0 released.
|
||||
|
21
gnu/dist/gcc4/gcc/testsuite/gcc.c-torture/compile/20060515-1.c
vendored
Normal file
21
gnu/dist/gcc4/gcc/testsuite/gcc.c-torture/compile/20060515-1.c
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
/* This failed because if conversion didn't handle insv patterns properly. */
|
||||
|
||||
union y
|
||||
{
|
||||
int a;
|
||||
unsigned short b;
|
||||
};
|
||||
|
||||
extern void bar (unsigned short u, union y v);
|
||||
|
||||
void
|
||||
foo (int check)
|
||||
{
|
||||
union y x;
|
||||
|
||||
if (check != 0)
|
||||
x.b = 1;
|
||||
else
|
||||
x.b = 2;
|
||||
bar (x.b, x);
|
||||
}
|
11
gnu/dist/gcc4/gcc/testsuite/gcc.c-torture/compile/pr26622.c
vendored
Normal file
11
gnu/dist/gcc4/gcc/testsuite/gcc.c-torture/compile/pr26622.c
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
/* PR middle-end/26622
|
||||
fold_ternary used to create a tree with mismatching types, causing
|
||||
(const_int 128) to appear in QImode rtx. */
|
||||
|
||||
unsigned char g;
|
||||
|
||||
unsigned long long
|
||||
foo (void)
|
||||
{
|
||||
return ((long long) ((g & 0x80) != 0)) << 7;
|
||||
}
|
46
gnu/dist/gcc4/gcc/testsuite/gcc.c-torture/execute/pr27285.c
vendored
Normal file
46
gnu/dist/gcc4/gcc/testsuite/gcc.c-torture/execute/pr27285.c
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
/* PR tree-optimization/27285 */
|
||||
|
||||
extern void abort (void);
|
||||
|
||||
struct S { unsigned char a, b, c, d[16]; };
|
||||
|
||||
void __attribute__ ((noinline))
|
||||
foo (struct S *x, struct S *y)
|
||||
{
|
||||
int a, b;
|
||||
unsigned char c, *d, *e;
|
||||
|
||||
b = x->b;
|
||||
d = x->d;
|
||||
e = y->d;
|
||||
a = 0;
|
||||
while (b)
|
||||
{
|
||||
if (b >= 8)
|
||||
{
|
||||
c = 0xff;
|
||||
b -= 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
c = 0xff << (8 - b);
|
||||
b = 0;
|
||||
}
|
||||
|
||||
e[a] = d[a] & c;
|
||||
a++;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
struct S x = { 0, 25, 0, { 0xaa, 0xbb, 0xcc, 0xdd }};
|
||||
struct S y = { 0, 0, 0, { 0 }};
|
||||
|
||||
foo (&x, &y);
|
||||
if (x.d[0] != y.d[0] || x.d[1] != y.d[1]
|
||||
|| x.d[2] != y.d[2] || (x.d[3] & 0x80) != y.d[3])
|
||||
abort ();
|
||||
return 0;
|
||||
}
|
13
gnu/dist/gcc4/gcc/testsuite/gcc.c-torture/execute/pr27364.c
vendored
Normal file
13
gnu/dist/gcc4/gcc/testsuite/gcc.c-torture/execute/pr27364.c
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
int f(unsigned number_of_digits_to_use)
|
||||
{
|
||||
if (number_of_digits_to_use >1294)
|
||||
return 0;
|
||||
return (number_of_digits_to_use * 3321928 / 1000000 + 1) /16;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
if (f(11) != 2)
|
||||
__builtin_abort ();
|
||||
exit (0);
|
||||
}
|
38
gnu/dist/gcc4/gcc/testsuite/gcc.dg/20060515-1.c
vendored
Normal file
38
gnu/dist/gcc4/gcc/testsuite/gcc.dg/20060515-1.c
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
/* { dg-do run } */
|
||||
/* { dg-options "-O1" } */
|
||||
|
||||
/* This failed because if conversion didn't handle insv patterns properly. */
|
||||
|
||||
void abort (void);
|
||||
|
||||
union y
|
||||
{
|
||||
int a;
|
||||
unsigned short b;
|
||||
};
|
||||
|
||||
void __attribute__ ((noinline))
|
||||
bar (unsigned short u, union y v)
|
||||
{
|
||||
if (u != 1)
|
||||
abort ();
|
||||
}
|
||||
|
||||
void __attribute__ ((noinline))
|
||||
foo (int check)
|
||||
{
|
||||
union y x;
|
||||
|
||||
if (check != 0)
|
||||
x.b = 1;
|
||||
else
|
||||
x.b = 2;
|
||||
bar (x.b, x);
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
foo (1);
|
||||
return 0;
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */
|
||||
/* { dg-require-effective-target arm32 } */
|
||||
/* { dg-skip-if "" { *-*-* } { "-mcpu=iwmmxt" "-march=iwmmxt" } { "" } } */
|
||||
|
||||
extern float fabsf (float);
|
||||
extern float sqrtf (float);
|
||||
|
10
gnu/dist/gcc4/gcc/testsuite/gcc.dg/array-9.c
vendored
Normal file
10
gnu/dist/gcc4/gcc/testsuite/gcc.dg/array-9.c
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
/* PR target/27421 */
|
||||
/* { dg-do compile } */
|
||||
|
||||
struct A
|
||||
{
|
||||
int i;
|
||||
void x[1]; /* { dg-error "array of voids" } */
|
||||
};
|
||||
|
||||
void foo(struct A a) {}
|
28
gnu/dist/gcc4/gcc/testsuite/gcc.dg/fold-cond-1.c
vendored
Normal file
28
gnu/dist/gcc4/gcc/testsuite/gcc.dg/fold-cond-1.c
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fdump-tree-original" } */
|
||||
|
||||
_Bool test1(int a, int b)
|
||||
{
|
||||
return a ? b : 0;
|
||||
}
|
||||
|
||||
_Bool test2(int c, int d)
|
||||
{
|
||||
return c ? d : 1;
|
||||
}
|
||||
|
||||
_Bool test3(int e, int f)
|
||||
{
|
||||
return e ? 0 : f;
|
||||
}
|
||||
|
||||
_Bool test4(int g, int h)
|
||||
{
|
||||
return g ? 1 : h;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-tree-dump-times "a != 0 \&\& b != 0" 1 "original" } } */
|
||||
/* { dg-final { scan-tree-dump-times "c == 0 \\|\\| d != 0" 1 "original" } } */
|
||||
/* { dg-final { scan-tree-dump-times "e == 0 \&\& f != 0" 1 "original" } } */
|
||||
/* { dg-final { scan-tree-dump-times "\\(g \\| h\\) != 0" 1 "original" } } */
|
||||
/* { dg-final { cleanup-tree-dump "original" } } */
|
10
gnu/dist/gcc4/gcc/testsuite/gcc.dg/fold-nonneg-1.c
vendored
Normal file
10
gnu/dist/gcc4/gcc/testsuite/gcc.dg/fold-nonneg-1.c
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
/* PR middle-end/27488 */
|
||||
/* { dg-do compile } */
|
||||
|
||||
extern double fabs(double x);
|
||||
extern double sinh(double x);
|
||||
|
||||
void foo()
|
||||
{
|
||||
fabs(sinh(0..)); /* { dg-error "decimal points" } */
|
||||
}
|
5
gnu/dist/gcc4/gcc/testsuite/gcc.dg/init-bad-4.c
vendored
Normal file
5
gnu/dist/gcc4/gcc/testsuite/gcc.dg/init-bad-4.c
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
/* PR c/25875 */
|
||||
/* Origin: Richard Guenther <rguenth@gcc.gnu.org> */
|
||||
/* { dg-do compile } */
|
||||
|
||||
struct A { } a = (struct A) {{ (X)0 }}; /* { dg-error "no members|extra brace|near|undeclared|constant|compound" } */
|
7
gnu/dist/gcc4/gcc/testsuite/gcc.dg/large-size-array-2.c
vendored
Normal file
7
gnu/dist/gcc4/gcc/testsuite/gcc.dg/large-size-array-2.c
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
/* PR c/25309 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2" } */
|
||||
static char * name[] = {
|
||||
[0x80000000] = "bar"
|
||||
};
|
||||
|
16
gnu/dist/gcc4/gcc/testsuite/gcc.dg/pr26729-1.c
vendored
Normal file
16
gnu/dist/gcc4/gcc/testsuite/gcc.dg/pr26729-1.c
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
/* { dg-do run } */
|
||||
/* { dg-options "-O2" } */
|
||||
|
||||
void abort(void);
|
||||
|
||||
__attribute__((noinline))
|
||||
int f (unsigned short word) {
|
||||
return (word & 0x1) && (((unsigned short) (word & 0x8000)) == 0x8000);
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
if (!f(0x8001))
|
||||
abort();
|
||||
return 0;
|
||||
}
|
||||
|
8
gnu/dist/gcc4/gcc/testsuite/gcc.dg/pr26865.c
vendored
Normal file
8
gnu/dist/gcc4/gcc/testsuite/gcc.dg/pr26865.c
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -std=c99" } */
|
||||
|
||||
void
|
||||
foo (void)
|
||||
{
|
||||
char *e = alloca (100); /* { dg-warning "implicit declaration|initialization makes" } */
|
||||
}
|
8
gnu/dist/gcc4/gcc/testsuite/gcc.dg/pr26961-1.c
vendored
Normal file
8
gnu/dist/gcc4/gcc/testsuite/gcc.dg/pr26961-1.c
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2" } */
|
||||
|
||||
long long foo(int i, int j)
|
||||
{
|
||||
return i ? (long long)(!j) : 0;
|
||||
}
|
||||
|
27
gnu/dist/gcc4/gcc/testsuite/gcc.dg/pr27335.c
vendored
Normal file
27
gnu/dist/gcc4/gcc/testsuite/gcc.dg/pr27335.c
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -funroll-loops" } */
|
||||
|
||||
extern void bar () __attribute__ ((noreturn));
|
||||
|
||||
inline double
|
||||
baz (double *x, unsigned int y)
|
||||
{
|
||||
if (y >= 6)
|
||||
bar ();
|
||||
return x[y];
|
||||
}
|
||||
|
||||
double *a, *b;
|
||||
|
||||
void
|
||||
foo ()
|
||||
{
|
||||
unsigned int r, s, t;
|
||||
|
||||
for (r = 0; r < 2; r++)
|
||||
for (t = 0; t < 2; t++)
|
||||
{
|
||||
for (s = 0; s < 3; s++)
|
||||
b[r * 2 + t] += baz (a, 3 * s + t);
|
||||
}
|
||||
}
|
24
gnu/dist/gcc4/gcc/testsuite/gcc.dg/pr27758.c
vendored
Normal file
24
gnu/dist/gcc4/gcc/testsuite/gcc.dg/pr27758.c
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
/* PR target/27758 */
|
||||
/* { dg-do run { target fpic } } */
|
||||
/* { dg-options "-O0 -fpic" } */
|
||||
|
||||
typedef int (*fn) (void);
|
||||
|
||||
static inline int
|
||||
foo (void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
fn
|
||||
test (void)
|
||||
{
|
||||
return foo;
|
||||
}
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
fn f = test ();
|
||||
return f () != 1;
|
||||
}
|
43
gnu/dist/gcc4/gcc/testsuite/gcc.dg/sibcall-7.c
vendored
Normal file
43
gnu/dist/gcc4/gcc/testsuite/gcc.dg/sibcall-7.c
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
/* Simple check that tail recursive call optimization is also
|
||||
controlled by -foptimize-sibling-calls.
|
||||
|
||||
Copyright (C) 2006 Free Software Foundation Inc.
|
||||
Original test by Hans-Peter Nilsson <hp@bitrange.com> */
|
||||
|
||||
/* { dg-do run } */
|
||||
/* { dg-options "-O2 -fno-optimize-sibling-calls" } */
|
||||
|
||||
|
||||
extern void abort (void);
|
||||
|
||||
extern void recurser_void (int);
|
||||
extern void track (int);
|
||||
|
||||
int main (void)
|
||||
{
|
||||
recurser_void (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void recurser_void (int n)
|
||||
{
|
||||
if (n == 0 || n == 7)
|
||||
track (n);
|
||||
|
||||
if (n == 10)
|
||||
return;
|
||||
|
||||
recurser_void (n + 1);
|
||||
}
|
||||
|
||||
void *trackpoint;
|
||||
|
||||
void track (int n)
|
||||
{
|
||||
char stackpos[1];
|
||||
|
||||
if (n == 0)
|
||||
trackpoint = stackpos;
|
||||
else if (n != 7 || trackpoint == stackpos)
|
||||
abort ();
|
||||
}
|
4
gnu/dist/gcc4/gcc/testsuite/gcc.dg/sizeof-1.c
vendored
Normal file
4
gnu/dist/gcc4/gcc/testsuite/gcc.dg/sizeof-1.c
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/* PR c/27718 */
|
||||
/* { dg-do compile } */
|
||||
|
||||
int i = sizeof(struct A[]); /* { dg-error "incomplete" } */
|
7
gnu/dist/gcc4/gcc/testsuite/gcc.dg/struct-incompl-1.c
vendored
Normal file
7
gnu/dist/gcc4/gcc/testsuite/gcc.dg/struct-incompl-1.c
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
/* PR c/26818 */
|
||||
/* { dg-do compile } */
|
||||
|
||||
struct __attribute__ ((packed)) A
|
||||
{
|
||||
struct B b; /* { dg-error "incomplete" } */
|
||||
};
|
11
gnu/dist/gcc4/gcc/testsuite/gcc.dg/struct-parse-1.c
vendored
Normal file
11
gnu/dist/gcc4/gcc/testsuite/gcc.dg/struct-parse-1.c
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
/* Copyright (C) 2006 Free Software Foundation, Inc. */
|
||||
/* Contributed by Carlos O'Donell on 2006-03-31 */
|
||||
|
||||
/* This code caused the C frontend to loop
|
||||
forever exhausting all system memory, or ICE */
|
||||
/* Origin: Carlos O'Donell <carlos@codesourcery.com> */
|
||||
|
||||
/* { dg-options "-std=c99" } */
|
||||
struct s { int a; int b; struct t c; }; /* { dg-error "error: field 'c' has incomplete type" } */
|
||||
struct s d = { .b = 0 };
|
||||
|
7
gnu/dist/gcc4/gcc/testsuite/gcc.dg/torture/pr26869.c
vendored
Normal file
7
gnu/dist/gcc4/gcc/testsuite/gcc.dg/torture/pr26869.c
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
/* { dg-do compile } */
|
||||
|
||||
_Complex float f (_Complex float b, _Complex float c)
|
||||
{
|
||||
_Complex float a = 1.0 + 0.0i;
|
||||
return a / c;
|
||||
}
|
10
gnu/dist/gcc4/gcc/testsuite/gcc.dg/torture/pr27136.c
vendored
Normal file
10
gnu/dist/gcc4/gcc/testsuite/gcc.dg/torture/pr27136.c
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-ffast-math" } */
|
||||
|
||||
void foo()
|
||||
{
|
||||
double x;
|
||||
|
||||
for (x = 2; x < 10; x *= x)
|
||||
;
|
||||
}
|
17
gnu/dist/gcc4/gcc/testsuite/gcc.dg/torture/pr27409.c
vendored
Normal file
17
gnu/dist/gcc4/gcc/testsuite/gcc.dg/torture/pr27409.c
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
/* { dg-do compile } */
|
||||
|
||||
typedef struct {
|
||||
struct { } z;
|
||||
} thang_t;
|
||||
|
||||
struct {
|
||||
short e;
|
||||
thang_t f;
|
||||
int g;
|
||||
} my_struct;
|
||||
|
||||
void function(int blaz)
|
||||
{
|
||||
thang_t *fp = &my_struct.f;
|
||||
foo(fp);
|
||||
}
|
16
gnu/dist/gcc4/gcc/testsuite/gcc.dg/torture/pr27603.c
vendored
Normal file
16
gnu/dist/gcc4/gcc/testsuite/gcc.dg/torture/pr27603.c
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
/* { dg-do run } */
|
||||
|
||||
void exit (int);
|
||||
void abort (void);
|
||||
int a;
|
||||
int main()
|
||||
{
|
||||
int j;
|
||||
for (j = 0; j < 6; j++)
|
||||
{
|
||||
if ((unsigned)j - 3 <= 1)
|
||||
exit (0);
|
||||
a = 1000 * (6 - j);
|
||||
}
|
||||
abort ();
|
||||
}
|
15
gnu/dist/gcc4/gcc/testsuite/gcc.dg/torture/pr27743.c
vendored
Normal file
15
gnu/dist/gcc4/gcc/testsuite/gcc.dg/torture/pr27743.c
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/* { dg-do run } */
|
||||
|
||||
extern void abort(void);
|
||||
|
||||
int bar(int a)
|
||||
{
|
||||
return ((unsigned) ((a) >> 2)) >> 15;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
if (bar (0xffff3000) != 0x1ffff)
|
||||
abort ();
|
||||
return 0;
|
||||
}
|
19
gnu/dist/gcc4/gcc/testsuite/gcc.dg/tree-ssa/pr27236.c
vendored
Normal file
19
gnu/dist/gcc4/gcc/testsuite/gcc.dg/tree-ssa/pr27236.c
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fdump-tree-optimized" } */
|
||||
|
||||
static inline int inline_read(volatile int *mem)
|
||||
{
|
||||
return *mem;
|
||||
}
|
||||
int foo_read(volatile int *mem)
|
||||
{
|
||||
return inline_read(mem);
|
||||
}
|
||||
unsigned int foo(volatile int *mem)
|
||||
{
|
||||
foo_read(mem);
|
||||
return foo_read(mem);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-tree-dump-times "foo_read" 5 "optimized" } } */
|
||||
/* { dg-final { cleanup-tree-dump "optimized" } } */
|
@ -1,5 +1,5 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O1 -fdump-tree-tailr-details" } */
|
||||
/* { dg-options "-O1 -foptimize-sibling-calls -fdump-tree-tailr-details" } */
|
||||
int
|
||||
t(int a)
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O1 -fdump-tree-tailr-details" } */
|
||||
/* { dg-options "-O1 -foptimize-sibling-calls -fdump-tree-tailr-details" } */
|
||||
int
|
||||
t(char *a)
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O1 -fdump-tree-tailr-details" } */
|
||||
/* { dg-options "-O1 -foptimize-sibling-calls -fdump-tree-tailr-details" } */
|
||||
int
|
||||
t(int a)
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O1 -fdump-tree-tailr-details" } */
|
||||
/* { dg-options "-O1 -foptimize-sibling-calls -fdump-tree-tailr-details" } */
|
||||
int
|
||||
t(int a)
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* { dg-do run } */
|
||||
/* { dg-options "-O1 -fdump-tree-optimized" } */
|
||||
/* { dg-options "-O1 -foptimize-sibling-calls -fdump-tree-optimized" } */
|
||||
|
||||
extern void abort (void);
|
||||
extern void exit (int);
|
||||
|
14
gnu/dist/gcc4/gcc/testsuite/gcc.dg/vect/pr27151.c
vendored
Normal file
14
gnu/dist/gcc4/gcc/testsuite/gcc.dg/vect/pr27151.c
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
/* { dg-do compile } */
|
||||
|
||||
/* We were creating a float vector for the vis_type == 1
|
||||
test, which we ICEd on. Now we simply punt here. */
|
||||
|
||||
float vs_data[75];
|
||||
void vis_clear_data ()
|
||||
{
|
||||
int vis_type, i;
|
||||
for (i = 0; i < 75; i++)
|
||||
{
|
||||
vs_data[i] = (vis_type == 1);
|
||||
}
|
||||
}
|
41
gnu/dist/gcc4/gcc/testsuite/gcc.target/arm/arm.exp
vendored
Normal file
41
gnu/dist/gcc4/gcc/testsuite/gcc.target/arm/arm.exp
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
# Copyright (C) 1997, 2004, 2006 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 of the License, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
# GCC testsuite that uses the `dg.exp' driver.
|
||||
|
||||
# Exit immediately if this isn't an ARM target.
|
||||
if ![istarget arm*-*-*] then {
|
||||
return
|
||||
}
|
||||
|
||||
# Load support procs.
|
||||
load_lib gcc-dg.exp
|
||||
|
||||
# If a testcase doesn't have special options, use these.
|
||||
global DEFAULT_CFLAGS
|
||||
if ![info exists DEFAULT_CFLAGS] then {
|
||||
set DEFAULT_CFLAGS " -ansi -pedantic-errors"
|
||||
}
|
||||
|
||||
# Initialize `dg'.
|
||||
dg-init
|
||||
|
||||
# Main loop.
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cCS\]]] \
|
||||
"" $DEFAULT_CFLAGS
|
||||
|
||||
# All done.
|
||||
dg-finish
|
26
gnu/dist/gcc4/gcc/testsuite/gcc.target/arm/pr27387.C
vendored
Normal file
26
gnu/dist/gcc4/gcc/testsuite/gcc.target/arm/pr27387.C
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
/* PR target/90000
|
||||
We used to generate a non-PIC thunk on thumb even with -fPIC.
|
||||
Make sure that won't happen anymore. */
|
||||
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-effective-target arm32 } */
|
||||
/* { dg-options "-mthumb -fPIC" } */
|
||||
|
||||
struct A {
|
||||
virtual void f ();
|
||||
};
|
||||
|
||||
struct B {
|
||||
virtual void g ();
|
||||
};
|
||||
|
||||
struct C : public A, public B {
|
||||
virtual void g();
|
||||
};
|
||||
|
||||
void
|
||||
C::g()
|
||||
{
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler "LTHUNKPC" } } */
|
14
gnu/dist/gcc4/gcc/testsuite/gcc.target/i386/pr26600.c
vendored
Normal file
14
gnu/dist/gcc4/gcc/testsuite/gcc.target/i386/pr26600.c
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O -ftree-vectorize -msse2" } */
|
||||
|
||||
void foo(int *p, int N)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<8; ++i, ++p)
|
||||
{
|
||||
int j = N+2*(N+p[0]), k = 2*N+p[0];
|
||||
p[0] = j+N;
|
||||
p[5] = j+k;
|
||||
}
|
||||
}
|
||||
|
12
gnu/dist/gcc4/gcc/testsuite/gcc.target/i386/pr26826.c
vendored
Normal file
12
gnu/dist/gcc4/gcc/testsuite/gcc.target/i386/pr26826.c
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
|
||||
/* { dg-require-effective-target ilp32 } */
|
||||
/* { dg-options "-O -fomit-frame-pointer -march=i586" } */
|
||||
|
||||
void foo(char* p, char c, int i)
|
||||
{
|
||||
char a[2], *q=a+1;
|
||||
if (p && i)
|
||||
*p = q-a+bar(i);
|
||||
if (c)
|
||||
bar(i);
|
||||
}
|
13
gnu/dist/gcc4/gcc/testsuite/gcc.target/mips/pr26765.c
vendored
Normal file
13
gnu/dist/gcc4/gcc/testsuite/gcc.target/mips/pr26765.c
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
/* PR target/pr26765
|
||||
This testcase used to trigger an unrecognizable insn. */
|
||||
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2" } */
|
||||
|
||||
__thread int *a = 0;
|
||||
|
||||
void foo (void)
|
||||
{
|
||||
extern int *b;
|
||||
b = (int *) ((*a));
|
||||
}
|
22
gnu/dist/gcc4/gcc/testsuite/gcc.target/powerpc/pr27158.c
vendored
Normal file
22
gnu/dist/gcc4/gcc/testsuite/gcc.target/powerpc/pr27158.c
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/* { dg-do compile { target powerpc*-*-* } } */
|
||||
/* { dg-xfail-if "" { "powerpc-*-eabispe*" "powerpc-ibm-aix*" } { "*" } { "" } } */
|
||||
/* { dg-options "-O2 -maltivec" } */
|
||||
#define REGLIST \
|
||||
"77", "78", "79", "80", "81", "82", "83", "84", "85", "86",\
|
||||
"87", "88", "89", "90", "91", "92", "93", "94", "95", "96",\
|
||||
"97", "98", "99", "100", "101", "102", "103", "104", "105", "106",\
|
||||
"107", "108"
|
||||
|
||||
typedef __attribute__ ((vector_size (16))) float v4sf;
|
||||
|
||||
void
|
||||
foo (int H)
|
||||
{
|
||||
volatile v4sf tmp;
|
||||
while (H-- > 0)
|
||||
{
|
||||
asm ("" : : : REGLIST);
|
||||
tmp = (v4sf) __builtin_altivec_vspltisw (1);
|
||||
}
|
||||
}
|
||||
|
5
gnu/dist/gcc4/gcc/testsuite/objc.dg/member-1.m
vendored
Normal file
5
gnu/dist/gcc4/gcc/testsuite/objc.dg/member-1.m
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
void foo()
|
||||
{
|
||||
struct A a; /* { dg-error "storage size" } */
|
||||
a.i;
|
||||
}
|
@ -1,3 +1,7 @@
|
||||
2006-05-24 Release Manager
|
||||
|
||||
* GCC 4.1.1 released.
|
||||
|
||||
2006-02-28 Release Manager
|
||||
|
||||
* GCC 4.1.0 released.
|
||||
|
1
gnu/dist/gcc4/gcc/tree-flow.h
vendored
1
gnu/dist/gcc4/gcc/tree-flow.h
vendored
@ -761,6 +761,7 @@ struct loop *tree_ssa_loop_version (struct loops *, struct loop *, tree,
|
||||
tree expand_simple_operations (tree);
|
||||
void substitute_in_loop_info (struct loop *, tree, tree);
|
||||
edge single_dom_exit (struct loop *);
|
||||
bool contains_abnormal_ssa_name_p (tree);
|
||||
|
||||
/* In tree-ssa-loop-im.c */
|
||||
/* The possibilities of statement movement. */
|
||||
|
8
gnu/dist/gcc4/gcc/tree-inline.c
vendored
8
gnu/dist/gcc4/gcc/tree-inline.c
vendored
@ -640,6 +640,7 @@ copy_body_r (tree *tp, int *walk_subtrees, void *data)
|
||||
if (n)
|
||||
{
|
||||
tree new;
|
||||
tree old;
|
||||
/* If we happen to get an ADDR_EXPR in n->value, strip
|
||||
it manually here as we'll eventually get ADDR_EXPRs
|
||||
which lie about their types pointed to. In this case
|
||||
@ -648,13 +649,17 @@ copy_body_r (tree *tp, int *walk_subtrees, void *data)
|
||||
does other useful transformations, try that first, though. */
|
||||
tree type = TREE_TYPE (TREE_TYPE ((tree)n->value));
|
||||
new = unshare_expr ((tree)n->value);
|
||||
old = *tp;
|
||||
*tp = fold_indirect_ref_1 (type, new);
|
||||
if (! *tp)
|
||||
{
|
||||
if (TREE_CODE (new) == ADDR_EXPR)
|
||||
*tp = TREE_OPERAND (new, 0);
|
||||
else
|
||||
*tp = build1 (INDIRECT_REF, type, new);
|
||||
{
|
||||
*tp = build1 (INDIRECT_REF, type, new);
|
||||
TREE_THIS_VOLATILE (*tp) = TREE_THIS_VOLATILE (old);
|
||||
}
|
||||
}
|
||||
*walk_subtrees = 0;
|
||||
return NULL;
|
||||
@ -2130,6 +2135,7 @@ expand_call_inline (basic_block bb, tree stmt, tree *tp, void *data)
|
||||
if (CALL_EXPR_RETURN_SLOT_OPT (t))
|
||||
{
|
||||
return_slot_addr = build_fold_addr_expr (modify_dest);
|
||||
STRIP_USELESS_TYPE_CONVERSION (return_slot_addr);
|
||||
modify_dest = NULL;
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user