diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-02-05 08:44:42 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-02-05 08:44:42 +0000 |
commit | 521c00a042cbcd8ea9772e9c1850fdd76dd77457 (patch) | |
tree | 90dcda4efd7650714636b9765bbc578dbffd83ba /gcc | |
parent | a3237183ed12392595cd42b77db6dd66565c2fd1 (diff) | |
download | gcc-521c00a042cbcd8ea9772e9c1850fdd76dd77457.tar.gz |
2009-02-05 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r143951
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@143959 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
66 files changed, 1356 insertions, 508 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a4c777c57a5..11b461ec83d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,131 @@ +2009-02-05 Daniel Berlin <dberlin@dberlin.org> + Richard Guenther <rguenther@suse.de> + + PR tree-optimization/39100 + * tree-ssa-structalias.c (do_ds_constraint): Actually do what the + comment says and add edges. + +2009-02-05 Joseph Myers <joseph@codesourcery.com> + + PR c/35435 + * c-common.c (handle_tls_model_attribute): Ignore attribute for + non-VAR_DECLs without checking DECL_THREAD_LOCAL_P. + +2009-02-04 Tobias Grosser <grosser@fim.uni-passau.de> + + * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use, + sese_build_livein_liveouts_bb, sese_build_livein_liveouts, + register_bb_in_sese, new_sese, free_sese): Moved. + (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains, + outermost_loop_in_scop, build_scop_iteration_domain, + expand_scalar_variables_ssa_name, get_vdef_before_scop, + limit_scops): Use bb_in_sese_p instead of bb_in_scop_p. + Use loop_in_sese_p instead of loop_in_scop_p. + (new_graphite_bb, gloog): Do not initialize SCOP_BBS_B. + (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP and SCOP_BBS_B. + (scopdet_basic_block_info): Fix bug in scop detection. + (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop, + eq_loop_to_cloog_loop): Remove. + (nb_loops_around_loop_in_scop, nb_loop + ref_nb_loops): Moved here... + * graphite.h (ref_nb_loops): ... from here. + (struct scop): Remove bbs_b bitmap and loop2cloog_loop. + (loop_domain_dim, loop_iteration_vector_dim): Remove. + (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed. + * testsuite/gcc.dg/graphite/scop-19.c: New + +2009-02-04 Paolo Bonzini <bonzini@gnu.org> + Hans-Peter Nilsson <hp@axis.com> + + PR rtl-optimization/37889 + * rtlanal.c (rtx_addr_can_trap_p_1): Add offset and size arguments. + Move offset handling from PLUS to before the switch. Use new + arguments when considering SYMBOL_REFs too. + (rtx_addr_can_trap_p): Pass dummy offset and size. + (enum may_trap_p_flags): Remove. + (may_trap_p_1): Pass size from MEM_SIZE. + + PR rtl-optimization/38921 + * loop-invariant.c (find_invariant_insn): Use may_trap_or_fault_p. + * rtl.h (may_trap_after_code_motion_p): Delete prototype. + * rtlanal.c (may_trap_after_code_motion_p): Delete. + (may_trap_p, may_trap_or_fault_p): Pass 0/1 as flags. + +2009-02-04 H.J. Lu <hongjiu.lu@intel.com> + + AVX Programming Reference (January, 2009) + * config/i386/sse.md (*vpclmulqdq): New. + +2009-02-04 Jakub Jelinek <jakub@redhat.com> + + PR tree-optimization/38977 + PR gcov-profile/38292 + * calls.c (special_function_p): Disregard __builtin_ + prefix. + +2009-02-04 Hariharan Sandanagobalane <hariharan@picochip.com> + + * config/picochip/picochip.c (GO_IF_LEGITIMATE_ADDRESS): Disallow + non-indexable addresses even before reload. + +2009-02-03 Joseph Myers <joseph@codesourcery.com> + + PR c/29129 + * c-decl.c (grokdeclarator): Mark [*] arrays in field declarators + as having variable size. Do not give an error for unnamed + parameters with [*] declarators. Give a warning for type names + with [*] declarators and mark them as variable size. + * c-parser.c (c_parser_sizeof_expression): Do not give an error + for sizeof applied to [*] type names. + +2009-02-03 Andrew Pinski <andrew_pinski@playstation.sony.com> + + PR C++/36607 + * convert.c (convert_to_integer): Treat OFFSET_TYPE like INTEGER_TYPE. + +2009-02-03 Jakub Jelinek <jakub@redhat.com> + + * gcc.c (process_command): Update copyright notice dates. + * gcov.c (print_version): Likewise. + * gcov-dump.c (print_version): Likewise. + * mips-tfile.c (main): Likewise. + * mips-tdump.c (main): Likewise. + +2009-02-03 Joseph Myers <joseph@codesourcery.com> + + PR c/35433 + * c-typeck.c (composite_type): Set TYPE_SIZE and TYPE_SIZE_UNIT + for composite type involving a zero-length array type. + +2009-02-03 Jakub Jelinek <jakub@redhat.com> + + PR target/35318 + * function.c (match_asm_constraints_1): Skip over + initial optional % in the constraint. + + PR inline-asm/39059 + * c-parser.c (c_parser_postfix_expression): If fixed point is not + supported, don't accept FIXED_CSTs. + * c-decl.c (finish_declspecs): Error if fixed point is not supported + and _Sat is used without _Fract/_Accum. Set specs->type to + integer_type_node for cts_fract/cts_accum if fixed point is not + supported. + +2009-02-02 Catherine Moore <clm@codesourcery.com> + + * sde.h (SUBTARGET_ARM_SPEC): Don;t assemble -fpic code as + -mabicalls. + +2009-02-02 Richard Sandiford <rdsandiford@googlemail.com> + + * config/mips/mips.h (FILE_HAS_64BIT_SYMBOLS): New macro. + (ABI_HAS_64BIT_SYMBOLS): Use it. + (DWARF2_ADDR_SIZE): Use it instead of ABI_HAS_64BIT_SYMBOLS. + +2009-02-02 Paul Brook <paul@codesourcery.com> + + * config/arm/arm.md (arm_addsi3): Add r/r/k alternative. + 2009-02-02 Jakub Jelinek <jakub@redhat.com> PR inline-asm/39058 diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 46c3257851e..dac850647d8 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20090202 +20090205 diff --git a/gcc/c-common.c b/gcc/c-common.c index 78c6afb8f4a..e145252d961 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -6275,7 +6275,7 @@ handle_tls_model_attribute (tree *node, tree name, tree args, *no_add_attrs = true; - if (!DECL_THREAD_LOCAL_P (decl)) + if (TREE_CODE (decl) != VAR_DECL || !DECL_THREAD_LOCAL_P (decl)) { warning (OPT_Wattributes, "%qE attribute ignored", name); return NULL_TREE; diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 9f65af4efac..35a9c4b8261 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -4389,7 +4389,14 @@ grokdeclarator (const struct c_declarator *declarator, } else if (decl_context == FIELD) { - if (pedantic && !flag_isoc99 && !in_system_header) + if (array_parm_vla_unspec_p) + /* Field names can in fact have function prototype + scope so [*] is disallowed here through making + the field variably modified, not through being + something other than a declaration with function + prototype scope. */ + size_varies = 1; + else if (pedantic && !flag_isoc99 && !in_system_header) pedwarn (input_location, OPT_pedantic, "ISO C90 does not support flexible array members"); @@ -4401,12 +4408,6 @@ grokdeclarator (const struct c_declarator *declarator, { if (array_parm_vla_unspec_p) { - if (! orig_name) - { - /* C99 6.7.5.2p4 */ - error ("%<[*]%> not allowed in other than a declaration"); - } - itype = build_range_type (sizetype, size_zero_node, NULL_TREE); size_varies = 1; } @@ -4415,12 +4416,14 @@ grokdeclarator (const struct c_declarator *declarator, { if (array_parm_vla_unspec_p) { - /* The error is printed elsewhere. We use this to - avoid messing up with incomplete array types of - the same type, that would otherwise be modified - below. */ + /* C99 6.7.5.2p4 */ + warning (0, "%<[*]%> not in a declaration"); + /* We use this to avoid messing up with incomplete + array types of the same type, that would + otherwise be modified below. */ itype = build_range_type (sizetype, size_zero_node, NULL_TREE); + size_varies = 1; } } @@ -7772,6 +7775,8 @@ finish_declspecs (struct c_declspecs *specs) if (specs->saturating_p) { error ("%<_Sat%> is used without %<_Fract%> or %<_Accum%>"); + if (!targetm.fixed_point_supported_p ()) + error ("fixed-point types not supported for this target"); specs->typespec_word = cts_fract; } else if (specs->long_p || specs->short_p @@ -7894,8 +7899,10 @@ finish_declspecs (struct c_declspecs *specs) specs->type = dfloat128_type_node; break; case cts_fract: - gcc_assert (!specs->complex_p); - if (specs->saturating_p) + gcc_assert (!specs->complex_p); + if (!targetm.fixed_point_supported_p ()) + specs->type = integer_type_node; + else if (specs->saturating_p) { if (specs->long_long_p) specs->type = specs->unsigned_p @@ -7913,7 +7920,7 @@ finish_declspecs (struct c_declspecs *specs) specs->type = specs->unsigned_p ? sat_unsigned_fract_type_node : sat_fract_type_node; - } + } else { if (specs->long_long_p) @@ -7932,11 +7939,13 @@ finish_declspecs (struct c_declspecs *specs) specs->type = specs->unsigned_p ? unsigned_fract_type_node : fract_type_node; - } + } break; case cts_accum: - gcc_assert (!specs->complex_p); - if (specs->saturating_p) + gcc_assert (!specs->complex_p); + if (!targetm.fixed_point_supported_p ()) + specs->type = integer_type_node; + else if (specs->saturating_p) { if (specs->long_long_p) specs->type = specs->unsigned_p @@ -7954,7 +7963,7 @@ finish_declspecs (struct c_declspecs *specs) specs->type = specs->unsigned_p ? sat_unsigned_accum_type_node : sat_accum_type_node; - } + } else { if (specs->long_long_p) @@ -7973,7 +7982,7 @@ finish_declspecs (struct c_declspecs *specs) specs->type = specs->unsigned_p ? unsigned_accum_type_node : accum_type_node; - } + } break; default: gcc_unreachable (); diff --git a/gcc/c-parser.c b/gcc/c-parser.c index 5cb1982a544..199a5a72f3f 100644 --- a/gcc/c-parser.c +++ b/gcc/c-parser.c @@ -4949,13 +4949,6 @@ c_parser_sizeof_expression (c_parser *parser) /* sizeof ( type-name ). */ skip_evaluation--; in_sizeof--; - if (type_name->declarator->kind == cdk_array - && type_name->declarator->u.array.vla_unspec_p) - { - /* C99 6.7.5.2p4 */ - error_at (expr_loc, - "%<[*]%> not allowed in other than a declaration"); - } return c_expr_sizeof_type (type_name); } else @@ -5089,6 +5082,17 @@ c_parser_postfix_expression (c_parser *parser) switch (c_parser_peek_token (parser)->type) { case CPP_NUMBER: + expr.value = c_parser_peek_token (parser)->value; + expr.original_code = ERROR_MARK; + loc = c_parser_peek_token (parser)->location; + c_parser_consume_token (parser); + if (TREE_CODE (expr.value) == FIXED_CST + && !targetm.fixed_point_supported_p ()) + { + error_at (loc, "fixed-point types not supported for this target"); + expr.value = error_mark_node; + } + break; case CPP_CHAR: case CPP_CHAR16: case CPP_CHAR32: diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 4b9b2b30d00..9ce60cdc9ca 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -326,10 +326,14 @@ composite_type (tree t1, tree t2) tree d2 = TYPE_DOMAIN (t2); bool d1_variable, d2_variable; bool d1_zero, d2_zero; + bool t1_complete, t2_complete; /* We should not have any type quals on arrays at all. */ gcc_assert (!TYPE_QUALS (t1) && !TYPE_QUALS (t2)); + t1_complete = COMPLETE_TYPE_P (t1); + t2_complete = COMPLETE_TYPE_P (t2); + d1_zero = d1 == 0 || !TYPE_MAX_VALUE (d1); d2_zero = d2 == 0 || !TYPE_MAX_VALUE (d2); @@ -369,6 +373,15 @@ composite_type (tree t1, tree t2) || !d1_variable)) ? t1 : t2)); + /* Ensure a composite type involving a zero-length array type + is a zero-length type not an incomplete type. */ + if (d1_zero && d2_zero + && (t1_complete || t2_complete) + && !COMPLETE_TYPE_P (t1)) + { + TYPE_SIZE (t1) = bitsize_zero_node; + TYPE_SIZE_UNIT (t1) = size_zero_node; + } t1 = c_build_qualified_type (t1, quals); return build_type_attribute_variant (t1, attributes); } diff --git a/gcc/calls.c b/gcc/calls.c index e6e882f24b1..9dcf66298ca 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -498,10 +498,14 @@ special_function_p (const_tree fndecl, int flags) && ! strcmp (name, "__builtin_alloca")))) flags |= ECF_MAY_BE_ALLOCA; - /* Disregard prefix _, __ or __x. */ + /* Disregard prefix _, __, __x or __builtin_. */ if (name[0] == '_') { - if (name[1] == '_' && name[2] == 'x') + if (name[1] == '_' + && name[2] == 'b' + && !strncmp (name + 3, "uiltin_", 7)) + tname += 10; + else if (name[1] == '_' && name[2] == 'x') tname += 3; else if (name[1] == '_') tname += 2; diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index 0acf257cb43..4eccd734b82 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -605,14 +605,18 @@ "" ) +;; The r/r/k alternative is required when reloading the address +;; (plus (reg rN) (reg sp)) into (reg rN). In this case reload will +;; put the duplicated register first, and not try the commutative version. (define_insn_and_split "*arm_addsi3" - [(set (match_operand:SI 0 "s_register_operand" "=r, !k,r, !k,r") - (plus:SI (match_operand:SI 1 "s_register_operand" "%rk,!k,rk,!k,rk") - (match_operand:SI 2 "reg_or_int_operand" "rI, rI,L, L,?n")))] + [(set (match_operand:SI 0 "s_register_operand" "=r, !k, r,r, !k,r") + (plus:SI (match_operand:SI 1 "s_register_operand" "%rk,!k, r,rk,!k,rk") + (match_operand:SI 2 "reg_or_int_operand" "rI, rI,!k,L, L,?n")))] "TARGET_32BIT" "@ add%?\\t%0, %1, %2 add%?\\t%0, %1, %2 + add%?\\t%0, %2, %1 sub%?\\t%0, %1, #%n2 sub%?\\t%0, %1, #%n2 #" @@ -627,7 +631,7 @@ operands[1], 0); DONE; " - [(set_attr "length" "4,4,4,4,16") + [(set_attr "length" "4,4,4,4,4,16") (set_attr "predicable" "yes")] ) diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 393a3161da6..a54133378b5 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -11509,6 +11509,18 @@ (set_attr "prefix" "maybe_vex") (set_attr "mode" "TI")]) +(define_insn "*vpclmulqdq" + [(set (match_operand:V2DI 0 "register_operand" "=x") + (unspec:V2DI [(match_operand:V2DI 1 "register_operand" "x") + (match_operand:V2DI 2 "nonimmediate_operand" "xm") + (match_operand:SI 3 "const_0_to_255_operand" "n")] + UNSPEC_PCLMUL))] + "TARGET_PCLMUL && TARGET_AVX" + "vpclmulqdq\t{%3, %2, %1, %0|%0, %1, %2, %3}" + [(set_attr "type" "sselog1") + (set_attr "prefix" "vex") + (set_attr "mode" "TI")]) + (define_insn "pclmulqdq" [(set (match_operand:V2DI 0 "register_operand" "=x") (unspec:V2DI [(match_operand:V2DI 1 "register_operand" "0") diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index f5de061d44c..464148704f3 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -767,9 +767,15 @@ enum mips_code_readable_setting { /* Likewise for 32-bit regs. */ #define ABI_NEEDS_32BIT_REGS (mips_abi == ABI_32) -/* True if symbols are 64 bits wide. At present, n64 is the only - ABI for which this is true. */ -#define ABI_HAS_64BIT_SYMBOLS (mips_abi == ABI_64 && !TARGET_SYM32) +/* True if the file format uses 64-bit symbols. At present, this is + only true for n64, which uses 64-bit ELF. */ +#define FILE_HAS_64BIT_SYMBOLS (mips_abi == ABI_64) + +/* True if symbols are 64 bits wide. This is usually determined by + the ABI's file format, but it can be overridden by -msym32. Note that + overriding the size with -msym32 changes the ABI of relocatable objects, + although it doesn't change the ABI of a fully-linked object. */ +#define ABI_HAS_64BIT_SYMBOLS (FILE_HAS_64BIT_SYMBOLS && !TARGET_SYM32) /* ISA has instructions for managing 64-bit fp and gp regs (e.g. mips3). */ #define ISA_HAS_64BIT_REGS (ISA_MIPS3 \ @@ -1218,7 +1224,14 @@ enum mips_code_readable_setting { #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG #endif -#define DWARF2_ADDR_SIZE (ABI_HAS_64BIT_SYMBOLS ? 8 : 4) +/* The size of DWARF addresses should be the same as the size of symbols + in the target file format. They shouldn't depend on things like -msym32, + because many DWARF consumers do not allow the mixture of address sizes + that one would then get from linking -msym32 code with -msym64 code. + + Note that the default POINTER_SIZE test is not appropriate for MIPS. + EABI64 has 64-bit pointers but uses 32-bit ELF. */ +#define DWARF2_ADDR_SIZE (FILE_HAS_64BIT_SYMBOLS ? 8 : 4) /* By default, turn on GDB extensions. */ #define DEFAULT_GDB_EXTENSIONS 1 diff --git a/gcc/config/mips/sde.h b/gcc/config/mips/sde.h index ee8b20b0996..876a990476f 100644 --- a/gcc/config/mips/sde.h +++ b/gcc/config/mips/sde.h @@ -60,7 +60,6 @@ along with GCC; see the file COPYING3. If not see #undef SUBTARGET_ASM_SPEC #define SUBTARGET_ASM_SPEC "\ %{!mips1:--trap} \ -%{fPIC|fpic|fPIE|fpie:%{!mips16*:-KPIC}} \ %{mips16:-no-mips16}" #undef LINK_SPEC diff --git a/gcc/config/picochip/picochip.c b/gcc/config/picochip/picochip.c index a0686bdb262..066765661a9 100644 --- a/gcc/config/picochip/picochip.c +++ b/gcc/config/picochip/picochip.c @@ -1200,8 +1200,7 @@ picochip_legitimate_address_register (rtx x, unsigned strict) /* Determine whether the given constant is in the range required for the given base register. */ static int -picochip_const_ok_for_base (enum machine_mode mode, int regno, int offset, - int strict) +picochip_const_ok_for_base (enum machine_mode mode, int regno, int offset) { HOST_WIDE_INT corrected_offset; @@ -1209,17 +1208,16 @@ picochip_const_ok_for_base (enum machine_mode mode, int regno, int offset, { if (GET_MODE_SIZE(mode) <= 4) { - /* We can allow incorrect offsets if strict is 0. If strict is 1, - we are in reload and these memory accesses need to be changed. */ - if (offset % GET_MODE_SIZE (mode) != 0 && strict == 1) + /* We used to allow incorrect offsets if strict is 0. But, this would + then rely on reload doing the right thing. We have had problems + there before, and on > 4.3 compiler, there are no benefits. */ + if (offset % GET_MODE_SIZE (mode) != 0) return 0; corrected_offset = offset / GET_MODE_SIZE (mode); } else { - /* We can allow incorrect offsets if strict is 0. If strict is 1, - we are in reload and these memory accesses need to be changed. */ - if (offset % 4 != 0 && strict == 1) + if (offset % 4 != 0) return 0; corrected_offset = offset / 4; } @@ -1272,7 +1270,7 @@ picochip_legitimate_address_p (int mode, rtx x, unsigned strict) picochip_legitimate_address_register (base, strict) && CONST_INT == GET_CODE (offset) && picochip_const_ok_for_base (mode, REGNO (base), - INTVAL (offset),strict)); + INTVAL (offset))); break; } diff --git a/gcc/convert.c b/gcc/convert.c index 1a462e7626f..77907bafcb5 100644 --- a/gcc/convert.c +++ b/gcc/convert.c @@ -493,6 +493,7 @@ convert_to_integer (tree type, tree expr) case INTEGER_TYPE: case ENUMERAL_TYPE: case BOOLEAN_TYPE: + case OFFSET_TYPE: /* If this is a logical operation, which just returns 0 or 1, we can change the type of the expression. */ diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index eeec03d466f..2a08d8bbae4 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,42 @@ +2009-02-04 Jakub Jelinek <jakub@redhat.com> + + PR c++/39095 + * operators.def: Use COMPONENT_REF code for ->/pt operator again, + remove ./dt operator. + * mangle.c (write_expression): Handle COMPONENT_REF after handling + ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it + write_string ("dt") instead of using operators.def. + +2009-02-03 Jason Merrill <jason@redhat.com> + + * typeck.c (cp_build_unary_op): Only complain about taking address + of main if pedantic. + +2009-02-03 Jakub Jelinek <jakub@redhat.com> + + PR inline-asm/39059 + * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs. + + PR c++/39056 + * typeck2.c (digest_init_r): Don't call process_init_constructor + for COMPLEX_TYPE. + +2009-02-03 Paolo Bonzini <bonzini@gnu.org> + + PR c++/36897 + * pt.c (convert_nontype_argument_function): Expect expr to be an + ADDR_EXPR. + + PR c++/37314 + * typeck.c (merge_types): Call resolve_typename_type if only + one type is a typename. + +2009-02-02 Jason Merrill <jason@redhat.com> + + PR c++/39054 + * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node + in BIT_NOT_EXPR. + 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com> PR c++/39053 diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c index a7b466217eb..f51136ac3d5 100644 --- a/gcc/cp/mangle.c +++ b/gcc/cp/mangle.c @@ -2298,20 +2298,6 @@ write_expression (tree expr) write_template_args (template_args); } } - else if (code == COMPONENT_REF) - { - tree ob = TREE_OPERAND (expr, 0); - - if (TREE_CODE (ob) == ARROW_EXPR) - { - code = ARROW_EXPR; - ob = TREE_OPERAND (ob, 0); - } - - write_string (operator_name_info[(int)code].mangled_name); - write_expression (ob); - write_member_name (TREE_OPERAND (expr, 1)); - } else { int i; @@ -2334,6 +2320,23 @@ write_expression (tree expr) code = TREE_CODE (expr); } + if (code == COMPONENT_REF) + { + tree ob = TREE_OPERAND (expr, 0); + + if (TREE_CODE (ob) == ARROW_EXPR) + { + write_string (operator_name_info[(int)code].mangled_name); + ob = TREE_OPERAND (ob, 0); + } + else + write_string ("dt"); + + write_expression (ob); + write_member_name (TREE_OPERAND (expr, 1)); + return; + } + /* If it wasn't any of those, recursively expand the expression. */ write_string (operator_name_info[(int) code].mangled_name); diff --git a/gcc/cp/operators.def b/gcc/cp/operators.def index 20c74d88220..c63ce3f0429 100644 --- a/gcc/cp/operators.def +++ b/gcc/cp/operators.def @@ -125,8 +125,7 @@ DEF_SIMPLE_OPERATOR ("&&", TRUTH_ANDIF_EXPR, "aa", 2) DEF_SIMPLE_OPERATOR ("||", TRUTH_ORIF_EXPR, "oo", 2) DEF_SIMPLE_OPERATOR (",", COMPOUND_EXPR, "cm", 2) DEF_SIMPLE_OPERATOR ("->*", MEMBER_REF, "pm", 2) -DEF_SIMPLE_OPERATOR ("->", ARROW_EXPR, "pt", 2) -DEF_SIMPLE_OPERATOR (".", COMPONENT_REF, "dt", 2) +DEF_SIMPLE_OPERATOR ("->", COMPONENT_REF, "pt", 2) DEF_SIMPLE_OPERATOR ("[]", ARRAY_REF, "ix", 2) DEF_SIMPLE_OPERATOR ("++", POSTINCREMENT_EXPR, "pp", 2) DEF_SIMPLE_OPERATOR ("--", POSTDECREMENT_EXPR, "mm", 2) diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 5675e9bca12..404e45a14c6 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -3144,6 +3144,12 @@ cp_parser_primary_expression (cp_parser *parser, case CPP_WCHAR: case CPP_NUMBER: token = cp_lexer_consume_token (parser->lexer); + if (TREE_CODE (token->u.value) == FIXED_CST) + { + error ("%Hfixed-point types not supported in C++", + &token->location); + return error_mark_node; + } /* Floating-point literals are only allowed in an integral constant expression if they are cast to an integral or enumeration type. */ @@ -3896,7 +3902,9 @@ cp_parser_unqualified_id (cp_parser* parser, /* We couldn't find a type with this name, so just accept it and check for a match at instantiation time. */ type_decl = cp_parser_identifier (parser); - return build_nt (BIT_NOT_EXPR, type_decl); + if (type_decl != error_mark_node) + type_decl = build_nt (BIT_NOT_EXPR, type_decl); + return type_decl; } } /* If an error occurred, assume that the name of the diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index f6809f2bdf7..c5b675faa16 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -4566,6 +4566,13 @@ convert_nontype_argument (tree type, tree expr) expr = convert_nontype_argument_function (type, expr); if (!expr || expr == error_mark_node) return expr; + + if (TREE_CODE (expr) != ADDR_EXPR) + { + error ("%qE is not a valid template argument for type %qT", expr, type); + error ("it must be the address of a function with external linkage"); + return NULL_TREE; + } } /* [temp.arg.nontype]/5, bullet 5 diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index bca72ce452c..c58d40b9195 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -637,6 +637,20 @@ merge_types (tree t1, tree t2) code1 = TREE_CODE (t1); code2 = TREE_CODE (t2); + if (code1 != code2) + { + gcc_assert (code1 == TYPENAME_TYPE || code2 == TYPENAME_TYPE); + if (code1 == TYPENAME_TYPE) + { + t1 = resolve_typename_type (t1, /*only_current_p=*/true); + code1 = TREE_CODE (t1); + } + else + { + t2 = resolve_typename_type (t2, /*only_current_p=*/true); + code2 = TREE_CODE (t2); + } + } switch (code1) { @@ -4459,12 +4473,15 @@ cp_build_unary_op (enum tree_code code, tree xarg, int noconvert, arg = build1 (CONVERT_EXPR, type, arg); return arg; } - else if (DECL_MAIN_P (arg)) + else if (pedantic && DECL_MAIN_P (arg)) { /* ARM $3.4 */ - if (complain & tf_error) - permerror (input_location, "ISO C++ forbids taking address of function %<::main%>"); - else + /* Apparently a lot of autoconf scripts for C++ packages do this, + so only complain if -pedantic. */ + if (complain & (flag_pedantic_errors ? tf_error : tf_warning)) + pedwarn (input_location, OPT_pedantic, + "ISO C++ forbids taking address of function %<::main%>"); + else if (flag_pedantic_errors) return error_mark_node; } diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index a19a99920b6..526f780cddf 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -789,7 +789,8 @@ digest_init_r (tree type, tree init, bool nested) } /* Handle scalar types (including conversions) and references. */ - if (TREE_CODE (type) != COMPLEX_TYPE + if ((TREE_CODE (type) != COMPLEX_TYPE + || BRACE_ENCLOSED_INITIALIZER_P (init)) && (SCALAR_TYPE_P (type) || code == REFERENCE_TYPE)) { tree *exp; diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 1186064d029..4655ffe384a 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2009-02-03 Jakub Jelinek <jakub@redhat.com> + + * gfortranspec.c (lang_specific_driver): Update copyright notice + dates. + 2009-01-28 Paul Thomas <pault@gcc.gnu.org> PR fortran/38852 diff --git a/gcc/fortran/gfortranspec.c b/gcc/fortran/gfortranspec.c index 4a7d02f11eb..0e5e7913e97 100644 --- a/gcc/fortran/gfortranspec.c +++ b/gcc/fortran/gfortranspec.c @@ -1,6 +1,6 @@ /* Specific flags and argument handling of the Fortran front-end. Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008 + 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of GCC. @@ -379,7 +379,7 @@ lang_specific_driver (int *in_argc, const char *const **in_argv, case OPTION_version: printf ("GNU Fortran %s%s\n", pkgversion_string, version_string); - printf ("Copyright %s 2008 Free Software Foundation, Inc.\n\n", + printf ("Copyright %s 2009 Free Software Foundation, Inc.\n\n", _("(C)")); printf (_("GNU Fortran comes with NO WARRANTY, to the extent permitted by law.\n\ You may redistribute copies of GNU Fortran\n\ diff --git a/gcc/function.c b/gcc/function.c index 0cf4d5d0000..7489dc915dd 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -5477,6 +5477,9 @@ match_asm_constraints_1 (rtx insn, rtx *p_sets, int noutputs) char *end; int match, j; + if (*constraint == '%') + constraint++; + match = strtoul (constraint, &end, 10); if (end == constraint) continue; diff --git a/gcc/gcc.c b/gcc/gcc.c index e85d25de708..0a78282d87e 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -3641,7 +3641,7 @@ process_command (int argc, const char **argv) /* translate_options () has turned --version into -fversion. */ printf (_("%s %s%s\n"), programname, pkgversion_string, version_string); - printf ("Copyright %s 2008 Free Software Foundation, Inc.\n", + printf ("Copyright %s 2009 Free Software Foundation, Inc.\n", _("(C)")); fputs (_("This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"), diff --git a/gcc/gcov-dump.c b/gcc/gcov-dump.c index ae8504669fb..174a02dafac 100644 --- a/gcc/gcov-dump.c +++ b/gcc/gcov-dump.c @@ -1,5 +1,5 @@ /* Dump a gcov file, for debugging use. - Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 + Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by Nathan Sidwell <nathan@codesourcery.com> @@ -121,7 +121,7 @@ static void print_version (void) { printf ("gcov-dump %s%s\n", pkgversion_string, version_string); - printf ("Copyright (C) 2008 Free Software Foundation, Inc.\n"); + printf ("Copyright (C) 2009 Free Software Foundation, Inc.\n"); printf ("This is free software; see the source for copying conditions.\n" "There is NO warranty; not even for MERCHANTABILITY or \n" "FITNESS FOR A PARTICULAR PURPOSE.\n\n"); diff --git a/gcc/gcov.c b/gcc/gcov.c index a92ce91f2a3..61ac7ed6974 100644 --- a/gcc/gcov.c +++ b/gcc/gcov.c @@ -1,7 +1,7 @@ /* Gcov.c: prepend line execution counts and branch probabilities to a source file. Copyright (C) 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by James E. Wilson of Cygnus Support. Mangled by Bob Manson of Cygnus Support. @@ -426,7 +426,7 @@ static void print_version (void) { fnotice (stdout, "gcov %s%s\n", pkgversion_string, version_string); - fprintf (stdout, "Copyright %s 2008 Free Software Foundation, Inc.\n", + fprintf (stdout, "Copyright %s 2009 Free Software Foundation, Inc.\n", _("(C)")); fnotice (stdout, _("This is free software; see the source for copying conditions.\n" diff --git a/gcc/graphite.c b/gcc/graphite.c index 3cb24b86b16..a4d5e36f132 100644 --- a/gcc/graphite.c +++ b/gcc/graphite.c @@ -69,6 +69,147 @@ gmp_cst_to_tree (tree type, Value v) return build_int_cst (type, value_get_si (v)); } +/* Returns true when BB is in REGION. */ + +static bool +bb_in_sese_p (basic_block bb, sese region) +{ + return pointer_set_contains (SESE_REGION_BBS (region), bb); +} + +/* Returns true when LOOP is in the SESE region R. */ + +static inline bool +loop_in_sese_p (struct loop *loop, sese r) +{ + return (bb_in_sese_p (loop->header, r) + && bb_in_sese_p (loop->latch, r)); +} + +/* For a USE in BB, if BB is outside REGION, mark the USE in the + SESE_LIVEIN and SESE_LIVEOUT sets. */ + +static void +sese_build_livein_liveouts_use (sese region, basic_block bb, tree use) +{ + unsigned ver; + basic_block def_bb; + + if (TREE_CODE (use) != SSA_NAME) + return; + + ver = SSA_NAME_VERSION (use); + def_bb = gimple_bb (SSA_NAME_DEF_STMT (use)); + if (!def_bb + || !bb_in_sese_p (def_bb, region) + || bb_in_sese_p (bb, region)) + return; + + if (!SESE_LIVEIN_VER (region, ver)) + SESE_LIVEIN_VER (region, ver) = BITMAP_ALLOC (NULL); + + bitmap_set_bit (SESE_LIVEIN_VER (region, ver), bb->index); + bitmap_set_bit (SESE_LIVEOUT (region), ver); +} + +/* Marks for rewrite all the SSA_NAMES defined in REGION and that are + used in BB that is outside of the REGION. */ + +static void +sese_build_livein_liveouts_bb (sese region, basic_block bb) +{ + gimple_stmt_iterator bsi; + edge e; + edge_iterator ei; + ssa_op_iter iter; + tree var; + + FOR_EACH_EDGE (e, ei, bb->succs) + for (bsi = gsi_start_phis (e->dest); !gsi_end_p (bsi); gsi_next (&bsi)) + sese_build_livein_liveouts_use (region, bb, + PHI_ARG_DEF_FROM_EDGE (gsi_stmt (bsi), e)); + + for (bsi = gsi_start_bb (bb); !gsi_end_p (bsi); gsi_next (&bsi)) + FOR_EACH_SSA_TREE_OPERAND (var, gsi_stmt (bsi), iter, SSA_OP_ALL_USES) + sese_build_livein_liveouts_use (region, bb, var); +} + +/* Build the SESE_LIVEIN and SESE_LIVEOUT for REGION. */ + +void +sese_build_livein_liveouts (sese region) +{ + basic_block bb; + + SESE_LIVEOUT (region) = BITMAP_ALLOC (NULL); + SESE_NUM_VER (region) = num_ssa_names; + SESE_LIVEIN (region) = XCNEWVEC (bitmap, SESE_NUM_VER (region)); + + FOR_EACH_BB (bb) + sese_build_livein_liveouts_bb (region, bb); +} + +/* Register basic blocks belonging to a region in a pointer set. */ + +static void +register_bb_in_sese (basic_block entry_bb, basic_block exit_bb, sese region) +{ + edge_iterator ei; + edge e; + basic_block bb = entry_bb; + + FOR_EACH_EDGE (e, ei, bb->succs) + { + if (!pointer_set_contains (SESE_REGION_BBS (region), e->dest) && + e->dest->index != exit_bb->index) + { + pointer_set_insert (SESE_REGION_BBS (region), e->dest); + register_bb_in_sese (e->dest, exit_bb, region); + } + } +} + +/* Builds a new SESE region from edges ENTRY and EXIT. */ + +sese +new_sese (edge entry, edge exit) +{ + sese res = XNEW (struct sese); + + SESE_ENTRY (res) = entry; + SESE_EXIT (res) = exit; + SESE_REGION_BBS (res) = pointer_set_create (); + register_bb_in_sese (entry->dest, exit->dest, res); + + SESE_LIVEOUT (res) = NULL; + SESE_NUM_VER (res) = 0; + SESE_LIVEIN (res) = NULL; + + return res; +} + +/* Deletes REGION. */ + +void +free_sese (sese region) +{ + int i; + + for (i = 0; i < SESE_NUM_VER (region); i++) + BITMAP_FREE (SESE_LIVEIN_VER (region, i)); + + if (SESE_LIVEIN (region)) + free (SESE_LIVEIN (region)); + + if (SESE_LIVEOUT (region)) + BITMAP_FREE (SESE_LIVEOUT (region)); + + pointer_set_destroy (SESE_REGION_BBS (region)); + XDELETE (region); +} + + + /* Debug the list of old induction variables for this SCOP. */ void @@ -701,7 +842,7 @@ dot_scop_1 (FILE *file, scop_p scop) if (bb == exit) fprintf (file, "%d [shape=box];\n", bb->index); - if (bb_in_scop_p (bb, scop)) + if (bb_in_sese_p (bb, SCOP_REGION (scop))) fprintf (file, "%d [color=red];\n", bb->index); FOR_EACH_EDGE (e, ei, bb->succs) @@ -755,7 +896,7 @@ dot_all_scops_1 (FILE *file) /* Select color for SCoP. */ for (i = 0; VEC_iterate (scop_p, current_scops, i, scop); i++) - if (bb_in_scop_p (bb, scop) + if (bb_in_sese_p (bb, SCOP_REGION (scop)) || (SCOP_EXIT (scop) == bb) || (SCOP_ENTRY (scop) == bb)) { @@ -818,7 +959,7 @@ dot_all_scops_1 (FILE *file) fprintf (file, " <TR><TD WIDTH=\"50\" BGCOLOR=\"%s\">", color); - if (!bb_in_scop_p (bb, scop)) + if (!bb_in_sese_p (bb, SCOP_REGION (scop))) fprintf (file, " ("); if (bb == SCOP_ENTRY (scop) @@ -831,7 +972,7 @@ dot_all_scops_1 (FILE *file) else fprintf (file, " %d ", bb->index); - if (!bb_in_scop_p (bb, scop)) + if (!bb_in_sese_p (bb, SCOP_REGION (scop))) fprintf (file, ")"); fprintf (file, "</TD></TR>\n"); @@ -887,7 +1028,8 @@ outermost_loop_in_scop (scop_p scop, basic_block bb) struct loop *nest; nest = bb->loop_father; - while (loop_outer (nest) && loop_in_scop_p (loop_outer (nest), scop)) + while (loop_outer (nest) + && loop_in_sese_p (loop_outer (nest), SCOP_REGION (scop))) nest = loop_outer (nest); return nest; @@ -1133,8 +1275,6 @@ new_graphite_bb (scop_p scop, basic_block bb) struct loop *nest = outermost_loop_in_scop (scop, bb); gimple_stmt_iterator gsi; - bitmap_set_bit (SCOP_BBS_B (scop), bb->index); - for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi)) find_data_references_in_stmt (nest, gsi_stmt (gsi), &drs); @@ -1273,138 +1413,6 @@ get_new_name_from_old_name (htab_t map, tree old_name) -/* Returns true when BB is in REGION. */ - -static bool -bb_in_sese_p (basic_block bb, sese region) -{ - return pointer_set_contains (SESE_REGION_BBS (region), bb); -} - -/* For a USE in BB, if BB is outside REGION, mark the USE in the - SESE_LIVEIN and SESE_LIVEOUT sets. */ - -static void -sese_build_livein_liveouts_use (sese region, basic_block bb, tree use) -{ - unsigned ver; - basic_block def_bb; - - if (TREE_CODE (use) != SSA_NAME) - return; - - ver = SSA_NAME_VERSION (use); - def_bb = gimple_bb (SSA_NAME_DEF_STMT (use)); - if (!def_bb - || !bb_in_sese_p (def_bb, region) - || bb_in_sese_p (bb, region)) - return; - - if (!SESE_LIVEIN_VER (region, ver)) - SESE_LIVEIN_VER (region, ver) = BITMAP_ALLOC (NULL); - - bitmap_set_bit (SESE_LIVEIN_VER (region, ver), bb->index); - bitmap_set_bit (SESE_LIVEOUT (region), ver); -} - -/* Marks for rewrite all the SSA_NAMES defined in REGION and that are - used in BB that is outside of the REGION. */ - -static void -sese_build_livein_liveouts_bb (sese region, basic_block bb) -{ - gimple_stmt_iterator bsi; - edge e; - edge_iterator ei; - ssa_op_iter iter; - tree var; - - FOR_EACH_EDGE (e, ei, bb->succs) - for (bsi = gsi_start_phis (e->dest); !gsi_end_p (bsi); gsi_next (&bsi)) - sese_build_livein_liveouts_use (region, bb, - PHI_ARG_DEF_FROM_EDGE (gsi_stmt (bsi), e)); - - for (bsi = gsi_start_bb (bb); !gsi_end_p (bsi); gsi_next (&bsi)) - FOR_EACH_SSA_TREE_OPERAND (var, gsi_stmt (bsi), iter, SSA_OP_ALL_USES) - sese_build_livein_liveouts_use (region, bb, var); -} - -/* Build the SESE_LIVEIN and SESE_LIVEOUT for REGION. */ - -void -sese_build_livein_liveouts (sese region) -{ - basic_block bb; - - SESE_LIVEOUT (region) = BITMAP_ALLOC (NULL); - SESE_NUM_VER (region) = num_ssa_names; - SESE_LIVEIN (region) = XCNEWVEC (bitmap, SESE_NUM_VER (region)); - - FOR_EACH_BB (bb) - sese_build_livein_liveouts_bb (region, bb); -} - -/* Register basic blocks belonging to a region in a pointer set. */ - -static void -register_bb_in_sese (basic_block entry_bb, basic_block exit_bb, sese region) -{ - edge_iterator ei; - edge e; - basic_block bb = entry_bb; - - FOR_EACH_EDGE (e, ei, bb->succs) - { - if (!pointer_set_contains (SESE_REGION_BBS (region), e->dest) && - e->dest->index != exit_bb->index) - { - pointer_set_insert (SESE_REGION_BBS (region), e->dest); - register_bb_in_sese (e->dest, exit_bb, region); - } - } -} - -/* Builds a new SESE region from edges ENTRY and EXIT. */ - -sese -new_sese (edge entry, edge exit) -{ - sese res = XNEW (struct sese); - - SESE_ENTRY (res) = entry; - SESE_EXIT (res) = exit; - SESE_REGION_BBS (res) = pointer_set_create (); - register_bb_in_sese (entry->dest, exit->dest, res); - - SESE_LIVEOUT (res) = NULL; - SESE_NUM_VER (res) = 0; - SESE_LIVEIN (res) = NULL; - - return res; -} - -/* Deletes REGION. */ - -void -free_sese (sese region) -{ - int i; - - for (i = 0; i < SESE_NUM_VER (region); i++) - BITMAP_FREE (SESE_LIVEIN_VER (region, i)); - - if (SESE_LIVEIN (region)) - free (SESE_LIVEIN (region)); - - if (SESE_LIVEOUT (region)) - BITMAP_FREE (SESE_LIVEOUT (region)); - - pointer_set_destroy (SESE_REGION_BBS (region)); - XDELETE (region); -} - - - /* Creates a new scop starting with ENTRY. */ static scop_p @@ -1417,7 +1425,6 @@ new_scop (edge entry, edge exit) SCOP_REGION (scop) = new_sese (entry, exit); SCOP_BBS (scop) = VEC_alloc (graphite_bb_p, heap, 3); SCOP_OLDIVS (scop) = VEC_alloc (name_tree, heap, 3); - SCOP_BBS_B (scop) = BITMAP_ALLOC (NULL); SCOP_LOOPS (scop) = BITMAP_ALLOC (NULL); SCOP_LOOP_NEST (scop) = VEC_alloc (loop_p, heap, 3); SCOP_ADD_PARAMS (scop) = true; @@ -1446,7 +1453,6 @@ free_scop (scop_p scop) free_graphite_bb (gb); VEC_free (graphite_bb_p, heap, SCOP_BBS (scop)); - BITMAP_FREE (SCOP_BBS_B (scop)); BITMAP_FREE (SCOP_LOOPS (scop)); VEC_free (loop_p, heap, SCOP_LOOP_NEST (scop)); @@ -1632,6 +1638,12 @@ scopdet_basic_block_info (basic_block bb, VEC (sd_region, heap) **scops, result.next = NULL; result.exits = false; result.last = bb; + + /* Mark bbs terminating a SESE region difficult, if they start + a condition. */ + if (VEC_length (edge, bb->succs) > 1) + result.difficult = true; + break; case GBB_SIMPLE: @@ -2410,13 +2422,13 @@ build_scop_loop_nests (scop_p scop) struct loop *loop0, *loop1; FOR_EACH_BB (bb) - if (bb_in_scop_p (bb, scop)) + if (bb_in_sese_p (bb, SCOP_REGION (scop))) { struct loop *loop = bb->loop_father; /* Only add loops if they are completely contained in the SCoP. */ if (loop->header == bb - && bb_in_scop_p (loop->latch, scop)) + && bb_in_sese_p (loop->latch, SCOP_REGION (scop))) { if (!scop_record_loop (scop, loop)) return false; @@ -2442,6 +2454,40 @@ build_scop_loop_nests (scop_p scop) return true; } +/* Calculate the number of loops around LOOP in the SCOP. */ + +static inline int +nb_loops_around_loop_in_scop (struct loop *l, scop_p scop) +{ + int d = 0; + + for (; loop_in_sese_p (l, SCOP_REGION (scop)); d++, l = loop_outer (l)); + + return d; +} + +/* Calculate the number of loops around GB in the current SCOP. */ + +int +nb_loops_around_gb (graphite_bb_p gb) +{ + return nb_loops_around_loop_in_scop (gbb_loop (gb), GBB_SCOP (gb)); +} + +/* Returns the dimensionality of an enclosing loop iteration domain + with respect to enclosing SCoP for a given data reference REF. The + returned dimensionality is homogeneous (depth of loop nest + number + of SCoP parameters + const). */ + +int +ref_nb_loops (data_reference_p ref) +{ + loop_p loop = loop_containing_stmt (DR_STMT (ref)); + scop_p scop = DR_SCOP (ref); + + return nb_loops_around_loop_in_scop (loop, scop) + scop_nb_params (scop) + 2; +} + /* Build dynamic schedules for all the BBs. */ static void @@ -3086,13 +3132,14 @@ build_loop_iteration_domains (scop_p scop, struct loop *loop, else gcc_unreachable (); - if (loop->inner && loop_in_scop_p (loop->inner, scop)) + if (loop->inner && loop_in_sese_p (loop->inner, SCOP_REGION (scop))) build_loop_iteration_domains (scop, loop->inner, cstr, nb_outer_loops + 1); /* Only go to the next loops, if we are not at the outermost layer. These have to be handled seperately, as we can be sure, that the chain at this layer will be connected. */ - if (nb_outer_loops != 0 && loop->next && loop_in_scop_p (loop->next, scop)) + if (nb_outer_loops != 0 && loop->next && loop_in_sese_p (loop->next, + SCOP_REGION (scop))) build_loop_iteration_domains (scop, loop->next, outer_cstr, nb_outer_loops); for (i = 0; VEC_iterate (graphite_bb_p, SCOP_BBS (scop), i, gb); i++) @@ -3368,7 +3415,7 @@ build_scop_conditions_1 (VEC (gimple, heap) **conditions, VEC (basic_block, heap) *dom; /* Make sure we are in the SCoP. */ - if (!bb_in_scop_p (bb, scop)) + if (!bb_in_sese_p (bb, SCOP_REGION (scop))) return true; if (bb_contains_non_iv_scalar_phi_nodes (bb)) @@ -3562,7 +3609,7 @@ build_scop_iteration_domain (scop_p scop) /* Build cloog loop for all loops, that are in the uppermost loop layer of this SCoP. */ for (i = 0; VEC_iterate (loop_p, SCOP_LOOP_NEST (scop), i, loop); i++) - if (!loop_in_scop_p (loop_outer (loop), scop)) + if (!loop_in_sese_p (loop_outer (loop), SCOP_REGION (scop))) { /* The outermost constraints is a matrix that has: -first column: eq/ineq boolean @@ -4138,7 +4185,7 @@ expand_scalar_variables_ssa_name (tree op0, basic_block bb, else { if (gimple_code (def_stmt) != GIMPLE_ASSIGN - || !bb_in_scop_p (gimple_bb (def_stmt), scop)) + || !bb_in_sese_p (gimple_bb (def_stmt), SCOP_REGION (scop))) return get_new_name_from_old_name (map, op0); var0 = gimple_assign_rhs1 (def_stmt); @@ -5142,7 +5189,7 @@ get_vdef_before_scop (scop_p scop, tree name, sbitmap visited) basic_block def_bb = gimple_bb (def_stmt); if (!def_bb - || !bb_in_scop_p (def_bb, scop)) + || !bb_in_sese_p (def_bb, SCOP_REGION (scop))) return name; if (TEST_BIT (visited, def_bb->index)) @@ -5396,7 +5443,6 @@ gloog (scop_p scop, struct clast_stmt *stmt) { basic_block bb = SESE_EXIT (SCOP_REGION (scop))->dest; SESE_EXIT (SCOP_REGION (scop)) = split_block_after_labels (bb); - bitmap_set_bit (SCOP_BBS_B (scop), bb->index); pointer_set_insert (SESE_REGION_BBS (SCOP_REGION (scop)), bb); } @@ -6031,7 +6077,7 @@ limit_scops (void) continue; for (j = 0; VEC_iterate (loop_p, SCOP_LOOP_NEST (scop), j, loop); j++) - if (!loop_in_scop_p (loop_outer (loop), scop)) + if (!loop_in_sese_p (loop_outer (loop), SCOP_REGION (scop))) { sd_region open_scop; open_scop.entry = loop->header; diff --git a/gcc/graphite.h b/gcc/graphite.h index 76f26c8728a..1063a01110c 100644 --- a/gcc/graphite.h +++ b/gcc/graphite.h @@ -23,6 +23,8 @@ along with GCC; see the file COPYING3. If not see #include "tree-data-ref.h" +int ref_nb_loops (data_reference_p); + typedef struct graphite_bb *graphite_bb_p; DEF_VEC_P(graphite_bb_p); DEF_VEC_ALLOC_P (graphite_bb_p, heap); @@ -216,6 +218,8 @@ gbb_loop (struct graphite_bb *gbb) return GBB_BB (gbb)->loop_father; } +int nb_loops_around_gb (graphite_bb_p); + /* Calculate the number of loops around GB in the current SCOP. Only works if GBB_DOMAIN is built. */ @@ -313,13 +317,11 @@ struct scop /* A SCOP is defined as a SESE region. */ sese region; - /* All the basic blocks in this scop. They have extra information - attached to them, in the graphite_bb structure. */ + /* All the basic blocks in this scop that contain memory references + and that will be represented as statements in the polyhedral + representation. */ VEC (graphite_bb_p, heap) *bbs; - /* Set for a basic block index when it belongs to this SCOP. */ - bitmap bbs_b; - lambda_vector static_schedule; /* Parameters used within the SCOP. */ @@ -349,7 +351,6 @@ struct scop }; #define SCOP_BBS(S) S->bbs -#define SCOP_BBS_B(S) S->bbs_b #define SCOP_REGION(S) S->region /* SCOP_ENTRY bb dominates all the bbs of the scop. SCOP_EXIT bb post-dominates all the bbs of the scop. SCOP_EXIT potentially @@ -572,59 +573,4 @@ scop_gimple_loop_depth (scop_p scop, loop_p loop) return depth; } -/* Static inline function prototypes. */ - -static inline unsigned scop_nb_params (scop_p scop); - -/* Returns true when BB is in SCOP. */ - -static inline bool -bb_in_scop_p (basic_block bb, scop_p scop) -{ - return bitmap_bit_p (SCOP_BBS_B (scop), bb->index); -} - -/* Returns true when LOOP is in SCOP. */ - -static inline bool -loop_in_scop_p (struct loop *loop, scop_p scop) -{ - return (bb_in_scop_p (loop->header, scop) - && bb_in_scop_p (loop->latch, scop)); -} - -/* Calculate the number of loops around LOOP in the SCOP. */ - -static inline int -nb_loops_around_loop_in_scop (struct loop *l, scop_p scop) -{ - int d = 0; - - for (; loop_in_scop_p (l, scop); d++, l = loop_outer (l)); - - return d; -} - -/* Calculate the number of loops around GB in the current SCOP. */ - -static inline int -nb_loops_around_gb (graphite_bb_p gb) -{ - return nb_loops_around_loop_in_scop (gbb_loop (gb), GBB_SCOP (gb)); -} - -/* Returns the dimensionality of an enclosing loop iteration domain - with respect to enclosing SCoP for a given data reference REF. The - returned dimensionality is homogeneous (depth of loop nest + number - of SCoP parameters + const). */ - -static inline int -ref_nb_loops (data_reference_p ref) -{ - loop_p loop = loop_containing_stmt (DR_STMT (ref)); - scop_p scop = DR_SCOP (ref); - - return nb_loops_around_loop_in_scop (loop, scop) + scop_nb_params (scop) + 2; -} - #endif /* GCC_GRAPHITE_H */ diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index dd696e689da..7726ca483d1 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,7 @@ +2009-02-03 Jakub Jelinek <jakub@redhat.com> + + * jcf-dump.c (version): Update copyright notice dates. + 2009-01-16 Richard Guenther <rguenther@suse.de> PR tree-optimization/38835 diff --git a/gcc/java/jcf-dump.c b/gcc/java/jcf-dump.c index 7615f97b7f2..8008dd2073f 100644 --- a/gcc/java/jcf-dump.c +++ b/gcc/java/jcf-dump.c @@ -2,7 +2,7 @@ Functionally similar to Sun's javap. Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, - 2006, 2007, 2008 Free Software Foundation, Inc. + 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of GCC. @@ -1167,7 +1167,7 @@ static void version (void) { printf ("jcf-dump %s%s\n\n", pkgversion_string, version_string); - printf ("Copyright %s 2008 Free Software Foundation, Inc.\n", _("(C)")); + printf ("Copyright %s 2009 Free Software Foundation, Inc.\n", _("(C)")); printf (_("This is free software; see the source for copying conditions. There is NO\n" "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n")); exit (0); diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c index 9c0be87bc87..8b8345fe5fd 100644 --- a/gcc/loop-invariant.c +++ b/gcc/loop-invariant.c @@ -824,7 +824,7 @@ find_invariant_insn (rtx insn, bool always_reached, bool always_executed) return; /* We cannot make trapping insn executed, unless it was executed before. */ - if (may_trap_after_code_motion_p (PATTERN (insn)) && !always_reached) + if (may_trap_or_fault_p (PATTERN (insn)) && !always_reached) return; depends_on = BITMAP_ALLOC (NULL); diff --git a/gcc/mips-tdump.c b/gcc/mips-tdump.c index 2164a6e4b48..df902a6deb4 100644 --- a/gcc/mips-tdump.c +++ b/gcc/mips-tdump.c @@ -1,6 +1,6 @@ /* Read and manage MIPS symbol tables from object modules. Copyright (C) 1991, 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2003, 2004, - 2006, 2007, 2008 Free Software Foundation, Inc. + 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by hartzell@boulder.colorado.edu, Rewritten by meissner@osf.org. @@ -1414,7 +1414,7 @@ main (int argc, char **argv) if (version) { printf ("mips-tdump %s%s\n", pkgversion_string, version_string); - fputs ("Copyright (C) 2008 Free Software Foundation, Inc.\n", stdout); + fputs ("Copyright (C) 2009 Free Software Foundation, Inc.\n", stdout); fputs ("This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n", stdout); diff --git a/gcc/mips-tfile.c b/gcc/mips-tfile.c index b984f47cb3f..f8bb492b381 100644 --- a/gcc/mips-tfile.c +++ b/gcc/mips-tfile.c @@ -3,7 +3,8 @@ in the form of comments (the mips assembler does not support assembly access to debug information). Copyright (C) 1991, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001, - 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 + Free Software Foundation, Inc. Contributed by Michael Meissner (meissner@cygnus.com). This file is part of GCC. @@ -4780,7 +4781,7 @@ main (int argc, char **argv) if (version) { printf (_("mips-tfile %s%s\n"), pkgversion_string, version_string); - fputs ("Copyright (C) 2008 Free Software Foundation, Inc.\n", stdout); + fputs ("Copyright (C) 2009 Free Software Foundation, Inc.\n", stdout); fputs (_("This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"), stdout); diff --git a/gcc/po/ChangeLog b/gcc/po/ChangeLog index 6b6c206c4db..0df60c81682 100644 --- a/gcc/po/ChangeLog +++ b/gcc/po/ChangeLog @@ -1,3 +1,7 @@ +2009-02-03 Joseph S. Myers <joseph@codesourcery.com> + + * fi.po: Update. + 2009-01-12 Joseph S. Myers <joseph@codesourcery.com> * sv.po: Update. diff --git a/gcc/po/fi.po b/gcc/po/fi.po index 30f099086ac..3c144af4193 100644 --- a/gcc/po/fi.po +++ b/gcc/po/fi.po @@ -2,11 +2,10 @@ # Copyright (C) 2008 Free Software Foundation, Inc. # This file is distributed under the same license as the GCC package. # Ville Koskinen <ville.koskinen@iki.fi>, 2005. -# Lauri Nurmi <lanurmi@iki.fi>, 2007-2008. +# Lauri Nurmi <lanurmi@iki.fi>, 2007-2009. # # Joitakin termejä, joille voi miettiä (parempaa) suomennosta: # -# (non-)integral type -> ? # statement -> ? # variadic -> ? # nimike -> ? @@ -18,12 +17,15 @@ # case label -> ? # temporary (substantiivi) -> väliaikamitä? # +# Uusia: +# pass -> välittää vai antaa +# msgid "" msgstr "" -"Project-Id-Version: gcc 4.3.0\n" +"Project-Id-Version: gcc 4.4-b20081121\n" "Report-Msgid-Bugs-To: http://gcc.gnu.org/bugs.html\n" "POT-Creation-Date: 2008-11-18 20:02+0000\n" -"PO-Revision-Date: 2008-08-30 23:46+0300\n" +"PO-Revision-Date: 2009-02-03 22:16+0200\n" "Last-Translator: Lauri Nurmi <lanurmi@iki.fi>\n" "Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n" "MIME-Version: 1.0\n" @@ -522,12 +524,12 @@ msgstr "collect2-versio %s" #: collect2.c:1385 #, c-format msgid "%d constructor(s) found\n" -msgstr "" +msgstr "löytyi %d muodostin(ta)\n" #: collect2.c:1386 #, c-format msgid "%d destructor(s) found\n" -msgstr "" +msgstr "löytyi %d hajotin(ta)\n" #: collect2.c:1387 #, c-format @@ -873,7 +875,7 @@ msgstr " --help Näytä tämä ohje\n" #: gcc.c:3230 #, fuzzy msgid " --target-help Display target specific command line options\n" -msgstr " --target-help Näytä aargh" +msgstr " --target-help Näytä " #: gcc.c:3231 msgid " --help={target|optimizers|warnings|undocumented|params}[,{[^]joined|[^]separate}]\n" @@ -14707,27 +14709,27 @@ msgstr "" #: c.opt:72 msgid "Generate make dependencies" -msgstr "" +msgstr "Luo make-riippuvuudet" #: c.opt:76 msgid "Generate make dependencies and compile" -msgstr "" +msgstr "Luo make-riippuvuudet ja käännä" #: c.opt:80 msgid "Write dependency output to the given file" -msgstr "" +msgstr "Kirjoita riippuvuustuloste annettuun tiedostoon" #: c.opt:84 msgid "Treat missing header files as generated files" -msgstr "" +msgstr "Käsittele puuttuvia otsikkotiedostoja luotavina tiedostoina" #: c.opt:88 msgid "Like -M but ignore system header files" -msgstr "" +msgstr "Kuten -M, mutta ilman järjestelmän otsikkotiedostoja" #: c.opt:92 msgid "Like -MD but ignore system header files" -msgstr "" +msgstr "Kuten -MD, mutta ilman järjestelmän otsikkotiedostoja" #: c.opt:96 msgid "Generate phony targets for all headers" @@ -14767,11 +14769,12 @@ msgstr "" #: c.opt:132 msgid "Warn about casting functions to incompatible types" -msgstr "" +msgstr "Varoita funktioiden muunnoksista epäyhteensopiviksi tyypeiksi" #: c.opt:136 +#, fuzzy msgid "Warn when a built-in preprocessor macro is undefined or redefined" -msgstr "" +msgstr "Varoita sisäisen makron ..." #: c.opt:140 msgid "Warn about C constructs that are not in the common subset of C and C++" @@ -14806,9 +14809,8 @@ msgid "Warn for implicit type conversions that may change a value" msgstr "" #: c.opt:172 -#, fuzzy msgid "Warn for implicit type conversions between signed and unsigned integers" -msgstr "etumerkillisen ja etumerkittömän kokonaislukulausekkeen välinen vertailu" +msgstr "Varoita implisiittisistä tyyppimuunnoksista etumerkillisten ja etumerkittömien kokonaislukujen välillä" #: c.opt:176 msgid "Warn when all constructors and destructors are private" @@ -14824,7 +14826,7 @@ msgstr "" #: c.opt:188 msgid "Warn about compile-time integer division by zero" -msgstr "" +msgstr "Varoita käännösaikaisesta nollalla jaosta" #: c.opt:192 msgid "Warn about violations of Effective C++ style rules" @@ -14902,19 +14904,19 @@ msgstr "tyyppimuunnos erisuuruisesta kokonaisluvusta osoittimeksi" #: c.opt:277 msgid "Warn about invalid uses of the \"offsetof\" macro" -msgstr "" +msgstr "Varoita ”offsetof”-makron virheellisestä käytöstä" #: c.opt:281 msgid "Warn about PCH files that are found but not used" -msgstr "" +msgstr "Varoita löytyneistä PCH-tiedostoista, joita ei käytetä" #: c.opt:285 msgid "Do not warn about using \"long long\" when -pedantic" -msgstr "" +msgstr "Älä varoita ”long long”-tyypistä -pedantic-tilassa" #: c.opt:289 msgid "Warn about suspicious declarations of \"main\"" -msgstr "" +msgstr "Varoita epäilyttävistä ”main”-funktion esittelyistä" #: c.opt:293 msgid "Warn about possibly missing braces around initializers" @@ -14942,11 +14944,11 @@ msgstr "" #: c.opt:317 msgid "Warn about global functions without prototypes" -msgstr "" +msgstr "Varoita globaaleista funktioista, joilla ei ole prototyyppiä" #: c.opt:321 msgid "Warn about use of multi-character character constants" -msgstr "" +msgstr "Varoita monimerkkisistä merkkivakioista" #: c.opt:325 msgid "Warn about \"extern\" declarations not at file scope" @@ -14986,7 +14988,7 @@ msgstr "" #: c.opt:361 msgid "Warn about overloaded virtual function names" -msgstr "" +msgstr "Varoita ylikuormitetuista virtuaalifunktioiden nimistä" #: c.opt:365 msgid "Warn about overriding initializers without side effects" @@ -15145,7 +15147,7 @@ msgstr "Tunnista sisäiset funktiot" #: c.opt:523 msgid "Check the return value of new" -msgstr "Tarkista new'n paluuarvo" +msgstr "Tarkista new’n paluuarvo" #: c.opt:527 msgid "Allow the arguments of the '?' operator to have different types" @@ -15242,7 +15244,7 @@ msgstr "Älä varoita Microsoft-laajennosten käytöstä" #: c.opt:647 msgid "Generate code for NeXT (Apple Mac OS X) runtime environment" -msgstr "" +msgstr "Luo koodia NeXT (Apple Mac OS X) -ajoympäristöön" #: c.opt:651 msgid "Assume that receivers of Objective-C messages may be nil" @@ -15320,7 +15322,7 @@ msgstr "" #: c.opt:741 msgid "Make \"char\" signed by default" -msgstr "" +msgstr "Tee ”char”-tyypistä oletuksena etumerkillinen" #: c.opt:748 msgid "Display statistics accumulated during compilation" @@ -15462,10 +15464,10 @@ msgstr "" msgid "Conform to the ISO 1998 C++ standard" msgstr "Noudata ISO 1998 C++ -standardia" +# Viesti ei jatku englanniksikaan pidemmälle. #: c.opt:920 -#, fuzzy msgid "Conform to the ISO 1998 C++ standard, with extensions that are likely to" -msgstr "Noudata ISO 1998 C++ -standardia GNU-laajennoksineen" +msgstr "Noudata ISO 1998 C++ -standardia laajennoksineen, jotka todennäköisesti" #: c.opt:927 c.opt:962 msgid "Conform to the ISO 1990 C standard" @@ -15594,7 +15596,7 @@ msgstr "Käsittele annettu varoitus virheenä" #: common.opt:111 msgid "Print extra (possibly unwanted) warnings" -msgstr "" +msgstr "Näytä ylimääräisiä (mahdollisesti ei-toivottuja) varoituksia" #: common.opt:115 msgid "Exit on the first error occurred" @@ -15687,7 +15689,7 @@ msgstr "" #: common.opt:218 msgid "Warn when a function is unused" -msgstr "" +msgstr "Varoita käyttämättömistä funktioista" #: common.opt:222 msgid "Warn when a label is unused" @@ -15695,7 +15697,7 @@ msgstr "" #: common.opt:226 msgid "Warn when a function parameter is unused" -msgstr "" +msgstr "Varoita käyttämättömistä funktion parametreista" #: common.opt:230 msgid "Warn when an expression value is unused" @@ -16919,9 +16921,9 @@ msgid "%<va_start%> used in function with fixed args" msgstr "funktiota %<va_start%> käytetty funktiossa, jolla on kiinteä määrä argumentteja" #: builtins.c:11606 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "wrong number of arguments to function %<va_start%>" -msgstr "liian vähän argumentteja funktiolle %<va_start%>" +msgstr "väärä määrä argumentteja funktiolle %<va_start%>" #. Evidently an out of date version of <stdarg.h>; can't validate #. va_start's second argument, but can still work as intended. @@ -16931,9 +16933,9 @@ msgid "%<__builtin_next_arg%> called without an argument" msgstr "funktiota %<__builtin_next_arg%> kutsuttu ilman argumenttia" #: builtins.c:11624 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "wrong number of arguments to function %<__builtin_next_arg%>" -msgstr "liian vähän argumentteja funktiolle %<va_start%>" +msgstr "väärä määrä argumentteja funktiolle %<__builtin_next_arg%>" #. FIXME: Sometimes with the tree optimizers we can get the #. not the last argument even though the user used the last @@ -17079,7 +17081,7 @@ msgstr "negatiivinen kokonaisluku muunnettu implisiittisesti etumerkittömään #: c-common.c:1572 #, gcc-internal-format msgid "conversion of unsigned constant value to negative integer" -msgstr "" +msgstr "etumerkittömän vakion muunnos negatiiviseksi kokonaisluvuksi" #: c-common.c:1599 #, fuzzy, gcc-internal-format @@ -17159,12 +17161,12 @@ msgstr "vertailu on aina tosi johtuen tietotyypin rajallisesta arvoalueesta" #: c-common.c:3171 #, gcc-internal-format msgid "comparison of unsigned expression >= 0 is always true" -msgstr "vertailu X\"etumerkitön lauseke >= 0X\" on aina tosi" +msgstr "vertailu ”etumerkitön lauseke >= 0” on aina tosi" #: c-common.c:3181 #, gcc-internal-format msgid "comparison of unsigned expression < 0 is always false" -msgstr "vertailu X\"etumerkitön lauseke < 0X\" on aina epätosi" +msgstr "vertailu ”etumerkitön lauseke < 0” on aina epätosi" #: c-common.c:3222 #, gcc-internal-format @@ -17276,11 +17278,10 @@ msgstr "%Jcase-arvo %qs ei ole luetellussa tyypissä" msgid "%Jcase value %qs not in enumerated type %qT" msgstr "%Jcase-arvo %qs ei ole luetellussa tyypissä %qT" -# XXX #: c-common.c:4858 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%Hswitch missing default case" -msgstr "%Hswitch-lauseesta puuttuu default-nimike" +msgstr "%Hswitch-lauseesta puuttuu default-tapaus" #: c-common.c:4929 #, gcc-internal-format @@ -17293,9 +17294,9 @@ msgid "taking the address of a label is non-standard" msgstr "nimikkeen osoitteen ottaminen ei ole standardia" #: c-common.c:5118 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%qE attribute ignored for field of type %qT" -msgstr "%qs-attribuuttia ei huomioida ei-luokkatyypeille" +msgstr "%qE-attribuuttia ei huomioida %qT-tyyppiselle kentälle" #: c-common.c:5129 c-common.c:5148 c-common.c:5166 c-common.c:5193 #: c-common.c:5220 c-common.c:5246 c-common.c:5265 c-common.c:5289 @@ -17659,7 +17660,7 @@ msgstr "ei-liukulukuargumentti funktiolle %qs" #: c-common.c:7532 #, gcc-internal-format msgid "%Hignoring return value of %qD, declared with attribute warn_unused_result" -msgstr "%Hpaluuarvoa %qD ei huomioida, esitelty attribuutilla warn_unused_result" +msgstr "%H%qD:n paluuarvoa ei huomioida, esitelty attribuutilla warn_unused_result" #: c-common.c:7536 #, gcc-internal-format @@ -17818,9 +17819,9 @@ msgid "label %q+D defined but not used" msgstr "%Jnimike %qD määritelty, mutta ei käytetty" #: c-common.c:8192 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "label %q+D declared but not defined" -msgstr "%Jnimike %qD esitelty, mutta ei määritelty" +msgstr "nimike %qD esitelty muttei määritelty" #: c-common.c:8212 #, gcc-internal-format @@ -17951,9 +17952,9 @@ msgid "previous declaration of %q+D was here" msgstr "%J%qD:n edellinen esittely oli täällä" #: c-decl.c:1167 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%q+D redeclared as different kind of symbol" -msgstr "%J%qD esitelty uudelleen erityyppisenä symbolina" +msgstr "%q+D esitelty uudelleen erityyppisenä symbolina" #: c-decl.c:1171 #, gcc-internal-format @@ -17961,9 +17962,9 @@ msgid "built-in function %q+D declared as non-function" msgstr "sisäinen funktio %qD esitelty ei-funktiona" #: c-decl.c:1174 c-decl.c:1294 c-decl.c:1960 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "declaration of %q+D shadows a built-in function" -msgstr "%J%qD:n esittely varjostaa sisäänrakennettua funktiota" +msgstr "%q+D:n esittely varjostaa sisäänrakennetun funktion" #: c-decl.c:1183 #, fuzzy, gcc-internal-format @@ -17990,24 +17991,24 @@ msgstr "%J ristiriitaiset tyyppimääreet %qD:lle" #. Allow OLDDECL to continue in use. #: c-decl.c:1269 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "redefinition of typedef %q+D" -msgstr "%Jtypedef %qD määritelty uudelleen" +msgstr "typedef %q+D määritelty uudelleen" #: c-decl.c:1320 c-decl.c:1422 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "redefinition of %q+D" -msgstr "%J%qD määritelty uudelleen" +msgstr "%q+D määritelty uudelleen" #: c-decl.c:1355 c-decl.c:1460 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "static declaration of %q+D follows non-static declaration" -msgstr "%J%qD esitelty staattisena, edellinen esittely ei-staattinen" +msgstr "%q+D esitelty staattisena, edellinen esittely ei-staattinen" #: c-decl.c:1365 c-decl.c:1373 c-decl.c:1450 c-decl.c:1457 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "non-static declaration of %q+D follows static declaration" -msgstr "%J%qD esitelty ei-staattisena, edellinen esittely staattinen" +msgstr "%q+D esitelty ei-staattisena, edellinen esittely staattinen" #: c-decl.c:1389 #, gcc-internal-format @@ -18045,9 +18046,9 @@ msgid "redeclaration of %q+D with no linkage" msgstr "%J%qD esitelty uudelleen ilman linkitystä" #: c-decl.c:1498 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "redeclaration of %q+D with different visibility (old visibility preserved)" -msgstr "%J%qD esitelty uudelleen erilaisella näkyvyydellä (vanha näkyvyys säilytetty)" +msgstr "%q+D esitelty uudelleen erilaisella näkyvyydellä (vanha näkyvyys säilytetty)" #: c-decl.c:1509 #, fuzzy, gcc-internal-format @@ -18060,9 +18061,9 @@ msgid "declaration of %q+D with attribute noinline follows inline declaration " msgstr "%J%qD esitelty attribuutilla noinline, edellinen esittely on avoin " #: c-decl.c:1534 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "redefinition of parameter %q+D" -msgstr "%Jparametri %qD määritelty uudelleen" +msgstr "parametri %q+D määritelty uudelleen" #: c-decl.c:1561 #, fuzzy, gcc-internal-format @@ -18116,9 +18117,9 @@ msgid "incompatible implicit declaration of function %qD" msgstr "funktion %qD yhteensopimaton implisiittinen esittely" #: c-decl.c:2453 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%H%qE undeclared here (not in a function)" -msgstr "%qE esittelemätön täällä (ei funktiossa)" +msgstr "%H%qE esittelemättä täällä (ei funktiossa)" #: c-decl.c:2458 #, gcc-internal-format @@ -22592,9 +22593,9 @@ msgid "function returns an aggregate" msgstr "" #: function.c:4480 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "unused parameter %q+D" -msgstr "%Jkäyttämätön muuttuja %qD" +msgstr "käyttämätön muuttuja %q+D" #: gcc.c:1298 #, gcc-internal-format @@ -27355,7 +27356,7 @@ msgstr "" #: cp/call.c:2849 #, gcc-internal-format msgid "conversion from %qT to %qT is ambiguous" -msgstr "" +msgstr "muunnos tyypistä %qT tyyppiin %qT on monitulkintainen" #: cp/call.c:3004 cp/call.c:3024 cp/call.c:3088 #, gcc-internal-format @@ -27532,13 +27533,13 @@ msgstr "" #: cp/call.c:4853 #, gcc-internal-format msgid "cannot pass objects of non-POD type %q#T through %<...%>; call will abort at runtime" -msgstr "" +msgstr "%q#T-tyyppisiä epä-POD-objekteja ei voi välittää %<...%>:n kautta, ohjelma tulee keskeytymään ajettaessa" #. Undefined behavior [expr.call] 5.2.2/7. #: cp/call.c:4881 #, gcc-internal-format msgid "cannot receive objects of non-POD type %q#T through %<...%>; call will abort at runtime" -msgstr "" +msgstr "%q#T-tyyppisiä epä-POD-objekteja ei voi vastaanottaa %<...%>:n kautta, ohjelma tulee keskeytymään ajettaessa" #: cp/call.c:4929 #, gcc-internal-format @@ -27648,7 +27649,7 @@ msgstr "Java-luokalla %qT ei voi olla hajotinta" #: cp/class.c:977 #, gcc-internal-format msgid "Java class %qT cannot have an implicit non-trivial destructor" -msgstr "" +msgstr "Java-luokalla %qT ei voi olla implisiittistä epätriviaalia hajotinta" #: cp/class.c:1078 #, fuzzy, gcc-internal-format @@ -27763,9 +27764,9 @@ msgid "protected member %q+#D in anonymous struct" msgstr "" #: cp/class.c:2699 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "bit-field %q+#D with non-integral type" -msgstr "bittikentän %qs leveys ei ole kokonaislukuvakio" +msgstr "bittikenttä %+q#D ei ole kokonaislukutyyppinen" #: cp/class.c:2712 #, gcc-internal-format @@ -27933,9 +27934,9 @@ msgid "redefinition of %q#T" msgstr "%q#T uudelleenmääritelty" #: cp/class.c:5347 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%q#T has virtual functions and accessible non-virtual destructor" -msgstr "luokalla %q#T on virtuaalifunktioita mutta epävirtuaalinen hajotin" +msgstr "luokalla %q#T on virtuaalifunktioita ja käytettävissä oleva epävirtuaalinen hajotin" #: cp/class.c:5449 #, gcc-internal-format @@ -28027,10 +28028,11 @@ msgstr "" msgid "cannot convert %qE from type %qT to type %qT" msgstr "" +# Tämä esiintynee esim. const char* → char* -muunnoksessa. #: cp/cvt.c:452 #, gcc-internal-format msgid "conversion from %qT to %qT discards qualifiers" -msgstr "" +msgstr "muunnos tyypistä %qT tyyppiin %qT ei säilytä tyyppimääreitä" #: cp/cvt.c:470 cp/typeck.c:5386 #, gcc-internal-format @@ -28242,17 +28244,18 @@ msgstr "%J%qD:lle ei ole aiempaa esittelyä" #: cp/decl.c:1453 #, gcc-internal-format msgid "declaration of namespace %qD conflicts with" -msgstr "" +msgstr "nimiavaruuden %qD esittely on ristiriidassa" +# Oletetaan että tämä on edellisen jatkoa. #: cp/decl.c:1454 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "previous declaration of namespace %q+D here" -msgstr "%J%qD:n edellinen esittely oli täällä" +msgstr "täällä olevan %q+D:n edellisen esittelyn kanssa" #: cp/decl.c:1465 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%q+#D previously defined here" -msgstr "%Jviimeksi käytetty täällä" +msgstr "%q+#D määritelty aiemmin täällä" #. Prototype decl follows defn w/o prototype. #: cp/decl.c:1475 @@ -28442,12 +28445,12 @@ msgstr "" #: cp/decl.c:3755 #, gcc-internal-format msgid "%Jan anonymous struct cannot have function members" -msgstr "" +msgstr "%Janonyymillä structilla ei voi olla funktiojäseniä" #: cp/decl.c:3757 #, gcc-internal-format msgid "%Jan anonymous union cannot have function members" -msgstr "" +msgstr "%Janonyymillä unionilla ei voi olla funktiojäseniä" #: cp/decl.c:3775 #, gcc-internal-format @@ -28477,7 +28480,7 @@ msgstr "C++:n sisäinen tietotyyppi %qT määritelty uudelleen" #: cp/decl.c:3847 #, gcc-internal-format msgid "missing type-name in typedef-declaration" -msgstr "" +msgstr "tyypin nimi puuttuu typedef-esittelystä" #: cp/decl.c:3854 #, gcc-internal-format @@ -28656,7 +28659,7 @@ msgstr "" #: cp/decl.c:4610 #, gcc-internal-format msgid "uninitialized const %qD" -msgstr "" +msgstr "alustamaton const %qD" #: cp/decl.c:4722 #, gcc-internal-format @@ -28921,17 +28924,17 @@ msgstr "" #: cp/decl.c:7111 #, gcc-internal-format msgid "ISO C++ forbids initialization of member constant %qD of non-integral type %qT" -msgstr "" +msgstr "ISO C++ kieltää epäkokonaislukutyyppiä %2$qT olevan vakiojäsenen %1$qD alustamisen" #: cp/decl.c:7136 #, gcc-internal-format msgid "size of array %qD has non-integral type %qT" -msgstr "" +msgstr "taulukon %qD koolla on epäkokonaislukutyyppi %qT" #: cp/decl.c:7138 #, gcc-internal-format msgid "size of array has non-integral type %qT" -msgstr "" +msgstr "taulukon koolla on epäkokonaislukutyyppi %qT" #: cp/decl.c:7181 #, gcc-internal-format @@ -28956,12 +28959,12 @@ msgstr "ISO C++ kieltää nollan kokoiset taulukot" #: cp/decl.c:7200 #, gcc-internal-format msgid "size of array %qD is not an integral constant-expression" -msgstr "" +msgstr "taulukon %qD koko ei ole kokonaislukutyyppinen vakiolauseke" #: cp/decl.c:7203 #, gcc-internal-format msgid "size of array is not an integral constant-expression" -msgstr "" +msgstr "taulukon koko ei ole kokonaislukutyyppinen vakiolauseke" #: cp/decl.c:7209 #, gcc-internal-format @@ -28981,7 +28984,7 @@ msgstr "" #: cp/decl.c:7253 #, gcc-internal-format msgid "overflow in array dimension" -msgstr "" +msgstr "taulukon koon ylivuoto" #: cp/decl.c:7334 #, gcc-internal-format @@ -30020,7 +30023,7 @@ msgstr "" #: cp/decl2.c:1380 #, gcc-internal-format msgid "%<operator new%> must return type %qT" -msgstr "" +msgstr "%<operator new%>:n on palautettava tyyppi %qT" #. [basic.stc.dynamic.allocation] #. @@ -30034,17 +30037,17 @@ msgstr "%<va_start%>-funktion toinen parametri ei ole viimeinen nimetty argument #: cp/decl2.c:1407 #, gcc-internal-format msgid "%<operator new%> takes type %<size_t%> (%qT) as first parameter" -msgstr "" +msgstr "%<operator new%>:n ensimmäisen parametrin tyypin on oltava %<size_t%> (%qT)" #: cp/decl2.c:1436 #, gcc-internal-format msgid "%<operator delete%> must return type %qT" -msgstr "" +msgstr "%<operator delete%>:n on palautettava tyyppi %qT" #: cp/decl2.c:1445 #, gcc-internal-format msgid "%<operator delete%> takes type %qT as first parameter" -msgstr "" +msgstr "%<operator delete%>:n ensimmäisen parametrin tyypin on oltava %qT" #: cp/decl2.c:2122 #, gcc-internal-format @@ -30470,7 +30473,7 @@ msgstr "" #: cp/lex.c:319 #, gcc-internal-format msgid "junk at end of #pragma %s" -msgstr "" +msgstr "roskaa #pragma %s:n lopussa" #: cp/lex.c:326 #, gcc-internal-format @@ -30882,14 +30885,14 @@ msgid "%H%<::%E%> %s" msgstr "" #: cp/parser.c:2131 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%H%qE %s" -msgstr "%qE %s" +msgstr "%H%qE %s" #: cp/parser.c:2166 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%H%<long long long%> is too long for GCC" -msgstr "%<long long long%> on liian pitkä GCC:lle" +msgstr "%H%<long long long%> on liian pitkä GCC:lle" #: cp/parser.c:2170 #, gcc-internal-format @@ -30904,12 +30907,12 @@ msgstr "ylimääräinen %qs" #: cp/parser.c:2234 #, gcc-internal-format msgid "%Hnew types may not be defined in a return type" -msgstr "" +msgstr "%Huusia tyyppejä ei voi määritellä paluutyypissä" #: cp/parser.c:2236 #, gcc-internal-format msgid "(perhaps a semicolon is missing after the definition of %qT)" -msgstr "" +msgstr "(mahdollisesti %qT:n määrittelyn perästä puuttuu puolipiste)" #: cp/parser.c:2256 #, fuzzy, gcc-internal-format @@ -31009,9 +31012,9 @@ msgid "%H%qD used without template parameters" msgstr "%J%qD:n edellinen esittely oli täällä" #: cp/parser.c:4114 cp/parser.c:14760 cp/parser.c:17038 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%Hreference to %qD is ambiguous" -msgstr "" +msgstr "muunnos tyypistä %qT tyyppiin %qT on monitulkintainen" #: cp/parser.c:4160 cp/pt.c:5599 #, gcc-internal-format @@ -31297,9 +31300,9 @@ msgid "use %<%T::%D%> instead of %<%T::%D%> to name the constructor in a qualifi msgstr "" #: cp/parser.c:13512 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%H%qD is a namespace" -msgstr "%qD on nimiavaruus" +msgstr "%H%qD on nimiavaruus" #: cp/parser.c:13587 #, fuzzy, gcc-internal-format @@ -31556,9 +31559,9 @@ msgid "%Hcollapsed loops not perfectly nested" msgstr "" #: cp/parser.c:21817 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%Hjunk at end of %<#pragma GCC pch_preprocess%>" -msgstr "roskaa ilmaisun %<#pragma GCC pch_preprocess%> lopussa" +msgstr "%Hroskaa ilmaisun %<#pragma GCC pch_preprocess%> lopussa" #: cp/parser.c:21821 #, fuzzy, gcc-internal-format @@ -32288,7 +32291,7 @@ msgstr "" #: cp/pt.c:14534 #, gcc-internal-format msgid "%s %+#T" -msgstr "" +msgstr "%s %+#T" #: cp/pt.c:14557 cp/pt.c:14640 #, gcc-internal-format @@ -32320,7 +32323,6 @@ msgstr "" msgid "duplicate explicit instantiation of %q#D" msgstr "" -# semi-fuzzy; onko metodi tässä luokan jäsenfunktio ja yllä muu funktio? #: cp/pt.c:14650 cp/pt.c:14742 #, fuzzy, gcc-internal-format msgid "ISO C++ 1998 forbids the use of %<extern%> on explicit instantiations" @@ -32401,7 +32403,7 @@ msgstr "" #: cp/rtti.c:288 #, gcc-internal-format msgid "cannot use typeid with -fno-rtti" -msgstr "" +msgstr "typeid:tä ei voi käyttää -fno-rtti-valitsimen kanssa" #: cp/rtti.c:294 #, gcc-internal-format @@ -32881,9 +32883,9 @@ msgid "invalid application of %qs to a member function" msgstr "" #: cp/typeck.c:1374 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "invalid application of %<sizeof%> to a bit-field" -msgstr "epäkelpo %<sizeof%>-avainsanan soveltaminen funktiotyyppiin" +msgstr "epäkelpo %<sizeof%>-avainsanan soveltaminen bittikenttään" #: cp/typeck.c:1382 #, fuzzy, gcc-internal-format @@ -33162,14 +33164,14 @@ msgid "taking address of temporary" msgstr "" #: cp/typeck.c:4360 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "ISO C++ forbids incrementing an enum" -msgstr "ISO C kieltää sisäkkäiset funktiot" +msgstr "ISO C++ kieltää enumin lisäyksen" #: cp/typeck.c:4361 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "ISO C++ forbids decrementing an enum" -msgstr "ISO C++ kieltää muuttujan %qs esittelyn ilman tyyppiä" +msgstr "ISO C++ kieltää enumin vähentämisen" #: cp/typeck.c:4377 #, fuzzy, gcc-internal-format @@ -33294,7 +33296,7 @@ msgstr "ISO C++ kieltää tyyppimuunnoksen funktio-osoittimen ja olio-osoittimen #: cp/typeck.c:5496 #, gcc-internal-format msgid "invalid cast from type %qT to type %qT" -msgstr "" +msgstr "virheellinen muunnos tyypistä %qT tyyppiin %qT" #: cp/typeck.c:5552 #, gcc-internal-format @@ -33369,7 +33371,7 @@ msgstr "" #: cp/typeck.c:6544 #, gcc-internal-format msgid "cannot convert %qT to %qT for argument %qP to %qD" -msgstr "" +msgstr "ei voi muuntaa tyypistä %1$qT tyyppiin %2$qT %4$qD:n argumentiksi %3$qP" # XXX # %s on "initialization", jota EI VOI suomentaa tällä hetkellä. @@ -33439,7 +33441,7 @@ msgstr "arvo return-lauseelle funktiossa, jonka paluutyyppi on ”void”" #: cp/typeck.c:6850 #, gcc-internal-format msgid "%<operator new%> must not return NULL unless it is declared %<throw()%> (or -fcheck-new is in effect)" -msgstr "" +msgstr "%<operator new%> ei saa palauttaa NULLia ellei esittely ole %<throw()%> (tai -fcheck-new ole voimassa)" #: cp/typeck2.c:54 #, gcc-internal-format @@ -34391,7 +34393,7 @@ msgstr "%qs-nimikkeen kaksoisesittely" #: objc/objc-act.c:8426 #, gcc-internal-format msgid "%J%s %<%c%s%>" -msgstr "" +msgstr "%J%s %<%c%s%>" #: objc/objc-act.c:8757 #, gcc-internal-format @@ -34498,13 +34500,11 @@ msgstr "%J%qD:n esittely varjostaa edellistä paikallista" #~ msgid "Can't open included file '%s'" #~ msgstr "syötetiedoston avaaminen ei onnistu: %s" -#, fuzzy #~ msgid "too few arguments to function %qs" -#~ msgstr "liian vähän argumentteja funktiolle %qE" +#~ msgstr "liian vähän argumentteja funktiolle %qs" -#, fuzzy #~ msgid "too many arguments to function %qs" -#~ msgstr "liian monta argumenttia funktiolle %qE" +#~ msgstr "liian monta argumenttia funktiolle %qs" #, fuzzy #~ msgid "%q+D declared inline after being called" diff --git a/gcc/rtl.h b/gcc/rtl.h index 5c2a89edec9..eaedb009e85 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -1767,7 +1767,6 @@ extern int volatile_refs_p (const_rtx); extern int volatile_insn_p (const_rtx); extern int may_trap_p_1 (const_rtx, unsigned); extern int may_trap_p (const_rtx); -extern int may_trap_after_code_motion_p (const_rtx); extern int may_trap_or_fault_p (const_rtx); extern int inequality_comparisons_p (const_rtx); extern rtx replace_rtx (rtx, rtx, rtx); diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 5d9df2cc089..cc7775ffd63 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -263,14 +263,68 @@ rtx_varies_p (const_rtx x, bool for_alias) alignment machines. */ static int -rtx_addr_can_trap_p_1 (const_rtx x, enum machine_mode mode, bool unaligned_mems) +rtx_addr_can_trap_p_1 (const_rtx x, HOST_WIDE_INT offset, HOST_WIDE_INT size, + enum machine_mode mode, bool unaligned_mems) { enum rtx_code code = GET_CODE (x); + if (STRICT_ALIGNMENT + && unaligned_mems + && GET_MODE_SIZE (mode) != 0) + { + HOST_WIDE_INT actual_offset = offset; +#ifdef SPARC_STACK_BOUNDARY_HACK + /* ??? The SPARC port may claim a STACK_BOUNDARY higher than + the real alignment of %sp. However, when it does this, the + alignment of %sp+STACK_POINTER_OFFSET is STACK_BOUNDARY. */ + if (SPARC_STACK_BOUNDARY_HACK + && (x == stack_pointer_rtx || x == hard_frame_pointer_rtx)) + actual_offset -= STACK_POINTER_OFFSET; +#endif + + return actual_offset % GET_MODE_SIZE (mode) != 0; + } + switch (code) { case SYMBOL_REF: - return SYMBOL_REF_WEAK (x); + if (SYMBOL_REF_WEAK (x)) + return 1; + if (!CONSTANT_POOL_ADDRESS_P (x)) + { + tree decl; + HOST_WIDE_INT decl_size; + + if (offset < 0) + return 1; + if (size == 0) + size = GET_MODE_SIZE (mode); + if (size == 0) + return offset != 0; + + /* If the size of the access or of the symbol is unknown, + assume the worst. */ + decl = SYMBOL_REF_DECL (x); + + /* Else check that the access is in bounds. TODO: restructure + expr_size/lhd_expr_size/int_expr_size and just use the latter. */ + if (!decl) + decl_size = -1; + else if (DECL_P (decl) && DECL_SIZE_UNIT (decl)) + decl_size = (host_integerp (DECL_SIZE_UNIT (decl), 0) + ? tree_low_cst (DECL_SIZE_UNIT (decl), 0) + : -1); + else if (TREE_CODE (decl) == STRING_CST) + decl_size = TREE_STRING_LENGTH (decl); + else if (TYPE_SIZE_UNIT (TREE_TYPE (decl))) + decl_size = int_size_in_bytes (TREE_TYPE (decl)); + else + decl_size = -1; + + return (decl_size <= 0 ? offset != 0 : offset + size > decl_size); + } + + return 0; case LABEL_REF: return 0; @@ -289,54 +343,37 @@ rtx_addr_can_trap_p_1 (const_rtx x, enum machine_mode mode, bool unaligned_mems) return 1; case CONST: - return rtx_addr_can_trap_p_1 (XEXP (x, 0), mode, unaligned_mems); + return rtx_addr_can_trap_p_1 (XEXP (x, 0), offset, size, + mode, unaligned_mems); case PLUS: /* An address is assumed not to trap if: - - it is an address that can't trap plus a constant integer, + - it is the pic register plus a constant. */ + if (XEXP (x, 0) == pic_offset_table_rtx && CONSTANT_P (XEXP (x, 1))) + return 0; + + /* - or it is an address that can't trap plus a constant integer, with the proper remainder modulo the mode size if we are considering unaligned memory references. */ - if (!rtx_addr_can_trap_p_1 (XEXP (x, 0), mode, unaligned_mems) - && GET_CODE (XEXP (x, 1)) == CONST_INT) - { - HOST_WIDE_INT offset; - - if (!STRICT_ALIGNMENT - || !unaligned_mems - || GET_MODE_SIZE (mode) == 0) - return 0; - - offset = INTVAL (XEXP (x, 1)); - -#ifdef SPARC_STACK_BOUNDARY_HACK - /* ??? The SPARC port may claim a STACK_BOUNDARY higher than - the real alignment of %sp. However, when it does this, the - alignment of %sp+STACK_POINTER_OFFSET is STACK_BOUNDARY. */ - if (SPARC_STACK_BOUNDARY_HACK - && (XEXP (x, 0) == stack_pointer_rtx - || XEXP (x, 0) == hard_frame_pointer_rtx)) - offset -= STACK_POINTER_OFFSET; -#endif - - return offset % GET_MODE_SIZE (mode) != 0; - } - - /* - or it is the pic register plus a constant. */ - if (XEXP (x, 0) == pic_offset_table_rtx && CONSTANT_P (XEXP (x, 1))) + if (GET_CODE (XEXP (x, 1)) == CONST_INT + && !rtx_addr_can_trap_p_1 (XEXP (x, 0), offset + INTVAL (XEXP (x, 1)), + size, mode, unaligned_mems)) return 0; return 1; case LO_SUM: case PRE_MODIFY: - return rtx_addr_can_trap_p_1 (XEXP (x, 1), mode, unaligned_mems); + return rtx_addr_can_trap_p_1 (XEXP (x, 1), offset, size, + mode, unaligned_mems); case PRE_DEC: case PRE_INC: case POST_DEC: case POST_INC: case POST_MODIFY: - return rtx_addr_can_trap_p_1 (XEXP (x, 0), mode, unaligned_mems); + return rtx_addr_can_trap_p_1 (XEXP (x, 0), offset, size, + mode, unaligned_mems); default: break; @@ -351,7 +388,7 @@ rtx_addr_can_trap_p_1 (const_rtx x, enum machine_mode mode, bool unaligned_mems) int rtx_addr_can_trap_p (const_rtx x) { - return rtx_addr_can_trap_p_1 (x, VOIDmode, false); + return rtx_addr_can_trap_p_1 (x, 0, 0, VOIDmode, false); } /* Return true if X is an address that is known to not be zero. */ @@ -2170,17 +2207,10 @@ side_effects_p (const_rtx x) return 0; } -enum may_trap_p_flags -{ - MTP_UNALIGNED_MEMS = 1, - MTP_AFTER_MOVE = 2 -}; /* Return nonzero if evaluating rtx X might cause a trap. - (FLAGS & MTP_UNALIGNED_MEMS) controls whether nonzero is returned for - unaligned memory accesses on strict alignment machines. If - (FLAGS & AFTER_MOVE) is true, returns nonzero even in case the expression - cannot trap at its current location, but it might become trapping if moved - elsewhere. */ + FLAGS controls how to consider MEMs. A nonzero means the context + of the access may have changed from the original, such that the + address may have become invalid. */ int may_trap_p_1 (const_rtx x, unsigned flags) @@ -2188,7 +2218,11 @@ may_trap_p_1 (const_rtx x, unsigned flags) int i; enum rtx_code code; const char *fmt; - bool unaligned_mems = (flags & MTP_UNALIGNED_MEMS) != 0; + + /* We make no distinction currently, but this function is part of + the internal target-hooks ABI so we keep the parameter as + "unsigned flags". */ + bool code_changed = flags != 0; if (x == 0) return 0; @@ -2223,14 +2257,17 @@ may_trap_p_1 (const_rtx x, unsigned flags) /* Memory ref can trap unless it's a static var or a stack slot. */ case MEM: if (/* MEM_NOTRAP_P only relates to the actual position of the memory - reference; moving it out of condition might cause its address - become invalid. */ - !(flags & MTP_AFTER_MOVE) - && MEM_NOTRAP_P (x) - && (!STRICT_ALIGNMENT || !unaligned_mems)) - return 0; - return - rtx_addr_can_trap_p_1 (XEXP (x, 0), GET_MODE (x), unaligned_mems); + reference; moving it out of context such as when moving code + when optimizing, might cause its address to become invalid. */ + code_changed + || !MEM_NOTRAP_P (x)) + { + HOST_WIDE_INT size = MEM_SIZE (x) ? INTVAL (MEM_SIZE (x)) : 0; + return rtx_addr_can_trap_p_1 (XEXP (x, 0), 0, size, + GET_MODE (x), code_changed); + } + + return 0; /* Division by a non-constant might trap. */ case DIV: @@ -2328,15 +2365,6 @@ may_trap_p (const_rtx x) return may_trap_p_1 (x, 0); } -/* Return nonzero if evaluating rtx X might cause a trap, when the expression - is moved from its current location by some optimization. */ - -int -may_trap_after_code_motion_p (const_rtx x) -{ - return may_trap_p_1 (x, MTP_AFTER_MOVE); -} - /* Same as above, but additionally return nonzero if evaluating rtx X might cause a fault. We define a fault for the purpose of this function as a erroneous execution condition that cannot be encountered during the normal @@ -2380,7 +2408,7 @@ may_trap_after_code_motion_p (const_rtx x) int may_trap_or_fault_p (const_rtx x) { - return may_trap_p_1 (x, MTP_UNALIGNED_MEMS); + return may_trap_p_1 (x, 1); } /* Return nonzero if X contains a comparison that is not either EQ or NE, diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 828af3fad7a..33ba5fadec3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,96 @@ +2009-02-05 Daniel Berlin <dberlin@dberlin.org> + + * gcc.c-torture/execute/pr39100.c: New. + +2009-02-05 Joseph Myers <joseph@codesourcery.com> + + PR c/35435 + * gcc.dg/tls/diag-6.c: New test. + +2009-02-04 H.J. Lu <hongjiu.lu@intel.com> + + AVX Programming Reference (January, 2009) + * gcc.target/i386/avx-vpclmulqdq.c: New. + * gcc.target/i386/pclmul-avx-check.h: Likewise. + + * gcc.target/i386/i386.exp (check_effective_target_vpclmul): New. + + * gcc.target/i386/pclmulqdq.c (CHECK_H): New. + (TEST): Likewise. + Include CHECK_H instead of "pclmul-check.h". + (pclmul_test): Renamed to ... + (TEST): This. + +2009-02-04 Jakub Jelinek <jakub@redhat.com> + + PR c++/39095 + * g++.dg/abi/mangle31.C: New test. + +2009-02-03 Joseph Myers <joseph@codesourcery.com> + + PR c/29129 + * c90-arraydecl-1.c: Do not expect error for [*] in abstract + declarator. + * vla-6.c: Likewise. Expect warning not error for [*] lexically + inside function prototype but not part of parameter declarator. + * vla-11.c: New test. + +2009-02-03 Jason Merrill <jason@redhat.com> + + * g++.dg/warn/main-4.C: New test. + * g++.old-deja/g++.bugs/900227_01.C: Remove &main warnings. + +2009-02-03 Andrew Pinski <andrew_pinski@playstation.sony.com> + + PR C++/36607 + * g++.dg/expr/cast10.C: New test. + +2009-02-03 Joseph Myers <joseph@codesourcery.com> + + PR c/35433 + * gcc.dg/init-bad-6.c: New test. + +2009-02-03 Jakub Jelinek <jakub@redhat.com> + + PR target/35318 + * gcc.c-torture/compile/pr35318.c: New test. + + PR inline-asm/39059 + * gcc.dg/nofixed-point-2.c: New test. + * g++.dg/ext/fixed1.C: Adjust expected diagnostics. + * g++.dg/ext/fixed2.C: Likewise. + * g++.dg/other/error25.C: Likewise. + * g++.dg/lookup/crash7.C: Likewise. + * g++.dg/cpp0x/decltype-38655.C: Likewise. + + PR c++/39056 + * g++.dg/cpp0x/initlist13.C: New test. + +2009-02-03 Paolo Bonzini <bonzini@gnu.org> + + PR c++/36897 + * g++.dg/template/func2.C: New test. + + PR c++/37314 + * g++.dg/template/typename15.C: New. + * g++.dg/template/typename16.C: New. + +2009-02-03 Janis Johnson <janis187@us.ibm.com> + Ben Elliston <bje@au.ibm.com> + + PR c/39034 + * gcc.dg/dfp/pr39034.c: New test. + +2009-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + PR testsuite/38263 + * gcc.dg/ipa/ipacost-2.c: Add -fpie when pic. + +2009-02-02 Jason Merrill <jason@redhat.com> + + PR c++/39054 + * g++.dg/parse/dtor14.C: New test. + 2009-02-02 Jakub Jelinek <jakub@redhat.com> * lib/target-supports.exp diff --git a/gcc/testsuite/g++.dg/abi/mangle31.C b/gcc/testsuite/g++.dg/abi/mangle31.C new file mode 100644 index 00000000000..4be2e0b03fc --- /dev/null +++ b/gcc/testsuite/g++.dg/abi/mangle31.C @@ -0,0 +1,35 @@ +// PR c++/39095 +// { dg-do compile } + +struct B +{ + int b; +}; + +struct A +{ + B *operator->(); + A (); + B b; +}; + +A::A () +{ +} + +B * +A::operator->() +{ + return &b; +} + +A a; + +int +foo () +{ + return a->b; +} + +// { dg-final { scan-assembler "_ZN1AptEv" } } +// { dg-final { scan-assembler-not "_ZN1AdtEv" } } diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype-38655.C b/gcc/testsuite/g++.dg/cpp0x/decltype-38655.C index 689be9fa474..3b8455bc13f 100644 --- a/gcc/testsuite/g++.dg/cpp0x/decltype-38655.C +++ b/gcc/testsuite/g++.dg/cpp0x/decltype-38655.C @@ -1,4 +1,4 @@ // PR c++/38655 // { dg-options "" } -__decltype(0r)* p = 1; // { dg-error "unnamed-fixed" } +__decltype(0r)* p = 1; // { dg-error "not supported|invalid" } diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist13.C b/gcc/testsuite/g++.dg/cpp0x/initlist13.C new file mode 100644 index 00000000000..98af92bca53 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/initlist13.C @@ -0,0 +1,5 @@ +// PR c++/39056 +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +__complex__ int i ({0}); // { dg-error "cannot convert" } diff --git a/gcc/testsuite/g++.dg/expr/cast10.C b/gcc/testsuite/g++.dg/expr/cast10.C new file mode 100644 index 00000000000..cd3e0fc3c27 --- /dev/null +++ b/gcc/testsuite/g++.dg/expr/cast10.C @@ -0,0 +1,10 @@ +// { dg-do compile } +// This used to error out because we would try to convert m to a short. + + +struct a {}; +void b() { + int a::*m; + a *c; + short p = reinterpret_cast<char*>(&(c->*m)) - reinterpret_cast<char*>(c); +} diff --git a/gcc/testsuite/g++.dg/ext/fixed1.C b/gcc/testsuite/g++.dg/ext/fixed1.C index 9ee27808f46..5a479d6891a 100644 --- a/gcc/testsuite/g++.dg/ext/fixed1.C +++ b/gcc/testsuite/g++.dg/ext/fixed1.C @@ -3,6 +3,6 @@ template<int> struct A {}; -template<typename> struct B : A<sizeof(0=0r)> {}; +template<typename> struct B : A<sizeof(0=0r)> {}; // { dg-error "not supported" } -template<typename> struct C : A<sizeof(0=0r)> {}; +template<typename> struct C : A<sizeof(0=0r)> {}; // { dg-error "not supported" } diff --git a/gcc/testsuite/g++.dg/ext/fixed2.C b/gcc/testsuite/g++.dg/ext/fixed2.C index a4766eb794c..1ee5538a172 100644 --- a/gcc/testsuite/g++.dg/ext/fixed2.C +++ b/gcc/testsuite/g++.dg/ext/fixed2.C @@ -3,5 +3,5 @@ void foo() { - throw 0r; + throw 0r; // { dg-error "not supported" } } diff --git a/gcc/testsuite/g++.dg/parse/dtor14.C b/gcc/testsuite/g++.dg/parse/dtor14.C new file mode 100644 index 00000000000..6ba7a5b6c32 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/dtor14.C @@ -0,0 +1,8 @@ +// PR c++/39054 + +struct A {}; + +template<typename> void foo() +{ + A().~int(); // { dg-error "expected" } +} diff --git a/gcc/testsuite/g++.dg/template/func2.C b/gcc/testsuite/g++.dg/template/func2.C new file mode 100644 index 00000000000..b0f691d242b --- /dev/null +++ b/gcc/testsuite/g++.dg/template/func2.C @@ -0,0 +1,12 @@ +// { dg-do compile } + +typedef void (*fptr)(); +fptr zeroptr = 0; +template<typename T, fptr F> struct foo { }; +template<typename T> struct foo<T,zeroptr> { }; +// { dg-error "not a valid template argument" "not valid" { target *-*-* } 6 } +// { dg-error "must be the address" "must be the address " { target *-*-* } 6 } + +// The rest is needed to trigger the ICE in 4.0 to 4.3: +void f() { } +foo<int,&f> m_foo; diff --git a/gcc/testsuite/g++.dg/template/typename15.C b/gcc/testsuite/g++.dg/template/typename15.C new file mode 100644 index 00000000000..fece885ea78 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/typename15.C @@ -0,0 +1,12 @@ +// PR37314 ice-on-valid-code, from w.doeringer +template <typename T> +class Cdeque { + typedef T *pointer; + class iterator { + typedef typename Cdeque<T>::pointer pointer; + pointer operator->(); + }; +}; +template <typename T> T* Cdeque<T>::iterator::operator->() { } + + diff --git a/gcc/testsuite/g++.dg/template/typename16.C b/gcc/testsuite/g++.dg/template/typename16.C new file mode 100644 index 00000000000..45da11162db --- /dev/null +++ b/gcc/testsuite/g++.dg/template/typename16.C @@ -0,0 +1,25 @@ +// PR37314 rejects-valid, from w.doeringer +template <typename T> +struct A { + typedef __PTRDIFF_TYPE__ difference_type; + struct B { + typedef typename A<T>::difference_type difference_type; + difference_type operator-(B const&) const; + T t; + }; +}; +// + +template <typename T> +typename A<T>::B::difference_type A<T>::B::operator-(B const&) const { + return -1; +} + +// +int main() { + A<int>::B i; + ++i.t; + return 0; +} + + diff --git a/gcc/testsuite/g++.dg/warn/main-4.C b/gcc/testsuite/g++.dg/warn/main-4.C new file mode 100644 index 00000000000..ad2dd709827 --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/main-4.C @@ -0,0 +1,5 @@ +// This pattern is used by a lot of autoconf scripts, so don't +// complain about it unless -pedantic. +// { dg-options "" } + +int main () { main (); return 0; } diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900227_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900227_01.C index 2bd4f3d76c2..b441eff650a 100644 --- a/gcc/testsuite/g++.old-deja/g++.bugs/900227_01.C +++ b/gcc/testsuite/g++.old-deja/g++.bugs/900227_01.C @@ -33,9 +33,7 @@ int main (); -short s = (short) &main; // { dg-error "taking address" "addr" { xfail h8*-*-* xstormy16-*-* } } -// { dg-error "loses precision" "lose" { xfail h8*-*-* xstormy16-*-* } 36 } -char c = (char) &main; // { dg-error "taking address" } -// { dg-error "loses precision" "lose" { target *-*-* } 38 } +short s = (short) &main; // { dg-error "loses precision" "lose" { xfail h8*-*-* xstormy16-*-* } } +char c = (char) &main; // { dg-error "loses precision" "lose" } int main () { return 0; } diff --git a/gcc/testsuite/gcc.c-torture/compile/pr35318.c b/gcc/testsuite/gcc.c-torture/compile/pr35318.c new file mode 100644 index 00000000000..85bb3626986 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr35318.c @@ -0,0 +1,8 @@ +/* PR target/35318 */ + +void +foo () +{ + double x = 4, y; + __asm__ volatile ("" : "=r,r" (x), "=r,r" (y) : "%0,0" (x), "m,r" (8)); +} diff --git a/gcc/testsuite/gcc.c-torture/execute/pr39100.c b/gcc/testsuite/gcc.c-torture/execute/pr39100.c new file mode 100644 index 00000000000..5cb9e25d437 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr39100.c @@ -0,0 +1,65 @@ +/* Bad PTA results (incorrect store handling) was causing us to delete + *na = 0 store. */ + +typedef struct E +{ + int p; + struct E *n; +} *EP; + +typedef struct C +{ + EP x; + short cn, cp; +} *CP; + +__attribute__((noinline)) CP +foo (CP h, EP x) +{ + EP pl = 0, *pa = &pl; + EP nl = 0, *na = &nl; + EP n; + + while (x) + { + n = x->n; + if ((x->p & 1) == 1) + { + h->cp++; + *pa = x; + pa = &((*pa)->n); + } + else + { + h->cn++; + *na = x; + na = &((*na)->n); + } + x = n; + } + *pa = nl; + *na = 0; + h->x = pl; + return h; +} + +int +main (void) +{ + struct C c = { 0, 0, 0 }; + struct E e[2] = { { 0, &e[1] }, { 1, 0 } }; + EP p; + + foo (&c, &e[0]); + if (c.cn != 1 || c.cp != 1) + __builtin_abort (); + if (c.x != &e[1]) + __builtin_abort (); + if (e[1].n != &e[0]) + __builtin_abort (); + if (e[0].n) + __builtin_abort (); + return 0; +} + + diff --git a/gcc/testsuite/gcc.dg/c90-arraydecl-1.c b/gcc/testsuite/gcc.dg/c90-arraydecl-1.c index 97dc1eee663..2b7eadbf615 100644 --- a/gcc/testsuite/gcc.dg/c90-arraydecl-1.c +++ b/gcc/testsuite/gcc.dg/c90-arraydecl-1.c @@ -10,7 +10,7 @@ void foo0 (int a, int b[*]); /* { dg-error "ISO C90" "\[*\] not in C90" } */ void foo1 (int, int [*]); /* { dg-error "ISO C90" "\[*\] not in C90" } */ -/* { dg-error "allowed" "\'\[*\]\' not allowed in other than a declaration" { target *-*-* } 12 } */ + /* Use of static and type qualifiers (not allowed with abstract declarators) is a C99 feature. */ diff --git a/gcc/testsuite/gcc.dg/dfp/pr39034.c b/gcc/testsuite/gcc.dg/dfp/pr39034.c new file mode 100644 index 00000000000..6a261c9ddc2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/dfp/pr39034.c @@ -0,0 +1,111 @@ +/* { dg-do run } */ +/* { dg-options "-std=gnu99 -O" } */ + +/* DFP TR 24732 == WG14 / N1176, N1312 */ +/* Based on a test from Fred Tydeman. */ + +extern void abort (void); +int failures = 0; + +#ifdef DBG +#include <stdio.h> +#define FAILURE(MSG) { printf ("line %d: %s\n", __LINE__, MSG); failures++; } +#else +#define FAILURE(MSG) failures++; +#endif + + +/* Test runtime computations. */ + +void +runtime32 (void) +{ + volatile float v1 = 28.f, v2 = 3.f, v3 = 9.f, v4 = 31.f, v5 = 3.f, v6 = 10.f; + float b32 = (float)((v1/v2-v3) - (v4/v5-v6)); + _Decimal32 d32 = (float)((v1/v2-v3) - (v4/v5-v6)); + + if (b32) + FAILURE ("runtime: b32 should be zero") + if (d32) + FAILURE ("runtime: d32 should be zero") +} + +void +runtime64 (void) +{ + volatile double v1 = 28., v2 = 3., v3 = 9., v4 = 31., v5 = 3., v6 = 10.; + double b64 = (double)((v1/v2-v3) - (v4/v5-v6)); + _Decimal64 d64 = (double)((v1/v2-v3) - (v4/v5-v6)); + + if (b64) + FAILURE ("runtime: b64 should be zero") + if (d64) + FAILURE ("runtime: d64 should be zero") +} + +void +runtime128 (void) +{ + volatile long double v1 = 28.l, v2 = 3.l, v3 = 9.l, + v4 = 31.l, v5 = 3.l, v6 = 10.l; + long double b128 = (long double)((v1/v2-v3) - (v4/v5-v6)); + _Decimal128 d128 = (long double)((v1/v2-v3) - (v4/v5-v6)); + + if (b128) + FAILURE ("runtime: b128 should be zero") + if (d128) + FAILURE ("runtime: d128 should be zero") +} + +/* Test constant folding. */ + +void +fold32 (void) +{ + double d32 = (float)((28.f/3.f-9.f) - (31.f/3.f-10.f)); + _Decimal32 b32 = (float)((28.f/3.f-9.f) - (31.f/3.f-10.f)); + + if (b32) + FAILURE ("fold: b32 should be zero") + if (d32) + FAILURE ("fold: d32 should be zero") +} + +void +fold64 (void) +{ + double b64 = (double)((28./3.-9.) - (31./3.-10.)); + _Decimal64 d64 = (double)((28./3.-9.) - (31./3.-10.)); + + if (b64) + FAILURE ("fold: b64 should be zero") + if (d64) + FAILURE ("fold: d64 should be zero") +} + +void +fold128 (void) +{ + long double b128 = (long double)((28./3.-9.) - (31./3.-10.)); + _Decimal128 d128 = (long double)((28./3.-9.) - (31./3.-10.)); + + if (b128) + FAILURE ("fold: b128 should be zero") + if (d128) + FAILURE ("fold: d128 should be zero") +} + +int +main () +{ + runtime32 (); + runtime64 (); + runtime128 (); + fold32 (); + fold64 (); + fold128 (); + + if (failures != 0) + abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/graphite/scop-19.c b/gcc/testsuite/gcc.dg/graphite/scop-19.c new file mode 100644 index 00000000000..3ad49971bc0 --- /dev/null +++ b/gcc/testsuite/gcc.dg/graphite/scop-19.c @@ -0,0 +1,35 @@ +/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */ +typedef unsigned int __uint32_t; +typedef __uint32_t __size_t; +typedef __size_t size_t; +struct demangle_component +{ + union + { + } u; +}; +enum d_builtin_type_print +{ + D_PRINT_VOID +}; +struct d_growable_string +{ + size_t alc; +}; +d_growable_string_resize (struct d_growable_string *dgs, size_t need) +{ + size_t newalc; + newalc = dgs->alc > 0 ? dgs->alc : 2; + while (newalc < need) + newalc <<= 1; +} +d_growable_string_append_buffer (struct d_growable_string *dgs, + const char *s, size_t l) +{ + size_t need; + if (need > dgs->alc) + d_growable_string_resize (dgs, need); +} +/* { dg-final { scan-tree-dump-times "number of SCoPs: 0" 2 "graphite"} } */ +/* { dg-final { cleanup-tree-dump "graphite" } } */ + diff --git a/gcc/testsuite/gcc.dg/init-bad-6.c b/gcc/testsuite/gcc.dg/init-bad-6.c new file mode 100644 index 00000000000..8235f5d9676 --- /dev/null +++ b/gcc/testsuite/gcc.dg/init-bad-6.c @@ -0,0 +1,12 @@ +/* ICE arising from bug computing composite type of zero-length array + types: PR 35433. */ +/* { dg-do compile } */ +/* { dg-options "" } */ + +typedef int* X; +typedef int* Y; + +X (*p)[][0]; +Y (*q)[][0]; + +typeof(*(0 ? p : q)) x = { 0 }; /* { dg-warning "excess elements in array initializer|near initialization" } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipacost-2.c b/gcc/testsuite/gcc.dg/ipa/ipacost-2.c index c2861baa369..46db85fde3e 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipacost-2.c +++ b/gcc/testsuite/gcc.dg/ipa/ipacost-2.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O3 -fipa-cp -fipa-cp-clone -fdump-ipa-cp -fno-early-inlining -fdump-tree-optimized" } */ +/* { dg-options "-O3 -fipa-cp -fipa-cp-clone -fdump-ipa-cp -fno-early-inlining -fdump-tree-optimized -fpie" { target { ! nonpic } } } */ int array[100]; diff --git a/gcc/testsuite/gcc.dg/nofixed-point-2.c b/gcc/testsuite/gcc.dg/nofixed-point-2.c new file mode 100644 index 00000000000..97bbf70225c --- /dev/null +++ b/gcc/testsuite/gcc.dg/nofixed-point-2.c @@ -0,0 +1,30 @@ +/* PR inline-asm/39059 */ +/* { dg-do compile { target {! fixed_point} } } */ +/* { dg-options "-std=gnu99" } */ + +void +f1 (void) +{ + asm ("" : : "r" (0r)); /* { dg-error "not supported" "reject fixed-point" } */ +} + +__typeof (0r) /* { dg-error "not supported" "reject fixed-point" } */ +b2 (void) +{ + return 0r; /* { dg-error "not supported" "reject fixed-point" } */ +} + +_Accum /* { dg-error "not supported" "reject fixed-point" } */ +f3 (void) +{ + return 0k; /* { dg-error "not supported" "reject fixed-point" } */ +} + +_Sat +f4 (void) /* { dg-error "not supported" "reject fixed-point" } */ +{ + return 0k; /* { dg-error "not supported" "reject fixed-point" } */ +} + +/* { dg-warning "defaults to" "" { target *-*-* } 13 } */ +/* { dg-error "is used without" "" { target *-*-* } 24 } */ diff --git a/gcc/testsuite/gcc.dg/tls/diag-6.c b/gcc/testsuite/gcc.dg/tls/diag-6.c new file mode 100644 index 00000000000..71b0b95244e --- /dev/null +++ b/gcc/testsuite/gcc.dg/tls/diag-6.c @@ -0,0 +1,8 @@ +/* Invalid tls_model attributes. PR 35435. */ +/* { dg-require-effective-target tls } */ + +int v __attribute__((tls_model("initial-exec"))); /* { dg-warning "attribute ignored" } */ +typedef int X __attribute__((tls_model("initial-exec"))); /* { dg-warning "attribute ignored" } */ +void f(int x __attribute__((tls_model("initial-exec")))); /* { dg-warning "attribute ignored" } */ +__thread int a __attribute__((tls_model(1))); /* { dg-error "tls_model argument not a string" } */ +__thread int b __attribute__((tls_model("unknown"))); /* { dg-error "tls_model argument must be one of" } */ diff --git a/gcc/testsuite/gcc.dg/vla-11.c b/gcc/testsuite/gcc.dg/vla-11.c new file mode 100644 index 00000000000..8948e6b77a3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vla-11.c @@ -0,0 +1,13 @@ +/* Further tests of [*] being rejected other that in declarations, as + per the consensus in DR#341 that the second example there should be + invalid (but warnings because the final wording appears to allow + these cases). */ +/* Origin: Joseph Myers <joseph@codesourcery.com> */ +/* { dg-do compile } */ +/* { dg-options "-std=c99 -pedantic-errors" } */ + +void foo11a(int x[sizeof(int *(*)[*])]); /* { dg-warning "not in a declaration" } */ +void foo11b(__SIZE_TYPE__ x, int y[(__SIZE_TYPE__)(int (*)[*])x]); /* { dg-warning "not in a declaration" } */ +void foo11c(struct s { int (*x)[*]; } *y); /* { dg-error "a member of a structure or union cannot have a variably modified type" "variably modified" } */ +/* { dg-warning "'struct s' declared inside parameter list" "struct decl" { target *-*-* } 11 } */ +/* { dg-warning "its scope is only this definition or declaration" "struct scope" { target *-*-* } 11 } */ diff --git a/gcc/testsuite/gcc.dg/vla-6.c b/gcc/testsuite/gcc.dg/vla-6.c index b7bdb31eeca..a7f5f051561 100644 --- a/gcc/testsuite/gcc.dg/vla-6.c +++ b/gcc/testsuite/gcc.dg/vla-6.c @@ -7,9 +7,12 @@ int foo3(int i)[*]; /* { dg-error "not allowed in other than function prototype void foo4(int o[*][4]) { } /* { dg-error "not allowed in other than function prototype scope" } */ void foo5(int o[4][*]) { } /* { dg-error "not allowed in other than function prototype scope" } */ -/* [*] can't be used in a type that's not a declaration */ -void foo11(int x[sizeof(int (*)[*])]); /* { dg-error "not allowed in other than a declaration" } */ -void foo12(int [*]); /* { dg-error "not allowed in other than a declaration" } */ +/* [*] can't be used in a type that's not a declaration (maybe, the + final wording for DR#341 would allow it although the first + discussed intent would not). */ +void foo11(int x[sizeof(int (*)[*])]); /* { dg-warning "not in a declaration" } */ +/* This case is allowed per DR#341. */ +void foo12(int [*]); extern int n; int B[100]; diff --git a/gcc/testsuite/gcc.target/i386/avx-vpclmulqdq.c b/gcc/testsuite/gcc.target/i386/avx-vpclmulqdq.c new file mode 100644 index 00000000000..9b015abcd48 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx-vpclmulqdq.c @@ -0,0 +1,8 @@ +/* { dg-do run } */ +/* { dg-require-effective-target vpclmul } */ +/* { dg-options "-O2 -mpclmul -mavx" } */ + +#define CHECK_H "pclmul-avx-check.h" +#define TEST pclmul_avx_test + +#include "pclmulqdq.c" diff --git a/gcc/testsuite/gcc.target/i386/i386.exp b/gcc/testsuite/gcc.target/i386/i386.exp index 612bec48e79..fa470e11a66 100644 --- a/gcc/testsuite/gcc.target/i386/i386.exp +++ b/gcc/testsuite/gcc.target/i386/i386.exp @@ -92,6 +92,21 @@ proc check_effective_target_pclmul { } { } "-O2 -mpclmul" ] } +# Return 1 if vpclmul instructions can be compiled. +proc check_effective_target_vpclmul { } { + return [check_no_compiler_messages vpclmul object { + typedef long long __m128i __attribute__ ((__vector_size__ (16))); + typedef long long __v2di __attribute__ ((__vector_size__ (16))); + + __m128i pclmulqdq_test (__m128i __X, __m128i __Y) + { + return (__m128i) __builtin_ia32_pclmulqdq128 ((__v2di)__X, + (__v2di)__Y, + 1); + } + } "-O2 -mpclmul -mavx" ] +} + # Return 1 if sse4a instructions can be compiled. proc check_effective_target_sse4a { } { return [check_no_compiler_messages sse4a object { diff --git a/gcc/testsuite/gcc.target/i386/pclmul-avx-check.h b/gcc/testsuite/gcc.target/i386/pclmul-avx-check.h new file mode 100644 index 00000000000..de633336157 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pclmul-avx-check.h @@ -0,0 +1,31 @@ +#ifdef DEBUG +#include <stdio.h> +#endif +#include <stdlib.h> +#include "cpuid.h" + +static void pclmul_avx_test (void); + +int +main () +{ + unsigned int eax, ebx, ecx, edx; + + if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx)) + return 0; + + /* Run PCLMUL + AVX test only if host has PCLMUL + AVX support. */ + if ((ecx & (bit_AVX | bit_PCLMUL)) == (bit_AVX | bit_PCLMUL)) + { + pclmul_avx_test (); +#ifdef DEBUG + printf ("PASSED\n"); +#endif + } +#ifdef DEBUG + else + printf ("SKIPPED\n"); +#endif + + return 0; +} diff --git a/gcc/testsuite/gcc.target/i386/pclmulqdq.c b/gcc/testsuite/gcc.target/i386/pclmulqdq.c index d4ab8493e31..1c1d2aabeb6 100644 --- a/gcc/testsuite/gcc.target/i386/pclmulqdq.c +++ b/gcc/testsuite/gcc.target/i386/pclmulqdq.c @@ -2,11 +2,19 @@ /* { dg-require-effective-target pclmul } */ /* { dg-options "-O2 -mpclmul" } */ +#ifndef CHECK_H +#define CHECK_H "pclmul-check.h" +#endif + +#ifndef TEST +#define TEST pclmul_test +#endif + +#include CHECK_H + #include <wmmintrin.h> #include <string.h> -#include "pclmul-check.h" - extern void abort (void); #define NUM 1024 @@ -54,7 +62,7 @@ init_data (__m128i *ls1, __m128i *ls2, __m128i *le_00, __m128i *le_01, } static void -pclmul_test (void) +TEST (void) { int i; diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 3e8940e5166..03f7a4ade65 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -1657,15 +1657,17 @@ do_ds_constraint (constraint_t c, bitmap delta) t = find (v->id); tmp = get_varinfo (t)->solution; - if (set_union_with_increment (tmp, sol, 0)) + if (add_graph_edge (graph, t, rhs)) { - get_varinfo (t)->solution = tmp; - if (t == rhs) - sol = get_varinfo (rhs)->solution; - if (!TEST_BIT (changed, t)) + if (bitmap_ior_into (get_varinfo (t)->solution, sol)) { - SET_BIT (changed, t); - changed_count++; + if (t == rhs) + sol = get_varinfo (rhs)->solution; + if (!TEST_BIT (changed, t)) + { + SET_BIT (changed, t); + changed_count++; + } } } } |