diff options
405 files changed, 12234 insertions, 2935 deletions
diff --git a/ChangeLog.MELT b/ChangeLog.MELT index 977e8f15520..b2a7919ca5d 100644 --- a/ChangeLog.MELT +++ b/ChangeLog.MELT @@ -1,4 +1,8 @@ +2011-12-12 Basile Starynkevitch <basile@starynkevitch.net> + + MELT branch merged with trunk rev 182221 using svnmerge + 2011-12-08 Basile Starynkevitch <basile@starynkevitch.net> {{MELT plugin 0.9.2.b}} diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 486aa0f141d..9e0e3f0633f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,298 @@ +2011-12-12 Iain Sandoe <iains@gcc.gnu.org> + + * config/darwin-sections.def (zobj_const_data_section): Fix over- + length section name. + +2011-12-11 Richard Henderson <rth@redhat.com> + + * config/rs6000/rs6000.c (rs6000_expand_interleave): Use + BYTES_BIG_ENDIAN, not TARGET_BIG_ENDIAN. + +2011-12-11 Jakub Jelinek <jakub@redhat.com> + + PR tree-optimization/51485 + * tree-vect-data-refs.c (vect_analyze_data_refs): Give up on + DRs in call stmts. + +2011-12-11 Patrick Marlier <patrick.marlier@gmail.com> + + * trans-mem.c (ipa_tm_transform_calls_redirect): Do not remove + edge. + +2011-12-10 Richard Henderson <rth@redhat.com> + + * config/rs6000/altivec.md (altivec_vmrghb): Rewrite pattern as + vec_select + vec_concat. + (altivec_vmrghh, altivec_vmrghw, altivec_vmrghsf, altivec_vmrglb, + altivec_vmrglh, altivec_vmrglw, altivec_vmrglsf): Likewise. + (vec_perm_constv16qi): New. + (vec_extract_evenv4si, vec_extract_evenv4sf, vpkuhum_nomode, + vpkuwum_nomode, vec_extract_oddv8hi, vec_extract_oddv16qi, + vec_interleave_high<VI>, vec_interleave_low<VI>): Remove. + * config/rs6000/paired.md (paired_merge00): Rewrite pattern as + vec_select + vec_concat. + (paired_merge10, paired_merge01, paired_merge11): Likewise. + (vec_perm_constv2sf): New. + (vec_interleave_highv2sf, vec_interleave_lowv2sf, + vec_extract_evenv2sf, vec_extract_oddv2sf): Remove. + * config/rs6000/spe.md (spe_evmergehi): Rewrite pattern as + vec_select + vec_concat. + (spe_evmergehilo, spe_evmergelo, spe_evmergelohi): New. + (vec_perm_constv2si): New. + * config/rs6000/vector.md (vec_interleave_highv4sf, + vec_interleave_lowv4sf, vec_interleave_high<VEC_64>, + vec_interleave_low<VEC_64>): Remove. + * config/rs6000/vsx.md (VS_double): New mode attribute. + (UNSPEC_VSX_XXPERMDI): Remove. + (vsx_xxpermdi_<VSX_L>_1): Rewrite pattern as vec_select + vec_concat. + (vsx_xxmrghw_<VSX_W>, vsx_xxmrglw_<VSX_W>): Likewise. + (vsx_xxpermdi_<VSX_L>): Change to expander. + (vec_perm_const<VSX_D>): New. + (vsx_mergel_<VSX_D>, vsx_mergeh_<VSX_D>): New. + * config/rs6000/predicates.md (const_0_to_1_operand): New. + (const_2_to_3_operand): New. + * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): New. + (altivec_expand_vec_perm_const): New. + (rs6000_expand_vec_perm_const_1, rs6000_expand_vec_perm_const): New. + (rs6000_vectorize_vec_perm_const_ok): New. + (rs6000_do_expand_vec_perm): New. + (rs6000_expand_extract_even, rs6000_expand_interleave): New. + * config/rs6000/rs6000-builtin.def (VEC_MERGE*): Update rtx codes. + * config/rs6000/rs6000-modes.def: Add double-wide vector modes. + * config/rs6000/rs6000-protos.h: Update. + +2011-12-10 Richard Henderson <rth@redhat.com> + + * expr.c (expand_expr_real_2) [VEC_PERM_EXPR]: Avoid passing a + CONST_INT to expand_vec_perm as the selector. + * optabs.c (expand_vec_perm): Assert the selector is of a proper mode. + +2011-12-10 Richard Henderson <rth@redhat.com> + + * genmodes.c (struct mode_data): Remove wider_2x member. + (blank_mode): Adjust initializer. + (calc_wider_mode): Use XALLOCAVEC. + (emit_move_wider): Select double-width same-element vectors for + 2xwider vectors. + * machmode.h (GET_MODE_2XWIDER_MODE): Update documentation. + * config/i386/i386.c (doublesize_vector_mode): Remove. + (expand_vselect_vconcat): Use GET_MODE_2XWIDER_MODE instead. + +2011-12-10 Joern Rennecke <joern.rennecke@embecosm.com> + + * config/epiphany/epiphany.h (USE_LOAD_POST_INCREMENT): Define. + (USE_LOAD_POST_DECREMENT, USE_STORE_POST_INCREMENT): Likewise. + (USE_STORE_POST_DECREMENT): Likewise. + + * config/epiphany/epiphany.h (EPIPHANY_RETURN_REGNO): New macro, + broken out of .. + (INCOMING_RETURN_ADDR_RTX) .. this. Use EPIPHANY_RETURN_REGNO. + (DWARF_FRAME_RETURN_COLUMN): New macro. + + * config/epiphany/epiphany-protos.h (epiphany_start_function): Declare. + * config/epiphany/epiphany.c (epiphany_handle_interrupt_attribute): + Split "timer" value into "timer0" and "timer1". + Handle page_miss, message and wand. Don't handle static_flag. + Adjust warning text. + (epiphany_start_function): New function. + (epiphany_compute_function_type): Split "timer" value into "timer0" + and "timer1". Handle page_miss, message and wand. + Don't handle static_flag. + (epiphany_expand_epilogue): Don't use frame_insn for status / iret + restore. + * config/epiphany/epiphany.h: ASM_DECLARE_FUNCTION_NAME: Define. + (enum epiphany_function_type): + Split EPIPHANY_FUNCTION_TIMER value into EPIPHANY_FUNCTION_TIMER0 + and EPIPHANY_FUNCTION_TIMER1. + Remove EPIPHANY_FUNCTION_ILINK1 and EPIPHANY_FUNCTION_ILINK2 values. + Add EPIPHANY_FUNCTION_PAGE_MISS and EPIPHANY_FUNCTION_MESSAGE values. + Rename EPIPHANY_FUNCTION_STATIC_FLAG to EPIPHANY_FUNCTION_WAND. + +2011-12-10 Nathan Sidwell <nathan@acm.org> + + PR gcov-profile/51449 + * coverage.c (coverage_end_function): Always process the coverage + variables. + +2011-12-09 Aldy Hernandez <aldyh@redhat.com> + + PR/51291 + * tree.c (build_common_builtin_nodes): Do not use TM_PURE + attribute unless language has support for TM. + * config/i386/i386.c (ix86_init_tm_builtins): Exit gracefully in + the absence of TM builtins. + +2011-12-09 Eric Botcazou <ebotcazou@adacore.com> + + * gimple-fold.c (gimple_fold_stmt_to_constant_1) <GIMPLE_UNARY_RHS>: + Also check the TYPE_MODE to recognize useless pointer conversions. + +2011-12-09 Jakub Jelinek <jakub@redhat.com> + + PR tree-optimization/51117 + * tree-eh.c (optimize_clobbers): Don't remove just one + clobber, but all consecutive clobbers before RESX. + Use gimple_clobber_p predicate. + +2011-12-09 Michael Meissner <meissner@the-meissners.org> + + * config/rs6000/rs6000.c (altivec_expand_builtin): Call + expand_call to return a valid funciton instead of return + cosnt0_rtx/NULL_RTX if there was an error with the builtin. + (altivec_expand_ld_builtin): Ditto. + (rs6000_inner_target_options): If VSX is selected as a target + attribute or pragma, enable ALTIVEC also. + (rs6000_pragma_target_parse): Call rs6000_option_override_internal + to do all of the standard processing when switching options, + including redefining appropriate macros. + + PR rtl-optimization/51469 + * varasm.c (default_binds_local_p_1): If the symbol is a gnu + indirect function, mark the symbol as non-local. + +2011-12-09 H.J. Lu <hongjiu.lu@intel.com> + + PR bootstrap/51479 + * Makefile.in (errors.o): Restored. + +2011-12-09 Richard Guenther <rguenther@suse.de> + + PR lto/48042 + * tree.c (free_lang_data_in_decl): Remove freeing conditional + on debuginfo level. + +2011-12-09 Joern Rennecke <joern.rennecke@embecosm.com> + + PR middle-end/40154 + * emit-rtl.c (set_dst_reg_note): New function. + * rtl.h (set_dst_reg_note): Declare. + * optabs.c (expand_binop, expand_absneg_bit): Use set_dst_reg_note. + (emit_libcall_block, expand_fix): Likewise. + * function.c (assign_parm_setup_reg, expand_function_start): Likewise. + * expmed.c (expand_mult_const, expand_divmod): Likewise. + * reload1.c (gen_reload): Likewise. + + * dse.c (get_stored_val, get_call_args): Use gen_int_mode. + * expmed.c (expand_divmod): Likewise. + * combine.c (simplify_if_then_else): Likewise. + +2011-12-09 Kai Tietz <ktietz@redhat.com> + + * ira-color.c (print_hard_regs_subforest): Use + HOST_WIDEST_INT_PRINT_DEC instead of %lld. + (allocno_hard_regs): Change type of cost member + to HOST_WIDEST_INT. + (add_allocno_hard_regs): Change type of argument cost + to HOST_WIDEST_INT. + * ira-conflict.c (build_conflict_bit_table): Replace use + of long-long by HOST_WIDEST_INT. + +2011-12-09 Georg-Johann Lay <avr@gjlay.de> + + PR target/51425 + * config/avr/avr.md (config/avr/avr.md, *sbix_branch_tmp): Use + zero_extract:QIHI instead of zero_extract:HI. + +2011-12-09 Jakub Jelinek <jakub@redhat.com> + Andrew Pinski <apinski@cavium.com> + + PR tree-optimization/51117 + * tree-eh.c (optimize_clobbers): New function. + (execute_lower_eh_dispatch): Call it. + +2011-12-09 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/51482 + * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): + Make sure to only create REAL_TYPE and INTEGER_TYPE component + vectors. + +2011-12-09 Kai Tietz <ktietz@redhat.com> + + * implicit-zee.c (num_realized): Change type to long. + (num_ze_opportunities): Likewise. + +2011-12-08 Andrew Pinski <apinski@cavium.com> + + * config/mips/mips-cpus.def (octeon+): New CPU. + * config/mips/mips-tables.opt: Regenerate. + * config/mips/mips.h (MIPS_CPP_SET_PROCESSOR): Emit '+' as 'P'. + +2011-12-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com> + + PR middle-end/39976 + * tree-ssa-dom.c (enum expr_kind): Add EXPR_PHI. + (struct hashable_expr): Add struct phi field. + (initialize_hash_element): Handle phis; change to use XCNEWVEC. + (hashable_expr_equal_p): Handle phis. + (iterative_hash_hashable_expr): Likewise. + (print_expr_hash_elt): Likewise. + (free_expr_hash_elt): Likewise. + (dom_opt_enter_block): Create equivalences from redundant phis. + (eliminate_redundant_computations): Handle redundant phis. + (lookup_avail_expr): Handle phis. + +2011-12-08 Jakub Jelinek <jakub@redhat.com> + + PR tree-optimization/51466 + * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Also copy + TREE_SIDE_EFFECTS. + +2011-12-08 Richard Guenther <rguenther@suse.de> + + * tree-ssa-operands.c (add_stmt_operand): Do not mark stmts + volatile when processing operands of an ADDR_EXPR. + (get_indirect_ref_operands): Likewise. + (get_tmr_operands): Likewise. + (get_expr_operands): Likewise. + +2011-12-08 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> + + PR target/50395 + * config/s390/s390.c (s390_mainpool_finish): Emit the jump over + the literal pool as jump insn. + +2011-12-08 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/49772 + * tree-inline.c (optimize_inline_calls): Remove bail out + on errors. + +2011-12-08 Richard Guenther <rguenther@suse.de> + + PR lto/50747 + * lto-streamer-out.c (produce_symtab): Remove asserts. + +2011-12-08 Richard Guenther <rguenther@suse.de> + + PR lto/49945 + * lto-streamer-out.c (tree_is_indexable): Localize variably + modified types and their FIELD_DECLs. + +2011-12-08 Eric Botcazou <ebotcazou@adacore.com> + + PR tree-optimization/51315 + * tree.h (get_object_or_type_alignment): Declare. + * expr.c (get_object_or_type_alignment): Move to... + * builtins.c (get_object_or_type_alignment): ...here. Add assertion. + * tree-sra.c (tree_non_mode_aligned_mem_p): Rename to... + (tree_non_aligned_mem_p): ...this. Add ALIGN parameter. Look into + MEM_REFs and use get_object_or_type_alignment for them. + (build_accesses_from_assign): Adjust for above change. + (access_precludes_ipa_sra_p): Likewise. + +2011-12-08 Richard Guenther <rguenther@suse.de> + + PR lto/48437 + * lto-streamer-out.c (tree_is_indexable): Exclude block-local + extern declarations. + +2011-12-07 Andrew Pinski <apinski@cavium.com> + + PR middle-end/45416 + * expr.c (do_store_flag): Rewrite code that looks for BIT_AND_EXPR for + SSA-expand. + 2011-12-07 Richard Guenther <rguenther@suse.de> PR tree-optimization/50823 diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 7386653f34f..312898706e9 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111207 +20111212 diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 45e4ce6f7ce..bbd70ac1498 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -3505,6 +3505,7 @@ params.o : params.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(COMMON_TARGET_H) \ pointer-set.o: pointer-set.c pointer-set.h $(CONFIG_H) $(SYSTEM_H) hooks.o: hooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(HOOKS_H) pretty-print.o: $(CONFIG_H) $(SYSTEM_H) coretypes.h intl.h $(PRETTY_PRINT_H) +errors.o : errors.c $(CONFIG_H) $(SYSTEM_H) errors.h dbgcnt.o: dbgcnt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DIAGNOSTIC_CORE_H) $(DBGCNT_H) \ $(TM_H) $(RTL_H) output.h lower-subreg.o : lower-subreg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 94875aba18a..6adbc2ab48b 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,23 @@ +2011-12-11 Eric Botcazou <ebotcazou@adacore.com> + + * gcc-interface/utils2.c (gnat_build_constructor): Test the TREE_STATIC + flag of elements to compute that of the constructor. + +2011-12-11 Eric Botcazou <ebotcazou@adacore.com> + + * gcc-interface/decl.c (gnat_to_gnu_param): Set the restrict qualifier + on references built for parameters which aren't specifically by-ref. + +2011-12-11 Eric Botcazou <ebotcazou@adacore.com> + + * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If there is an + alignment set on a renaming, assert that the renamed object is aligned + enough as to make it possible to honor it. + +2011-12-11 Eric Botcazou <ebotcazou@adacore.com> + + * gcc-interface/trans.c (gigi): Initialize the linemap earlier. + 2011-12-06 Dave Korn <dave.korn.cygwin@gmail.com> * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS [windows targets]): diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index 12971a63038..c3774f2a6ba 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -1008,6 +1008,17 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) saved = true; annotate_object (gnat_entity, gnu_type, NULL_TREE, false, false); + /* This assertion will fail if the renamed object + isn't aligned enough as to make it possible to + honor the alignment set on the renaming. */ + if (align) + { + unsigned int renamed_align + = DECL_P (gnu_decl) + ? DECL_ALIGN (gnu_decl) + : TYPE_ALIGN (TREE_TYPE (gnu_decl)); + gcc_assert (renamed_align >= align); + } break; } @@ -5507,7 +5518,15 @@ gnat_to_gnu_param (Entity_Id gnat_param, Mechanism_Type mech, || (!foreign && default_pass_by_ref (gnu_param_type))))) { + /* We take advantage of 6.2(12) by considering that references built for + parameters whose type isn't by-ref and for which the mechanism hasn't + been forced to by-ref are restrict-qualified in the C sense. */ + bool restrict_p + = !TREE_ADDRESSABLE (gnu_param_type) && mech != By_Reference; gnu_param_type = build_reference_type (gnu_param_type); + if (restrict_p) + gnu_param_type + = build_qualified_type (gnu_param_type, TYPE_QUAL_RESTRICT); by_ref = true; /* In some ABIs, e.g. SPARC 32-bit, fat pointer types are themselves diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 42b4e9154c3..da1a8f1f4ee 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -297,13 +297,6 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name ATTRIBUTE_UNUSED, type_annotate_only = (gigi_operating_mode == 1); - gcc_assert (Nkind (gnat_root) == N_Compilation_Unit); - - /* Declare the name of the compilation unit as the first global - name in order to make the middle-end fully deterministic. */ - t = create_concat_name (Defining_Entity (Unit (gnat_root)), NULL); - first_global_object_name = ggc_strdup (IDENTIFIER_POINTER (t)); - for (i = 0; i < number_file; i++) { /* Use the identifier table to make a permanent copy of the filename as @@ -328,6 +321,13 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name ATTRIBUTE_UNUSED, linemap_add (line_table, LC_LEAVE, 0, NULL, 0); } + gcc_assert (Nkind (gnat_root) == N_Compilation_Unit); + + /* Declare the name of the compilation unit as the first global + name in order to make the middle-end fully deterministic. */ + t = create_concat_name (Defining_Entity (Unit (gnat_root)), NULL); + first_global_object_name = ggc_strdup (IDENTIFIER_POINTER (t)); + /* Initialize ourselves. */ init_code_table (); init_gnat_to_gnu (); diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c index f9e48b79fe5..93663b48982 100644 --- a/gcc/ada/gcc-interface/utils2.c +++ b/gcc/ada/gcc-interface/utils2.c @@ -1817,7 +1817,7 @@ gnat_build_constructor (tree type, VEC(constructor_elt,gc) *v) FOR_EACH_CONSTRUCTOR_ELT (v, n_elmts, obj, val) { /* The predicate must be in keeping with output_constructor. */ - if (!TREE_CONSTANT (val) + if ((!TREE_CONSTANT (val) && !TREE_STATIC (val)) || (TREE_CODE (type) == RECORD_TYPE && CONSTRUCTOR_BITFIELD_P (obj) && !initializer_constant_valid_for_bitfield_p (val)) diff --git a/gcc/builtins.c b/gcc/builtins.c index 019da159dd4..b00749848a6 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -452,6 +452,31 @@ get_object_alignment (tree exp) return align; } +/* Return the alignment of object EXP, also considering its type when we do + not know of explicit misalignment. Only handle MEM_REF and TARGET_MEM_REF. + + ??? Note that, in the general case, the type of an expression is not kept + consistent with misalignment information by the front-end, for example when + taking the address of a member of a packed structure. However, in most of + the cases, expressions have the alignment of their type so we optimistically + fall back to this alignment when we cannot compute a misalignment. */ + +unsigned int +get_object_or_type_alignment (tree exp) +{ + unsigned HOST_WIDE_INT misalign; + unsigned int align = get_object_alignment_1 (exp, &misalign); + + gcc_assert (TREE_CODE (exp) == MEM_REF || TREE_CODE (exp) == TARGET_MEM_REF); + + if (misalign != 0) + align = (misalign & -misalign); + else + align = MAX (TYPE_ALIGN (TREE_TYPE (exp)), align); + + return align; +} + /* Return the alignment in bits of EXP, a pointer valued expression. The alignment returned is, by default, the alignment of the thing that EXP points to. If it is not a POINTER_TYPE, 0 is returned. diff --git a/gcc/combine.c b/gcc/combine.c index 1714c749e16..105e778edd9 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -6010,7 +6010,7 @@ simplify_if_then_else (rtx x) && exact_log2 (nzb = nonzero_bits (from, GET_MODE (from))) >= 0) { false_code = EQ; - false_val = GEN_INT (trunc_int_for_mode (nzb, GET_MODE (from))); + false_val = gen_int_mode (nzb, GET_MODE (from)); } else if (true_code == EQ && true_val == const0_rtx && (num_sign_bit_copies (from, GET_MODE (from)) diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md index 1c79894f184..940a46fe752 100644 --- a/gcc/config/avr/avr.md +++ b/gcc/config/avr/avr.md @@ -4699,7 +4699,7 @@ [(set (pc) (if_then_else (match_operator 0 "eqne_operator" - [(zero_extract:HI + [(zero_extract:QIHI (mem:QI (match_operand 1 "low_io_address_operand" "n")) (const_int 1) (match_operand 2 "const_int_operand" "n")) @@ -4746,7 +4746,7 @@ [(set (pc) (if_then_else (match_operator 0 "eqne_operator" - [(zero_extract:HI + [(zero_extract:QIHI (mem:QI (match_operand 1 "high_io_address_operand" "n")) (const_int 1) (match_operand 2 "const_int_operand" "n")) diff --git a/gcc/config/darwin-sections.def b/gcc/config/darwin-sections.def index 61b6f69b123..3bcb1c059c1 100644 --- a/gcc/config/darwin-sections.def +++ b/gcc/config/darwin-sections.def @@ -76,7 +76,7 @@ DEF_SECTION (const_data_coal_section, SECTION_NO_ANCHOR, ".section __DATA,__const_coal,coalesced", 0) /* Place to put zero-sized to avoid issues with section anchors. */ DEF_SECTION (zobj_const_data_section, SECTION_NO_ANCHOR, - ".section\t__DATA,__zobj_const_data", 0) + ".section\t__DATA,__zobj_cnst_data", 0) /* Strings and other literals. */ DEF_SECTION (cstring_section, SECTION_MERGE | SECTION_STRINGS, ".cstring", 0) diff --git a/gcc/config/epiphany/epiphany-protos.h b/gcc/config/epiphany/epiphany-protos.h index 334c5337f7c..2e787da8579 100644 --- a/gcc/config/epiphany/epiphany-protos.h +++ b/gcc/config/epiphany/epiphany-protos.h @@ -53,3 +53,4 @@ extern bool epiphany_optimize_mode_switching (int entity); extern bool epiphany_is_interrupt_p (tree); extern unsigned epiphany_special_round_type_align (tree, unsigned, unsigned); extern unsigned epiphany_adjust_field_align (tree, unsigned); +extern void epiphany_start_function (FILE *f, const char *name, tree decl); diff --git a/gcc/config/epiphany/epiphany.c b/gcc/config/epiphany/epiphany.c index a4652da87b8..a8fc034811b 100644 --- a/gcc/config/epiphany/epiphany.c +++ b/gcc/config/epiphany/epiphany.c @@ -435,14 +435,17 @@ epiphany_handle_interrupt_attribute (tree *node ATTRIBUTE_UNUSED, } else if (strcmp (TREE_STRING_POINTER (value), "reset") && strcmp (TREE_STRING_POINTER (value), "software_exception") - && strcmp (TREE_STRING_POINTER (value), "timer") + && strcmp (TREE_STRING_POINTER (value), "page_miss") + && strcmp (TREE_STRING_POINTER (value), "timer0") + && strcmp (TREE_STRING_POINTER (value), "timer1") + && strcmp (TREE_STRING_POINTER (value), "message") && strcmp (TREE_STRING_POINTER (value), "dma0") && strcmp (TREE_STRING_POINTER (value), "dma1") - && strcmp (TREE_STRING_POINTER (value), "static_flag") + && strcmp (TREE_STRING_POINTER (value), "wand") && strcmp (TREE_STRING_POINTER (value), "swi")) { warning (OPT_Wattributes, - "argument of %qE attribute is not \"reset\", \"software_exception\", \"timer\", \"dma0\", \"dma1\", \"static_flag\" or \"swi\"", + "argument of %qE attribute is not \"reset\", \"software_exception\", \"page_miss\", \"timer0\", \"timer1\", \"message\", \"dma0\", \"dma1\", \"wand\" or \"swi\"", name); *no_add_attrs = true; } @@ -892,14 +895,20 @@ epiphany_compute_function_type (tree decl) fn_type = EPIPHANY_FUNCTION_RESET; else if (!strcmp (TREE_STRING_POINTER (value), "software_exception")) fn_type = EPIPHANY_FUNCTION_SOFTWARE_EXCEPTION; - else if (!strcmp (TREE_STRING_POINTER (value), "timer")) - fn_type = EPIPHANY_FUNCTION_TIMER; + else if (!strcmp (TREE_STRING_POINTER (value), "page_miss")) + fn_type = EPIPHANY_FUNCTION_PAGE_MISS; + else if (!strcmp (TREE_STRING_POINTER (value), "timer0")) + fn_type = EPIPHANY_FUNCTION_TIMER0; + else if (!strcmp (TREE_STRING_POINTER (value), "timer1")) + fn_type = EPIPHANY_FUNCTION_TIMER1; + else if (!strcmp (TREE_STRING_POINTER (value), "message")) + fn_type = EPIPHANY_FUNCTION_MESSAGE; else if (!strcmp (TREE_STRING_POINTER (value), "dma0")) fn_type = EPIPHANY_FUNCTION_DMA0; else if (!strcmp (TREE_STRING_POINTER (value), "dma1")) fn_type = EPIPHANY_FUNCTION_DMA1; - else if (!strcmp (TREE_STRING_POINTER (value), "static_flag")) - fn_type = EPIPHANY_FUNCTION_STATIC_FLAG; + else if (!strcmp (TREE_STRING_POINTER (value), "wand")) + fn_type = EPIPHANY_FUNCTION_WAND; else if (!strcmp (TREE_STRING_POINTER (value), "swi")) fn_type = EPIPHANY_FUNCTION_SWI; else @@ -1812,14 +1821,14 @@ epiphany_expand_epilogue (int sibcall_p) } if (interrupt_p) { - frame_move_insn (gen_rtx_REG (word_mode, STATUS_REGNUM), - gen_rtx_REG (SImode, GPR_0)); - frame_move_insn (gen_rtx_REG (word_mode, IRET_REGNUM), - gen_rtx_REG (SImode, GPR_0+1)); + emit_move_insn (gen_rtx_REG (word_mode, STATUS_REGNUM), + gen_rtx_REG (SImode, GPR_0)); + emit_move_insn (gen_rtx_REG (word_mode, IRET_REGNUM), + gen_rtx_REG (SImode, GPR_0+1)); addr = plus_constant (stack_pointer_rtx, - (HOST_WIDE_INT) 2 * UNITS_PER_WORD); - frame_move_insn (gen_rtx_REG (DImode, GPR_0), - gen_frame_mem (DImode, addr)); + emit_move_insn (gen_rtx_REG (DImode, GPR_0), + gen_frame_mem (DImode, addr)); } addr = plus_constant (stack_pointer_rtx, epiphany_stack_offset - (HOST_WIDE_INT) UNITS_PER_WORD); @@ -2748,4 +2757,28 @@ epiphany_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED, } } +void +epiphany_start_function (FILE *file, const char *name, tree decl) +{ + tree attrs, int_attr; + + attrs = DECL_ATTRIBUTES (decl); + int_attr = lookup_attribute ("interrupt", attrs); + if (int_attr) + { + char buf[99]; + const char *fname; + + int_attr = TREE_VALUE (TREE_VALUE (int_attr)); + sprintf (buf, "ivt_entry_%.80s", TREE_STRING_POINTER (int_attr)); + switch_to_section (get_section (buf, SECTION_CODE, decl)); + fname = XSTR (XEXP (DECL_RTL (decl), 0), 0); + fputs ("\tb\t", file); + assemble_name (file, fname); + fputc ('\n', file); + switch_to_section (function_section (decl)); + } + ASM_OUTPUT_FUNCTION_LABEL (file, name, decl); +} + struct gcc_target targetm = TARGET_INITIALIZER; diff --git a/gcc/config/epiphany/epiphany.h b/gcc/config/epiphany/epiphany.h index 9d03ee909b8..f92e1973e36 100644 --- a/gcc/config/epiphany/epiphany.h +++ b/gcc/config/epiphany/epiphany.h @@ -565,13 +565,13 @@ typedef struct GTY (()) machine_function #define FRAME_ADDR_RTX(frame) \ ((frame) == hard_frame_pointer_rtx ? arg_pointer_rtx : NULL) +#define EPIPHANY_RETURN_REGNO \ + ((current_function_decl != NULL \ + && epiphany_is_interrupt_p (current_function_decl)) \ + ? IRET_REGNUM : GPR_LR) /* This is not only for dwarf unwind info, but also for the benefit of df-scan.c to tell it that LR is live at the function start. */ -#define INCOMING_RETURN_ADDR_RTX \ - gen_rtx_REG (Pmode, \ - (current_function_decl != NULL \ - && epiphany_is_interrupt_p (current_function_decl) \ - ? IRET_REGNUM : GPR_LR)) +#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, EPIPHANY_RETURN_REGNO) /* However, we haven't implemented the rest needed for dwarf2 unwind info. */ #define DWARF2_UNWIND_INFO 0 @@ -579,6 +579,8 @@ typedef struct GTY (()) machine_function #define RETURN_ADDR_RTX(count, frame) \ (count ? NULL_RTX \ : gen_rtx_UNSPEC (SImode, gen_rtvec (1, const0_rtx), UNSPEC_RETURN_ADDR)) + +#define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (EPIPHANY_RETURN_REGNO) /* Trampolines. An epiphany trampoline looks like this: @@ -602,6 +604,21 @@ typedef struct GTY (()) machine_function #define HAVE_POST_MODIFY_DISP TARGET_POST_MODIFY #define HAVE_POST_MODIFY_REG TARGET_POST_MODIFY +/* Currently, the only users of the USE_*CREMENT macros are + move_by_pieces / store_by_pieces_1 . We don't want them to use + POST_MODIFY modes, because we got ample addressing range for the + reg+offset addressing mode; besides, there are short index+offset loads, + but the only short post-modify load uses POST_MODIFY_REG. + Moreover, using auto-increment in move_by_pieces from structure copying + in the prologue causes confused debug output. + If another pass starts using these macros where the use of these + addressing modes would make more sense, we can try checking the + current pass. */ +#define USE_LOAD_POST_INCREMENT(MODE) 0 +#define USE_LOAD_POST_DECREMENT(MODE) 0 +#define USE_STORE_POST_INCREMENT(MODE) 0 +#define USE_STORE_POST_DECREMENT(MODE) 0 + /* Recognize any constant value that is a valid address. */ #define CONSTANT_ADDRESS_P(X) \ (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \ @@ -814,14 +831,12 @@ do { if ((LOG) != 0) fprintf (FILE, "\t.balign %d\n", 1 << (LOG)); } while (0) enum epiphany_function_type { EPIPHANY_FUNCTION_UNKNOWN, EPIPHANY_FUNCTION_NORMAL, - /* These are interrupt handlers. The name corresponds to the register - name that contains the return address. */ - EPIPHANY_FUNCTION_ILINK1, EPIPHANY_FUNCTION_ILINK2, /* These are interrupt handlers. The name corresponds to which type of interrupt handler we're dealing with. */ EPIPHANY_FUNCTION_RESET, EPIPHANY_FUNCTION_SOFTWARE_EXCEPTION, - EPIPHANY_FUNCTION_TIMER, EPIPHANY_FUNCTION_DMA0, - EPIPHANY_FUNCTION_DMA1, EPIPHANY_FUNCTION_STATIC_FLAG, + EPIPHANY_FUNCTION_PAGE_MISS, + EPIPHANY_FUNCTION_TIMER0, EPIPHANY_FUNCTION_TIMER1, EPIPHANY_FUNCTION_MESSAGE, + EPIPHANY_FUNCTION_DMA0, EPIPHANY_FUNCTION_DMA1, EPIPHANY_FUNCTION_WAND, EPIPHANY_FUNCTION_SWI }; @@ -878,4 +893,8 @@ extern struct rtl_opt_pass pass_resolve_sw_modes; implemented. */ #define TARGET_FUSED_MADD (flag_fp_contract_mode == FP_CONTRACT_FAST) +#undef ASM_DECLARE_FUNCTION_NAME +#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ + epiphany_start_function ((FILE), (NAME), (DECL)) + #endif /* !GCC_EPIPHANY_H */ diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 16387991705..216ab0b713c 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -27023,6 +27023,11 @@ ix86_init_tm_builtins (void) if (!flag_tm) return; + /* If there are no builtins defined, we must be compiling in a + language without trans-mem support. */ + if (!builtin_decl_explicit_p (BUILT_IN_TM_LOAD_1)) + return; + /* Use whatever attributes a normal TM load has. */ decl = builtin_decl_explicit (BUILT_IN_TM_LOAD_1); attrs_load = DECL_ATTRIBUTES (decl); @@ -35301,40 +35306,6 @@ ix86_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost, } } - -/* Return a vector mode with twice as many elements as VMODE. */ -/* ??? Consider moving this to a table generated by genmodes.c. */ - -static enum machine_mode -doublesize_vector_mode (enum machine_mode vmode) -{ - switch (vmode) - { - case V2SFmode: return V4SFmode; - case V1DImode: return V2DImode; - case V2SImode: return V4SImode; - case V4HImode: return V8HImode; - case V8QImode: return V16QImode; - - case V2DFmode: return V4DFmode; - case V4SFmode: return V8SFmode; - case V2DImode: return V4DImode; - case V4SImode: return V8SImode; - case V8HImode: return V16HImode; - case V16QImode: return V32QImode; - - case V4DFmode: return V8DFmode; - case V8SFmode: return V16SFmode; - case V4DImode: return V8DImode; - case V8SImode: return V16SImode; - case V16HImode: return V32HImode; - case V32QImode: return V64QImode; - - default: - gcc_unreachable (); - } -} - /* Construct (set target (vec_select op0 (parallel perm))) and return true if that's a valid instruction in the active ISA. */ @@ -35369,7 +35340,7 @@ expand_vselect_vconcat (rtx target, rtx op0, rtx op1, enum machine_mode v2mode; rtx x; - v2mode = doublesize_vector_mode (GET_MODE (op0)); + v2mode = GET_MODE_2XWIDER_MODE (GET_MODE (op0)); x = gen_rtx_VEC_CONCAT (v2mode, op0, op1); return expand_vselect (target, x, perm, nelt); } diff --git a/gcc/config/mips/mips-cpus.def b/gcc/config/mips/mips-cpus.def index 35fd5169167..39f46ab4bbe 100644 --- a/gcc/config/mips/mips-cpus.def +++ b/gcc/config/mips/mips-cpus.def @@ -145,3 +145,4 @@ MIPS_CPU ("loongson3a", PROCESSOR_LOONGSON_3A, 64, PTF_AVOID_BRANCHLIKELY) /* MIPS64 Release 2 processors. */ MIPS_CPU ("octeon", PROCESSOR_OCTEON, 65, PTF_AVOID_BRANCHLIKELY) +MIPS_CPU ("octeon+", PROCESSOR_OCTEON, 65, PTF_AVOID_BRANCHLIKELY) diff --git a/gcc/config/mips/mips-tables.opt b/gcc/config/mips/mips-tables.opt index 4e410f0f010..bd885261690 100644 --- a/gcc/config/mips/mips-tables.opt +++ b/gcc/config/mips/mips-tables.opt @@ -603,3 +603,6 @@ Enum(mips_arch_opt_value) String(loongson3a) Value(79) Canonical EnumValue Enum(mips_arch_opt_value) String(octeon) Value(80) Canonical +EnumValue +Enum(mips_arch_opt_value) String(octeon+) Value(81) Canonical + diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 236afbb4a34..ee40cfabc9a 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -329,7 +329,10 @@ struct mips_cpu_info { \ macro = concat ((PREFIX), "_", (INFO)->name, NULL); \ for (p = macro; *p != 0; p++) \ - *p = TOUPPER (*p); \ + if (*p == '+') \ + *p = 'P'; \ + else \ + *p = TOUPPER (*p); \ \ builtin_define (macro); \ builtin_define_with_value ((PREFIX), (INFO)->name, 1); \ diff --git a/gcc/config/rs6000/altivec.md b/gcc/config/rs6000/altivec.md index a3a8d77bc2e..54ca3694133 100644 --- a/gcc/config/rs6000/altivec.md +++ b/gcc/config/rs6000/altivec.md @@ -327,7 +327,7 @@ (define_insn "*altivec_addv4sf3" [(set (match_operand:V4SF 0 "register_operand" "=v") (plus:V4SF (match_operand:V4SF 1 "register_operand" "v") - (match_operand:V4SF 2 "register_operand" "v")))] + (match_operand:V4SF 2 "register_operand" "v")))] "VECTOR_UNIT_ALTIVEC_P (V4SFmode)" "vaddfp %0,%1,%2" [(set_attr "type" "vecfloat")]) @@ -764,202 +764,112 @@ (define_insn "altivec_vmrghb" [(set (match_operand:V16QI 0 "register_operand" "=v") - (vec_merge:V16QI (vec_select:V16QI (match_operand:V16QI 1 "register_operand" "v") - (parallel [(const_int 0) - (const_int 8) - (const_int 1) - (const_int 9) - (const_int 2) - (const_int 10) - (const_int 3) - (const_int 11) - (const_int 4) - (const_int 12) - (const_int 5) - (const_int 13) - (const_int 6) - (const_int 14) - (const_int 7) - (const_int 15)])) - (vec_select:V16QI (match_operand:V16QI 2 "register_operand" "v") - (parallel [(const_int 8) - (const_int 0) - (const_int 9) - (const_int 1) - (const_int 10) - (const_int 2) - (const_int 11) - (const_int 3) - (const_int 12) - (const_int 4) - (const_int 13) - (const_int 5) - (const_int 14) - (const_int 6) - (const_int 15) - (const_int 7)])) - (const_int 21845)))] + (vec_select:V16QI + (vec_concat:V32QI + (match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v")) + (parallel [(const_int 0) (const_int 16) + (const_int 1) (const_int 17) + (const_int 2) (const_int 18) + (const_int 3) (const_int 19) + (const_int 4) (const_int 20) + (const_int 5) (const_int 21) + (const_int 6) (const_int 22) + (const_int 7) (const_int 23)])))] "TARGET_ALTIVEC" "vmrghb %0,%1,%2" [(set_attr "type" "vecperm")]) (define_insn "altivec_vmrghh" [(set (match_operand:V8HI 0 "register_operand" "=v") - (vec_merge:V8HI (vec_select:V8HI (match_operand:V8HI 1 "register_operand" "v") - (parallel [(const_int 0) - (const_int 4) - (const_int 1) - (const_int 5) - (const_int 2) - (const_int 6) - (const_int 3) - (const_int 7)])) - (vec_select:V8HI (match_operand:V8HI 2 "register_operand" "v") - (parallel [(const_int 4) - (const_int 0) - (const_int 5) - (const_int 1) - (const_int 6) - (const_int 2) - (const_int 7) - (const_int 3)])) - (const_int 85)))] + (vec_select:V8HI + (vec_concat:V16HI + (match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")) + (parallel [(const_int 0) (const_int 8) + (const_int 1) (const_int 9) + (const_int 2) (const_int 10) + (const_int 3) (const_int 11)])))] "TARGET_ALTIVEC" "vmrghh %0,%1,%2" [(set_attr "type" "vecperm")]) (define_insn "altivec_vmrghw" [(set (match_operand:V4SI 0 "register_operand" "=v") - (vec_merge:V4SI (vec_select:V4SI (match_operand:V4SI 1 "register_operand" "v") - (parallel [(const_int 0) - (const_int 2) - (const_int 1) - (const_int 3)])) - (vec_select:V4SI (match_operand:V4SI 2 "register_operand" "v") - (parallel [(const_int 2) - (const_int 0) - (const_int 3) - (const_int 1)])) - (const_int 5)))] + (vec_select:V4SI + (vec_concat:V8SI + (match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")) + (parallel [(const_int 0) (const_int 4) + (const_int 1) (const_int 5)])))] "VECTOR_MEM_ALTIVEC_P (V4SImode)" "vmrghw %0,%1,%2" [(set_attr "type" "vecperm")]) (define_insn "*altivec_vmrghsf" [(set (match_operand:V4SF 0 "register_operand" "=v") - (vec_merge:V4SF (vec_select:V4SF (match_operand:V4SF 1 "register_operand" "v") - (parallel [(const_int 0) - (const_int 2) - (const_int 1) - (const_int 3)])) - (vec_select:V4SF (match_operand:V4SF 2 "register_operand" "v") - (parallel [(const_int 2) - (const_int 0) - (const_int 3) - (const_int 1)])) - (const_int 5)))] + (vec_select:V4SF + (vec_concat:V8SF + (match_operand:V4SF 1 "register_operand" "v") + (match_operand:V4SF 2 "register_operand" "v")) + (parallel [(const_int 0) (const_int 4) + (const_int 1) (const_int 5)])))] "VECTOR_MEM_ALTIVEC_P (V4SFmode)" "vmrghw %0,%1,%2" [(set_attr "type" "vecperm")]) (define_insn "altivec_vmrglb" [(set (match_operand:V16QI 0 "register_operand" "=v") - (vec_merge:V16QI (vec_select:V16QI (match_operand:V16QI 1 "register_operand" "v") - (parallel [(const_int 8) - (const_int 0) - (const_int 9) - (const_int 1) - (const_int 10) - (const_int 2) - (const_int 11) - (const_int 3) - (const_int 12) - (const_int 4) - (const_int 13) - (const_int 5) - (const_int 14) - (const_int 6) - (const_int 15) - (const_int 7)])) - (vec_select:V16QI (match_operand:V16QI 2 "register_operand" "v") - (parallel [(const_int 0) - (const_int 8) - (const_int 1) - (const_int 9) - (const_int 2) - (const_int 10) - (const_int 3) - (const_int 11) - (const_int 4) - (const_int 12) - (const_int 5) - (const_int 13) - (const_int 6) - (const_int 14) - (const_int 7) - (const_int 15)])) - (const_int 21845)))] + (vec_select:V16QI + (vec_concat:V32QI + (match_operand:V16QI 1 "register_operand" "v") + (match_operand:V16QI 2 "register_operand" "v")) + (parallel [(const_int 8) (const_int 24) + (const_int 9) (const_int 25) + (const_int 10) (const_int 26) + (const_int 11) (const_int 27) + (const_int 12) (const_int 28) + (const_int 13) (const_int 29) + (const_int 14) (const_int 30) + (const_int 15) (const_int 31)])))] "TARGET_ALTIVEC" "vmrglb %0,%1,%2" [(set_attr "type" "vecperm")]) (define_insn "altivec_vmrglh" [(set (match_operand:V8HI 0 "register_operand" "=v") - (vec_merge:V8HI (vec_select:V8HI (match_operand:V8HI 1 "register_operand" "v") - (parallel [(const_int 4) - (const_int 0) - (const_int 5) - (const_int 1) - (const_int 6) - (const_int 2) - (const_int 7) - (const_int 3)])) - (vec_select:V8HI (match_operand:V8HI 2 "register_operand" "v") - (parallel [(const_int 0) - (const_int 4) - (const_int 1) - (const_int 5) - (const_int 2) - (const_int 6) - (const_int 3) - (const_int 7)])) - (const_int 85)))] + (vec_select:V8HI + (vec_concat:V16HI + (match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")) + (parallel [(const_int 4) (const_int 12) + (const_int 5) (const_int 13) + (const_int 6) (const_int 14) + (const_int 7) (const_int 15)])))] "TARGET_ALTIVEC" "vmrglh %0,%1,%2" [(set_attr "type" "vecperm")]) (define_insn "altivec_vmrglw" [(set (match_operand:V4SI 0 "register_operand" "=v") - (vec_merge:V4SI - (vec_select:V4SI (match_operand:V4SI 1 "register_operand" "v") - (parallel [(const_int 2) - (const_int 0) - (const_int 3) - (const_int 1)])) - (vec_select:V4SI (match_operand:V4SI 2 "register_operand" "v") - (parallel [(const_int 0) - (const_int 2) - (const_int 1) - (const_int 3)])) - (const_int 5)))] + (vec_select:V4SI + (vec_concat:V8SI + (match_operand:V4SI 1 "register_operand" "v") + (match_operand:V4SI 2 "register_operand" "v")) + (parallel [(const_int 2) (const_int 6) + (const_int 3) (const_int 7)])))] "VECTOR_MEM_ALTIVEC_P (V4SImode)" "vmrglw %0,%1,%2" [(set_attr "type" "vecperm")]) (define_insn "*altivec_vmrglsf" [(set (match_operand:V4SF 0 "register_operand" "=v") - (vec_merge:V4SF - (vec_select:V4SF (match_operand:V4SF 1 "register_operand" "v") - (parallel [(const_int 2) - (const_int 0) - (const_int 3) - (const_int 1)])) - (vec_select:V4SF (match_operand:V4SF 2 "register_operand" "v") - (parallel [(const_int 0) - (const_int 2) - (const_int 1) - (const_int 3)])) - (const_int 5)))] + (vec_select:V4SF + (vec_concat:V8SF + (match_operand:V4SF 1 "register_operand" "v") + (match_operand:V4SF 2 "register_operand" "v")) + (parallel [(const_int 2) (const_int 6) + (const_int 3) (const_int 7)])))] "VECTOR_MEM_ALTIVEC_P (V4SFmode)" "vmrglw %0,%1,%2" [(set_attr "type" "vecperm")]) @@ -1332,7 +1242,7 @@ (define_insn "*altivec_vrfiz" [(set (match_operand:V4SF 0 "register_operand" "=v") - (fix:V4SF (match_operand:V4SF 1 "register_operand" "v")))] + (fix:V4SF (match_operand:V4SF 1 "register_operand" "v")))] "VECTOR_UNIT_ALTIVEC_P (V4SFmode)" "vrfiz %0,%1" [(set_attr "type" "vecfloat")]) @@ -1366,6 +1276,19 @@ "TARGET_ALTIVEC" "") +(define_expand "vec_perm_constv16qi" + [(match_operand:V16QI 0 "register_operand" "") + (match_operand:V16QI 1 "register_operand" "") + (match_operand:V16QI 2 "register_operand" "") + (match_operand:V16QI 3 "" "")] + "TARGET_ALTIVEC" +{ + if (altivec_expand_vec_perm_const (operands)) + DONE; + else + FAIL; +}) + (define_insn "altivec_vrfip" ; ceil [(set (match_operand:V4SF 0 "register_operand" "=v") (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "v")] @@ -1494,7 +1417,7 @@ (define_insn "altivec_vupkhsb" [(set (match_operand:V8HI 0 "register_operand" "=v") - (unspec:V8HI [(match_operand:V16QI 1 "register_operand" "v")] + (unspec:V8HI [(match_operand:V16QI 1 "register_operand" "v")] UNSPEC_VUPKHSB))] "TARGET_ALTIVEC" "vupkhsb %0,%1" @@ -1502,7 +1425,7 @@ (define_insn "altivec_vupkhpx" [(set (match_operand:V4SI 0 "register_operand" "=v") - (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v")] + (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v")] UNSPEC_VUPKHPX))] "TARGET_ALTIVEC" "vupkhpx %0,%1" @@ -1510,7 +1433,7 @@ (define_insn "altivec_vupkhsh" [(set (match_operand:V4SI 0 "register_operand" "=v") - (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v")] + (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v")] UNSPEC_VUPKHSH))] "TARGET_ALTIVEC" "vupkhsh %0,%1" @@ -1518,7 +1441,7 @@ (define_insn "altivec_vupklsb" [(set (match_operand:V8HI 0 "register_operand" "=v") - (unspec:V8HI [(match_operand:V16QI 1 "register_operand" "v")] + (unspec:V8HI [(match_operand:V16QI 1 "register_operand" "v")] UNSPEC_VUPKLSB))] "TARGET_ALTIVEC" "vupklsb %0,%1" @@ -1526,7 +1449,7 @@ (define_insn "altivec_vupklpx" [(set (match_operand:V4SI 0 "register_operand" "=v") - (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v")] + (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v")] UNSPEC_VUPKLPX))] "TARGET_ALTIVEC" "vupklpx %0,%1" @@ -1534,7 +1457,7 @@ (define_insn "altivec_vupklsh" [(set (match_operand:V4SI 0 "register_operand" "=v") - (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v")] + (unspec:V4SI [(match_operand:V8HI 1 "register_operand" "v")] UNSPEC_VUPKLSH))] "TARGET_ALTIVEC" "vupklsh %0,%1" @@ -2429,140 +2352,6 @@ "stvrxl %1,%y0" [(set_attr "type" "vecstore")]) -;; ??? This is still used directly by vector.md -(define_expand "vec_extract_evenv4si" - [(set (match_operand:V4SI 0 "register_operand" "") - (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "") - (match_operand:V4SI 2 "register_operand" "")] - UNSPEC_EXTEVEN_V4SI))] - "TARGET_ALTIVEC" - " -{ - rtx mask = gen_reg_rtx (V16QImode); - rtvec v = rtvec_alloc (16); - - RTVEC_ELT (v, 0) = gen_rtx_CONST_INT (QImode, 0); - RTVEC_ELT (v, 1) = gen_rtx_CONST_INT (QImode, 1); - RTVEC_ELT (v, 2) = gen_rtx_CONST_INT (QImode, 2); - RTVEC_ELT (v, 3) = gen_rtx_CONST_INT (QImode, 3); - RTVEC_ELT (v, 4) = gen_rtx_CONST_INT (QImode, 8); - RTVEC_ELT (v, 5) = gen_rtx_CONST_INT (QImode, 9); - RTVEC_ELT (v, 6) = gen_rtx_CONST_INT (QImode, 10); - RTVEC_ELT (v, 7) = gen_rtx_CONST_INT (QImode, 11); - RTVEC_ELT (v, 8) = gen_rtx_CONST_INT (QImode, 16); - RTVEC_ELT (v, 9) = gen_rtx_CONST_INT (QImode, 17); - RTVEC_ELT (v, 10) = gen_rtx_CONST_INT (QImode, 18); - RTVEC_ELT (v, 11) = gen_rtx_CONST_INT (QImode, 19); - RTVEC_ELT (v, 12) = gen_rtx_CONST_INT (QImode, 24); - RTVEC_ELT (v, 13) = gen_rtx_CONST_INT (QImode, 25); - RTVEC_ELT (v, 14) = gen_rtx_CONST_INT (QImode, 26); - RTVEC_ELT (v, 15) = gen_rtx_CONST_INT (QImode, 27); - emit_insn (gen_vec_initv16qi (mask, gen_rtx_PARALLEL (V16QImode, v))); - emit_insn (gen_altivec_vperm_v4si (operands[0], operands[1], operands[2], mask)); - - DONE; -}") - -;; ??? This is still used directly by vector.md -(define_expand "vec_extract_evenv4sf" - [(set (match_operand:V4SF 0 "register_operand" "") - (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "") - (match_operand:V4SF 2 "register_operand" "")] - UNSPEC_EXTEVEN_V4SF))] - "TARGET_ALTIVEC" - " -{ - rtx mask = gen_reg_rtx (V16QImode); - rtvec v = rtvec_alloc (16); - - RTVEC_ELT (v, 0) = gen_rtx_CONST_INT (QImode, 0); - RTVEC_ELT (v, 1) = gen_rtx_CONST_INT (QImode, 1); - RTVEC_ELT (v, 2) = gen_rtx_CONST_INT (QImode, 2); - RTVEC_ELT (v, 3) = gen_rtx_CONST_INT (QImode, 3); - RTVEC_ELT (v, 4) = gen_rtx_CONST_INT (QImode, 8); - RTVEC_ELT (v, 5) = gen_rtx_CONST_INT (QImode, 9); - RTVEC_ELT (v, 6) = gen_rtx_CONST_INT (QImode, 10); - RTVEC_ELT (v, 7) = gen_rtx_CONST_INT (QImode, 11); - RTVEC_ELT (v, 8) = gen_rtx_CONST_INT (QImode, 16); - RTVEC_ELT (v, 9) = gen_rtx_CONST_INT (QImode, 17); - RTVEC_ELT (v, 10) = gen_rtx_CONST_INT (QImode, 18); - RTVEC_ELT (v, 11) = gen_rtx_CONST_INT (QImode, 19); - RTVEC_ELT (v, 12) = gen_rtx_CONST_INT (QImode, 24); - RTVEC_ELT (v, 13) = gen_rtx_CONST_INT (QImode, 25); - RTVEC_ELT (v, 14) = gen_rtx_CONST_INT (QImode, 26); - RTVEC_ELT (v, 15) = gen_rtx_CONST_INT (QImode, 27); - emit_insn (gen_vec_initv16qi (mask, gen_rtx_PARALLEL (V16QImode, v))); - emit_insn (gen_altivec_vperm_v4sf (operands[0], operands[1], operands[2], mask)); - - DONE; -}") - -(define_insn "vpkuhum_nomode" - [(set (match_operand:V16QI 0 "register_operand" "=v") - (unspec:V16QI [(match_operand 1 "register_operand" "v") - (match_operand 2 "register_operand" "v")] - UNSPEC_VPKUHUM))] - "TARGET_ALTIVEC" - "vpkuhum %0,%1,%2" - [(set_attr "type" "vecperm")]) - -(define_insn "vpkuwum_nomode" - [(set (match_operand:V8HI 0 "register_operand" "=v") - (unspec:V8HI [(match_operand 1 "register_operand" "v") - (match_operand 2 "register_operand" "v")] - UNSPEC_VPKUWUM))] - "TARGET_ALTIVEC" - "vpkuwum %0,%1,%2" - [(set_attr "type" "vecperm")]) - -(define_expand "vec_extract_oddv8hi" - [(set (match_operand:V8HI 0 "register_operand" "") - (unspec:V8HI [(match_operand:V8HI 1 "register_operand" "") - (match_operand:V8HI 2 "register_operand" "")] - UNSPEC_EXTODD_V8HI))] - "TARGET_ALTIVEC" - " -{ - emit_insn (gen_vpkuwum_nomode (operands[0], operands[1], operands[2])); - DONE; -}") - -(define_expand "vec_extract_oddv16qi" - [(set (match_operand:V16QI 0 "register_operand" "") - (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "") - (match_operand:V16QI 2 "register_operand" "")] - UNSPEC_EXTODD_V16QI))] - "TARGET_ALTIVEC" - " -{ - emit_insn (gen_vpkuhum_nomode (operands[0], operands[1], operands[2])); - DONE; -}") - -(define_expand "vec_interleave_high<mode>" - [(set (match_operand:VI 0 "register_operand" "") - (unspec:VI [(match_operand:VI 1 "register_operand" "") - (match_operand:VI 2 "register_operand" "")] - UNSPEC_INTERHI))] - "TARGET_ALTIVEC" - " -{ - emit_insn (gen_altivec_vmrgh<VI_char> (operands[0], operands[1], operands[2])); - DONE; -}") - -(define_expand "vec_interleave_low<mode>" - [(set (match_operand:VI 0 "register_operand" "") - (unspec:VI [(match_operand:VI 1 "register_operand" "") - (match_operand:VI 2 "register_operand" "")] - UNSPEC_INTERLO))] - "TARGET_ALTIVEC" - " -{ - emit_insn (gen_altivec_vmrgl<VI_char> (operands[0], operands[1], operands[2])); - DONE; -}") - (define_expand "vec_unpacks_float_hi_v8hi" [(set (match_operand:V4SF 0 "register_operand" "") (unspec:V4SF [(match_operand:V8HI 1 "register_operand" "")] diff --git a/gcc/config/rs6000/paired.md b/gcc/config/rs6000/paired.md index f0bf7f9a5e3..9dce18d8149 100644 --- a/gcc/config/rs6000/paired.md +++ b/gcc/config/rs6000/paired.md @@ -272,48 +272,61 @@ (define_insn "paired_merge00" [(set (match_operand:V2SF 0 "gpc_reg_operand" "=f") - (vec_concat:V2SF - (vec_select:SF (match_operand:V2SF 1 "gpc_reg_operand" "f") - (parallel [(const_int 0)])) - (vec_select:SF (match_operand:V2SF 2 "gpc_reg_operand" "f") - (parallel [(const_int 0)]))))] + (vec_select:V2SF + (vec_concat:V4SF + (match_operand:V2SF 1 "gpc_reg_operand" "f") + (match_operand:V2SF 2 "gpc_reg_operand" "f")) + (parallel [(const_int 0) (const_int 2)])))] "TARGET_PAIRED_FLOAT" "ps_merge00 %0, %1, %2" [(set_attr "type" "fp")]) (define_insn "paired_merge01" [(set (match_operand:V2SF 0 "gpc_reg_operand" "=f") - (vec_concat:V2SF - (vec_select:SF (match_operand:V2SF 1 "gpc_reg_operand" "f") - (parallel [(const_int 0)])) - (vec_select:SF (match_operand:V2SF 2 "gpc_reg_operand" "f") - (parallel [(const_int 1)]))))] + (vec_select:V2SF + (vec_concat:V4SF + (match_operand:V2SF 1 "gpc_reg_operand" "f") + (match_operand:V2SF 2 "gpc_reg_operand" "f")) + (parallel [(const_int 0) (const_int 3)])))] "TARGET_PAIRED_FLOAT" "ps_merge01 %0, %1, %2" [(set_attr "type" "fp")]) (define_insn "paired_merge10" [(set (match_operand:V2SF 0 "gpc_reg_operand" "=f") - (vec_concat:V2SF - (vec_select:SF (match_operand:V2SF 1 "gpc_reg_operand" "f") - (parallel [(const_int 1)])) - (vec_select:SF (match_operand:V2SF 2 "gpc_reg_operand" "f") - (parallel [(const_int 0)]))))] + (vec_select:V2SF + (vec_concat:V4SF + (match_operand:V2SF 1 "gpc_reg_operand" "f") + (match_operand:V2SF 2 "gpc_reg_operand" "f")) + (parallel [(const_int 1) (const_int 2)])))] "TARGET_PAIRED_FLOAT" "ps_merge10 %0, %1, %2" [(set_attr "type" "fp")]) (define_insn "paired_merge11" [(set (match_operand:V2SF 0 "gpc_reg_operand" "=f") - (vec_concat:V2SF - (vec_select:SF (match_operand:V2SF 1 "gpc_reg_operand" "f") - (parallel [(const_int 1)])) - (vec_select:SF (match_operand:V2SF 2 "gpc_reg_operand" "f") - (parallel [(const_int 1)]))))] + (vec_select:V2SF + (vec_concat:V4SF + (match_operand:V2SF 1 "gpc_reg_operand" "f") + (match_operand:V2SF 2 "gpc_reg_operand" "f")) + (parallel [(const_int 1) (const_int 3)])))] "TARGET_PAIRED_FLOAT" "ps_merge11 %0, %1, %2" [(set_attr "type" "fp")]) +(define_expand "vec_perm_constv2sf" + [(match_operand:V2SF 0 "gpc_reg_operand" "") + (match_operand:V2SF 1 "gpc_reg_operand" "") + (match_operand:V2SF 2 "gpc_reg_operand" "") + (match_operand:V2SI 3 "" "")] + "TARGET_PAIRED_FLOAT" +{ + if (rs6000_expand_vec_perm_const (operands)) + DONE; + else + FAIL; +}) + (define_insn "paired_sum0" [(set (match_operand:V2SF 0 "gpc_reg_operand" "=f") (vec_concat:V2SF (plus:SF (vec_select:SF @@ -439,55 +452,6 @@ DONE; }) -(define_expand "vec_interleave_highv2sf" - [(set (match_operand:V2SF 0 "gpc_reg_operand" "=f") - (unspec:V2SF [(match_operand:V2SF 1 "gpc_reg_operand" "f") - (match_operand:V2SF 2 "gpc_reg_operand" "f")] - UNSPEC_INTERHI_V2SF))] - "TARGET_PAIRED_FLOAT" - " -{ - emit_insn (gen_paired_merge00 (operands[0], operands[1], operands[2])); - DONE; -}") - -(define_expand "vec_interleave_lowv2sf" - [(set (match_operand:V2SF 0 "gpc_reg_operand" "=f") - (unspec:V2SF [(match_operand:V2SF 1 "gpc_reg_operand" "f") - (match_operand:V2SF 2 "gpc_reg_operand" "f")] - UNSPEC_INTERLO_V2SF))] - "TARGET_PAIRED_FLOAT" - " -{ - emit_insn (gen_paired_merge11 (operands[0], operands[1], operands[2])); - DONE; -}") - -(define_expand "vec_extract_evenv2sf" - [(set (match_operand:V2SF 0 "gpc_reg_operand" "=f") - (unspec:V2SF [(match_operand:V2SF 1 "gpc_reg_operand" "f") - (match_operand:V2SF 2 "gpc_reg_operand" "f")] - UNSPEC_EXTEVEN_V2SF))] - "TARGET_PAIRED_FLOAT" - " -{ - emit_insn (gen_paired_merge00 (operands[0], operands[1], operands[2])); - DONE; -}") - -(define_expand "vec_extract_oddv2sf" - [(set (match_operand:V2SF 0 "gpc_reg_operand" "=f") - (unspec:V2SF [(match_operand:V2SF 1 "gpc_reg_operand" "f") - (match_operand:V2SF 2 "gpc_reg_operand" "f")] - UNSPEC_EXTODD_V2SF))] - "TARGET_PAIRED_FLOAT" - " -{ - emit_insn (gen_paired_merge11 (operands[0], operands[1], operands[2])); - DONE; -}") - - (define_expand "reduc_splus_v2sf" [(set (match_operand:V2SF 0 "gpc_reg_operand" "=f") (match_operand:V2SF 1 "gpc_reg_operand" "f"))] @@ -516,12 +480,10 @@ (match_operand:V2SF 1 "gpc_reg_operand" "f") (match_operand:V2SF 2 "gpc_reg_operand" "f")))] "TARGET_PAIRED_FLOAT && flag_unsafe_math_optimizations" - " { - if (paired_emit_vector_cond_expr (operands[0], operands[1], operands[2], - operands[3], operands[4], operands[5])) - DONE; - else - FAIL; -}") - + if (paired_emit_vector_cond_expr (operands[0], operands[1], operands[2], + operands[3], operands[4], operands[5])) + DONE; + else + FAIL; +}) diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md index e407eda86b3..29dd18d75bd 100644 --- a/gcc/config/rs6000/predicates.md +++ b/gcc/config/rs6000/predicates.md @@ -112,6 +112,16 @@ (and (match_code "const_int") (match_test "INTVAL (op) > 0 && exact_log2 (INTVAL (op)) >= 0"))) +;; Match op = 0 or op = 1. +(define_predicate "const_0_to_1_operand" + (and (match_code "const_int") + (match_test "IN_RANGE (INTVAL (op), 0, 1)"))) + +;; Match op = 2 or op = 3. +(define_predicate "const_2_to_3_operand" + (and (match_code "const_int") + (match_test "IN_RANGE (INTVAL (op), 2, 3)"))) + ;; Return 1 if op is a register that is not special. (define_predicate "gpc_reg_operand" (and (match_operand 0 "register_operand") diff --git a/gcc/config/rs6000/rs6000-builtin.def b/gcc/config/rs6000/rs6000-builtin.def index 25880ea5691..776350bb5c0 100644 --- a/gcc/config/rs6000/rs6000-builtin.def +++ b/gcc/config/rs6000/rs6000-builtin.def @@ -984,10 +984,10 @@ BU_VSX_2 (XXMRGHW_4SF, "xxmrghw", CONST, vsx_xxmrghw_v4sf) BU_VSX_2 (XXMRGHW_4SI, "xxmrghw_4si", CONST, vsx_xxmrghw_v4si) BU_VSX_2 (XXMRGLW_4SF, "xxmrglw", CONST, vsx_xxmrglw_v4sf) BU_VSX_2 (XXMRGLW_4SI, "xxmrglw_4si", CONST, vsx_xxmrglw_v4si) -BU_VSX_2 (VEC_MERGEL_V2DF, "mergel_2df", CONST, vec_interleave_lowv2df) -BU_VSX_2 (VEC_MERGEL_V2DI, "mergel_2di", CONST, vec_interleave_lowv2di) -BU_VSX_2 (VEC_MERGEH_V2DF, "mergeh_2df", CONST, vec_interleave_highv2df) -BU_VSX_2 (VEC_MERGEH_V2DI, "mergeh_2di", CONST, vec_interleave_highv2di) +BU_VSX_2 (VEC_MERGEL_V2DF, "mergel_2df", CONST, vsx_mergel_v2df) +BU_VSX_2 (VEC_MERGEL_V2DI, "mergel_2di", CONST, vsx_mergel_v2di) +BU_VSX_2 (VEC_MERGEH_V2DF, "mergeh_2df", CONST, vsx_mergeh_v2df) +BU_VSX_2 (VEC_MERGEH_V2DI, "mergeh_2di", CONST, vsx_mergeh_v2di) /* VSX abs builtin functions. */ BU_VSX_A (XVABSDP, "xvabsdp", CONST, absv2df2) diff --git a/gcc/config/rs6000/rs6000-modes.def b/gcc/config/rs6000/rs6000-modes.def index 724c947f14a..f72f40dfdb4 100644 --- a/gcc/config/rs6000/rs6000-modes.def +++ b/gcc/config/rs6000/rs6000-modes.def @@ -34,8 +34,10 @@ CC_MODE (CCFP); CC_MODE (CCEQ); /* Vector modes. */ -VECTOR_MODES (INT, 8); /* V8QI V4HI V2SI */ -VECTOR_MODES (INT, 16); /* V16QI V8HI V4SI V2DI */ +VECTOR_MODES (INT, 8); /* V8QI V4HI V2SI */ +VECTOR_MODES (INT, 16); /* V16QI V8HI V4SI V2DI */ +VECTOR_MODES (INT, 32); /* V32QI V16HI V8SI V4DI */ VECTOR_MODE (INT, DI, 1); -VECTOR_MODES (FLOAT, 8); /* V4HF V2SF */ -VECTOR_MODES (FLOAT, 16); /* V8HF V4SF V2DF */ +VECTOR_MODES (FLOAT, 8); /* V4HF V2SF */ +VECTOR_MODES (FLOAT, 16); /* V8HF V4SF V2DF */ +VECTOR_MODES (FLOAT, 32); /* V16HF V8SF V4DF */ diff --git a/gcc/config/rs6000/rs6000-protos.h b/gcc/config/rs6000/rs6000-protos.h index 465015270c6..23327f853fd 100644 --- a/gcc/config/rs6000/rs6000-protos.h +++ b/gcc/config/rs6000/rs6000-protos.h @@ -55,6 +55,10 @@ extern void rs6000_expand_vector_init (rtx, rtx); extern void paired_expand_vector_init (rtx, rtx); extern void rs6000_expand_vector_set (rtx, rtx, int); extern void rs6000_expand_vector_extract (rtx, rtx, int); +extern bool altivec_expand_vec_perm_const (rtx op[4]); +extern bool rs6000_expand_vec_perm_const (rtx op[4]); +extern void rs6000_expand_extract_even (rtx, rtx, rtx); +extern void rs6000_expand_interleave (rtx, rtx, rtx, bool); extern void build_mask64_2_operands (rtx, rtx *); extern int expand_block_clear (rtx[]); extern int expand_block_move (rtx[]); diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 46ad820300d..e8e9e8c9bbe 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -1661,6 +1661,8 @@ static const struct attribute_spec rs6000_attribute_table[] = #undef TARGET_LEGITIMATE_CONSTANT_P #define TARGET_LEGITIMATE_CONSTANT_P rs6000_legitimate_constant_p +#undef TARGET_VECTORIZE_VEC_PERM_CONST_OK +#define TARGET_VECTORIZE_VEC_PERM_CONST_OK rs6000_vectorize_vec_perm_const_ok /* Simplifications for entries below. */ @@ -4723,7 +4725,7 @@ rs6000_expand_vector_init (rtx target, rtx vals) copy_to_reg (XVECEXP (vals, 0, 3)))); emit_insn (gen_vsx_xvcvdpsp (flt_even, dbl_even)); emit_insn (gen_vsx_xvcvdpsp (flt_odd, dbl_odd)); - emit_insn (gen_vec_extract_evenv4sf (target, flt_even, flt_odd)); + rs6000_expand_extract_even (target, flt_even, flt_odd); } return; } @@ -10578,7 +10580,9 @@ altivec_expand_builtin (tree exp, rtx target, bool *expandedp) { *expandedp = true; error ("unresolved overload for Altivec builtin %qF", fndecl); - return const0_rtx; + + /* Given it is invalid, just generate a normal call. */ + return expand_call (exp, target, false); } target = altivec_expand_ld_builtin (exp, target, expandedp); @@ -11306,7 +11310,9 @@ rs6000_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED, if (!func_valid_p) { rs6000_invalid_builtin (fcode); - return NULL_RTX; + + /* Given it is invalid, just generate a normal call. */ + return expand_call (exp, target, ignore); } switch (fcode) @@ -26202,6 +26208,327 @@ rs6000_emit_parity (rtx dst, rtx src) } } +/* Expand an Altivec constant permutation. Return true if we match + an efficient implementation; false to fall back to VPERM. */ + +bool +altivec_expand_vec_perm_const (rtx operands[4]) +{ + struct altivec_perm_insn { + enum insn_code impl; + unsigned char perm[16]; + }; + static const struct altivec_perm_insn patterns[] = { + { CODE_FOR_altivec_vpkuhum, + { 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31 } }, + { CODE_FOR_altivec_vpkuwum, + { 2, 3, 6, 7, 10, 11, 14, 15, 18, 19, 22, 23, 26, 27, 30, 31 } }, + { CODE_FOR_altivec_vmrghb, + { 0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23 } }, + { CODE_FOR_altivec_vmrghh, + { 0, 1, 16, 17, 2, 3, 18, 19, 4, 5, 20, 21, 6, 7, 22, 23 } }, + { CODE_FOR_altivec_vmrghw, + { 0, 1, 2, 3, 16, 17, 18, 19, 4, 5, 6, 7, 20, 21, 22, 23 } }, + { CODE_FOR_altivec_vmrglb, + { 8, 24, 9, 25, 10, 26, 11, 27, 12, 28, 13, 29, 14, 30, 15, 31 } }, + { CODE_FOR_altivec_vmrglh, + { 8, 9, 24, 25, 10, 11, 26, 27, 12, 13, 28, 29, 14, 15, 30, 31 } }, + { CODE_FOR_altivec_vmrglw, + { 8, 9, 10, 11, 24, 25, 26, 27, 12, 13, 14, 15, 28, 29, 30, 31 } } + }; + + unsigned int i, j, elt, which; + unsigned char perm[16]; + rtx target, op0, op1, sel, x; + bool one_vec; + + target = operands[0]; + op0 = operands[1]; + op1 = operands[2]; + sel = operands[3]; + + /* Unpack the constant selector. */ + for (i = which = 0; i < 16; ++i) + { + rtx e = XVECEXP (sel, 0, i); + elt = INTVAL (e) & 31; + which |= (elt < 16 ? 1 : 2); + perm[i] = elt; + } + + /* Simplify the constant selector based on operands. */ + switch (which) + { + default: + gcc_unreachable (); + + case 3: + one_vec = false; + if (!rtx_equal_p (op0, op1)) + break; + /* FALLTHRU */ + + case 2: + for (i = 0; i < 16; ++i) + perm[i] &= 15; + op0 = op1; + one_vec = true; + break; + + case 1: + op1 = op0; + one_vec = true; + break; + } + + /* Look for splat patterns. */ + if (one_vec) + { + elt = perm[0]; + + for (i = 0; i < 16; ++i) + if (perm[i] != elt) + break; + if (i == 16) + { + emit_insn (gen_altivec_vspltb (target, op0, GEN_INT (elt))); + return true; + } + + if (elt % 2 == 0) + { + for (i = 0; i < 16; i += 2) + if (perm[i] != elt || perm[i + 1] != elt + 1) + break; + if (i == 16) + { + x = gen_reg_rtx (V8HImode); + emit_insn (gen_altivec_vsplth (x, gen_lowpart (V8HImode, op0), + GEN_INT (elt / 2))); + emit_move_insn (target, gen_lowpart (V16QImode, x)); + return true; + } + } + + if (elt % 4 == 0) + { + for (i = 0; i < 16; i += 4) + if (perm[i] != elt + || perm[i + 1] != elt + 1 + || perm[i + 2] != elt + 2 + || perm[i + 3] != elt + 3) + break; + if (i == 16) + { + x = gen_reg_rtx (V4SImode); + emit_insn (gen_altivec_vspltw (x, gen_lowpart (V4SImode, op0), + GEN_INT (elt / 4))); + emit_move_insn (target, gen_lowpart (V16QImode, x)); + return true; + } + } + } + + /* Look for merge and pack patterns. */ + for (j = 0; j < ARRAY_SIZE (patterns); ++j) + { + bool swapped; + + elt = patterns[j].perm[0]; + if (perm[0] == elt) + swapped = false; + else if (perm[0] == elt + 16) + swapped = true; + else + continue; + for (i = 1; i < 16; ++i) + { + elt = patterns[j].perm[i]; + if (swapped) + elt = (elt >= 16 ? elt - 16 : elt + 16); + else if (one_vec && elt >= 16) + elt -= 16; + if (perm[i] != elt) + break; + } + if (i == 16) + { + enum insn_code icode = patterns[j].impl; + enum machine_mode omode = insn_data[icode].operand[0].mode; + enum machine_mode imode = insn_data[icode].operand[1].mode; + + if (swapped) + x = op0, op0 = op1, op1 = x; + if (imode != V16QImode) + { + op0 = gen_lowpart (imode, op0); + op1 = gen_lowpart (imode, op1); + } + if (omode == V16QImode) + x = target; + else + x = gen_reg_rtx (omode); + emit_insn (GEN_FCN (icode) (x, op0, op1)); + if (omode != V16QImode) + emit_move_insn (target, gen_lowpart (V16QImode, x)); + return true; + } + } + + return false; +} + +/* Expand a Paired Single, VSX Permute Doubleword, or SPE constant permutation. + Return true if we match an efficient implementation. */ + +static bool +rs6000_expand_vec_perm_const_1 (rtx target, rtx op0, rtx op1, + unsigned char perm0, unsigned char perm1) +{ + rtx x; + + /* If both selectors come from the same operand, fold to single op. */ + if ((perm0 & 2) == (perm1 & 2)) + { + if (perm0 & 2) + op0 = op1; + else + op1 = op0; + } + /* If both operands are equal, fold to simpler permutation. */ + if (rtx_equal_p (op0, op1)) + { + perm0 = perm0 & 1; + perm1 = (perm1 & 1) + 2; + } + /* If the first selector comes from the second operand, swap. */ + else if (perm0 & 2) + { + if (perm1 & 2) + return false; + perm0 -= 2; + perm1 += 2; + x = op0, op0 = op1, op1 = x; + } + /* If the second selector does not come from the second operand, fail. */ + else if ((perm1 & 2) == 0) + return false; + + /* Success! */ + if (target != NULL) + { + enum machine_mode vmode, dmode; + rtvec v; + + vmode = GET_MODE (target); + gcc_assert (GET_MODE_NUNITS (vmode) == 2); + dmode = mode_for_vector (GET_MODE_INNER (vmode), 4); + + x = gen_rtx_VEC_CONCAT (dmode, op0, op1); + v = gen_rtvec (2, GEN_INT (perm0), GEN_INT (perm1)); + x = gen_rtx_VEC_SELECT (vmode, x, gen_rtx_PARALLEL (VOIDmode, v)); + emit_insn (gen_rtx_SET (VOIDmode, target, x)); + } + return true; +} + +bool +rs6000_expand_vec_perm_const (rtx operands[4]) +{ + rtx target, op0, op1, sel; + unsigned char perm0, perm1; + + target = operands[0]; + op0 = operands[1]; + op1 = operands[2]; + sel = operands[3]; + + /* Unpack the constant selector. */ + perm0 = INTVAL (XVECEXP (sel, 0, 0)) & 3; + perm1 = INTVAL (XVECEXP (sel, 0, 1)) & 3; + + return rs6000_expand_vec_perm_const_1 (target, op0, op1, perm0, perm1); +} + +/* Test whether a constant permutation is supported. */ + +static bool +rs6000_vectorize_vec_perm_const_ok (enum machine_mode vmode, + const unsigned char *sel) +{ + /* AltiVec (and thus VSX) can handle arbitrary permutations. */ + if (TARGET_ALTIVEC) + return true; + + /* Check for ps_merge* or evmerge* insns. */ + if ((TARGET_PAIRED_FLOAT && vmode == V2SFmode) + || (TARGET_SPE && vmode == V2SImode)) + { + rtx op0 = gen_raw_REG (vmode, LAST_VIRTUAL_REGISTER + 1); + rtx op1 = gen_raw_REG (vmode, LAST_VIRTUAL_REGISTER + 2); + return rs6000_expand_vec_perm_const_1 (NULL, op0, op1, sel[0], sel[1]); + } + + return false; +} + +/* A subroutine for rs6000_expand_extract_even & rs6000_expand_interleave. */ + +static void +rs6000_do_expand_vec_perm (rtx target, rtx op0, rtx op1, + enum machine_mode vmode, unsigned nelt, rtx perm[]) +{ + enum machine_mode imode; + rtx x; + + imode = vmode; + if (GET_MODE_CLASS (vmode) != MODE_VECTOR_INT) + { + imode = GET_MODE_INNER (vmode); + imode = mode_for_size (GET_MODE_BITSIZE (imode), MODE_INT, 0); + imode = mode_for_vector (imode, nelt); + } + + x = gen_rtx_CONST_VECTOR (imode, gen_rtvec_v (nelt, perm)); + x = expand_vec_perm (vmode, op0, op1, x, target); + if (x != target) + emit_move_insn (target, x); +} + +/* Expand an extract even operation. */ + +void +rs6000_expand_extract_even (rtx target, rtx op0, rtx op1) +{ + enum machine_mode vmode = GET_MODE (target); + unsigned i, nelt = GET_MODE_NUNITS (vmode); + rtx perm[16]; + + for (i = 0; i < nelt; i++) + perm[i] = GEN_INT (i * 2); + + rs6000_do_expand_vec_perm (target, op0, op1, vmode, nelt, perm); +} + +/* Expand a vector interleave operation. */ + +void +rs6000_expand_interleave (rtx target, rtx op0, rtx op1, bool highp) +{ + enum machine_mode vmode = GET_MODE (target); + unsigned i, high, nelt = GET_MODE_NUNITS (vmode); + rtx perm[16]; + + high = (highp == BYTES_BIG_ENDIAN ? 0 : nelt / 2); + for (i = 0; i < nelt / 2; i++) + { + perm[i * 2] = GEN_INT (i + high); + perm[i * 2 + 1] = GEN_INT (i + nelt + high); + } + + rs6000_do_expand_vec_perm (target, op0, op1, vmode, nelt, perm); +} + /* Return an RTX representing where to find the function value of a function returning MODE. */ static rtx @@ -26789,6 +27116,11 @@ rs6000_inner_target_options (tree args, bool attr_p) error_p = false; target_flags_explicit |= mask; + /* VSX needs altivec, so -mvsx automagically sets + altivec. */ + if (mask == MASK_VSX && !invert) + mask |= MASK_ALTIVEC; + if (rs6000_opt_masks[i].invert) invert = !invert; @@ -27001,7 +27333,6 @@ rs6000_pragma_target_parse (tree args, tree pop_target) struct cl_target_option *prev_opt, *cur_opt; unsigned prev_bumask, cur_bumask, diff_bumask; int prev_flags, cur_flags, diff_flags; - bool ret; if (TARGET_DEBUG_TARGET) { @@ -27023,7 +27354,6 @@ rs6000_pragma_target_parse (tree args, tree pop_target) if (! args) { - ret = true; cur_tree = ((pop_target) ? pop_target : target_option_default_node); @@ -27033,13 +27363,13 @@ rs6000_pragma_target_parse (tree args, tree pop_target) else { rs6000_cpu_index = rs6000_tune_index = -1; - ret = rs6000_inner_target_options (args, false); - cur_tree = build_target_option_node (); - - if (!cur_tree) + if (!rs6000_inner_target_options (args, false) + || !rs6000_option_override_internal (false) + || (cur_tree = build_target_option_node ()) == NULL_TREE) { if (TARGET_DEBUG_BUILTIN || TARGET_DEBUG_TARGET) - fprintf (stderr, "build_target_option_node returned NULL\n"); + fprintf (stderr, "invalid pragma\n"); + return false; } } @@ -27075,7 +27405,7 @@ rs6000_pragma_target_parse (tree args, tree pop_target) } } - return ret; + return true; } diff --git a/gcc/config/rs6000/spe.md b/gcc/config/rs6000/spe.md index d50ad1aad1d..bbe11b9124b 100644 --- a/gcc/config/rs6000/spe.md +++ b/gcc/config/rs6000/spe.md @@ -441,12 +441,11 @@ (define_insn "spe_evmergehi" [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") - (vec_merge:V2SI (match_operand:V2SI 1 "gpc_reg_operand" "r") - (vec_select:V2SI - (match_operand:V2SI 2 "gpc_reg_operand" "r") - (parallel [(const_int 1) - (const_int 0)])) - (const_int 2)))] + (vec_select:V2SI + (vec_concat:V4SI + (match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")) + (parallel [(const_int 0) (const_int 2)])))] "TARGET_SPE" "evmergehi %0,%1,%2" [(set_attr "type" "vecsimple") @@ -454,9 +453,11 @@ (define_insn "spe_evmergehilo" [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") - (vec_merge:V2SI (match_operand:V2SI 1 "gpc_reg_operand" "r") - (match_operand:V2SI 2 "gpc_reg_operand" "r") - (const_int 2)))] + (vec_select:V2SI + (vec_concat:V4SI + (match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")) + (parallel [(const_int 0) (const_int 3)])))] "TARGET_SPE" "evmergehilo %0,%1,%2" [(set_attr "type" "vecsimple") @@ -464,12 +465,11 @@ (define_insn "spe_evmergelo" [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") - (vec_merge:V2SI (vec_select:V2SI - (match_operand:V2SI 1 "gpc_reg_operand" "r") - (parallel [(const_int 1) - (const_int 0)])) - (match_operand:V2SI 2 "gpc_reg_operand" "r") - (const_int 2)))] + (vec_select:V2SI + (vec_concat:V4SI + (match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")) + (parallel [(const_int 1) (const_int 3)])))] "TARGET_SPE" "evmergelo %0,%1,%2" [(set_attr "type" "vecsimple") @@ -477,20 +477,29 @@ (define_insn "spe_evmergelohi" [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") - (vec_merge:V2SI (vec_select:V2SI - (match_operand:V2SI 1 "gpc_reg_operand" "r") - (parallel [(const_int 1) - (const_int 0)])) - (vec_select:V2SI - (match_operand:V2SI 2 "gpc_reg_operand" "r") - (parallel [(const_int 1) - (const_int 0)])) - (const_int 2)))] + (vec_select:V2SI + (vec_concat:V4SI + (match_operand:V2SI 1 "gpc_reg_operand" "r") + (match_operand:V2SI 2 "gpc_reg_operand" "r")) + (parallel [(const_int 1) (const_int 2)])))] "TARGET_SPE" "evmergelohi %0,%1,%2" [(set_attr "type" "vecsimple") (set_attr "length" "4")]) +(define_expand "vec_perm_constv2si" + [(match_operand:V2SI 0 "gpc_reg_operand" "") + (match_operand:V2SI 1 "gpc_reg_operand" "") + (match_operand:V2SI 2 "gpc_reg_operand" "") + (match_operand:V2SI 3 "" "")] + "TARGET_SPE" +{ + if (rs6000_expand_vec_perm_const (operands)) + DONE; + else + FAIL; +}) + (define_insn "spe_evnand" [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") (not:V2SI (and:V2SI (match_operand:V2SI 1 "gpc_reg_operand" "r") diff --git a/gcc/config/rs6000/vector.md b/gcc/config/rs6000/vector.md index 4930f8c3733..bcb23ac5de6 100644 --- a/gcc/config/rs6000/vector.md +++ b/gcc/config/rs6000/vector.md @@ -747,62 +747,6 @@ INTVAL (operands[2])); DONE; }) - -;; Interleave patterns -(define_expand "vec_interleave_highv4sf" - [(set (match_operand:V4SF 0 "vfloat_operand" "") - (vec_merge:V4SF - (vec_select:V4SF (match_operand:V4SF 1 "vfloat_operand" "") - (parallel [(const_int 0) - (const_int 2) - (const_int 1) - (const_int 3)])) - (vec_select:V4SF (match_operand:V4SF 2 "vfloat_operand" "") - (parallel [(const_int 2) - (const_int 0) - (const_int 3) - (const_int 1)])) - (const_int 5)))] - "VECTOR_UNIT_ALTIVEC_OR_VSX_P (V4SFmode)" - "") - -(define_expand "vec_interleave_lowv4sf" - [(set (match_operand:V4SF 0 "vfloat_operand" "") - (vec_merge:V4SF - (vec_select:V4SF (match_operand:V4SF 1 "vfloat_operand" "") - (parallel [(const_int 2) - (const_int 0) - (const_int 3) - (const_int 1)])) - (vec_select:V4SF (match_operand:V4SF 2 "vfloat_operand" "") - (parallel [(const_int 0) - (const_int 2) - (const_int 1) - (const_int 3)])) - (const_int 5)))] - "VECTOR_UNIT_ALTIVEC_OR_VSX_P (V4SFmode)" - "") - -(define_expand "vec_interleave_high<mode>" - [(set (match_operand:VEC_64 0 "vfloat_operand" "") - (vec_concat:VEC_64 - (vec_select:<VEC_base> (match_operand:VEC_64 1 "vfloat_operand" "") - (parallel [(const_int 0)])) - (vec_select:<VEC_base> (match_operand:VEC_64 2 "vfloat_operand" "") - (parallel [(const_int 0)]))))] - "VECTOR_UNIT_VSX_P (<MODE>mode)" - "") - -(define_expand "vec_interleave_low<mode>" - [(set (match_operand:VEC_64 0 "vfloat_operand" "") - (vec_concat:VEC_64 - (vec_select:<VEC_base> (match_operand:VEC_64 1 "vfloat_operand" "") - (parallel [(const_int 1)])) - (vec_select:<VEC_base> (match_operand:VEC_64 2 "vfloat_operand" "") - (parallel [(const_int 1)]))))] - "VECTOR_UNIT_VSX_P (<MODE>mode)" - "") - ;; Convert double word types to single word types (define_expand "vec_pack_trunc_v2df" @@ -816,7 +760,7 @@ emit_insn (gen_vsx_xvcvdpsp (r1, operands[1])); emit_insn (gen_vsx_xvcvdpsp (r2, operands[2])); - emit_insn (gen_vec_extract_evenv4sf (operands[0], r1, r2)); + rs6000_expand_extract_even (operands[0], r1, r2); DONE; }) @@ -831,7 +775,7 @@ emit_insn (gen_vsx_xvcvdpsxws (r1, operands[1])); emit_insn (gen_vsx_xvcvdpsxws (r2, operands[2])); - emit_insn (gen_vec_extract_evenv4si (operands[0], r1, r2)); + rs6000_expand_extract_even (operands[0], r1, r2); DONE; }) @@ -846,7 +790,7 @@ emit_insn (gen_vsx_xvcvdpuxws (r1, operands[1])); emit_insn (gen_vsx_xvcvdpuxws (r2, operands[2])); - emit_insn (gen_vec_extract_evenv4si (operands[0], r1, r2)); + rs6000_expand_extract_even (operands[0], r1, r2); DONE; }) @@ -858,7 +802,7 @@ { rtx reg = gen_reg_rtx (V4SFmode); - emit_insn (gen_vec_interleave_highv4sf (reg, operands[1], operands[1])); + rs6000_expand_interleave (reg, operands[1], operands[1], true); emit_insn (gen_vsx_xvcvspdp (operands[0], reg)); DONE; }) @@ -870,7 +814,7 @@ { rtx reg = gen_reg_rtx (V4SFmode); - emit_insn (gen_vec_interleave_lowv4sf (reg, operands[1], operands[1])); + rs6000_expand_interleave (reg, operands[1], operands[1], false); emit_insn (gen_vsx_xvcvspdp (operands[0], reg)); DONE; }) @@ -882,7 +826,7 @@ { rtx reg = gen_reg_rtx (V4SImode); - emit_insn (gen_vec_interleave_highv4si (reg, operands[1], operands[1])); + rs6000_expand_interleave (reg, operands[1], operands[1], true); emit_insn (gen_vsx_xvcvsxwdp (operands[0], reg)); DONE; }) @@ -894,7 +838,7 @@ { rtx reg = gen_reg_rtx (V4SImode); - emit_insn (gen_vec_interleave_lowv4si (reg, operands[1], operands[1])); + rs6000_expand_interleave (reg, operands[1], operands[1], false); emit_insn (gen_vsx_xvcvsxwdp (operands[0], reg)); DONE; }) @@ -906,7 +850,7 @@ { rtx reg = gen_reg_rtx (V4SImode); - emit_insn (gen_vec_interleave_highv4si (reg, operands[1], operands[1])); + rs6000_expand_interleave (reg, operands[1], operands[1], true); emit_insn (gen_vsx_xvcvuxwdp (operands[0], reg)); DONE; }) @@ -918,7 +862,7 @@ { rtx reg = gen_reg_rtx (V4SImode); - emit_insn (gen_vec_interleave_lowv4si (reg, operands[1], operands[1])); + rs6000_expand_interleave (reg, operands[1], operands[1], false); emit_insn (gen_vsx_xvcvuxwdp (operands[0], reg)); DONE; }) diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vsx.md index fb860342304..634bd23f437 100644 --- a/gcc/config/rs6000/vsx.md +++ b/gcc/config/rs6000/vsx.md @@ -180,7 +180,13 @@ (V4SI "SI") (V8HI "HI") (V16QI "QI")]) - + +;; Map to a double-sized vector mode +(define_mode_attr VS_double [(V4SI "V8SI") + (V4SF "V8SF") + (V2DI "V4DI") + (V2DF "V4DF")]) + ;; Constants for creating unspecs (define_c_enum "unspec" [UNSPEC_VSX_CONCAT @@ -195,7 +201,6 @@ UNSPEC_VSX_CVSPUXDS UNSPEC_VSX_TDIV UNSPEC_VSX_TSQRT - UNSPEC_VSX_XXPERMDI UNSPEC_VSX_SET UNSPEC_VSX_ROUND_I UNSPEC_VSX_ROUND_IC @@ -352,7 +357,7 @@ (define_insn "*vsx_div<mode>3" [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa") (div:VSX_B (match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa") - (match_operand:VSX_B 2 "vsx_register_operand" "<VSr>,wa")))] + (match_operand:VSX_B 2 "vsx_register_operand" "<VSr>,wa")))] "VECTOR_UNIT_VSX_P (<MODE>mode)" "x<VSv>div<VSs> %x0,%x1,%x2" [(set_attr "type" "<VStype_div>") @@ -1184,39 +1189,88 @@ [(set_attr "length" "4,8") (set_attr "type" "fp")]) -;; General double word oriented permute, allow the other vector types for -;; optimizing the permute instruction. -(define_insn "vsx_xxpermdi_<mode>" - [(set (match_operand:VSX_L 0 "vsx_register_operand" "=wd,?wa") - (unspec:VSX_L [(match_operand:VSX_L 1 "vsx_register_operand" "wd,wa") - (match_operand:VSX_L 2 "vsx_register_operand" "wd,wa") - (match_operand:QI 3 "u5bit_cint_operand" "i,i")] - UNSPEC_VSX_XXPERMDI))] +;; Expand the builtin form of xxpermdi to canonical rtl. +(define_expand "vsx_xxpermdi_<mode>" + [(match_operand:VSX_L 0 "vsx_register_operand" "") + (match_operand:VSX_L 1 "vsx_register_operand" "") + (match_operand:VSX_L 2 "vsx_register_operand" "") + (match_operand:QI 3 "u5bit_cint_operand" "")] "VECTOR_MEM_VSX_P (<MODE>mode)" - "xxpermdi %x0,%x1,%x2,%3" - [(set_attr "type" "vecperm")]) +{ + rtx target = operands[0]; + rtx op0 = operands[1]; + rtx op1 = operands[2]; + int mask = INTVAL (operands[3]); + rtx perm0 = GEN_INT ((mask >> 1) & 1); + rtx perm1 = GEN_INT ((mask & 1) + 2); + rtx (*gen) (rtx, rtx, rtx, rtx, rtx); + + if (<MODE>mode == V2DFmode) + gen = gen_vsx_xxpermdi2_v2df_1; + else + { + gen = gen_vsx_xxpermdi2_v2di_1; + if (<MODE>mode != V2DImode) + { + target = gen_lowpart (V2DImode, target); + op0 = gen_lowpart (V2DImode, target); + op1 = gen_lowpart (V2DImode, target); + } + } + emit_insn (gen (target, op0, op1, perm0, perm1)); + DONE; +}) -;; Varient of xxpermdi that is emitted by the vec_interleave functions -(define_insn "*vsx_xxpermdi2_<mode>" +(define_insn "vsx_xxpermdi2_<mode>_1" [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd") - (vec_concat:VSX_D - (vec_select:<VS_scalar> - (match_operand:VSX_D 1 "vsx_register_operand" "wd") - (parallel - [(match_operand:QI 2 "u5bit_cint_operand" "i")])) - (vec_select:<VS_scalar> - (match_operand:VSX_D 3 "vsx_register_operand" "wd") - (parallel - [(match_operand:QI 4 "u5bit_cint_operand" "i")]))))] + (vec_select:VSX_D + (vec_concat:<VS_double> + (match_operand:VSX_D 1 "vsx_register_operand" "wd") + (match_operand:VSX_D 2 "vsx_register_operand" "wd")) + (parallel [(match_operand 3 "const_0_to_1_operand" "") + (match_operand 4 "const_2_to_3_operand" "")])))] "VECTOR_MEM_VSX_P (<MODE>mode)" { - gcc_assert ((UINTVAL (operands[2]) <= 1) && (UINTVAL (operands[4]) <= 1)); - operands[5] = GEN_INT (((INTVAL (operands[2]) & 1) << 1) - | (INTVAL (operands[4]) & 1)); - return \"xxpermdi %x0,%x1,%x3,%5\"; + int mask = (INTVAL (operands[3]) << 1) | (INTVAL (operands[4]) - 2); + operands[3] = GEN_INT (mask); + return "xxpermdi %x0,%x1,%x2,%3"; } [(set_attr "type" "vecperm")]) +(define_expand "vec_perm_const<mode>" + [(match_operand:VSX_D 0 "vsx_register_operand" "") + (match_operand:VSX_D 1 "vsx_register_operand" "") + (match_operand:VSX_D 2 "vsx_register_operand" "") + (match_operand:V2DI 3 "" "")] + "VECTOR_MEM_VSX_P (<MODE>mode)" +{ + if (rs6000_expand_vec_perm_const (operands)) + DONE; + else + FAIL; +}) + +;; Expanders for builtins +(define_expand "vsx_mergel_<mode>" + [(set (match_operand:VSX_D 0 "vsx_register_operand" "") + (vec_select:VSX_D + (vec_concat:<VS_double> + (match_operand:VSX_D 1 "vsx_register_operand" "") + (match_operand:VSX_D 2 "vsx_register_operand" "")) + (parallel [(const_int 1) (const_int 3)])))] + "VECTOR_MEM_VSX_P (<MODE>mode)" + "") + +(define_expand "vsx_mergeh_<mode>" + [(set (match_operand:VSX_D 0 "vsx_register_operand" "") + (vec_select:VSX_D + (vec_concat:<VS_double> + (match_operand:VSX_D 1 "vsx_register_operand" "") + (match_operand:VSX_D 2 "vsx_register_operand" "")) + (parallel [(const_int 0) (const_int 2)])))] + "VECTOR_MEM_VSX_P (<MODE>mode)" + "") + ;; V2DF/V2DI splat (define_insn "vsx_splat_<mode>" [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,wd,wd,?wa,?wa,?wa") @@ -1247,40 +1301,24 @@ ;; V4SF/V4SI interleave (define_insn "vsx_xxmrghw_<mode>" [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa") - (vec_merge:VSX_W - (vec_select:VSX_W - (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa") - (parallel [(const_int 0) - (const_int 2) - (const_int 1) - (const_int 3)])) - (vec_select:VSX_W - (match_operand:VSX_W 2 "vsx_register_operand" "wf,wa") - (parallel [(const_int 2) - (const_int 0) - (const_int 3) - (const_int 1)])) - (const_int 5)))] + (vec_select:VSX_W + (vec_concat:<VS_double> + (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa") + (match_operand:VSX_W 2 "vsx_register_operand" "wf,wa")) + (parallel [(const_int 0) (const_int 4) + (const_int 1) (const_int 5)])))] "VECTOR_MEM_VSX_P (<MODE>mode)" "xxmrghw %x0,%x1,%x2" [(set_attr "type" "vecperm")]) (define_insn "vsx_xxmrglw_<mode>" [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa") - (vec_merge:VSX_W - (vec_select:VSX_W - (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa") - (parallel [(const_int 2) - (const_int 0) - (const_int 3) - (const_int 1)])) - (vec_select:VSX_W - (match_operand:VSX_W 2 "vsx_register_operand" "wf,?wa") - (parallel [(const_int 0) - (const_int 2) - (const_int 1) - (const_int 3)])) - (const_int 5)))] + (vec_select:VSX_W + (vec_concat:<VS_double> + (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa") + (match_operand:VSX_W 2 "vsx_register_operand" "wf,?wa")) + (parallel [(const_int 2) (const_int 6) + (const_int 3) (const_int 7)])))] "VECTOR_MEM_VSX_P (<MODE>mode)" "xxmrglw %x0,%x1,%x2" [(set_attr "type" "vecperm")]) diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index ffca91a107a..67cdfb4a0d7 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -6476,7 +6476,8 @@ s390_mainpool_finish (struct constant_pool *pool) rtx pool_end = gen_label_rtx (); insn = gen_main_base_31_large (base_reg, pool->label, pool_end); - insn = emit_insn_after (insn, pool->pool_insn); + insn = emit_jump_insn_after (insn, pool->pool_insn); + JUMP_LABEL (insn) = pool_end; INSN_ADDRESSES_NEW (insn, -1); remove_insn (pool->pool_insn); diff --git a/gcc/coverage.c b/gcc/coverage.c index 656db92beb1..58a76cafadd 100644 --- a/gcc/coverage.c +++ b/gcc/coverage.c @@ -604,20 +604,33 @@ coverage_end_function (unsigned lineno_checksum, unsigned cfg_checksum) bbg_file_name = NULL; } - /* If the function is extern (i.e. extern inline), then we won't be - outputting it, so don't chain it onto the function list. */ - if (fn_ctr_mask && !DECL_EXTERNAL (current_function_decl)) + if (fn_ctr_mask) { - struct coverage_data *item = ggc_alloc_coverage_data (); + struct coverage_data *item = 0; + + /* If the function is extern (i.e. extern inline), then we won't + be outputting it, so don't chain it onto the function + list. */ + if (!DECL_EXTERNAL (current_function_decl)) + { + item = ggc_alloc_coverage_data (); + + item->ident = current_function_funcdef_no + 1; + item->lineno_checksum = lineno_checksum; + item->cfg_checksum = cfg_checksum; + + item->fn_decl = current_function_decl; + item->next = 0; + *functions_tail = item; + functions_tail = &item->next; + } - item->ident = current_function_funcdef_no + 1; - item->lineno_checksum = lineno_checksum; - item->cfg_checksum = cfg_checksum; for (i = 0; i != GCOV_COUNTERS; i++) { tree var = fn_v_ctrs[i]; - - item->ctr_vars[i] = var; + + if (item) + item->ctr_vars[i] = var; if (var) { tree array_type = build_index_type (size_int (fn_n_ctrs[i] - 1)); @@ -627,17 +640,7 @@ coverage_end_function (unsigned lineno_checksum, unsigned cfg_checksum) DECL_SIZE_UNIT (var) = TYPE_SIZE_UNIT (array_type); varpool_finalize_decl (var); } - } - item->fn_decl = current_function_decl; - item->next = 0; - *functions_tail = item; - functions_tail = &item->next; - } - - if (fn_ctr_mask) - { - for (i = 0; i != GCOV_COUNTERS; i++) - { + fn_b_ctrs[i] = fn_n_ctrs[i] = 0; fn_v_ctrs[i] = NULL_TREE; } diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index defc0a5eb44..1ba9f347a17 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,61 @@ +2011-12-12 Richard Guenther <rguenther@suse.de> + + PR lto/51262 + * tree.c (cp_free_lang_data): No longer clear anonymous names. + +2011-12-09 Jason Merrill <jason@redhat.com> + + PR c++/51151 + * call.c (perform_implicit_conversion_flags): Remove earlier kludge. + * parser.c (cp_parser_omp_for_loop): Use cp_parser_omp_for_incr + in templates even if decl isn't type-dependent. + +2011-12-09 Dodji Seketeli <dodji@redhat.com> + + PR c++/51289 + * cp-tree.h (TYPE_TEMPLATE_INFO): Rewrite this accessor macro to + better support aliased types. + (TYPE_ALIAS_P): Don't crash on TYPE_NAME nodes that are not + TYPE_DECL. + * pt.c (find_parameter_packs_r): Handle types aliases. + (push_template_decl_real): Check for bare parameter packs in the + underlying type of an alias template. + +2011-12-08 Jason Merrill <jason@redhat.com> + + PR c++/51318 + * typeck.c (build_x_conditional_expr): Restrict glvalue games to C++11. + + PR c++/51459 + * pt.c (tsubst_expr) [DECL_EXPR]: Handle capture proxies properly. + * semantics.c (insert_capture_proxy): No longer static. + * cp-tree.h: Declare it. + +2011-12-07 Jakub Jelinek <jakub@redhat.com> + + PR c++/51401 + * decl.c (grokdeclarator): Error for auto on non-static data members. + + PR c++/51429 + * typeck2.c (cxx_incomplete_type_diagnostic): Don't + ICE if TREE_OPERAND (value, 1) is overloaded. + + PR c++/51229 + * decl.c (reshape_init_class): Complain if d->cur->index is + INTEGER_CST. + * parser.c (cp_parser_initializer_list): If cp_parser_parse_definitely + fails, clear designator. + + PR c++/51369 + * init.c (build_value_init): Allow array types even when + processing_template_decl. + +2011-12-07 Ed Smith-Rowland <3dw4rd@verizon.net> + + PR c++/51420 + * parser.c (lookup_literal_operator): Check that declaration is an + overloaded function. + 2011-12-06 Jakub Jelinek <jakub@redhat.com> PR c++/51430 diff --git a/gcc/cp/call.c b/gcc/cp/call.c index d8fc4f1d2d5..65283685a39 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -8437,10 +8437,7 @@ perform_implicit_conversion_flags (tree type, tree expr, tsubst_flags_t complain } expr = error_mark_node; } - else if (processing_template_decl - /* As a kludge, we always perform conversions between scalar - types, as IMPLICIT_CONV_EXPR confuses c_finish_omp_for. */ - && !(SCALAR_TYPE_P (type) && SCALAR_TYPE_P (TREE_TYPE (expr)))) + else if (processing_template_decl && conv->kind != ck_identity) { /* In a template, we are only concerned about determining the type of non-dependent expressions, so we do not have to diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index dccf485a60f..955d0eb3668 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -2555,6 +2555,7 @@ extern void decl_shadowed_for_var_insert (tree, tree); #define TYPE_ALIAS_P(NODE) \ (TYPE_P (NODE) \ && TYPE_NAME (NODE) \ + && TREE_CODE (TYPE_NAME (NODE)) == TYPE_DECL \ && TYPE_DECL_ALIAS_P (TYPE_NAME (NODE))) /* For a class type: if this structure has many fields, we'll sort them @@ -2607,17 +2608,24 @@ extern void decl_shadowed_for_var_insert (tree, tree); (LANG_TYPE_CLASS_CHECK (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK (NODE)) \ ->template_info) -/* Template information for an ENUMERAL_, RECORD_, or UNION_TYPE. */ +/* Template information for an ENUMERAL_, RECORD_, UNION_TYPE, or + BOUND_TEMPLATE_TEMPLATE_PARM type. Note that if NODE is a + specialization of an alias template, this accessor returns the + template info for the alias template, not the one (if any) for the + template of the underlying type. */ #define TYPE_TEMPLATE_INFO(NODE) \ - (TREE_CODE (NODE) == ENUMERAL_TYPE \ - ? ENUM_TEMPLATE_INFO (NODE) : \ - (TREE_CODE (NODE) == BOUND_TEMPLATE_TEMPLATE_PARM \ - ? TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO (NODE) : \ - ((CLASS_TYPE_P (NODE) && !TYPE_ALIAS_P (NODE)) \ - ? CLASSTYPE_TEMPLATE_INFO (NODE) \ - : ((TYPE_NAME (NODE) && DECL_LANG_SPECIFIC (TYPE_NAME (NODE))) \ - ? (DECL_TEMPLATE_INFO (TYPE_NAME (NODE))) \ - : NULL_TREE)))) + (TYPE_ALIAS_P (NODE) \ + ? ((TYPE_NAME (NODE) && DECL_LANG_SPECIFIC (TYPE_NAME (NODE))) \ + ? DECL_TEMPLATE_INFO (TYPE_NAME (NODE)) \ + : NULL_TREE) \ + : ((TREE_CODE (NODE) == ENUMERAL_TYPE) \ + ? ENUM_TEMPLATE_INFO (NODE) \ + : ((TREE_CODE (NODE) == BOUND_TEMPLATE_TEMPLATE_PARM) \ + ? TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO (NODE) \ + : (CLASS_TYPE_P (NODE) \ + ? CLASSTYPE_TEMPLATE_INFO (NODE) \ + : NULL_TREE)))) + /* Set the template information for an ENUMERAL_, RECORD_, or UNION_TYPE to VAL. */ @@ -5593,6 +5601,7 @@ extern void apply_lambda_return_type (tree, tree); extern tree add_capture (tree, tree, tree, bool, bool); extern tree add_default_capture (tree, tree, tree); extern tree build_capture_proxy (tree); +extern void insert_capture_proxy (tree); extern void insert_pending_capture_proxies (void); extern bool is_capture_proxy (tree); extern bool is_normal_capture_proxy (tree); diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 055c1b2020f..5a4e0270957 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -5078,6 +5078,14 @@ reshape_init_class (tree type, reshape_iter *d, bool first_initializer_p, /* Handle designated initializers, as an extension. */ if (d->cur->index) { + if (TREE_CODE (d->cur->index) == INTEGER_CST) + { + if (complain & tf_error) + error ("%<[%E] =%> used in a GNU-style designated initializer" + " for class %qT", d->cur->index, type); + return error_mark_node; + } + field = lookup_field_1 (type, d->cur->index, /*want_type=*/false); if (!field || TREE_CODE (field) != FIELD_DECL) @@ -9963,6 +9971,12 @@ grokdeclarator (const cp_declarator *declarator, } else if (decl_context == FIELD) { + if (!staticp && type_uses_auto (type)) + { + error ("non-static data member declared %<auto%>"); + type = error_mark_node; + } + /* The C99 flexible array extension. */ if (!staticp && TREE_CODE (type) == ARRAY_TYPE && TYPE_DOMAIN (type) == NULL_TREE) diff --git a/gcc/cp/init.c b/gcc/cp/init.c index e1eb681de67..e93e82cac57 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -333,7 +333,8 @@ build_value_init (tree type, tsubst_flags_t complain) constructor. */ /* The AGGR_INIT_EXPR tweaking below breaks in templates. */ - gcc_assert (!processing_template_decl || SCALAR_TYPE_P (type)); + gcc_assert (!processing_template_decl + || (SCALAR_TYPE_P (type) || TREE_CODE (type) == ARRAY_TYPE)); if (CLASS_TYPE_P (type)) { diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index daf2ded45dc..2985d765a9f 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -3554,7 +3554,7 @@ lookup_literal_operator (tree name, VEC(tree,gc) *args) { tree decl, fns; decl = lookup_name (name); - if (!decl || decl == error_mark_node) + if (!decl || !is_overloaded_fn (decl)) return error_mark_node; for (fns = decl; fns; fns = OVL_NEXT (fns)) @@ -17737,7 +17737,8 @@ cp_parser_initializer_list (cp_parser* parser, bool* non_constant_p) designator = cp_parser_constant_expression (parser, false, NULL); cp_parser_require (parser, CPP_CLOSE_SQUARE, RT_CLOSE_SQUARE); cp_parser_require (parser, CPP_EQ, RT_EQ); - cp_parser_parse_definitely (parser); + if (!cp_parser_parse_definitely (parser)) + designator = NULL_TREE; } else designator = NULL_TREE; @@ -26304,7 +26305,7 @@ cp_parser_omp_for_loop (cp_parser *parser, tree clauses, tree *par_clauses) /* If decl is an iterator, preserve the operator on decl until finish_omp_for. */ if (decl - && ((type_dependent_expression_p (decl) + && ((processing_template_decl && !POINTER_TYPE_P (TREE_TYPE (decl))) || CLASS_TYPE_P (TREE_TYPE (decl)))) incr = cp_parser_omp_for_incr (parser, decl); diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 7603c1151e5..bb5aa0c1484 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -2976,6 +2976,20 @@ find_parameter_packs_r (tree *tp, int *walk_subtrees, void* data) (struct find_parameter_pack_data*)data; bool parameter_pack_p = false; + /* Handle type aliases/typedefs. */ + if (TYPE_P (t) + && TYPE_NAME (t) + && TREE_CODE (TYPE_NAME (t)) == TYPE_DECL + && TYPE_DECL_ALIAS_P (TYPE_NAME (t))) + { + if (TYPE_TEMPLATE_INFO (t)) + cp_walk_tree (&TYPE_TI_ARGS (t), + &find_parameter_packs_r, + ppd, ppd->visited); + *walk_subtrees = 0; + return NULL_TREE; + } + /* Identify whether this is a parameter pack or not. */ switch (TREE_CODE (t)) { @@ -4905,7 +4919,10 @@ push_template_decl_real (tree decl, bool is_friend) if (check_for_bare_parameter_packs (TYPE_RAISES_EXCEPTIONS (type))) TYPE_RAISES_EXCEPTIONS (type) = NULL_TREE; } - else if (check_for_bare_parameter_packs (TREE_TYPE (decl))) + else if (check_for_bare_parameter_packs ((TREE_CODE (decl) == TYPE_DECL + && TYPE_DECL_ALIAS_P (decl)) + ? DECL_ORIGINAL_TYPE (decl) + : TREE_TYPE (decl))) { TREE_TYPE (decl) = error_mark_node; return error_mark_node; @@ -12810,6 +12827,11 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl, && ANON_AGGR_TYPE_P (TREE_TYPE (decl))) /* Anonymous aggregates are a special case. */ finish_anon_union (decl); + else if (is_capture_proxy (DECL_EXPR_DECL (t))) + { + DECL_CONTEXT (decl) = current_function_decl; + insert_capture_proxy (decl); + } else { int const_init = false; diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 9a1043a1a9b..2dab6a722a6 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -8804,7 +8804,7 @@ is_normal_capture_proxy (tree decl) /* VAR is a capture proxy created by build_capture_proxy; add it to the current function, which is the operator() for the appropriate lambda. */ -static inline void +void insert_capture_proxy (tree var) { cp_binding_level *b; diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 8d179d8d2a0..7899397cdd8 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -3479,17 +3479,6 @@ cp_free_lang_data (tree t) DECL_EXTERNAL (t) = 1; TREE_STATIC (t) = 0; } - if (CP_AGGREGATE_TYPE_P (t) - && TYPE_NAME (t)) - { - tree name = TYPE_NAME (t); - if (TREE_CODE (name) == TYPE_DECL) - name = DECL_NAME (name); - /* Drop anonymous names. */ - if (name != NULL_TREE - && ANON_AGGRNAME_P (name)) - TYPE_NAME (t) = NULL_TREE; - } if (TREE_CODE (t) == NAMESPACE_DECL) { /* The list of users of a namespace isn't useful for the middle-end diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 9a5365c612c..4973d7d72ce 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -5517,8 +5517,10 @@ build_x_conditional_expr (tree ifexp, tree op1, tree op2, { tree min = build_min_non_dep (COND_EXPR, expr, orig_ifexp, orig_op1, orig_op2); - /* Remember that the result is an lvalue or xvalue. */ - if (lvalue_or_rvalue_with_address_p (expr) + /* In C++11, remember that the result is an lvalue or xvalue. + In C++98, lvalue_kind can just assume lvalue in a template. */ + if (cxx_dialect >= cxx0x + && lvalue_or_rvalue_with_address_p (expr) && !lvalue_or_rvalue_with_address_p (min)) TREE_TYPE (min) = cp_build_reference_type (TREE_TYPE (min), !real_lvalue_p (expr)); diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index 2db3248d028..4648e756481 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -428,15 +428,20 @@ cxx_incomplete_type_diagnostic (const_tree value, const_tree type, case OFFSET_TYPE: bad_member: - if (DECL_FUNCTION_MEMBER_P (TREE_OPERAND (value, 1)) - && ! flag_ms_extensions) - emit_diagnostic (diag_kind, input_location, 0, - "invalid use of member function " - "(did you forget the %<()%> ?)"); - else - emit_diagnostic (diag_kind, input_location, 0, - "invalid use of member " - "(did you forget the %<&%> ?)"); + { + tree member = TREE_OPERAND (value, 1); + if (is_overloaded_fn (member)) + member = get_first_fn (member); + if (DECL_FUNCTION_MEMBER_P (member) + && ! flag_ms_extensions) + emit_diagnostic (diag_kind, input_location, 0, + "invalid use of member function " + "(did you forget the %<()%> ?)"); + else + emit_diagnostic (diag_kind, input_location, 0, + "invalid use of member " + "(did you forget the %<&%> ?)"); + } break; case TEMPLATE_TYPE_PARM: diff --git a/gcc/dse.c b/gcc/dse.c index 13d2f27ca23..c4207df08ec 100644 --- a/gcc/dse.c +++ b/gcc/dse.c @@ -1950,7 +1950,7 @@ get_stored_val (store_info_t store_info, enum machine_mode read_mode, c |= (c << shift); shift <<= 1; } - read_reg = GEN_INT (trunc_int_for_mode (c, store_mode)); + read_reg = gen_int_mode (c, store_mode); read_reg = extract_low_bits (read_mode, store_mode, read_reg); } } @@ -2459,7 +2459,7 @@ get_call_args (rtx call_insn, tree fn, rtx *args, int nargs) { if (!tmp || !CONST_INT_P (tmp)) return false; - tmp = GEN_INT (trunc_int_for_mode (INTVAL (tmp), mode)); + tmp = gen_int_mode (INTVAL (tmp), mode); } if (tmp) args[idx] = tmp; diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 4a27a058b83..a537374fbad 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -5004,6 +5004,17 @@ set_unique_reg_note (rtx insn, enum reg_note kind, rtx datum) return REG_NOTES (insn); } + +/* Like set_unique_reg_note, but don't do anything unless INSN sets DST. */ +rtx +set_dst_reg_note (rtx insn, enum reg_note kind, rtx datum, rtx dst) +{ + rtx set = single_set (insn); + + if (set && SET_DEST (set) == dst) + return set_unique_reg_note (insn, kind, datum); + return NULL_RTX; +} /* Return an indication of which type of insn should have X as a body. The value is CODE_LABEL, INSN, CALL_INSN or JUMP_INSN. */ diff --git a/gcc/expmed.c b/gcc/expmed.c index b3e6d6d1816..bced96e74d4 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -2939,6 +2939,7 @@ expand_mult_const (enum machine_mode mode, rtx op0, HOST_WIDE_INT val, && !optimize) ? target : 0; rtx accum_target = optimize ? 0 : accum; + rtx accum_inner; switch (alg->op[opno]) { @@ -3004,16 +3005,18 @@ expand_mult_const (enum machine_mode mode, rtx op0, HOST_WIDE_INT val, that. */ tem = op0, nmode = mode; + accum_inner = accum; if (GET_CODE (accum) == SUBREG) { - nmode = GET_MODE (SUBREG_REG (accum)); + accum_inner = SUBREG_REG (accum); + nmode = GET_MODE (accum_inner); tem = gen_lowpart (nmode, op0); } insn = get_last_insn (); - set_unique_reg_note (insn, REG_EQUAL, - gen_rtx_MULT (nmode, tem, - GEN_INT (val_so_far))); + set_dst_reg_note (insn, REG_EQUAL, + gen_rtx_MULT (nmode, tem, GEN_INT (val_so_far)), + accum_inner); } if (variant == negate_variant) @@ -3823,7 +3826,7 @@ expand_divmod (int rem_flag, enum tree_code code, enum machine_mode mode, rtx quotient = 0, remainder = 0; rtx last; int size; - rtx insn, set; + rtx insn; optab optab1, optab2; int op1_is_constant, op1_is_pow2 = 0; int max_cost, extra_cost; @@ -4127,12 +4130,10 @@ expand_divmod (int rem_flag, enum tree_code code, enum machine_mode mode, break; insn = get_last_insn (); - if (insn != last - && (set = single_set (insn)) != 0 - && SET_DEST (set) == quotient) - set_unique_reg_note (insn, - REG_EQUAL, - gen_rtx_UDIV (compute_mode, op0, op1)); + if (insn != last) + set_dst_reg_note (insn, REG_EQUAL, + gen_rtx_UDIV (compute_mode, op0, op1), + quotient); } else /* TRUNC_DIV, signed */ { @@ -4211,18 +4212,14 @@ expand_divmod (int rem_flag, enum tree_code code, enum machine_mode mode, { insn = get_last_insn (); if (insn != last - && (set = single_set (insn)) != 0 - && SET_DEST (set) == quotient && abs_d < ((unsigned HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT - 1))) - set_unique_reg_note (insn, - REG_EQUAL, - gen_rtx_DIV (compute_mode, - op0, - GEN_INT - (trunc_int_for_mode - (abs_d, - compute_mode)))); + set_dst_reg_note (insn, REG_EQUAL, + gen_rtx_DIV (compute_mode, op0, + gen_int_mode + (abs_d, + compute_mode)), + quotient); quotient = expand_unop (compute_mode, neg_optab, quotient, quotient, 0); @@ -4309,12 +4306,10 @@ expand_divmod (int rem_flag, enum tree_code code, enum machine_mode mode, break; insn = get_last_insn (); - if (insn != last - && (set = single_set (insn)) != 0 - && SET_DEST (set) == quotient) - set_unique_reg_note (insn, - REG_EQUAL, - gen_rtx_DIV (compute_mode, op0, op1)); + if (insn != last) + set_dst_reg_note (insn, REG_EQUAL, + gen_rtx_DIV (compute_mode, op0, op1), + quotient); } break; } @@ -4732,11 +4727,10 @@ expand_divmod (int rem_flag, enum tree_code code, enum machine_mode mode, NULL_RTX, 1); insn = get_last_insn (); - set_unique_reg_note (insn, - REG_EQUAL, - gen_rtx_fmt_ee (unsignedp ? UDIV : DIV, - compute_mode, - op0, op1)); + set_dst_reg_note (insn, REG_EQUAL, + gen_rtx_fmt_ee (unsignedp ? UDIV : DIV, + compute_mode, op0, op1), + quotient); } break; diff --git a/gcc/expr.c b/gcc/expr.c index 6722af01616..aa78468a96b 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -4544,27 +4544,6 @@ get_bit_range (unsigned HOST_WIDE_INT *bitstart, } } -/* Return the alignment of the object EXP, also considering its type - when we do not know of explicit misalignment. - ??? Note that, in the general case, the type of an expression is not kept - consistent with misalignment information by the front-end, for - example when taking the address of a member of a packed structure. - However, in most of the cases, expressions have the alignment of - their type, so we optimistically fall back to the alignment of the - type when we cannot compute a misalignment. */ - -static unsigned int -get_object_or_type_alignment (tree exp) -{ - unsigned HOST_WIDE_INT misalign; - unsigned int align = get_object_alignment_1 (exp, &misalign); - if (misalign != 0) - align = (misalign & -misalign); - else - align = MAX (TYPE_ALIGN (TREE_TYPE (exp)), align); - return align; -} - /* Expand an assignment that stores the value of FROM into TO. If NONTEMPORAL is true, try generating a nontemporal store. */ @@ -8737,6 +8716,23 @@ expand_expr_real_2 (sepops ops, rtx target, enum machine_mode tmode, case VEC_PERM_EXPR: expand_operands (treeop0, treeop1, target, &op0, &op1, EXPAND_NORMAL); op2 = expand_normal (treeop2); + + /* Careful here: if the target doesn't support integral vector modes, + a constant selection vector could wind up smooshed into a normal + integral constant. */ + if (CONSTANT_P (op2) && GET_CODE (op2) != CONST_VECTOR) + { + tree sel_type = TREE_TYPE (treeop2); + enum machine_mode vmode + = mode_for_vector (TYPE_MODE (TREE_TYPE (sel_type)), + TYPE_VECTOR_SUBPARTS (sel_type)); + gcc_assert (GET_MODE_CLASS (vmode) == MODE_VECTOR_INT); + op2 = simplify_subreg (vmode, op2, TYPE_MODE (sel_type), 0); + gcc_assert (op2 && GET_CODE (op2) == CONST_VECTOR); + } + else + gcc_assert (GET_MODE_CLASS (GET_MODE (op2)) == MODE_VECTOR_INT); + temp = expand_vec_perm (mode, op0, op1, op2, target); gcc_assert (temp); return temp; @@ -10563,15 +10559,22 @@ do_store_flag (sepops ops, rtx target, enum machine_mode mode) so we just call into the folder and expand its result. */ if ((code == NE || code == EQ) - && TREE_CODE (arg0) == BIT_AND_EXPR && integer_zerop (arg1) - && integer_pow2p (TREE_OPERAND (arg0, 1)) + && integer_zerop (arg1) && (TYPE_PRECISION (ops->type) != 1 || TYPE_UNSIGNED (ops->type))) { - tree type = lang_hooks.types.type_for_mode (mode, unsignedp); - return expand_expr (fold_single_bit_test (loc, - code == NE ? NE_EXPR : EQ_EXPR, - arg0, arg1, type), - target, VOIDmode, EXPAND_NORMAL); + gimple srcstmt = get_def_for_expr (arg0, BIT_AND_EXPR); + if (srcstmt + && integer_pow2p (gimple_assign_rhs2 (srcstmt))) + { + enum tree_code tcode = code == NE ? NE_EXPR : EQ_EXPR; + tree type = lang_hooks.types.type_for_mode (mode, unsignedp); + tree temp = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (arg1), + gimple_assign_rhs1 (srcstmt), + gimple_assign_rhs2 (srcstmt)); + temp = fold_single_bit_test (loc, tcode, temp, arg1, type); + if (temp) + return expand_expr (temp, target, VOIDmode, EXPAND_NORMAL); + } } if (! get_subtarget (target) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 6959a70319c..2cab0db376c 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,170 @@ +2011-12-11 Tobias Burnus <burnus@net-b.de> + + PR fortran/50923 + * trans-decl.c (generate_local_decl): Set TREE_NO_WARNING only + if the front end has printed a warning. + (gfc_generate_function_code): Fix unset-result warning. + +2011-12-11 Paul Thomas <pault@gcc.gnu.org> + Tobias Burnus <burnus@gcc.gnu.org> + + PR fortran/41539 + PR fortran/43214 + PR fortran/43969 + PR fortran/44568 + PR fortran/46356 + PR fortran/46990 + PR fortran/49074 + * interface.c(symbol_rank): Return the rank of the _data + component of class objects. + (compare_parameter): Also compare the derived type of the class + _data component for type mismatch. Similarly, return 1 if the + formal and _data ranks match. + (compare_actual_formal): Do not compare storage sizes for class + expressions. It is an error if an actual class array, passed to + a formal class array is not full. + * trans-expr.c (gfc_class_data_get, gfc_class_vptr_get, + gfc_vtable_field_get, gfc_vtable_hash_get, gfc_vtable_size_get, + gfc_vtable_extends_get, gfc_vtable_def_init_get, + gfc_vtable_copy_get): New functions for class API. + (gfc_conv_derived_to_class): For an array reference in an + elemental procedure call retain the ss to provide the + scalarized array reference. Moved in file. + (gfc_conv_class_to_class): New function. + (gfc_conv_subref_array_arg): Use the type of the + class _data component as a basetype. + (gfc_conv_procedure_call): Ensure that class array expressions + have both the _data reference and an array reference. Use + gfc_conv_class_to_class to handle class arrays for elemental + functions in scalarized loops, class array elements and full + class arrays. Use a call to gfc_conv_subref_array_arg in order + that the copy-in/copy-out for passing class arrays to derived + type arrays occurs correctly. + (gfc_conv_expr): If it is missing, add the _data component + between a class object or component and an array reference. + (gfc_trans_class_array_init_assign): New function. + (gfc_trans_class_init_assign): Call it for array expressions. + * trans-array.c (gfc_add_loop_ss_code): Do not use a temp for + class scalars since their size will depend on the dynamic type. + (build_class_array_ref): New function. + (gfc_conv_scalarized_array_ref): Call build_class_array_ref. + (gfc_array_init_size): Add extra argument, expr3, that represents + the SOURCE argument. If present,use this for the element size. + (gfc_array_allocate): Also add argument expr3 and use it when + calling gfc_array_init_size. + (structure_alloc_comps): Enable class arrays. + * class.c (gfc_add_component_ref): Carry over the derived type + of the _data component. + (gfc_add_class_array_ref): New function. + (class_array_ref_detected): New static function. + (gfc_is_class_array_ref): New function that calls previous. + (gfc_is_class_scalar_expr): New function. + (gfc_build_class_symbol): Throw not implemented error for + assumed size class arrays. Remove error that prevents + CLASS arrays. + (gfc_build_class_symbol): Prevent pointer/allocatable conflict. + Also unset codimension. + (gfc_find_derived_vtab): Make 'copy' elemental and set the + intent of the arguments accordingly.: + * trans-array.h : Update prototype for gfc_array_allocate. + * array.c (gfc_array_dimen_size): Return failure if class expr. + (gfc_array_size): Likewise. + * gfortran.h : New prototypes for gfc_add_class_array_ref, + gfc_is_class_array_ref and gfc_is_class_scalar_expr. + * trans-stmt.c (trans_associate_var): Exclude class targets + from test. Move the allocation of the _vptr to an earlier time + for class objects. + (trans_associate_var): Assign the descriptor directly for class + arrays. + (gfc_trans_allocate): Add expr3 to gfc_array_allocate arguments. + Convert array element references into sections. Do not invoke + gfc_conv_procedure_call, use gfc_trans_call instead. + * expr.c (gfc_get_corank): Fix for BT_CLASS. + (gfc_is_simply_contiguous): Exclude class from test. + * trans.c (gfc_build_array_ref): Include class array refs. + * trans.h : Include prototypes for class API functions that are + new in trans-expr. Define GFC_DECL_CLASS(node). + * resolve.c (check_typebound_baseobject ): Remove error for + non-scalar base object. + (resolve_allocate_expr): Ensure that class _data component is + present. If array, call gfc_expr_to_intialize. + (resolve_select): Remove scalar error for SELECT statement as a + temporary measure. + (resolve_assoc_var): Update 'target' (aka 'selector') as + needed. Ensure that the target expression has the right rank. + (resolve_select_type): Ensure that target expressions have a + valid locus. + (resolve_allocate_expr, resolve_fl_derived0): Fix for BT_CLASS. + * trans-decl.c (gfc_get_symbol_decl): Set GFC_DECL_CLASS, where + appropriate. + (gfc_trans_deferred_vars): Get class arrays right. + * match.c(select_type_set_tmp): Add array spec to temporary. + (gfc_match_select_type): Allow class arrays. + * check.c (array_check): Ensure that class arrays have refs. + (dim_corank_check, dim_rank_check): Retrun success if class. + * primary.c (gfc_match_varspec): Fix for class arrays and + co-arrays. Make sure that class _data is present. + (gfc_match_rvalue): Handle class arrays. + *trans-intrinsic.c (gfc_conv_intrinsic_size): Add class array + reference. + (gfc_conv_allocated): Add _data component to class expressions. + (gfc_add_intrinsic_ss_code): ditto. + * simplify.c (simplify_cobound): Fix for BT_CLASS. + (simplify_bound): Return NULL for class arrays. + (simplify_cobound): Obtain correct array_spec. Use cotype as + appropriate. Use arrayspec for bounds. + +2011-12-11 Thomas Koenig <tkoenig@gcc.gnu.org> + + PR fortran/50690 + * frontend-passes.c (in_omp_workshare): New variable. + (cfe_expr_0): Don't eliminiate common function if it would put + the variable immediately into a WORKSHARE construct. + (optimize_namespace): Set in_omp_workshare. + (gfc_code_walker): Keep track of OMP PARALLEL and OMP WORKSHARE + constructs. + +2011-12-10 Tobias Burnus <burnus@net-b.de> + + * trans-decl.c (add_argument_checking): Fix syntax. + +2011-12-10 Tobias Burnus <burnus@net-b.de> + Kai Tietz <ktietz@redhat.com> + + * trans-decl.c (add_argument_checking): Check ts.deferred earlier. + * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use %ld with long. + +2011-12-08 Tobias Burnus <burnus@net-b.de> + + PR fortran/50815 + * trans-decl.c (add_argument_checking): Skip bound checking + for deferred-length strings. + +2011-12-08 Tobias Burnus <burnus@net-b.de> + + PR fortran/51378 + * symbol.c (gfc_find_component): Fix access check of parent + components. + +2011-12-08 Tobias Burnus <burnus@net-b.de> + + PR fortran/51407 + * io/transfer.c (require_numeric_type): New function. + (formatted_transfer_scalar_read, formatted_transfer_scalar_write): + Use it, allow BOZ edit descriptors with F2008. + +2011-12-08 Tobias Burnus <burnus@net-b.de> + + PR fortran/51448 + * fortran/trans-array.c (get_std_lbound): Fix handling of + conversion functions. + +2011-12-08 Toon Moene <toon@moene.org> + + PR fortran/51310 + * invoke.texi: Itemize the cases for which + -finit-<type>=<constant> doesn't work. + 2011-12-06 Tobias Burnus <burnus@net-b.de> PR fortran/51435 diff --git a/gcc/fortran/array.c b/gcc/fortran/array.c index a1449fd8c9e..b36d517cff7 100644 --- a/gcc/fortran/array.c +++ b/gcc/fortran/array.c @@ -2112,6 +2112,9 @@ gfc_array_dimen_size (gfc_expr *array, int dimen, mpz_t *result) gfc_ref *ref; int i; + if (array->ts.type == BT_CLASS) + return FAILURE; + if (dimen < 0 || array == NULL || dimen > array->rank - 1) gfc_internal_error ("gfc_array_dimen_size(): Bad dimension"); @@ -2190,6 +2193,9 @@ gfc_array_size (gfc_expr *array, mpz_t *result) int i; gfc_try t; + if (array->ts.type == BT_CLASS) + return FAILURE; + switch (array->expr_type) { case EXPR_ARRAY: diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index f2c4272681e..dca97cba7eb 100644 --- a/gcc/fortran/check.c +++ b/gcc/fortran/check.c @@ -240,6 +240,14 @@ logical_array_check (gfc_expr *array, int n) static gfc_try array_check (gfc_expr *e, int n) { + if (e->ts.type == BT_CLASS + && CLASS_DATA (e)->attr.dimension + && CLASS_DATA (e)->as->rank) + { + gfc_add_class_array_ref (e); + return SUCCESS; + } + if (e->rank != 0) return SUCCESS; @@ -554,6 +562,9 @@ dim_corank_check (gfc_expr *dim, gfc_expr *array) if (dim->expr_type != EXPR_CONSTANT) return SUCCESS; + + if (array->ts.type == BT_CLASS) + return SUCCESS; corank = gfc_get_corank (array); @@ -587,6 +598,9 @@ dim_rank_check (gfc_expr *dim, gfc_expr *array, int allow_assumed) if (dim->expr_type != EXPR_CONSTANT) return SUCCESS; + if (array->ts.type == BT_CLASS) + return SUCCESS; + if (array->expr_type == EXPR_FUNCTION && array->value.function.isym && array->value.function.isym->id == GFC_ISYM_SPREAD) rank = array->rank + 1; diff --git a/gcc/fortran/class.c b/gcc/fortran/class.c index d3f7bf3ab4c..37c653a6c33 100644 --- a/gcc/fortran/class.c +++ b/gcc/fortran/class.c @@ -64,7 +64,14 @@ gfc_add_component_ref (gfc_expr *e, const char *name) while (*tail != NULL) { if ((*tail)->type == REF_COMPONENT) - derived = (*tail)->u.c.component->ts.u.derived; + { + if (strcmp ((*tail)->u.c.component->name, "_data") == 0 + && (*tail)->next + && (*tail)->next->type == REF_ARRAY + && (*tail)->next->next == NULL) + return; + derived = (*tail)->u.c.component->ts.u.derived; + } if ((*tail)->type == REF_ARRAY && (*tail)->next == NULL) break; tail = &((*tail)->next); @@ -82,6 +89,155 @@ gfc_add_component_ref (gfc_expr *e, const char *name) } +/* This is used to add both the _data component reference and an array + reference to class expressions. Used in translation of intrinsic + array inquiry functions. */ + +void +gfc_add_class_array_ref (gfc_expr *e) +{ + int rank = CLASS_DATA (e)->as->rank; + gfc_array_spec *as = CLASS_DATA (e)->as; + gfc_ref *ref = NULL; + gfc_add_component_ref (e, "_data"); + e->rank = rank; + for (ref = e->ref; ref; ref = ref->next) + if (!ref->next) + break; + if (ref->type != REF_ARRAY) + { + ref->next = gfc_get_ref (); + ref = ref->next; + ref->type = REF_ARRAY; + ref->u.ar.type = AR_FULL; + ref->u.ar.as = as; + } +} + + +/* Unfortunately, class array expressions can appear in various conditions; + with and without both _data component and an arrayspec. This function + deals with that variability. The previous reference to 'ref' is to a + class array. */ + +static bool +class_array_ref_detected (gfc_ref *ref, bool *full_array) +{ + bool no_data = false; + bool with_data = false; + + /* An array reference with no _data component. */ + if (ref && ref->type == REF_ARRAY + && !ref->next + && ref->u.ar.type != AR_ELEMENT) + { + if (full_array) + *full_array = ref->u.ar.type == AR_FULL; + no_data = true; + } + + /* Cover cases where _data appears, with or without an array ref. */ + if (ref && ref->type == REF_COMPONENT + && strcmp (ref->u.c.component->name, "_data") == 0) + { + if (!ref->next) + { + with_data = true; + if (full_array) + *full_array = true; + } + else if (ref->next && ref->next->type == REF_ARRAY + && !ref->next->next + && ref->type == REF_COMPONENT + && ref->next->type == REF_ARRAY + && ref->next->u.ar.type != AR_ELEMENT) + { + with_data = true; + if (full_array) + *full_array = ref->next->u.ar.type == AR_FULL; + } + } + + return no_data || with_data; +} + + +/* Returns true if the expression contains a reference to a class + array. Notice that class array elements return false. */ + +bool +gfc_is_class_array_ref (gfc_expr *e, bool *full_array) +{ + gfc_ref *ref; + + if (!e->rank) + return false; + + if (full_array) + *full_array= false; + + /* Is this a class array object? ie. Is the symbol of type class? */ + if (e->symtree + && e->symtree->n.sym->ts.type == BT_CLASS + && CLASS_DATA (e->symtree->n.sym) + && CLASS_DATA (e->symtree->n.sym)->attr.dimension + && class_array_ref_detected (e->ref, full_array)) + return true; + + /* Or is this a class array component reference? */ + for (ref = e->ref; ref; ref = ref->next) + { + if (ref->type == REF_COMPONENT + && ref->u.c.component->ts.type == BT_CLASS + && CLASS_DATA (ref->u.c.component)->attr.dimension + && class_array_ref_detected (ref->next, full_array)) + return true; + } + + return false; +} + + +/* Returns true if the expression is a reference to a class + scalar. This function is necessary because such expressions + can be dressed with a reference to the _data component and so + have a type other than BT_CLASS. */ + +bool +gfc_is_class_scalar_expr (gfc_expr *e) +{ + gfc_ref *ref; + + if (e->rank) + return false; + + /* Is this a class object? */ + if (e->symtree + && e->symtree->n.sym->ts.type == BT_CLASS + && CLASS_DATA (e->symtree->n.sym) + && !CLASS_DATA (e->symtree->n.sym)->attr.dimension + && (e->ref == NULL + || (strcmp (e->ref->u.c.component->name, "_data") == 0 + && e->ref->next == NULL))) + return true; + + /* Or is the final reference BT_CLASS or _data? */ + for (ref = e->ref; ref; ref = ref->next) + { + if (ref->type == REF_COMPONENT + && ref->u.c.component->ts.type == BT_CLASS + && CLASS_DATA (ref->u.c.component) + && !CLASS_DATA (ref->u.c.component)->attr.dimension + && (ref->next == NULL + || (strcmp (ref->next->u.c.component->name, "_data") == 0 + && ref->next->next == NULL))) + return true; + } + + return false; +} + + /* Build a NULL initializer for CLASS pointers, initializing the _data component to NULL and the _vptr component to the declared type. */ @@ -183,7 +339,14 @@ gfc_build_class_symbol (gfc_typespec *ts, symbol_attribute *attr, gfc_symbol *fclass; gfc_symbol *vtab; gfc_component *c; - + + if (as && *as && (*as)->type == AS_ASSUMED_SIZE) + { + gfc_error ("Assumed size polymorphic objects or components, such " + "as that at %C, have not yet been implemented"); + return FAILURE; + } + if (attr->class_ok) /* Class container has already been built. */ return SUCCESS; @@ -195,12 +358,6 @@ gfc_build_class_symbol (gfc_typespec *ts, symbol_attribute *attr, /* We can not build the class container yet. */ return SUCCESS; - if (*as) - { - gfc_fatal_error ("Polymorphic array at %C not yet supported"); - return FAILURE; - } - /* Determine the name of the encapsulating type. */ get_unique_hashed_string (tname, ts->u.derived); if ((*as) && (*as)->rank && attr->allocatable) @@ -277,8 +434,8 @@ gfc_build_class_symbol (gfc_typespec *ts, symbol_attribute *attr, fclass->attr.extension = ts->u.derived->attr.extension + 1; fclass->attr.is_class = 1; ts->u.derived = fclass; - attr->allocatable = attr->pointer = attr->dimension = 0; - (*as) = NULL; /* XXX */ + attr->allocatable = attr->pointer = attr->dimension = attr->codimension = 0; + (*as) = NULL; return SUCCESS; } @@ -402,7 +559,7 @@ gfc_find_derived_vtab (gfc_symbol *derived) gfc_namespace *ns; gfc_symbol *vtab = NULL, *vtype = NULL, *found_sym = NULL, *def_init = NULL; gfc_symbol *copy = NULL, *src = NULL, *dst = NULL; - + /* Find the top-level namespace (MODULE or PROGRAM). */ for (ns = gfc_current_ns; ns; ns = ns->parent) if (!ns->parent) @@ -556,6 +713,9 @@ gfc_find_derived_vtab (gfc_symbol *derived) copy->attr.flavor = FL_PROCEDURE; copy->attr.subroutine = 1; copy->attr.if_source = IFSRC_DECL; + /* This is elemental so that arrays are automatically + treated correctly by the scalarizer. */ + copy->attr.elemental = 1; if (ns->proc_name->attr.flavor == FL_MODULE) copy->module = ns->proc_name->name; gfc_set_sym_referenced (copy); @@ -565,6 +725,7 @@ gfc_find_derived_vtab (gfc_symbol *derived) src->ts.u.derived = derived; src->attr.flavor = FL_VARIABLE; src->attr.dummy = 1; + src->attr.intent = INTENT_IN; gfc_set_sym_referenced (src); copy->formal = gfc_get_formal_arglist (); copy->formal->sym = src; @@ -573,6 +734,7 @@ gfc_find_derived_vtab (gfc_symbol *derived) dst->ts.u.derived = derived; dst->attr.flavor = FL_VARIABLE; dst->attr.dummy = 1; + dst->attr.intent = INTENT_OUT; gfc_set_sym_referenced (dst); copy->formal->next = gfc_get_formal_arglist (); copy->formal->next->sym = dst; diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index f3c367c5e7d..d8ae04f0494 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -4309,7 +4309,11 @@ gfc_get_corank (gfc_expr *e) if (!gfc_is_coarray (e)) return 0; - corank = e->symtree->n.sym->as ? e->symtree->n.sym->as->corank : 0; + if (e->ts.type == BT_CLASS && e->ts.u.derived->components) + corank = e->ts.u.derived->components->as + ? e->ts.u.derived->components->as->corank : 0; + else + corank = e->symtree->n.sym->as ? e->symtree->n.sym->as->corank : 0; for (ref = e->ref; ref; ref = ref->next) { @@ -4394,6 +4398,7 @@ gfc_is_simply_contiguous (gfc_expr *expr, bool strict) int i; gfc_array_ref *ar = NULL; gfc_ref *ref, *part_ref = NULL; + gfc_symbol *sym; if (expr->expr_type == EXPR_FUNCTION) return expr->value.function.esym @@ -4417,11 +4422,15 @@ gfc_is_simply_contiguous (gfc_expr *expr, bool strict) ar = &ref->u.ar; } - if ((part_ref && !part_ref->u.c.component->attr.contiguous - && part_ref->u.c.component->attr.pointer) - || (!part_ref && !expr->symtree->n.sym->attr.contiguous - && (expr->symtree->n.sym->attr.pointer - || expr->symtree->n.sym->as->type == AS_ASSUMED_SHAPE))) + sym = expr->symtree->n.sym; + if (expr->ts.type != BT_CLASS + && ((part_ref + && !part_ref->u.c.component->attr.contiguous + && part_ref->u.c.component->attr.pointer) + || (!part_ref + && !sym->attr.contiguous + && (sym->attr.pointer + || sym->as->type == AS_ASSUMED_SHAPE)))) return false; if (!ar || ar->type == AR_FULL) diff --git a/gcc/fortran/frontend-passes.c b/gcc/fortran/frontend-passes.c index a19f22deac5..ab33a2f17a9 100644 --- a/gcc/fortran/frontend-passes.c +++ b/gcc/fortran/frontend-passes.c @@ -66,6 +66,10 @@ static gfc_namespace *current_ns; static int forall_level; +/* Keep track of whether we are within an OMP workshare. */ + +static bool in_omp_workshare; + /* Entry point - run all passes for a namespace. So far, only an optimization pass is run. */ @@ -367,6 +371,14 @@ cfe_expr_0 (gfc_expr **e, int *walk_subtrees, int i,j; gfc_expr *newvar; + /* Don't do this optimization within OMP workshare. */ + + if (in_omp_workshare) + { + *walk_subtrees = 0; + return 0; + } + expr_count = 0; gfc_expr_walker (e, cfe_register_funcs, NULL); @@ -505,6 +517,7 @@ optimize_namespace (gfc_namespace *ns) current_ns = ns; forall_level = 0; + in_omp_workshare = false; gfc_code_walker (&ns->code, convert_do_while, dummy_expr_callback, NULL); gfc_code_walker (&ns->code, cfe_code, cfe_expr_0, NULL); @@ -1150,11 +1163,13 @@ gfc_code_walker (gfc_code **c, walk_code_fn_t codefn, walk_expr_fn_t exprfn, gfc_actual_arglist *a; gfc_code *co; gfc_association_list *alist; + bool saved_in_omp_workshare; /* There might be statement insertions before the current code, which must not affect the expression walker. */ co = *c; + saved_in_omp_workshare = in_omp_workshare; switch (co->op) { @@ -1330,16 +1345,34 @@ gfc_code_walker (gfc_code **c, walk_code_fn_t codefn, walk_expr_fn_t exprfn, WALK_SUBEXPR (co->ext.dt->extra_comma); break; - case EXEC_OMP_DO: case EXEC_OMP_PARALLEL: case EXEC_OMP_PARALLEL_DO: case EXEC_OMP_PARALLEL_SECTIONS: + + in_omp_workshare = false; + + /* This goto serves as a shortcut to avoid code + duplication or a larger if or switch statement. */ + goto check_omp_clauses; + + case EXEC_OMP_WORKSHARE: case EXEC_OMP_PARALLEL_WORKSHARE: + + in_omp_workshare = true; + + /* Fall through */ + + case EXEC_OMP_DO: case EXEC_OMP_SECTIONS: case EXEC_OMP_SINGLE: - case EXEC_OMP_WORKSHARE: case EXEC_OMP_END_SINGLE: case EXEC_OMP_TASK: + + /* Come to this label only from the + EXEC_OMP_PARALLEL_* cases above. */ + + check_omp_clauses: + if (co->ext.omp_clauses) { WALK_SUBEXPR (co->ext.omp_clauses->if_expr); @@ -1366,6 +1399,7 @@ gfc_code_walker (gfc_code **c, walk_code_fn_t codefn, walk_expr_fn_t exprfn, if (co->op == EXEC_FORALL) forall_level --; + in_omp_workshare = saved_in_omp_workshare; } } return 0; diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index 372c056d3d1..daa28965189 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -2911,11 +2911,14 @@ gfc_try gfc_calculate_transfer_sizes (gfc_expr*, gfc_expr*, gfc_expr*, /* class.c */ void gfc_add_component_ref (gfc_expr *, const char *); +void gfc_add_class_array_ref (gfc_expr *); #define gfc_add_data_component(e) gfc_add_component_ref(e,"_data") #define gfc_add_vptr_component(e) gfc_add_component_ref(e,"_vptr") #define gfc_add_hash_component(e) gfc_add_component_ref(e,"_hash") #define gfc_add_size_component(e) gfc_add_component_ref(e,"_size") #define gfc_add_def_init_component(e) gfc_add_component_ref(e,"_def_init") +bool gfc_is_class_array_ref (gfc_expr *, bool *); +bool gfc_is_class_scalar_expr (gfc_expr *); gfc_expr *gfc_class_null_initializer (gfc_typespec *); unsigned int gfc_hash_value (gfc_symbol *); gfc_try gfc_build_class_symbol (gfc_typespec *, symbol_attribute *, diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index 6d2acce378a..e914c6c7910 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -1541,6 +1541,9 @@ done: static int symbol_rank (gfc_symbol *sym) { + if (sym->ts.type == BT_CLASS && CLASS_DATA (sym)->as) + return CLASS_DATA (sym)->as->rank; + return (sym->as == NULL) ? 0 : sym->as->rank; } @@ -1691,7 +1694,10 @@ compare_parameter (gfc_symbol *formal, gfc_expr *actual, if ((actual->expr_type != EXPR_NULL || actual->ts.type != BT_UNKNOWN) && actual->ts.type != BT_HOLLERITH - && !gfc_compare_types (&formal->ts, &actual->ts)) + && !gfc_compare_types (&formal->ts, &actual->ts) + && !(formal->ts.type == BT_DERIVED && actual->ts.type == BT_CLASS + && gfc_compare_derived_types (formal->ts.u.derived, + CLASS_DATA (actual)->ts.u.derived))) { if (where) gfc_error ("Type mismatch in argument '%s' at %L; passed %s to %s", @@ -1820,6 +1826,10 @@ compare_parameter (gfc_symbol *formal, gfc_expr *actual, if (symbol_rank (formal) == actual->rank) return 1; + if (actual->ts.type == BT_CLASS && CLASS_DATA (actual)->as + && CLASS_DATA (actual)->as->rank == symbol_rank (formal)) + return 1; + rank_check = where != NULL && !is_elemental && formal->as && (formal->as->type == AS_ASSUMED_SHAPE || formal->as->type == AS_DEFERRED) @@ -1829,7 +1839,11 @@ compare_parameter (gfc_symbol *formal, gfc_expr *actual, if (rank_check || ranks_must_agree || (formal->attr.pointer && actual->expr_type != EXPR_NULL) || (actual->rank != 0 && !(is_elemental || formal->attr.dimension)) - || (actual->rank == 0 && formal->as->type == AS_ASSUMED_SHAPE + || (actual->rank == 0 + && ((formal->ts.type == BT_CLASS + && CLASS_DATA (formal)->as->type == AS_ASSUMED_SHAPE) + || (formal->ts.type != BT_CLASS + && formal->as->type == AS_ASSUMED_SHAPE)) && actual->expr_type != EXPR_NULL) || (actual->rank == 0 && formal->attr.dimension && gfc_is_coindexed (actual))) @@ -2158,6 +2172,7 @@ compare_actual_formal (gfc_actual_arglist **ap, gfc_formal_arglist *formal, gfc_formal_arglist *f; int i, n, na; unsigned long actual_size, formal_size; + bool full_array = false; actual = *ap; @@ -2297,6 +2312,9 @@ compare_actual_formal (gfc_actual_arglist **ap, gfc_formal_arglist *formal, return 0; } + if (f->sym->ts.type == BT_CLASS) + goto skip_size_check; + actual_size = get_expr_storage_size (a->expr); formal_size = get_sym_storage_size (f->sym); if (actual_size != 0 && actual_size < formal_size @@ -2316,6 +2334,8 @@ compare_actual_formal (gfc_actual_arglist **ap, gfc_formal_arglist *formal, return 0; } + skip_size_check: + /* Satisfy 12.4.1.3 by ensuring that a procedure pointer actual argument is provided for a procedure pointer formal argument. */ if (f->sym->attr.proc_pointer @@ -2428,6 +2448,18 @@ compare_actual_formal (gfc_actual_arglist **ap, gfc_formal_arglist *formal, return 0; } + if (f->sym->ts.type == BT_CLASS + && CLASS_DATA (f->sym)->attr.allocatable + && gfc_is_class_array_ref (a->expr, &full_array) + && !full_array) + { + if (where) + gfc_error ("Actual CLASS array argument for '%s' must be a full " + "array at %L", f->sym->name, &a->expr->where); + return 0; + } + + if (a->expr->expr_type != EXPR_NULL && compare_allocatable (f->sym, a->expr) == 0) { diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi index 7337f9279ba..f25af405c9a 100644 --- a/gcc/fortran/invoke.texi +++ b/gcc/fortran/invoke.texi @@ -1471,10 +1471,18 @@ initialization options are provided by the the real and imaginary parts of local @code{COMPLEX} variables), @option{-finit-logical=@var{<true|false>}}, and @option{-finit-character=@var{n}} (where @var{n} is an ASCII character -value) options. These options do not initialize components of derived -type variables, nor do they initialize variables that appear in an -@code{EQUIVALENCE} statement. (This limitation may be removed in -future releases). +value) options. These options do not initialize +@itemize @bullet +@item +automatic arrays +@item +allocatable arrays +@item +components of derived type variables +@item +variables that appear in an @code{EQUIVALENCE} statement. +@end itemize +(These limitations may be removed in future releases). Note that the @option{-finit-real=nan} option initializes @code{REAL} and @code{COMPLEX} variables with a quiet NaN. For a signalling NaN diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 3de9c72571e..0e127300150 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -5151,6 +5151,27 @@ select_type_set_tmp (gfc_typespec *ts) sprintf (name, "__tmp_type_%s", ts->u.derived->name); gfc_get_sym_tree (name, gfc_current_ns, &tmp, false); gfc_add_type (tmp->n.sym, ts, NULL); + +/* Copy across the array spec to the selector, taking care as to + whether or not it is a class object or not. */ + if (select_type_stack->selector->ts.type == BT_CLASS && + CLASS_DATA (select_type_stack->selector)->attr.dimension) + { + if (ts->type == BT_CLASS) + { + CLASS_DATA (tmp->n.sym)->attr.dimension = 1; + CLASS_DATA (tmp->n.sym)->as = gfc_get_array_spec (); + CLASS_DATA (tmp->n.sym)->as + = CLASS_DATA (select_type_stack->selector)->as; + } + else + { + tmp->n.sym->attr.dimension = 1; + tmp->n.sym->as = gfc_get_array_spec (); + tmp->n.sym->as = CLASS_DATA (select_type_stack->selector)->as; + } + } + gfc_set_sym_referenced (tmp->n.sym); gfc_add_flavor (&tmp->n.sym->attr, FL_VARIABLE, name, NULL); tmp->n.sym->attr.select_type_temporary = 1; @@ -5176,6 +5197,7 @@ gfc_match_select_type (void) gfc_expr *expr1, *expr2 = NULL; match m; char name[GFC_MAX_SYMBOL_LEN]; + bool class_array; m = gfc_match_label (); if (m == MATCH_ERROR) @@ -5216,8 +5238,24 @@ gfc_match_select_type (void) if (m != MATCH_YES) goto cleanup; + /* This ghastly expression seems to be needed to distinguish a CLASS + array, which can have a reference, from other expressions that + have references, such as derived type components, and are not + allowed by the standard. + TODO; see is it is sufficent to exclude component and substring + references. */ + class_array = expr1->expr_type == EXPR_VARIABLE + && expr1->ts.type != BT_UNKNOWN + && CLASS_DATA (expr1) + && (strcmp (CLASS_DATA (expr1)->name, "_data") == 0) + && CLASS_DATA (expr1)->attr.dimension + && expr1->ref + && expr1->ref->type == REF_ARRAY + && expr1->ref->next == NULL; + /* Check for F03:C811. */ - if (!expr2 && (expr1->expr_type != EXPR_VARIABLE || expr1->ref != NULL)) + if (!expr2 && (expr1->expr_type != EXPR_VARIABLE + || (!class_array && expr1->ref != NULL))) { gfc_error ("Selector in SELECT TYPE at %C is not a named variable; " "use associate-name=>"); diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c index 0f67ec78282..75c7e137187 100644 --- a/gcc/fortran/primary.c +++ b/gcc/fortran/primary.c @@ -1789,13 +1789,17 @@ gfc_match_varspec (gfc_expr *primary, int equiv_flag, bool sub_flag, if (gfc_peek_ascii_char () == '[') { - if (sym->attr.dimension) + if ((sym->ts.type != BT_CLASS && sym->attr.dimension) + || (sym->ts.type == BT_CLASS && CLASS_DATA (sym) + && CLASS_DATA (sym)->attr.dimension)) { gfc_error ("Array section designator, e.g. '(:)', is required " "besides the coarray designator '[...]' at %C"); return MATCH_ERROR; } - if (!sym->attr.codimension) + if ((sym->ts.type != BT_CLASS && !sym->attr.codimension) + || (sym->ts.type == BT_CLASS && CLASS_DATA (sym) + && !CLASS_DATA (sym)->attr.codimension)) { gfc_error ("Coarray designator at %C but '%s' is not a coarray", sym->name); @@ -1827,7 +1831,7 @@ gfc_match_varspec (gfc_expr *primary, int equiv_flag, bool sub_flag, m = gfc_match_array_ref (&tail->u.ar, equiv_flag ? NULL : sym->as, equiv_flag, - sym->ts.type == BT_CLASS + sym->ts.type == BT_CLASS && CLASS_DATA (sym) ? (CLASS_DATA (sym)->as ? CLASS_DATA (sym)->as->corank : 0) : (sym->as ? sym->as->corank : 0)); @@ -2909,6 +2913,22 @@ gfc_match_rvalue (gfc_expr **result) break; } + if (sym->ts.type == BT_CLASS && CLASS_DATA (sym)->attr.dimension) + { + if (gfc_add_flavor (&sym->attr, FL_VARIABLE, + sym->name, NULL) == FAILURE) + { + m = MATCH_ERROR; + break; + } + + e = gfc_get_expr (); + e->symtree = symtree; + e->expr_type = EXPR_VARIABLE; + m = gfc_match_varspec (e, 0, false, true); + break; + } + /* Name is not an array, so we peek to see if a '(' implies a function call or a substring reference. Otherwise the variable is just a scalar. */ diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 2e50f04e5cd..b4a9d1cadf8 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -5584,14 +5584,6 @@ check_typebound_baseobject (gfc_expr* e) goto cleanup; } - /* FIXME: Remove once PR 43214 is fixed (TBP with non-scalar PASS). */ - if (base->rank > 0) - { - gfc_error ("Non-scalar base object at %L currently not implemented", - &e->where); - goto cleanup; - } - return_value = SUCCESS; cleanup: @@ -6765,7 +6757,7 @@ resolve_allocate_expr (gfc_expr *e, gfc_code *code) } else { - if (sym->ts.type == BT_CLASS) + if (sym->ts.type == BT_CLASS && CLASS_DATA (sym)) { allocatable = CLASS_DATA (sym)->attr.allocatable; pointer = CLASS_DATA (sym)->attr.class_pointer; @@ -6911,7 +6903,16 @@ resolve_allocate_expr (gfc_expr *e, gfc_code *code) if (t == FAILURE) goto failure; - if (!code->expr3) + if (e->ts.type == BT_CLASS && CLASS_DATA (e)->attr.dimension + && !code->expr3 && code->ext.alloc.ts.type == BT_DERIVED) + { + /* For class arrays, the initialization with SOURCE is done + using _copy and trans_call. It is convenient to exploit that + when the allocated type is different from the declared type but + no SOURCE exists by setting expr3. */ + code->expr3 = gfc_default_initializer (&code->ext.alloc.ts); + } + else if (!code->expr3) { /* Set up default initializer if needed. */ gfc_typespec ts; @@ -6955,6 +6956,8 @@ resolve_allocate_expr (gfc_expr *e, gfc_code *code) else if (code->ext.alloc.ts.type == BT_DERIVED) ts = code->ext.alloc.ts; gfc_find_derived_vtab (ts.u.derived); + if (dimension) + e = gfc_expr_to_initialize (e); } if (dimension == 0 && codimension == 0) @@ -7531,16 +7534,6 @@ resolve_select (gfc_code *code) return; } - if (case_expr->rank != 0) - { - gfc_error ("Argument of SELECT statement at %L must be a scalar " - "expression", &case_expr->where); - - /* Punt. */ - return; - } - - /* Raise a warning if an INTEGER case value exceeds the range of the case-expr. Later, all expressions will be promoted to the largest kind of all case-labels. */ @@ -7825,6 +7818,9 @@ resolve_assoc_var (gfc_symbol* sym, bool resolve_target) sym->attr.volatile_ = tsym->attr.volatile_; sym->attr.target = (tsym->attr.target || tsym->attr.pointer); + + if (sym->ts.type == BT_DERIVED && target->symtree->n.sym->ts.type == BT_CLASS) + target->rank = sym->as ? sym->as->rank : 0; } /* Get type if this was not already set. Note that it can be @@ -7839,7 +7835,10 @@ resolve_assoc_var (gfc_symbol* sym, bool resolve_target) && !gfc_has_vector_subscript (target)); /* Finally resolve if this is an array or not. */ - if (sym->attr.dimension && target->rank == 0) + if (sym->attr.dimension + && (target->ts.type == BT_CLASS + ? !CLASS_DATA (target)->attr.dimension + : target->rank == 0)) { gfc_error ("Associate-name '%s' at %L is used as array", sym->name, &sym->declared_at); @@ -7955,6 +7954,7 @@ resolve_select_type (gfc_code *code, gfc_namespace *old_ns) assoc = gfc_get_association_list (); assoc->st = code->expr1->symtree; assoc->target = gfc_copy_expr (code->expr2); + assoc->target->where = code->expr2->where; /* assoc->variable will be set by resolve_assoc_var. */ code->ext.block.assoc = assoc; @@ -8006,6 +8006,7 @@ resolve_select_type (gfc_code *code, gfc_namespace *old_ns) st = gfc_find_symtree (ns->sym_root, name); gcc_assert (st->n.sym->assoc); st->n.sym->assoc->target = gfc_get_variable_expr (code->expr1->symtree); + st->n.sym->assoc->target->where = code->expr1->where; if (c->ts.type == BT_DERIVED) gfc_add_data_component (st->n.sym->assoc->target); @@ -11432,7 +11433,8 @@ resolve_fl_derived0 (gfc_symbol *sym) for (c = sym->components; c != NULL; c = c->next) { /* F2008, C442. */ - if (c->attr.codimension /* FIXME: c->as check due to PR 43412. */ + if ((!sym->attr.is_class || c != sym->components) + && c->attr.codimension && (!c->attr.allocatable || (c->as && c->as->type != AS_DEFERRED))) { gfc_error ("Coarray component '%s' at %L must be allocatable with " diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c index 44318261388..e82753abd77 100644 --- a/gcc/fortran/simplify.c +++ b/gcc/fortran/simplify.c @@ -3326,6 +3326,9 @@ simplify_bound (gfc_expr *array, gfc_expr *dim, gfc_expr *kind, int upper) gfc_array_spec *as; int d; + if (array->ts.type == BT_CLASS) + return NULL; + if (array->expr_type != EXPR_VARIABLE) { as = NULL; @@ -3462,7 +3465,9 @@ simplify_cobound (gfc_expr *array, gfc_expr *dim, gfc_expr *kind, int upper) return NULL; /* Follow any component references. */ - as = array->symtree->n.sym->as; + as = (array->ts.type == BT_CLASS && array->ts.u.derived->components) + ? array->ts.u.derived->components->as + : array->symtree->n.sym->as; for (ref = array->ref; ref; ref = ref->next) { switch (ref->type) @@ -3506,11 +3511,12 @@ simplify_cobound (gfc_expr *array, gfc_expr *dim, gfc_expr *kind, int upper) } } - gcc_unreachable (); + if (!as) + gcc_unreachable (); done: - if (as->type == AS_DEFERRED || as->type == AS_ASSUMED_SHAPE) + if (as->cotype == AS_DEFERRED || as->cotype == AS_ASSUMED_SHAPE) return NULL; if (dim == NULL) @@ -3523,7 +3529,7 @@ simplify_cobound (gfc_expr *array, gfc_expr *dim, gfc_expr *kind, int upper) /* Simplify the cobounds for each dimension. */ for (d = 0; d < as->corank; d++) { - bounds[d] = simplify_bound_dim (array, kind, d + 1 + array->rank, + bounds[d] = simplify_bound_dim (array, kind, d + 1 + as->rank, upper, as, ref, true); if (bounds[d] == NULL || bounds[d] == &gfc_bad_expr) { @@ -3575,7 +3581,7 @@ simplify_cobound (gfc_expr *array, gfc_expr *dim, gfc_expr *kind, int upper) return &gfc_bad_expr; } - return simplify_bound_dim (array, kind, d+array->rank, upper, as, ref, true); + return simplify_bound_dim (array, kind, d+as->rank, upper, as, ref, true); } } diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c index de42297981e..fcc1ccfec58 100644 --- a/gcc/fortran/symbol.c +++ b/gcc/fortran/symbol.c @@ -2022,6 +2022,21 @@ gfc_find_component (gfc_symbol *sym, const char *name, if (strcmp (p->name, name) == 0) break; + if (p && sym->attr.use_assoc && !noaccess) + { + bool is_parent_comp = sym->attr.extension && (p == sym->components); + if (p->attr.access == ACCESS_PRIVATE || + (p->attr.access != ACCESS_PUBLIC + && sym->component_access == ACCESS_PRIVATE + && !is_parent_comp)) + { + if (!silent) + gfc_error ("Component '%s' at %C is a PRIVATE component of '%s'", + name, sym->name); + return NULL; + } + } + if (p == NULL && sym->attr.extension && sym->components->ts.type == BT_DERIVED) @@ -2037,21 +2052,6 @@ gfc_find_component (gfc_symbol *sym, const char *name, gfc_error ("'%s' at %C is not a member of the '%s' structure", name, sym->name); - else if (sym->attr.use_assoc && !noaccess) - { - bool is_parent_comp = sym->attr.extension && (p == sym->components); - if (p->attr.access == ACCESS_PRIVATE || - (p->attr.access != ACCESS_PUBLIC - && sym->component_access == ACCESS_PRIVATE - && !is_parent_comp)) - { - if (!silent) - gfc_error ("Component '%s' at %C is a PRIVATE component of '%s'", - name, sym->name); - return NULL; - } - } - return p; } diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index ee8f89693b4..d4411024768 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -2428,9 +2428,18 @@ gfc_add_loop_ss_code (gfc_loopinfo * loop, gfc_ss * ss, bool subscript, gfc_conv_expr (&se, expr); gfc_add_block_to_block (&outer_loop->pre, &se.pre); gfc_add_block_to_block (&outer_loop->post, &se.post); + if (gfc_is_class_scalar_expr (expr)) + /* This is necessary because the dynamic type will always be + large than the declared type. In consequence, assigning + the value to a temporary could segfault. + OOP-TODO: see if this is generally correct or is the value + has to be written to an allocated temporary, whose address + is passed via ss_info. */ + ss_info->data.scalar.value = se.expr; + else + ss_info->data.scalar.value = gfc_evaluate_now (se.expr, + &outer_loop->pre); - ss_info->data.scalar.value = gfc_evaluate_now (se.expr, - &outer_loop->pre); ss_info->string_length = se.string_length; break; @@ -2879,6 +2888,82 @@ conv_array_index_offset (gfc_se * se, gfc_ss * ss, int dim, int i, } +/* Build a scalarized array reference using the vptr 'size'. */ + +static bool +build_class_array_ref (gfc_se *se, tree base, tree index) +{ + tree type; + tree size; + tree offset; + tree decl; + tree tmp; + gfc_expr *expr = se->ss->info->expr; + gfc_ref *ref; + gfc_ref *class_ref; + gfc_typespec *ts; + + if (expr == NULL || expr->ts.type != BT_CLASS) + return false; + + if (expr->symtree && expr->symtree->n.sym->ts.type == BT_CLASS) + ts = &expr->symtree->n.sym->ts; + else + ts = NULL; + class_ref = NULL; + + for (ref = expr->ref; ref; ref = ref->next) + { + if (ref->type == REF_COMPONENT + && ref->u.c.component->ts.type == BT_CLASS + && ref->next && ref->next->type == REF_COMPONENT + && strcmp (ref->next->u.c.component->name, "_data") == 0 + && ref->next->next + && ref->next->next->type == REF_ARRAY + && ref->next->next->u.ar.type != AR_ELEMENT) + { + ts = &ref->u.c.component->ts; + class_ref = ref; + break; + } + } + + if (ts == NULL) + return false; + + if (class_ref == NULL) + decl = expr->symtree->n.sym->backend_decl; + else + { + /* Remove everything after the last class reference, convert the + expression and then recover its tailend once more. */ + gfc_se tmpse; + ref = class_ref->next; + class_ref->next = NULL; + gfc_init_se (&tmpse, NULL); + gfc_conv_expr (&tmpse, expr); + decl = tmpse.expr; + class_ref->next = ref; + } + + size = gfc_vtable_size_get (decl); + + /* Build the address of the element. */ + type = TREE_TYPE (TREE_TYPE (base)); + size = fold_convert (TREE_TYPE (index), size); + offset = fold_build2_loc (input_location, MULT_EXPR, + gfc_array_index_type, + index, size); + tmp = gfc_build_addr_expr (pvoid_type_node, base); + tmp = fold_build_pointer_plus_loc (input_location, tmp, offset); + tmp = fold_convert (build_pointer_type (type), tmp); + + /* Return the element in the se expression. */ + se->expr = build_fold_indirect_ref_loc (input_location, tmp); + return true; +} + + /* Build a scalarized reference to an array. */ static void @@ -2911,6 +2996,12 @@ gfc_conv_scalarized_array_ref (gfc_se * se, gfc_array_ref * ar) decl = expr->symtree->n.sym->backend_decl; tmp = build_fold_indirect_ref_loc (input_location, info->data); + + /* Use the vptr 'size' field to access a class the element of a class + array. */ + if (build_class_array_ref (se, tmp, index)) + return; + se->expr = gfc_build_array_ref (tmp, index, decl); } @@ -4592,7 +4683,8 @@ gfc_conv_descriptor_cosize (tree desc, int rank, int corank) static tree gfc_array_init_size (tree descriptor, int rank, int corank, tree * poffset, gfc_expr ** lower, gfc_expr ** upper, stmtblock_t * pblock, - stmtblock_t * descriptor_block, tree * overflow) + stmtblock_t * descriptor_block, tree * overflow, + gfc_expr *expr3) { tree type; tree tmp; @@ -4747,8 +4839,30 @@ gfc_array_init_size (tree descriptor, int rank, int corank, tree * poffset, } /* The stride is the number of elements in the array, so multiply by the - size of an element to get the total size. */ - tmp = TYPE_SIZE_UNIT (gfc_get_element_type (type)); + size of an element to get the total size. Obviously, if there ia a + SOURCE expression (expr3) we must use its element size. */ + if (expr3 != NULL) + { + if (expr3->ts.type == BT_CLASS) + { + gfc_se se_sz; + gfc_expr *sz = gfc_copy_expr (expr3); + gfc_add_vptr_component (sz); + gfc_add_size_component (sz); + gfc_init_se (&se_sz, NULL); + gfc_conv_expr (&se_sz, sz); + gfc_free_expr (sz); + tmp = se_sz.expr; + } + else + { + tmp = gfc_typenode_for_spec (&expr3->ts); + tmp = TYPE_SIZE_UNIT (tmp); + } + } + else + tmp = TYPE_SIZE_UNIT (gfc_get_element_type (type)); + /* Convert to size_t. */ element_size = fold_convert (size_type_node, tmp); @@ -4813,7 +4927,7 @@ gfc_array_init_size (tree descriptor, int rank, int corank, tree * poffset, bool gfc_array_allocate (gfc_se * se, gfc_expr * expr, tree status, tree errmsg, - tree errlen) + tree errlen, gfc_expr *expr3) { tree tmp; tree pointer; @@ -4897,7 +5011,8 @@ gfc_array_allocate (gfc_se * se, gfc_expr * expr, tree status, tree errmsg, gfc_init_block (&set_descriptor_block); size = gfc_array_init_size (se->expr, ref->u.ar.as->rank, ref->u.ar.as->corank, &offset, lower, upper, - &se->pre, &set_descriptor_block, &overflow); + &se->pre, &set_descriptor_block, &overflow, + expr3); if (dimension) { @@ -4972,7 +5087,7 @@ gfc_array_allocate (gfc_se * se, gfc_expr * expr, tree status, tree errmsg, else gfc_add_expr_to_block (&se->pre, set_descriptor); - if ((expr->ts.type == BT_DERIVED || expr->ts.type == BT_CLASS) + if ((expr->ts.type == BT_DERIVED) && expr->ts.u.derived->attr.alloc_comp) { tmp = gfc_nullify_alloc_comp (expr->ts.u.derived, se->expr, @@ -7240,7 +7355,7 @@ structure_alloc_comps (gfc_symbol * der_type, tree decl, } else if (c->ts.type == BT_CLASS && CLASS_DATA (c)->attr.allocatable) { - /* Allocatable scalar CLASS components. */ + /* Allocatable CLASS components. */ comp = fold_build3_loc (input_location, COMPONENT_REF, ctype, decl, cdecl, NULL_TREE); @@ -7249,13 +7364,18 @@ structure_alloc_comps (gfc_symbol * der_type, tree decl, comp = fold_build3_loc (input_location, COMPONENT_REF, TREE_TYPE (tmp), comp, tmp, NULL_TREE); - tmp = gfc_deallocate_scalar_with_status (comp, NULL, true, NULL, - CLASS_DATA (c)->ts); - gfc_add_expr_to_block (&fnblock, tmp); + if (GFC_DESCRIPTOR_TYPE_P(TREE_TYPE (comp))) + tmp = gfc_trans_dealloc_allocated (comp); + else + { + tmp = gfc_deallocate_scalar_with_status (comp, NULL, true, NULL, + CLASS_DATA (c)->ts); + gfc_add_expr_to_block (&fnblock, tmp); - tmp = fold_build2_loc (input_location, MODIFY_EXPR, - void_type_node, comp, - build_int_cst (TREE_TYPE (comp), 0)); + tmp = fold_build2_loc (input_location, MODIFY_EXPR, + void_type_node, comp, + build_int_cst (TREE_TYPE (comp), 0)); + } gfc_add_expr_to_block (&fnblock, tmp); } break; @@ -7282,17 +7402,22 @@ structure_alloc_comps (gfc_symbol * der_type, tree decl, } else if (c->ts.type == BT_CLASS && CLASS_DATA (c)->attr.allocatable) { - /* Allocatable scalar CLASS components. */ + /* Allocatable CLASS components. */ comp = fold_build3_loc (input_location, COMPONENT_REF, ctype, decl, cdecl, NULL_TREE); /* Add reference to '_data' component. */ tmp = CLASS_DATA (c)->backend_decl; comp = fold_build3_loc (input_location, COMPONENT_REF, TREE_TYPE (tmp), comp, tmp, NULL_TREE); - tmp = fold_build2_loc (input_location, MODIFY_EXPR, - void_type_node, comp, - build_int_cst (TREE_TYPE (comp), 0)); - gfc_add_expr_to_block (&fnblock, tmp); + if (GFC_DESCRIPTOR_TYPE_P(TREE_TYPE (comp))) + gfc_conv_descriptor_data_set (&fnblock, comp, null_pointer_node); + else + { + tmp = fold_build2_loc (input_location, MODIFY_EXPR, + void_type_node, comp, + build_int_cst (TREE_TYPE (comp), 0)); + gfc_add_expr_to_block (&fnblock, tmp); + } } else if (cmp_has_alloc_comps) { @@ -7428,7 +7553,16 @@ get_std_lbound (gfc_expr *expr, tree desc, int dim, bool assumed_size) gfc_array_index_type, cond, lbound, gfc_index_one_node); } - else if (expr->expr_type == EXPR_VARIABLE) + + if (expr->expr_type == EXPR_FUNCTION) + { + /* A conversion function, so use the argument. */ + gcc_assert (expr->value.function.isym + && expr->value.function.isym->conversion); + expr = expr->value.function.actual->expr; + } + + if (expr->expr_type == EXPR_VARIABLE) { tmp = TREE_TYPE (expr->symtree->n.sym->backend_decl); for (ref = expr->ref; ref; ref = ref->next) @@ -7441,15 +7575,6 @@ get_std_lbound (gfc_expr *expr, tree desc, int dim, bool assumed_size) } return GFC_TYPE_ARRAY_LBOUND(tmp, dim); } - else if (expr->expr_type == EXPR_FUNCTION) - { - /* A conversion function, so use the argument. */ - expr = expr->value.function.actual->expr; - if (expr->expr_type != EXPR_VARIABLE) - return gfc_index_one_node; - desc = TREE_TYPE (expr->symtree->n.sym->backend_decl); - return get_std_lbound (expr, desc, dim, assumed_size); - } return gfc_index_one_node; } diff --git a/gcc/fortran/trans-array.h b/gcc/fortran/trans-array.h index bd593bdb487..340c1a7c94c 100644 --- a/gcc/fortran/trans-array.h +++ b/gcc/fortran/trans-array.h @@ -22,9 +22,9 @@ along with GCC; see the file COPYING3. If not see /* Generate code to free an array. */ tree gfc_array_deallocate (tree, tree, gfc_expr*); -/* Generate code to initialize an allocate an array. Statements are added to +/* Generate code to initialize and allocate an array. Statements are added to se, which should contain an expression for the array descriptor. */ -bool gfc_array_allocate (gfc_se *, gfc_expr *, tree, tree, tree); +bool gfc_array_allocate (gfc_se *, gfc_expr *, tree, tree, tree, gfc_expr *); /* Allow the bounds of a loop to be set from a callee's array spec. */ void gfc_set_loop_bounds_from_array_spec (gfc_interface_mapping *, diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 67bd3e233f0..9733a6f94a0 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -1293,7 +1293,12 @@ gfc_get_symbol_decl (gfc_symbol * sym) && DECL_CONTEXT (sym->backend_decl) != current_function_decl) gfc_nonlocal_dummy_array_decl (sym); - return sym->backend_decl; + if (sym->ts.type == BT_CLASS && sym->backend_decl) + GFC_DECL_CLASS(sym->backend_decl) = 1; + + if (sym->ts.type == BT_CLASS && sym->backend_decl) + GFC_DECL_CLASS(sym->backend_decl) = 1; + return sym->backend_decl; } if (sym->backend_decl) @@ -1314,7 +1319,11 @@ gfc_get_symbol_decl (gfc_symbol * sym) && !intrinsic_array_parameter && sym->module && gfc_get_module_backend_decl (sym)) - return sym->backend_decl; + { + if (sym->ts.type == BT_CLASS && sym->backend_decl) + GFC_DECL_CLASS(sym->backend_decl) = 1; + return sym->backend_decl; + } if (sym->attr.flavor == FL_PROCEDURE) { @@ -1431,6 +1440,9 @@ gfc_get_symbol_decl (gfc_symbol * sym) GFC_TYPE_ARRAY_SPAN (TREE_TYPE (decl)) = span; } + if (sym->ts.type == BT_CLASS) + GFC_DECL_CLASS(decl) = 1; + sym->backend_decl = decl; if (sym->attr.assign) @@ -3656,6 +3668,10 @@ gfc_trans_deferred_vars (gfc_symbol * proc_sym, gfc_wrapped_block * block) gfc_trans_deferred_array (sym, block); } else if ((!sym->attr.dummy || sym->ts.deferred) + && (sym->ts.type == BT_CLASS + && CLASS_DATA (sym)->attr.pointer)) + break; + else if ((!sym->attr.dummy || sym->ts.deferred) && (sym->attr.allocatable || (sym->ts.type == BT_CLASS && CLASS_DATA (sym)->attr.allocatable))) @@ -3669,8 +3685,26 @@ gfc_trans_deferred_vars (gfc_symbol * proc_sym, gfc_wrapped_block * block) gfc_add_data_component (e); gfc_init_se (&se, NULL); - se.want_pointer = 1; - gfc_conv_expr (&se, e); + if (sym->ts.type != BT_CLASS + || sym->ts.u.derived->attr.dimension + || sym->ts.u.derived->attr.codimension) + { + se.want_pointer = 1; + gfc_conv_expr (&se, e); + } + else if (sym->ts.type == BT_CLASS + && !CLASS_DATA (sym)->attr.dimension + && !CLASS_DATA (sym)->attr.codimension) + { + se.want_pointer = 1; + gfc_conv_expr (&se, e); + } + else + { + gfc_conv_expr (&se, e); + se.expr = gfc_conv_descriptor_data_addr (se.expr); + se.expr = build_fold_indirect_ref_loc (input_location, se.expr); + } gfc_free_expr (e); gfc_save_backend_locus (&loc); @@ -4510,10 +4544,16 @@ generate_local_decl (gfc_symbol * sym) "declared INTENT(OUT) but was not set and " "does not have a default initializer", sym->name, &sym->declared_at); + if (sym->backend_decl != NULL_TREE) + TREE_NO_WARNING(sym->backend_decl) = 1; } else if (gfc_option.warn_unused_dummy_argument) - gfc_warning ("Unused dummy argument '%s' at %L", sym->name, + { + gfc_warning ("Unused dummy argument '%s' at %L", sym->name, &sym->declared_at); + if (sym->backend_decl != NULL_TREE) + TREE_NO_WARNING(sym->backend_decl) = 1; + } } /* Warn for unused variables, but not if they're inside a common @@ -4521,11 +4561,19 @@ generate_local_decl (gfc_symbol * sym) else if (warn_unused_variable && !(sym->attr.in_common || sym->attr.use_assoc || sym->mark || sym->attr.in_namelist)) - gfc_warning ("Unused variable '%s' declared at %L", sym->name, - &sym->declared_at); + { + gfc_warning ("Unused variable '%s' declared at %L", sym->name, + &sym->declared_at); + if (sym->backend_decl != NULL_TREE) + TREE_NO_WARNING(sym->backend_decl) = 1; + } else if (warn_unused_variable && sym->attr.use_only) - gfc_warning ("Unused module variable '%s' which has been explicitly " - "imported at %L", sym->name, &sym->declared_at); + { + gfc_warning ("Unused module variable '%s' which has been explicitly " + "imported at %L", sym->name, &sym->declared_at); + if (sym->backend_decl != NULL_TREE) + TREE_NO_WARNING(sym->backend_decl) = 1; + } /* For variable length CHARACTER parameters, the PARM_DECL already references the length variable, so force gfc_get_symbol_decl @@ -4561,11 +4609,6 @@ generate_local_decl (gfc_symbol * sym) mark the symbol now, as well as in traverse_ns, to prevent getting stuck in a circular dependency. */ sym->mark = 1; - - /* We do not want the middle-end to warn about unused parameters - as this was already done above. */ - if (sym->attr.dummy && sym->backend_decl != NULL_TREE) - TREE_NO_WARNING(sym->backend_decl) = 1; } else if (sym->attr.flavor == FL_PARAMETER) { @@ -4672,7 +4715,8 @@ add_argument_checking (stmtblock_t *block, gfc_symbol *sym) gfc_formal_arglist *formal; for (formal = sym->formal; formal; formal = formal->next) - if (formal->sym && formal->sym->ts.type == BT_CHARACTER) + if (formal->sym && formal->sym->ts.type == BT_CHARACTER + && !formal->sym->ts.deferred) { enum tree_code comparison; tree cond; @@ -5288,11 +5332,11 @@ gfc_generate_function_code (gfc_namespace * ns) if (result == NULL_TREE) { /* TODO: move to the appropriate place in resolve.c. */ - if (warn_return_type && !sym->attr.referenced && sym == sym->result) + if (warn_return_type && sym == sym->result) gfc_warning ("Return value of function '%s' at %L not set", sym->name, &sym->declared_at); - - TREE_NO_WARNING(sym->backend_decl) = 1; + if (warn_return_type) + TREE_NO_WARNING(sym->backend_decl) = 1; } else gfc_add_expr_to_block (&body, gfc_generate_return ()); diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index cf9f0f7cdb9..b1c85e14c49 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -41,6 +41,270 @@ along with GCC; see the file COPYING3. If not see #include "trans-stmt.h" #include "dependency.h" + +/* This is the seed for an eventual trans-class.c + + The following parameters should not be used directly since they might + in future implementations. Use the corresponding APIs. */ +#define CLASS_DATA_FIELD 0 +#define CLASS_VPTR_FIELD 1 +#define VTABLE_HASH_FIELD 0 +#define VTABLE_SIZE_FIELD 1 +#define VTABLE_EXTENDS_FIELD 2 +#define VTABLE_DEF_INIT_FIELD 3 +#define VTABLE_COPY_FIELD 4 + + +tree +gfc_class_data_get (tree decl) +{ + tree data; + if (POINTER_TYPE_P (TREE_TYPE (decl))) + decl = build_fold_indirect_ref_loc (input_location, decl); + data = gfc_advance_chain (TYPE_FIELDS (TREE_TYPE (decl)), + CLASS_DATA_FIELD); + return fold_build3_loc (input_location, COMPONENT_REF, + TREE_TYPE (data), decl, data, + NULL_TREE); +} + + +tree +gfc_class_vptr_get (tree decl) +{ + tree vptr; + if (POINTER_TYPE_P (TREE_TYPE (decl))) + decl = build_fold_indirect_ref_loc (input_location, decl); + vptr = gfc_advance_chain (TYPE_FIELDS (TREE_TYPE (decl)), + CLASS_VPTR_FIELD); + return fold_build3_loc (input_location, COMPONENT_REF, + TREE_TYPE (vptr), decl, vptr, + NULL_TREE); +} + + +static tree +gfc_vtable_field_get (tree decl, int field) +{ + tree size; + tree vptr; + vptr = gfc_class_vptr_get (decl); + vptr = build_fold_indirect_ref_loc (input_location, vptr); + size = gfc_advance_chain (TYPE_FIELDS (TREE_TYPE (vptr)), + field); + size = fold_build3_loc (input_location, COMPONENT_REF, + TREE_TYPE (size), vptr, size, + NULL_TREE); + /* Always return size as an array index type. */ + if (field == VTABLE_SIZE_FIELD) + size = fold_convert (gfc_array_index_type, size); + gcc_assert (size); + return size; +} + + +tree +gfc_vtable_hash_get (tree decl) +{ + return gfc_vtable_field_get (decl, VTABLE_HASH_FIELD); +} + + +tree +gfc_vtable_size_get (tree decl) +{ + return gfc_vtable_field_get (decl, VTABLE_SIZE_FIELD); +} + + +tree +gfc_vtable_extends_get (tree decl) +{ + return gfc_vtable_field_get (decl, VTABLE_EXTENDS_FIELD); +} + + +tree +gfc_vtable_def_init_get (tree decl) +{ + return gfc_vtable_field_get (decl, VTABLE_DEF_INIT_FIELD); +} + + +tree +gfc_vtable_copy_get (tree decl) +{ + return gfc_vtable_field_get (decl, VTABLE_COPY_FIELD); +} + + +#undef CLASS_DATA_FIELD +#undef CLASS_VPTR_FIELD +#undef VTABLE_HASH_FIELD +#undef VTABLE_SIZE_FIELD +#undef VTABLE_EXTENDS_FIELD +#undef VTABLE_DEF_INIT_FIELD +#undef VTABLE_COPY_FIELD + + +/* Takes a derived type expression and returns the address of a temporary + class object of the 'declared' type. */ +static void +gfc_conv_derived_to_class (gfc_se *parmse, gfc_expr *e, + gfc_typespec class_ts) +{ + gfc_symbol *vtab; + gfc_ss *ss; + tree ctree; + tree var; + tree tmp; + + /* The derived type needs to be converted to a temporary + CLASS object. */ + tmp = gfc_typenode_for_spec (&class_ts); + var = gfc_create_var (tmp, "class"); + + /* Set the vptr. */ + ctree = gfc_class_vptr_get (var); + + /* Remember the vtab corresponds to the derived type + not to the class declared type. */ + vtab = gfc_find_derived_vtab (e->ts.u.derived); + gcc_assert (vtab); + tmp = gfc_build_addr_expr (NULL_TREE, gfc_get_symbol_decl (vtab)); + gfc_add_modify (&parmse->pre, ctree, + fold_convert (TREE_TYPE (ctree), tmp)); + + /* Now set the data field. */ + ctree = gfc_class_data_get (var); + + if (parmse->ss && parmse->ss->info->useflags) + { + /* For an array reference in an elemental procedure call we need + to retain the ss to provide the scalarized array reference. */ + gfc_conv_expr_reference (parmse, e); + tmp = fold_convert (TREE_TYPE (ctree), parmse->expr); + gfc_add_modify (&parmse->pre, ctree, tmp); + } + else + { + ss = gfc_walk_expr (e); + if (ss == gfc_ss_terminator) + { + parmse->ss = NULL; + gfc_conv_expr_reference (parmse, e); + tmp = fold_convert (TREE_TYPE (ctree), parmse->expr); + gfc_add_modify (&parmse->pre, ctree, tmp); + } + else + { + parmse->ss = ss; + gfc_conv_expr_descriptor (parmse, e, ss); + gfc_add_modify (&parmse->pre, ctree, parmse->expr); + } + } + + /* Pass the address of the class object. */ + parmse->expr = gfc_build_addr_expr (NULL_TREE, var); +} + + +/* Takes a scalarized class array expression and returns the + address of a temporary scalar class object of the 'declared' + type. + OOP-TODO: This could be improved by adding code that branched on + the dynamic type being the same as the declared type. In this case + the original class expression can be passed directly. */ +static void +gfc_conv_class_to_class (gfc_se *parmse, gfc_expr *e, + gfc_typespec class_ts, bool elemental) +{ + tree ctree; + tree var; + tree tmp; + tree vptr; + gfc_ref *ref; + gfc_ref *class_ref; + bool full_array = false; + + class_ref = NULL; + for (ref = e->ref; ref; ref = ref->next) + { + if (ref->type == REF_COMPONENT + && ref->u.c.component->ts.type == BT_CLASS) + class_ref = ref; + + if (ref->next == NULL) + break; + } + + if (ref == NULL || class_ref == ref) + return; + + /* Test for FULL_ARRAY. */ + gfc_is_class_array_ref (e, &full_array); + + /* The derived type needs to be converted to a temporary + CLASS object. */ + tmp = gfc_typenode_for_spec (&class_ts); + var = gfc_create_var (tmp, "class"); + + /* Set the data. */ + ctree = gfc_class_data_get (var); + gfc_add_modify (&parmse->pre, ctree, parmse->expr); + + /* Return the data component, except in the case of scalarized array + references, where nullification of the cannot occur and so there + is no need. */ + if (!elemental && full_array) + gfc_add_modify (&parmse->post, parmse->expr, ctree); + + /* Set the vptr. */ + ctree = gfc_class_vptr_get (var); + + /* The vptr is the second field of the actual argument. + First we have to find the corresponding class reference. */ + + tmp = NULL_TREE; + if (class_ref == NULL + && e->symtree && e->symtree->n.sym->ts.type == BT_CLASS) + tmp = e->symtree->n.sym->backend_decl; + else + { + /* Remove everything after the last class reference, convert the + expression and then recover its tailend once more. */ + gfc_se tmpse; + ref = class_ref->next; + class_ref->next = NULL; + gfc_init_se (&tmpse, NULL); + gfc_conv_expr (&tmpse, e); + class_ref->next = ref; + tmp = tmpse.expr; + } + + gcc_assert (tmp != NULL_TREE); + + /* Dereference if needs be. */ + if (TREE_CODE (TREE_TYPE (tmp)) == REFERENCE_TYPE) + tmp = build_fold_indirect_ref_loc (input_location, tmp); + + vptr = gfc_class_vptr_get (tmp); + gfc_add_modify (&parmse->pre, ctree, + fold_convert (TREE_TYPE (ctree), vptr)); + + /* Return the vptr component, except in the case of scalarized array + references, where the dynamic type cannot change. */ + if (!elemental && full_array) + gfc_add_modify (&parmse->post, vptr, + fold_convert (TREE_TYPE (vptr), ctree)); + + /* Pass the address of the class object. */ + parmse->expr = gfc_build_addr_expr (NULL_TREE, var); +} + +/* End of prototype trans-class.c */ + + static tree gfc_trans_structure_assign (tree dest, gfc_expr * expr); static void gfc_apply_interface_mapping_to_expr (gfc_interface_mapping *, gfc_expr *); @@ -799,6 +1063,7 @@ gfc_conv_variable (gfc_se * se, gfc_expr * expr) conv_parent_component_references (se, ref); gfc_conv_component_ref (se, ref); + break; case REF_SUBSTRING: @@ -2409,6 +2674,9 @@ gfc_conv_subref_array_arg (gfc_se * parmse, gfc_expr * expr, int g77, || GFC_DESCRIPTOR_TYPE_P (base_type)) base_type = gfc_get_element_type (base_type); + if (expr->ts.type == BT_CLASS) + base_type = gfc_typenode_for_spec (&CLASS_DATA (expr)->ts); + loop.temp_ss = gfc_get_temp_ss (base_type, ((expr->ts.type == BT_CHARACTER) ? expr->ts.u.cl->backend_decl : NULL), @@ -2645,64 +2913,6 @@ conv_arglist_function (gfc_se *se, gfc_expr *expr, const char *name) } -/* Takes a derived type expression and returns the address of a temporary - class object of the 'declared' type. */ -static void -gfc_conv_derived_to_class (gfc_se *parmse, gfc_expr *e, - gfc_typespec class_ts) -{ - gfc_component *cmp; - gfc_symbol *vtab; - gfc_symbol *declared = class_ts.u.derived; - gfc_ss *ss; - tree ctree; - tree var; - tree tmp; - - /* The derived type needs to be converted to a temporary - CLASS object. */ - tmp = gfc_typenode_for_spec (&class_ts); - var = gfc_create_var (tmp, "class"); - - /* Set the vptr. */ - cmp = gfc_find_component (declared, "_vptr", true, true); - ctree = fold_build3_loc (input_location, COMPONENT_REF, - TREE_TYPE (cmp->backend_decl), - var, cmp->backend_decl, NULL_TREE); - - /* Remember the vtab corresponds to the derived type - not to the class declared type. */ - vtab = gfc_find_derived_vtab (e->ts.u.derived); - gcc_assert (vtab); - tmp = gfc_build_addr_expr (NULL_TREE, gfc_get_symbol_decl (vtab)); - gfc_add_modify (&parmse->pre, ctree, - fold_convert (TREE_TYPE (ctree), tmp)); - - /* Now set the data field. */ - cmp = gfc_find_component (declared, "_data", true, true); - ctree = fold_build3_loc (input_location, COMPONENT_REF, - TREE_TYPE (cmp->backend_decl), - var, cmp->backend_decl, NULL_TREE); - ss = gfc_walk_expr (e); - if (ss == gfc_ss_terminator) - { - parmse->ss = NULL; - gfc_conv_expr_reference (parmse, e); - tmp = fold_convert (TREE_TYPE (ctree), parmse->expr); - gfc_add_modify (&parmse->pre, ctree, tmp); - } - else - { - parmse->ss = ss; - gfc_conv_expr (parmse, e); - gfc_add_modify (&parmse->pre, ctree, parmse->expr); - } - - /* Pass the address of the class object. */ - parmse->expr = gfc_build_addr_expr (NULL_TREE, var); -} - - /* The following routine generates code for the intrinsic procedures from the ISO_C_BINDING module: * C_LOC (function) @@ -2954,6 +3164,19 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, fsym = formal ? formal->sym : NULL; parm_kind = MISSING; + /* Class array expressions are sometimes coming completely unadorned + with either arrayspec or _data component. Correct that here. + OOP-TODO: Move this to the frontend. */ + if (e && e->expr_type == EXPR_VARIABLE + && !e->ref + && e->ts.type == BT_CLASS + && CLASS_DATA (e)->attr.dimension) + { + gfc_typespec temp_ts = e->ts; + gfc_add_class_array_ref (e); + e->ts = temp_ts; + } + if (e == NULL) { if (se->ignore_optional) @@ -3010,6 +3233,11 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, } else gfc_conv_expr_reference (&parmse, e); + + /* The scalarizer does not repackage the reference to a class + array - instead it returns a pointer to the data element. */ + if (fsym && fsym->ts.type == BT_CLASS && e->ts.type == BT_CLASS) + gfc_conv_class_to_class (&parmse, e, fsym->ts, true); } else { @@ -3073,6 +3301,13 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, { gfc_conv_expr_reference (&parmse, e); + /* A class array element needs converting back to be a + class object, if the formal argument is a class object. */ + if (fsym && fsym->ts.type == BT_CLASS + && e->ts.type == BT_CLASS + && CLASS_DATA (e)->attr.dimension) + gfc_conv_class_to_class (&parmse, e, fsym->ts, false); + /* If an ALLOCATABLE dummy argument has INTENT(OUT) and is allocated on entry, it must be deallocated. */ if (fsym && fsym->attr.allocatable @@ -3124,6 +3359,17 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, } } } + else if (e->ts.type == BT_CLASS + && fsym && fsym->ts.type == BT_CLASS + && CLASS_DATA (fsym)->attr.dimension) + { + /* Pass a class array. */ + gfc_init_se (&parmse, se); + gfc_conv_expr_descriptor (&parmse, e, argss); + /* The conversion does not repackage the reference to a class + array - _data descriptor. */ + gfc_conv_class_to_class (&parmse, e, fsym->ts, false); + } else { /* If the procedure requires an explicit interface, the actual @@ -3188,6 +3434,18 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, gfc_conv_subref_array_arg (&parmse, e, f, fsym ? fsym->attr.intent : INTENT_INOUT, fsym && fsym->attr.pointer); + else if (gfc_is_class_array_ref (e, NULL) + && fsym && fsym->ts.type == BT_DERIVED) + /* The actual argument is a component reference to an + array of derived types. In this case, the argument + is converted to a temporary, which is passed and then + written back after the procedure call. + OOP-TODO: Insert code so that if the dynamic type is + the same as the declared type, copy-in/copy-out does + not occur. */ + gfc_conv_subref_array_arg (&parmse, e, f, + fsym ? fsym->attr.intent : INTENT_INOUT, + fsym && fsym->attr.pointer); else gfc_conv_array_parameter (&parmse, e, argss, f, fsym, sym->name, NULL); @@ -4895,7 +5153,12 @@ gfc_conv_expr (gfc_se * se, gfc_expr * expr) expr->ts.kind = expr->ts.u.derived->ts.kind; } } - + + /* TODO: make this work for general class array expressions. */ + if (expr->ts.type == BT_CLASS + && expr->ref && expr->ref->type == REF_ARRAY) + gfc_add_component_ref (expr, "_data"); + switch (expr->expr_type) { case EXPR_OP: @@ -6469,6 +6732,36 @@ gfc_trans_assign (gfc_code * code) } +static tree +gfc_trans_class_array_init_assign (gfc_expr *rhs, gfc_expr *lhs, gfc_expr *obj) +{ + gfc_actual_arglist *actual; + gfc_expr *ppc; + gfc_code *ppc_code; + tree res; + + actual = gfc_get_actual_arglist (); + actual->expr = gfc_copy_expr (rhs); + actual->next = gfc_get_actual_arglist (); + actual->next->expr = gfc_copy_expr (lhs); + ppc = gfc_copy_expr (obj); + gfc_add_vptr_component (ppc); + gfc_add_component_ref (ppc, "_copy"); + ppc_code = gfc_get_code (); + ppc_code->resolved_sym = ppc->symtree->n.sym; + /* Although '_copy' is set to be elemental in class.c, it is + not staying that way. Find out why, sometime.... */ + ppc_code->resolved_sym->attr.elemental = 1; + ppc_code->ext.actual = actual; + ppc_code->expr1 = ppc; + ppc_code->op = EXEC_CALL; + /* Since '_copy' is elemental, the scalarizer will take care + of arrays in gfc_trans_call. */ + res = gfc_trans_call (ppc_code, false, NULL, NULL, false); + gfc_free_statements (ppc_code); + return res; +} + /* Special case for initializing a polymorphic dummy with INTENT(OUT). A MEMCPY is needed to copy the full data from the default initializer of the dynamic type. */ @@ -6495,18 +6788,24 @@ gfc_trans_class_init_assign (gfc_code *code) gfc_get_derived_type (rhs->ts.u.derived); gfc_add_def_init_component (rhs); - sz = gfc_copy_expr (code->expr1); - gfc_add_vptr_component (sz); - gfc_add_size_component (sz); - - gfc_init_se (&dst, NULL); - gfc_init_se (&src, NULL); - gfc_init_se (&memsz, NULL); - gfc_conv_expr (&dst, lhs); - gfc_conv_expr (&src, rhs); - gfc_conv_expr (&memsz, sz); - gfc_add_block_to_block (&block, &src.pre); - tmp = gfc_build_memcpy_call (dst.expr, src.expr, memsz.expr); + if (code->expr1->ts.type == BT_CLASS + && CLASS_DATA (code->expr1)->attr.dimension) + tmp = gfc_trans_class_array_init_assign (rhs, lhs, code->expr1); + else + { + sz = gfc_copy_expr (code->expr1); + gfc_add_vptr_component (sz); + gfc_add_size_component (sz); + + gfc_init_se (&dst, NULL); + gfc_init_se (&src, NULL); + gfc_init_se (&memsz, NULL); + gfc_conv_expr (&dst, lhs); + gfc_conv_expr (&src, rhs); + gfc_conv_expr (&memsz, sz); + gfc_add_block_to_block (&block, &src.pre); + tmp = gfc_build_memcpy_call (dst.expr, src.expr, memsz.expr); + } gfc_add_expr_to_block (&block, tmp); return gfc_finish_block (&block); @@ -6553,9 +6852,24 @@ gfc_trans_class_assign (gfc_expr *expr1, gfc_expr *expr2, gfc_exec_op op) gfc_free_expr (lhs); gfc_free_expr (rhs); } + else if (CLASS_DATA (expr2)->attr.dimension) + { + /* Insert an additional assignment which sets the '_vptr' field. */ + lhs = gfc_copy_expr (expr1); + gfc_add_vptr_component (lhs); + + rhs = gfc_copy_expr (expr2); + gfc_add_vptr_component (rhs); + + tmp = gfc_trans_pointer_assignment (lhs, rhs); + gfc_add_expr_to_block (&block, tmp); + + gfc_free_expr (lhs); + gfc_free_expr (rhs); + } /* Do the actual CLASS assignment. */ - if (expr2->ts.type == BT_CLASS) + if (expr2->ts.type == BT_CLASS && !CLASS_DATA (expr2)->attr.dimension) op = EXEC_ASSIGN; else gfc_add_data_component (expr1); diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c index 855db306a7a..58112e37ee9 100644 --- a/gcc/fortran/trans-intrinsic.c +++ b/gcc/fortran/trans-intrinsic.c @@ -5028,6 +5028,9 @@ gfc_conv_intrinsic_size (gfc_se * se, gfc_expr * expr) gfc_init_se (&argse, NULL); actual = expr->value.function.actual; + if (actual->expr->ts.type == BT_CLASS) + gfc_add_class_array_ref (actual->expr); + ss = gfc_walk_expr (actual->expr); gcc_assert (ss != gfc_ss_terminator); argse.want_pointer = 1; @@ -5667,14 +5670,24 @@ gfc_conv_allocated (gfc_se *se, gfc_expr *expr) gfc_init_se (&arg1se, NULL); arg1 = expr->value.function.actual; + + if (arg1->expr->ts.type == BT_CLASS) + { + /* Make sure that class array expressions have both a _data + component reference and an array reference.... */ + if (CLASS_DATA (arg1->expr)->attr.dimension) + gfc_add_class_array_ref (arg1->expr); + /* .... whilst scalars only need the _data component. */ + else + gfc_add_data_component (arg1->expr); + } + ss1 = gfc_walk_expr (arg1->expr); if (ss1 == gfc_ss_terminator) { /* Allocatable scalar. */ arg1se.want_pointer = 1; - if (arg1->expr->ts.type == BT_CLASS) - gfc_add_data_component (arg1->expr); gfc_conv_expr (&arg1se, arg1->expr); tmp = arg1se.expr; } @@ -6015,7 +6028,7 @@ gfc_conv_intrinsic_repeat (gfc_se * se, gfc_expr * expr) build_int_cst (ncopies_type, 0)); gfc_trans_runtime_check (true, false, cond, &se->pre, &expr->where, "Argument NCOPIES of REPEAT intrinsic is negative " - "(its value is %lld)", + "(its value is %ld)", fold_convert (long_integer_type_node, ncopies)); /* If the source length is zero, any non negative value of NCOPIES @@ -6998,6 +7011,9 @@ gfc_add_intrinsic_ss_code (gfc_loopinfo * loop ATTRIBUTE_UNUSED, gfc_ss * ss) static gfc_ss * gfc_walk_intrinsic_bound (gfc_ss * ss, gfc_expr * expr) { + if (expr->value.function.actual->expr->ts.type == BT_CLASS) + gfc_add_class_array_ref (expr->value.function.actual->expr); + /* The two argument version returns a scalar. */ if (expr->value.function.actual->next->expr) return ss; diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index b21be45a96d..9e903d81bea 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -1093,14 +1093,19 @@ trans_associate_var (gfc_symbol *sym, gfc_wrapped_block *block) { gfc_expr *e; tree tmp; + bool class_target; gcc_assert (sym->assoc); e = sym->assoc->target; + class_target = (e->expr_type == EXPR_VARIABLE) + && (gfc_is_class_scalar_expr (e) + || gfc_is_class_array_ref (e, NULL)); + /* Do a `pointer assignment' with updated descriptor (or assign descriptor to array temporary) for arrays with either unknown shape or if associating to a variable. */ - if (sym->attr.dimension + if (sym->attr.dimension && !class_target && (sym->as->type == AS_DEFERRED || sym->assoc->variable)) { gfc_se se; @@ -1140,6 +1145,23 @@ trans_associate_var (gfc_symbol *sym, gfc_wrapped_block *block) gfc_finish_block (&se.post)); } + /* CLASS arrays just need the descriptor to be directly assigned. */ + else if (class_target && sym->attr.dimension) + { + gfc_se se; + + gfc_init_se (&se, NULL); + gfc_conv_expr (&se, e); + + gcc_assert (GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (se.expr))); + gcc_assert (GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (sym->backend_decl))); + + gfc_add_modify (&se.pre, sym->backend_decl, se.expr); + + gfc_add_init_cleanup (block, gfc_finish_block( &se.pre), + gfc_finish_block (&se.post)); + } + /* Do a scalar pointer assignment; this is for scalar variable targets. */ else if (gfc_is_associate_pointer (sym)) { @@ -4677,6 +4699,7 @@ tree gfc_trans_allocate (gfc_code * code) { gfc_alloc *al; + gfc_expr *e; gfc_expr *expr; gfc_se se; tree tmp; @@ -4748,7 +4771,7 @@ gfc_trans_allocate (gfc_code * code) se.descriptor_only = 1; gfc_conv_expr (&se, expr); - if (!gfc_array_allocate (&se, expr, stat, errmsg, errlen)) + if (!gfc_array_allocate (&se, expr, stat, errmsg, errlen, code->expr3)) { /* A scalar or derived type. */ @@ -4878,6 +4901,16 @@ gfc_trans_allocate (gfc_code * code) tmp = gfc_nullify_alloc_comp (expr->ts.u.derived, tmp, 0); gfc_add_expr_to_block (&se.pre, tmp); } + else if (al->expr->ts.type == BT_CLASS && code->expr3) + { + /* With class objects, it is best to play safe and null the + memory because we cannot know if dynamic types have allocatable + components or not. */ + tmp = build_call_expr_loc (input_location, + builtin_decl_explicit (BUILT_IN_MEMSET), + 3, se.expr, integer_zero_node, memsz); + gfc_add_expr_to_block (&se.pre, tmp); + } } gfc_add_block_to_block (&block, &se.pre); @@ -4901,6 +4934,60 @@ gfc_trans_allocate (gfc_code * code) gfc_add_expr_to_block (&block, tmp); } + /* We need the vptr of CLASS objects to be initialized. */ + e = gfc_copy_expr (al->expr); + if (e->ts.type == BT_CLASS) + { + gfc_expr *lhs,*rhs; + gfc_se lse; + + lhs = gfc_expr_to_initialize (e); + gfc_add_vptr_component (lhs); + rhs = NULL; + if (code->expr3 && code->expr3->ts.type == BT_CLASS) + { + /* Polymorphic SOURCE: VPTR must be determined at run time. */ + rhs = gfc_copy_expr (code->expr3); + gfc_add_vptr_component (rhs); + tmp = gfc_trans_pointer_assignment (lhs, rhs); + gfc_add_expr_to_block (&block, tmp); + gfc_free_expr (rhs); + rhs = gfc_expr_to_initialize (e); + } + else + { + /* VPTR is fixed at compile time. */ + gfc_symbol *vtab; + gfc_typespec *ts; + if (code->expr3) + ts = &code->expr3->ts; + else if (e->ts.type == BT_DERIVED) + ts = &e->ts; + else if (code->ext.alloc.ts.type == BT_DERIVED) + ts = &code->ext.alloc.ts; + else if (e->ts.type == BT_CLASS) + ts = &CLASS_DATA (e)->ts; + else + ts = &e->ts; + + if (ts->type == BT_DERIVED) + { + vtab = gfc_find_derived_vtab (ts->u.derived); + gcc_assert (vtab); + gfc_init_se (&lse, NULL); + lse.want_pointer = 1; + gfc_conv_expr (&lse, lhs); + tmp = gfc_build_addr_expr (NULL_TREE, + gfc_get_symbol_decl (vtab)); + gfc_add_modify (&block, lse.expr, + fold_convert (TREE_TYPE (lse.expr), tmp)); + } + } + gfc_free_expr (lhs); + } + + gfc_free_expr (e); + if (code->expr3 && !code->expr3->mold) { /* Initialization via SOURCE block @@ -4908,10 +4995,11 @@ gfc_trans_allocate (gfc_code * code) gfc_expr *rhs = gfc_copy_expr (code->expr3); if (al->expr->ts.type == BT_CLASS) { - gfc_se call; gfc_actual_arglist *actual; gfc_expr *ppc; - gfc_init_se (&call, NULL); + gfc_code *ppc_code; + gfc_ref *dataref; + /* Do a polymorphic deep copy. */ actual = gfc_get_actual_arglist (); actual->expr = gfc_copy_expr (rhs); @@ -4919,20 +5007,58 @@ gfc_trans_allocate (gfc_code * code) gfc_add_data_component (actual->expr); actual->next = gfc_get_actual_arglist (); actual->next->expr = gfc_copy_expr (al->expr); + actual->next->expr->ts.type = BT_CLASS; gfc_add_data_component (actual->next->expr); + dataref = actual->next->expr->ref; + if (dataref->u.c.component->as) + { + int dim; + gfc_expr *temp; + gfc_ref *ref = dataref->next; + ref->u.ar.type = AR_SECTION; + /* We have to set up the array reference to give ranges + in all dimensions and ensure that the end and stride + are set so that the copy can be scalarized. */ + dim = 0; + for (; dim < dataref->u.c.component->as->rank; dim++) + { + ref->u.ar.dimen_type[dim] = DIMEN_RANGE; + if (ref->u.ar.end[dim] == NULL) + { + ref->u.ar.end[dim] = ref->u.ar.start[dim]; + temp = gfc_get_int_expr (gfc_default_integer_kind, + &al->expr->where, 1); + ref->u.ar.start[dim] = temp; + } + temp = gfc_subtract (gfc_copy_expr (ref->u.ar.end[dim]), + gfc_copy_expr (ref->u.ar.start[dim])); + temp = gfc_add (gfc_get_int_expr (gfc_default_integer_kind, + &al->expr->where, 1), + temp); + } + } if (rhs->ts.type == BT_CLASS) { ppc = gfc_copy_expr (rhs); gfc_add_vptr_component (ppc); } else - ppc = gfc_lval_expr_from_sym (gfc_find_derived_vtab (rhs->ts.u.derived)); + ppc = gfc_lval_expr_from_sym + (gfc_find_derived_vtab (rhs->ts.u.derived)); gfc_add_component_ref (ppc, "_copy"); - gfc_conv_procedure_call (&call, ppc->symtree->n.sym, actual, - ppc, NULL); - gfc_add_expr_to_block (&call.pre, call.expr); - gfc_add_block_to_block (&call.pre, &call.post); - tmp = gfc_finish_block (&call.pre); + + ppc_code = gfc_get_code (); + ppc_code->resolved_sym = ppc->symtree->n.sym; + /* Although '_copy' is set to be elemental in class.c, it is + not staying that way. Find out why, sometime.... */ + ppc_code->resolved_sym->attr.elemental = 1; + ppc_code->ext.actual = actual; + ppc_code->expr1 = ppc; + ppc_code->op = EXEC_CALL; + /* Since '_copy' is elemental, the scalarizer will take care + of arrays in gfc_trans_call. */ + tmp = gfc_trans_call (ppc_code, true, NULL, NULL, false); + gfc_free_statements (ppc_code); } else if (expr3 != NULL_TREE) { @@ -4972,59 +5098,7 @@ gfc_trans_allocate (gfc_code * code) gfc_free_expr (rhs); } - /* Allocation of CLASS entities. */ gfc_free_expr (expr); - expr = al->expr; - if (expr->ts.type == BT_CLASS) - { - gfc_expr *lhs,*rhs; - gfc_se lse; - - /* Initialize VPTR for CLASS objects. */ - lhs = gfc_expr_to_initialize (expr); - gfc_add_vptr_component (lhs); - rhs = NULL; - if (code->expr3 && code->expr3->ts.type == BT_CLASS) - { - /* Polymorphic SOURCE: VPTR must be determined at run time. */ - rhs = gfc_copy_expr (code->expr3); - gfc_add_vptr_component (rhs); - tmp = gfc_trans_pointer_assignment (lhs, rhs); - gfc_add_expr_to_block (&block, tmp); - gfc_free_expr (rhs); - } - else - { - /* VPTR is fixed at compile time. */ - gfc_symbol *vtab; - gfc_typespec *ts; - if (code->expr3) - ts = &code->expr3->ts; - else if (expr->ts.type == BT_DERIVED) - ts = &expr->ts; - else if (code->ext.alloc.ts.type == BT_DERIVED) - ts = &code->ext.alloc.ts; - else if (expr->ts.type == BT_CLASS) - ts = &CLASS_DATA (expr)->ts; - else - ts = &expr->ts; - - if (ts->type == BT_DERIVED) - { - vtab = gfc_find_derived_vtab (ts->u.derived); - gcc_assert (vtab); - gfc_init_se (&lse, NULL); - lse.want_pointer = 1; - gfc_conv_expr (&lse, lhs); - tmp = gfc_build_addr_expr (NULL_TREE, - gfc_get_symbol_decl (vtab)); - gfc_add_modify (&block, lse.expr, - fold_convert (TREE_TYPE (lse.expr), tmp)); - } - } - gfc_free_expr (lhs); - } - } /* STAT (ERRMSG only makes sense with STAT). */ diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c index 88bd389c545..085f58f608a 100644 --- a/gcc/fortran/trans.c +++ b/gcc/fortran/trans.c @@ -315,6 +315,7 @@ gfc_build_array_ref (tree base, tree offset, tree decl) { tree type = TREE_TYPE (base); tree tmp; + tree span; if (GFC_ARRAY_TYPE_P (type) && GFC_TYPE_ARRAY_RANK (type) == 0) { @@ -345,12 +346,33 @@ gfc_build_array_ref (tree base, tree offset, tree decl) if (decl && (TREE_CODE (decl) == FIELD_DECL || TREE_CODE (decl) == VAR_DECL || TREE_CODE (decl) == PARM_DECL) - && GFC_DECL_SUBREF_ARRAY_P (decl) - && !integer_zerop (GFC_DECL_SPAN(decl))) + && ((GFC_DECL_SUBREF_ARRAY_P (decl) + && !integer_zerop (GFC_DECL_SPAN(decl))) + || GFC_DECL_CLASS (decl))) { + if (GFC_DECL_CLASS (decl)) + { + /* Allow for dummy arguments and other good things. */ + if (POINTER_TYPE_P (TREE_TYPE (decl))) + decl = build_fold_indirect_ref_loc (input_location, decl); + + /* Check if '_data' is an array descriptor. If it is not, + the array must be one of the components of the class object, + so return a normal array reference. */ + if (!GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (gfc_class_data_get (decl)))) + return build4_loc (input_location, ARRAY_REF, type, base, + offset, NULL_TREE, NULL_TREE); + + span = gfc_vtable_size_get (decl); + } + else if (GFC_DECL_SUBREF_ARRAY_P (decl)) + span = GFC_DECL_SPAN(decl); + else + gcc_unreachable (); + offset = fold_build2_loc (input_location, MULT_EXPR, gfc_array_index_type, - offset, GFC_DECL_SPAN(decl)); + offset, span); tmp = gfc_build_addr_expr (pvoid_type_node, base); tmp = fold_build_pointer_plus_loc (input_location, tmp, offset); tmp = fold_convert (build_pointer_type (type), tmp); diff --git a/gcc/fortran/trans.h b/gcc/fortran/trans.h index 8fc7599473d..259a08aae06 100644 --- a/gcc/fortran/trans.h +++ b/gcc/fortran/trans.h @@ -333,6 +333,14 @@ typedef struct } gfc_wrapped_block; +/* Class API functions. */ +tree gfc_class_data_get (tree); +tree gfc_class_vptr_get (tree); +tree gfc_vtable_hash_get (tree); +tree gfc_vtable_size_get (tree); +tree gfc_vtable_extends_get (tree); +tree gfc_vtable_def_init_get (tree); +tree gfc_vtable_copy_get (tree); /* Initialize an init/cleanup block. */ void gfc_start_wrapped_block (gfc_wrapped_block* block, tree code); @@ -803,6 +811,7 @@ struct GTY((variable_size)) lang_decl { #define GFC_DECL_RESULT(node) DECL_LANG_FLAG_5(node) #define GFC_DECL_SUBREF_ARRAY_P(node) DECL_LANG_FLAG_6(node) #define GFC_DECL_PUSH_TOPLEVEL(node) DECL_LANG_FLAG_7(node) +#define GFC_DECL_CLASS(node) DECL_LANG_FLAG_8(node) /* An array descriptor. */ #define GFC_DESCRIPTOR_TYPE_P(node) TYPE_LANG_FLAG_1(node) diff --git a/gcc/function.c b/gcc/function.c index fa9236ce4b8..a081b270ec0 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -3140,9 +3140,8 @@ assign_parm_setup_reg (struct assign_parm_data_all *all, tree parm, set_unique_reg_note (sinsn, REG_EQUIV, stackr); } } - else if ((set = single_set (linsn)) != 0 - && SET_DEST (set) == parmreg) - set_unique_reg_note (linsn, REG_EQUIV, equiv_stack_parm); + else + set_dst_reg_note (linsn, REG_EQUIV, equiv_stack_parm, parmreg); } /* For pointer data type, suggest pointer register. */ @@ -4757,7 +4756,7 @@ expand_function_start (tree subr) /* Mark the register as eliminable, similar to parameters. */ if (MEM_P (chain) && reg_mentioned_p (arg_pointer_rtx, XEXP (chain, 0))) - set_unique_reg_note (insn, REG_EQUIV, chain); + set_dst_reg_note (insn, REG_EQUIV, chain, local); } /* If the function receives a non-local goto, then store the diff --git a/gcc/genmodes.c b/gcc/genmodes.c index dae7e38ebdb..8b6f5bce96b 100644 --- a/gcc/genmodes.c +++ b/gcc/genmodes.c @@ -63,7 +63,6 @@ struct mode_data struct mode_data *component; /* mode of components */ struct mode_data *wider; /* next wider mode */ - struct mode_data *wider_2x; /* 2x wider mode */ struct mode_data *contained; /* Pointer to list of modes that have this mode as a component. */ @@ -83,7 +82,7 @@ static struct mode_data *void_mode; static const struct mode_data blank_mode = { 0, "<unknown>", MAX_MODE_CLASS, -1U, -1U, -1U, -1U, - 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, "<unknown>", 0, 0, 0, 0 }; @@ -790,7 +789,7 @@ calc_wider_mode (void) /* Allocate max_n_modes + 1 entries to leave room for the extra null pointer assigned after the qsort call below. */ - sortbuf = (struct mode_data **) alloca ((max_n_modes + 1) * sizeof (struct mode_data *)); + sortbuf = XALLOCAVEC (struct mode_data *, max_n_modes + 1); for (c = 0; c < MAX_MODE_CLASS; c++) { @@ -804,7 +803,6 @@ calc_wider_mode (void) for (prev = 0, m = modes[c]; m; m = next) { m->wider = void_mode; - m->wider_2x = void_mode; /* this is nreverse */ next = m->next; @@ -827,7 +825,6 @@ calc_wider_mode (void) for (j = 0; j < i; j++) sortbuf[j]->next = sortbuf[j]->wider = sortbuf[j + 1]; - modes[c] = sortbuf[0]; } } @@ -1062,6 +1059,21 @@ emit_mode_wider (void) continue; } + /* For vectors we want twice the number of components, + with the same element type. */ + if (m->cl == MODE_VECTOR_INT + || m->cl == MODE_VECTOR_FLOAT + || m->cl == MODE_VECTOR_FRACT + || m->cl == MODE_VECTOR_UFRACT + || m->cl == MODE_VECTOR_ACCUM + || m->cl == MODE_VECTOR_UACCUM) + { + if (m2->ncomponents != 2 * m->ncomponents) + continue; + if (m->component != m2->component) + continue; + } + break; } if (m2 == void_mode) diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c index 5da9be37575..91dd8fc5892 100644 --- a/gcc/gimple-fold.c +++ b/gcc/gimple-fold.c @@ -2517,8 +2517,10 @@ gimple_fold_stmt_to_constant_1 (gimple stmt, tree (*valueize) (tree)) if (CONVERT_EXPR_CODE_P (subcode) && POINTER_TYPE_P (TREE_TYPE (lhs)) && POINTER_TYPE_P (TREE_TYPE (op0)) - && (TYPE_ADDR_SPACE (TREE_TYPE (lhs)) - == TYPE_ADDR_SPACE (TREE_TYPE (op0)))) + && TYPE_ADDR_SPACE (TREE_TYPE (lhs)) + == TYPE_ADDR_SPACE (TREE_TYPE (op0)) + && TYPE_MODE (TREE_TYPE (lhs)) + == TYPE_MODE (TREE_TYPE (op0))) return op0; return diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index a80c82375ce..18858d519a0 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -12817,7 +12817,26 @@ Composite_literal_expression::lower_struct(Gogo* gogo, Type* type) Location location = this->location(); Struct_type* st = type->struct_type(); if (this->vals_ == NULL || !this->has_keys_) - return new Struct_construction_expression(type, this->vals_, location); + { + if (this->vals_ != NULL + && !this->vals_->empty() + && type->named_type() != NULL + && type->named_type()->named_object()->package() != NULL) + { + for (Struct_field_list::const_iterator pf = st->fields()->begin(); + pf != st->fields()->end(); + ++pf) + { + if (Gogo::is_hidden_name(pf->field_name())) + error_at(this->location(), + "assignment of unexported field %qs in %qs literal", + Gogo::message_name(pf->field_name()).c_str(), + type->named_type()->message_name().c_str()); + } + } + + return new Struct_construction_expression(type, this->vals_, location); + } size_t field_count = st->field_count(); std::vector<Expression*> vals(field_count); @@ -12964,6 +12983,14 @@ Composite_literal_expression::lower_struct(Gogo* gogo, Type* type) return Expression::make_error(location); } + if (type->named_type() != NULL + && type->named_type()->named_object()->package() != NULL + && Gogo::is_hidden_name(sf->field_name())) + error_at(name_expr->location(), + "assignment of unexported field %qs in %qs literal", + Gogo::message_name(sf->field_name()).c_str(), + type->named_type()->message_name().c_str()); + vals[index] = val; } diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc index f63d1694922..fed83b31b9a 100644 --- a/gcc/go/gofrontend/types.cc +++ b/gcc/go/gofrontend/types.cc @@ -605,7 +605,7 @@ Type::are_assignable_check_hidden(const Type* lhs, const Type* rhs, bool Type::are_assignable(const Type* lhs, const Type* rhs, std::string* reason) { - return Type::are_assignable_check_hidden(lhs, rhs, true, reason); + return Type::are_assignable_check_hidden(lhs, rhs, false, reason); } // Like are_assignable but don't check for hidden fields. diff --git a/gcc/implicit-zee.c b/gcc/implicit-zee.c index db422482c90..0795c29ff7b 100644 --- a/gcc/implicit-zee.c +++ b/gcc/implicit-zee.c @@ -889,8 +889,8 @@ find_and_remove_ze (void) rtx curr_insn = NULL_RTX; int i; int ix; - long long num_realized = 0; - long long num_ze_opportunities = 0; + long num_realized = 0; + long num_ze_opportunities = 0; VEC (rtx, heap) *zeinsn_list; VEC (rtx, heap) *zeinsn_del_list; @@ -944,10 +944,10 @@ find_and_remove_ze (void) VEC_free (rtx, heap, zeinsn_del_list); if (dump_file && num_ze_opportunities > 0) - fprintf (dump_file, "\n %s : num_zee_opportunities = %lld " - "num_realized = %lld \n", - current_function_name (), - num_ze_opportunities, num_realized); + fprintf (dump_file, "\n %s : num_zee_opportunities = %ld" + " num_realized = %ld\n", + current_function_name (), num_ze_opportunities, + num_realized); df_finish_pass (false); return 0; diff --git a/gcc/ira-color.c b/gcc/ira-color.c index c7a7033ebc1..1c03a4ae565 100644 --- a/gcc/ira-color.c +++ b/gcc/ira-color.c @@ -53,7 +53,7 @@ struct allocno_hard_regs HARD_REG_SET set; /* Overall (spilling) cost of all allocnos with given register set. */ - long long int cost; + HOST_WIDEST_INT cost; }; typedef struct allocno_hard_regs_node *allocno_hard_regs_node_t; @@ -229,7 +229,7 @@ init_allocno_hard_regs (void) /* Add (or update info about) allocno hard registers with SET and COST. */ static allocno_hard_regs_t -add_allocno_hard_regs (HARD_REG_SET set, long long int cost) +add_allocno_hard_regs (HARD_REG_SET set, HOST_WIDEST_INT cost) { struct allocno_hard_regs temp; allocno_hard_regs_t hv; @@ -498,7 +498,7 @@ print_hard_regs_subforest (FILE *f, allocno_hard_regs_node_t roots, fprintf (f, " "); fprintf (f, "%d:(", node->preorder_num); print_hard_reg_set (f, node->hard_regs->set, false); - fprintf (f, ")@%lld\n", node->hard_regs->cost); + fprintf (f, ")@" HOST_WIDEST_INT_PRINT_DEC "\n", node->hard_regs->cost); print_hard_regs_subforest (f, node->first, level + 1); } } diff --git a/gcc/ira-conflicts.c b/gcc/ira-conflicts.c index 225a3ab17f2..f2f13114f38 100644 --- a/gcc/ira-conflicts.c +++ b/gcc/ira-conflicts.c @@ -116,8 +116,8 @@ build_conflict_bit_table (void) = ((OBJECT_MAX (obj) - OBJECT_MIN (obj) + IRA_INT_BITS) / IRA_INT_BITS); allocated_words_num += conflict_bit_vec_words_num; - if ((unsigned long long) allocated_words_num * sizeof (IRA_INT_TYPE) - > (unsigned long long) IRA_MAX_CONFLICT_TABLE_SIZE * 1024 * 1024) + if ((unsigned HOST_WIDEST_INT) allocated_words_num * sizeof (IRA_INT_TYPE) + > (unsigned HOST_WIDEST_INT) IRA_MAX_CONFLICT_TABLE_SIZE * 1024 * 1024) { if (internal_flag_ira_verbose > 0 && ira_dump_file != NULL) fprintf diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index 62cf9a1832f..80bf9e9fd4f 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -129,6 +129,26 @@ tree_is_indexable (tree t) else if (TREE_CODE (t) == VAR_DECL && decl_function_context (t) && !TREE_STATIC (t)) return false; + /* If this is a decl generated for block local externs for + debug info generation, stream it unshared alongside BLOCK_VARS. */ + else if (VAR_OR_FUNCTION_DECL_P (t) + /* ??? The following tests are a literal match on what + c-decl.c:pop_scope does. */ + && TREE_PUBLIC (t) + && DECL_EXTERNAL (t) + && DECL_CONTEXT (t) + && TREE_CODE (DECL_CONTEXT (t)) == FUNCTION_DECL) + return false; + /* Variably modified types need to be streamed alongside function + bodies because they can refer to local entities. Together with + them we have to localize their members as well. + ??? In theory that includes non-FIELD_DECLs as well. */ + else if (TYPE_P (t) + && variably_modified_type_p (t, NULL_TREE)) + return false; + else if (TREE_CODE (t) == FIELD_DECL + && variably_modified_type_p (DECL_CONTEXT (t), NULL_TREE)) + return false; else return (TYPE_P (t) || DECL_P (t) || TREE_CODE (t) == SSA_NAME); } @@ -1430,11 +1450,7 @@ produce_symtab (struct output_block *ob, them indirectly or via vtables. Do not output them to symbol table: they end up being undefined and just consume space. */ if (!node->address_taken && !node->callers) - { - gcc_assert (node->analyzed); - gcc_assert (DECL_DECLARED_INLINE_P (node->decl)); - continue; - } + continue; if (DECL_COMDAT (node->decl) && cgraph_comdat_can_be_unshared_p (node)) continue; diff --git a/gcc/machmode.h b/gcc/machmode.h index b965d0f874a..4a3f6f50d16 100644 --- a/gcc/machmode.h +++ b/gcc/machmode.h @@ -221,6 +221,8 @@ extern const unsigned char mode_nunits[NUM_MACHINE_MODES]; extern const unsigned char mode_wider[NUM_MACHINE_MODES]; #define GET_MODE_WIDER_MODE(MODE) ((enum machine_mode) mode_wider[MODE]) +/* For scalars, this is a mode with twice the precision. For vectors, + this is a mode with the same inner mode but with twice the elements. */ extern const unsigned char mode_2xwider[NUM_MACHINE_MODES]; #define GET_MODE_2XWIDER_MODE(MODE) ((enum machine_mode) mode_2xwider[MODE]) diff --git a/gcc/optabs.c b/gcc/optabs.c index 55cfe8c9887..2c3a6405ab9 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -2052,11 +2052,11 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, { rtx temp = emit_move_insn (target, xtarget); - set_unique_reg_note (temp, - REG_EQUAL, - gen_rtx_fmt_ee (binoptab->code, mode, - copy_rtx (xop0), - copy_rtx (xop1))); + set_dst_reg_note (temp, REG_EQUAL, + gen_rtx_fmt_ee (binoptab->code, mode, + copy_rtx (xop0), + copy_rtx (xop1)), + target); } else target = xtarget; @@ -2104,11 +2104,12 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, if (optab_handler (mov_optab, mode) != CODE_FOR_nothing) { temp = emit_move_insn (target ? target : product, product); - set_unique_reg_note (temp, - REG_EQUAL, - gen_rtx_fmt_ee (MULT, mode, - copy_rtx (op0), - copy_rtx (op1))); + set_dst_reg_note (temp, + REG_EQUAL, + gen_rtx_fmt_ee (MULT, mode, + copy_rtx (op0), + copy_rtx (op1)), + target ? target : product); } return product; } @@ -2966,8 +2967,9 @@ expand_absneg_bit (enum rtx_code code, enum machine_mode mode, gen_lowpart (imode, target), 1, OPTAB_LIB_WIDEN); target = lowpart_subreg_maybe_copy (mode, temp, imode); - set_unique_reg_note (get_last_insn (), REG_EQUAL, - gen_rtx_fmt_e (code, mode, copy_rtx (op0))); + set_dst_reg_note (get_last_insn (), REG_EQUAL, + gen_rtx_fmt_e (code, mode, copy_rtx (op0)), + target); } return target; @@ -3899,8 +3901,7 @@ emit_libcall_block (rtx insns, rtx target, rtx result, rtx equiv) } last = emit_move_insn (target, result); - if (optab_handler (mov_optab, GET_MODE (target)) != CODE_FOR_nothing) - set_unique_reg_note (last, REG_EQUAL, copy_rtx (equiv)); + set_dst_reg_note (last, REG_EQUAL, copy_rtx (equiv), target); if (final_dest != target) emit_move_insn (final_dest, target); @@ -5213,11 +5214,10 @@ expand_fix (rtx to, rtx from, int unsignedp) { /* Make a place for a REG_NOTE and add it. */ insn = emit_move_insn (to, to); - set_unique_reg_note (insn, - REG_EQUAL, - gen_rtx_fmt_e (UNSIGNED_FIX, - GET_MODE (to), - copy_rtx (from))); + set_dst_reg_note (insn, REG_EQUAL, + gen_rtx_fmt_e (UNSIGNED_FIX, GET_MODE (to), + copy_rtx (from)), + to); } return; @@ -7038,7 +7038,8 @@ expand_vec_perm (enum machine_mode mode, rtx v0, rtx v1, rtx sel, rtx target) } /* If the input is a constant, expand it specially. */ - if (CONSTANT_P (sel)) + gcc_assert (GET_MODE_CLASS (GET_MODE (sel)) == MODE_VECTOR_INT); + if (GET_CODE (sel) == CONST_VECTOR) { icode = direct_optab_handler (vec_perm_const_optab, mode); if (icode != CODE_FOR_nothing) @@ -7056,7 +7057,7 @@ expand_vec_perm (enum machine_mode mode, rtx v0, rtx v1, rtx sel, rtx target) { unsigned int j, this_e; - this_e = INTVAL (XVECEXP (sel, 0, i)); + this_e = INTVAL (CONST_VECTOR_ELT (sel, i)); this_e &= 2 * e - 1; this_e *= u; diff --git a/gcc/reload1.c b/gcc/reload1.c index 2f783a2940f..78525661904 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -8574,7 +8574,7 @@ gen_reload (rtx out, rtx in, int opnum, enum reload_type type) if (insn) { /* Add a REG_EQUIV note so that find_equiv_reg can find it. */ - set_unique_reg_note (insn, REG_EQUIV, in); + set_dst_reg_note (insn, REG_EQUIV, in, out); return insn; } @@ -8584,7 +8584,7 @@ gen_reload (rtx out, rtx in, int opnum, enum reload_type type) gcc_assert (!reg_overlap_mentioned_p (out, op0)); gen_reload (out, op1, opnum, type); insn = emit_insn (gen_add2_insn (out, op0)); - set_unique_reg_note (insn, REG_EQUIV, in); + set_dst_reg_note (insn, REG_EQUIV, in, out); } #ifdef SECONDARY_MEMORY_NEEDED diff --git a/gcc/rtl.h b/gcc/rtl.h index fd3e3ef641e..bd09cbfa125 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -1893,6 +1893,7 @@ extern enum machine_mode choose_hard_reg_mode (unsigned int, unsigned int, /* In emit-rtl.c */ extern rtx set_unique_reg_note (rtx, enum reg_note, rtx); +extern rtx set_dst_reg_note (rtx, enum reg_note, rtx, rtx); extern void set_insn_deleted (rtx); /* Functions in rtlanal.c */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1763ada432c..1d78adfdb8c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,377 @@ +2011-12-12 Richard Guenther <rguenther@suse.de> + + PR lto/51262 + * g++.dg/opt/pr51262.C: New testcase. + +2011-12-12 Revital Eres <revital.eres@linaro.org> + + PR rtl-optimization/47013 + * gcc.dg/sms-2.c: Change scan-tree-dump-times and the code itself + to preserve the function. + * gcc.dg/sms-6.c: Add --param sms-min-sc=1. Add dg-options for + powerpc*-*-*. Avoid superfluous spaces in dg-final. + * gcc.dg/sms-3.c: Add --param sms-min-sc=1 and + -fmodulo-sched-allow-regmoves flags. + * gcc.dg/sms-7.c: Likewise. Remove dg-final for powerpc*-*-* + and avoid superfluous spaces in dg-final for spu-*-*. + * gcc.dg/sms-4.c: Add dg-options for powerpc*-*-*. + * gcc.dg/sms-8.c: Add --param sms-min-sc=1. Add dg-options and + change scan-rtl-dump-times for powerpc*-*-*. + * gcc.dg/sms-5.c: Add --param sms-min-sc=1 flag, remove + powerpc*-*-* from dg-final and avoid superfluous spaces in + dg-final. + * gcc.dg/sms-9.c: Remove -fno-auto-inc-dec. + +2011-12-11 Jakub Jelinek <jakub@redhat.com> + + PR tree-optimization/51485 + * g++.dg/vect/pr51485.cc: New test. + +2011-12-11 Tobias Burnus <burnus@net-b.de> + + PR fortran/50923 + * gfortran.dg/warn_function_without_result_2.f90: New. + +2011-12-11 Paul Thomas <pault@gcc.gnu.org> + Tobias Burnus <burnus@gcc.gnu.org> + + PR fortran/41539 + PR fortran/43214 + PR fortran/43969 + PR fortran/44568 + PR fortran/46356 + PR fortran/46990 + PR fortran/49074 + * gfortran.dg/class_array_1.f03: New. + * gfortran.dg/class_array_2.f03: New. + * gfortran.dg/class_array_3.f03: New. + * gfortran.dg/class_array_4.f03: New. + * gfortran.dg/class_array_5.f03: New. + * gfortran.dg/class_array_6.f03: New. + * gfortran.dg/class_array_7.f03: New. + * gfortran.dg/class_array_8.f03: New. + * gfortran.dg/coarray_poly_1.f90: New. + * gfortran.dg/coarray_poly_2.f90: New. + * gfortran.dg/coarray/poly_run_1.f90: New. + * gfortran.dg/coarray/poly_run_2.f90: New. + * gfortran.dg/class_to_type_1.f03: New. + * gfortran.dg/type_to_class_1.f03: New. + * gfortran.dg/typebound_assignment_3.f03: Remove the error. + * gfortran.dg/auto_dealloc_2.f90: Occurences of __builtin_free + now 2. + * gfortran.dg/class_19.f03: Occurences of __builtin_free now 8. + +2011-12-11 Thomas Koenig <tkoenig@gcc.gnu.org> + + PR fortran/50690 + * gfortran.dg/gomp/workshare2.f90: New test. + * gfortran.dg/gomp/workshare3.f90: New test. + +2011-12-11 Eric Botcazou <ebotcazou@adacore.com> + + * gnat.dg/specs/elab3.ads: New test. + +2011-12-10 Richard Henderson <rth@redhat.com> + + * gcc.target/powerpc/altivec-perm-1.c: New. + * gcc.target/powerpc/altivec-perm-2.c: New. + * gcc.target/powerpc/altivec-perm-4.c: New. + +2011-12-10 Joern Rennecke <joern.rennecke@embecosm.com> + + * gcc.target/epiphany/interrupt.c: Add dg-options "-g". + Add a scan-assembler-time clause to test for the interupt vector jump. + (f): Rename to ... + (dma0_handler): ... this. + +2011-12-10 Nathan Sidwell <nathan@acm.org> + + PR gcov-profile/51449 + * g++.dg/gcov/gcov-14.C: New. + +2011-12-09 Eric Botcazou <ebotcazou@adacore.com> + + * gcc.c-torture/compile/20111209-1.c: New test. + +2011-12-09 Jason Merrill <jason@redhat.com> + + PR c++/51151 + * g++.dg/warn/Woverflow-4.C: New. + +2011-12-09 Dodji Seketeli <dodji@redhat.com> + + PR c++/51289 + * g++.dg/cpp0x/alias-decl-17.C: New test. + +2011-12-09 Michael Meissner <meissner@the-meissners.org> + + * gcc.target/powerpc/recip-5.c: Disable running on any system that + does not support VSX. + + * gcc.target/powerpc/ppc-target-4.c: New file to test target + specific functions enabling target specific builtins. + +2011-12-09 Michael Zolotukhin <michael.v.zolotukhin@intel.com> + + * gcc.dg/vect/slp-13.c: Array size increase reverted. + * gcc.dg/vect/slp-24.c: Ditto. + * gcc.dg/vect/slp-3.c: Ditto. + * gcc.dg/vect/slp-34.c: Ditto. + * gcc.dg/vect/slp-4.c: Ditto. + * gcc.dg/vect/slp-cond-2.c: Ditto. + * gcc.dg/vect/slp-multitypes-11.c: Ditto. + * gcc.dg/vect/vect-1.c: Ditto. + * gcc.dg/vect/vect-10.c: Ditto. + * gcc.dg/vect/vect-105.c: Ditto. + * gcc.dg/vect/vect-112.c: Ditto. + * gcc.dg/vect/vect-15.c: Ditto. + * gcc.dg/vect/vect-2.c: Ditto. + * gcc.dg/vect/vect-31.c: Ditto. + * gcc.dg/vect/vect-32.c: Ditto. + * gcc.dg/vect/vect-33.c: Ditto. + * gcc.dg/vect/vect-34.c: Ditto. + * gcc.dg/vect/vect-35.c: Ditto. + * gcc.dg/vect/vect-36.c: Ditto. + * gcc.dg/vect/vect-6.c: Ditto. + * gcc.dg/vect/vect-73.c: Ditto. + * gcc.dg/vect/vect-74.c: Ditto. + * gcc.dg/vect/vect-75.c: Ditto. + * gcc.dg/vect/vect-76.c: Ditto. + * gcc.dg/vect/vect-80.c: Ditto. + * gcc.dg/vect/vect-85.c: Ditto. + * gcc.dg/vect/vect-89.c: Ditto. + * gcc.dg/vect/vect-97.c: Ditto. + * gcc.dg/vect/vect-98.c: Ditto. + * gcc.dg/vect/vect-all.c: Ditto. + * gcc.dg/vect/vect-double-reduc-6.c: Ditto. + * gcc.dg/vect/vect-iv-8.c: Ditto. + * gcc.dg/vect/vect-iv-8a.c: Ditto. + * gcc.dg/vect/vect-outer-1.c: Ditto. + * gcc.dg/vect/vect-outer-1a.c: Ditto. + * gcc.dg/vect/vect-outer-1b.c: Ditto. + * gcc.dg/vect/vect-outer-2.c: Ditto. + * gcc.dg/vect/vect-outer-2a.c: Ditto. + * gcc.dg/vect/vect-outer-2c.c: Ditto. + * gcc.dg/vect/vect-outer-3.c: Ditto. + * gcc.dg/vect/vect-outer-3a.c: Ditto. + * gcc.dg/vect/vect-outer-4a.c: Ditto. + * gcc.dg/vect/vect-outer-4b.c: Ditto. + * gcc.dg/vect/vect-outer-4c.c: Ditto. + * gcc.dg/vect/vect-outer-4d.c: Ditto. + * gcc.dg/vect/vect-outer-4m.c: Ditto. + * gcc.dg/vect/vect-outer-fir-lb.c: Ditto. + * gcc.dg/vect/vect-outer-fir.c: Ditto. + * gcc.dg/vect/vect-over-widen-1.c: Ditto. + * gcc.dg/vect/vect-over-widen-2.c: Ditto. + * gcc.dg/vect/vect-over-widen-3.c: Ditto. + * gcc.dg/vect/vect-over-widen-4.c: Ditto. + * gcc.dg/vect/vect-reduc-1char.c: Ditto. + * gcc.dg/vect/vect-reduc-2char.c: Ditto. + * gcc.dg/vect/vect-reduc-pattern-1b.c: Ditto. + * gcc.dg/vect/vect-reduc-pattern-1c.c: Ditto. + * gcc.dg/vect/vect-reduc-pattern-2b.c: Ditto. + * gcc.dg/vect/vect-shift-2.c: Ditto. + * gcc.dg/vect/vect-strided-a-u8-i8-gap2.c: Ditto. + * gcc.dg/vect/vect-strided-a-u8-i8-gap7.c: Ditto. + * gcc.dg/vect/vect-strided-u8-i8-gap2.c: Ditto. + * gcc.dg/vect/vect-strided-u8-i8-gap4.c: Ditto. + * gcc.dg/vect/vect-strided-u8-i8-gap7.c: Ditto. + * gcc.dg/vect/slp-13-big-array.c: New test. + * gcc.dg/vect/slp-24-big-array.c: Ditto. + * gcc.dg/vect/slp-3-big-array.c: Ditto. + * gcc.dg/vect/slp-34-big-array.c: Ditto. + * gcc.dg/vect/slp-4-big-array.c: Ditto. + * gcc.dg/vect/slp-cond-2-big-array.c: Ditto. + * gcc.dg/vect/slp-multitypes-11-big-array.c: Ditto. + * gcc.dg/vect/vect-1-big-array.c: Ditto. + * gcc.dg/vect/vect-10-big-array.c: Ditto. + * gcc.dg/vect/vect-105-big-array.c: Ditto. + * gcc.dg/vect/vect-112-big-array.c: Ditto. + * gcc.dg/vect/vect-15-big-array.c: Ditto. + * gcc.dg/vect/vect-2-big-array.c: Ditto. + * gcc.dg/vect/vect-31-big-array.c: Ditto. + * gcc.dg/vect/vect-32-big-array.c: Ditto. + * gcc.dg/vect/vect-33-big-array.c: Ditto. + * gcc.dg/vect/vect-34-big-array.c: Ditto. + * gcc.dg/vect/vect-35-big-array.c: Ditto. + * gcc.dg/vect/vect-36-big-array.c: Ditto. + * gcc.dg/vect/vect-6-big-array.c: Ditto. + * gcc.dg/vect/vect-73-big-array.c: Ditto. + * gcc.dg/vect/vect-74-big-array.c: Ditto. + * gcc.dg/vect/vect-75-big-array.c: Ditto. + * gcc.dg/vect/vect-76-big-array.c: Ditto. + * gcc.dg/vect/vect-80-big-array.c: Ditto. + * gcc.dg/vect/vect-85-big-array.c: Ditto. + * gcc.dg/vect/vect-89-big-array.c: Ditto. + * gcc.dg/vect/vect-97-big-array.c: Ditto. + * gcc.dg/vect/vect-98-big-array.c: Ditto. + * gcc.dg/vect/vect-all-big-array.c: Ditto. + * gcc.dg/vect/vect-double-reduc-6-big-array.c: Ditto. + * gcc.dg/vect/vect-iv-8-big-array.c: Ditto. + * gcc.dg/vect/vect-iv-8a-big-array.c: Ditto. + * gcc.dg/vect/vect-outer-1-big-array.c: Ditto. + * gcc.dg/vect/vect-outer-1a-big-array.c: Ditto. + * gcc.dg/vect/vect-outer-1b-big-array.c: Ditto. + * gcc.dg/vect/vect-outer-2-big-array.c: Ditto. + * gcc.dg/vect/vect-outer-2a-big-array.c: Ditto. + * gcc.dg/vect/vect-outer-2c-big-array.c: Ditto. + * gcc.dg/vect/vect-outer-3-big-array.c: Ditto. + * gcc.dg/vect/vect-outer-3a-big-array.c: Ditto. + * gcc.dg/vect/vect-outer-4a-big-array.c: Ditto. + * gcc.dg/vect/vect-outer-4b-big-array.c: Ditto. + * gcc.dg/vect/vect-outer-4c-big-array.c: Ditto. + * gcc.dg/vect/vect-outer-4d-big-array.c: Ditto. + * gcc.dg/vect/vect-outer-4m-big-array.c: Ditto. + * gcc.dg/vect/vect-outer-fir-lb-big-array.c: Ditto. + * gcc.dg/vect/vect-outer-fir-big-array.c: Ditto. + * gcc.dg/vect/vect-over-widen-1-big-array.c: Ditto. + * gcc.dg/vect/vect-over-widen-2-big-array.c: Ditto. + * gcc.dg/vect/vect-over-widen-3-big-array.c: Ditto. + * gcc.dg/vect/vect-over-widen-4-big-array.c: Ditto. + * gcc.dg/vect/vect-reduc-1char-big-array.c: Ditto. + * gcc.dg/vect/vect-reduc-2char-big-array.c: Ditto. + * gcc.dg/vect/vect-reduc-pattern-1b-big-array.c: Ditto. + * gcc.dg/vect/vect-reduc-pattern-1c-big-array.c: Ditto. + * gcc.dg/vect/vect-reduc-pattern-2b-big-array.c: Ditto. + * gcc.dg/vect/vect-shift-2-big-array.c: Ditto. + * gcc.dg/vect/vect-strided-a-u8-i8-gap2-big-array.c: Ditto. + * gcc.dg/vect/vect-strided-a-u8-i8-gap7-big-array.c: Ditto. + * gcc.dg/vect/vect-strided-u8-i8-gap2-big-array.c: Ditto. + * gcc.dg/vect/vect-strided-u8-i8-gap4-big-array.c: Ditto. + * gcc.dg/vect/vect-strided-u8-i8-gap7-big-array.c: Ditto. + +2011-12-09 Richard Guenther <rguenther@suse.de> + + PR lto/48042 + * g++.dg/lto/pr48042_0.C: New testcase. + +2011-12-09 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/51482 + * g++.dg/torture/pr51482.C: New testcase. + +2011-12-08 Andrew Pinski <apinski@cavium.com> + + * gcc.target/mips/mult-1.c: Forbid all Octeon processors. + * gcc.target/mips/dmult-1.c: Likewise. + * gcc.target/mips/branch-1.c: Likewise. + * gcc.target/mips/extend-1.c: Likewise. + +2011-12-08 Jason Merrill <jason@redhat.com> + + PR c++/51318 + * g++.dg/template/cond8.C: New. + + PR c++/51459 + * g++.dg/cpp0x/lambda/lambda-template4.C: New. + +2011-12-08 Jakub Jelinek <jakub@redhat.com> + + PR tree-optimization/51466 + * gcc.c-torture/execute/pr51466.c: New test. + +2011-12-08 Tobias Burnus <burnus@net-b.de> + + PR fortran/50815 + * gfortran.dg/bounds_check_16.f90: New. + +2011-12-08 Tobias Burnus <burnus@net-b.de> + + PR fortran/51378 + * gfortran.dg/private_type_14.f90: New. + +2011-12-08 Tobias Burnus <burnus@net-b.de> + + PR fortran/51407 + * gfortran.dg/io_real_boz_3.f90: New. + * gfortran.dg/io_real_boz_4.f90: New. + * gfortran.dg/io_real_boz_5.f90: New. + +2011-12-08 Tobias Burnus <burnus@net-b.de> + + PR fortran/51448 + * gfortran.dg/realloc_on_assign_8.f90: New. + +2011-12-08 Teresa Johnson <tejohnson@google.com> + + * gcc.target/i386/movdi-rex64.c: Remove unnecessary + unused label. + +2011-12-08 Teresa Johnson <tejohnson@google.com> + + * gcc.target/i386/movdi-rex64.c: Remove unnecessary + -Wwrite-strings option. + +2011-12-08 Teresa Johnson <tejohnson@google.com> + + * gcc.target/i386/movdi-rex64.c: New. + +2011-12-08 Richard Guenther <rguenther@suse.de> + + * gcc.dg/volatile3.c: New testcase. + +2011-12-08 Georg-Johann Lay <avr@gjlay.de> + + PR tree-optimization/51315 + * gcc.c-torture/execute/20111208-1.c (int16_t): Use __INT16_TYPE__ + for typedef. + (int32_t): Use __INT32_TYPE__ for typedef. + +2011-12-08 Georg-Johann Lay <avr@gjlay.de> + + PR tree-optimization/51315 + * gcc.c-torture/execute/20111208-1.c: Fix wrong assumption + sizeof(int)==4. + +2011-12-08 Richard Guenther <rguenther@suse.de> + + PR lto/50747 + * g++.dg/opt/pr50747-1_0.C: New testcase. + * g++.dg/opt/pr50747-2_0.C: Likewise. + +2011-12-08 Eric Botcazou <ebotcazou@adacore.com> + + * gcc.c-torture/execute/20111208-1.c: New test. + +2011-12-08 Richard Guenther <rguenther@suse.de> + + PR lto/48437 + * gcc.dg/lto/20111207-2_0.c: New testcase. + * gcc.dg/guality/pr48437.c: Likewise. + +2011-12-07 Jakub Jelinek <jakub@redhat.com> + + PR c++/51401 + * g++.dg/cpp0x/auto7.C: Adjust expected error message. + * g++.dg/cpp0x/auto29.C: New test. + + PR c++/51429 + * g++.dg/parse/error45.C: New test. + + PR c++/51229 + * g++.dg/ext/desig3.C: New test. + + PR c++/51369 + * g++.dg/cpp0x/constexpr-51369.C: New test. + +2011-12-07 Andrew Pinski <apinski@cavium.com> + + PR middle-end/45416 + * gcc.dg/pr45416.c: New testcase. + +2011-12-07 Ed Smith-Rowland <3dw4rd@verizon.net> + + PR c++/51420 + * g++.dg/cpp0x/pr51420.C: New. + +2011-12-07 Richard Guenther <rguenther@suse.de> + + PR lto/48100 + * gcc.dg/lto/20111207-1_0.c: New testcase. + * gcc.dg/lto/20111207-1_1.c: Likewise. + * gcc.dg/lto/20111207-1_2.c: Likewise. + * gcc.dg/lto/20111207-1_3.c: Likewise. + 2011-12-07 Richard Guenther <rguenther@suse.de> PR tree-optimization/50823 @@ -374,11 +748,6 @@ PR target/50123 * gcc.dg/atomic-op-optimize.c: New. Test for optimizations. -2011-11-29 Michael Meissner <meissner@linux.vnet.ibm.com> - - * gcc.target/powerpc/ppc-target-4.c: New file to test target - specific functions enabling target specific builtins. - 2011-11-29 Yufeng Zhang <yufeng.zhang@arm.com> Use complex floating-point constant in CDBL. diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-17.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-17.C new file mode 100644 index 00000000000..41b1c950fcd --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-17.C @@ -0,0 +1,21 @@ +// Origin PR c++/51289 +// { dg-options "-std=c++11" } + +template<typename a, template <typename, typename> class b> +struct foo { + template <typename t> + using type = b<a, t>; + template <typename t> + b<a, t> funca() {} + + template <typename t> + type<t> funcb() {} +}; + +// This is an additional test, to emit an error message when using +// unexpanded parameter packs in an alias declaration. +template <class ... T> +struct S {}; + +template<class ... T> +using A = S<T>; // { dg-error "parameter packs not expanded" } diff --git a/gcc/testsuite/g++.dg/cpp0x/auto29.C b/gcc/testsuite/g++.dg/cpp0x/auto29.C new file mode 100644 index 00000000000..818745751a8 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/auto29.C @@ -0,0 +1,25 @@ +// PR c++/51401 +// { dg-do compile } +// { dg-options "-std=c++11" } + +template <int> +struct A +{ + auto i; // { dg-error "non-static data member declared" } +}; + +template <int> +struct B +{ + auto i = 0; // { dg-error "non-static data member declared" } +}; + +struct C +{ + auto i; // { dg-error "non-static data member declared" } +}; + +struct D +{ + auto i = 0; // { dg-error "non-static data member declared" } +}; diff --git a/gcc/testsuite/g++.dg/cpp0x/auto7.C b/gcc/testsuite/g++.dg/cpp0x/auto7.C index e7ab7236d05..3b3b8290168 100644 --- a/gcc/testsuite/g++.dg/cpp0x/auto7.C +++ b/gcc/testsuite/g++.dg/cpp0x/auto7.C @@ -9,5 +9,5 @@ template<int> struct A { static auto k = 7; // { dg-error "non-const" } static auto l; // { dg-error "has no initializer" } - auto m; // { dg-error "has no initializer" } + auto m; // { dg-error "non-static data member declared" } }; diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-51369.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-51369.C new file mode 100644 index 00000000000..6606be8b6f3 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-51369.C @@ -0,0 +1,12 @@ +// PR c++/51369 +// { dg-do compile } +// { dg-options "-std=c++11" } + +constexpr int x[2][2] = {}; + +template<int> +void +foo () +{ + x[0][0]; +} diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template4.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template4.C new file mode 100644 index 00000000000..a65727a1d43 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template4.C @@ -0,0 +1,42 @@ +// PR c++/51459 +// { dg-do run { target c++11 } } + +struct func { + virtual ~func() { } + virtual void operator()() const = 0; + virtual func* clone() const = 0; +}; + +template<typename T> +struct funcimpl : func { + explicit funcimpl(T t) : t(t) { } + void operator()() const { t(); } + func* clone() const { return new funcimpl(*this); } + T t; +}; + +struct function +{ + func* p; + + template<typename T> + function(T t) : p(new funcimpl<T>(t)) { } + + ~function() { delete p; } + + function(const function& f) : p(f.p->clone()) { } + + function& operator=(const function& ) = delete; + + void operator()() const { (*p)(); } +}; + +template <typename F> +function animate(F f) { return [=]{ f(); }; } + +int main() +{ + function linear1 = []{}; + function av(animate(linear1)); + av(); +} diff --git a/gcc/testsuite/g++.dg/cpp0x/pr51420.C b/gcc/testsuite/g++.dg/cpp0x/pr51420.C new file mode 100644 index 00000000000..aec8cb1fcbc --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/pr51420.C @@ -0,0 +1,8 @@ +// { dg-options "-std=c++11" } + +void +foo() +{ + float x = operator"" _F(); // { dg-error "was not declared in this scope" } + float y = 0_F; // { dg-error "unable to find numeric literal operator" } +} diff --git a/gcc/testsuite/g++.dg/ext/desig3.C b/gcc/testsuite/g++.dg/ext/desig3.C new file mode 100644 index 00000000000..d1ff5e53ef5 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/desig3.C @@ -0,0 +1,9 @@ +// PR c++/51229 +// { dg-do compile } +// { dg-options "" } + +struct A { int i; }; + +int a[5] = { .foo = 7 };// { dg-error "used in a GNU-style designated initializer for an array" } +int b[] = { .foo = 8 }; // { dg-error "used in a GNU-style designated initializer for an array" } +A c = { [0] = {} }; // { dg-error "used in a GNU-style designated initializer for class" } diff --git a/gcc/testsuite/g++.dg/gcov/gcov-14.C b/gcc/testsuite/g++.dg/gcov/gcov-14.C new file mode 100644 index 00000000000..8f8e3882d82 --- /dev/null +++ b/gcc/testsuite/g++.dg/gcov/gcov-14.C @@ -0,0 +1,16 @@ +/* { dg-options "-fprofile-arcs -ftest-coverage -Ofast" } */ +/* { dg-do run { target native } } */ + +#include <iostream> + +void __attribute__ ((noinline)) + Out (std::ostream &out, double x) +{ out << x << std::endl; } /* count(1) */ + +int main () +{ + Out (std::cout, 1.5); /* count(1) */ + return 0; +} + +/* { dg-final { run-gcov gcov-14.C } } */ diff --git a/gcc/testsuite/g++.dg/lto/pr48042_0.C b/gcc/testsuite/g++.dg/lto/pr48042_0.C new file mode 100644 index 00000000000..00b3428e9f1 --- /dev/null +++ b/gcc/testsuite/g++.dg/lto/pr48042_0.C @@ -0,0 +1,14 @@ +// { dg-lto-do link } +// { dg-extra-ld-options "-r -nostdlib -g" } + +class A { + virtual int x() = 0; +}; + +class B:public A { + int x(); +}; + +int B::x() { +} + diff --git a/gcc/testsuite/g++.dg/opt/pr50747-1_0.C b/gcc/testsuite/g++.dg/opt/pr50747-1_0.C new file mode 100644 index 00000000000..4a5546c638e --- /dev/null +++ b/gcc/testsuite/g++.dg/opt/pr50747-1_0.C @@ -0,0 +1,18 @@ +// { dg-do compile } +// { dg-require-effective-target lto } +// { dg-options "-flto" } + +void foo(); + +static void bar() __attribute__((weakref("foo"))); + +struct A +{ + A(); +}; + +int i; + +template <typename T, int&> struct B : T {}; + +B<A, i> b; diff --git a/gcc/testsuite/g++.dg/opt/pr50747-2_0.C b/gcc/testsuite/g++.dg/opt/pr50747-2_0.C new file mode 100644 index 00000000000..26f423af631 --- /dev/null +++ b/gcc/testsuite/g++.dg/opt/pr50747-2_0.C @@ -0,0 +1,112 @@ +// { dg-do compile } +// { dg-require-effective-target lto } +// { dg-options "-w -fpermissive -fno-implicit-templates -flto" } + +namespace std { + typedef long unsigned int size_t; + template<typename _Alloc> class allocator; + template<class _CharT> struct char_traits; + template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_ostream; + template<typename _CharT, typename _Traits = char_traits<_CharT>, typename _Alloc = allocator<_CharT> > class basic_ostringstream; +} +extern "C++" { + namespace std { + class exception { + }; + }; +} +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + template<typename _Tp> class new_allocator { + }; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template<typename _Tp> class allocator: public __gnu_cxx::new_allocator<_Tp> { + public: typedef size_t size_type; + template<typename _Tp1> struct rebind { + typedef allocator<_Tp1> other; + }; + }; + template<typename _CharT, typename _Traits, typename _Alloc> class basic_string { + typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type; + typedef typename _CharT_alloc_type::size_type size_type; + private: struct _Rep_base { + }; + struct _Rep : _Rep_base { + _CharT* _M_refdata() throw() { + } + }; + struct _Alloc_hider : _Alloc { + _Alloc_hider(_CharT* __dat, const _Alloc& __a) : _Alloc(__a), _M_p(__dat) { + } + _CharT* _M_p; + }; + private: mutable _Alloc_hider _M_dataplus; + static _Rep& _S_empty_rep() { + } + public: basic_string() : _M_dataplus(_S_empty_rep()._M_refdata(), _Alloc()) { + } + template<class _InputIterator> basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a = _Alloc()); + static _CharT* _S_construct(size_type __req, _CharT __c, const _Alloc& __a); + }; + template<typename _CharT, typename _Traits, typename _Alloc> inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const basic_string<_CharT, _Traits, _Alloc>& __str) { + } + template<typename _CharT, typename _Traits, typename _Alloc> template<typename _InputIterator> basic_string<_CharT, _Traits, _Alloc>:: basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a) : _M_dataplus(_S_construct(__beg, __end, __a), __a) { + }; + enum _Ios_Openmode { + _S_app = 1L << 0, _S_ate = 1L << 1, _S_bin = 1L << 2, _S_in = 1L << 3, _S_out = 1L << 4, _S_trunc = 1L << 5, _S_ios_openmode_end = 1L << 16 }; + class ios_base { + public: class failure : public exception { + }; + typedef _Ios_Openmode openmode; + static const openmode in = _S_in; + static const openmode out = _S_out; + }; + template<typename _CharT, typename _Traits> class basic_streambuf { + public: typedef _CharT char_type; + char_type* egptr() const { + } + char_type* pbase() const { + } + char_type* pptr() const { + } + }; + template<typename _CharT, typename _Traits> class basic_ios : public ios_base { + }; + template<typename _CharT, typename _Traits> class basic_ostream : virtual public basic_ios<_CharT, _Traits> { + }; + template<typename _CharT, typename _Traits, typename _Alloc> class basic_stringbuf : public basic_streambuf<_CharT, _Traits> { + public: typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_streambuf<char_type, traits_type> __streambuf_type; + typedef basic_string<char_type, _Traits, _Alloc> __string_type; + protected: ios_base::openmode _M_mode; + __string_type _M_string; + public: explicit basic_stringbuf(ios_base::openmode __mode = ios_base::in | ios_base::out) : __streambuf_type(), _M_mode(__mode), _M_string() { + } + __string_type str() const { + __string_type __ret; + if (this->pptr()) { + if (this->pptr() > this->egptr()) __ret = __string_type(this->pbase(), this->pptr()); + } + } + }; + template <typename _CharT, typename _Traits, typename _Alloc> class basic_ostringstream : public basic_ostream<_CharT, _Traits> { + public: typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; + typedef basic_ostream<char_type, traits_type> __ostream_type; + private: __stringbuf_type _M_stringbuf; + public: explicit basic_ostringstream(ios_base::openmode __mode = ios_base::out) : __ostream_type(), _M_stringbuf(__mode | ios_base::out) { + } + __string_type str() const { + return _M_stringbuf.str(); + } + }; + template<typename _Tp> class complex; + template<typename _Tp, typename _CharT, class _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x) { + basic_ostringstream<_CharT, _Traits> __s; + return __os << __s.str(); + }; + template basic_ostream<wchar_t, char_traits<wchar_t> >& operator<<(basic_ostream<wchar_t, char_traits<wchar_t> >&, const complex<long double>&); +} diff --git a/gcc/testsuite/g++.dg/opt/pr51262.C b/gcc/testsuite/g++.dg/opt/pr51262.C new file mode 100644 index 00000000000..d0e8d781262 --- /dev/null +++ b/gcc/testsuite/g++.dg/opt/pr51262.C @@ -0,0 +1,21 @@ +// { dg-do compile } +// { dg-require-effective-target lto } +// { dg-options "-flto -g" } + +template < typename > void * +bar (int *p) +{ + union + { + int *p; + } + u; + u.p = p; + return u.p; +} + +void +foo (int *p) +{ + bar < void >(p); +} diff --git a/gcc/testsuite/g++.dg/parse/error45.C b/gcc/testsuite/g++.dg/parse/error45.C new file mode 100644 index 00000000000..7df8b13f469 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/error45.C @@ -0,0 +1,9 @@ +// PR c++/51429 +// { dg-do compile } + +struct A +{ + void foo (double); + void foo (int); + A () { foo = 0; } // { dg-error "invalid use of member function" } +}; diff --git a/gcc/testsuite/g++.dg/template/cond8.C b/gcc/testsuite/g++.dg/template/cond8.C new file mode 100644 index 00000000000..a3bad7e7bed --- /dev/null +++ b/gcc/testsuite/g++.dg/template/cond8.C @@ -0,0 +1,10 @@ +// PR c++/51318 + +enum { e0, e1 }; + +template<bool B, int = B ? e0 : e1> struct A {}; + +template<typename T> struct B +{ + A<T::X> a; +}; diff --git a/gcc/testsuite/g++.dg/tm/cgraph_edge.C b/gcc/testsuite/g++.dg/tm/cgraph_edge.C new file mode 100644 index 00000000000..d4c8f77fe89 --- /dev/null +++ b/gcc/testsuite/g++.dg/tm/cgraph_edge.C @@ -0,0 +1,33 @@ +// { dg-do compile } +// { dg-options "-fgnu-tm -O3" } + +template<typename _InputIterator, typename _Distance> inline void advance(_InputIterator& __i, _Distance __n) + { + if (__n > 0) + while (__n--) + --__i; + else + --__i; + } + +void _Rb_tree_increment (); + +template<typename _Tp> struct _Rb_tree_iterator + { + typedef _Rb_tree_iterator<_Tp> iterator; + + iterator& operator--() + { + _Rb_tree_increment(); + } + }; + +void update () + { + _Rb_tree_iterator<int>::iterator it; + __transaction_relaxed + { + advance (it, 0); + } + } + diff --git a/gcc/testsuite/g++.dg/torture/pr51482.C b/gcc/testsuite/g++.dg/torture/pr51482.C new file mode 100644 index 00000000000..28435919f46 --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/pr51482.C @@ -0,0 +1,30 @@ +// { dg-do compile } + +typedef enum { CLASS_IN = 1, CLASS_OUT = -1 } FERGUSON_KEY_CLASS, BEZIER_KEY_CLASS; +typedef class flag_interface { } VECT3DF_SIMPLE; +typedef struct vect3df { + float x,y,z; +} VECT3DF, VECT; +typedef struct vect4df : public vect3df { + float w; +} VECT4DF, WVECT; +typedef class llist_item { } ANIM_KEY; +typedef class anim_track : public flag_interface, public llist_item { } ANIM_KEY_BEZ; +typedef class anim_track_bezier : public anim_track { } ANIM_KEY_BEZ_WVECT; +typedef class anim_track_bez_wvect : public anim_track_bezier { + WVECT * tangent(int kn, BEZIER_KEY_CLASS key_class, WVECT *p_tn); +} ANIM_TRACK_BEZ_WVECT; +WVECT * anim_track_bez_wvect::tangent(int kn, BEZIER_KEY_CLASS key_class, WVECT *p_tn) +{ + float bias,continuity,tension,tn1,bp1; + WVECT *p_p0,*p_p1,*p_p2, t1, g1,g2,g3; + g1.x = (p_p1->x - p_p0->x)*bp1; + g1.y = (p_p1->y - p_p0->y)*bp1; + g1.z = (p_p1->z - p_p0->z)*bp1; + g1.w = (p_p1->w - p_p0->w)*bp1; + bp1 = (0.5f + key_class*0.5f*continuity); + p_tn->x = (g1.x + g3.x*bp1)*tn1; + p_tn->y = (g1.y + g3.y*bp1)*tn1; + p_tn->z = (g1.z + g3.z*bp1)*tn1; + p_tn->w = (g1.w + g3.w*bp1)*tn1; +} diff --git a/gcc/testsuite/g++.dg/vect/pr51485.cc b/gcc/testsuite/g++.dg/vect/pr51485.cc new file mode 100644 index 00000000000..d57d7596d0e --- /dev/null +++ b/gcc/testsuite/g++.dg/vect/pr51485.cc @@ -0,0 +1,14 @@ +/* { dg-do compile } */ + +struct A { A (); unsigned int a; }; +double bar (A a) throw () __attribute__((pure)); + +void +foo (unsigned int x, double *y, A *z) +{ + unsigned int i; + for (i = 0; i < x; i++) + y[i] = bar (z[i]); +} + +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/g++.dg/warn/Woverflow-4.C b/gcc/testsuite/g++.dg/warn/Woverflow-4.C new file mode 100644 index 00000000000..1595bcada3e --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/Woverflow-4.C @@ -0,0 +1,13 @@ +// PR c++/51151 +// { dg-options "-Wshadow" } + +template<typename T> class C { +public: + void f() { + m = c2 + 1; + } + static const long unsigned int c1 = 7; + static const int c2 = c1 - 1; + int m; +}; +template class C<int>; diff --git a/gcc/testsuite/gcc.c-torture/compile/20111209-1.c b/gcc/testsuite/gcc.c-torture/compile/20111209-1.c new file mode 100644 index 00000000000..c7f832a9e37 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20111209-1.c @@ -0,0 +1,13 @@ +/* { dg-do compile { target s390x-*-* *-*-*vms* } } */ + +typedef char* char_ptr32 __attribute__ ((mode(SI))); + +char_ptr32 getenv (const char *name); +unsigned long strlen (const char *str); + +void +__gnat_getenv (char *name, int *len, char **value) +{ + *value = getenv (name); + *len = strlen (*value); +} diff --git a/gcc/testsuite/gcc.c-torture/execute/20111208-1.c b/gcc/testsuite/gcc.c-torture/execute/20111208-1.c new file mode 100644 index 00000000000..dc2b9ca8c86 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20111208-1.c @@ -0,0 +1,94 @@ +/* PR tree-optimization/51315 */ +/* Reported by Jurij Smakov <jurij@wooyd.org> */ + +typedef unsigned int size_t; + +extern void *memcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + +extern size_t strlen (__const char *__s) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + +typedef __INT16_TYPE__ int16_t; +typedef __INT32_TYPE__ int32_t; + +extern void abort (void); + +int a; + +static void __attribute__ ((noinline,noclone)) +do_something (int item) +{ + a = item; +} + +int +pack_unpack (char *s, char *p) +{ + char *send, *pend; + char type; + int integer_size; + + send = s + strlen (s); + pend = p + strlen (p); + + while (p < pend) + { + type = *p++; + + switch (type) + { + case 's': + integer_size = 2; + goto unpack_integer; + + case 'l': + integer_size = 4; + goto unpack_integer; + + unpack_integer: + switch (integer_size) + { + case 2: + { + union + { + int16_t i; + char a[sizeof (int16_t)]; + } + v; + memcpy (v.a, s, sizeof (int16_t)); + s += sizeof (int16_t); + do_something (v.i); + } + break; + + case 4: + { + union + { + int32_t i; + char a[sizeof (int32_t)]; + } + v; + memcpy (v.a, s, sizeof (int32_t)); + s += sizeof (int32_t); + do_something (v.i); + } + break; + } + break; + } + } + return (int) *s; +} + +int +main (void) +{ + int n = pack_unpack ("\200\001\377\376\035\300", "sl"); + if (n != 0) + abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.c-torture/execute/pr51466.c b/gcc/testsuite/gcc.c-torture/execute/pr51466.c new file mode 100644 index 00000000000..aa0b7fd4fb9 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr51466.c @@ -0,0 +1,43 @@ +/* PR tree-optimization/51466 */ + +extern void abort (void); + +__attribute__((noinline, noclone)) int +foo (int i) +{ + volatile int v[4]; + int *p; + v[i] = 6; + p = (int *) &v[i]; + return *p; +} + +__attribute__((noinline, noclone)) int +bar (int i) +{ + volatile int v[4]; + int *p; + v[i] = 6; + p = (int *) &v[i]; + *p = 8; + return v[i]; +} + +__attribute__((noinline, noclone)) int +baz (int i) +{ + volatile int v[4]; + int *p; + v[i] = 6; + p = (int *) &v[0]; + *p = 8; + return v[i]; +} + +int +main () +{ + if (foo (3) != 6 || bar (2) != 8 || baz (0) != 8 || baz (1) != 6) + abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/guality/pr48437.c b/gcc/testsuite/gcc.dg/guality/pr48437.c new file mode 100644 index 00000000000..5346baa0bd8 --- /dev/null +++ b/gcc/testsuite/gcc.dg/guality/pr48437.c @@ -0,0 +1,17 @@ +/* PR lto/48437 */ +/* { dg-do run } */ +/* { dg-options "-g" } */ + +#include "../nop.h" + +int i __attribute__((used)); +int main() +{ + volatile int i; + for (i = 3; i < 7; ++i) + { + extern int i; + asm volatile (NOP : : : "memory"); /* { dg-final { gdb-test 14 "i" "0" } } */ + } + return 0; +} diff --git a/gcc/testsuite/gcc.dg/lto/20111207-1_0.c b/gcc/testsuite/gcc.dg/lto/20111207-1_0.c new file mode 100644 index 00000000000..486264066f6 --- /dev/null +++ b/gcc/testsuite/gcc.dg/lto/20111207-1_0.c @@ -0,0 +1,4 @@ +/* { dg-lto-do run } */ +/* { dg-lto-options { { -flto } } } */ +/* { dg-require-linker-plugin "" } */ +/* { dg-extra-ld-options "-fuse-linker-plugin" } */ diff --git a/gcc/testsuite/gcc.dg/lto/20111207-1_1.c b/gcc/testsuite/gcc.dg/lto/20111207-1_1.c new file mode 100644 index 00000000000..a616c194fca --- /dev/null +++ b/gcc/testsuite/gcc.dg/lto/20111207-1_1.c @@ -0,0 +1,3 @@ +/* { dg-options "-fno-lto" } */ + +int i; diff --git a/gcc/testsuite/gcc.dg/lto/20111207-1_2.c b/gcc/testsuite/gcc.dg/lto/20111207-1_2.c new file mode 100644 index 00000000000..048f715b465 --- /dev/null +++ b/gcc/testsuite/gcc.dg/lto/20111207-1_2.c @@ -0,0 +1 @@ +int i; diff --git a/gcc/testsuite/gcc.dg/lto/20111207-1_3.c b/gcc/testsuite/gcc.dg/lto/20111207-1_3.c new file mode 100644 index 00000000000..9beed59509a --- /dev/null +++ b/gcc/testsuite/gcc.dg/lto/20111207-1_3.c @@ -0,0 +1,6 @@ +extern int i; + +int main() +{ + return i; +} diff --git a/gcc/testsuite/gcc.dg/lto/20111207-2_0.c b/gcc/testsuite/gcc.dg/lto/20111207-2_0.c new file mode 100644 index 00000000000..672db535a08 --- /dev/null +++ b/gcc/testsuite/gcc.dg/lto/20111207-2_0.c @@ -0,0 +1,17 @@ +/* { dg-lto-do run } */ + +int +test (void) +{ + int f (void); + return 0; +} + +int +main (void) +{ + int f (void); + int test (void); + + return test (); +} diff --git a/gcc/testsuite/gcc.dg/pr45416.c b/gcc/testsuite/gcc.dg/pr45416.c new file mode 100644 index 00000000000..1e57185b1c7 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr45416.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +int foo(long long a) +{ + if (a & (long long) 0x400) + return 1; + return 0; +} + +/* { dg-final { scan-assembler "andl" { target i?86-*-linux* x86_64-*-linux* } } } " */ +/* { dg-final { scan-assembler-not "setne" { target i?86-*-linux* x86_64-*-linux* } } }" */ +/* { dg-final { scan-assembler "and" { target arm*-*-* } } }" */ +/* { dg-final { scan-assembler-not "moveq" { target arm*-*-* } } }" */ diff --git a/gcc/testsuite/gcc.dg/sms-2.c b/gcc/testsuite/gcc.dg/sms-2.c index 9ea63bd0f41..897e5d4b173 100644 --- a/gcc/testsuite/gcc.dg/sms-2.c +++ b/gcc/testsuite/gcc.dg/sms-2.c @@ -4,12 +4,11 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fmodulo-sched -fdump-rtl-sms" } */ - +int th, h, em, nlwm, nlwS, nlw, sy; void fun (nb) int nb; { - int th, h, em, nlwm, nlwS, nlw, sy; while (nb--) while (h--) @@ -33,5 +32,5 @@ fun (nb) } } -/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target spu-*-* powerpc*-*-* } } } */ +/* { dg-final { scan-rtl-dump-times "SMS loop many exits" 1 "sms" { target spu-*-* powerpc*-*-* } } } */ /* { dg-final { cleanup-rtl-dump "sms" } } */ diff --git a/gcc/testsuite/gcc.dg/sms-3.c b/gcc/testsuite/gcc.dg/sms-3.c index b78c2b27ee5..d1d3b508f67 100644 --- a/gcc/testsuite/gcc.dg/sms-3.c +++ b/gcc/testsuite/gcc.dg/sms-3.c @@ -1,5 +1,5 @@ /* { dg-do run } */ -/* { dg-options "-O2 -fmodulo-sched -funroll-loops -fdump-rtl-sms" } */ +/* { dg-options "-O2 -fmodulo-sched -funroll-loops -fdump-rtl-sms --param sms-min-sc=1 -fmodulo-sched-allow-regmoves" } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/sms-4.c b/gcc/testsuite/gcc.dg/sms-4.c index eafb395627d..83b32d05a4b 100644 --- a/gcc/testsuite/gcc.dg/sms-4.c +++ b/gcc/testsuite/gcc.dg/sms-4.c @@ -1,6 +1,7 @@ /* Inspired from sbitmap_a_or_b_and_c_cg function in sbitmap.c. */ /* { dg-do run } */ /* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -fdump-rtl-sms" } */ +/* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -fdump-rtl-sms --param sms-min-sc=1" { target powerpc*-*-* } } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/sms-5.c b/gcc/testsuite/gcc.dg/sms-5.c index 6fbb612e385..7bc4c33a3cd 100644 --- a/gcc/testsuite/gcc.dg/sms-5.c +++ b/gcc/testsuite/gcc.dg/sms-5.c @@ -1,5 +1,5 @@ /* { dg-do run } */ -/* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -funroll-loops -fdump-rtl-sms" } */ +/* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -funroll-loops -fdump-rtl-sms --param sms-min-sc=1" } */ /* This is the same test as loop-2e.c test. It is related to a fix in the generation of the prolog and epilog. */ @@ -46,7 +46,7 @@ int main () return 0; } -/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target powerpc*-*-* spu-*-* } } } */ +/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target spu-*-* } } } */ /* { dg-final { cleanup-rtl-dump "sms" } } */ diff --git a/gcc/testsuite/gcc.dg/sms-6.c b/gcc/testsuite/gcc.dg/sms-6.c index 34e9cf82da4..3da708dadac 100644 --- a/gcc/testsuite/gcc.dg/sms-6.c +++ b/gcc/testsuite/gcc.dg/sms-6.c @@ -1,5 +1,6 @@ /* { dg-do run } */ -/* { dg-options "-O2 -fmodulo-sched -fdump-rtl-sms" } */ +/* { dg-options "-O2 -fmodulo-sched -fdump-rtl-sms --param sms-min-sc=1" } */ +/* { dg-options "-O2 -fmodulo-sched -fdump-rtl-sms --param sms-min-sc=1 -fmodulo-sched-allow-regmoves" { target powerpc*-*-* } } */ extern void abort (void); @@ -43,7 +44,7 @@ int main() return 0; } -/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target spu-*-* } } } */ -/* { dg-final { scan-rtl-dump-times "SMS succeeded" 3 "sms" { target powerpc*-*-* } } } */ +/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target spu-*-* } } } */ +/* { dg-final { scan-rtl-dump-times "SMS succeeded" 3 "sms" { target powerpc*-*-* } } } */ /* { dg-final { cleanup-rtl-dump "sms" } } */ diff --git a/gcc/testsuite/gcc.dg/sms-7.c b/gcc/testsuite/gcc.dg/sms-7.c index 29791ff2a4f..f96530a2697 100644 --- a/gcc/testsuite/gcc.dg/sms-7.c +++ b/gcc/testsuite/gcc.dg/sms-7.c @@ -1,5 +1,5 @@ /* { dg-do run } */ -/* { dg-options "-O2 -fmodulo-sched -fstrict-aliasing -fdump-rtl-sms" } */ +/* { dg-options "-O3 -fmodulo-sched -fstrict-aliasing -fdump-rtl-sms -fmodulo-sched-allow-regmoves --param sms-min-sc=1" } */ extern void abort (void); @@ -44,7 +44,6 @@ int main() return 0; } -/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target spu-*-* } } } */ -/* { dg-final { scan-rtl-dump-times "SMS succeeded" 3 "sms" { target powerpc*-*-* } } } */ +/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target spu-*-* } } } */ /* { dg-final { cleanup-rtl-dump "sms" } } */ diff --git a/gcc/testsuite/gcc.dg/sms-8.c b/gcc/testsuite/gcc.dg/sms-8.c index afac55dadd1..1cb6280aab2 100644 --- a/gcc/testsuite/gcc.dg/sms-8.c +++ b/gcc/testsuite/gcc.dg/sms-8.c @@ -3,7 +3,8 @@ that was not fixed by reg-moves. */ /* { dg-do run } */ - /* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -fdump-rtl-sms" } */ + /* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -fdump-rtl-sms --param sms-min-sc=1" } */ + /* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -fdump-rtl-sms" { target powerpc*-*-* } } */ extern void abort (void); @@ -35,7 +36,7 @@ main () return 0; } -/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target powerpc*-*-* } } } */ +/* { dg-final { scan-rtl-dump-times "SMS succeeded" 0 "sms" { target powerpc*-*-* } } } */ /* { dg-final { cleanup-rtl-dump "sms" } } */ diff --git a/gcc/testsuite/gcc.dg/sms-9.c b/gcc/testsuite/gcc.dg/sms-9.c index 9d1f8814257..c8dc28104aa 100644 --- a/gcc/testsuite/gcc.dg/sms-9.c +++ b/gcc/testsuite/gcc.dg/sms-9.c @@ -1,5 +1,5 @@ /* { dg-do run } */ -/* { dg-options "-O2 -fmodulo-sched -fno-auto-inc-dec -O2 -fmodulo-sched-allow-regmoves" } */ +/* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves" } */ #include <stdlib.h> #include <stdarg.h> diff --git a/gcc/testsuite/gcc.dg/vect/slp-13-big-array.c b/gcc/testsuite/gcc.dg/vect/slp-13-big-array.c new file mode 100644 index 00000000000..c40822b62a0 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/slp-13-big-array.c @@ -0,0 +1,141 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 64 +volatile int y = 0; + +int +main1 () +{ + int i; + unsigned short out[N*8]; + unsigned short in[N*8]; + unsigned int in2[N*8]; + unsigned int out2[N*8]; + + for (i = 0; i < N*8; i++) + { + in[i] = in2[i] = i; + if (y) /* Avoid vectorization. */ + abort (); + } + + /* Induction is not SLPable yet. */ + for (i = 0; i < N; i++) + { + out[i*8] = in[i*8] + i; + out[i*8 + 1] = in[i*8 + 1] + i; + out[i*8 + 2] = in[i*8 + 2] + i; + out[i*8 + 3] = in[i*8 + 3] + i; + out[i*8 + 4] = in[i*8 + 4] + i; + out[i*8 + 5] = in[i*8 + 5] + i; + out[i*8 + 6] = in[i*8 + 6] + i; + out[i*8 + 7] = in[i*8 + 7] + i; + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (out[i*8] != in[i*8] + i + || out[i*8 + 1] != in[i*8 + 1] + i + || out[i*8 + 2] != in[i*8 + 2] + i + || out[i*8 + 3] != in[i*8 + 3] + i + || out[i*8 + 4] != in[i*8 + 4] + i + || out[i*8 + 5] != in[i*8 + 5] + i + || out[i*8 + 6] != in[i*8 + 6] + i + || out[i*8 + 7] != in[i*8 + 7] + i) + abort (); + } + + /* Induction is not SLPable yet and strided group size must be a power of 2 + to get vectorized. */ + for (i = 0; i < N/2; i++) + { + out2[i*12] = in2[i*12] + i; + out2[i*12 + 1] = in2[i*12 + 1] + i; + out2[i*12 + 2] = in2[i*12 + 2] + i; + out2[i*12 + 3] = in2[i*12 + 3] + i; + out2[i*12 + 4] = in2[i*12 + 4] + i; + out2[i*12 + 5] = in2[i*12 + 5] + i; + out2[i*12 + 6] = in2[i*12 + 6] + i; + out2[i*12 + 7] = in2[i*12 + 7] + i; + out2[i*12 + 8] = in2[i*12 + 8] + i; + out2[i*12 + 9] = in2[i*12 + 9] + i; + out2[i*12 + 10] = in2[i*12 + 10] + i; + out2[i*12 + 11] = in2[i*12 + 11] + i; + } + + /* check results: */ + for (i = 0; i < N/2; i++) + { + if (out2[i*12] != in2[i*12] + i + || out2[i*12 + 1] != in2[i*12 + 1] + i + || out2[i*12 + 2] != in2[i*12 + 2] + i + || out2[i*12 + 3] != in2[i*12 + 3] + i + || out2[i*12 + 4] != in2[i*12 + 4] + i + || out2[i*12 + 5] != in2[i*12 + 5] + i + || out2[i*12 + 6] != in2[i*12 + 6] + i + || out2[i*12 + 7] != in2[i*12 + 7] + i + || out2[i*12 + 8] != in2[i*12 + 8] + i + || out2[i*12 + 9] != in2[i*12 + 9] + i + || out2[i*12 + 10] != in2[i*12 + 10] + i + || out2[i*12 + 11] != in2[i*12 + 11] + i) + abort (); + } + + /* Not power of 2 but SLPable. */ + for (i = 0; i < N/2; i++) + { + out2[i*12] = in2[i*12] + 1; + out2[i*12 + 1] = in2[i*12 + 1] + 2; + out2[i*12 + 2] = in2[i*12 + 2] + 3; + out2[i*12 + 3] = in2[i*12 + 3] + 4; + out2[i*12 + 4] = in2[i*12 + 4] + 5; + out2[i*12 + 5] = in2[i*12 + 5] + 6; + out2[i*12 + 6] = in2[i*12 + 6] + 7; + out2[i*12 + 7] = in2[i*12 + 7] + 8; + out2[i*12 + 8] = in2[i*12 + 8] + 9; + out2[i*12 + 9] = in2[i*12 + 9] + 10; + out2[i*12 + 10] = in2[i*12 + 10] + 11; + out2[i*12 + 11] = in2[i*12 + 11] + 12; + } + + /* check results: */ + for (i = 0; i < N/2; i++) + { + if (out2[i*12] != in2[i*12] + 1 + || out2[i*12 + 1] != in2[i*12 + 1] + 2 + || out2[i*12 + 2] != in2[i*12 + 2] + 3 + || out2[i*12 + 3] != in2[i*12 + 3] + 4 + || out2[i*12 + 4] != in2[i*12 + 4] + 5 + || out2[i*12 + 5] != in2[i*12 + 5] + 6 + || out2[i*12 + 6] != in2[i*12 + 6] + 7 + || out2[i*12 + 7] != in2[i*12 + 7] + 8 + || out2[i*12 + 8] != in2[i*12 + 8] + 9 + || out2[i*12 + 9] != in2[i*12 + 9] + 10 + || out2[i*12 + 10] != in2[i*12 + 10] + 11 + || out2[i*12 + 11] != in2[i*12 + 11] + 12) + abort (); + } + + + + return 0; +} + +int main (void) +{ + check_vect (); + + main1 (); + + return 0; +} + +/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target { vect_interleave && vect_extract_even_odd } } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ + diff --git a/gcc/testsuite/gcc.dg/vect/slp-13.c b/gcc/testsuite/gcc.dg/vect/slp-13.c index e1c4e415f67..655e6ade1d0 100644 --- a/gcc/testsuite/gcc.dg/vect/slp-13.c +++ b/gcc/testsuite/gcc.dg/vect/slp-13.c @@ -3,25 +3,17 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 64 -volatile int y = 0; +#define N 8 int main1 () { int i; unsigned short out[N*8]; - unsigned short in[N*8]; - unsigned int in2[N*8]; + unsigned short in[N*8] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63}; + unsigned int in2[N*8] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63}; unsigned int out2[N*8]; - for (i = 0; i < N*8; i++) - { - in[i] = in2[i] = i; - if (y) /* Avoid vectorization. */ - abort (); - } - /* Induction is not SLPable yet. */ for (i = 0; i < N; i++) { diff --git a/gcc/testsuite/gcc.dg/vect/slp-24-big-array.c b/gcc/testsuite/gcc.dg/vect/slp-24-big-array.c new file mode 100644 index 00000000000..6c8f01c9749 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/slp-24-big-array.c @@ -0,0 +1,99 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 64 + +typedef struct { + unsigned char a; + unsigned char b; + unsigned char c; + unsigned char d; +} s; + +unsigned char ub[N*2]; +unsigned char uc[N]; + +volatile int y = 0; +unsigned char check_diff = 2; + +void +main1 (unsigned char x, unsigned char max_result, unsigned char min_result, s *arr) +{ + int i; + unsigned char udiff = 2; + unsigned char umax = x; + unsigned char umin = x; + unsigned char ua1[N*2]; + s *pIn = arr; + s out[N]; + + for (i = 0; i < N; i++) { + udiff += (unsigned char) (ub[i] - uc[i]); + + ua1[2*i+1] = ub[2*i+1]; + ua1[2*i] = ub[2*i]; + + out[i].d = pIn->d - 1; + out[i].b = pIn->b - 4; + out[i].c = pIn->c - 8; + out[i].a = pIn->a - 3; + + pIn++; + } + + for (i = 0; i < N; i++) { + if (ua1[2*i] != ub[2*i] + || ua1[2*i+1] != ub[2*i+1] + || out[i].a != arr[i].a - 3 + || out[i].b != arr[i].b - 4 + || out[i].c != arr[i].c - 8 + || out[i].d != arr[i].d - 1) + abort (); + } + + /* check results: */ + if (udiff != check_diff) + abort (); +} + +int main (void) +{ + int i; + s arr[N]; + + check_diff = 2; + ub[0] = uc[0] = 1; + for (i = 1; i < N; i++) { + ub[i] = (i%5 == 0)?i*3:i; + uc[i] = i; + check_diff += (unsigned char) (ub[i] - uc[i]); + if (y) /* Avoid vectorization. */ + abort (); + } + for (; i < 2*N; i++) { + ub[i] = 0; + if (y) /* Avoid vectorization. */ + abort (); + } + + for (i = 0; i < N; i++) + { + arr[i].a = i + 9; + arr[i].b = i * 2 + 10; + arr[i].c = 17; + arr[i].d = i+34; + if (arr[i].a == 178) + abort (); + } + check_vect (); + + main1 (100, 100, 1, arr); + main1 (0, 15, 0, arr); + return 0; +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && ilp32 } } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { xfail { vect_no_align && ilp32 } } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/slp-24.c b/gcc/testsuite/gcc.dg/vect/slp-24.c index 690422231bd..61c53f08fa6 100644 --- a/gcc/testsuite/gcc.dg/vect/slp-24.c +++ b/gcc/testsuite/gcc.dg/vect/slp-24.c @@ -3,7 +3,8 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 64 +#define N 16 +#define DIFF 242 typedef struct { unsigned char a; @@ -12,11 +13,8 @@ typedef struct { unsigned char d; } s; -unsigned char ub[N*2]; -unsigned char uc[N]; - -volatile int y = 0; -unsigned char check_diff = 2; +unsigned char ub[N*2] = {1,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,1,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45}; +unsigned char uc[N] = {1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; void main1 (unsigned char x, unsigned char max_result, unsigned char min_result, s *arr) @@ -30,7 +28,7 @@ main1 (unsigned char x, unsigned char max_result, unsigned char min_result, s *a s out[N]; for (i = 0; i < N; i++) { - udiff += (unsigned char) (ub[i] - uc[i]); + udiff += (unsigned char)(ub[i] - uc[i]); ua1[2*i+1] = ub[2*i+1]; ua1[2*i] = ub[2*i]; @@ -54,7 +52,7 @@ main1 (unsigned char x, unsigned char max_result, unsigned char min_result, s *a } /* check results: */ - if (udiff != check_diff) + if (udiff != DIFF) abort (); } @@ -63,21 +61,6 @@ int main (void) int i; s arr[N]; - check_diff = 2; - ub[0] = uc[0] = 1; - for (i = 1; i < N; i++) { - ub[i] = (i%5 == 0)?i*3:i; - uc[i] = i; - check_diff += (unsigned char) (ub[i] - uc[i]); - if (y) /* Avoid vectorization. */ - abort (); - } - for (; i < 2*N; i++) { - ub[i] = 0; - if (y) /* Avoid vectorization. */ - abort (); - } - for (i = 0; i < N; i++) { arr[i].a = i + 9; diff --git a/gcc/testsuite/gcc.dg/vect/slp-3-big-array.c b/gcc/testsuite/gcc.dg/vect/slp-3-big-array.c new file mode 100644 index 00000000000..4f50f1f90fa --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/slp-3-big-array.c @@ -0,0 +1,155 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 96 + +unsigned short in[N*8]; +volatile int y = 0; + +int +main1 () +{ + int i; + unsigned short out[N*8]; + + for (i = 0; i < N*8; i++) + { + in[i] = i&63; + if (y) /* Avoid vectorization. */ + abort (); + } + + for (i = 0; i < N; i++) + { + out[i*8] = in[i*8]; + out[i*8 + 1] = in[i*8 + 1]; + out[i*8 + 2] = in[i*8 + 2]; + out[i*8 + 3] = in[i*8 + 3]; + out[i*8 + 4] = in[i*8 + 4]; + out[i*8 + 5] = in[i*8 + 5]; + out[i*8 + 6] = in[i*8 + 6]; + out[i*8 + 7] = in[i*8 + 7]; + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (out[i*8] != in[i*8] + || out[i*8 + 1] != in[i*8 + 1] + || out[i*8 + 2] != in[i*8 + 2] + || out[i*8 + 3] != in[i*8 + 3] + || out[i*8 + 4] != in[i*8 + 4] + || out[i*8 + 5] != in[i*8 + 5] + || out[i*8 + 6] != in[i*8 + 6] + || out[i*8 + 7] != in[i*8 + 7]) + abort (); + } + + for (i = 0; i < N*2; i++) + { + out[i*4] = in[i*4]; + out[i*4 + 1] = in[i*4 + 1]; + out[i*4 + 2] = in[i*4 + 2]; + out[i*4 + 3] = in[i*4 + 3]; + } + + /* check results: */ + for (i = 0; i < N*2; i++) + { + if (out[i*4] != in[i*4] + || out[i*4 + 1] != in[i*4 + 1] + || out[i*4 + 2] != in[i*4 + 2] + || out[i*4 + 3] != in[i*4 + 3]) + abort (); + } + + for (i = 0; i < N/2; i++) + { + out[i*16] = in[i*16]; + out[i*16 + 1] = in[i*16 + 1]; + out[i*16 + 2] = in[i*16 + 2]; + out[i*16 + 3] = in[i*16 + 3]; + out[i*16 + 4] = in[i*16 + 4]; + out[i*16 + 5] = in[i*16 + 5]; + out[i*16 + 6] = in[i*16 + 6]; + out[i*16 + 7] = in[i*16 + 7]; + out[i*16 + 8] = in[i*16 + 8]; + out[i*16 + 9] = in[i*16 + 9]; + out[i*16 + 10] = in[i*16 + 10]; + out[i*16 + 11] = in[i*16 + 11]; + out[i*16 + 12] = in[i*16 + 12]; + out[i*16 + 13] = in[i*16 + 13]; + out[i*16 + 14] = in[i*16 + 14]; + out[i*16 + 15] = in[i*16 + 15]; + } + + /* check results: */ + for (i = 0; i < N/2; i++) + { + if (out[i*16] != in[i*16] + || out[i*16 + 1] != in[i*16 + 1] + || out[i*16 + 2] != in[i*16 + 2] + || out[i*16 + 3] != in[i*16 + 3] + || out[i*16 + 4] != in[i*16 + 4] + || out[i*16 + 5] != in[i*16 + 5] + || out[i*16 + 6] != in[i*16 + 6] + || out[i*16 + 7] != in[i*16 + 7] + || out[i*16 + 8] != in[i*16 + 8] + || out[i*16 + 9] != in[i*16 + 9] + || out[i*16 + 10] != in[i*16 + 10] + || out[i*16 + 11] != in[i*16 + 11] + || out[i*16 + 12] != in[i*16 + 12] + || out[i*16 + 13] != in[i*16 + 13] + || out[i*16 + 14] != in[i*16 + 14] + || out[i*16 + 15] != in[i*16 + 15]) + abort (); + } + + /* SLP with unrolling by 8. */ + for (i = 0; i < N/4; i++) + { + out[i*9] = in[i*9]; + out[i*9 + 1] = in[i*9 + 1]; + out[i*9 + 2] = in[i*9 + 2]; + out[i*9 + 3] = in[i*9 + 3]; + out[i*9 + 4] = in[i*9 + 4]; + out[i*9 + 5] = in[i*9 + 5]; + out[i*9 + 6] = in[i*9 + 6]; + out[i*9 + 7] = in[i*9 + 7]; + out[i*9 + 8] = in[i*9 + 8]; + } + + /* check results: */ + for (i = 0; i < N/4; i++) + { + if (out[i*9] != in[i*9] + || out[i*9 + 1] != in[i*9 + 1] + || out[i*9 + 2] != in[i*9 + 2] + || out[i*9 + 3] != in[i*9 + 3] + || out[i*9 + 4] != in[i*9 + 4] + || out[i*9 + 5] != in[i*9 + 5] + || out[i*9 + 6] != in[i*9 + 6] + || out[i*9 + 7] != in[i*9 + 7] + || out[i*9 + 8] != in[i*9 + 8]) + abort (); + } + + + return 0; +} + +int main (void) +{ + check_vect (); + + main1 (); + + return 0; +} + +/* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ + diff --git a/gcc/testsuite/gcc.dg/vect/slp-3.c b/gcc/testsuite/gcc.dg/vect/slp-3.c index 6c6a655b16f..7d9bd563739 100644 --- a/gcc/testsuite/gcc.dg/vect/slp-3.c +++ b/gcc/testsuite/gcc.dg/vect/slp-3.c @@ -3,10 +3,9 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 96 +#define N 12 -unsigned short in[N*8]; -volatile int y = 0; +unsigned short in[N*8] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31}; int main1 () @@ -14,13 +13,6 @@ main1 () int i; unsigned short out[N*8]; - for (i = 0; i < N*8; i++) - { - in[i] = i&63; - if (y) /* Avoid vectorization. */ - abort (); - } - for (i = 0; i < N; i++) { out[i*8] = in[i*8]; @@ -149,7 +141,7 @@ int main (void) return 0; } -/* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/slp-34-big-array.c b/gcc/testsuite/gcc.dg/vect/slp-34-big-array.c new file mode 100644 index 00000000000..53da79ee77f --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/slp-34-big-array.c @@ -0,0 +1,69 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 64 + +unsigned short in[N*8]; +unsigned short in2[N*8]; +volatile int y = 0; + +int +main1 () +{ + int i; + unsigned short out[N*8]; + unsigned short out2[N*8]; + + for (i = 0; i < N*8; i++) + { + in[i] = in2[i] = i; + if (y) /* Avoid vectorization. */ + abort (); + } + + /* SLP with unrolling by 8. */ + for (i = 0; i < N; i++) + { + out[i*3] = in[i*3] + 5; + out[i*3 + 1] = in[i*3 + 1] + 6; + out[i*3 + 2] = in[i*3 + 2] + 16; + + out2[i*5] = in2[i*5] + 2; + out2[i*5 + 1] = in2[i*5 + 1] + 2; + out2[i*5 + 2] = in2[i*5 + 2] + 1; + out2[i*5 + 3] = in2[i*5 + 3] + 3; + out2[i*5 + 4] = in2[i*5 + 4] + 13; + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (out[i*3] != in[i*3] + 5 + || out[i*3 + 1] != in[i*3 + 1] + 6 + || out[i*3 + 2] != in[i*3 + 2] + 16 + || out2[i*5] != in2[i*5] + 2 + || out2[i*5 + 1] != in2[i*5 + 1] + 2 + || out2[i*5 + 2] != in2[i*5 + 2] + 1 + || out2[i*5 + 3] != in2[i*5 + 3] + 3 + || out2[i*5 + 4] != in2[i*5 + 4] + 13) + abort (); + } + + return 0; +} + +int main (void) +{ + check_vect (); + + main1 (); + + return 0; +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ + diff --git a/gcc/testsuite/gcc.dg/vect/slp-34.c b/gcc/testsuite/gcc.dg/vect/slp-34.c index 39b28e5464d..63dbab05152 100644 --- a/gcc/testsuite/gcc.dg/vect/slp-34.c +++ b/gcc/testsuite/gcc.dg/vect/slp-34.c @@ -3,11 +3,10 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 64 +#define N 8 -unsigned short in[N*8]; -unsigned short in2[N*8]; -volatile int y = 0; +unsigned short in[N*8] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63}; +unsigned short in2[N*8] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63}; int main1 () @@ -16,13 +15,6 @@ main1 () unsigned short out[N*8]; unsigned short out2[N*8]; - for (i = 0; i < N*8; i++) - { - in[i] = in2[i] = i; - if (y) /* Avoid vectorization. */ - abort (); - } - /* SLP with unrolling by 8. */ for (i = 0; i < N; i++) { diff --git a/gcc/testsuite/gcc.dg/vect/slp-4-big-array.c b/gcc/testsuite/gcc.dg/vect/slp-4-big-array.c new file mode 100644 index 00000000000..55607dd2d94 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/slp-4-big-array.c @@ -0,0 +1,135 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 128 +volatile int y = 0; + +int +main1 () +{ + int i; + unsigned short out[N*8]; + unsigned short in[N*8]; + unsigned int ia[N*2]; + + for (i = 0; i < N*8; i++) + { + in[i] = i; + if (y) /* Avoid vectorization. */ + abort (); + } + + for (i = 0; i < N; i++) + { + out[i*8] = in[i*8]; + out[i*8 + 1] = in[i*8 + 1]; + out[i*8 + 2] = in[i*8 + 2]; + out[i*8 + 3] = in[i*8 + 3]; + out[i*8 + 4] = in[i*8 + 4]; + out[i*8 + 5] = in[i*8 + 5]; + out[i*8 + 6] = in[i*8 + 6]; + out[i*8 + 7] = in[i*8 + 7]; + + ia[i] = 7; + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (out[i*8] != in[i*8] + || out[i*8 + 1] != in[i*8 + 1] + || out[i*8 + 2] != in[i*8 + 2] + || out[i*8 + 3] != in[i*8 + 3] + || out[i*8 + 4] != in[i*8 + 4] + || out[i*8 + 5] != in[i*8 + 5] + || out[i*8 + 6] != in[i*8 + 6] + || out[i*8 + 7] != in[i*8 + 7] + || ia[i] != 7) + abort (); + } + + for (i = 0; i < N*2; i++) + { + out[i*4] = in[i*4]; + out[i*4 + 1] = in[i*4 + 1]; + out[i*4 + 2] = in[i*4 + 2]; + out[i*4 + 3] = in[i*4 + 3]; + + ia[i] = 12; + } + + /* check results: */ + for (i = 0; i < N*2; i++) + { + if (out[i*4] != in[i*4] + || out[i*4 + 1] != in[i*4 + 1] + || out[i*4 + 2] != in[i*4 + 2] + || out[i*4 + 3] != in[i*4 + 3] + || ia[i] != 12) + abort (); + } + + for (i = 0; i < N/2; i++) + { + out[i*16] = in[i*16]; + out[i*16 + 1] = in[i*16 + 1]; + out[i*16 + 2] = in[i*16 + 2]; + out[i*16 + 3] = in[i*16 + 3]; + out[i*16 + 4] = in[i*16 + 4]; + out[i*16 + 5] = in[i*16 + 5]; + out[i*16 + 6] = in[i*16 + 6]; + out[i*16 + 7] = in[i*16 + 7]; + out[i*16 + 8] = in[i*16 + 8]; + out[i*16 + 9] = in[i*16 + 9]; + out[i*16 + 10] = in[i*16 + 10]; + out[i*16 + 11] = in[i*16 + 11]; + out[i*16 + 12] = in[i*16 + 12]; + out[i*16 + 13] = in[i*16 + 13]; + out[i*16 + 14] = in[i*16 + 14]; + out[i*16 + 15] = in[i*16 + 15]; + + ia[i] = 21; + } + + /* check results: */ + for (i = 0; i < N/2; i++) + { + if (out[i*16] != in[i*16] + || out[i*16 + 1] != in[i*16 + 1] + || out[i*16 + 2] != in[i*16 + 2] + || out[i*16 + 3] != in[i*16 + 3] + || out[i*16 + 4] != in[i*16 + 4] + || out[i*16 + 5] != in[i*16 + 5] + || out[i*16 + 6] != in[i*16 + 6] + || out[i*16 + 7] != in[i*16 + 7] + || out[i*16 + 8] != in[i*16 + 8] + || out[i*16 + 9] != in[i*16 + 9] + || out[i*16 + 10] != in[i*16 + 10] + || out[i*16 + 11] != in[i*16 + 11] + || out[i*16 + 12] != in[i*16 + 12] + || out[i*16 + 13] != in[i*16 + 13] + || out[i*16 + 14] != in[i*16 + 14] + || out[i*16 + 15] != in[i*16 + 15] + || ia[i] != 21) + abort (); + } + + + return 0; +} + +int main (void) +{ + check_vect (); + + main1 (); + + return 0; +} + +/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ + diff --git a/gcc/testsuite/gcc.dg/vect/slp-4.c b/gcc/testsuite/gcc.dg/vect/slp-4.c index 3622f9d249a..50ad2bd53a4 100644 --- a/gcc/testsuite/gcc.dg/vect/slp-4.c +++ b/gcc/testsuite/gcc.dg/vect/slp-4.c @@ -3,24 +3,16 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 128 -volatile int y = 0; +#define N 16 int main1 () { int i; unsigned short out[N*8]; - unsigned short in[N*8]; + unsigned short in[N*8] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63}; unsigned int ia[N*2]; - for (i = 0; i < N*8; i++) - { - in[i] = i; - if (y) /* Avoid vectorization. */ - abort (); - } - for (i = 0; i < N; i++) { out[i*8] = in[i*8]; diff --git a/gcc/testsuite/gcc.dg/vect/slp-cond-2-big-array.c b/gcc/testsuite/gcc.dg/vect/slp-cond-2-big-array.c new file mode 100644 index 00000000000..8217b764af0 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/slp-cond-2-big-array.c @@ -0,0 +1,127 @@ +/* { dg-require-effective-target vect_cond_mixed } */ +#include "tree-vect.h" + +#define N 128 +int d[N], e[N], f[N]; +unsigned char k[N]; +float a[N], b[N]; + +__attribute__((noinline, noclone)) void +f1 (void) +{ + int i; + for (i = 0; i < N/4; i++) + { + k[4*i] = a[4*i] < b[4*i] ? 17 : 0; + k[4*i+1] = a[4*i+1] < b[4*i+1] ? 17 : 0; + k[4*i+2] = a[4*i+2] < b[4*i+2] ? 17 : 0; + k[4*i+3] = a[4*i+3] < b[4*i+3] ? 17 : 0; + } +} + +__attribute__((noinline, noclone)) void +f2 (void) +{ + int i; + for (i = 0; i < N/2; ++i) + { + k[2*i] = a[2*i] < b[2*i] ? 0 : 24; + k[2*i+1] = a[2*i+1] < b[2*i+1] ? 7 : 4; + } +} + +__attribute__((noinline, noclone)) void +f3 (void) +{ + int i; + for (i = 0; i < N/2; ++i) + { + k[2*i] = a[2*i] < b[2*i] ? 51 : 12; + k[2*i+1] = a[2*i+1] > b[2*i+1] ? 51 : 12; + } +} + +__attribute__((noinline, noclone)) void +f4 (void) +{ + int i; + for (i = 0; i < N/2; ++i) + { + int d0 = d[2*i], e0 = e[2*i]; + int d1 = d[2*i+1], e1 = e[2*i+1]; + f[2*i] = a[2*i] >= b[2*i] ? d0 : e0; + f[2*i+1] = a[2*i+1] >= b[2*i+1] ? d1 : e1; + } +} + +int +main () +{ + int i; + + check_vect (); + + for (i = 0; i < N; i++) + { + switch (i % 9) + { + case 0: asm (""); a[i] = - i - 1; b[i] = i + 1; break; + case 1: a[i] = 0; b[i] = 0; break; + case 2: a[i] = i + 1; b[i] = - i - 1; break; + case 3: a[i] = i; b[i] = i + 7; break; + case 4: a[i] = i; b[i] = i; break; + case 5: a[i] = i + 16; b[i] = i + 3; break; + case 6: a[i] = - i - 5; b[i] = - i; break; + case 7: a[i] = - i; b[i] = - i; break; + case 8: a[i] = - i; b[i] = - i - 7; break; + } + d[i] = i; + e[i] = 2 * i; + } + + f1 (); + for (i = 0; i < N; i++) + if (k[i] != ((i % 3) == 0 ? 17 : 0)) + abort (); + + f2 (); + for (i = 0; i < N; i++) + { + switch (i % 9) + { + case 0: + case 6: + if (k[i] != ((i/9 % 2) == 0 ? 0 : 7)) + abort (); + break; + case 1: + case 5: + case 7: + if (k[i] != ((i/9 % 2) == 0 ? 4 : 24)) + abort (); + break; + case 2: + case 4: + case 8: + if (k[i] != ((i/9 % 2) == 0 ? 24 : 4)) + abort (); + break; + case 3: + if (k[i] != ((i/9 % 2) == 0 ? 7 : 0)) + abort (); + break; + } + } + + f3 (); + + f4 (); + for (i = 0; i < N; i++) + if (f[i] != ((i % 3) == 0 ? e[i] : d[i])) + abort (); + + return 0; +} + +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/slp-cond-2.c b/gcc/testsuite/gcc.dg/vect/slp-cond-2.c index 8217b764af0..c73933fce0f 100644 --- a/gcc/testsuite/gcc.dg/vect/slp-cond-2.c +++ b/gcc/testsuite/gcc.dg/vect/slp-cond-2.c @@ -1,7 +1,7 @@ /* { dg-require-effective-target vect_cond_mixed } */ #include "tree-vect.h" -#define N 128 +#define N 32 int d[N], e[N], f[N]; unsigned char k[N]; float a[N], b[N]; diff --git a/gcc/testsuite/gcc.dg/vect/slp-multitypes-11-big-array.c b/gcc/testsuite/gcc.dg/vect/slp-multitypes-11-big-array.c new file mode 100644 index 00000000000..b7a7a0be11b --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/slp-multitypes-11-big-array.c @@ -0,0 +1,62 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 144 + +struct s +{ + int a; + int b; + int c; +}; + +char in[N*3]; +volatile int y = 0; + +__attribute__ ((noinline)) int +main1 () +{ + int i; + struct s out[N]; + + for (i = 0; i < N; i++) + { + in[i] = i&127; + if (y) /* Avoid vectorization. */ + abort (); + } + + for (i = 0; i < N; i++) + { + out[i].a = (int) in[i*3] + 1; + out[i].b = (int) in[i*3 + 1] + 2; + out[i].c = (int) in[i*3 + 2] + 3; + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (out[i].a != (int) in[i*3] + 1 + || out[i].b != (int) in[i*3 + 1] + 2 + || out[i].c != (int) in[i*3 + 2] + 3) + abort (); + } + + return 0; +} + +int main (void) +{ + check_vect (); + + main1 (); + + return 0; +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_unpack } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_unpack } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ + diff --git a/gcc/testsuite/gcc.dg/vect/slp-multitypes-11.c b/gcc/testsuite/gcc.dg/vect/slp-multitypes-11.c index 8ead45ee194..602517bfcd1 100644 --- a/gcc/testsuite/gcc.dg/vect/slp-multitypes-11.c +++ b/gcc/testsuite/gcc.dg/vect/slp-multitypes-11.c @@ -3,7 +3,7 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 144 +#define N 18 struct s { @@ -12,8 +12,7 @@ struct s int c; }; -char in[N*3]; -volatile int y = 0; +char in[N*3] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53}; __attribute__ ((noinline)) int main1 () @@ -23,13 +22,6 @@ main1 () for (i = 0; i < N; i++) { - in[i] = i&127; - if (y) /* Avoid vectorization. */ - abort (); - } - - for (i = 0; i < N; i++) - { out[i].a = (int) in[i*3] + 1; out[i].b = (int) in[i*3 + 1] + 2; out[i].c = (int) in[i*3 + 2] + 3; diff --git a/gcc/testsuite/gcc.dg/vect/vect-1-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-1-big-array.c new file mode 100644 index 00000000000..4c0f532b468 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-1-big-array.c @@ -0,0 +1,90 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_int } */ +/* { dg-require-effective-target vect_float } */ + +#define N 128 + +void fbar (float *); +void ibar (int *); +void sbar (short *); + +/* multiple loops */ + +foo (int n) +{ + float a[N+1]; + float b[N]; + float c[N]; + float d[N]; + int ia[N]; + int ib[N]; + int ic[N]; + int i,j; + int diff = 0; + char cb[N]; + char cc[N]; + char image[N][N]; + char block[N][N]; + + /* Vectorizable. */ + diff = 0; + for (i = 0; i < N; i++) { + diff += (cb[i] - cc[i]); + } + ibar (&diff); + + + /* Vectorizable. */ + diff = 0; + for (i = 0; i < N; i++) { + for (j = 0; j < N; j++) { + diff += (image[i][j] - block[i][j]); + } + } + ibar (&diff); + + + /* Vectorizable. */ + for (i = 0; i < N; i++){ + a[i] = b[i]; + } + fbar (a); + + + /* Vectorizable. */ + for (i = 0; i < N; i++){ + a[i] = b[i] + c[i] + d[i]; + } + fbar (a); + + + /* Strided access. Vectorizable on platforms that support load of strided + accesses (extract of even/odd vector elements). */ + for (i = 0; i < N/2; i++){ + a[i] = b[2*i+1] * c[2*i+1] - b[2*i] * c[2*i]; + d[i] = b[2*i] * c[2*i+1] + b[2*i+1] * c[2*i]; + } + fbar (a); + + + /* Vectorizable. */ + for (i = 0; i < N; i++){ + a[i] = b[i] + c[i]; + d[i] = b[i] + c[i]; + ia[i] = ib[i] + ic[i]; + } + ibar (ia); + fbar (a); + fbar (d); + + /* Not vetorizable yet (too conservative dependence test). */ + for (i = 0; i < N; i++){ + a[i] = b[i] + c[i]; + a[i+1] = b[i] + c[i]; + } + fbar (a); +} + +/* { dg-final { scan-tree-dump-times "vectorized 6 loops" 1 "vect" { target vect_strided2 } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 5 loops" 1 "vect" { xfail vect_strided2 } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-1.c b/gcc/testsuite/gcc.dg/vect/vect-1.c index 3fe51228531..04392ea78da 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-1.c +++ b/gcc/testsuite/gcc.dg/vect/vect-1.c @@ -2,7 +2,7 @@ /* { dg-require-effective-target vect_int } */ /* { dg-require-effective-target vect_float } */ -#define N 128 +#define N 16 void fbar (float *); void ibar (int *); diff --git a/gcc/testsuite/gcc.dg/vect/vect-10-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-10-big-array.c new file mode 100644 index 00000000000..ce6161977ac --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-10-big-array.c @@ -0,0 +1,38 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_int } */ +#include <stdlib.h> + +#define N 128 + +short a[N]; +short d[N]; + +volatile int y = 0; + +int foo () +{ + int i; + short b[N]; + short c[N]; + for (i = 0; i < N/2; i++) + { + b[i] = i*3; + c[i] = i; + + /* Avoid vectorization. */ + if (y) + abort (); + } + + /* Strided access pattern. */ + for (i = 0; i < N/2; i++) + { + a[i] = b[2*i+1] * c[2*i+1] - b[2*i] * c[2*i]; + d[i] = b[2*i] * c[2*i+1] + b[2*i+1] * c[2*i]; + } + + return 0; +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { ! vect_strided2 } } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-10.c b/gcc/testsuite/gcc.dg/vect/vect-10.c index 393416eb38a..faa500d2a18 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-10.c +++ b/gcc/testsuite/gcc.dg/vect/vect-10.c @@ -1,28 +1,16 @@ /* { dg-do compile } */ /* { dg-require-effective-target vect_int } */ -#include <stdlib.h> -#define N 128 +#define N 16 short a[N]; short d[N]; -volatile int y = 0; - int foo () { int i; - short b[N]; - short c[N]; - for (i = 0; i < N/2; i++) - { - b[i] = i*3; - c[i] = i; - - /* Avoid vectorization. */ - if (y) - abort (); - } + short b[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45}; + short c[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; /* Strided access pattern. */ for (i = 0; i < N/2; i++) diff --git a/gcc/testsuite/gcc.dg/vect/vect-105-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-105-big-array.c new file mode 100644 index 00000000000..f99a2afd728 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-105-big-array.c @@ -0,0 +1,106 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdlib.h> +#include <stdarg.h> +#include "tree-vect.h" + +#define N 16 + +struct extraction +{ + int a[N][N]; + int b[N][N]; +}; + +static int a[N][N]; +static int b[N][N]; +static int c[N][N]; + +volatile int y; + +__attribute__ ((noinline)) +int main1 (int x) { + int i,j, off; + struct extraction *p; + p = (struct extraction *) malloc (sizeof (struct extraction)); + for (i = 0; i < N; i++) + { + for (j = 0; j < N; j++) + { + a[i][j] = (i*7 + j*17)%53; + b[i][j] = (i*11+ j*13)%41; + if (y) + abort (); /* to avoid vectorization. */ + } + } + for (i = 0; i < N; i++) + { + for (j = 0; j < N; j++) + { + c[i][j] = a[i][j]; + if (y) + abort (); /* to avoid vectorization. */ + } + } + for (i = 1; i < N; i++) + { + for (j = 0; j < N; j++) + { + off = x + i + j + N+1; + if (x + i + j > N*N-1) + break; + if (off > N*N-1) + *(&c[0][0]+x+i+j) = *(&b[0][0] + off - N*N); + else + *(&c[0][0]+x+i+j) = *(&a[0][0] + off); + if (y) + abort (); /* to avoid vectorization. */ + } + } + + for (i = 0; i < N; i++) + { + for (j = 0; j < N; j++) + { + p->a[i][j] = a[i][j]; + p->b[i][j] = b[i][j]; + /* Because Y is volatile, the compiler cannot move this check out + of the loop. */ + if (y) + abort (); /* to avoid vectorization. */ + } + } + + /* Vectorizable: distance > number of iterations. */ + for (i = 1; i < N; i++) + { + for (j = 0; j < N; j++) + { + *((int *)p + x + i + j) = *((int *)p + x + i + j + N+1); + } + } + + /* check results: */ + for (i = 0; i < N; i++) + { + for (j = 0; j < N; j++) + { + if (p->a[i][j] != c[i][j]) + abort (); + } + } + return 0; +} + +int main (void) +{ + check_vect (); + + return main1 (N); +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { target vect_no_align } } } */ +/* { dg-final { scan-tree-dump-times "possible dependence between data-refs" 0 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ + diff --git a/gcc/testsuite/gcc.dg/vect/vect-105.c b/gcc/testsuite/gcc.dg/vect/vect-105.c index f2e68aeac41..bbf42af897f 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-105.c +++ b/gcc/testsuite/gcc.dg/vect/vect-105.c @@ -4,7 +4,7 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 16 +#define N 4 struct extraction { @@ -12,51 +12,17 @@ struct extraction int b[N][N]; }; -static int a[N][N]; -static int b[N][N]; -static int c[N][N]; +static int a[N][N] = {{1,2,3,11},{4,5,6,12},{7,8,9,13},{34,45,67,83}}; +static int b[N][N] = {{17,28,15,23},{0,2,3,24},{4,31,82,25},{29,31,432,256}}; +static int c[N][N] = {{1,2,3,11},{4,9,13,34},{45,67,83,13},{34,45,67,83}}; volatile int y; __attribute__ ((noinline)) int main1 (int x) { - int i,j, off; + int i,j; struct extraction *p; p = (struct extraction *) malloc (sizeof (struct extraction)); - for (i = 0; i < N; i++) - { - for (j = 0; j < N; j++) - { - a[i][j] = (i*7 + j*17)%53; - b[i][j] = (i*11+ j*13)%41; - if (y) - abort (); /* to avoid vectorization. */ - } - } - for (i = 0; i < N; i++) - { - for (j = 0; j < N; j++) - { - c[i][j] = a[i][j]; - if (y) - abort (); /* to avoid vectorization. */ - } - } - for (i = 1; i < N; i++) - { - for (j = 0; j < N; j++) - { - off = x + i + j + N+1; - if (x + i + j > N*N-1) - break; - if (off > N*N-1) - *(&c[0][0]+x+i+j) = *(&b[0][0] + off - N*N); - else - *(&c[0][0]+x+i+j) = *(&a[0][0] + off); - if (y) - abort (); /* to avoid vectorization. */ - } - } for (i = 0; i < N; i++) { @@ -67,7 +33,7 @@ int main1 (int x) { /* Because Y is volatile, the compiler cannot move this check out of the loop. */ if (y) - abort (); /* to avoid vectorization. */ + abort (); /* to avoid vectorization */ } } @@ -76,7 +42,7 @@ int main1 (int x) { { for (j = 0; j < N; j++) { - *((int *)p + x + i + j) = *((int *)p + x + i + j + N+1); + *((int *)p + x + i + j) = *((int *)p + x + i + j + 5); } } @@ -86,7 +52,7 @@ int main1 (int x) { for (j = 0; j < N; j++) { if (p->a[i][j] != c[i][j]) - abort (); + abort(); } } return 0; @@ -100,7 +66,7 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { target vect_no_align } } } */ +/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { target vect_no_align } } } */ /* { dg-final { scan-tree-dump-times "possible dependence between data-refs" 0 "vect" } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-112-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-112-big-array.c new file mode 100644 index 00000000000..a1302c1e936 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-112-big-array.c @@ -0,0 +1,50 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 128 + +char cb[N]; +char cc[N]; + +volatile int y = 0; + +__attribute__ ((noinline)) int +main1 (void) +{ + int i; + int diff = 0; + int check_diff = 0; + for (i = 0; i < N; i++) { + cb[i] = i + 2; + cc[i] = i + 1; + check_diff += (cb[i] - cc[i]); + /* Avoid vectorization. */ + if (y) + abort (); + } + + /* Cross-iteration cycle. */ + diff = 0; + for (i = 0; i < N; i++) { + diff += (cb[i] - cc[i]); + } + + /* Check results. */ + if (diff != check_diff) + abort (); + + return 0; +} + +int main (void) +{ + check_vect (); + return main1 (); +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_unpack } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ + + diff --git a/gcc/testsuite/gcc.dg/vect/vect-112.c b/gcc/testsuite/gcc.dg/vect/vect-112.c index a1302c1e936..4d954d10829 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-112.c +++ b/gcc/testsuite/gcc.dg/vect/vect-112.c @@ -3,27 +3,16 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 128 +#define N 16 -char cb[N]; -char cc[N]; - -volatile int y = 0; +char cb[N] = {2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17}; +char cc[N] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}; __attribute__ ((noinline)) int main1 (void) { int i; int diff = 0; - int check_diff = 0; - for (i = 0; i < N; i++) { - cb[i] = i + 2; - cc[i] = i + 1; - check_diff += (cb[i] - cc[i]); - /* Avoid vectorization. */ - if (y) - abort (); - } /* Cross-iteration cycle. */ diff = 0; @@ -32,8 +21,8 @@ main1 (void) } /* Check results. */ - if (diff != check_diff) - abort (); + if (diff != 16) + abort(); return 0; } diff --git a/gcc/testsuite/gcc.dg/vect/vect-15-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-15-big-array.c new file mode 100644 index 00000000000..912907d8c82 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-15-big-array.c @@ -0,0 +1,48 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 128 + +volatile int y = 0; + +__attribute__ ((noinline)) +int main1 () +{ + int i; + int a[N]; + int b[N]; + + for (i = 0; i <N; i++) + { + b[i] = i*3; + if (y) + abort (); + } + + /* Not vectorizable yet (reverse access and forward access). */ + for (i = N; i > 0; i--) + { + a[N-i] = b[i-1]; + } + + /* check results: */ + for (i = 0; i <N; i++) + { + if (a[i] != b[N-1-i]) + abort (); + } + + return 0; +} + +int main (void) +{ + check_vect (); + + return main1 (); +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_perm && vect_hw_misalign } } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-15.c b/gcc/testsuite/gcc.dg/vect/vect-15.c index cbc11c20745..ba7599162db 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-15.c +++ b/gcc/testsuite/gcc.dg/vect/vect-15.c @@ -3,23 +3,14 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 128 - -volatile int y = 0; +#define N 16 __attribute__ ((noinline)) int main1 () { int i; int a[N]; - int b[N]; - - for (i = 0; i <N; i++) - { - b[i] = i*3; - if (y) - abort (); - } + int b[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45}; /* Not vectorizable yet (reverse access and forward access). */ for (i = N; i > 0; i--) diff --git a/gcc/testsuite/gcc.dg/vect/vect-2-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-2-big-array.c new file mode 100644 index 00000000000..25502700452 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-2-big-array.c @@ -0,0 +1,50 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 128 + +char cb[N]; +char ca[N]; + +volatile int y = 0; + +__attribute__ ((noinline)) +int main1 () +{ + int i; + + for (i = 0; i < N; i++) + { + cb[i] = i*3; + /* To avoid vectorization. */ + if (y) + abort (); + } + + for (i = 0; i < N; i++) + { + ca[i] = cb[i]; + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (ca[i] != cb[i]) + abort (); + } + + return 0; +} + +int main (void) +{ + check_vect (); + + return main1 (); +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-2.c b/gcc/testsuite/gcc.dg/vect/vect-2.c index e6399ff212f..5d4fc914a97 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-2.c +++ b/gcc/testsuite/gcc.dg/vect/vect-2.c @@ -3,13 +3,11 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 128 +#define N 16 -char cb[N]; +char cb[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45}; char ca[N]; -volatile int y = 0; - __attribute__ ((noinline)) int main1 () { @@ -17,14 +15,6 @@ int main1 () for (i = 0; i < N; i++) { - cb[i] = i*3; - /* To avoid vectorization. */ - if (y) - abort (); - } - - for (i = 0; i < N; i++) - { ca[i] = cb[i]; } diff --git a/gcc/testsuite/gcc.dg/vect/vect-31-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-31-big-array.c new file mode 100644 index 00000000000..25d7fdf2b7b --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-31-big-array.c @@ -0,0 +1,90 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 256 + +struct t{ + int k[N]; + int l; +}; + +struct s{ + char a; /* aligned */ + char b[N-1]; /* unaligned (offset 1B) */ + char c[N]; /* aligned (offset NB) */ + struct t d; /* aligned (offset 2NB) */ + struct t e; /* unaligned (offset 2N+4N+4 B) */ +}; + +__attribute__ ((noinline)) +int main1 () +{ + int i; + struct s tmp; + + /* unaligned */ + for (i = 0; i < N/2; i++) + { + tmp.b[i] = 5; + } + + /* check results: */ + for (i = 0; i <N/2; i++) + { + if (tmp.b[i] != 5) + abort (); + } + + /* aligned */ + for (i = 0; i < N/2; i++) + { + tmp.c[i] = 6; + } + + /* check results: */ + for (i = 0; i <N/2; i++) + { + if (tmp.c[i] != 6) + abort (); + } + + /* aligned */ + for (i = 0; i < N/2; i++) + { + tmp.d.k[i] = 7; + } + + /* check results: */ + for (i = 0; i <N/2; i++) + { + if (tmp.d.k[i] != 7) + abort (); + } + + /* unaligned */ + for (i = 0; i < N/2; i++) + { + tmp.e.k[i] = 8; + } + + /* check results: */ + for (i = 0; i <N/2; i++) + { + if (tmp.e.k[i] != 8) + abort (); + } + + return 0; +} + +int main (void) +{ + check_vect (); + + return main1 (); +} + +/* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-31.c b/gcc/testsuite/gcc.dg/vect/vect-31.c index c6861fab78b..8719fc9d27e 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-31.c +++ b/gcc/testsuite/gcc.dg/vect/vect-31.c @@ -3,7 +3,7 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 256 +#define N 32 struct t{ int k[N]; diff --git a/gcc/testsuite/gcc.dg/vect/vect-32-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-32-big-array.c new file mode 100644 index 00000000000..774a0b05577 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-32-big-array.c @@ -0,0 +1,40 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 128 + +__attribute__ ((noinline)) +int main1 () +{ + struct { + char ca[N]; + } s; + int i; + + for (i = 0; i < N; i++) + { + s.ca[i] = 5; + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (s.ca[i] != 5) + abort (); + } + + return 0; +} + +int main (void) +{ + check_vect (); + + return main1 (); +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-32.c b/gcc/testsuite/gcc.dg/vect/vect-32.c index 143ebf52247..c869f5ec989 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-32.c +++ b/gcc/testsuite/gcc.dg/vect/vect-32.c @@ -3,7 +3,7 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 128 +#define N 16 __attribute__ ((noinline)) int main1 () diff --git a/gcc/testsuite/gcc.dg/vect/vect-33-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-33-big-array.c new file mode 100644 index 00000000000..2fc7106b888 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-33-big-array.c @@ -0,0 +1,44 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 128 +struct test { + char ca[N]; +}; + +extern struct test s; + +__attribute__ ((noinline)) +int main1 () +{ + int i; + + for (i = 0; i < N; i++) + { + s.ca[i] = 5; + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (s.ca[i] != 5) + abort (); + } + + return 0; +} + +int main (void) +{ + return main1 (); +} + + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */ +/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target vector_alignment_reachable } } } */ +/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-33.c b/gcc/testsuite/gcc.dg/vect/vect-33.c index 261d89af4f2..d35bce4d6f6 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-33.c +++ b/gcc/testsuite/gcc.dg/vect/vect-33.c @@ -4,7 +4,7 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 128 +#define N 16 struct test { char ca[N]; }; diff --git a/gcc/testsuite/gcc.dg/vect/vect-34-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-34-big-array.c new file mode 100644 index 00000000000..9041bd6e194 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-34-big-array.c @@ -0,0 +1,50 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 128 + +struct { + char ca[N]; +} s; +char cb[N]; + +volatile int y = 0; + +__attribute__ ((noinline)) +int main1 () +{ + int i; + + for (i = 0; i < N; i++) + { + cb[i] = i*3; + /* To avoid vectorization. */ + if (y) + abort (); + } + for (i = 0; i < N; i++) + { + s.ca[i] = cb[i]; + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (s.ca[i] != cb[i]) + abort (); + } + + return 0; +} + +int main (void) +{ + check_vect (); + + return main1 (); +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-34.c b/gcc/testsuite/gcc.dg/vect/vect-34.c index 3f059c6b9d0..df18f774e5d 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-34.c +++ b/gcc/testsuite/gcc.dg/vect/vect-34.c @@ -3,15 +3,13 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 128 +#define N 16 struct { char ca[N]; } s; -char cb[N]; - -volatile int y = 0; - +char cb[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45}; + __attribute__ ((noinline)) int main1 () { @@ -19,13 +17,6 @@ int main1 () for (i = 0; i < N; i++) { - cb[i] = i*3; - /* To avoid vectorization. */ - if (y) - abort (); - } - for (i = 0; i < N; i++) - { s.ca[i] = cb[i]; } diff --git a/gcc/testsuite/gcc.dg/vect/vect-35-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-35-big-array.c new file mode 100644 index 00000000000..73b18cf62d8 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-35-big-array.c @@ -0,0 +1,50 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 128 + +__attribute__ ((noinline)) +int main1 () +{ + union { + unsigned char a[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); + unsigned char b[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); + } s; + int i; + + /* Initialization. */ + for (i = 0; i < N; i++) + { + s.b[i] = i; + } + + /* Dependence analysis fails cause s.a and s.b may overlap. + Use runtime aliasing test with versioning. */ + for (i = 0; i < N; i++) + { + s.a[i] = s.b[i] + 1; + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (s.a[i] != i + 1) + abort (); + } + + return 0; +} + +int main (void) +{ + check_vect (); + + return main1 (); +} + + +/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { xfail { ia64-*-* sparc*-*-* } } } } */ +/* { dg-final { scan-tree-dump-times "can't determine dependence between" 1 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-35.c b/gcc/testsuite/gcc.dg/vect/vect-35.c index 130e37647bf..0f4284a6257 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-35.c +++ b/gcc/testsuite/gcc.dg/vect/vect-35.c @@ -3,7 +3,7 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 128 +#define N 16 __attribute__ ((noinline)) int main1 () diff --git a/gcc/testsuite/gcc.dg/vect/vect-36-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-36-big-array.c new file mode 100644 index 00000000000..8f2514db234 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-36-big-array.c @@ -0,0 +1,47 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 128 + +__attribute__ ((noinline)) +int main1 () +{ + int i; + struct { + char ca[N]; + char cb[N]; + } s; + + + for (i = 0; i < N; i++) + { + s.cb[i] = 3*i; + __asm__ volatile (""); + } + + for (i = 0; i < N; i++) + { + s.ca[i] = s.cb[i]; + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (s.ca[i] != s.cb[i]) + abort (); + } + + return 0; +} + +int main (void) +{ + check_vect (); + + return main1 (); +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-36.c b/gcc/testsuite/gcc.dg/vect/vect-36.c index 34f0d5ab8ea..20df3940a48 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-36.c +++ b/gcc/testsuite/gcc.dg/vect/vect-36.c @@ -3,7 +3,7 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 128 +#define N 16 __attribute__ ((noinline)) int main1 () diff --git a/gcc/testsuite/gcc.dg/vect/vect-6-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-6-big-array.c new file mode 100644 index 00000000000..14d3faa0a12 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-6-big-array.c @@ -0,0 +1,79 @@ +/* { dg-require-effective-target vect_float } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 128 + +float results1[N]; +float results2[N]; +float a[N] = {0}; +float e[N] = {0}; +float b[N]; +float c[N]; + +volatile int y = 0; + +__attribute__ ((noinline)) +int main1 () +{ + int i; + + for (i=0; i<N; i++) + { + b[i] = i*3; + c[i] = i; + results1[i] = 0; + results2[i] = 0; + /* Avoid vectorization. */ + if (y) + abort (); + } + for (i=0; i<N/2; i++) + { + results1[i] = b[i+N/2] * c[i+N/2] - b[i] * c[i]; + results2[i+N/2] = b[i] * c[i+N/2] + b[i+N/2] * c[i]; + /* Avoid vectorization. */ + if (y) + abort (); + } + + for (i = 0; i < N/2; i++) + { + a[i] = b[i+N/2] * c[i+N/2] - b[i] * c[i]; + e[i+N/2] = b[i] * c[i+N/2] + b[i+N/2] * c[i]; + } + + /* check results: */ + for (i=0; i<N; i++) + { + if (a[i] != results1[i] || e[i] != results2[i]) + abort (); + } + + + for (i = 1; i <=N-4; i++) + { + a[i+3] = b[i-1]; + } + + /* check results: */ + for (i = 1; i <=N-4; i++) + { + if (a[i+3] != b[i-1]) + abort (); + } + + return 0; +} + +int main (void) +{ + check_vect (); + + return main1 (); +} + +/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-6.c b/gcc/testsuite/gcc.dg/vect/vect-6.c index 4dcb1bea0f1..5f2e0ea5936 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-6.c +++ b/gcc/testsuite/gcc.dg/vect/vect-6.c @@ -3,41 +3,20 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 128 +#define N 16 -float results1[N]; -float results2[N]; +float results1[N] = {192.00,240.00,288.00,336.00,384.00,432.00,480.00,528.00,0.00}; +float results2[N] = {0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,54.00,120.00,198.00,288.00,390.00,504.00,630.00}; float a[N] = {0}; float e[N] = {0}; -float b[N]; -float c[N]; - -volatile int y = 0; +float b[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45}; +float c[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; __attribute__ ((noinline)) int main1 () { int i; - for (i=0; i<N; i++) - { - b[i] = i*3; - c[i] = i; - results1[i] = 0; - results2[i] = 0; - /* Avoid vectorization. */ - if (y) - abort (); - } - for (i=0; i<N/2; i++) - { - results1[i] = b[i+N/2] * c[i+N/2] - b[i] * c[i]; - results2[i+N/2] = b[i] * c[i+N/2] + b[i+N/2] * c[i]; - /* Avoid vectorization. */ - if (y) - abort (); - } - for (i = 0; i < N/2; i++) { a[i] = b[i+N/2] * c[i+N/2] - b[i] * c[i]; diff --git a/gcc/testsuite/gcc.dg/vect/vect-73-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-73-big-array.c new file mode 100644 index 00000000000..5f40055e2c8 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-73-big-array.c @@ -0,0 +1,51 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 128 + +int ic[N*2]; +int ib[N]; + +#define ia (ic+N) + +volatile int y = 0; + +__attribute__ ((noinline)) +int main1 () +{ + int i, j; + + for (i = 0; i < N; i++) + { + ib[i] = i*3; + if (y) + abort (); + } + + for (i = 0; i < N; i++) + { + ia[i] = ib[i]; + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (ia[i] != ib[i]) + abort (); + } + + return 0; +} + +int main (void) +{ + check_vect (); + + return main1 (); +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-73.c b/gcc/testsuite/gcc.dg/vect/vect-73.c index 19d8d24e0ac..ee3c6e60e15 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-73.c +++ b/gcc/testsuite/gcc.dg/vect/vect-73.c @@ -3,15 +3,13 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 128 +#define N 16 int ic[N*2]; -int ib[N]; +int ib[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45}; #define ia (ic+N) -volatile int y = 0; - __attribute__ ((noinline)) int main1 () { @@ -19,13 +17,6 @@ int main1 () for (i = 0; i < N; i++) { - ib[i] = i*3; - if (y) - abort (); - } - - for (i = 0; i < N; i++) - { ia[i] = ib[i]; } @@ -33,7 +24,7 @@ int main1 () for (i = 0; i < N; i++) { if (ia[i] != ib[i]) - abort (); + abort(); } return 0; diff --git a/gcc/testsuite/gcc.dg/vect/vect-74-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-74-big-array.c new file mode 100644 index 00000000000..5cd926fe0ba --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-74-big-array.c @@ -0,0 +1,68 @@ +/* { dg-require-effective-target vect_float } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 128 + +/* Check handling of accesses for which the "initial condition" - + the expression that represents the first location accessed - is + more involved than just an ssa_name. */ + +float a[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); +float b[N+4] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))) = {0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 7.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0}; +float c[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))) = {0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 7.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5}; + +volatile int y = 0; + +__attribute__ ((noinline)) int +main1 (float *__restrict__ pa, float * __restrict__ pb, float * __restrict__ pc) +{ + int i; + float *q = pb + 4; + + for (i = 0; i < N; i++) + { + b[i] = i; + c[i] = 0.5 + i; + if (y) + abort (); + } + for (; i < N+4; i++) + { + b[i] = i; + if (y) + abort (); + } + + for (i = 0; i < N; i++) + { + pa[i] = q[i] * pc[i]; + } + + for (i = 0; i < N; i++) + { + if (pa[i] != q[i] * pc[i]) + abort (); + } + + return 0; +} + +int main (void) +{ + check_vect (); + + main1 (a, b, c); + + return 0; +} + +/* Xfail until handling restrict is refined. See pr29145. */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ +/* Uncomment when this testcase gets vectorized again: + dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 3 "vect" { target vect_no_align } } + dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail vect_no_align } } + dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail vect_no_align } } +*/ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-74.c b/gcc/testsuite/gcc.dg/vect/vect-74.c index f8e973ef358..a680b9fb01b 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-74.c +++ b/gcc/testsuite/gcc.dg/vect/vect-74.c @@ -3,7 +3,7 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 128 +#define N 16 /* Check handling of accesses for which the "initial condition" - the expression that represents the first location accessed - is @@ -13,8 +13,6 @@ float a[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); float b[N+4] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))) = {0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 7.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0}; float c[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))) = {0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 7.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5}; -volatile int y = 0; - __attribute__ ((noinline)) int main1 (float *__restrict__ pa, float * __restrict__ pb, float * __restrict__ pc) { @@ -23,27 +21,13 @@ main1 (float *__restrict__ pa, float * __restrict__ pb, float * __restrict__ pc for (i = 0; i < N; i++) { - b[i] = i; - c[i] = 0.5 + i; - if (y) - abort (); - } - for (; i < N+4; i++) - { - b[i] = i; - if (y) - abort (); - } - - for (i = 0; i < N; i++) - { pa[i] = q[i] * pc[i]; } for (i = 0; i < N; i++) { if (pa[i] != q[i] * pc[i]) - abort (); + abort(); } return 0; diff --git a/gcc/testsuite/gcc.dg/vect/vect-75-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-75-big-array.c new file mode 100644 index 00000000000..1c70cc2c518 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-75-big-array.c @@ -0,0 +1,57 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 120 +#define OFF 8 + +/* Check handling of accesses for which the "initial condition" - + the expression that represents the first location accessed - is + more involved than just an ssa_name. */ + +int ib[N+OFF] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))) = {0, 1, 3, 5, 7, 11, 13, 17}; + +volatile int y = 0; + +__attribute__ ((noinline)) +int main1 (int *ib) +{ + int i; + int ia[N]; + + for (i = OFF; i < N+OFF; i++) + { + ib[i] = ib[i%OFF]*(i/OFF); + if (y) + abort (); + } + for (i = 0; i < N; i++) + { + ia[i] = ib[i+OFF]; + } + + + /* check results: */ + for (i = 0; i < N; i++) + { + if (ia[i] != ib[i+OFF]) + abort (); + } + + return 0; +} + +int main (void) +{ + check_vect (); + + main1 (ib); + return 0; +} + + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target vect_no_align } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail vect_no_align } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-75.c b/gcc/testsuite/gcc.dg/vect/vect-75.c index 1c70cc2c518..092a3013e07 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-75.c +++ b/gcc/testsuite/gcc.dg/vect/vect-75.c @@ -3,16 +3,14 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 120 +#define N 8 #define OFF 8 /* Check handling of accesses for which the "initial condition" - the expression that represents the first location accessed - is more involved than just an ssa_name. */ -int ib[N+OFF] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))) = {0, 1, 3, 5, 7, 11, 13, 17}; - -volatile int y = 0; +int ib[N+OFF] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))) = {0, 1, 3, 5, 7, 11, 13, 17, 0, 2, 6, 10, 14, 22, 26, 34}; __attribute__ ((noinline)) int main1 (int *ib) @@ -20,12 +18,6 @@ int main1 (int *ib) int i; int ia[N]; - for (i = OFF; i < N+OFF; i++) - { - ib[i] = ib[i%OFF]*(i/OFF); - if (y) - abort (); - } for (i = 0; i < N; i++) { ia[i] = ib[i+OFF]; diff --git a/gcc/testsuite/gcc.dg/vect/vect-76-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-76-big-array.c new file mode 100644 index 00000000000..915f10edbf4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-76-big-array.c @@ -0,0 +1,83 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 124 +#define OFF 4 + +/* Check handling of accesses for which the "initial condition" - + the expression that represents the first location accessed - is + more involved than just an ssa_name. */ + +int ib[N+OFF] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))) = {0, 1, 3, 5, 7, 11, 13, 17}; +int ic[N+OFF] = {0, 1, 3, 5, 7, 11, 13, 17}; + +volatile int y = 0; + +__attribute__ ((noinline)) +int main1 (int *pib) +{ + int i; + int ia[N+OFF]; + for (i = OFF; i < N+OFF; i++) + { + ib[i] = ib[i%8]*(i/8); + ic[i] = ic[i%8]*(i/8); + if (y) + abort (); + } + + for (i = OFF; i < N; i++) + { + ia[i] = pib[i - OFF]; + } + + + /* check results: */ + for (i = OFF; i < N; i++) + { + if (ia[i] != pib[i - OFF]) + abort (); + } + + for (i = 0; i < N; i++) + { + ia[i] = pib[i - OFF]; + } + + + /* check results: */ + for (i = 0; i < N; i++) + { + if (ia[i] != pib[i - OFF]) + abort (); + } + + for (i = OFF; i < N; i++) + { + ia[i] = ic[i - OFF]; + } + + + /* check results: */ + for (i = OFF; i < N; i++) + { + if (ia[i] != ic[i - OFF]) + abort (); + } + + return 0; +} + +int main (void) +{ + check_vect (); + + main1 (&ib[OFF]); + return 0; +} + + +/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-76.c b/gcc/testsuite/gcc.dg/vect/vect-76.c index edb0790e5a4..d7713024224 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-76.c +++ b/gcc/testsuite/gcc.dg/vect/vect-76.c @@ -3,30 +3,21 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 124 +#define N 24 #define OFF 4 /* Check handling of accesses for which the "initial condition" - the expression that represents the first location accessed - is more involved than just an ssa_name. */ -int ib[N+OFF] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))) = {0, 1, 3, 5, 7, 11, 13, 17}; -int ic[N+OFF] = {0, 1, 3, 5, 7, 11, 13, 17}; - -volatile int y = 0; +int ib[N+OFF] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))) = {0, 1, 3, 5, 7, 11, 13, 17, 0, 2, 6, 10}; +int ic[N+OFF] = {0, 1, 3, 5, 7, 11, 13, 17, 0, 2, 6, 10}; __attribute__ ((noinline)) int main1 (int *pib) { int i; int ia[N+OFF]; - for (i = OFF; i < N+OFF; i++) - { - ib[i] = ib[i%8]*(i/8); - ic[i] = ic[i%8]*(i/8); - if (y) - abort (); - } for (i = OFF; i < N; i++) { diff --git a/gcc/testsuite/gcc.dg/vect/vect-80-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-80-big-array.c new file mode 100644 index 00000000000..611d8260d4d --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-80-big-array.c @@ -0,0 +1,71 @@ +/* { dg-require-effective-target vect_float } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 128 + +float fa[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); +float fb[N+4] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); +float fc[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); + +/* Check handling of accesses for which the "initial condition" - + the expression that represents the first location accessed - is + more involved than just an ssa_name. */ + +volatile int y = 0; + +__attribute__ ((noinline)) int +main1 (float * __restrict__ pa, float * __restrict__ pb, float *__restrict__ pc) +{ + int i; + float *q = pb + 4; + for (i = 0; i < N; i++) + { + fb[i] = i; + fc[i] = 0.5+i; + if (y) + abort (); + } + for (; i < N+4; i++) + { + fb[i] = i; + if (y) + abort (); + } + + for (i = 0; i < N; i++) + { + pa[i] = q[i] * pc[i]; + } + + for (i = 0; i < N; i++) + { + if (pa[i] != q[i] * pc[i]) + abort (); + } + + return 0; +} + + +int main (void) +{ + check_vect (); + + main1 (fa, fb, fc); + + return 0; +} + +/* For targets that don't support misaligned loads we version for the + all three accesses (peeling to align the store will not force the + two loads to be aligned). */ + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ +/* Uncomment when this testcase gets vectorized again: + dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail vect_no_align } } + dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail vect_no_align } } + dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 3 "vect" { target vect_no_align } } +*/ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-80.c b/gcc/testsuite/gcc.dg/vect/vect-80.c index f5cdbb2fd30..fc0ed1b3938 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-80.c +++ b/gcc/testsuite/gcc.dg/vect/vect-80.c @@ -3,36 +3,21 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 128 +#define N 16 float fa[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); -float fb[N+4] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); -float fc[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); +float fb[N+4] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))) = {0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 7.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0}; +float fc[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))) = {0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 7.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5}; /* Check handling of accesses for which the "initial condition" - the expression that represents the first location accessed - is more involved than just an ssa_name. */ -volatile int y = 0; - __attribute__ ((noinline)) int main1 (float * __restrict__ pa, float * __restrict__ pb, float *__restrict__ pc) { int i; float *q = pb + 4; - for (i = 0; i < N; i++) - { - fb[i] = i; - fc[i] = 0.5+i; - if (y) - abort (); - } - for (; i < N+4; i++) - { - fb[i] = i; - if (y) - abort (); - } for (i = 0; i < N; i++) { diff --git a/gcc/testsuite/gcc.dg/vect/vect-85-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-85-big-array.c new file mode 100644 index 00000000000..004114fbb66 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-85-big-array.c @@ -0,0 +1,49 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 128 + +__attribute__ ((noinline)) +int main1 (int *a) +{ + int i, j, k; + int b[N]; + + for (i = 0; i < N; i++) + { + for (j = 0; j < N; j++) + { + k = i + N; + a[j] = k; + } + b[i] = k; + } + + + for (j = 0; j < N; j++) + if (a[j] != i + N - 1) + abort (); + + for (j = 0; j < N; j++) + if (b[j] != j + N) + abort (); + + return 0; +} + +int main (void) +{ + int a[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); + + check_vect (); + + main1 (a); + + return 0; +} + +/* Fails for targets that don't vectorize PLUS (e.g alpha). */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-85.c b/gcc/testsuite/gcc.dg/vect/vect-85.c index 136ff4a800a..a5bf5db078a 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-85.c +++ b/gcc/testsuite/gcc.dg/vect/vect-85.c @@ -3,7 +3,7 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 128 +#define N 16 __attribute__ ((noinline)) int main1 (int *a) diff --git a/gcc/testsuite/gcc.dg/vect/vect-89-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-89-big-array.c new file mode 100644 index 00000000000..89286635cee --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-89-big-array.c @@ -0,0 +1,50 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 128 + +struct tmp_struct +{ + int x; + int y[N]; +}; + +__attribute__ ((noinline)) +int main1 () +{ + int i, *q; + struct tmp_struct tmp, *p; + + p = &tmp; + q = p->y; + + for (i = 0; i < N; i++) + { + *q++ = 5; + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (p->y[i] != 5) + { + abort (); + } + } + + return 0; +} + +int main (void) +{ + check_vect (); + + return main1 (); +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */ +/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-89.c b/gcc/testsuite/gcc.dg/vect/vect-89.c index d621785e38a..131efeab53a 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-89.c +++ b/gcc/testsuite/gcc.dg/vect/vect-89.c @@ -3,7 +3,7 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 128 +#define N 16 struct tmp_struct { diff --git a/gcc/testsuite/gcc.dg/vect/vect-97-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-97-big-array.c new file mode 100644 index 00000000000..87bacbf726b --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-97-big-array.c @@ -0,0 +1,73 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 128 + +char x[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); +char cb[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); + +volatile int y = 0; + +__attribute__ ((noinline)) +int main1 () +{ + struct { + char *p; + char *q; + } s; + int i; + for (i = 0; i < N; i++) + { + cb[i] = i*3; + if (y) + abort (); + } + + /* Check that datarefs analysis can determine that the access via pointer + s.p is based off array x, which enables us to antialias this access from + the access to array cb. */ + s.p = x; + for (i = 0; i < N; i++) + { + s.p[i] = cb[i]; + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (s.p[i] != cb[i]) + abort (); + } + + /* Check that datarefs analysis can determine that the access via pointer + s.p is based off array x, and that the access via pointer s.q is based off + array cb, which enables us to antialias these two accesses. */ + s.q = cb; + for (i = 0; i < N; i++) + { + s.p[i] = s.q[i]; + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (s.p[i] != s.q[i]) + abort (); + } + + return 0; +} + +int main (void) +{ + check_vect (); + + return main1 (); +} + + +/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-97.c b/gcc/testsuite/gcc.dg/vect/vect-97.c index f8bf4c32142..6ea26149095 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-97.c +++ b/gcc/testsuite/gcc.dg/vect/vect-97.c @@ -3,12 +3,10 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 128 +#define N 16 char x[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); -char cb[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); - -volatile int y = 0; +char cb[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45}; __attribute__ ((noinline)) int main1 () @@ -18,12 +16,6 @@ int main1 () char *q; } s; int i; - for (i = 0; i < N; i++) - { - cb[i] = i*3; - if (y) - abort (); - } /* Check that datarefs analysis can determine that the access via pointer s.p is based off array x, which enables us to antialias this access from diff --git a/gcc/testsuite/gcc.dg/vect/vect-98-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-98-big-array.c new file mode 100644 index 00000000000..0528d43b807 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-98-big-array.c @@ -0,0 +1,57 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 16 +#define DOT16( a, b) ( a[0]*b[0] + a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + \ + a[4]*b[4] + a[5]*b[5] + a[6]*b[6] + a[7]*b[7] + \ + a[8]*b[8] + a[9]*b[9] + a[10]*b[10] + a[11]*b[11] + \ + a[12]*b[12] + a[13]*b[13] + a[14]*b[14] + a[15]*b[15]) + +volatile int y = 0; + +__attribute__ ((noinline)) +int main1 (int ia[][N]) +{ + int i, j; + int ib[N] = {0,3,6,9}; + int ic[N][N]; + + for (i = 0; i < N; i++) + { + ic[0][i] = DOT16 (ia[i], ib); + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (ic[0][i] != DOT16 (ia[i], ib)) + abort (); + } + + return 0; +} + +int main (void) +{ + int ia[N][N]; + int i,j; + for (i = 0; i < N; i++) + for (j = 0; j < N; j++) + { + ia[i][j] = i + j + 1; + /* Avoid vectorization. */ + if (y) + abort (); + } + + check_vect (); + + return main1 (ia); +} + +/* Needs interleaving support. */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_strided4 } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { xfail vect_strided4 } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-98.c b/gcc/testsuite/gcc.dg/vect/vect-98.c index 987c93bf178..01c9153878f 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-98.c +++ b/gcc/testsuite/gcc.dg/vect/vect-98.c @@ -3,13 +3,8 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 16 -#define DOT16( a, b) ( a[0]*b[0] + a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + \ - a[4]*b[4] + a[5]*b[5] + a[6]*b[6] + a[7]*b[7] + \ - a[8]*b[8] + a[9]*b[9] + a[10]*b[10] + a[11]*b[11] + \ - a[12]*b[12] + a[13]*b[13] + a[14]*b[14] + a[15]*b[15]) - -volatile int y = 0; +#define N 4 +#define DOT4( a, b ) ( a[0]*b[0] + a[1]*b[1] + a[2]*b[2] + a[3]*b[3] ) __attribute__ ((noinline)) int main1 (int ia[][N]) @@ -20,14 +15,14 @@ int main1 (int ia[][N]) for (i = 0; i < N; i++) { - ic[0][i] = DOT16 (ia[i], ib); + ic[0][i] = DOT4 (ia[i], ib); } /* check results: */ for (i = 0; i < N; i++) { - if (ic[0][i] != DOT16 (ia[i], ib)) - abort (); + if (ic[0][i] != DOT4 (ia[i], ib)) + abort(); } return 0; @@ -35,16 +30,7 @@ int main1 (int ia[][N]) int main (void) { - int ia[N][N]; - int i,j; - for (i = 0; i < N; i++) - for (j = 0; j < N; j++) - { - ia[i][j] = i + j + 1; - /* Avoid vectorization. */ - if (y) - abort (); - } + int ia[N][N] = {{1,2,3,4},{2,3,5,7},{2,4,6,8},{22,43,55,77}}; check_vect (); diff --git a/gcc/testsuite/gcc.dg/vect/vect-all-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-all-big-array.c new file mode 100644 index 00000000000..ef5213a3685 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-all-big-array.c @@ -0,0 +1,254 @@ +/* { dg-require-effective-target vect_int } */ +/* { dg-require-effective-target vect_float } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 128 + +int iadd_results[N]; +float fadd_results[N]; +float fmul_results[N]; +float fresults1[N]; +float fresults2[N]; + +/****************************************************/ +__attribute__ ((noinline)) +void icheck_results (int *a, int *results) +{ + int i; + for (i = 0; i < N; i++) + { + if (a[i] != results[i]) + abort (); + } +} + +__attribute__ ((noinline)) +void fcheck_results (float *a, float *results) +{ + int i; + for (i = 0; i < N; i++) + { + if (a[i] != results[i]) + abort (); + } +} + +__attribute__ ((noinline)) void +fbar_mul (float *a) +{ + fcheck_results (a, fmul_results); +} + +__attribute__ ((noinline)) void +fbar_add (float *a) +{ + fcheck_results (a, fadd_results); +} + +__attribute__ ((noinline)) void +ibar_add (int *a) +{ + icheck_results (a, iadd_results); +} + +__attribute__ ((noinline)) void +fbar1 (float *a) +{ + fcheck_results (a, fresults1); +} + +__attribute__ ((noinline)) void +fbar2 (float *a) +{ + fcheck_results (a, fresults2); +} + +float a[N]; +float e[N]; +float b[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45}; +float c[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; +float d[N] = {0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30}; +int ic[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45}; +int ib[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45}; +int ia[N]; +char cb[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45}; +char ca[N]; +short sa[N]; + +volatile int y = 0; + +/* All of the loops below are currently vectorizable, except + initialization ones. */ + +__attribute__ ((noinline)) int +main1 () +{ + int i,j; + /* Initialization. */ + for (i = 0; i < N; i++) + { + b[i] = i*3; + c[i] = i; + d[i] = i*2; + ic[i] = i*3; + ib[i] = i*3; + cb[i] = i*3; + fadd_results[i] = b[i] + c[i] + d[i]; + iadd_results[i] = ib[i] + ic[i]; + fmul_results[i] = b[i] * c[i]; + fresults1[i] = 0; + fresults2[i] = 0; + if (y) + abort (); + } + + /* Test 1: copy chars. */ + for (i = 0; i < N; i++) + { + ca[i] = cb[i]; + } + /* check results: */ + for (i = 0; i < N; i++) + { + if (ca[i] != cb[i]) + abort (); + } + + + /* Test 2: fp mult. */ + for (i = 0; i < N; i++) + { + a[i] = b[i] * c[i]; + } + fbar_mul (a); + + + /* Test 3: mixed types (int, fp), same nunits in vector. */ + for (i = 0; i < N; i++) + { + a[i] = b[i] + c[i] + d[i]; + e[i] = b[i] + c[i] + d[i]; + ia[i] = ib[i] + ic[i]; + } + ibar_add (ia); + fbar_add (a); + fbar_add (e); + + /* Initialization. */ + for (i = 0; i < N; i++) + { + fresults1[i] = a[i]; + fresults2[i] = e[i]; + if (y) + abort (); + } + for (i = 0; i < N/2; i++) + { + fresults1[i] = b[i+N/2] * c[i+N/2] - b[i] * c[i]; + fresults2[i+N/2] = b[i] * c[i+N/2] + b[i+N/2] * c[i]; + if (y) + abort (); + } + /* Test 4: access with offset. */ + for (i = 0; i < N/2; i++) + { + a[i] = b[i+N/2] * c[i+N/2] - b[i] * c[i]; + e[i+N/2] = b[i] * c[i+N/2] + b[i+N/2] * c[i]; + } + fbar1 (a); + fbar2 (e); + + + /* Test 5: access with offset. */ + for (i = 1; i <=N-4; i++) + { + a[i+3] = b[i-1]; + } + /* check results: */ + for (i = 1; i <=N-4; i++) + { + if (a[i+3] != b[i-1]) + abort (); + } + + + /* Test 6 - loop induction with stride != 1. */ + i = 0; + j = 0; + while (i < 5*N) + { + a[j] = c[j]; + i += 5; + j++; + } + /* check results: */ + for (i = 0; i <N; i++) + { + if (a[i] != c[i]) + abort (); + } + + + /* Test 7 - reverse access. */ + for (i = N; i > 0; i--) + { + a[N-i] = d[N-i]; + } + /* check results: */ + for (i = 0; i <N; i++) + { + if (a[i] != d[i]) + abort (); + } + + + /* Tests 8,9,10 - constants. */ + for (i = 0; i < N; i++) + { + a[i] = 5.0; + } + /* check results: */ + for (i = 0; i < N; i++) + { + if (a[i] != 5.0) + abort (); + } + + for (i = 0; i < N; i++) + { + sa[i] = 5; + } + /* check results: */ + for (i = 0; i < N; i++) + { + if (sa[i] != 5) + abort (); + } + + for (i = 0; i < N; i++) + { + ia[i] = ib[i] + 5; + } + /* check results: */ + for (i = 0; i < N; i++) + { + if (ia[i] != ib[i] + 5) + abort (); + } + + return 0; +} + +int main (void) +{ + check_vect (); + + return main1 (); +} + +/* { dg-final { scan-tree-dump-times "vectorized 10 loops" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */ +/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-all.c b/gcc/testsuite/gcc.dg/vect/vect-all.c index 79ad5997b19..6adb7bf88bd 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-all.c +++ b/gcc/testsuite/gcc.dg/vect/vect-all.c @@ -4,13 +4,13 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 128 +#define N 16 -int iadd_results[N]; -float fadd_results[N]; -float fmul_results[N]; -float fresults1[N]; -float fresults2[N]; +int iadd_results[N] = {0,6,12,18,24,30,36,42,48,54,60,66,72,78,84,90}; +float fadd_results[N] = {0.0,6.0,12.0,18.0,24.0,30.0,36.0,42.0,48.0,54.0,60.0,66.0,72.0,78.0,84.0,90.0}; +float fmul_results[N] = {0.0,3.0,12.0,27.0,48.0,75.0,108.0,147.0,192.0,243.0,300.0,363.0,432.0,507.0,588.0,675.0}; +float fresults1[N] = {192.00,240.00,288.00,336.00,384.00,432.00,480.00,528.00,48.00,54.00,60.00,66.00,72.00,78.00,84.00,90.00}; +float fresults2[N] = {0.00,6.00,12.00,18.00,24.00,30.00,36.00,42.00,0.00,54.00,120.00,198.00,288.00,390.00,504.00,630.00}; /****************************************************/ __attribute__ ((noinline)) @@ -77,32 +77,12 @@ char cb[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45}; char ca[N]; short sa[N]; -volatile int y = 0; - -/* All of the loops below are currently vectorizable, except - initialization ones. */ +/* All of the loops below are currently vectorizable. */ __attribute__ ((noinline)) int main1 () { int i,j; - /* Initialization. */ - for (i = 0; i < N; i++) - { - b[i] = i*3; - c[i] = i; - d[i] = i*2; - ic[i] = i*3; - ib[i] = i*3; - cb[i] = i*3; - fadd_results[i] = b[i] + c[i] + d[i]; - iadd_results[i] = ib[i] + ic[i]; - fmul_results[i] = b[i] * c[i]; - fresults1[i] = 0; - fresults2[i] = 0; - if (y) - abort (); - } /* Test 1: copy chars. */ for (i = 0; i < N; i++) @@ -136,21 +116,7 @@ main1 () fbar_add (a); fbar_add (e); - /* Initialization. */ - for (i = 0; i < N; i++) - { - fresults1[i] = a[i]; - fresults2[i] = e[i]; - if (y) - abort (); - } - for (i = 0; i < N/2; i++) - { - fresults1[i] = b[i+N/2] * c[i+N/2] - b[i] * c[i]; - fresults2[i+N/2] = b[i] * c[i+N/2] + b[i+N/2] * c[i]; - if (y) - abort (); - } + /* Test 4: access with offset. */ for (i = 0; i < N/2; i++) { diff --git a/gcc/testsuite/gcc.dg/vect/vect-double-reduc-6-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-double-reduc-6-big-array.c new file mode 100644 index 00000000000..abf3f7db6d3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-double-reduc-6-big-array.c @@ -0,0 +1,65 @@ +/* { dg-require-effective-target vect_int_mult } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define K 16 + +int in[2*K][K] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); +int out[K]; +int check_result[K]; + +volatile int y = 0; + +__attribute__ ((noinline)) void +foo () +{ + int sum; + int i, j, k; + + for (k = 0; k < K; k++) + { + sum = 1; + for (j = 0; j < K; j++) + for (i = 0; i < K; i++) + { + sum *= in[i+k][j]; + /* Avoid vectorization. */ + if (y) + abort (); + } + check_result[k] = sum; + } + + for (k = 0; k < K; k++) + { + sum = 1; + for (j = 0; j < K; j++) + for (i = 0; i < K; i++) + sum *= in[i+k][j]; + out[k] = sum; + } +} + +int main () +{ + int i, j, k; + + check_vect (); + + for (i = 0; i < 2*K; i++) + for (j = 0; j < K; j++) + in[i][j] = (i+2)/3; + + foo (); + + for (k = 0; k < K; k++) + if (out[k] != check_result[k]) + abort (); + + return 0; +} + +/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ + diff --git a/gcc/testsuite/gcc.dg/vect/vect-double-reduc-6.c b/gcc/testsuite/gcc.dg/vect/vect-double-reduc-6.c index 0b49ab77298..6b14e3bf590 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-double-reduc-6.c +++ b/gcc/testsuite/gcc.dg/vect/vect-double-reduc-6.c @@ -3,15 +3,13 @@ #include <stdarg.h> #include "tree-vect.h" -#define K 16 +#define K 4 int in[2*K][K] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); int out[K]; -int check_result[K]; +int check_result[K] = {0,16,256,4096}; -volatile int y = 0; - -__attribute__ ((noinline)) void +__attribute__ ((noinline)) void foo () { int sum; @@ -20,21 +18,7 @@ foo () for (k = 0; k < K; k++) { sum = 1; - for (j = 0; j < K; j++) - for (i = 0; i < K; i++) - { - sum *= in[i+k][j]; - /* Avoid vectorization. */ - if (y) - abort (); - } - check_result[k] = sum; - } - - for (k = 0; k < K; k++) - { - sum = 1; - for (j = 0; j < K; j++) + for (j = 0; j < K; j++) for (i = 0; i < K; i++) sum *= in[i+k][j]; out[k] = sum; @@ -59,7 +43,7 @@ int main () return 0; } - + /* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ - + diff --git a/gcc/testsuite/gcc.dg/vect/vect-iv-8-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-iv-8-big-array.c new file mode 100644 index 00000000000..677b7a3534b --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-iv-8-big-array.c @@ -0,0 +1,43 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 128 + +__attribute__ ((noinline)) int main1 (short X) +{ + unsigned char a[N]; + unsigned short b[N]; + unsigned int c[N]; + short myX = X; + int i; + + /* vectorization of induction with type conversions. */ + for (i = 0; i < N; i++) + { + a[i] = (unsigned char)X; + b[i] = X; + c[i] = (unsigned int)X; + X++; + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (a[i] != (unsigned char)myX || b[i] != myX || c[i] != (unsigned int)myX++) + abort (); + } + + return 0; +} + +int main (void) +{ + check_vect (); + + return main1 (3); +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_pack_trunc && vect_unpack } } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-iv-8.c b/gcc/testsuite/gcc.dg/vect/vect-iv-8.c index 4150ee28216..6544988b247 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-iv-8.c +++ b/gcc/testsuite/gcc.dg/vect/vect-iv-8.c @@ -3,7 +3,7 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 128 +#define N 26 __attribute__ ((noinline)) int main1 (short X) { diff --git a/gcc/testsuite/gcc.dg/vect/vect-iv-8a-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-iv-8a-big-array.c new file mode 100644 index 00000000000..100c7513c40 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-iv-8a-big-array.c @@ -0,0 +1,43 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 128 + +__attribute__ ((noinline)) int main1 (short X) +{ + signed char a[N]; + short b[N]; + int c[N]; + short myX = X; + int i; + + /* vectorization of induction with type conversions. */ + for (i = 0; i < N; i++) + { + a[i] = (signed char)X; + b[i] = X; + c[i] = (int)X; + X++; + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (a[i] != (signed char)myX || b[i] != myX || c[i] != (int)myX++) + abort (); + } + + return 0; +} + +int main (void) +{ + check_vect (); + + return main1 (3); +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_pack_trunc && vect_unpack } } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-iv-8a.c b/gcc/testsuite/gcc.dg/vect/vect-iv-8a.c index 3492030d227..dc742eb84fb 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-iv-8a.c +++ b/gcc/testsuite/gcc.dg/vect/vect-iv-8a.c @@ -3,7 +3,7 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 128 +#define N 26 __attribute__ ((noinline)) int main1 (short X) { diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-1-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-outer-1-big-array.c new file mode 100644 index 00000000000..804c3867bd0 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-1-big-array.c @@ -0,0 +1,27 @@ +/* { dg-do compile } */ + +#define N 256 +signed short image[N][N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); +signed short block[N][N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); +signed short out[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); + +/* Can't do outer-loop vectorization because of non-consecutive access. */ + +void +foo (){ + int i,j; + int diff; + + for (i = 0; i < N; i++) { + diff = 0; + for (j = 0; j < N; j+=8) { + diff += (image[i][j] - block[i][j]); + } + out[i]=diff; + } +} + +/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump-times "strided access in outer loop" 1 "vect" { xfail vect_multiple_sizes } } } */ +/* { dg-final { scan-tree-dump-times "strided access in outer loop" 2 "vect" { target vect_multiple_sizes } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-1.c b/gcc/testsuite/gcc.dg/vect/vect-outer-1.c index e8094db4112..2ce8f8ebac8 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-outer-1.c +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-1.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ -#define N 256 +#define N 64 signed short image[N][N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); signed short block[N][N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); signed short out[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-1a-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-outer-1a-big-array.c new file mode 100644 index 00000000000..9b418fabaa9 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-1a-big-array.c @@ -0,0 +1,25 @@ +/* { dg-do compile } */ + +#define N 256 +signed short image[N][N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); +signed short block[N][N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); + +/* Can't do outer-loop vectorization because of non-consecutive access. */ + +int +foo (){ + int i,j; + int diff = 0; + + for (i = 0; i < N; i++) { + for (j = 0; j < N; j+=8) { + diff += (image[i][j] - block[i][j]); + } + } + return diff; +} + +/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump-times "strided access in outer loop" 1 "vect" { xfail vect_multiple_sizes } } } */ +/* { dg-final { scan-tree-dump-times "strided access in outer loop" 2 "vect" { target vect_multiple_sizes } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-1a.c b/gcc/testsuite/gcc.dg/vect/vect-outer-1a.c index 9b418fabaa9..a9b786e235c 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-outer-1a.c +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-1a.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ -#define N 256 +#define N 64 signed short image[N][N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); signed short block[N][N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-1b-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-outer-1b-big-array.c new file mode 100644 index 00000000000..48b7180784e --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-1b-big-array.c @@ -0,0 +1,27 @@ +/* { dg-do compile } */ + +#define N 160 +signed short image[N][N]; +signed short block[N][N]; +signed short out[N]; + +/* Outer-loop cannot get vectorized because of non-consecutive access. */ + +void +foo (){ + int i,j; + int diff; + + for (i = 0; i < N; i++) { + diff = 0; + for (j = 0; j < N; j+=4) { + diff += (image[i][j] - block[i][j]); + } + out[i]=diff; + } +} + +/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump-times "strided access in outer loop" 1 "vect" { xfail vect_multiple_sizes } } } */ +/* { dg-final { scan-tree-dump-times "strided access in outer loop" 2 "vect" { target vect_multiple_sizes } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-1b.c b/gcc/testsuite/gcc.dg/vect/vect-outer-1b.c index 48b7180784e..815758c766f 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-outer-1b.c +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-1b.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ -#define N 160 +#define N 40 signed short image[N][N]; signed short block[N][N]; signed short out[N]; diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-2-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-outer-2-big-array.c new file mode 100644 index 00000000000..ba3fa87b151 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-2-big-array.c @@ -0,0 +1,41 @@ +/* { dg-require-effective-target vect_float } */ +/* { dg-require-effective-target vect_intfloat_cvt } */ +#include <stdarg.h> +#include "tree-vect.h" + +#define N 160 +float image[N][N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); +float out[N]; + +/* Outer-loop vectorization. */ + +__attribute__ ((noinline)) void +foo (){ + int i,j; + + for (i = 0; i < N; i++) { + for (j = 0; j < N; j++) { + image[j][i] = j+i; + } + } +} + +int main (void) +{ + check_vect (); + int i, j; + + foo (); + + for (i = 0; i < N; i++) { + for (j = 0; j < N; j++) { + if (image[j][i] != j+i) + abort (); + } + } + + return 0; +} + +/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-2.c b/gcc/testsuite/gcc.dg/vect/vect-outer-2.c index ba3fa87b151..38701977bc6 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-outer-2.c +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-2.c @@ -3,7 +3,7 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 160 +#define N 40 float image[N][N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); float out[N]; diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-2a-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-outer-2a-big-array.c new file mode 100644 index 00000000000..062e1fdd451 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-2a-big-array.c @@ -0,0 +1,42 @@ +/* { dg-require-effective-target vect_float } */ +/* { dg-require-effective-target vect_intfloat_cvt } */ +#include <stdarg.h> +#include "tree-vect.h" + +#define N 160 +float image[N][N][N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); + +__attribute__ ((noinline)) void +foo (){ + int i,j,k; + + for (k=0; k<N; k++) { + for (i = 0; i < N; i++) { + for (j = 0; j < N; j++) { + image[k][j][i] = j+i+k; + } + } + } +} + +int main (void) +{ + check_vect (); + int i, j, k; + + foo (); + + for (k=0; k<N; k++) { + for (i = 0; i < N; i++) { + for (j = 0; j < N; j++) { + if (image[k][j][i] != j+i+k) + abort (); + } + } + } + + return 0; +} + +/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-2a.c b/gcc/testsuite/gcc.dg/vect/vect-outer-2a.c index 062e1fdd451..b8d0e51fee5 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-outer-2a.c +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-2a.c @@ -3,7 +3,7 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 160 +#define N 40 float image[N][N][N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); __attribute__ ((noinline)) void diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-2c-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-outer-2c-big-array.c new file mode 100644 index 00000000000..cdea72aabe2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-2c-big-array.c @@ -0,0 +1,42 @@ +/* { dg-require-effective-target vect_float } */ +/* { dg-require-effective-target vect_intfloat_cvt } */ +#include <stdarg.h> +#include "tree-vect.h" + +#define N 160 +float image[2*N][2*N][N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); + +__attribute__ ((noinline)) void +foo (){ + int i,j,k; + + for (k=0; k<N; k++) { + for (i = 0; i < N; i++) { + for (j = 0; j < N; j+=2) { + image[k][j][i] = j+i+k; + } + } + } +} + +int main (void) +{ + check_vect (); + int i, j, k; + + foo (); + + for (k=0; k<N; k++) { + for (i = 0; i < N; i++) { + for (j = 0; j < N; j+=2) { + if (image[k][j][i] != j+i+k) + abort (); + } + } + } + + return 0; +} + +/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-2c.c b/gcc/testsuite/gcc.dg/vect/vect-outer-2c.c index cdea72aabe2..0ca868637ad 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-outer-2c.c +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-2c.c @@ -3,7 +3,7 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 160 +#define N 40 float image[2*N][2*N][N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); __attribute__ ((noinline)) void diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-3-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-outer-3-big-array.c new file mode 100644 index 00000000000..83b6f994cd7 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-3-big-array.c @@ -0,0 +1,52 @@ +/* { dg-require-effective-target vect_float } */ +#include <stdarg.h> +#include "tree-vect.h" + +#define N 320 +float image[N][N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); +float out[N]; + +/* Outer-loop vectoriation. */ + +__attribute__ ((noinline)) void +foo (){ + int i,j; + float diff; + + for (i = 0; i < N; i++) { + diff = 0; + for (j = 0; j < N; j++) { + diff += image[j][i]; + } + out[i]=diff; + } +} + +int main (void) +{ + check_vect (); + int i, j; + float diff; + + for (i = 0; i < N; i++) { + for (j = 0; j < N; j++) { + image[i][j]=i+j; + } + } + + foo (); + + for (i = 0; i < N; i++) { + diff = 0; + for (j = 0; j < N; j++) { + diff += image[j][i]; + } + if (out[i] != diff) + abort (); + } + + return 0; +} + +/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-3.c b/gcc/testsuite/gcc.dg/vect/vect-outer-3.c index 83b6f994cd7..924700c5840 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-outer-3.c +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-3.c @@ -2,7 +2,7 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 320 +#define N 40 float image[N][N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); float out[N]; diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-3a-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-outer-3a-big-array.c new file mode 100644 index 00000000000..9768a1ed577 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-3a-big-array.c @@ -0,0 +1,54 @@ +/* { dg-require-effective-target vect_float } */ +#include <stdarg.h> +#include "tree-vect.h" + +#define N 320 +float image[N][N+1] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); +float out[N]; + +/* Outer-loop vectorization with misaliged accesses in the inner-loop. */ + +__attribute__ ((noinline)) void +foo (){ + int i,j; + float diff; + + for (i = 0; i < N; i++) { + diff = 0; + for (j = 0; j < N; j++) { + diff += image[j][i]; + } + out[i]=diff; + } +} + +int main (void) +{ + check_vect (); + int i, j; + float diff; + + for (i = 0; i < N; i++) { + for (j = 0; j < N; j++) { + image[i][j]=i+j; + } + } + + foo (); + + for (i = 0; i < N; i++) { + diff = 0; + for (j = 0; j < N; j++) { + diff += image[j][i]; + } + if (out[i] != diff) + abort (); + } + + return 0; +} + +/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail vect_no_align } } } */ +/* { dg-final { scan-tree-dump-times "step doesn't divide the vector-size" 2 "vect" { xfail vect_multiple_sizes } } } */ +/* { dg-final { scan-tree-dump-times "step doesn't divide the vector-size" 3 "vect" { target vect_multiple_sizes } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-3a.c b/gcc/testsuite/gcc.dg/vect/vect-outer-3a.c index 9768a1ed577..1759ee38db7 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-outer-3a.c +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-3a.c @@ -2,7 +2,7 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 320 +#define N 40 float image[N][N+1] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); float out[N]; diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-4a-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-outer-4a-big-array.c new file mode 100644 index 00000000000..af9d2a88b29 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-4a-big-array.c @@ -0,0 +1,26 @@ +/* { dg-do compile } */ + +#define N 512 +#define M 1024 +signed short in[N+M]; +signed short coeff[M]; +signed short out[N]; + +/* Outer-loop vectorization. */ + +void +foo (){ + int i,j; + int diff; + + for (i = 0; i < N; i++) { + diff = 0; + for (j = 0; j < M; j+=8) { + diff += in[j+i]*coeff[j]; + } + out[i]=diff; + } +} + +/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { target { vect_widen_mult_hi_to_si && vect_pack_trunc } } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-4a.c b/gcc/testsuite/gcc.dg/vect/vect-outer-4a.c index 3981b94e656..d7bcc9a2e8c 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-outer-4a.c +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-4a.c @@ -1,7 +1,7 @@ /* { dg-do compile } */ -#define N 512 -#define M 1024 +#define N 40 +#define M 128 signed short in[N+M]; signed short coeff[M]; signed short out[N]; diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-4b-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-outer-4b-big-array.c new file mode 100644 index 00000000000..703ac94835a --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-4b-big-array.c @@ -0,0 +1,26 @@ +/* { dg-do compile } */ + +#define N 320 +#define M 1024 +signed short in[N+M]; +signed short coeff[M]; +int out[N]; + +/* Outer-loop vectorization. */ + +void +foo (){ + int i,j; + int diff; + + for (i = 0; i < N; i++) { + diff = 0; + for (j = 0; j < M; j+=8) { + diff += in[j+i]*coeff[j]; + } + out[i]=diff; + } +} + +/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { target vect_widen_mult_hi_to_si } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-4b.c b/gcc/testsuite/gcc.dg/vect/vect-outer-4b.c index a9035454729..407315a8dc3 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-outer-4b.c +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-4b.c @@ -1,7 +1,7 @@ /* { dg-do compile } */ -#define N 320 -#define M 1024 +#define N 40 +#define M 128 signed short in[N+M]; signed short coeff[M]; int out[N]; diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-4c-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-outer-4c-big-array.c new file mode 100644 index 00000000000..2ce242cb96b --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-4c-big-array.c @@ -0,0 +1,27 @@ +/* { dg-do compile } */ + +#define N 320 +#define M 1024 +unsigned short in[N+M]; +unsigned short coeff[M]; +unsigned int out[N]; + +/* Outer-loop vectorization. */ + +void +foo (){ + int i,j; + unsigned short diff; + + for (i = 0; i < N; i++) { + diff = 0; + for (j = 0; j < M; j+=8) { + diff += in[j+i]*coeff[j]; + } + out[i]=diff; + } +} + +/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { target { vect_short_mult && { ! vect_no_align } } } } } */ +/* { dg-final { scan-tree-dump-times "zero step in outer loop." 1 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-4c.c b/gcc/testsuite/gcc.dg/vect/vect-outer-4c.c index 4b6ffbf10ec..3342b79b215 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-outer-4c.c +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-4c.c @@ -1,7 +1,7 @@ /* { dg-do compile } */ -#define N 320 -#define M 1024 +#define N 40 +#define M 128 unsigned short in[N+M]; unsigned short coeff[M]; unsigned int out[N]; diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-4d-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-outer-4d-big-array.c new file mode 100644 index 00000000000..0d85bed6059 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-4d-big-array.c @@ -0,0 +1,51 @@ +/* { dg-require-effective-target vect_float } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 320 +#define M 1024 +float in[N+M]; +float out[N]; + +/* Outer-loop vectorization. */ + +__attribute__ ((noinline)) void +foo (){ + int i,j; + float diff; + + for (i = 0; i < N; i++) { + diff = 0; + for (j = 0; j < M; j+=4) { + diff += in[j+i]; + } + out[i]=diff; + } +} + +int main (void) +{ + check_vect (); + int i, j; + float diff; + + for (i = 0; i < N; i++) + in[i] = i; + + foo (); + + for (i = 0; i < N; i++) { + diff = 0; + for (j = 0; j < M; j+=4) { + diff += in[j+i]; + } + if (out[i] != diff) + abort (); + } + + return 0; +} + +/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-4d.c b/gcc/testsuite/gcc.dg/vect/vect-outer-4d.c index e70be3248c0..c344fb1d67b 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-outer-4d.c +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-4d.c @@ -3,8 +3,8 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 320 -#define M 1024 +#define N 40 +#define M 128 float in[N+M]; float out[N]; diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-4m-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-outer-4m-big-array.c new file mode 100644 index 00000000000..9a1e02e0356 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-4m-big-array.c @@ -0,0 +1,58 @@ +/* { dg-require-effective-target vect_int } */ +#include <stdarg.h> +#include "tree-vect.h" + +#define N 320 +#define M 1024 +unsigned short in[N+M]; +unsigned int out[N]; + +/* Outer-loop vectorization. */ +/* Not vectorized due to multiple-types in the inner-loop. */ + +__attribute__ ((noinline)) unsigned int +foo (){ + int i,j; + unsigned int diff; + unsigned int s=0; + + for (i = 0; i < N; i++) { + diff = 0; + for (j = 0; j < M; j+=8) { + diff += in[j+i]; + } + s+=((unsigned short)diff>>3); + } + return s; +} + +int main (void) +{ + int i, j; + unsigned int diff; + unsigned int s=0,sum=0; + + check_vect (); + + for (i = 0; i < N+M; i++) { + in[i] = i; + } + + sum=foo (); + + for (i = 0; i < N; i++) { + diff = 0; + for (j = 0; j < M; j+=8) { + diff += in[j+i]; + } + s += ((unsigned short)diff>>3); + } + + if (s != sum) + abort (); + + return 0; +} + +/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail *-*-* } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-4m.c b/gcc/testsuite/gcc.dg/vect/vect-outer-4m.c index 1087df0d4cf..6e032f13c4f 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-outer-4m.c +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-4m.c @@ -2,8 +2,8 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 320 -#define M 1024 +#define N 40 +#define M 128 unsigned short in[N+M]; unsigned int out[N]; diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-fir-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-outer-fir-big-array.c new file mode 100644 index 00000000000..c69b7d74950 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-fir-big-array.c @@ -0,0 +1,74 @@ +/* { dg-require-effective-target vect_float } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 80 +#define M 256 +float in[N+M]; +float coeff[M]; +float out[N]; +float fir_out[N]; + +/* Should be vectorized. Fixed misaligment in the inner-loop. */ +__attribute__ ((noinline)) +void foo (){ + int i,j,k; + float diff; + + for (i = 0; i < N; i++) { + out[i] = 0; + } + + for (k = 0; k < 4; k++) { + for (i = 0; i < N; i++) { + diff = 0; + for (j = k; j < M; j+=4) { + diff += in[j+i]*coeff[j]; + } + out[i] += diff; + } + } + +} + +/* Vectorized. Changing misalignment in the inner-loop. */ +__attribute__ ((noinline)) +void fir (){ + int i,j,k; + float diff; + + for (i = 0; i < N; i++) { + diff = 0; + for (j = 0; j < M; j++) { + diff += in[j+i]*coeff[j]; + } + fir_out[i] = diff; + } +} + + +int main (void) +{ + check_vect (); + int i, j; + float diff; + + for (i = 0; i < M; i++) + coeff[i] = i; + for (i = 0; i < N+M; i++) + in[i] = i; + + foo (); + fir (); + + for (i = 0; i < N; i++) { + if (out[i] != fir_out[i]) + abort (); + } + + return 0; +} + +/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" { xfail vect_no_align } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb-big-array.c new file mode 100644 index 00000000000..5ac62ac3a2f --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb-big-array.c @@ -0,0 +1,78 @@ +/* { dg-require-effective-target vect_float } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 80 +#define M 128 +float in[N+M]; +float coeff[M]; +float out[N]; +float fir_out[N]; + +/* Vectorized. Fixed misaligment in the inner-loop. */ +__attribute__ ((noinline)) +void foo (){ + int i,j,k; + float diff; + + for (i = 0; i < N; i++) { + out[i] = 0; + } + + for (k = 0; k < 4; k++) { + for (i = 0; i < N; i++) { + diff = 0; + j = k; + + do { + diff += in[j+i]*coeff[j]; + j+=4; + } while (j < M); + + out[i] += diff; + } + } + +} + +/* Vectorized. Changing misalignment in the inner-loop. */ +__attribute__ ((noinline)) +void fir (){ + int i,j,k; + float diff; + + for (i = 0; i < N; i++) { + diff = 0; + for (j = 0; j < M; j++) { + diff += in[j+i]*coeff[j]; + } + fir_out[i] = diff; + } +} + + +int main (void) +{ + check_vect (); + int i, j; + float diff; + + for (i = 0; i < M; i++) + coeff[i] = i; + for (i = 0; i < N+M; i++) + in[i] = i; + + foo (); + fir (); + + for (i = 0; i < N; i++) { + if (out[i] != fir_out[i]) + abort (); + } + + return 0; +} + +/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" { xfail vect_no_align } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb.c b/gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb.c index 5ac62ac3a2f..3c1a362c003 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb.c +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb.c @@ -3,8 +3,8 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 80 -#define M 128 +#define N 40 +#define M 64 float in[N+M]; float coeff[M]; float out[N]; diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-fir.c b/gcc/testsuite/gcc.dg/vect/vect-outer-fir.c index c81180c8313..af787b96a33 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-outer-fir.c +++ b/gcc/testsuite/gcc.dg/vect/vect-outer-fir.c @@ -3,8 +3,8 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 80 -#define M 256 +#define N 40 +#define M 128 float in[N+M]; float coeff[M]; float out[N]; diff --git a/gcc/testsuite/gcc.dg/vect/vect-over-widen-1-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-over-widen-1-big-array.c new file mode 100644 index 00000000000..2061594acc0 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-over-widen-1-big-array.c @@ -0,0 +1,64 @@ +/* { dg-require-effective-target vect_int } */ +/* { dg-require-effective-target vect_shift } */ + +#include <stdlib.h> +#include <stdarg.h> +#include "tree-vect.h" + +#define N 512 + +/* Modified rgb to rgb conversion from FFmpeg. */ +__attribute__ ((noinline)) void +foo (unsigned char *src, unsigned char *dst) +{ + unsigned char *s = src; + unsigned short *d = (unsigned short *)dst; + int i; + + for (i = 0; i < N/4; i++) + { + const int b = *s++; + const int g = *s++; + const int r = *s++; + const int a = *s++; + *d = ((b>>3) | ((g&0xFC)<<3) | ((r&0xF8)<<8) | (a>>5)); + d++; + } + + s = src; + d = (unsigned short *)dst; + for (i = 0; i < N/4; i++) + { + const int b = *s++; + const int g = *s++; + const int r = *s++; + const int a = *s++; + if (*d != ((b>>3) | ((g&0xFC)<<3) | ((r&0xF8)<<8) | (a>>5))) + abort (); + d++; + } +} + +int main (void) +{ + int i; + unsigned char in[N], out[N]; + + check_vect (); + + for (i = 0; i < N; i++) + { + in[i] = i; + out[i] = 255; + __asm__ volatile (""); + } + + foo (in, out); + + return 0; +} + +/* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 4 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ + diff --git a/gcc/testsuite/gcc.dg/vect/vect-over-widen-1.c b/gcc/testsuite/gcc.dg/vect/vect-over-widen-1.c index 2061594acc0..36f4684ad58 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-over-widen-1.c +++ b/gcc/testsuite/gcc.dg/vect/vect-over-widen-1.c @@ -5,7 +5,7 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 512 +#define N 64 /* Modified rgb to rgb conversion from FFmpeg. */ __attribute__ ((noinline)) void diff --git a/gcc/testsuite/gcc.dg/vect/vect-over-widen-2-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-over-widen-2-big-array.c new file mode 100644 index 00000000000..bc738cef26c --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-over-widen-2-big-array.c @@ -0,0 +1,65 @@ +/* { dg-require-effective-target vect_int } */ +/* { dg-require-effective-target vect_shift } */ + +#include <stdlib.h> +#include <stdarg.h> +#include "tree-vect.h" + +#define N 512 + +/* Modified rgb to rgb conversion from FFmpeg. */ +__attribute__ ((noinline)) void +foo (unsigned char *src, unsigned char *dst) +{ + unsigned char *s = src; + int *d = (int *)dst; + int i; + + for (i = 0; i < N/4; i++) + { + const int b = *s++; + const int g = *s++; + const int r = *s++; + const int a = *s++; + *d = ((b>>3) | ((g&0xFC)<<3) | ((r&0xF8)<<8) | (a>>5)); + d++; + } + + s = src; + d = (int *)dst; + for (i = 0; i < N/4; i++) + { + const int b = *s++; + const int g = *s++; + const int r = *s++; + const int a = *s++; + if (*d != ((b>>3) | ((g&0xFC)<<3) | ((r&0xF8)<<8) | (a>>5))) + abort (); + d++; + } +} + +int main (void) +{ + int i; + unsigned char in[N], out[N]; + + check_vect (); + + for (i = 0; i < N; i++) + { + in[i] = i; + out[i] = 255; + __asm__ volatile (""); + } + + foo (in, out); + + return 0; +} + +/* Final value stays in int, so no over-widening is detected at the moment. */ +/* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 0 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ + diff --git a/gcc/testsuite/gcc.dg/vect/vect-over-widen-2.c b/gcc/testsuite/gcc.dg/vect/vect-over-widen-2.c index bc738cef26c..fecc5ef3038 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-over-widen-2.c +++ b/gcc/testsuite/gcc.dg/vect/vect-over-widen-2.c @@ -5,7 +5,7 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 512 +#define N 64 /* Modified rgb to rgb conversion from FFmpeg. */ __attribute__ ((noinline)) void diff --git a/gcc/testsuite/gcc.dg/vect/vect-over-widen-3-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-over-widen-3-big-array.c new file mode 100644 index 00000000000..d828c833f55 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-over-widen-3-big-array.c @@ -0,0 +1,64 @@ +/* { dg-require-effective-target vect_int } */ +/* { dg-require-effective-target vect_shift } */ + +#include <stdlib.h> +#include <stdarg.h> +#include "tree-vect.h" + +#define N 128 + +/* Modified rgb to rgb conversion from FFmpeg. */ +__attribute__ ((noinline)) void +foo (unsigned char *src, unsigned char *dst) +{ + unsigned char *s = src; + unsigned short *d = (unsigned short *)dst; + int i; + + for (i = 0; i < N/4; i++) + { + const int b = *s++; + const int g = *s++; + const int r = *s++; + const int a = *s++; + *d = ((b>>3) | ((g&0xFFC)<<3) | ((r+0xF8)>>8) | (a<<9)); + d++; + } + + s = src; + d = (unsigned short *)dst; + for (i = 0; i < N/4; i++) + { + const int b = *s++; + const int g = *s++; + const int r = *s++; + const int a = *s++; + if (*d != ((b>>3) | ((g&0xFFC)<<3) | ((r+0xF8)>>8) | (a<<9))) + abort (); + d++; + } +} + +int main (void) +{ + int i; + unsigned char in[N], out[N]; + + check_vect (); + + for (i = 0; i < N; i++) + { + in[i] = i; + out[i] = 255; + __asm__ volatile (""); + } + + foo (in, out); + + return 0; +} + +/* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ + diff --git a/gcc/testsuite/gcc.dg/vect/vect-over-widen-3.c b/gcc/testsuite/gcc.dg/vect/vect-over-widen-3.c index d828c833f55..ed36688f6c6 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-over-widen-3.c +++ b/gcc/testsuite/gcc.dg/vect/vect-over-widen-3.c @@ -5,7 +5,7 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 128 +#define N 64 /* Modified rgb to rgb conversion from FFmpeg. */ __attribute__ ((noinline)) void diff --git a/gcc/testsuite/gcc.dg/vect/vect-over-widen-4-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-over-widen-4-big-array.c new file mode 100644 index 00000000000..d296dc94486 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-over-widen-4-big-array.c @@ -0,0 +1,68 @@ +/* { dg-require-effective-target vect_int } */ +/* { dg-require-effective-target vect_shift } */ + +#include <stdlib.h> +#include <stdarg.h> +#include "tree-vect.h" + +#define N 512 + +/* Modified rgb to rgb conversion from FFmpeg. */ +__attribute__ ((noinline)) int +foo (unsigned char *src, unsigned char *dst) +{ + unsigned char *s = src; + unsigned short *d = (unsigned short *)dst, res; + int i, result = 0; + + for (i = 0; i < N/4; i++) + { + const int b = *s++; + const int g = *s++; + const int r = *s++; + const int a = *s++; + res = ((b>>3) | ((g&0xFC)<<3) | ((r&0xF8)<<8) | (a>>5)); + *d = res; + result += res; + d++; + } + + s = src; + d = (unsigned short *)dst; + for (i = 0; i < N/4; i++) + { + const int b = *s++; + const int g = *s++; + const int r = *s++; + const int a = *s++; + if (*d != ((b>>3) | ((g&0xFC)<<3) | ((r&0xF8)<<8) | (a>>5))) + abort (); + d++; + } + + return result; +} + +int main (void) +{ + int i; + unsigned char in[N], out[N]; + + check_vect (); + + for (i = 0; i < N; i++) + { + in[i] = i; + out[i] = 255; + __asm__ volatile (""); + } + + foo (in, out); + + return 0; +} + +/* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 4 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ + diff --git a/gcc/testsuite/gcc.dg/vect/vect-over-widen-4.c b/gcc/testsuite/gcc.dg/vect/vect-over-widen-4.c index d296dc94486..c1291e38f6d 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-over-widen-4.c +++ b/gcc/testsuite/gcc.dg/vect/vect-over-widen-4.c @@ -5,7 +5,7 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 512 +#define N 64 /* Modified rgb to rgb conversion from FFmpeg. */ __attribute__ ((noinline)) int diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-1char-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-1char-big-array.c new file mode 100644 index 00000000000..7462cb34cc5 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-1char-big-array.c @@ -0,0 +1,71 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 256 + +unsigned char ub[N]; +unsigned char uc[N]; +unsigned char diff; + +volatile int y = 0; + +__attribute__ ((noinline)) void +main1 (unsigned char x, unsigned char max_result, unsigned char min_result) +{ + int i; + unsigned char udiff = 2; + unsigned char umax = x; + unsigned char umin = x; + + diff = 2; + for (i = 0; i < N; i++) { + ub[i] = i; + uc[i] = i; + if (i%16 == 0) + { + ub[i] = i+2; + diff += 2; + } + if (uc[i] > max_result) + max_result = uc[i]; + if (uc[i] < min_result) + min_result = uc[i]; + + /* Avoid vectorization. */ + if (y) + abort (); + } + for (i = 0; i < N; i++) { + udiff += (unsigned char) (ub[i] - uc[i]); + } + + for (i = 0; i < N; i++) { + umax = umax < uc[i] ? uc[i] : umax; + } + + for (i = 0; i < N; i++) { + umin = umin > uc[i] ? uc[i] : umin; + } + + /* check results: */ + if (udiff != diff) + abort (); + if (umax != max_result) + abort (); + if (umin != min_result) + abort (); +} + +int main (void) +{ + check_vect (); + + main1 (100, 100, 1); + main1 (0, 15, 0); + return 0; +} + +/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_max } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-1char.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-1char.c index 7462cb34cc5..5a1c03d113f 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-1char.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-1char.c @@ -3,13 +3,11 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 256 +#define N 16 +#define DIFF 242 -unsigned char ub[N]; -unsigned char uc[N]; -unsigned char diff; - -volatile int y = 0; +unsigned char ub[N] = {1,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45}; +unsigned char uc[N] = {1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; __attribute__ ((noinline)) void main1 (unsigned char x, unsigned char max_result, unsigned char min_result) @@ -19,26 +17,8 @@ main1 (unsigned char x, unsigned char max_result, unsigned char min_result) unsigned char umax = x; unsigned char umin = x; - diff = 2; - for (i = 0; i < N; i++) { - ub[i] = i; - uc[i] = i; - if (i%16 == 0) - { - ub[i] = i+2; - diff += 2; - } - if (uc[i] > max_result) - max_result = uc[i]; - if (uc[i] < min_result) - min_result = uc[i]; - - /* Avoid vectorization. */ - if (y) - abort (); - } for (i = 0; i < N; i++) { - udiff += (unsigned char) (ub[i] - uc[i]); + udiff += (unsigned char)(ub[i] - uc[i]); } for (i = 0; i < N; i++) { @@ -50,7 +30,7 @@ main1 (unsigned char x, unsigned char max_result, unsigned char min_result) } /* check results: */ - if (udiff != diff) + if (udiff != DIFF) abort (); if (umax != max_result) abort (); @@ -59,9 +39,9 @@ main1 (unsigned char x, unsigned char max_result, unsigned char min_result) } int main (void) -{ +{ check_vect (); - + main1 (100, 100, 1); main1 (0, 15, 0); return 0; diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-2char-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-2char-big-array.c new file mode 100644 index 00000000000..7004e9e4e44 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-2char-big-array.c @@ -0,0 +1,69 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 256 +volatile int y = 0; + +__attribute__ ((noinline)) +void main1 (signed char x, signed char max_result, signed char min_result) +{ + int i; + signed char b[N]; + signed char c[N]; + signed char check_diff = 2; + signed char diff = 2; + signed char max = x; + signed char min = x; + + check_diff = 2; + for (i = 0; i < N; i++) { + b[i] = i; + c[i] = i; + if (i%16 == 0) + { + c[i] = i + 1; + check_diff += 1; + } + if (c[i] > max_result) + max_result = c[i]; + if (c[i] < min_result) + min_result = c[i]; + /* Avoid vectorization. */ + if (y) + abort (); + } + + for (i = 0; i < N; i++) { + diff += (signed char) (c[i] - b[i]); + } + + for (i = 0; i < N; i++) { + max = max < c[i] ? c[i] : max; + } + + for (i = 0; i < N; i++) { + min = min > c[i] ? c[i] : min; + } + + /* check results: */ + if (diff != check_diff) + abort (); + if (max != max_result) + abort (); + if (min != min_result) + abort (); +} + +int main (void) +{ + check_vect (); + + main1 (100, 100, 1); + main1 (0, 15, 0); + return 0; +} + +/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail *-*-* } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-2char.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-2char.c index 7004e9e4e44..6d01f03174a 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-2char.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-2char.c @@ -3,40 +3,21 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 256 -volatile int y = 0; +#define N 16 +#define DIFF 121 __attribute__ ((noinline)) void main1 (signed char x, signed char max_result, signed char min_result) { int i; - signed char b[N]; - signed char c[N]; - signed char check_diff = 2; + signed char b[N] = {1,2,3,6,8,10,12,14,16,18,20,22,24,26,28,30}; + signed char c[N] = {1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; signed char diff = 2; signed char max = x; signed char min = x; - check_diff = 2; for (i = 0; i < N; i++) { - b[i] = i; - c[i] = i; - if (i%16 == 0) - { - c[i] = i + 1; - check_diff += 1; - } - if (c[i] > max_result) - max_result = c[i]; - if (c[i] < min_result) - min_result = c[i]; - /* Avoid vectorization. */ - if (y) - abort (); - } - - for (i = 0; i < N; i++) { - diff += (signed char) (c[i] - b[i]); + diff += (signed char)(b[i] - c[i]); } for (i = 0; i < N; i++) { @@ -48,7 +29,7 @@ void main1 (signed char x, signed char max_result, signed char min_result) } /* check results: */ - if (diff != check_diff) + if (diff != DIFF) abort (); if (max != max_result) abort (); @@ -57,9 +38,9 @@ void main1 (signed char x, signed char max_result, signed char min_result) } int main (void) -{ +{ check_vect (); - + main1 (100, 100, 1); main1 (0, 15, 0); return 0; diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1b-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1b-big-array.c new file mode 100644 index 00000000000..1967e3da6b2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1b-big-array.c @@ -0,0 +1,49 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 128 +unsigned char udata_ch[N]; +#define SUM N*(N-1) + +volatile int y = 0; + +__attribute__ ((noinline)) int +foo () +{ + int i; + unsigned int intsum = 0; + + for (i = 0; i < N; i++) + { + udata_ch[i] = i*2; + /* Avoid vectorization. */ + if (y) + abort (); + } + + /* widenning sum: sum chars into int. */ + for (i = 0; i < N; i++) + { + intsum += udata_ch[i]; + } + + /* check results: */ + if (intsum != SUM) + abort (); + + return 0; +} + +int +main (void) +{ + check_vect (); + return foo (); +} + +/* { dg-final { scan-tree-dump-times "vect_recog_widen_sum_pattern: detected" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_widen_sum_qi_to_si || vect_unpack } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { { ! vect_widen_sum_qi_to_si } && { ! vect_unpack } } } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1b.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1b.c index 1967e3da6b2..6effa87ebb5 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1b.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1b.c @@ -3,11 +3,10 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 128 -unsigned char udata_ch[N]; -#define SUM N*(N-1) - -volatile int y = 0; +#define N 16 +unsigned char udata_ch[N] = + { 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28 }; +#define SUM 210 __attribute__ ((noinline)) int foo () @@ -15,14 +14,6 @@ foo () int i; unsigned int intsum = 0; - for (i = 0; i < N; i++) - { - udata_ch[i] = i*2; - /* Avoid vectorization. */ - if (y) - abort (); - } - /* widenning sum: sum chars into int. */ for (i = 0; i < N; i++) { diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1c-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1c-big-array.c new file mode 100644 index 00000000000..5394adee00e --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1c-big-array.c @@ -0,0 +1,49 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 128 +unsigned char udata_ch[N]; +#define SUM N*(N-1) + +volatile int y = 0; + +__attribute__ ((noinline)) int +foo () +{ + int i; + unsigned short shortsum = 0; + + for (i = 0; i < N; i++) + { + udata_ch[i] = i*2; + /* Avoid vectorization. */ + if (y) + abort (); + } + + /* widenning sum: sum chars into short. */ + for (i = 0; i < N; i++) + { + shortsum += udata_ch[i]; + } + + /* check results: */ + if (shortsum != SUM) + abort (); + + return 0; +} + +int +main (void) +{ + check_vect (); + return foo (); +} + +/* { dg-final { scan-tree-dump-times "vect_recog_widen_sum_pattern: detected" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_widen_sum_qi_to_hi } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { ! vect_widen_sum_qi_to_hi } } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1c.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1c.c index 5394adee00e..872e6e82e5b 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1c.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1c.c @@ -3,11 +3,10 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 128 -unsigned char udata_ch[N]; -#define SUM N*(N-1) - -volatile int y = 0; +#define N 16 +unsigned char udata_ch[N] = + { 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28 }; +#define SUM 210 __attribute__ ((noinline)) int foo () @@ -15,14 +14,6 @@ foo () int i; unsigned short shortsum = 0; - for (i = 0; i < N; i++) - { - udata_ch[i] = i*2; - /* Avoid vectorization. */ - if (y) - abort (); - } - /* widenning sum: sum chars into short. */ for (i = 0; i < N; i++) { diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-2b-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-2b-big-array.c new file mode 100644 index 00000000000..fa0100b9a9d --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-2b-big-array.c @@ -0,0 +1,50 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 128 +signed char data_ch[N]; + +volatile int y = 0; + +__attribute__ ((noinline)) int +foo () +{ + int i; + signed int intsum = 0; + signed int check_intsum = 0; + + for (i = 0; i < N; i++) + { + data_ch[i] = i*2; + check_intsum += data_ch[i]; + /* Avoid vectorization. */ + if (y) + abort (); + } + + /* widenning sum: sum chars into int. */ + for (i = 0; i < N; i++) + { + intsum += data_ch[i]; + } + + /* check results: */ + if (intsum != check_intsum) + abort (); + + return 0; +} + +int +main (void) +{ + check_vect (); + return foo (); +} + +/* { dg-final { scan-tree-dump-times "vect_recog_widen_sum_pattern: detected" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_widen_sum_qi_to_si && vect_unpack } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { { ! vect_widen_sum_qi_to_si } && { ! vect_unpack } } } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-2b.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-2b.c index fa0100b9a9d..53d5f0d5cce 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-2b.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-2b.c @@ -3,26 +3,16 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 128 -signed char data_ch[N]; - -volatile int y = 0; +#define N 16 +signed char data_ch[N] = + { 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28 }; +#define SUM 210 __attribute__ ((noinline)) int foo () { int i; signed int intsum = 0; - signed int check_intsum = 0; - - for (i = 0; i < N; i++) - { - data_ch[i] = i*2; - check_intsum += data_ch[i]; - /* Avoid vectorization. */ - if (y) - abort (); - } /* widenning sum: sum chars into int. */ for (i = 0; i < N; i++) @@ -31,7 +21,7 @@ foo () } /* check results: */ - if (intsum != check_intsum) + if (intsum != SUM) abort (); return 0; diff --git a/gcc/testsuite/gcc.dg/vect/vect-shift-2-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-shift-2-big-array.c new file mode 100644 index 00000000000..0e1acfb7beb --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-shift-2-big-array.c @@ -0,0 +1,190 @@ +/* { dg-require-effective-target vect_shift } */ +/* { dg-require-effective-target vect_int } */ +/* Check the standard integer types for left and right shifts to see if the + compiler replaced a scalar instruction with a vector instruction whether the + correct value is generated. */ + +#ifdef TRACE +#endif + +#include <stdarg.h> +#include "tree-vect.h" + +#ifndef ALIGN +#define ALIGN __attribute__((__aligned__(__BIGGEST_ALIGNMENT__))) +#endif + +#ifndef NOINLINE +#define NOINLINE __attribute__((__noinline__)) +#endif + +#ifdef TRACE +#define TRACE_FUNC(PREFIX, NAME) printf (#PREFIX #NAME "\n") +#define TRACE_DONE() printf ("done!\n") +#define TRACE_ABORT(I,E,G) \ +do { \ + printf ("Element %d, expected 0x%lx, got 0x%lx\n", \ + I, (long)(E), (long)(G)); \ + abort (); \ +} while (0) + +#else +#define TRACE_FUNC(PREFIX, A) +#define TRACE_DONE() +#define TRACE_ABORT(I,E,G) abort () +#endif + +#define NAME(A,B) A ## B + +#define VECT_TESTS(PREFIX, TYPE, N) \ + /* Restrict the optimizer from optimizing the setup loops. */ \ +volatile TYPE NAME (PREFIX, zero) = 0; \ + \ +TYPE NAME (PREFIX, a)[N] ALIGN; \ +TYPE NAME (PREFIX, b)[N] ALIGN; \ +TYPE NAME (PREFIX, c)[N] ALIGN; \ +TYPE NAME (PREFIX, d)[N] ALIGN; \ + \ +static void NOINLINE \ +NAME (PREFIX, lshift_2) (void) \ +{ \ + int i; \ + \ + TRACE_FUNC (PREFIX, lshift_2); \ + for (i = 0; i < N; i++) \ + NAME (PREFIX, a)[i] = NAME (PREFIX, b)[i] << 2; \ +} \ + \ +static void NOINLINE \ +NAME (PREFIX, lshift_var) (int shift) \ +{ \ + int i; \ + \ + TRACE_FUNC (PREFIX, lshift_var); \ + for (i = 0; i < N; i++) \ + NAME (PREFIX, a)[i] = NAME (PREFIX, b)[i] << shift; \ +} \ + \ +static void NOINLINE \ +NAME (PREFIX, lshift_vect) (void) \ +{ \ + int i; \ + \ + TRACE_FUNC (PREFIX, lshift_vect); \ + for (i = 0; i < N; i++) \ + NAME (PREFIX, a)[i] = NAME (PREFIX, b)[i] << NAME (PREFIX, c)[i]; \ +} \ + \ +static void NOINLINE \ +NAME (PREFIX, rshift_2) (void) \ +{ \ + int i; \ + \ + TRACE_FUNC (PREFIX, rshift_2); \ + for (i = 0; i < N; i++) \ + NAME (PREFIX, a)[i] = NAME (PREFIX, b)[i] >> 2; \ +} \ + \ +static void NOINLINE \ +NAME (PREFIX, rshift_var) (int shift) \ +{ \ + int i; \ + \ + TRACE_FUNC (PREFIX, rshift_var); \ + for (i = 0; i < N; i++) \ + NAME (PREFIX, a)[i] = NAME (PREFIX, b)[i] >> shift; \ +} \ + \ +static void NOINLINE \ +NAME (PREFIX, rshift_vect) (void) \ +{ \ + int i; \ + \ + TRACE_FUNC (PREFIX, rshift_vect); \ + for (i = 0; i < N; i++) \ + NAME (PREFIX, a)[i] = NAME (PREFIX, b)[i] >> NAME (PREFIX, c)[i]; \ +} \ + \ +static void NOINLINE \ +NAME (PREFIX, check) (void) \ +{ \ + int i; \ + \ + TRACE_FUNC (PREFIX, check); \ + for (i = 0; i < N; i++) \ + if (NAME (PREFIX, a)[i] != NAME (PREFIX, d)[i]) \ + TRACE_ABORT (i, NAME (PREFIX, d)[i], NAME (PREFIX, a)[i]); \ +} \ + \ +static void NOINLINE \ +NAME (PREFIX, tests) (void) \ +{ \ + int i; \ + \ + TRACE_FUNC (PREFIX, tests); \ + for (i = 0; i < N; i++) \ + { \ + NAME (PREFIX, b)[i] = (i + NAME (PREFIX, zero)); \ + NAME (PREFIX, c)[i] = 2; \ + NAME (PREFIX, d)[i] = (i + NAME (PREFIX, zero)) << 2; \ + } \ + \ + NAME (PREFIX, lshift_2) (); \ + NAME (PREFIX, check) (); \ + \ + NAME (PREFIX, lshift_var) (2); \ + NAME (PREFIX, check) (); \ + \ + NAME (PREFIX, lshift_vect) (); \ + NAME (PREFIX, check) (); \ + \ + for (i = 0; i < N; i++) \ + { \ + NAME (PREFIX, b)[i] = ((i + NAME (PREFIX, zero)) << 4) \ + | (((TYPE)0x80) << ((sizeof (TYPE) * 8) - 8)); \ + NAME (PREFIX, c)[i] = 2; \ + NAME (PREFIX, d)[i] = (TYPE)((NAME (PREFIX, b)[i] \ + + NAME (PREFIX, zero)) >> 2); \ + } \ + \ + NAME (PREFIX, rshift_2) (); \ + NAME (PREFIX, check) (); \ + \ + NAME (PREFIX, rshift_var) (2); \ + NAME (PREFIX, check) (); \ + \ + NAME (PREFIX, rshift_vect) (); \ + NAME (PREFIX, check) (); \ +} + +VECT_TESTS (uc_, unsigned char, 128) +VECT_TESTS (us_, unsigned short, 256) +VECT_TESTS (ui_, unsigned int, 256) +VECT_TESTS (ul_, unsigned long, 256) + +VECT_TESTS (sc_, signed char, 128) +VECT_TESTS (ss_, short, 256) +VECT_TESTS (si_, int, 256) +VECT_TESTS (sl_, long, 256) + +int main () +{ + int i; + + check_vect (); + + uc_tests (); + us_tests (); + ui_tests (); + ul_tests (); + + sc_tests (); + ss_tests (); + si_tests (); + sl_tests (); + + TRACE_DONE (); + return 0; +} + +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-shift-2.c b/gcc/testsuite/gcc.dg/vect/vect-shift-2.c index 0e1acfb7beb..83211eba49f 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-shift-2.c +++ b/gcc/testsuite/gcc.dg/vect/vect-shift-2.c @@ -157,15 +157,15 @@ NAME (PREFIX, tests) (void) \ NAME (PREFIX, check) (); \ } -VECT_TESTS (uc_, unsigned char, 128) -VECT_TESTS (us_, unsigned short, 256) -VECT_TESTS (ui_, unsigned int, 256) -VECT_TESTS (ul_, unsigned long, 256) - -VECT_TESTS (sc_, signed char, 128) -VECT_TESTS (ss_, short, 256) -VECT_TESTS (si_, int, 256) -VECT_TESTS (sl_, long, 256) +VECT_TESTS(uc_, unsigned char, 16) +VECT_TESTS(us_, unsigned short, 32) +VECT_TESTS(ui_, unsigned int, 32) +VECT_TESTS(ul_, unsigned long, 32) + +VECT_TESTS(sc_, signed char, 16) +VECT_TESTS(ss_, short, 32) +VECT_TESTS(si_, int, 32) +VECT_TESTS(sl_, long, 32) int main () { diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap2-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap2-big-array.c new file mode 100644 index 00000000000..6e3c9f1b9ae --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap2-big-array.c @@ -0,0 +1,92 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 128 + +typedef struct { + unsigned char a; + unsigned char b; + unsigned char c; + unsigned char d; + unsigned char e; + unsigned char f; + unsigned char g; + unsigned char h; +} s; + +__attribute__ ((noinline)) int +main1 () +{ + int i; + s arr[N]; + s *ptr = arr; + s check_res[N]; + s res[N]; + + for (i = 0; i < N; i++) + { + arr[i].a = i; + arr[i].b = i * 2; + arr[i].c = 17; + arr[i].d = i+34; + arr[i].e = i + 5; + arr[i].f = i * 2 + 2; + arr[i].g = i - 3; + arr[i].h = 56; + + check_res[i].c = arr[i].a; + check_res[i].a = arr[i].f + arr[i].a; + check_res[i].d = arr[i].f - arr[i].a; + check_res[i].b = arr[i].f; + check_res[i].f = arr[i].a; + check_res[i].e = arr[i].f - arr[i].a; + check_res[i].h = arr[i].f; + check_res[i].g = arr[i].f - arr[i].a; + + if (arr[i].a == 178) + abort (); + } + + for (i = 0; i < N; i++) + { + res[i].c = ptr->a; + res[i].a = ptr->f + ptr->a; + res[i].d = ptr->f - ptr->a; + res[i].b = ptr->f; + res[i].f = ptr->a; + res[i].e = ptr->f - ptr->a; + res[i].h = ptr->f; + res[i].g = ptr->f - ptr->a; + ptr++; + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (res[i].a != check_res[i].a + || res[i].b != check_res[i].b + || res[i].c != check_res[i].c + || res[i].d != check_res[i].d + || res[i].e != check_res[i].e + || res[i].f != check_res[i].f + || res[i].g != check_res[i].g + || res[i].h != check_res[i].h) + abort (); + } +} + + +int main (void) +{ + check_vect (); + + main1 (); + + return 0; +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_strided8 } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ + diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap2.c b/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap2.c index f20d158db70..4fb5494a4d3 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap2.c +++ b/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap2.c @@ -3,7 +3,7 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 128 +#define N 16 typedef struct { unsigned char a; @@ -22,7 +22,6 @@ main1 () int i; s arr[N]; s *ptr = arr; - s check_res[N]; s res[N]; for (i = 0; i < N; i++) @@ -35,16 +34,6 @@ main1 () arr[i].f = i * 2 + 2; arr[i].g = i - 3; arr[i].h = 56; - - check_res[i].c = arr[i].a; - check_res[i].a = arr[i].f + arr[i].a; - check_res[i].d = arr[i].f - arr[i].a; - check_res[i].b = arr[i].f; - check_res[i].f = arr[i].a; - check_res[i].e = arr[i].f - arr[i].a; - check_res[i].h = arr[i].f; - check_res[i].g = arr[i].f - arr[i].a; - if (arr[i].a == 178) abort(); } @@ -56,23 +45,23 @@ main1 () res[i].d = ptr->f - ptr->a; res[i].b = ptr->f; res[i].f = ptr->a; - res[i].e = ptr->f - ptr->a; - res[i].h = ptr->f; + res[i].e = ptr->f - ptr->a; + res[i].h = ptr->f; res[i].g = ptr->f - ptr->a; - ptr++; - } - + ptr++; + } + /* check results: */ for (i = 0; i < N; i++) - { - if (res[i].a != check_res[i].a - || res[i].b != check_res[i].b - || res[i].c != check_res[i].c - || res[i].d != check_res[i].d - || res[i].e != check_res[i].e - || res[i].f != check_res[i].f - || res[i].g != check_res[i].g - || res[i].h != check_res[i].h) + { + if (res[i].c != arr[i].a + || res[i].a != arr[i].f + arr[i].a + || res[i].d != arr[i].f - arr[i].a + || res[i].b != arr[i].f + || res[i].f != arr[i].a + || res[i].e != arr[i].f - arr[i].a + || res[i].h != arr[i].f + || res[i].g != arr[i].f - arr[i].a) abort(); } } @@ -89,4 +78,4 @@ int main (void) /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_strided8 } } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ - + diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap7-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap7-big-array.c new file mode 100644 index 00000000000..5a446317ca3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap7-big-array.c @@ -0,0 +1,101 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 128 + +typedef struct { + unsigned char a; + unsigned char b; + unsigned char c; + unsigned char d; + unsigned char e; + unsigned char f; + unsigned char g; + unsigned char h; +} s; + +__attribute__ ((noinline)) int +main1 () +{ + int i; + s arr[N]; + s *ptr = arr; + s check_res[N]; + s res[N]; + unsigned char u, t, s, x, y, z, w; + + for (i = 0; i < N; i++) + { + arr[i].a = i; + arr[i].b = i * 2; + arr[i].c = 17; + arr[i].d = i+34; + arr[i].e = i * 3 + 5; + arr[i].f = i * 5; + arr[i].g = i - 3; + arr[i].h = 67; + + u = arr[i].b - arr[i].a; + t = arr[i].d - arr[i].c; + check_res[i].c = u + t; + x = arr[i].b + arr[i].d; + check_res[i].a = arr[i].a + x; + check_res[i].d = u + t; + s = arr[i].h - arr[i].a; + check_res[i].b = s + t; + check_res[i].f = arr[i].f + arr[i].h; + check_res[i].e = arr[i].b + arr[i].e; + check_res[i].h = arr[i].d; + check_res[i].g = u + t; + + if (arr[i].a == 178) + abort (); + } + + for (i = 0; i < N; i++) + { + u = ptr->b - ptr->a; + t = ptr->d - ptr->c; + res[i].c = u + t; + x = ptr->b + ptr->d; + res[i].a = ptr->a + x; + res[i].d = u + t; + s = ptr->h - ptr->a; + res[i].b = s + t; + res[i].f = ptr->f + ptr->h; + res[i].e = ptr->b + ptr->e; + res[i].h = ptr->d; + res[i].g = u + t; + ptr++; + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (res[i].a != check_res[i].a + || res[i].b != check_res[i].b + || res[i].c != check_res[i].c + || res[i].d != check_res[i].d + || res[i].e != check_res[i].e + || res[i].f != check_res[i].f + || res[i].g != check_res[i].g + || res[i].h != check_res[i].h) + abort (); + } +} + + +int main (void) +{ + check_vect (); + + main1 (); + + return 0; +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_strided8 } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ + diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap7.c b/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap7.c index 28a9c58cd65..cc09fa608dc 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap7.c +++ b/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap7.c @@ -3,7 +3,7 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 128 +#define N 16 typedef struct { unsigned char a; @@ -22,7 +22,6 @@ main1 () int i; s arr[N]; s *ptr = arr; - s check_res[N]; s res[N]; unsigned char u, t, s, x, y, z, w; @@ -36,20 +35,6 @@ main1 () arr[i].f = i * 5; arr[i].g = i - 3; arr[i].h = 67; - - u = arr[i].b - arr[i].a; - t = arr[i].d - arr[i].c; - check_res[i].c = u + t; - x = arr[i].b + arr[i].d; - check_res[i].a = arr[i].a + x; - check_res[i].d = u + t; - s = arr[i].h - arr[i].a; - check_res[i].b = s + t; - check_res[i].f = arr[i].f + arr[i].h; - check_res[i].e = arr[i].b + arr[i].e; - check_res[i].h = arr[i].d; - check_res[i].g = u + t; - if (arr[i].a == 178) abort(); } @@ -74,14 +59,14 @@ main1 () /* check results: */ for (i = 0; i < N; i++) { - if (res[i].a != check_res[i].a - || res[i].b != check_res[i].b - || res[i].c != check_res[i].c - || res[i].d != check_res[i].d - || res[i].e != check_res[i].e - || res[i].f != check_res[i].f - || res[i].g != check_res[i].g - || res[i].h != check_res[i].h) + if (res[i].c != arr[i].b - arr[i].a + arr[i].d - arr[i].c + || res[i].a != arr[i].a + arr[i].b + arr[i].d + || res[i].d != arr[i].b - arr[i].a + arr[i].d - arr[i].c + || res[i].b != arr[i].h - arr[i].a + arr[i].d - arr[i].c + || res[i].f != arr[i].f + arr[i].h + || res[i].e != arr[i].b + arr[i].e + || res[i].h != arr[i].d + || res[i].g != arr[i].b - arr[i].a + arr[i].d - arr[i].c) abort(); } } diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap2-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap2-big-array.c new file mode 100644 index 00000000000..cc1b9498914 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap2-big-array.c @@ -0,0 +1,94 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 128 + +typedef struct { + unsigned char a; + unsigned char b; + unsigned char c; + unsigned char d; + unsigned char e; + unsigned char f; + unsigned char g; + unsigned char h; +} s; + +s check_res[N]; + +__attribute__ ((noinline)) int +main1 (s *arr) +{ + int i; + s *ptr = arr; + s res[N]; + + for (i = 0; i < N; i++) + { + res[i].c = ptr->b; + res[i].a = ptr->f + ptr->b; + res[i].d = ptr->f - ptr->b; + res[i].b = ptr->f; + res[i].f = ptr->b; + res[i].e = ptr->f - ptr->b; + res[i].h = ptr->f; + res[i].g = ptr->f - ptr->b; + ptr++; + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (res[i].a != check_res[i].a + || res[i].b != check_res[i].b + || res[i].c != check_res[i].c + || res[i].d != check_res[i].d + || res[i].e != check_res[i].e + || res[i].f != check_res[i].f + || res[i].g != check_res[i].g + || res[i].h != check_res[i].h) + abort (); + } +} + + +int main (void) +{ + int i; + s arr[N]; + + check_vect (); + + for (i = 0; i < N; i++) + { + arr[i].a = i; + arr[i].b = i * 2; + arr[i].c = 17; + arr[i].d = i+34; + arr[i].e = i + 5; + arr[i].f = i * 2 + 2; + arr[i].g = i - 3; + arr[i].h = 56; + + check_res[i].c = arr[i].b; + check_res[i].a = arr[i].f + arr[i].b; + check_res[i].d = arr[i].f - arr[i].b; + check_res[i].b = arr[i].f; + check_res[i].f = arr[i].b; + check_res[i].e = arr[i].f - arr[i].b; + check_res[i].h = arr[i].f; + check_res[i].g = arr[i].f - arr[i].b; + if (arr[i].a == 178) + abort (); + } + + main1 (arr); + + return 0; +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_strided8 } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ + diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap2.c b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap2.c index cc1b9498914..349e8693926 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap2.c +++ b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap2.c @@ -3,7 +3,7 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 128 +#define N 16 typedef struct { unsigned char a; @@ -16,8 +16,6 @@ typedef struct { unsigned char h; } s; -s check_res[N]; - __attribute__ ((noinline)) int main1 (s *arr) { @@ -32,24 +30,24 @@ main1 (s *arr) res[i].d = ptr->f - ptr->b; res[i].b = ptr->f; res[i].f = ptr->b; - res[i].e = ptr->f - ptr->b; - res[i].h = ptr->f; + res[i].e = ptr->f - ptr->b; + res[i].h = ptr->f; res[i].g = ptr->f - ptr->b; - ptr++; - } - + ptr++; + } + /* check results: */ for (i = 0; i < N; i++) - { - if (res[i].a != check_res[i].a - || res[i].b != check_res[i].b - || res[i].c != check_res[i].c - || res[i].d != check_res[i].d - || res[i].e != check_res[i].e - || res[i].f != check_res[i].f - || res[i].g != check_res[i].g - || res[i].h != check_res[i].h) - abort (); + { + if (res[i].c != arr[i].b + || res[i].a != arr[i].f + arr[i].b + || res[i].d != arr[i].f - arr[i].b + || res[i].b != arr[i].f + || res[i].f != arr[i].b + || res[i].e != arr[i].f - arr[i].b + || res[i].h != arr[i].f + || res[i].g != arr[i].f - arr[i].b) + abort(); } } @@ -58,11 +56,11 @@ int main (void) { int i; s arr[N]; - + check_vect (); for (i = 0; i < N; i++) - { + { arr[i].a = i; arr[i].b = i * 2; arr[i].c = 17; @@ -71,18 +69,9 @@ int main (void) arr[i].f = i * 2 + 2; arr[i].g = i - 3; arr[i].h = 56; - - check_res[i].c = arr[i].b; - check_res[i].a = arr[i].f + arr[i].b; - check_res[i].d = arr[i].f - arr[i].b; - check_res[i].b = arr[i].f; - check_res[i].f = arr[i].b; - check_res[i].e = arr[i].f - arr[i].b; - check_res[i].h = arr[i].f; - check_res[i].g = arr[i].f - arr[i].b; if (arr[i].a == 178) - abort (); - } + abort(); + } main1 (arr); @@ -91,4 +80,4 @@ int main (void) /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_strided8 } } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ - + diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4-big-array.c new file mode 100644 index 00000000000..916fdf4d4fa --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4-big-array.c @@ -0,0 +1,116 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 128 + +typedef struct { + unsigned char a; + unsigned char b; + unsigned char c; + unsigned char d; + unsigned char e; + unsigned char f; + unsigned char g; + unsigned char h; +} s; + +s check_res[N]; + +__attribute__ ((noinline)) int +main1 (s *arr) +{ + int i; + s *ptr = arr; + s res[N]; + unsigned char x; + + for (i = 0; i < N; i++) + { + res[i].c = ptr->b + ptr->c; + x = ptr->c + ptr->f; + res[i].a = x + ptr->b; + res[i].d = ptr->b + ptr->c; + res[i].b = ptr->c; + res[i].f = ptr->f + ptr->e; + res[i].e = ptr->b + ptr->e; + res[i].h = ptr->c; + res[i].g = ptr->b + ptr->c; + ptr++; + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (res[i].a != check_res[i].a + || res[i].b != check_res[i].b + || res[i].c != check_res[i].c + || res[i].d != check_res[i].d + || res[i].e != check_res[i].e + || res[i].f != check_res[i].f + || res[i].g != check_res[i].g + || res[i].h != check_res[i].h) + abort (); + } + + ptr = arr; + /* Not vectorizable: gap in store. */ + for (i = 0; i < N; i++) + { + res[i].a = ptr->b; + res[i].b = ptr->c; + ptr++; + } + + /* Check results. */ + for (i = 0; i < N; i++) + { + if (res[i].a != arr[i].b + || res[i].b != arr[i].c) + abort (); + } + +} + + +int main (void) +{ + int i; + s arr[N]; + unsigned char x; + + check_vect (); + + for (i = 0; i < N; i++) + { + arr[i].a = i; + arr[i].b = i * 2; + arr[i].c = 17; + arr[i].d = i+34; + arr[i].e = i * 3 + 5; + arr[i].f = i * 5; + arr[i].g = i - 3; + arr[i].h = 56; + + check_res[i].c = arr[i].b + arr[i].c; + x = arr[i].c + arr[i].f; + check_res[i].a = x + arr[i].b; + check_res[i].d = arr[i].b + arr[i].c; + check_res[i].b = arr[i].c; + check_res[i].f = arr[i].f + arr[i].e; + check_res[i].e = arr[i].b + arr[i].e; + check_res[i].h = arr[i].c; + check_res[i].g = arr[i].b + arr[i].c; + + if (arr[i].a == 178) + abort (); + } + main1 (arr); + + return 0; +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_strided8 } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ + diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4.c b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4.c index 92255d42707..537bcc87dfb 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4.c +++ b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4.c @@ -3,7 +3,7 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 128 +#define N 16 typedef struct { unsigned char a; @@ -16,8 +16,6 @@ typedef struct { unsigned char h; } s; -s check_res[N]; - __attribute__ ((noinline)) int main1 (s *arr) { @@ -34,39 +32,39 @@ main1 (s *arr) res[i].d = ptr->b + ptr->c; res[i].b = ptr->c; res[i].f = ptr->f + ptr->e; - res[i].e = ptr->b + ptr->e; - res[i].h = ptr->c; + res[i].e = ptr->b + ptr->e; + res[i].h = ptr->c; res[i].g = ptr->b + ptr->c; - ptr++; - } - + ptr++; + } + /* check results: */ for (i = 0; i < N; i++) - { - if (res[i].a != check_res[i].a - || res[i].b != check_res[i].b - || res[i].c != check_res[i].c - || res[i].d != check_res[i].d - || res[i].e != check_res[i].e - || res[i].f != check_res[i].f - || res[i].g != check_res[i].g - || res[i].h != check_res[i].h) + { + if (res[i].c != arr[i].b + arr[i].c + || res[i].a != arr[i].c + arr[i].f + arr[i].b + || res[i].d != arr[i].b + arr[i].c + || res[i].b != arr[i].c + || res[i].f != arr[i].f + arr[i].e + || res[i].e != arr[i].b + arr[i].e + || res[i].h != arr[i].c + || res[i].g != arr[i].b + arr[i].c) abort (); } ptr = arr; /* Not vectorizable: gap in store. */ for (i = 0; i < N; i++) - { + { res[i].a = ptr->b; res[i].b = ptr->c; - ptr++; + ptr++; } - + /* Check results. */ for (i = 0; i < N; i++) { - if (res[i].a != arr[i].b + if (res[i].a != arr[i].b || res[i].b != arr[i].c) abort (); } @@ -78,12 +76,11 @@ int main (void) { int i; s arr[N]; - unsigned char x; - + check_vect (); for (i = 0; i < N; i++) - { + { arr[i].a = i; arr[i].b = i * 2; arr[i].c = 17; @@ -92,20 +89,10 @@ int main (void) arr[i].f = i * 5; arr[i].g = i - 3; arr[i].h = 56; - - check_res[i].c = arr[i].b + arr[i].c; - x = arr[i].c + arr[i].f; - check_res[i].a = x + arr[i].b; - check_res[i].d = arr[i].b + arr[i].c; - check_res[i].b = arr[i].c; - check_res[i].f = arr[i].f + arr[i].e; - check_res[i].e = arr[i].b + arr[i].e; - check_res[i].h = arr[i].c; - check_res[i].g = arr[i].b + arr[i].c; - if (arr[i].a == 178) - abort (); - } + abort(); + } + main1 (arr); return 0; @@ -113,4 +100,4 @@ int main (void) /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_strided8 } } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ - + diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap7-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap7-big-array.c new file mode 100644 index 00000000000..ecacefab9a5 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap7-big-array.c @@ -0,0 +1,105 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 128 + +typedef struct { + unsigned char a; + unsigned char b; + unsigned char c; + unsigned char d; + unsigned char e; + unsigned char f; + unsigned char g; + unsigned char h; +} s; + +s check_res[N]; + +__attribute__ ((noinline)) int +main1 (s *arr) +{ + int i; + s *ptr = arr; + s res[N]; + unsigned char u, t, s, x, y, z, w; + + for (i = 0; i < N; i++) + { + u = ptr->b - ptr->a; + t = ptr->d - ptr->c; + res[i].c = u + t; + x = ptr->b + ptr->d; + res[i].a = ptr->a + x; + res[i].d = u + t; + s = ptr->h - ptr->a; + res[i].b = s + t; + res[i].f = ptr->f + ptr->h; + res[i].e = ptr->b + ptr->e; + res[i].h = ptr->d; + res[i].g = u + t; + ptr++; + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (res[i].a != check_res[i].a + || res[i].b != check_res[i].b + || res[i].c != check_res[i].c + || res[i].d != check_res[i].d + || res[i].e != check_res[i].e + || res[i].f != check_res[i].f + || res[i].g != check_res[i].g + || res[i].h != check_res[i].h) + abort (); + } +} + + +int main (void) +{ + int i; + s arr[N]; + unsigned char u, t, s, x, y, z, w; + + check_vect (); + + for (i = 0; i < N; i++) + { + arr[i].a = i; + arr[i].b = i * 2; + arr[i].c = 17; + arr[i].d = i+34; + arr[i].e = i * 3 + 5; + arr[i].f = i * 5; + arr[i].g = i - 3; + arr[i].h = 67; + + u = arr[i].b - arr[i].a; + t = arr[i].d - arr[i].c; + check_res[i].c = u + t; + x = arr[i].b + arr[i].d; + check_res[i].a = arr[i].a + x; + check_res[i].d = u + t; + s = arr[i].h - arr[i].a; + check_res[i].b = s + t; + check_res[i].f = arr[i].f + arr[i].h; + check_res[i].e = arr[i].b + arr[i].e; + check_res[i].h = arr[i].d; + check_res[i].g = u + t; + + if (arr[i].a == 178) + abort (); + } + + main1 (arr); + + return 0; +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_strided8 } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ + diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap7.c b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap7.c index 0e3c0528dc9..76cb66d0861 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap7.c +++ b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap7.c @@ -3,7 +3,7 @@ #include <stdarg.h> #include "tree-vect.h" -#define N 128 +#define N 16 typedef struct { unsigned char a; @@ -16,8 +16,6 @@ typedef struct { unsigned char h; } s; -s check_res[N]; - __attribute__ ((noinline)) int main1 (s *arr) { @@ -46,14 +44,14 @@ main1 (s *arr) /* check results: */ for (i = 0; i < N; i++) { - if (res[i].a != check_res[i].a - || res[i].b != check_res[i].b - || res[i].c != check_res[i].c - || res[i].d != check_res[i].d - || res[i].e != check_res[i].e - || res[i].f != check_res[i].f - || res[i].g != check_res[i].g - || res[i].h != check_res[i].h) + if (res[i].c != arr[i].b - arr[i].a + arr[i].d - arr[i].c + || res[i].a != arr[i].a + arr[i].b + arr[i].d + || res[i].d != arr[i].b - arr[i].a + arr[i].d - arr[i].c + || res[i].b != arr[i].h - arr[i].a + arr[i].d - arr[i].c + || res[i].f != arr[i].f + arr[i].h + || res[i].e != arr[i].b + arr[i].e + || res[i].h != arr[i].d + || res[i].g != arr[i].b - arr[i].a + arr[i].d - arr[i].c) abort(); } } @@ -63,7 +61,6 @@ int main (void) { int i; s arr[N]; - unsigned char u, t, s, x, y, z, w; check_vect (); @@ -77,20 +74,6 @@ int main (void) arr[i].f = i * 5; arr[i].g = i - 3; arr[i].h = 67; - - u = arr[i].b - arr[i].a; - t = arr[i].d - arr[i].c; - check_res[i].c = u + t; - x = arr[i].b + arr[i].d; - check_res[i].a = arr[i].a + x; - check_res[i].d = u + t; - s = arr[i].h - arr[i].a; - check_res[i].b = s + t; - check_res[i].f = arr[i].f + arr[i].h; - check_res[i].e = arr[i].b + arr[i].e; - check_res[i].h = arr[i].d; - check_res[i].g = u + t; - if (arr[i].a == 178) abort(); } diff --git a/gcc/testsuite/gcc.dg/volatile3.c b/gcc/testsuite/gcc.dg/volatile3.c new file mode 100644 index 00000000000..4a5893d97cb --- /dev/null +++ b/gcc/testsuite/gcc.dg/volatile3.c @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-options "-fdump-tree-ssa" } */ + +volatile int *q; +void foo(int i) +{ + volatile int a[2]; + volatile int *p = &a[i]; + q = p; +} + +/* { dg-final { scan-tree-dump-not "{v}" "ssa" } } */ +/* { dg-final { cleanup-tree-dump "ssa" } } */ diff --git a/gcc/testsuite/gcc.target/epiphany/interrupt.c b/gcc/testsuite/gcc.target/epiphany/interrupt.c index a44c79e432e..86fb255613b 100644 --- a/gcc/testsuite/gcc.target/epiphany/interrupt.c +++ b/gcc/testsuite/gcc.target/epiphany/interrupt.c @@ -1,5 +1,7 @@ +/* { dg-options "-g" } */ + void __attribute__((interrupt("dma0"))) -f (void) +dma0_handler (void) { } @@ -12,3 +14,5 @@ void __attribute__((interrupt(42))) h (void) { /* { dg-warning "is not a string constant" } */ } + +/* { dg-final { scan-assembler-times "b\[ \t\]*_dma0_handler" 1 } } */ diff --git a/gcc/testsuite/gcc.target/i386/movdi-rex64.c b/gcc/testsuite/gcc.target/i386/movdi-rex64.c new file mode 100644 index 00000000000..f8b8388106d --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/movdi-rex64.c @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-options "-fPIE" } */ +/* { dg-require-effective-target pie } */ + +char *strcpy (char *dest, const char *src); + +static __thread char buffer[25]; +const char * error_message (void) +{ + strcpy (buffer, "Unknown code "); + return 0; +} diff --git a/gcc/testsuite/gcc.target/mips/branch-1.c b/gcc/testsuite/gcc.target/mips/branch-1.c index 62d6bbb619a..2f4510f8dd6 100644 --- a/gcc/testsuite/gcc.target/mips/branch-1.c +++ b/gcc/testsuite/gcc.target/mips/branch-1.c @@ -2,7 +2,7 @@ but we test for "bbit" elsewhere. On other targets, we should implement the "if" statements using an "andi" instruction followed by a branch on zero. */ -/* { dg-options "-O2 forbid_cpu=octeon" } */ +/* { dg-options "-O2 forbid_cpu=octeon.*" } */ void bar (void); NOMIPS16 void f1 (int x) { if (x & 4) bar (); } diff --git a/gcc/testsuite/gcc.target/mips/dmult-1.c b/gcc/testsuite/gcc.target/mips/dmult-1.c index 517e43ed54b..f8c0b8b44f1 100644 --- a/gcc/testsuite/gcc.target/mips/dmult-1.c +++ b/gcc/testsuite/gcc.target/mips/dmult-1.c @@ -1,4 +1,4 @@ -/* { dg-options "forbid_cpu=octeon -mgp64" } */ +/* { dg-options "forbid_cpu=octeon.* -mgp64" } */ /* { dg-final { scan-assembler "\tdmult\t" } } */ /* { dg-final { scan-assembler "\tmflo\t" } } */ /* { dg-final { scan-assembler-not "\tdmul\t" } } */ diff --git a/gcc/testsuite/gcc.target/mips/extend-1.c b/gcc/testsuite/gcc.target/mips/extend-1.c index 4295106866b..5e9389060c8 100644 --- a/gcc/testsuite/gcc.target/mips/extend-1.c +++ b/gcc/testsuite/gcc.target/mips/extend-1.c @@ -1,4 +1,4 @@ -/* { dg-options "-O -mgp64 forbid_cpu=octeon" } */ +/* { dg-options "-O -mgp64 forbid_cpu=octeon.*" } */ /* { dg-final { scan-assembler-times "\tdsll\t" 5 } } */ /* { dg-final { scan-assembler-times "\tdsra\t" 5 } } */ /* { dg-final { scan-assembler-not "\tsll\t" } } */ diff --git a/gcc/testsuite/gcc.target/mips/mult-1.c b/gcc/testsuite/gcc.target/mips/mult-1.c index 43dd08c0b52..96961b0d85c 100644 --- a/gcc/testsuite/gcc.target/mips/mult-1.c +++ b/gcc/testsuite/gcc.target/mips/mult-1.c @@ -1,6 +1,6 @@ /* For SI->DI widening multiplication we should use DINS to combine the two halves. For Octeon use DMUL with explicit widening. */ -/* { dg-options "-O -mgp64 isa_rev>=2 forbid_cpu=octeon" } */ +/* { dg-options "-O -mgp64 isa_rev>=2 forbid_cpu=octeon.*" } */ /* { dg-final { scan-assembler "\tdins\t" } } */ /* { dg-final { scan-assembler-not "\tdsll\t" } } */ /* { dg-final { scan-assembler-not "\tdsrl\t" } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-perm-1.c b/gcc/testsuite/gcc.target/powerpc/altivec-perm-1.c new file mode 100644 index 00000000000..ee5c5eee900 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/altivec-perm-1.c @@ -0,0 +1,76 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target powerpc_altivec_ok } */ +/* { dg-options "-O -maltivec -mno-vsx" } */ + +typedef unsigned char V __attribute__((vector_size(16))); + +V b1(V x) +{ + return __builtin_shuffle(x, (V){ 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, }); +} + +V b2(V x) +{ + return __builtin_shuffle(x, (V){ 2,3,2,3, 2,3,2,3, 2,3,2,3, 2,3,2,3, }); +} + +V b4(V x) +{ + return __builtin_shuffle(x, (V){ 4,5,6,7, 4,5,6,7, 4,5,6,7, 4,5,6,7, }); +} + +V p2(V x, V y) +{ + return __builtin_shuffle(x, y, + (V){ 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31 }); + +} + +V p4(V x, V y) +{ + return __builtin_shuffle(x, y, + (V){ 2, 3, 6, 7, 10, 11, 14, 15, 18, 19, 22, 23, 26, 27, 30, 31 }); +} + +V h1(V x, V y) +{ + return __builtin_shuffle(x, y, + (V){ 0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23 }); +} + +V h2(V x, V y) +{ + return __builtin_shuffle(x, y, + (V){ 0, 1, 16, 17, 2, 3, 18, 19, 4, 5, 20, 21, 6, 7, 22, 23 }); +} + +V h4(V x, V y) +{ + return __builtin_shuffle(x, y, + (V){ 0, 1, 2, 3, 16, 17, 18, 19, 4, 5, 6, 7, 20, 21, 22, 23 }); +} + +V l1(V x, V y) +{ + return __builtin_shuffle(x, y, + (V){ 8, 24, 9, 25, 10, 26, 11, 27, 12, 28, 13, 29, 14, 30, 15, 31 }); +} + +V l2(V x, V y) +{ + return __builtin_shuffle(x, y, + (V){ 8, 9, 24, 25, 10, 11, 26, 27, 12, 13, 28, 29, 14, 15, 30, 31 }); +} + +V l4(V x, V y) +{ + return __builtin_shuffle(x, y, + (V){ 8, 9, 10, 11, 24, 25, 26, 27, 12, 13, 14, 15, 28, 29, 30, 31 }); +} + +/* { dg-final { scan-assembler-not "vperm" } } */ +/* { dg-final { scan-assembler "vspltb" } } */ +/* { dg-final { scan-assembler "vsplth" } } */ +/* { dg-final { scan-assembler "vspltw" } } */ +/* { dg-final { scan-assembler "vpkuhum" } } */ +/* { dg-final { scan-assembler "vpkuwum" } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-perm-2.c b/gcc/testsuite/gcc.target/powerpc/altivec-perm-2.c new file mode 100644 index 00000000000..1b90bb9567c --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/altivec-perm-2.c @@ -0,0 +1,19 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target powerpc_altivec_ok } */ +/* { dg-options "-O -maltivec -mno-vsx" } */ + +typedef unsigned short V __attribute__((vector_size(16))); + +V f2(V x) +{ + return __builtin_shuffle(x, (V){ 1,1,1,1, 1,1,1,1, }); +} + +V f4(V x) +{ + return __builtin_shuffle(x, (V){ 2,3,2,3, 2,3,2,3, }); +} + +/* { dg-final { scan-assembler-not "vperm" } } */ +/* { dg-final { scan-assembler "vsplth" } } */ +/* { dg-final { scan-assembler "vspltw" } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-perm-4.c b/gcc/testsuite/gcc.target/powerpc/altivec-perm-4.c new file mode 100644 index 00000000000..9598edfb010 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/altivec-perm-4.c @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target powerpc_altivec_ok } */ +/* { dg-options "-O -maltivec -mno-vsx" } */ + +typedef unsigned int V __attribute__((vector_size(16))); + +V f4(V x) +{ + return __builtin_shuffle(x, (V){ 1,1,1,1, }); +} + +/* { dg-final { scan-assembler-not "vperm" } } */ +/* { dg-final { scan-assembler "vspltw" } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-target-4.c b/gcc/testsuite/gcc.target/powerpc/ppc-target-4.c new file mode 100644 index 00000000000..ac728334cd5 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/ppc-target-4.c @@ -0,0 +1,84 @@ +/* { dg-do compile { target { powerpc*-*-* } } } */ +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ +/* { dg-require-effective-target powerpc_vsx_ok } */ +/* { dg-options "-O2 -ffast-math -mcpu=power5 -mno-altivec -mabi=altivec -fno-unroll-loops" } */ +/* { dg-final { scan-assembler-times "vaddfp" 1 } } */ +/* { dg-final { scan-assembler-times "xvaddsp" 1 } } */ +/* { dg-final { scan-assembler-times "fadds" 1 } } */ + +#ifndef SIZE +#define SIZE 1024 +#endif + +#ifdef __ALTIVEC__ +#error "__ALTIVEC__ should not be defined." +#endif + +#ifdef __VSX__ +#error "__VSX__ should not be defined." +#endif + +#pragma GCC target("vsx") +#include <altivec.h> +#pragma GCC reset_options + +#pragma GCC push_options +#pragma GCC target("altivec,no-vsx") + +#ifndef __ALTIVEC__ +#error "__ALTIVEC__ should be defined." +#endif + +#ifdef __VSX__ +#error "__VSX__ should not be defined." +#endif + +void +av_add (vector float *a, vector float *b, vector float *c) +{ + unsigned long i; + unsigned long n = SIZE / 4; + + for (i = 0; i < n; i++) + a[i] = vec_add (b[i], c[i]); +} + +#pragma GCC target("vsx") + +#ifndef __ALTIVEC__ +#error "__ALTIVEC__ should be defined." +#endif + +#ifndef __VSX__ +#error "__VSX__ should be defined." +#endif + +void +vsx_add (vector float *a, vector float *b, vector float *c) +{ + unsigned long i; + unsigned long n = SIZE / 4; + + for (i = 0; i < n; i++) + a[i] = vec_add (b[i], c[i]); +} + +#pragma GCC pop_options +#pragma GCC target("no-vsx,no-altivec") + +#ifdef __ALTIVEC__ +#error "__ALTIVEC__ should not be defined." +#endif + +#ifdef __VSX__ +#error "__VSX__ should not be defined." +#endif + +void +norm_add (float *a, float *b, float *c) +{ + unsigned long i; + + for (i = 0; i < SIZE; i++) + a[i] = b[i] + c[i]; +} diff --git a/gcc/testsuite/gcc.target/powerpc/recip-5.c b/gcc/testsuite/gcc.target/powerpc/recip-5.c index 0b3823cfa51..3d7d691d5ac 100644 --- a/gcc/testsuite/gcc.target/powerpc/recip-5.c +++ b/gcc/testsuite/gcc.target/powerpc/recip-5.c @@ -1,5 +1,6 @@ /* { dg-do compile { target { powerpc*-*-* } } } */ -/* { dg-require-effective-target powerpc_fprs } */ +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ +/* { dg-require-effective-target powerpc_vsx_ok } */ /* { dg-options "-O3 -ftree-vectorize -mrecip=all -ffast-math -mcpu=power7 -fno-unroll-loops" } */ /* { dg-final { scan-assembler-times "xvredp" 4 } } */ /* { dg-final { scan-assembler-times "xvresp" 5 } } */ diff --git a/gcc/testsuite/gfortran.dg/auto_dealloc_2.f90 b/gcc/testsuite/gfortran.dg/auto_dealloc_2.f90 index 4cbda828895..e607b6ad91d 100644 --- a/gcc/testsuite/gfortran.dg/auto_dealloc_2.f90 +++ b/gcc/testsuite/gfortran.dg/auto_dealloc_2.f90 @@ -25,5 +25,5 @@ contains end program -! { dg-final { scan-tree-dump-times "__builtin_free" 2 "original" } } +! { dg-final { scan-tree-dump-times "__builtin_free" 3 "original" } } ! { dg-final { cleanup-tree-dump "original" } } diff --git a/gcc/testsuite/gfortran.dg/bounds_check_16.f90 b/gcc/testsuite/gfortran.dg/bounds_check_16.f90 new file mode 100644 index 00000000000..38a86306e93 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/bounds_check_16.f90 @@ -0,0 +1,14 @@ +! { dg-do compile } +! { dg-options "-fcheck=bounds" } +! +! PR fortran/50815 +! +! Don't check the bounds of deferred-length strings. +! gfortran had an ICE before because it did. +! +SUBROUTINE TEST(VALUE) + IMPLICIT NONE + CHARACTER(LEN=:), ALLOCATABLE :: VALUE + CHARACTER(LEN=128) :: VAL + VALUE = VAL +END SUBROUTINE TEST diff --git a/gcc/testsuite/gfortran.dg/class_19.f03 b/gcc/testsuite/gfortran.dg/class_19.f03 index 78e5652a871..27ee7b4e2cb 100644 --- a/gcc/testsuite/gfortran.dg/class_19.f03 +++ b/gcc/testsuite/gfortran.dg/class_19.f03 @@ -39,7 +39,7 @@ program main end program main -! { dg-final { scan-tree-dump-times "__builtin_free" 8 "original" } } +! { dg-final { scan-tree-dump-times "__builtin_free" 11 "original" } } ! { dg-final { cleanup-tree-dump "original" } } ! { dg-final { cleanup-modules "foo_mod" } } diff --git a/gcc/testsuite/gfortran.dg/class_array_1.f03 b/gcc/testsuite/gfortran.dg/class_array_1.f03 new file mode 100644 index 00000000000..32a0e54bf0a --- /dev/null +++ b/gcc/testsuite/gfortran.dg/class_array_1.f03 @@ -0,0 +1,76 @@ +! { dg-do run } +! +! Test functionality of allocatable class arrays: +! ALLOCATE with source, ALLOCATED, DEALLOCATE, passing as arguments for +! ELEMENTAL and non-ELEMENTAL procedures, SELECT TYPE and LOWER/UPPER. +! + type :: type1 + integer :: i + end type + type, extends(type1) :: type2 + real :: r + end type + class(type1), allocatable, dimension (:) :: x + + allocate(x(2), source = type2(42,42.0)) + call display(x, [1], [2], t2 = [type2(42,42.0),type2(42,42.0)]) + call display(x, [1], [2], t2 = [type2(111,99.0),type2(111,99.0)]) + if (allocated (x)) deallocate (x) + + allocate(x(1:4), source = [(type2(i,42.0 + float (i)), i = 1, 4)]) + call display(x, [1], [4], t2 = [(type2(i,42.0 + float (i)), i = 1, 4)]) + call display(x, [1], [4], t2 = [(type2(111,99.0), i = 1, 4)]) + + if (any (disp (x) .ne. [99.0,99.0,99.0,99.0])) call abort + + if (allocated (x)) deallocate (x) + + allocate(x(1:4), source = type1(42)) + call display(x, [1], [4], t1 = [(type1(42), i = 1, 4)]) + call display(x, [1], [4], t1 = [type1(42),type1(99),type1(42),type1(42)]) + if (any (disp (x) .ne. [0.0,0.0,0.0,0.0])) call abort + +contains + subroutine display(x, lower, upper, t1, t2) + class(type1), allocatable, dimension (:) :: x + integer, dimension (:) :: lower, upper + type(type1), optional, dimension(:) :: t1 + type(type2), optional, dimension(:) :: t2 + select type (x) + type is (type1) + if (present (t1)) then + if (any (x%i .ne. t1%i)) call abort + else + call abort + end if + x(2)%i = 99 + type is (type2) + if (present (t2)) then + if (any (x%i .ne. t2%i)) call abort + if (any (x%r .ne. t2%r)) call abort + else + call abort + end if + x%i = 111 + x%r = 99.0 + end select + call bounds (x, lower, upper) + end subroutine + subroutine bounds (x, lower, upper) + class(type1), allocatable, dimension (:) :: x + integer, dimension (:) :: lower, upper + if (any (lower .ne. lbound (x))) call abort + if (any (upper .ne. ubound (x))) call abort + end subroutine + elemental function disp(y) result(ans) + class(type1), intent(in) :: y + real :: ans + select type (y) + type is (type1) + ans = 0.0 + type is (type2) + ans = y%r + end select + end function +end + diff --git a/gcc/testsuite/gfortran.dg/class_array_2.f03 b/gcc/testsuite/gfortran.dg/class_array_2.f03 new file mode 100644 index 00000000000..68f1b71e552 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/class_array_2.f03 @@ -0,0 +1,78 @@ +! { dg-do run } +! +! Test functionality of pointer class arrays: +! ALLOCATE with source, ASSOCIATED, DEALLOCATE, passing as arguments for +! ELEMENTAL and non-ELEMENTAL procedures, SELECT TYPE and LOWER/UPPER. +! + type :: type1 + integer :: i + end type + type, extends(type1) :: type2 + real :: r + end type + class(type1), pointer, dimension (:) :: x + + allocate(x(2), source = type2(42,42.0)) + call display(x, [1], [2], t2 = [type2(42,42.0),type2(42,42.0)]) + call display(x, [1], [2], t2 = [type2(111,99.0),type2(111,99.0)]) + if (associated (x)) deallocate (x) + + allocate(x(1:4), source = [(type2(i,42.0 + float (i)), i = 1, 4)]) + call display(x, [1], [4], t2 = [(type2(i,42.0 + float (i)), i = 1, 4)]) + call display(x, [1], [4], t2 = [(type2(111,99.0), i = 1, 4)]) + + if (any (disp (x) .ne. [99.0,99.0,99.0,99.0])) call abort + + if (associated (x)) deallocate (x) + + allocate(x(1:4), source = type1(42)) + call display(x, [1], [4], t1 = [(type1(42), i = 1, 4)]) + call display(x, [1], [4], t1 = [type1(42),type1(99),type1(42),type1(42)]) + if (any (disp (x) .ne. [0.0,0.0,0.0,0.0])) call abort + + if (associated (x)) deallocate (x) + +contains + subroutine display(x, lower, upper, t1, t2) + class(type1), pointer, dimension (:) :: x + integer, dimension (:) :: lower, upper + type(type1), optional, dimension(:) :: t1 + type(type2), optional, dimension(:) :: t2 + select type (x) + type is (type1) + if (present (t1)) then + if (any (x%i .ne. t1%i)) call abort + else + call abort + end if + x(2)%i = 99 + type is (type2) + if (present (t2)) then + if (any (x%i .ne. t2%i)) call abort + if (any (x%r .ne. t2%r)) call abort + else + call abort + end if + x%i = 111 + x%r = 99.0 + end select + call bounds (x, lower, upper) + end subroutine + subroutine bounds (x, lower, upper) + class(type1), pointer, dimension (:) :: x + integer, dimension (:) :: lower, upper + if (any (lower .ne. lbound (x))) call abort + if (any (upper .ne. ubound (x))) call abort + end subroutine + elemental function disp(y) result(ans) + class(type1), intent(in) :: y + real :: ans + select type (y) + type is (type1) + ans = 0.0 + type is (type2) + ans = y%r + end select + end function +end + diff --git a/gcc/testsuite/gfortran.dg/class_array_3.f03 b/gcc/testsuite/gfortran.dg/class_array_3.f03 new file mode 100644 index 00000000000..0ca0a006eaf --- /dev/null +++ b/gcc/testsuite/gfortran.dg/class_array_3.f03 @@ -0,0 +1,143 @@ +! { dg-do run } +! +! class based quick sort program - starting point comment #0 of pr41539 +! +! Note assignment with vector index reference fails because temporary +! allocation does not occur - also false dependency detected. Nullification +! of temp descriptor data causes a segfault. +! +module m_qsort + implicit none + type, abstract :: sort_t + contains + procedure(disp), deferred :: disp + procedure(lt_cmp), deferred :: lt_cmp + procedure(assign), deferred :: assign + generic :: operator(<) => lt_cmp + generic :: assignment(=) => assign + end type sort_t + interface + elemental integer function disp(a) + import + class(sort_t), intent(in) :: a + end function disp + end interface + interface + impure elemental logical function lt_cmp(a,b) + import + class(sort_t), intent(in) :: a, b + end function lt_cmp + end interface + interface + elemental subroutine assign(a,b) + import + class(sort_t), intent(out) :: a + class(sort_t), intent(in) :: b + end subroutine assign + end interface +contains + + subroutine qsort(a) + class(sort_t), intent(inout),allocatable :: a(:) + class(sort_t), allocatable :: tmp (:) + integer, allocatable :: index_array (:) + integer :: i + allocate (tmp(size (a, 1)), source = a) + index_array = [(i, i = 1, size (a, 1))] + call internal_qsort (tmp, index_array) ! Do not move class elements around until end + do i = 1, size (a, 1) ! Since they can be of arbitrary size. + a(i) = tmp(index_array(i)) ! Vector index array would be neater + end do +! a = tmp(index_array) ! Like this - TODO: fixme + end subroutine qsort + + recursive subroutine internal_qsort (x, iarray) + class(sort_t), intent(inout),allocatable :: x(:) + class(sort_t), allocatable :: ptr + integer, allocatable :: iarray(:), above(:), below(:), itmp(:) + integer :: pivot, nelem, i, iptr + if (.not.allocated (iarray)) return + nelem = size (iarray, 1) + if (nelem .le. 1) return + pivot = nelem / 2 + allocate (ptr, source = x(iarray(pivot))) ! Pointer to the pivot element + do i = 1, nelem + iptr = iarray(i) ! Index for i'th element + if (ptr%lt_cmp (x(iptr))) then ! Compare pivot with i'th element + itmp = [iptr] + above = concat (itmp, above) ! Invert order to prevent infinite loops + else + itmp = [iptr] + below = concat (itmp, below) ! -ditto- + end if + end do + call internal_qsort (x, above) ! Recursive sort of 'above' and 'below' + call internal_qsort (x, below) + iarray = concat (below, above) ! Concatenate the result + end subroutine internal_qsort + + function concat (ia, ib) result (ic) + integer, allocatable, dimension(:) :: ia, ib, ic + if (allocated (ia) .and. allocated (ib)) then + ic = [ia, ib] + else if (allocated (ia)) then + ic = ia + else if (allocated (ib)) then + ic = ib + end if + end function concat +end module m_qsort + +module test + use m_qsort + implicit none + type, extends(sort_t) :: sort_int_t + integer :: i + contains + procedure :: disp => disp_int + procedure :: lt_cmp => lt_cmp_int + procedure :: assign => assign_int + end type +contains + elemental integer function disp_int(a) + class(sort_int_t), intent(in) :: a + disp_int = a%i + end function disp_int + elemental subroutine assign_int (a, b) + class(sort_int_t), intent(out) :: a + class(sort_t), intent(in) :: b ! TODO: gfortran does not throw 'class(sort_int_t)' + select type (b) + class is (sort_int_t) + a%i = b%i + class default + a%i = -1 + end select + end subroutine assign_int + impure elemental logical function lt_cmp_int(a,b) result(cmp) + class(sort_int_t), intent(in) :: a + class(sort_t), intent(in) :: b + select type(b) + type is(sort_int_t) + if (a%i < b%i) then + cmp = .true. + else + cmp = .false. + end if + class default + ERROR STOP "Don't compare apples with oranges" + end select + end function lt_cmp_int +end module test + +program main + use test + class(sort_t), allocatable :: A(:) + integer :: i, m(5)= [7 , 4, 5, 2, 3] + allocate (A(5), source = [(sort_int_t(m(i)), i=1,5)]) +! print *, "Before qsort: ", (A(i)%disp(), i = 1, size(a,1)) + call qsort(A) +! print *, "After qsort: ", (A(i)%disp(), i = 1, size(a,1)) + if (any ([(A(i)%disp(), i = 1, size(a,1))] .ne. [2,3,4,5,7])) call abort +end program main + +! { dg-final { cleanup-modules "m_qsort test" } } diff --git a/gcc/testsuite/gfortran.dg/class_array_4.f03 b/gcc/testsuite/gfortran.dg/class_array_4.f03 new file mode 100644 index 00000000000..7c748f008d0 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/class_array_4.f03 @@ -0,0 +1,26 @@ +! { dg-do run } +! PR43214 - implementation of class arrays +! +! Contributed by Tobias Burnus <burnus@gcc.gnu.org> +! +module m + type t + real :: r = 99 + contains + procedure, pass :: foo => foo + end type t +contains + elemental subroutine foo(x, i) + class(t),intent(in) :: x + integer,intent(inout) :: i + i = x%r + i + end subroutine foo +end module m + + use m + type(t) :: x(3) + integer :: n(3) = [0,100,200] + call x(:)%foo(n) + if (any(n .ne. [99,199,299])) call abort +end +! { dg-final { cleanup-modules "m" } } diff --git a/gcc/testsuite/gfortran.dg/class_array_5.f03 b/gcc/testsuite/gfortran.dg/class_array_5.f03 new file mode 100644 index 00000000000..2a7e2f1bc46 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/class_array_5.f03 @@ -0,0 +1,25 @@ +! { dg-do compile } +! PR44568 - class array impelementation. +! +! Contributed by Hans-Werner Boschmann +! +module ice6 + + type::a_type + contains + procedure::do_something + end type a_type + + contains + + subroutine do_something(this) + class(a_type),intent(in)::this + end subroutine do_something + + subroutine do_something_else() + class(a_type),dimension(:),allocatable::values + call values(1)%do_something() + end subroutine do_something_else + +end module ice6 +! { dg-final { cleanup-modules "ice6" } } diff --git a/gcc/testsuite/gfortran.dg/class_array_6.f03 b/gcc/testsuite/gfortran.dg/class_array_6.f03 new file mode 100644 index 00000000000..4f8b803befb --- /dev/null +++ b/gcc/testsuite/gfortran.dg/class_array_6.f03 @@ -0,0 +1,33 @@ +! { dg-do compile } +! PR46356 - class arrays +! +! Contributed by Ian Harvey +! +MODULE procedure_intent_nonsense + IMPLICIT NONE + PRIVATE + TYPE, PUBLIC :: Parent + INTEGER :: comp + END TYPE Parent + + TYPE :: ParentVector + INTEGER :: a + ! CLASS(Parent), ALLOCATABLE :: a + END TYPE ParentVector +CONTAINS + SUBROUTINE vector_operation(pvec) + CLASS(ParentVector), INTENT(INOUT) :: pvec(:) + INTEGER :: i + !--- + DO i = 1, SIZE(pvec) + CALL item_operation(pvec(i)) + END DO + ! PRINT *, pvec(1)%a%comp + END SUBROUTINE vector_operation + + SUBROUTINE item_operation(pvec) + CLASS(ParentVector), INTENT(INOUT) :: pvec + !TYPE(ParentVector), INTENT(INOUT) :: pvec + END SUBROUTINE item_operation +END MODULE procedure_intent_nonsense +! { dg-final { cleanup-modules "procedure_intent_nonsense" } } diff --git a/gcc/testsuite/gfortran.dg/class_array_7.f03 b/gcc/testsuite/gfortran.dg/class_array_7.f03 new file mode 100644 index 00000000000..225cc7e06c8 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/class_array_7.f03 @@ -0,0 +1,59 @@ +! { dg-do run } +! PR46990 - class array implementation +! +! Contributed by Wolfgang Kilian on comp.lang.fortran - see comment #7 of PR +! +module realloc + implicit none + + type :: base_type + integer :: i + contains + procedure :: assign + generic :: assignment(=) => assign ! define generic assignment + end type base_type + + type, extends(base_type) :: extended_type + integer :: j + end type extended_type + +contains + + elemental subroutine assign (a, b) + class(base_type), intent(out) :: a + type(base_type), intent(in) :: b + a%i = b%i + end subroutine assign + + subroutine reallocate (a) + class(base_type), dimension(:), allocatable, intent(inout) :: a + class(base_type), dimension(:), allocatable :: tmp + allocate (tmp (2 * size (a))) ! how to alloc b with same type as a ? + if (trim (print_type ("tmp", tmp)) .ne. "tmp is base_type") call abort + tmp(:size(a)) = a ! polymorphic l.h.s. + call move_alloc (from=tmp, to=a) + end subroutine reallocate + + character(20) function print_type (name, a) + character(*), intent(in) :: name + class(base_type), dimension(:), intent(in) :: a + select type (a) + type is (base_type); print_type = NAME // " is base_type" + type is (extended_type); print_type = NAME // " is extended_type" + end select + end function + +end module realloc + +program main + use realloc + implicit none + class(base_type), dimension(:), allocatable :: a + + allocate (extended_type :: a(10)) + if (trim (print_type ("a", a)) .ne. "a is extended_type") call abort + call reallocate (a) + if (trim (print_type ("a", a)) .ne. "a is base_type") call abort +end program main + +! { dg-final { cleanup-modules "realloc" } } diff --git a/gcc/testsuite/gfortran.dg/class_array_8.f03 b/gcc/testsuite/gfortran.dg/class_array_8.f03 new file mode 100644 index 00000000000..20c57ec03ff --- /dev/null +++ b/gcc/testsuite/gfortran.dg/class_array_8.f03 @@ -0,0 +1,18 @@ +! { dg-do run } +! PR43969 - class array implementation +! +! Contributed by Janus Weil <janus@gcc.gnu.org> +! + implicit none + + type indx_map + end type + + type desc_type + class(indx_map), allocatable :: indxmap(:) + end type + + type(desc_type) :: desc + if (allocated(desc%indxmap)) call abort() + +end diff --git a/gcc/testsuite/gfortran.dg/class_to_type_1.f03 b/gcc/testsuite/gfortran.dg/class_to_type_1.f03 new file mode 100644 index 00000000000..0243343d637 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/class_to_type_1.f03 @@ -0,0 +1,97 @@ +! { dg-do run } +! +! Passing CLASS to TYPE +! +implicit none +type t + integer :: A + real, allocatable :: B(:) +end type t + +type, extends(t) :: t2 + complex :: z = cmplx(3.3, 4.4) +end type t2 +integer :: i +class(t), allocatable :: x(:) + +allocate(t2 :: x(10)) +select type(x) + type is(t2) + if (size (x) /= 10) call abort () + x = [(t2(a=-i, B=[1*i,2*i,3*i,4*i]), i = 1, 10)] + do i = 1, 10 + if (x(i)%a /= -i .or. size (x(i)%b) /= 4 & + .or. any (x(i)%b /= [1*i,2*i,3*i,4*i])) then + call abort() + end if + if (x(i)%z /= cmplx(3.3, 4.4)) call abort() + end do + class default + call abort() +end select + +call base(x) +call baseExplicit(x, size(x)) +call class(x) +call classExplicit(x, size(x)) +contains + subroutine base(y) + type(t) :: y(:) + if (size (y) /= 10) call abort () + do i = 1, 10 + if (y(i)%a /= -i .or. size (y(i)%b) /= 4 & + .or. any (y(i)%b /= [1*i,2*i,3*i,4*i])) then + call abort() + end if + end do + end subroutine base + subroutine baseExplicit(v, n) + integer, intent(in) :: n + type(t) :: v(n) + if (size (v) /= 10) call abort () + do i = 1, 10 + if (v(i)%a /= -i .or. size (v(i)%b) /= 4 & + .or. any (v(i)%b /= [1*i,2*i,3*i,4*i])) then + call abort() + end if + end do + end subroutine baseExplicit + subroutine class(z) + class(t), intent(in) :: z(:) + select type(z) + type is(t2) + if (size (z) /= 10) call abort () + do i = 1, 10 + if (z(i)%a /= -i .or. size (z(i)%b) /= 4 & + .or. any (z(i)%b /= [1*i,2*i,3*i,4*i])) then + call abort() + end if + if (z(i)%z /= cmplx(3.3, 4.4)) call abort() + end do + class default + call abort() + end select + call base(z) + call baseExplicit(z, size(z)) + end subroutine class + subroutine classExplicit(u, n) + integer, intent(in) :: n + class(t), intent(in) :: u(n) + select type(u) + type is(t2) + if (size (u) /= 10) call abort () + do i = 1, 10 + if (u(i)%a /= -i .or. size (u(i)%b) /= 4 & + .or. any (u(i)%b /= [1*i,2*i,3*i,4*i])) then + call abort() + end if + if (u(i)%z /= cmplx(3.3, 4.4)) call abort() + end do + class default + call abort() + end select + call base(u) + call baseExplicit(u, n) + end subroutine classExplicit +end + diff --git a/gcc/testsuite/gfortran.dg/coarray/poly_run_1.f90 b/gcc/testsuite/gfortran.dg/coarray/poly_run_1.f90 new file mode 100644 index 00000000000..a371aef0810 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/coarray/poly_run_1.f90 @@ -0,0 +1,43 @@ +! { dg-do run } +! +! Test for polymorphic coarrays +! +type t +end type t +class(t), allocatable :: A(:)[:,:] +allocate (A(2)[1:4,-5:*]) +if (any (lcobound(A) /= [1, -5])) call abort () +if (num_images() == 1) then + if (any (ucobound(A) /= [4, -5])) call abort () +else + if (ucobound(A,dim=1) /= 4) call abort () +end if +if (allocated(A)) i = 5 +call s(A) +!call t(A) ! FIXME + +contains + +subroutine s(x) + class(t),allocatable :: x(:)[:,:] + if (any (lcobound(x) /= [1, -5])) call abort () + if (num_images() == 1) then + if (any (ucobound(x) /= [4, -5])) call abort () +! FIXME: Tree-walking issue? +! else +! if (ucobound(x,dim=1) /= 4) call abort () + end if +end subroutine s + +! FIXME +!subroutine st(x) +! class(t),allocatable :: x(:)[:,:] +! if (any (lcobound(x) /= [1, 2])) call abort () +! if (num_images() == 1) then +! if (any (ucobound(x) /= [4, 2])) call abort () +! else +! if (ucobound(x,dim=1) /= 4) call abort () +! end if +!end subroutine st +end + diff --git a/gcc/testsuite/gfortran.dg/coarray/poly_run_2.f90 b/gcc/testsuite/gfortran.dg/coarray/poly_run_2.f90 new file mode 100644 index 00000000000..fe524a0751a --- /dev/null +++ b/gcc/testsuite/gfortran.dg/coarray/poly_run_2.f90 @@ -0,0 +1,40 @@ +! { dg-do run } +! +! Test for polymorphic coarrays +! +type t +end type t +class(t), allocatable :: A[:,:] +allocate (A[1:4,-5:*]) +if (allocated(A)) stop +if (any (lcobound(A) /= [1, -5])) call abort () +if (num_images() == 1) then + if (any (ucobound(A) /= [4, -5])) call abort () +! FIXME: Tree walk issue +!else +! if (ucobound(A,dim=1) /= 4) call abort () +end if +if (allocated(A)) i = 5 +call s(A) +call st(A) +contains +subroutine s(x) + class(t) :: x[4,2:*] + if (any (lcobound(x) /= [1, 2])) call abort () + if (num_images() == 1) then + if (any (ucobound(x) /= [4, 2])) call abort () + else + if (ucobound(x,dim=1) /= 4) call abort () + end if +end subroutine s +subroutine st(x) + class(t) :: x[:,:] + if (any (lcobound(x) /= [1, -5])) call abort () + if (num_images() == 1) then + if (any (ucobound(x) /= [4, -5])) call abort () + else + if (ucobound(x,dim=1) /= 4) call abort () + end if +end subroutine st +end + diff --git a/gcc/testsuite/gfortran.dg/coarray_poly_1.f90 b/gcc/testsuite/gfortran.dg/coarray_poly_1.f90 new file mode 100644 index 00000000000..03dbee79839 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/coarray_poly_1.f90 @@ -0,0 +1,13 @@ +! { dg-do compile } +! { dg-options "-fcoarray=single" } +! +! Test for polymorphic coarrays +! +subroutine s2() + type t + end type t + class(t) :: A(:)[4,2:*] ! { dg-error "is not ALLOCATABLE, SAVE nor a dummy argument" } + print *, ucobound(a) + allocate(a) ! { dg-error "must be ALLOCATABLE or a POINTER" } +end + diff --git a/gcc/testsuite/gfortran.dg/coarray_poly_2.f90 b/gcc/testsuite/gfortran.dg/coarray_poly_2.f90 new file mode 100644 index 00000000000..dd5a5537f46 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/coarray_poly_2.f90 @@ -0,0 +1,13 @@ +! { dg-do compile } +! { dg-options "-fcoarray=single" } +! + type t + end type t + type(t) :: a[*] + call test(a) ! { dg-error "Rank mismatch in argument 'x' at .1. .rank-1 and scalar." } +contains + subroutine test(x) + class(t) :: x(:)[*] + print *, ucobound(x) + end +end diff --git a/gcc/testsuite/gfortran.dg/gomp/workshare2.f90 b/gcc/testsuite/gfortran.dg/gomp/workshare2.f90 new file mode 100644 index 00000000000..26023c8da15 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/gomp/workshare2.f90 @@ -0,0 +1,53 @@ +! { dg-do compile } +! { dg-options "-fopenmp -ffrontend-optimize -fdump-tree-original" } +! PR 50690 - this used to ICE because workshare could not handle +! BLOCKs. +! To test for correct execution, run this program (but don't forget +! to unset the stack limit). +program foo + implicit none + integer, parameter :: n = 10000000 + real, parameter :: eps = 3e-7 + integer :: i,j + real :: A(n), B(5), C(n) + real :: tmp + B(1) = 3.344 + tmp = B(1) + do i=1,10 + call random_number(a) + c = a + !$omp parallel default(shared) + !$omp workshare + A(:) = A(:)*cos(B(1))+A(:)*cos(B(1)) + !$omp end workshare nowait + !$omp end parallel ! sync is implied here + end do + + c = c*tmp + c*tmp + + do j=1,n + if (abs(a(j)-c(j)) > eps) then + print *,1,j,a(j), c(j) + call abort + end if + end do + + do i=1,10 + call random_number(a) + c = a + !$omp parallel workshare default(shared) + A(:) = A(:)*cos(B(1))+A(:)*cos(B(1)) + !$omp end parallel workshare + end do + + c = c*tmp + c*tmp + do j=1,n + if (abs(a(j)-c(j)) > eps) then + print *,2,j,a(j), c(j) + call abort + end if + end do + +end program foo +! { dg-final { scan-tree-dump-times "__var" 0 "original" } } +! { dg-final { cleanup-tree-dump "original" } } diff --git a/gcc/testsuite/gfortran.dg/gomp/workshare3.f90 b/gcc/testsuite/gfortran.dg/gomp/workshare3.f90 new file mode 100644 index 00000000000..579eb717329 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/gomp/workshare3.f90 @@ -0,0 +1,39 @@ +! { dg-do compile } +! { dg-options "-ffrontend-optimize -fdump-tree-original -fopenmp" } +! Test that common function elimination is done within the OMP parallel +! blocks even if there is a workshare around it. +program foo + implicit none + integer, parameter :: n = 10000000 + real, parameter :: eps = 3e-7 + integer :: i,j + real :: A(n), B(5), C(n) + real :: tmp + B(1) = 3.344 + tmp = B(1) + do i=1,10 + call random_number(a) + c = a + !$omp parallel workshare + !$omp parallel default(shared) + !$omp do + do j=1,n + A(j) = A(j)*cos(B(1))+A(j)*cos(B(1)) + end do + !$omp end do + !$omp end parallel + !$omp end parallel workshare + end do + + c = c*cos(b(1))+ c*cos(b(1)) + + do j=1,n + if (abs(a(j)-c(j)) > eps) then + print *,1,j,a(j), c(j) + call abort + end if + end do + +end program foo +! { dg-final { scan-tree-dump-times "__builtin_cosf" 2 "original" } } +! { dg-final { cleanup-tree-dump "original" } } diff --git a/gcc/testsuite/gfortran.dg/io_real_boz_3.f90 b/gcc/testsuite/gfortran.dg/io_real_boz_3.f90 new file mode 100644 index 00000000000..8a6f0965060 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/io_real_boz_3.f90 @@ -0,0 +1,34 @@ +! { dg-do run } +! { dg-options "-std=f2008" } +! +! PR fortran/51407 +! +! Fortran 2008 allows BOZ edit descriptors for real/complex. +! + real(kind=4) :: x + complex(kind=4) :: z + character(len=64) :: str1 + + x = 1.0_16 + 2.0_16**(-105) + z = cmplx (1.0, 2.0) + + write (str1,'(b32)') x + read (str1,'(b32)') x + write (str1,'(o32)') x + read (str1,'(o32)') x + write (str1,'(z32)') x + read (str1,'(z32)') x + write (str1,'(b0)') x + write (str1,'(o0)') x + write (str1,'(z0)') x + + write (str1,'(2b32)') z + read (str1,'(2b32)') z + write (str1,'(2o32)') z + read (str1,'(2o32)') z + write (str1,'(2z32)') z + read (str1,'(2z32)') z + write (str1,'(2b0)') z + write (str1,'(2o0)') z + write (str1,'(2z0)') z + end diff --git a/gcc/testsuite/gfortran.dg/io_real_boz_4.f90 b/gcc/testsuite/gfortran.dg/io_real_boz_4.f90 new file mode 100644 index 00000000000..b70555a4687 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/io_real_boz_4.f90 @@ -0,0 +1,15 @@ +! { dg-do run } +! { dg-options "-std=f2003" } +! +! PR fortran/51407 +! +! Valid in F2008, but in F95/F2003: +! { dg-output "Expected INTEGER for item 1 in formatted transfer, got REAL" } +! { dg-shouldfail "Only F2003: BOZ edit with REAL" } +! + real(kind=16) :: x + character(len=32) :: str1 + x = 1.0_16 + 2.0_16**(-105) + write (str1,'(z32)') x + write (str1,'(z0)') x + end diff --git a/gcc/testsuite/gfortran.dg/io_real_boz_5.f90 b/gcc/testsuite/gfortran.dg/io_real_boz_5.f90 new file mode 100644 index 00000000000..6a36ee59ccb --- /dev/null +++ b/gcc/testsuite/gfortran.dg/io_real_boz_5.f90 @@ -0,0 +1,13 @@ +! { dg-do run } +! { dg-options "-std=f2008" } +! +! PR fortran/51407 +! +! Invalid in F2008 (accepted with -std=gnu) +! { dg-output "Expected numeric type for item 1 in formatted transfer, got CHARACTER" } +! { dg-shouldfail "Character type in BOZ" } +! + character(len=32) :: str1 + x = 1.0_16 + 2.0_16**(-105) + write (str1,'(z0)') 'X' + end diff --git a/gcc/testsuite/gfortran.dg/private_type_14.f90 b/gcc/testsuite/gfortran.dg/private_type_14.f90 new file mode 100644 index 00000000000..6c90b86411a --- /dev/null +++ b/gcc/testsuite/gfortran.dg/private_type_14.f90 @@ -0,0 +1,43 @@ +! { dg-do compile } +! +! PR fortran/51378 +! +! Allow constructor to nonprivate parent compoents, +! even if the extension specified PRIVATE for its own components +! +! Contributed by Reinhold Bader +! +module type_ext + type :: vec + real, dimension(3) :: comp + integer :: len + end type vec + type, extends(vec) :: l_vec + private + character(len=20) :: label = '01234567890123456789' + end type l_vec +end module type_ext +program test_ext + use type_ext + implicit none + type(vec) :: o_vec, oo_vec + type(l_vec) :: o_l_vec + integer :: i +! + o_vec = vec((/1.0, 2.0, 3.0/),3) +! write(*,*) o_vec%comp, o_vec%len + o_l_vec = l_vec(comp=(/1.0, 2.0, 3.0/),len=3) +! partial constr. not accepted by ifort 11.1, fixed in 12.0 (issue 562240) +! write(*,*) o_l_vec%comp, o_l_vec%len +! write(*,*) o_l_vec%vec + oo_vec = o_l_vec%vec + do i=1, 3 + if (abs(oo_vec%comp(i) - o_vec%comp(i)) > 1.0E-5) then + write(*, *) 'FAIL' + stop + end if + end do + write(*, *) 'OK' +end program + +! { dg-final { cleanup-modules "type_ext" } } diff --git a/gcc/testsuite/gfortran.dg/realloc_on_assign_8.f90 b/gcc/testsuite/gfortran.dg/realloc_on_assign_8.f90 new file mode 100644 index 00000000000..4f7d28895b5 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/realloc_on_assign_8.f90 @@ -0,0 +1,17 @@ +! { dg-do compile } +! +! PR fortran/51448 +! +! Contribued by François Willot +! + PROGRAM MAIN + IMPLICIT NONE + TYPE mytype + REAL b(2) + END TYPE mytype + TYPE(mytype) a + DOUBLE PRECISION, ALLOCATABLE :: x(:) + ALLOCATE(x(2)) + a%b=0.0E0 + x=a%b + END diff --git a/gcc/testsuite/gfortran.dg/trans-mem-skel.f90 b/gcc/testsuite/gfortran.dg/trans-mem-skel.f90 new file mode 100644 index 00000000000..7e56fadbdbc --- /dev/null +++ b/gcc/testsuite/gfortran.dg/trans-mem-skel.f90 @@ -0,0 +1,5 @@ +! { dg-do compile } +! { dg-options "-fgnu-tm" } +program foo + real x +end program foo diff --git a/gcc/testsuite/gfortran.dg/type_to_class_1.f03 b/gcc/testsuite/gfortran.dg/type_to_class_1.f03 new file mode 100644 index 00000000000..173ca3635eb --- /dev/null +++ b/gcc/testsuite/gfortran.dg/type_to_class_1.f03 @@ -0,0 +1,65 @@ +! { dg-do run } +! +! Passing TYPE to CLASS +! +implicit none +type t + integer :: A + real, allocatable :: B(:) +end type t + +type(t), allocatable :: x(:) +type(t) :: y(10) +integer :: i + +allocate(x(10)) +if (size (x) /= 10) call abort () +x = [(t(a=-i, B=[1*i,2*i,3*i,4*i]), i = 1, 10)] +do i = 1, 10 + if (x(i)%a /= -i .or. size (x(i)%b) /= 4 & + .or. any (x(i)%b /= [1*i,2*i,3*i,4*i])) then + call abort() + end if +end do + +y = x ! TODO: Segfaults in runtime without 'y' being set + +call class(x) +call classExplicit(x, size(x)) +call class(y) +call classExplicit(y, size(y)) + +contains + subroutine class(z) + class(t), intent(in) :: z(:) + select type(z) + type is(t) + if (size (z) /= 10) call abort () + do i = 1, 10 + if (z(i)%a /= -i .or. size (z(i)%b) /= 4 & + .or. any (z(i)%b /= [1*i,2*i,3*i,4*i])) then + call abort() + end if + end do + class default + call abort() + end select + end subroutine class + subroutine classExplicit(u, n) + integer, intent(in) :: n + class(t), intent(in) :: u(n) + select type(u) + type is(t) + if (size (u) /= 10) call abort () + do i = 1, 10 + if (u(i)%a /= -i .or. size (u(i)%b) /= 4 & + .or. any (u(i)%b /= [1*i,2*i,3*i,4*i])) then + call abort() + end if + end do + class default + call abort() + end select + end subroutine classExplicit +end + diff --git a/gcc/testsuite/gfortran.dg/typebound_assignment_3.f03 b/gcc/testsuite/gfortran.dg/typebound_assignment_3.f03 index ce84a3957d0..2001589a9ca 100644 --- a/gcc/testsuite/gfortran.dg/typebound_assignment_3.f03 +++ b/gcc/testsuite/gfortran.dg/typebound_assignment_3.f03 @@ -24,7 +24,7 @@ end module use foo type (bar) :: foobar(2) - foobar = bar() ! { dg-error "currently not implemented" } + foobar = bar() ! There was a not-implemented error here end ! { dg-final { cleanup-modules "foo" } } diff --git a/gcc/testsuite/gfortran.dg/warn_function_without_result_2.f90 b/gcc/testsuite/gfortran.dg/warn_function_without_result_2.f90 new file mode 100644 index 00000000000..25fd0b73a75 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/warn_function_without_result_2.f90 @@ -0,0 +1,19 @@ +! { dg-do compile } +! { dg-options "-Wall" } +! +! PR fortran/50923 +! +module m +contains + integer pure function f() ! { dg-warning "Return value of function 'f' at .1. not set" } + end function f + integer pure function g() result(h) ! { dg-warning "Return value 'h' of function 'g' declared at .1. not set" } + end function g + integer pure function i() + i = 7 + end function i + integer pure function j() result(k) + k = 8 + end function j +end module m +! { dg-final { cleanup-modules "mod" } } diff --git a/gcc/testsuite/gnat.dg/specs/elab3.ads b/gcc/testsuite/gnat.dg/specs/elab3.ads new file mode 100644 index 00000000000..7af6f386d1f --- /dev/null +++ b/gcc/testsuite/gnat.dg/specs/elab3.ads @@ -0,0 +1,16 @@ +-- { dg-do compile } + +pragma Restrictions(No_Elaboration_Code); + +package Elab3 is + + type T_List is array (Positive range <>) of Integer; + type T_List_Access is access constant T_List; + + type R is record + A : T_List_Access; + end record; + + C : constant R := (A => null); + +end Elab3; diff --git a/gcc/testsuite/go.test/test/assign.go b/gcc/testsuite/go.test/test/assign.go index 59471388c06..2192f9ede08 100644 --- a/gcc/testsuite/go.test/test/assign.go +++ b/gcc/testsuite/go.test/test/assign.go @@ -16,38 +16,38 @@ type T struct { func main() { { var x, y sync.Mutex - x = y // ERROR "assignment.*Mutex" + x = y // ok _ = x } { var x, y T - x = y // ERROR "assignment.*Mutex" + x = y // ok _ = x } { var x, y [2]sync.Mutex - x = y // ERROR "assignment.*Mutex" + x = y // ok _ = x } { var x, y [2]T - x = y // ERROR "assignment.*Mutex" + x = y // ok _ = x } { - x := sync.Mutex{0, 0} // ERROR "assignment.*Mutex" + x := sync.Mutex{0, 0} // ERROR "assignment.*Mutex" _ = x } { - x := sync.Mutex{key: 0} // ERROR "(unknown|assignment).*Mutex" + x := sync.Mutex{key: 0} // ERROR "(unknown|assignment).*Mutex" _ = x } { - x := &sync.Mutex{} // ok - var y sync.Mutex // ok - y = *x // ERROR "assignment.*Mutex" - *x = y // ERROR "assignment.*Mutex" + x := &sync.Mutex{} // ok + var y sync.Mutex // ok + y = *x // ok + *x = y // ok _ = x _ = y - } + } } diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug226.dir/x.go b/gcc/testsuite/go.test/test/fixedbugs/bug226.dir/x.go deleted file mode 100644 index 64d7a29e7e1..00000000000 --- a/gcc/testsuite/go.test/test/fixedbugs/bug226.dir/x.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package x - -type T struct { x, Y int } - -func (t T) M() diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug226.dir/y.go b/gcc/testsuite/go.test/test/fixedbugs/bug226.dir/y.go deleted file mode 100644 index c66d592b7c0..00000000000 --- a/gcc/testsuite/go.test/test/fixedbugs/bug226.dir/y.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package y - -import "./x" - -func f() { - ok := new(x.T); - var ok1 x.T; - ok2 := &ok1; - ok3 := &x.T{}; - ok4 := &x.T{Y:2}; - _ = x.T{}; - _ = x.T{Y:2}; - - ok1.M(); - bad1 := *ok; // ERROR "assignment.*T" - bad2 := ok1; // ERROR "assignment.*T" - *ok4 = ok1; // ERROR "assignment.*T" - *ok4 = *ok2; // ERROR "assignment.*T" - ok1 = *ok4; // ERROR "assignment.*T" - _ = bad1; - _ = bad2; - _ = ok4; - _ = ok3; - _ = ok2; - _ = ok1; - _ = ok; -} diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug226.go b/gcc/testsuite/go.test/test/fixedbugs/bug226.go deleted file mode 100644 index 5457a64bc11..00000000000 --- a/gcc/testsuite/go.test/test/fixedbugs/bug226.go +++ /dev/null @@ -1,7 +0,0 @@ -// $G $D/$F.dir/x.go && errchk $G $D/$F.dir/y.go - -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -ignored diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug310.go b/gcc/testsuite/go.test/test/fixedbugs/bug310.go deleted file mode 100644 index 191f3ed2b4e..00000000000 --- a/gcc/testsuite/go.test/test/fixedbugs/bug310.go +++ /dev/null @@ -1,20 +0,0 @@ -// errchk $G $D/$F.go - -// Copyright 2010 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package p - -import ( - "bytes" - "fmt" -) - -type t int - -func main() { - _ = t.bar // ERROR "no method" - var b bytes.Buffer - fmt.Print(b) // ERROR "implicit assignment" -} diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug359.go b/gcc/testsuite/go.test/test/fixedbugs/bug359.go deleted file mode 100644 index 3701499ed20..00000000000 --- a/gcc/testsuite/go.test/test/fixedbugs/bug359.go +++ /dev/null @@ -1,26 +0,0 @@ -// errchk $G $D/$F.go - -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// issue 1910 -// error on wrong line - -package main - -import "container/list" - -type Painting struct { - fragments list.List // private -} - -func (p Painting) Foo() { - for e := p.fragments; e.Front() != nil; { // ERROR "unexported field|hidden field" - } -} - -// from comment 4 of issue 1910 -type Foo interface { - Run(a int) (a int) // ERROR "a redeclared|redefinition|previous" -} diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c index 9751a15a4d2..c32aee6d338 100644 --- a/gcc/trans-mem.c +++ b/gcc/trans-mem.c @@ -4481,7 +4481,6 @@ ipa_tm_transform_calls_redirect (struct cgraph_node *node, { *need_ssa_rename_p |= ipa_tm_insert_gettmclone_call (node, region, gsi, stmt); - cgraph_remove_edge (e); return; } diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index 57abca80e4e..7ab8a90a37f 100644 --- a/gcc/tree-eh.c +++ b/gcc/tree-eh.c @@ -3173,6 +3173,26 @@ struct gimple_opt_pass pass_lower_resx = } }; +/* Try to optimize var = {v} {CLOBBER} stmts followed just by + external throw. */ + +static void +optimize_clobbers (basic_block bb) +{ + gimple_stmt_iterator gsi = gsi_last_bb (bb); + for (gsi_prev (&gsi); !gsi_end_p (gsi); gsi_prev (&gsi)) + { + gimple stmt = gsi_stmt (gsi); + if (is_gimple_debug (stmt)) + continue; + if (!gimple_clobber_p (stmt) + || TREE_CODE (gimple_assign_lhs (stmt)) == SSA_NAME) + return; + unlink_stmt_vdef (stmt); + gsi_remove (&gsi, true); + release_defs (stmt); + } +} /* At the end of inlining, we can lower EH_DISPATCH. Return true when we have found some duplicate labels and removed some edges. */ @@ -3337,11 +3357,16 @@ execute_lower_eh_dispatch (void) FOR_EACH_BB (bb) { gimple last = last_stmt (bb); - if (last && gimple_code (last) == GIMPLE_EH_DISPATCH) + if (last == NULL) + continue; + if (gimple_code (last) == GIMPLE_EH_DISPATCH) { redirected |= lower_eh_dispatch (bb, last); any_rewritten = true; } + else if (gimple_code (last) == GIMPLE_RESX + && stmt_can_throw_external (last)) + optimize_clobbers (bb); } if (redirected) diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 22604030d4a..13ad8153fa9 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -4216,12 +4216,6 @@ optimize_inline_calls (tree fn) struct gimplify_ctx gctx; bool inlined_p = false; - /* There is no point in performing inlining if errors have already - occurred -- and we might crash if we try to inline invalid - code. */ - if (seen_error ()) - return 0; - /* Clear out ID. */ memset (&id, 0, sizeof (id)); diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index dec5316468c..346519a6af5 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -1067,26 +1067,29 @@ disqualify_ops_if_throwing_stmt (gimple stmt, tree lhs, tree rhs) return false; } -/* Return true iff type of EXP is not sufficiently aligned. */ +/* Return true if EXP is a memory reference less aligned than ALIGN. This is + invoked only on strict-alignment targets. */ static bool -tree_non_mode_aligned_mem_p (tree exp) +tree_non_aligned_mem_p (tree exp, unsigned int align) { - enum machine_mode mode = TYPE_MODE (TREE_TYPE (exp)); - unsigned int align; + unsigned int exp_align; if (TREE_CODE (exp) == VIEW_CONVERT_EXPR) exp = TREE_OPERAND (exp, 0); - if (TREE_CODE (exp) == SSA_NAME - || TREE_CODE (exp) == MEM_REF - || mode == BLKmode - || is_gimple_min_invariant (exp) - || !STRICT_ALIGNMENT) + if (TREE_CODE (exp) == SSA_NAME || is_gimple_min_invariant (exp)) return false; - align = get_object_alignment (exp); - if (GET_MODE_ALIGNMENT (mode) > align) + /* get_object_alignment will fall back to BITS_PER_UNIT if it cannot + compute an explicit alignment. Pretend that dereferenced pointers + are always aligned on strict-alignment targets. */ + if (TREE_CODE (exp) == MEM_REF || TREE_CODE (exp) == TARGET_MEM_REF) + exp_align = get_object_or_type_alignment (exp); + else + exp_align = get_object_alignment (exp); + + if (exp_align < align) return true; return false; @@ -1120,7 +1123,9 @@ build_accesses_from_assign (gimple stmt) if (lacc) { lacc->grp_assignment_write = 1; - lacc->grp_unscalarizable_region |= tree_non_mode_aligned_mem_p (rhs); + if (STRICT_ALIGNMENT + && tree_non_aligned_mem_p (rhs, get_object_alignment (lhs))) + lacc->grp_unscalarizable_region = 1; } if (racc) @@ -1129,7 +1134,9 @@ build_accesses_from_assign (gimple stmt) if (should_scalarize_away_bitmap && !gimple_has_volatile_ops (stmt) && !is_gimple_reg_type (racc->type)) bitmap_set_bit (should_scalarize_away_bitmap, DECL_UID (racc->base)); - racc->grp_unscalarizable_region |= tree_non_mode_aligned_mem_p (lhs); + if (STRICT_ALIGNMENT + && tree_non_aligned_mem_p (lhs, get_object_alignment (rhs))) + racc->grp_unscalarizable_region = 1; } if (lacc && racc @@ -3705,7 +3712,8 @@ access_precludes_ipa_sra_p (struct access *access) || gimple_code (access->stmt) == GIMPLE_ASM)) return true; - if (tree_non_mode_aligned_mem_p (access->expr)) + if (STRICT_ALIGNMENT + && tree_non_aligned_mem_p (access->expr, TYPE_ALIGN (access->type))) return true; return false; diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index f8207e078e4..a9a658f2c44 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -52,7 +52,8 @@ enum expr_kind EXPR_UNARY, EXPR_BINARY, EXPR_TERNARY, - EXPR_CALL + EXPR_CALL, + EXPR_PHI }; struct hashable_expr @@ -65,6 +66,7 @@ struct hashable_expr struct { enum tree_code op; tree opnd0, opnd1; } binary; struct { enum tree_code op; tree opnd0, opnd1, opnd2; } ternary; struct { gimple fn_from; bool pure; size_t nargs; tree *args; } call; + struct { size_t nargs; tree *args; } phi; } ops; }; @@ -265,7 +267,7 @@ initialize_hash_element (gimple stmt, tree lhs, expr->ops.call.pure = false; expr->ops.call.nargs = nargs; - expr->ops.call.args = (tree *) xcalloc (nargs, sizeof (tree)); + expr->ops.call.args = XCNEWVEC (tree, nargs); for (i = 0; i < nargs; i++) expr->ops.call.args[i] = gimple_call_arg (stmt, i); } @@ -281,6 +283,19 @@ initialize_hash_element (gimple stmt, tree lhs, expr->kind = EXPR_SINGLE; expr->ops.single.rhs = gimple_goto_dest (stmt); } + else if (code == GIMPLE_PHI) + { + size_t nargs = gimple_phi_num_args (stmt); + size_t i; + + expr->type = TREE_TYPE (gimple_phi_result (stmt)); + expr->kind = EXPR_PHI; + expr->ops.phi.nargs = nargs; + expr->ops.phi.args = XCNEWVEC (tree, nargs); + + for (i = 0; i < nargs; i++) + expr->ops.phi.args[i] = gimple_phi_arg_def (stmt, i); + } else gcc_unreachable (); @@ -439,6 +454,21 @@ hashable_expr_equal_p (const struct hashable_expr *expr0, return true; } + case EXPR_PHI: + { + size_t i; + + if (expr0->ops.phi.nargs != expr1->ops.phi.nargs) + return false; + + for (i = 0; i < expr0->ops.phi.nargs; i++) + if (! operand_equal_p (expr0->ops.phi.args[i], + expr1->ops.phi.args[i], 0)) + return false; + + return true; + } + default: gcc_unreachable (); } @@ -516,6 +546,15 @@ iterative_hash_hashable_expr (const struct hashable_expr *expr, hashval_t val) } break; + case EXPR_PHI: + { + size_t i; + + for (i = 0; i < expr->ops.phi.nargs; i++) + val = iterative_hash_expr (expr->ops.phi.args[i], val); + } + break; + default: gcc_unreachable (); } @@ -588,6 +627,22 @@ print_expr_hash_elt (FILE * stream, const struct expr_hash_elt *element) fprintf (stream, ")"); } break; + + case EXPR_PHI: + { + size_t i; + size_t nargs = element->expr.ops.phi.nargs; + + fprintf (stream, "PHI <"); + for (i = 0; i < nargs; i++) + { + print_generic_expr (stream, element->expr.ops.phi.args[i], 0); + if (i + 1 < nargs) + fprintf (stream, ", "); + } + fprintf (stream, ">"); + } + break; } fprintf (stream, "\n"); @@ -608,6 +663,9 @@ free_expr_hash_elt (void *elt) if (element->expr.kind == EXPR_CALL) free (element->expr.ops.call.args); + if (element->expr.kind == EXPR_PHI) + free (element->expr.ops.phi.args); + free (element); } @@ -1688,6 +1746,14 @@ dom_opt_enter_block (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED, /* PHI nodes can create equivalences too. */ record_equivalences_from_phis (bb); + /* Create equivalences from redundant PHIs. PHIs are only truly + redundant when they exist in the same block, so push another + marker and unwind right afterwards. */ + VEC_safe_push (expr_hash_elt_t, heap, avail_exprs_stack, NULL); + for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi)) + eliminate_redundant_computations (&gsi); + remove_local_expressions_from_table (); + for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi)) optimize_stmt (bb, gsi); @@ -1818,12 +1884,16 @@ eliminate_redundant_computations (gimple_stmt_iterator* gsi) { tree expr_type; tree cached_lhs; + tree def; bool insert = true; bool assigns_var_p = false; gimple stmt = gsi_stmt (*gsi); - tree def = gimple_get_lhs (stmt); + if (gimple_code (stmt) == GIMPLE_PHI) + def = gimple_phi_result (stmt); + else + def = gimple_get_lhs (stmt); /* Certain expressions on the RHS can be optimized away, but can not themselves be entered into the hash tables. */ @@ -1857,6 +1927,16 @@ eliminate_redundant_computations (gimple_stmt_iterator* gsi) } else if (gimple_code (stmt) == GIMPLE_SWITCH) expr_type = TREE_TYPE (gimple_switch_index (stmt)); + else if (gimple_code (stmt) == GIMPLE_PHI) + /* We can't propagate into a phi, so the logic below doesn't apply. + Instead record an equivalence between the cached LHS and the + PHI result of this statement, provided they are in the same block. + This should be sufficient to kill the redundant phi. */ + { + if (def && cached_lhs) + record_const_or_copy (def, cached_lhs); + return; + } else gcc_unreachable (); @@ -2297,8 +2377,11 @@ lookup_avail_expr (gimple stmt, bool insert) tree temp; struct expr_hash_elt element; - /* Get LHS of assignment or call, else NULL_TREE. */ - lhs = gimple_get_lhs (stmt); + /* Get LHS of phi, assignment, or call; else NULL_TREE. */ + if (gimple_code (stmt) == GIMPLE_PHI) + lhs = gimple_phi_result (stmt); + else + lhs = gimple_get_lhs (stmt); initialize_hash_element (stmt, lhs, &element); diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index 6ab47317770..20821ef8b98 100644 --- a/gcc/tree-ssa-forwprop.c +++ b/gcc/tree-ssa-forwprop.c @@ -929,10 +929,12 @@ forward_propagate_addr_expr_1 (tree name, tree def_rhs, *def_rhs_basep = build2 (MEM_REF, TREE_TYPE (*def_rhs_basep), new_base, new_offset); TREE_THIS_VOLATILE (*def_rhs_basep) = TREE_THIS_VOLATILE (lhs); + TREE_SIDE_EFFECTS (*def_rhs_basep) = TREE_SIDE_EFFECTS (lhs); TREE_THIS_NOTRAP (*def_rhs_basep) = TREE_THIS_NOTRAP (lhs); new_lhs = unshare_expr (TREE_OPERAND (def_rhs, 0)); gimple_assign_set_lhs (use_stmt, new_lhs); TREE_THIS_VOLATILE (new_lhs) = TREE_THIS_VOLATILE (lhs); + TREE_SIDE_EFFECTS (new_lhs) = TREE_SIDE_EFFECTS (lhs); *def_rhs_basep = saved; tidy_after_forward_propagate_addr (use_stmt); /* Continue propagating into the RHS if this was not the @@ -1011,10 +1013,12 @@ forward_propagate_addr_expr_1 (tree name, tree def_rhs, *def_rhs_basep = build2 (MEM_REF, TREE_TYPE (*def_rhs_basep), new_base, new_offset); TREE_THIS_VOLATILE (*def_rhs_basep) = TREE_THIS_VOLATILE (rhs); + TREE_SIDE_EFFECTS (*def_rhs_basep) = TREE_SIDE_EFFECTS (rhs); TREE_THIS_NOTRAP (*def_rhs_basep) = TREE_THIS_NOTRAP (rhs); new_rhs = unshare_expr (TREE_OPERAND (def_rhs, 0)); gimple_assign_set_rhs1 (use_stmt, new_rhs); TREE_THIS_VOLATILE (new_rhs) = TREE_THIS_VOLATILE (rhs); + TREE_SIDE_EFFECTS (new_rhs) = TREE_SIDE_EFFECTS (rhs); *def_rhs_basep = saved; fold_stmt_inplace (use_stmt_gsi); tidy_after_forward_propagate_addr (use_stmt); diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c index 3de34be7948..0045dd875ec 100644 --- a/gcc/tree-ssa-operands.c +++ b/gcc/tree-ssa-operands.c @@ -668,7 +668,8 @@ add_stmt_operand (tree *var_p, gimple stmt, int flags) sym = (TREE_CODE (var) == SSA_NAME ? SSA_NAME_VAR (var) : var); /* Mark statements with volatile operands. */ - if (TREE_THIS_VOLATILE (sym)) + if (!(flags & opf_no_vops) + && TREE_THIS_VOLATILE (sym)) gimple_set_has_volatile_ops (stmt, true); if (is_gimple_reg (sym)) @@ -728,7 +729,8 @@ get_indirect_ref_operands (gimple stmt, tree expr, int flags, { tree *pptr = &TREE_OPERAND (expr, 0); - if (TREE_THIS_VOLATILE (expr)) + if (!(flags & opf_no_vops) + && TREE_THIS_VOLATILE (expr)) gimple_set_has_volatile_ops (stmt, true); /* Add the VOP. */ @@ -747,7 +749,8 @@ get_indirect_ref_operands (gimple stmt, tree expr, int flags, static void get_tmr_operands (gimple stmt, tree expr, int flags) { - if (TREE_THIS_VOLATILE (expr)) + if (!(flags & opf_no_vops) + && TREE_THIS_VOLATILE (expr)) gimple_set_has_volatile_ops (stmt, true); /* First record the real operands. */ @@ -914,14 +917,16 @@ get_expr_operands (gimple stmt, tree *expr_p, int flags) case REALPART_EXPR: case IMAGPART_EXPR: { - if (TREE_THIS_VOLATILE (expr)) + if (!(flags & opf_no_vops) + && TREE_THIS_VOLATILE (expr)) gimple_set_has_volatile_ops (stmt, true); get_expr_operands (stmt, &TREE_OPERAND (expr, 0), flags); if (code == COMPONENT_REF) { - if (TREE_THIS_VOLATILE (TREE_OPERAND (expr, 1))) + if (!(flags & opf_no_vops) + && TREE_THIS_VOLATILE (TREE_OPERAND (expr, 1))) gimple_set_has_volatile_ops (stmt, true); get_expr_operands (stmt, &TREE_OPERAND (expr, 2), uflags); } @@ -960,7 +965,8 @@ get_expr_operands (gimple stmt, tree *expr_p, int flags) /* A volatile constructor is actually TREE_CLOBBER_P, transfer the volatility to the statement, don't use TREE_CLOBBER_P for mirroring the other uses of THIS_VOLATILE in this file. */ - if (TREE_THIS_VOLATILE (expr)) + if (!(flags & opf_no_vops) + && TREE_THIS_VOLATILE (expr)) gimple_set_has_volatile_ops (stmt, true); for (idx = 0; @@ -972,7 +978,8 @@ get_expr_operands (gimple stmt, tree *expr_p, int flags) } case BIT_FIELD_REF: - if (TREE_THIS_VOLATILE (expr)) + if (!(flags & opf_no_vops) + && TREE_THIS_VOLATILE (expr)) gimple_set_has_volatile_ops (stmt, true); /* FALLTHRU */ diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index 8111bdc61ac..6a85b7bf4aa 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -2896,6 +2896,26 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo, return false; } + if (is_gimple_call (stmt)) + { + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOCATIONS)) + { + fprintf (vect_dump, "not vectorized: dr in a call "); + print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM); + } + + if (bb_vinfo) + { + STMT_VINFO_VECTORIZABLE (stmt_info) = false; + stop_bb_analysis = true; + continue; + } + + if (gather) + free_data_ref (dr); + return false; + } + /* Update DR field in stmt_vec_info struct. */ /* If the dataref is in an inner-loop of the loop that is considered for diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 8589a850df9..046a76fd8ae 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -5705,6 +5705,10 @@ get_vectype_for_scalar_type_and_size (tree scalar_type, unsigned size) if (nbytes == 0) return NULL_TREE; + if (GET_MODE_CLASS (inner_mode) != MODE_INT + && GET_MODE_CLASS (inner_mode) != MODE_FLOAT) + return NULL_TREE; + /* We can't build a vector type of elements with alignment bigger than their size. */ if (nbytes < TYPE_ALIGN_UNIT (scalar_type)) @@ -5713,16 +5717,15 @@ get_vectype_for_scalar_type_and_size (tree scalar_type, unsigned size) /* For vector types of elements whose mode precision doesn't match their types precision we use a element type of mode precision. The vectorization routines will have to make sure - they support the proper result truncation/extension. */ + they support the proper result truncation/extension. + We also make sure to build vector types with INTEGER_TYPE + component type only. */ if (INTEGRAL_TYPE_P (scalar_type) - && GET_MODE_BITSIZE (inner_mode) != TYPE_PRECISION (scalar_type)) + && (GET_MODE_BITSIZE (inner_mode) != TYPE_PRECISION (scalar_type) + || TREE_CODE (scalar_type) != INTEGER_TYPE)) scalar_type = build_nonstandard_integer_type (GET_MODE_BITSIZE (inner_mode), TYPE_UNSIGNED (scalar_type)); - if (GET_MODE_CLASS (inner_mode) != MODE_INT - && GET_MODE_CLASS (inner_mode) != MODE_FLOAT) - return NULL_TREE; - /* We shouldn't end up building VECTOR_TYPEs of non-scalar components. When the component mode passes the above test simply use a type corresponding to that mode. The theory is that any use that diff --git a/gcc/tree.c b/gcc/tree.c index 4cadc7ef8c4..cbe55421181 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -4600,11 +4600,6 @@ free_lang_data_in_decl (tree decl) if (TREE_CODE (decl) == FIELD_DECL) free_lang_data_in_one_sizepos (&DECL_FIELD_OFFSET (decl)); - /* DECL_FCONTEXT is only used for debug info generation. */ - if (TREE_CODE (decl) == FIELD_DECL - && debug_info_level < DINFO_LEVEL_TERSE) - DECL_FCONTEXT (decl) = NULL_TREE; - if (TREE_CODE (decl) == FUNCTION_DECL) { if (gimple_has_body_p (decl)) @@ -9442,6 +9437,7 @@ void build_common_builtin_nodes (void) { tree tmp, ftype; + int ecf_flags; if (!builtin_decl_explicit_p (BUILT_IN_MEMCPY) || !builtin_decl_explicit_p (BUILT_IN_MEMMOVE)) @@ -9594,9 +9590,12 @@ build_common_builtin_nodes (void) its value in the landing pad. */ ftype = build_function_type_list (ptr_type_node, integer_type_node, NULL_TREE); + ecf_flags = ECF_PURE | ECF_NOTHROW | ECF_LEAF; + /* Only use TM_PURE if we we have TM language support. */ + if (builtin_decl_explicit_p (BUILT_IN_TM_LOAD_1)) + ecf_flags |= ECF_TM_PURE; local_define_builtin ("__builtin_eh_pointer", ftype, BUILT_IN_EH_POINTER, - "__builtin_eh_pointer", - ECF_PURE | ECF_NOTHROW | ECF_LEAF | ECF_TM_PURE); + "__builtin_eh_pointer", ecf_flags); tmp = lang_hooks.types.type_for_mode (targetm.eh_return_filter_mode (), 0); ftype = build_function_type_list (tmp, integer_type_node, NULL_TREE); diff --git a/gcc/tree.h b/gcc/tree.h index 4544f1ad126..a72a3f613e4 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -5457,6 +5457,7 @@ extern rtx builtin_memset_read_str (void *, HOST_WIDE_INT, enum machine_mode); extern bool is_builtin_fn (tree); extern unsigned int get_object_alignment_1 (tree, unsigned HOST_WIDE_INT *); extern unsigned int get_object_alignment (tree); +extern unsigned int get_object_or_type_alignment (tree); extern unsigned int get_pointer_alignment (tree); extern tree fold_call_stmt (gimple, bool); extern tree gimple_fold_builtin_snprintf_chk (gimple, tree, enum built_in_function); diff --git a/gcc/varasm.c b/gcc/varasm.c index 78dc4cd83f0..86134672cbe 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -6911,11 +6911,14 @@ default_binds_local_p_1 (const_tree exp, int shlib) /* A non-decl is an entry in the constant pool. */ if (!DECL_P (exp)) local_p = true; - /* Weakrefs may not bind locally, even though the weakref itself is - always static and therefore local. - FIXME: We can resolve this more curefuly by looking at the weakref - alias. */ - else if (lookup_attribute ("weakref", DECL_ATTRIBUTES (exp))) + /* Weakrefs may not bind locally, even though the weakref itself is always + static and therefore local. Similarly, the resolver for ifunc functions + might resolve to a non-local function. + FIXME: We can resolve the weakref case more curefuly by looking at the + weakref alias. */ + else if (lookup_attribute ("weakref", DECL_ATTRIBUTES (exp)) + || (TREE_CODE (exp) == FUNCTION_DECL + && lookup_attribute ("ifunc", DECL_ATTRIBUTES (exp)))) local_p = false; /* Static variables are always local. */ else if (! TREE_PUBLIC (exp)) diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index f47bf03a341..890075db64d 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,13 @@ +2011-12-07 Jakub Jelinek <jakub@redhat.com> + + PR bootstrap/50237 + * internal.h (_cpp_init_lexer): New prototype. + * init.c (init_library): Call it. + * lex.c (init_vectorized_lexer): Remove constructor attribute, + add inline keyword. + (HAVE_init_vectorized_lexer): Define. + (_cpp_init_lexer): New function. + 2011-12-03 Dodji Seketeli <dodji@redhat.com> * macro.c (tokens_buff_remove_last_token) diff --git a/libcpp/init.c b/libcpp/init.c index 9101b34e086..ff006b11502 100644 --- a/libcpp/init.c +++ b/libcpp/init.c @@ -134,6 +134,8 @@ init_library (void) { initialized = 1; + _cpp_init_lexer (); + /* Set up the trigraph map. This doesn't need to do anything if we were compiled with a compiler that supports C99 designated initializers. */ diff --git a/libcpp/internal.h b/libcpp/internal.h index b3dc2df10bf..7e2932a6035 100644 --- a/libcpp/internal.h +++ b/libcpp/internal.h @@ -653,6 +653,7 @@ extern int _cpp_equiv_tokens (const cpp_token *, const cpp_token *); extern void _cpp_init_tokenrun (tokenrun *, unsigned int); extern cpp_hashnode *_cpp_lex_identifier (cpp_reader *, const char *); extern int _cpp_remaining_tokens_num_in_context (cpp_context *); +extern void _cpp_init_lexer (void); /* In init.c. */ extern void _cpp_maybe_push_include_file (cpp_reader *); diff --git a/libcpp/lex.c b/libcpp/lex.c index fcec329d8b4..0ad9660a76b 100644 --- a/libcpp/lex.c +++ b/libcpp/lex.c @@ -477,7 +477,8 @@ search_line_sse42 (const uchar *s, const uchar *end) typedef const uchar * (*search_line_fast_type) (const uchar *, const uchar *); static search_line_fast_type search_line_fast; -static void __attribute__((constructor)) +#define HAVE_init_vectorized_lexer 1 +static inline void init_vectorized_lexer (void) { unsigned dummy, ecx = 0, edx = 0; @@ -638,6 +639,16 @@ search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED) #endif +/* Initialize the lexer if needed. */ + +void +_cpp_init_lexer (void) +{ +#ifdef HAVE_init_vectorized_lexer + init_vectorized_lexer (); +#endif +} + /* Returns with a logical line that contains no escaped newlines or trigraphs. This is a time-critical inner loop. */ void diff --git a/libffi/ChangeLog b/libffi/ChangeLog index 113a1617cbe..28558999163 100644 --- a/libffi/ChangeLog +++ b/libffi/ChangeLog @@ -1,3 +1,8 @@ +2011-12-07 Andrew Pinski <apinski@cavium.com> + + PR libffi/50051 + * src/mips/n32.S: Add ".set mips4". + 2011-11-21 Andreas Tobler <andreast@fgznet.ch> * configure: Regenerate. diff --git a/libffi/src/mips/n32.S b/libffi/src/mips/n32.S index ae23094667c..ff4bbce1dec 100644 --- a/libffi/src/mips/n32.S +++ b/libffi/src/mips/n32.S @@ -43,6 +43,7 @@ #ifdef __GNUC__ .abicalls #endif + .set mips4 .text .align 2 .globl ffi_call_N32 diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index d74aeb9e00e..5122e9f1af4 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,13 @@ +2011-12-11 Eric Botcazou <ebotcazou@adacore.com> + + * config/sparc/sol2-unwind.h: Use #ifdef directive consistently. + +2011-12-09 Georg-Johann Lay <avr@gjlay.de> + + PR target/49313 + * config/avr/t-avr (LIB1ASMFUNCS): Add _muldi3. + * config/avr/lib1funcs.S (__muldi3): New function. + 2011-12-06 Andrew Pinski <apinski@cavium.com> * crtstuff.c (__do_global_dtors_aux_fini_array_entry): Align to the diff --git a/libgcc/config/avr/lib1funcs.S b/libgcc/config/avr/lib1funcs.S index 3545d095b60..07490fbb20a 100644 --- a/libgcc/config/avr/lib1funcs.S +++ b/libgcc/config/avr/lib1funcs.S @@ -464,6 +464,249 @@ ENDF __mulsi3 #undef C3 #endif /* __AVR_HAVE_MUL__ */ + +/******************************************************* + Multiplication 64 x 64 +*******************************************************/ + +#if defined (L_muldi3) + +;; A[] = A[] * B[] + +;; A[0..7]: In: Multiplicand +;; Out: Product +#define A0 18 +#define A1 A0+1 +#define A2 A0+2 +#define A3 A0+3 +#define A4 A0+4 +#define A5 A0+5 +#define A6 A0+6 +#define A7 A0+7 + +;; B[0..7]: In: Multiplier +#define B0 10 +#define B1 B0+1 +#define B2 B0+2 +#define B3 B0+3 +#define B4 B0+4 +#define B5 B0+5 +#define B6 B0+6 +#define B7 B0+7 + +#if defined (__AVR_HAVE_MUL__) + +;; Define C[] for convenience +;; Notice that parts of C[] overlap A[] respective B[] +#define C0 16 +#define C1 C0+1 +#define C2 20 +#define C3 C2+1 +#define C4 28 +#define C5 C4+1 +#define C6 C4+2 +#define C7 C4+3 + +;; A[] *= B[] +;; R25:R18 *= R17:R10 +;; Ordinary ABI-Function + +DEFUN __muldi3 + push r29 + push r28 + push r17 + push r16 + + ;; Counting in Words, we have to perform a 4 * 4 Multiplication + + ;; 3 * 0 + 0 * 3 + mul A7,B0 $ $ mov C7,r0 + mul A0,B7 $ $ add C7,r0 + mul A6,B1 $ $ add C7,r0 + mul A6,B0 $ mov C6,r0 $ add C7,r1 + mul B6,A1 $ $ add C7,r0 + mul B6,A0 $ add C6,r0 $ adc C7,r1 + + ;; 1 * 2 + mul A2,B4 $ add C6,r0 $ adc C7,r1 + mul A3,B4 $ $ add C7,r0 + mul A2,B5 $ $ add C7,r0 + + push A5 + push A4 + push B1 + push B0 + push A3 + push A2 + + ;; 0 * 0 + wmov 26, B0 + XCALL __umulhisi3 + wmov C0, 22 + wmov C2, 24 + + ;; 0 * 2 + wmov 26, B4 + XCALL __umulhisi3 $ wmov C4,22 $ add C6,24 $ adc C7,25 + + wmov 26, B2 + ;; 0 * 1 + rcall __muldi3_6 + + pop A0 + pop A1 + ;; 1 * 1 + wmov 26, B2 + XCALL __umulhisi3 $ add C4,22 $ adc C5,23 $ adc C6,24 $ adc C7,25 + + pop r26 + pop r27 + ;; 1 * 0 + rcall __muldi3_6 + + pop A0 + pop A1 + ;; 2 * 0 + XCALL __umulhisi3 $ add C4,22 $ adc C5,23 $ adc C6,24 $ adc C7,25 + + ;; 2 * 1 + wmov 26, B2 + XCALL __umulhisi3 $ $ $ add C6,22 $ adc C7,23 + + ;; A[] = C[] + wmov A0, C0 + ;; A2 = C2 already + wmov A4, C4 + wmov A6, C6 + + clr __zero_reg__ + pop r16 + pop r17 + pop r28 + pop r29 + ret + +__muldi3_6: + XCALL __umulhisi3 + add C2, 22 + adc C3, 23 + adc C4, 24 + adc C5, 25 + brcc 0f + adiw C6, 1 +0: ret +ENDF __muldi3 + +#undef C7 +#undef C6 +#undef C5 +#undef C4 +#undef C3 +#undef C2 +#undef C1 +#undef C0 + +#else /* !HAVE_MUL */ + +#define C0 26 +#define C1 C0+1 +#define C2 C0+2 +#define C3 C0+3 +#define C4 C0+4 +#define C5 C0+5 +#define C6 0 +#define C7 C6+1 + +#define Loop 9 + +;; A[] *= B[] +;; R25:R18 *= R17:R10 +;; Ordinary ABI-Function + +DEFUN __muldi3 + push r29 + push r28 + push Loop + + ldi C0, 64 + mov Loop, C0 + + ;; C[] = 0 + clr __tmp_reg__ + wmov C0, 0 + wmov C2, 0 + wmov C4, 0 + +0: ;; Rotate B[] right by 1 and set Carry to the N-th Bit of B[] + ;; where N = 64 - Loop. + ;; Notice that B[] = B[] >>> 64 so after this Routine has finished, + ;; B[] will have its initial Value again. + LSR B7 $ ror B6 $ ror B5 $ ror B4 + ror B3 $ ror B2 $ ror B1 $ ror B0 + + ;; If the N-th Bit of B[] was set then... + brcc 1f + ;; ...finish Rotation... + ori B7, 1 << 7 + + ;; ...and add A[] * 2^N to the Result C[] + ADD C0,A0 $ adc C1,A1 $ adc C2,A2 $ adc C3,A3 + adc C4,A4 $ adc C5,A5 $ adc C6,A6 $ adc C7,A7 + +1: ;; Multiply A[] by 2 + LSL A0 $ rol A1 $ rol A2 $ rol A3 + rol A4 $ rol A5 $ rol A6 $ rol A7 + + dec Loop + brne 0b + + ;; We expanded the Result in C[] + ;; Copy Result to the Return Register A[] + wmov A0, C0 + wmov A2, C2 + wmov A4, C4 + wmov A6, C6 + + clr __zero_reg__ + pop Loop + pop r28 + pop r29 + ret +ENDF __muldi3 + +#undef Loop + +#undef C7 +#undef C6 +#undef C5 +#undef C4 +#undef C3 +#undef C2 +#undef C1 +#undef C0 + +#endif /* HAVE_MUL */ + +#undef B7 +#undef B6 +#undef B5 +#undef B4 +#undef B3 +#undef B2 +#undef B1 +#undef B0 + +#undef A7 +#undef A6 +#undef A5 +#undef A4 +#undef A3 +#undef A2 +#undef A1 +#undef A0 + +#endif /* L_muldi3 */ + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/libgcc/config/avr/t-avr b/libgcc/config/avr/t-avr index b5c8d05186a..c6806dc0ece 100644 --- a/libgcc/config/avr/t-avr +++ b/libgcc/config/avr/t-avr @@ -16,6 +16,7 @@ LIB1ASMFUNCS = \ _udivmodsi4 \ _divmodsi4 \ _divdi3 _udivdi3 \ + _muldi3 \ _udivmod64 \ _negdi2 \ _prologue \ diff --git a/libgcc/config/sparc/sol2-unwind.h b/libgcc/config/sparc/sol2-unwind.h index 129405e95ba..54a97b0690b 100644 --- a/libgcc/config/sparc/sol2-unwind.h +++ b/libgcc/config/sparc/sol2-unwind.h @@ -29,7 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include <sys/frame.h> #include <sys/stack.h> -#if defined(__arch64__) +#ifdef __arch64__ #define IS_SIGHANDLER sparc64_is_sighandler diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index 976102f3a8e..f71e96f75de 100644 --- a/libgfortran/io/transfer.c +++ b/libgfortran/io/transfer.c @@ -1063,6 +1063,25 @@ require_type (st_parameter_dt *dtp, bt expected, bt actual, const fnode *f) } +static int +require_numeric_type (st_parameter_dt *dtp, bt actual, const fnode *f) +{ +#define BUFLEN 100 + char buffer[BUFLEN]; + + if (actual == BT_INTEGER || actual == BT_REAL || actual == BT_COMPLEX) + return 0; + + /* Adjust item_count before emitting error message. */ + snprintf (buffer, BUFLEN, + "Expected numeric type for item %d in formatted transfer, got %s", + dtp->u.p.item_count - 1, type_name (actual)); + + format_error (dtp, f, buffer); + return 1; +} + + /* This function is in the main loop for a formatted data transfer statement. It would be natural to implement this as a coroutine with the user program, but C makes that awkward. We loop, @@ -1147,6 +1166,9 @@ formatted_transfer_scalar_read (st_parameter_dt *dtp, bt type, void *p, int kind if (n == 0) goto need_read_data; if (!(compile_options.allow_std & GFC_STD_GNU) + && require_numeric_type (dtp, type, f)) + return; + if (!(compile_options.allow_std & GFC_STD_F2008) && require_type (dtp, BT_INTEGER, type, f)) return; read_radix (dtp, f, p, kind, 2); @@ -1156,6 +1178,9 @@ formatted_transfer_scalar_read (st_parameter_dt *dtp, bt type, void *p, int kind if (n == 0) goto need_read_data; if (!(compile_options.allow_std & GFC_STD_GNU) + && require_numeric_type (dtp, type, f)) + return; + if (!(compile_options.allow_std & GFC_STD_F2008) && require_type (dtp, BT_INTEGER, type, f)) return; read_radix (dtp, f, p, kind, 8); @@ -1165,6 +1190,9 @@ formatted_transfer_scalar_read (st_parameter_dt *dtp, bt type, void *p, int kind if (n == 0) goto need_read_data; if (!(compile_options.allow_std & GFC_STD_GNU) + && require_numeric_type (dtp, type, f)) + return; + if (!(compile_options.allow_std & GFC_STD_F2008) && require_type (dtp, BT_INTEGER, type, f)) return; read_radix (dtp, f, p, kind, 16); @@ -1548,6 +1576,9 @@ formatted_transfer_scalar_write (st_parameter_dt *dtp, bt type, void *p, int kin if (n == 0) goto need_data; if (!(compile_options.allow_std & GFC_STD_GNU) + && require_numeric_type (dtp, type, f)) + return; + if (!(compile_options.allow_std & GFC_STD_F2008) && require_type (dtp, BT_INTEGER, type, f)) return; write_b (dtp, f, p, kind); @@ -1557,6 +1588,9 @@ formatted_transfer_scalar_write (st_parameter_dt *dtp, bt type, void *p, int kin if (n == 0) goto need_data; if (!(compile_options.allow_std & GFC_STD_GNU) + && require_numeric_type (dtp, type, f)) + return; + if (!(compile_options.allow_std & GFC_STD_F2008) && require_type (dtp, BT_INTEGER, type, f)) return; write_o (dtp, f, p, kind); @@ -1566,6 +1600,9 @@ formatted_transfer_scalar_write (st_parameter_dt *dtp, bt type, void *p, int kin if (n == 0) goto need_data; if (!(compile_options.allow_std & GFC_STD_GNU) + && require_numeric_type (dtp, type, f)) + return; + if (!(compile_options.allow_std & GFC_STD_F2008) && require_type (dtp, BT_INTEGER, type, f)) return; write_z (dtp, f, p, kind); diff --git a/libgo/go/log/syslog/syslog_c.c b/libgo/go/log/syslog/syslog_c.c index f49b9ffcb1c..5809d0a94a9 100644 --- a/libgo/go/log/syslog/syslog_c.c +++ b/libgo/go/log/syslog/syslog_c.c @@ -10,7 +10,7 @@ can't represent a C varargs function in Go. */ void syslog_c(int, const char*) - asm ("libgo_syslog.syslog.syslog_c"); + asm ("libgo_log.syslog.syslog_c"); void syslog_c (int priority, const char *msg) diff --git a/libgo/runtime/go-print.c b/libgo/runtime/go-print.c index 095909de2bf..bf3c2af7128 100644 --- a/libgo/runtime/go-print.c +++ b/libgo/runtime/go-print.c @@ -18,43 +18,43 @@ void __go_print_space () { - putchar (' '); + putc (' ', stderr); } void __go_print_nl () { - putchar ('\n'); + putc ('\n', stderr); } void __go_print_string (struct __go_string val) { - printf ("%.*s", (int) val.__length, (const char *) val.__data); + fprintf (stderr, "%.*s", (int) val.__length, (const char *) val.__data); } void __go_print_uint64 (uint64_t val) { - printf ("%llu", (unsigned long long) val); + fprintf (stderr, "%llu", (unsigned long long) val); } void __go_print_int64 (int64_t val) { - printf ("%lld", (long long) val); + fprintf (stderr, "%lld", (long long) val); } void __go_print_double (double val) { - printf ("%.24g", val); + fprintf (stderr, "%.24g", val); } void __go_print_complex (__complex double val) { - printf ("(%.24g%s%.24gi)", + fprintf (stderr, "(%.24g%s%.24gi)", __builtin_creal (val), (__builtin_cimag (val) >= 0 || __builtin_isnan (__builtin_cimag(val)) ? "+" @@ -65,29 +65,29 @@ __go_print_complex (__complex double val) void __go_print_bool (_Bool val) { - fputs (val ? "true" : "false", stdout); + fputs (val ? "true" : "false", stderr); } void __go_print_pointer (void *val) { - printf ("%p", val); + fprintf (stderr, "%p", val); } void __go_print_empty_interface (struct __go_empty_interface e) { - printf ("(%p,%p)", e.__type_descriptor, e.__object); + fprintf (stderr, "(%p,%p)", e.__type_descriptor, e.__object); } void __go_print_interface (struct __go_interface i) { - printf ("(%p,%p)", i.__methods, i.__object); + fprintf (stderr, "(%p,%p)", i.__methods, i.__object); } void __go_print_slice (struct __go_open_array val) { - printf ("[%d/%d]%p", val.__count, val.__capacity, val.__values); + fprintf (stderr, "[%d/%d]%p", val.__count, val.__capacity, val.__values); } diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index cf3f0043026..6af961d93b0 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,10 @@ +2011-12-09 Alan Modra <amodra@gmail.com> + + PR libgomp/51376 + * task.c (GOMP_taskwait): Don't access task->children outside of + task_lock mutex region. + (GOMP_task): Likewise. + 2011-12-06 Jakub Jelinek <jakub@redhat.com> PR libgomp/51132 diff --git a/libgomp/task.c b/libgomp/task.c index d3d72663f35..4b75850072b 100644 --- a/libgomp/task.c +++ b/libgomp/task.c @@ -116,10 +116,11 @@ GOMP_task (void (*fn) (void *), void *data, void (*cpyfn) (void *, void *), } else fn (data); - if (task.children) + if (team != NULL) { gomp_mutex_lock (&team->task_lock); - gomp_clear_parent (task.children); + if (task.children != NULL) + gomp_clear_parent (task.children); gomp_mutex_unlock (&team->task_lock); } gomp_end_task (); @@ -290,8 +291,9 @@ GOMP_taskwait (void) struct gomp_task *child_task = NULL; struct gomp_task *to_free = NULL; - if (task == NULL || task->children == NULL) + if (task == NULL || team == NULL) return; + gomp_mutex_lock (&team->task_lock); while (1) { diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 065b6357e96..72dfa7c44b3 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,93 @@ +2011-12-11 Jonathan Wakely <jwakely.gcc@gmail.com> + + * doc/xml/manual/abi.xml: Replace gcc-x.y.z with GCC x.y.z or x.y, + remove excessive duplication of version information. + * doc/html/*: Regenerate. + +2011-12-10 Benjamin Kosnik <bkoz@redhat.com> + + * doc/doxygen/user.cfg.in: Add macros, directories. + * include/bits/locale_classes.h: Remove doxygen warnings, fix markup. + * include/bits/locale_classes.tcc: Same. + * include/bits/shared_ptr.h: Same. + * include/bits/stl_algo.h: Same. + * include/bits/stl_list.h: Same. + * include/bits/stl_numeric.h: Same. + * include/debug/safe_base.h: Same. + * include/parallel/equally_split.h: Same. + * include/std/bitset: Same. + * include/std/complex: Same. + * include/std/fstream: Same. + * include/std/istream: Same. + * include/std/ostream: Same. + * include/tr2/dynamic_bitset: Same. + * scripts/run_doxygen: Remove munging for names that no longer exist. + + * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: + Adjust line numbers. + * testsuite/23_containers/list/requirements/dr438/ + constructor_1_neg.cc: Same. + * testsuite/23_containers/list/requirements/dr438/ + constructor_2_neg.cc: Same. + * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. + +2011-12-10 François Dumont <fdumont@gcc.gnu.org> + + * include/profile/unordered_set: Minor formatting changes. + (unordered_set<>::_M_profile_destruct, + unordered_multiset<>::_M_profile_destruct): Fix implementation to not + rely on normal implementation details anymore. + (unordered_set<>::_M_profile_resize, + unordered_multiset<>::_M_profile_resize): Implement consistently + accross all unordered containers. + (unordered_set<>::emplace, unordered_set<>::emplace_hint, + unordered_multiset<>::emplace, unordered_multset<>::emplace_hint): Add + to signal rehash to profiling system. + * include/profile/unordered_map: Likewise for unordered_map<> and + unordered_multimap<>. + +2011-12-09 François Dumont <fdumont@gcc.gnu.org> + + PR libstdc++/44436 (unordered containers emplace, emplace_hint bits) + * include/bits/hashtable.h (_Hashtable<>::emplace, + _Hashtable<>::emplace_hint): Add. + * include/debug/unordered_set (unordered_set<>::emplace, + unordered_set<>::emplace_hint, unordered_multiset<>::emplace, + unordered_multiset<>::emplace_hint): Add. + * include/profile/unordered_set: Likewise. + * include/debug/unordered_map (unordered_map<>::emplace, + unordered_map<>::emplace_hint, unordered_multimap<>::emplace, + unordered_multimap<>::emplace_hint): Add. + * include/profile/unordered_map: Likewise. + * testsuite/23_containers/unordered_map/modifiers/emplace.cc: New. + * testsuite/23_containers/unordered_multimap/modifiers/emplace.cc: + New. + * testsuite/23_containers/unordered_set/modifiers/emplace.cc: New. + * testsuite/23_containers/unordered_multiset/modifiers/emplace.cc: + New. + * testsuite/util/testsuite_container_traits.h + (traits_base::has_emplace): Add and defined as std::true_type for + unordered containers. + * testsuite/util/exception/safety.h (emplace, emplace_hint): Add and + use them in basic_safety exception test case. + * doc/xml/manual/status_cxx2011.xml: Update unordered containers + status. + +2011-12-08 Jonathan Wakely <jwakely.gcc@gmail.com> + + * include/bits/atomic_base.h (__calculate_memory_order): Rename to... + (__cmpexch_failure_order): This, and rewrite as constexpr function. + (compare_exchange_strong, compare_exchange_weak): Use it. + * include/std/atomic (compare_exchange_strong, compare_exchange_weak): + Likewise. + +2011-12-07 François Dumont <fdumont@gcc.gnu.org> + + PR libstdc++/51386 + * include/bits/hashtable_policy.h (_Prime_rehash_policy::_M_next_bkt): + Fix computation of _M_prev_resize so that hashtable do not keep on + being rehashed when _M_max_load_factor is lower than 1. + 2011-12-06 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/51438 @@ -63,7 +153,7 @@ Likewise. 2011-12-04 Markus Trippelsdorf <markus@trippelsdorf.de> - Jonathan Wakely <jwakely.gcc@gmail.com> + Jonathan Wakely <jwakely.gcc@gmail.com> * include/bits/stl_heap.h (pop_heap): Check for non-empty range in overload taking a predicate. @@ -89,37 +179,37 @@ 2011-11-30 Benjamin Kosnik <bkoz@redhat.com> - * acinclude.m4 (GLIBCXX_ENABLE_ATOMIC_BUILTINS): Remove - size-specific macros. _GLIBCXX_ATOMIC_BUILTINS_1, - _GLIBCXX_ATOMIC_BUILTINS_2, _GLIBCXX_ATOMIC_BUILTINS_4, - _GLIBCXX_ATOMIC_BUILTINS_8. Use _GLIBCXX_ATOMIC_BUILTINS to - indicate use of C++11 atomic builtins. - * config.h.in: Regenerate. - * configure: Regenerate. - * include/Makefile.am (bits_sup_headers): Add atomic_lockfree_defines.h. - * include/Makefile.in: Regenerate. - * libsupc++/Makefile.am: Compile C++11 support with -std=gnu++0x. - * libsupc++/Makefile.in: Regenerate. - - * include/bits/atomic_base.h: Move lock-free property macros... - * libsupc++/atomic_lockfree_defines.h: ...here. - * include/std/future: Use C++11 macros. - * libsupc++/eh_ptr.cc: Same. - * libsupc++/eh_throw.cc: Same. - * libsupc++/exception: Same. - * libsupc++/exception_ptr.h: Same. - * libsupc++/guard.cc: Same. - * libsupc++/nested_exception.cc: Same. - * libsupc++/nested_exception.h: Same. - * src/future.cc: Same. - - * include/ext/atomicity.h: Use _GLIBCXX_ATOMIC_BUILTINS. - - * doc/doxygen/user.cfg.in - * doc/xml/manual/concurrency_extensions.xml - - * testsuite/18_support/exception_ptr/lifespan.cc - * testsuite/lib/libstdc++.exp + * acinclude.m4 (GLIBCXX_ENABLE_ATOMIC_BUILTINS): Remove + size-specific macros. _GLIBCXX_ATOMIC_BUILTINS_1, + _GLIBCXX_ATOMIC_BUILTINS_2, _GLIBCXX_ATOMIC_BUILTINS_4, + _GLIBCXX_ATOMIC_BUILTINS_8. Use _GLIBCXX_ATOMIC_BUILTINS to + indicate use of C++11 atomic builtins. + * config.h.in: Regenerate. + * configure: Regenerate. + * include/Makefile.am (bits_sup_headers): Add atomic_lockfree_defines.h. + * include/Makefile.in: Regenerate. + * libsupc++/Makefile.am: Compile C++11 support with -std=gnu++0x. + * libsupc++/Makefile.in: Regenerate. + + * include/bits/atomic_base.h: Move lock-free property macros... + * libsupc++/atomic_lockfree_defines.h: ...here. + * include/std/future: Use C++11 macros. + * libsupc++/eh_ptr.cc: Same. + * libsupc++/eh_throw.cc: Same. + * libsupc++/exception: Same. + * libsupc++/exception_ptr.h: Same. + * libsupc++/guard.cc: Same. + * libsupc++/nested_exception.cc: Same. + * libsupc++/nested_exception.h: Same. + * src/future.cc: Same. + + * include/ext/atomicity.h: Use _GLIBCXX_ATOMIC_BUILTINS. + + * doc/doxygen/user.cfg.in: Adjust. + * doc/xml/manual/concurrency_extensions.xml: Add note. + + * testsuite/18_support/exception_ptr/lifespan.cc: Tweak. + * testsuite/lib/libstdc++.exp: Same. 2011-11-29 François Dumont <fdumont@gcc.gnu.org> diff --git a/libstdc++-v3/doc/doxygen/user.cfg.in b/libstdc++-v3/doc/doxygen/user.cfg.in index 9178b0c7671..adb8c7fcdfe 100644 --- a/libstdc++-v3/doc/doxygen/user.cfg.in +++ b/libstdc++-v3/doc/doxygen/user.cfg.in @@ -746,6 +746,7 @@ INPUT = @srcdir@/doc/doxygen/doxygroups.cc \ include/tr1/ctime \ include/tr1/cwchar \ include/tr1/cwctype \ + include/tr2/ \ include/tr2/bool_set \ include/tr2/dynamic_bitset \ include/tr2/ratio \ @@ -1647,9 +1648,10 @@ PREDEFINED = __cplusplus \ _GLIBCXX_USE_C99_STDINT_TR1 \ _GLIBCXX_USE_SCHED_YIELD \ _GLIBCXX_USE_NANOSLEEP \ - PB_DS_DATA_TRUE_INDICATOR \ __EXCEPTIONS \ __GXX_RTTI \ + ATOMIC_INT_LOCK_FREE \ + PB_DS_DATA_TRUE_INDICATOR \ __glibcxx_function_requires=// \ __glibcxx_class_requires=// \ __glibcxx_class_requires2=// \ diff --git a/libstdc++-v3/doc/html/api.html b/libstdc++-v3/doc/html/api.html index 06cfe2e8370..62934e7918f 100644 --- a/libstdc++-v3/doc/html/api.html +++ b/libstdc++-v3/doc/html/api.html @@ -7,7 +7,7 @@ <a class="link" href="http://www.fsf.org/">FSF </a> - </p></div><div><div class="legalnotice" title="Legal Notice"><a id="id451922"/><p> + </p></div><div><div class="legalnotice" title="Legal Notice"><a id="id478662"/><p> <a class="link" href="manual/license.html" title="License">License </a> </p></div></div></div><hr/></div><p> diff --git a/libstdc++-v3/doc/html/faq.html b/libstdc++-v3/doc/html/faq.html index b87c9d92a59..dda7d1d4436 100644 --- a/libstdc++-v3/doc/html/faq.html +++ b/libstdc++-v3/doc/html/faq.html @@ -4,7 +4,7 @@ 2008, 2010 <a class="link" href="http://www.fsf.org">FSF</a> - </p></div></div><hr/></div><div class="qandaset" title="Frequently Asked Questions"><a id="id486981"/><dl><dt/><dd><dl><dt>1.1. <a href="faq.html#faq.what"> + </p></div></div><hr/></div><div class="qandaset" title="Frequently Asked Questions"><a id="id505318"/><dl><dt/><dd><dl><dt>1.1. <a href="faq.html#faq.what"> What is libstdc++? </a></dt><dt>1.2. <a href="faq.html#faq.why"> Why should I use libstdc++? @@ -521,13 +521,13 @@ For those people who are not part of the ISO Library Group (i.e., nearly all of us needing to read this page in the first place), a public list of the library defects is occasionally - published <a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/">here</a>. + published on <a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/">the WG21 + website</a>. Some of these issues have resulted in code changes in libstdc++. </p><p> If you think you've discovered a new bug that is not listed, - please post a message describing your problem - to <code class="email"><<a class="email" href="mailto:libstdc++@gcc.gnu.org">libstdc++@gcc.gnu.org</a>></code> or the Usenet group - comp.lang.c++.moderated. + please post a message describing your problem to the author of + the library issues list or the Usenet group comp.lang.c++.moderated. </p></td></tr><tr class="question" title="5.3."><td align="left" valign="top"><a id="faq.compiler_bugs"/><a id="q-compiler_bugs"/><p><strong>5.3.</strong></p></td><td align="left" valign="top"><p> Bugs in the compiler (gcc/g++) and not libstdc++ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-compiler_bugs"/></td><td align="left" valign="top"><p> diff --git a/libstdc++-v3/doc/html/index.html b/libstdc++-v3/doc/html/index.html index deae95e566b..8f687279243 100644 --- a/libstdc++-v3/doc/html/index.html +++ b/libstdc++-v3/doc/html/index.html @@ -24,7 +24,7 @@ </p></div></div></div><hr/></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="book"><a href="manual/index.html">The GNU C++ Library Manual</a></span></dt><dd><dl><dt><span class="part"><a href="manual/intro.html">I. Introduction -</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/status.html">1. Status</a></span></dt><dd><dl><dt><span class="section"><a href="manual/status.html#manual.intro.status.iso">Implementation Status</a></span></dt><dd><dl><dt><span class="section"><a href="manual/status.html#status.iso.1998">C++ 1998/2003</a></span></dt><dd><dl><dt><span class="section"><a href="manual/status.html#iso.1998.status">Implementation Status</a></span></dt><dt><span class="section"><a href="manual/status.html#iso.1998.specific">Implementation Specific Behavior</a></span></dt></dl></dd><dt><span class="section"><a href="manual/status.html#status.iso.2011">C++ 2011</a></span></dt><dt><span class="section"><a href="manual/status.html#status.iso.tr1">C++ TR1</a></span></dt><dt><span class="section"><a href="manual/status.html#status.iso.tr24733">C++ TR 24733</a></span></dt></dl></dd><dt><span class="section"><a href="manual/license.html">License</a></span></dt><dd><dl><dt><span class="section"><a href="manual/license.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="section"><a href="manual/license.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="section"><a href="manual/bugs.html">Bugs</a></span></dt><dd><dl><dt><span class="section"><a href="manual/bugs.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="section"><a href="manual/bugs.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/setup.html">2. Setup</a></span></dt><dd><dl><dt><span class="section"><a href="manual/setup.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="manual/configure.html">Configure</a></span></dt><dt><span class="section"><a href="manual/make.html">Make</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/using.html">3. Using</a></span></dt><dd><dl><dt><span class="section"><a href="manual/using.html#manual.intro.using.flags">Command Options</a></span></dt><dt><span class="section"><a href="manual/using_headers.html">Headers</a></span></dt><dd><dl><dt><span class="section"><a href="manual/using_headers.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="section"><a href="manual/using_headers.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="section"><a href="manual/using_headers.html#manual.intro.using.headers.cheaders">The C Headers and <code class="code">namespace std</code></a></span></dt><dt><span class="section"><a href="manual/using_headers.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="section"><a href="manual/using_macros.html">Macros</a></span></dt><dt><span class="section"><a href="manual/using_namespaces.html">Namespaces</a></span></dt><dd><dl><dt><span class="section"><a href="manual/using_namespaces.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="section"><a href="manual/using_namespaces.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="section"><a href="manual/using_namespaces.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="section"><a href="manual/using_dynamic_or_shared.html">Linking</a></span></dt><dd><dl><dt><span class="section"><a href="manual/using_dynamic_or_shared.html#manual.intro.using.linkage.freestanding">Almost Nothing</a></span></dt><dt><span class="section"><a href="manual/using_dynamic_or_shared.html#manual.intro.using.linkage.dynamic">Finding Dynamic or Shared Libraries</a></span></dt></dl></dd><dt><span class="section"><a href="manual/using_concurrency.html">Concurrency</a></span></dt><dd><dl><dt><span class="section"><a href="manual/using_concurrency.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="manual/using_concurrency.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="section"><a href="manual/using_concurrency.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="section"><a href="manual/using_concurrency.html#manual.intro.using.concurrency.io">IO</a></span></dt><dd><dl><dt><span class="section"><a href="manual/using_concurrency.html#concurrency.io.structure">Structure</a></span></dt><dt><span class="section"><a href="manual/using_concurrency.html#concurrency.io.defaults">Defaults</a></span></dt><dt><span class="section"><a href="manual/using_concurrency.html#concurrency.io.future">Future</a></span></dt><dt><span class="section"><a href="manual/using_concurrency.html#concurrency.io.alt">Alternatives</a></span></dt></dl></dd><dt><span class="section"><a href="manual/using_concurrency.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="section"><a href="manual/using_exceptions.html">Exceptions</a></span></dt><dd><dl><dt><span class="section"><a href="manual/using_exceptions.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="section"><a href="manual/using_exceptions.html#intro.using.exception.propagating">Exception Neutrality</a></span></dt><dt><span class="section"><a href="manual/using_exceptions.html#intro.using.exception.no">Doing without</a></span></dt><dt><span class="section"><a href="manual/using_exceptions.html#intro.using.exception.compat">Compatibility</a></span></dt><dd><dl><dt><span class="section"><a href="manual/using_exceptions.html#using.exception.compat.c">With <code class="literal">C</code></a></span></dt><dt><span class="section"><a href="manual/using_exceptions.html#using.exception.compat.posix">With <code class="literal">POSIX</code> thread cancellation</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="section"><a href="manual/debug.html#debug.compiler">Using <span class="command"><strong>g++</strong></span></a></span></dt><dt><span class="section"><a href="manual/debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="section"><a href="manual/debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="section"><a href="manual/debug.html#debug.races">Data Race Hunting</a></span></dt><dt><span class="section"><a href="manual/debug.html#debug.gdb">Using <span class="command"><strong>gdb</strong></span></a></span></dt><dt><span class="section"><a href="manual/debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="section"><a href="manual/debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="section"><a href="manual/debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt><dt><span class="section"><a href="manual/debug.html#debug.profile_mode">Profile-based Performance Analysis</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="manual/bk01pt02.html">II. +</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/status.html">1. Status</a></span></dt><dd><dl><dt><span class="section"><a href="manual/status.html#manual.intro.status.iso">Implementation Status</a></span></dt><dd><dl><dt><span class="section"><a href="manual/status.html#status.iso.1998">C++ 1998/2003</a></span></dt><dd><dl><dt><span class="section"><a href="manual/status.html#iso.1998.status">Implementation Status</a></span></dt><dt><span class="section"><a href="manual/status.html#iso.1998.specific">Implementation Specific Behavior</a></span></dt></dl></dd><dt><span class="section"><a href="manual/status.html#status.iso.2011">C++ 2011</a></span></dt><dd><dl><dt><span class="section"><a href="manual/status.html#iso.2011.specific">Implementation Specific Behavior</a></span></dt></dl></dd><dt><span class="section"><a href="manual/status.html#status.iso.tr1">C++ TR1</a></span></dt><dd><dl><dt><span class="section"><a href="manual/status.html#iso.tr1.specific">Implementation Specific Behavior</a></span></dt></dl></dd><dt><span class="section"><a href="manual/status.html#status.iso.tr24733">C++ TR 24733</a></span></dt></dl></dd><dt><span class="section"><a href="manual/license.html">License</a></span></dt><dd><dl><dt><span class="section"><a href="manual/license.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="section"><a href="manual/license.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="section"><a href="manual/bugs.html">Bugs</a></span></dt><dd><dl><dt><span class="section"><a href="manual/bugs.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="section"><a href="manual/bugs.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/setup.html">2. Setup</a></span></dt><dd><dl><dt><span class="section"><a href="manual/setup.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="manual/configure.html">Configure</a></span></dt><dt><span class="section"><a href="manual/make.html">Make</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/using.html">3. Using</a></span></dt><dd><dl><dt><span class="section"><a href="manual/using.html#manual.intro.using.flags">Command Options</a></span></dt><dt><span class="section"><a href="manual/using_headers.html">Headers</a></span></dt><dd><dl><dt><span class="section"><a href="manual/using_headers.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="section"><a href="manual/using_headers.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="section"><a href="manual/using_headers.html#manual.intro.using.headers.cheaders">The C Headers and <code class="code">namespace std</code></a></span></dt><dt><span class="section"><a href="manual/using_headers.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="section"><a href="manual/using_macros.html">Macros</a></span></dt><dt><span class="section"><a href="manual/using_namespaces.html">Namespaces</a></span></dt><dd><dl><dt><span class="section"><a href="manual/using_namespaces.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="section"><a href="manual/using_namespaces.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="section"><a href="manual/using_namespaces.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="section"><a href="manual/using_dynamic_or_shared.html">Linking</a></span></dt><dd><dl><dt><span class="section"><a href="manual/using_dynamic_or_shared.html#manual.intro.using.linkage.freestanding">Almost Nothing</a></span></dt><dt><span class="section"><a href="manual/using_dynamic_or_shared.html#manual.intro.using.linkage.dynamic">Finding Dynamic or Shared Libraries</a></span></dt></dl></dd><dt><span class="section"><a href="manual/using_concurrency.html">Concurrency</a></span></dt><dd><dl><dt><span class="section"><a href="manual/using_concurrency.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="manual/using_concurrency.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="section"><a href="manual/using_concurrency.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="section"><a href="manual/using_concurrency.html#manual.intro.using.concurrency.io">IO</a></span></dt><dd><dl><dt><span class="section"><a href="manual/using_concurrency.html#concurrency.io.structure">Structure</a></span></dt><dt><span class="section"><a href="manual/using_concurrency.html#concurrency.io.defaults">Defaults</a></span></dt><dt><span class="section"><a href="manual/using_concurrency.html#concurrency.io.future">Future</a></span></dt><dt><span class="section"><a href="manual/using_concurrency.html#concurrency.io.alt">Alternatives</a></span></dt></dl></dd><dt><span class="section"><a href="manual/using_concurrency.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="section"><a href="manual/using_exceptions.html">Exceptions</a></span></dt><dd><dl><dt><span class="section"><a href="manual/using_exceptions.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="section"><a href="manual/using_exceptions.html#intro.using.exception.propagating">Exception Neutrality</a></span></dt><dt><span class="section"><a href="manual/using_exceptions.html#intro.using.exception.no">Doing without</a></span></dt><dt><span class="section"><a href="manual/using_exceptions.html#intro.using.exception.compat">Compatibility</a></span></dt><dd><dl><dt><span class="section"><a href="manual/using_exceptions.html#using.exception.compat.c">With <code class="literal">C</code></a></span></dt><dt><span class="section"><a href="manual/using_exceptions.html#using.exception.compat.posix">With <code class="literal">POSIX</code> thread cancellation</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="section"><a href="manual/debug.html#debug.compiler">Using <span class="command"><strong>g++</strong></span></a></span></dt><dt><span class="section"><a href="manual/debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="section"><a href="manual/debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="section"><a href="manual/debug.html#debug.races">Data Race Hunting</a></span></dt><dt><span class="section"><a href="manual/debug.html#debug.gdb">Using <span class="command"><strong>gdb</strong></span></a></span></dt><dt><span class="section"><a href="manual/debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="section"><a href="manual/debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="section"><a href="manual/debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt><dt><span class="section"><a href="manual/debug.html#debug.profile_mode">Profile-based Performance Analysis</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="manual/bk01pt02.html">II. Standard Contents </a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/support.html">4. Support @@ -35,13 +35,13 @@ </a></span></dt><dd><dl><dt><span class="section"><a href="manual/diagnostics.html#std.diagnostics.exceptions">Exceptions</a></span></dt><dd><dl><dt><span class="section"><a href="manual/diagnostics.html#std.diagnostics.exceptions.api">API Reference</a></span></dt><dt><span class="section"><a href="manual/diagnostics.html#std.diagnostics.exceptions.data">Adding Data to <code class="classname">exception</code></a></span></dt></dl></dd><dt><span class="section"><a href="manual/bk01pt02ch05s02.html">Concept Checking</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/utilities.html">6. Utilities -</a></span></dt><dd><dl><dt><span class="section"><a href="manual/utilities.html#std.util.functors">Functors</a></span></dt><dt><span class="section"><a href="manual/pairs.html">Pairs</a></span></dt><dt><span class="section"><a href="manual/memory.html">Memory</a></span></dt><dd><dl><dt><span class="section"><a href="manual/memory.html#std.util.memory.allocator">Allocators</a></span></dt><dd><dl><dt><span class="section"><a href="manual/memory.html#allocator.req">Requirements</a></span></dt><dt><span class="section"><a href="manual/memory.html#allocator.design_issues">Design Issues</a></span></dt><dt><span class="section"><a href="manual/memory.html#allocator.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="manual/memory.html#id542426">Interface Design</a></span></dt><dt><span class="section"><a href="manual/memory.html#id542456">Selecting Default Allocation Policy</a></span></dt><dt><span class="section"><a href="manual/memory.html#id542566">Disabling Memory Caching</a></span></dt></dl></dd><dt><span class="section"><a href="manual/memory.html#allocator.using">Using a Specific Allocator</a></span></dt><dt><span class="section"><a href="manual/memory.html#allocator.custom">Custom Allocators</a></span></dt><dt><span class="section"><a href="manual/memory.html#allocator.ext">Extension Allocators</a></span></dt></dl></dd><dt><span class="section"><a href="manual/memory.html#std.util.memory.auto_ptr">auto_ptr</a></span></dt><dd><dl><dt><span class="section"><a href="manual/memory.html#auto_ptr.limitations">Limitations</a></span></dt><dt><span class="section"><a href="manual/memory.html#auto_ptr.using">Use in Containers</a></span></dt></dl></dd><dt><span class="section"><a href="manual/memory.html#std.util.memory.shared_ptr">shared_ptr</a></span></dt><dd><dl><dt><span class="section"><a href="manual/memory.html#shared_ptr.req">Requirements</a></span></dt><dt><span class="section"><a href="manual/memory.html#shared_ptr.design_issues">Design Issues</a></span></dt><dt><span class="section"><a href="manual/memory.html#shared_ptr.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="manual/memory.html#id543565">Class Hierarchy</a></span></dt><dt><span class="section"><a href="manual/memory.html#id543744">Thread Safety</a></span></dt><dt><span class="section"><a href="manual/memory.html#id543814">Selecting Lock Policy</a></span></dt><dt><span class="section"><a href="manual/memory.html#id543936">Dual C++11 and TR1 Implementation</a></span></dt><dt><span class="section"><a href="manual/memory.html#id543992">Related functions and classes</a></span></dt></dl></dd><dt><span class="section"><a href="manual/memory.html#shared_ptr.using">Use</a></span></dt><dd><dl><dt><span class="section"><a href="manual/memory.html#id556361">Examples</a></span></dt><dt><span class="section"><a href="manual/memory.html#id556391">Unresolved Issues</a></span></dt></dl></dd><dt><span class="section"><a href="manual/memory.html#shared_ptr.ack">Acknowledgments</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/traits.html">Traits</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/strings.html">7. +</a></span></dt><dd><dl><dt><span class="section"><a href="manual/utilities.html#std.util.functors">Functors</a></span></dt><dt><span class="section"><a href="manual/pairs.html">Pairs</a></span></dt><dt><span class="section"><a href="manual/memory.html">Memory</a></span></dt><dd><dl><dt><span class="section"><a href="manual/memory.html#std.util.memory.allocator">Allocators</a></span></dt><dd><dl><dt><span class="section"><a href="manual/memory.html#allocator.req">Requirements</a></span></dt><dt><span class="section"><a href="manual/memory.html#allocator.design_issues">Design Issues</a></span></dt><dt><span class="section"><a href="manual/memory.html#allocator.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="manual/memory.html#id593505">Interface Design</a></span></dt><dt><span class="section"><a href="manual/memory.html#id593534">Selecting Default Allocation Policy</a></span></dt><dt><span class="section"><a href="manual/memory.html#id593645">Disabling Memory Caching</a></span></dt></dl></dd><dt><span class="section"><a href="manual/memory.html#allocator.using">Using a Specific Allocator</a></span></dt><dt><span class="section"><a href="manual/memory.html#allocator.custom">Custom Allocators</a></span></dt><dt><span class="section"><a href="manual/memory.html#allocator.ext">Extension Allocators</a></span></dt></dl></dd><dt><span class="section"><a href="manual/memory.html#std.util.memory.auto_ptr">auto_ptr</a></span></dt><dd><dl><dt><span class="section"><a href="manual/memory.html#auto_ptr.limitations">Limitations</a></span></dt><dt><span class="section"><a href="manual/memory.html#auto_ptr.using">Use in Containers</a></span></dt></dl></dd><dt><span class="section"><a href="manual/memory.html#std.util.memory.shared_ptr">shared_ptr</a></span></dt><dd><dl><dt><span class="section"><a href="manual/memory.html#shared_ptr.req">Requirements</a></span></dt><dt><span class="section"><a href="manual/memory.html#shared_ptr.design_issues">Design Issues</a></span></dt><dt><span class="section"><a href="manual/memory.html#shared_ptr.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="manual/memory.html#id594644">Class Hierarchy</a></span></dt><dt><span class="section"><a href="manual/memory.html#id594832">Thread Safety</a></span></dt><dt><span class="section"><a href="manual/memory.html#id594892">Selecting Lock Policy</a></span></dt><dt><span class="section"><a href="manual/memory.html#id595014">Related functions and classes</a></span></dt></dl></dd><dt><span class="section"><a href="manual/memory.html#shared_ptr.using">Use</a></span></dt><dd><dl><dt><span class="section"><a href="manual/memory.html#id607385">Examples</a></span></dt><dt><span class="section"><a href="manual/memory.html#id607415">Unresolved Issues</a></span></dt></dl></dd><dt><span class="section"><a href="manual/memory.html#shared_ptr.ack">Acknowledgments</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/traits.html">Traits</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/strings.html">7. Strings </a></span></dt><dd><dl><dt><span class="section"><a href="manual/strings.html#std.strings.string">String Classes</a></span></dt><dd><dl><dt><span class="section"><a href="manual/strings.html#strings.string.simple">Simple Transformations</a></span></dt><dt><span class="section"><a href="manual/strings.html#strings.string.case">Case Sensitivity</a></span></dt><dt><span class="section"><a href="manual/strings.html#strings.string.character_types">Arbitrary Character Types</a></span></dt><dt><span class="section"><a href="manual/strings.html#strings.string.token">Tokenizing</a></span></dt><dt><span class="section"><a href="manual/strings.html#strings.string.shrink">Shrink to Fit</a></span></dt><dt><span class="section"><a href="manual/strings.html#strings.string.Cstring">CString (MFC)</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/localization.html">8. Localization -</a></span></dt><dd><dl><dt><span class="section"><a href="manual/localization.html#std.localization.locales">Locales</a></span></dt><dd><dl><dt><span class="section"><a href="manual/localization.html#std.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="section"><a href="manual/localization.html#locales.locale.req">Requirements</a></span></dt><dt><span class="section"><a href="manual/localization.html#locales.locale.design">Design</a></span></dt><dt><span class="section"><a href="manual/localization.html#locales.locale.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="manual/localization.html#locale.impl.c">Interacting with "C" locales</a></span></dt></dl></dd><dt><span class="section"><a href="manual/localization.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/facets.html">Facets</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#std.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#facet.ctype.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#id558091">Specializations</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#std.localization.facet.codecvt">codecvt</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.codecvt.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#codecvt.design.wchar_t_size"><span class="type">wchar_t</span> Size</a></span></dt><dt><span class="section"><a href="manual/facets.html#codecvt.design.unicode">Support for Unicode</a></span></dt><dt><span class="section"><a href="manual/facets.html#codecvt.design.issues">Other Issues</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.codecvt.use">Use</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#manual.localization.facet.messages">messages</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#facet.messages.req">Requirements</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.messages.design">Design</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.messages.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#messages.impl.models">Models</a></span></dt><dt><span class="section"><a href="manual/facets.html#messages.impl.gnu">The GNU Model</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#facet.messages.use">Use</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/containers.html">9. +</a></span></dt><dd><dl><dt><span class="section"><a href="manual/localization.html#std.localization.locales">Locales</a></span></dt><dd><dl><dt><span class="section"><a href="manual/localization.html#std.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="section"><a href="manual/localization.html#locales.locale.req">Requirements</a></span></dt><dt><span class="section"><a href="manual/localization.html#locales.locale.design">Design</a></span></dt><dt><span class="section"><a href="manual/localization.html#locales.locale.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="manual/localization.html#locale.impl.c">Interacting with "C" locales</a></span></dt></dl></dd><dt><span class="section"><a href="manual/localization.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/facets.html">Facets</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#std.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#facet.ctype.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#id609115">Specializations</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#std.localization.facet.codecvt">codecvt</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.codecvt.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#codecvt.design.wchar_t_size"><span class="type">wchar_t</span> Size</a></span></dt><dt><span class="section"><a href="manual/facets.html#codecvt.design.unicode">Support for Unicode</a></span></dt><dt><span class="section"><a href="manual/facets.html#codecvt.design.issues">Other Issues</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.codecvt.use">Use</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#manual.localization.facet.messages">messages</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#facet.messages.req">Requirements</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.messages.design">Design</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.messages.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="manual/facets.html#messages.impl.models">Models</a></span></dt><dt><span class="section"><a href="manual/facets.html#messages.impl.gnu">The GNU Model</a></span></dt></dl></dd><dt><span class="section"><a href="manual/facets.html#facet.messages.use">Use</a></span></dt><dt><span class="section"><a href="manual/facets.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/containers.html">9. Containers </a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="section"><a href="manual/containers.html#containers.sequences.vector">vector</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="manual/associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="manual/associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="manual/associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="manual/associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="manual/containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="manual/containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/iterators.html">10. diff --git a/libstdc++-v3/doc/html/manual/abi.html b/libstdc++-v3/doc/html/manual/abi.html index b5b24d2a109..860c5a95a4b 100644 --- a/libstdc++-v3/doc/html/manual/abi.html +++ b/libstdc++-v3/doc/html/manual/abi.html @@ -87,17 +87,17 @@ compatible. </p><div class="orderedlist"><ol class="orderedlist"><li class="listitem"><p>Release versioning on the libgcc_s.so binary. </p><p>This is implemented via file names and the ELF <code class="constant">DT_SONAME</code> mechanism (at least on ELF systems). It is versioned as follows: - </p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>gcc-3.0.0: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.0.1: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.0.2: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.0.3: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.0.4: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.1.0: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.1.1: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.2.0: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.2.1: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.2.2: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.2.3: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.3.0: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.3.1: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.3.2: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.3.3: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.4.x, gcc-4.[0-5].x: libgcc_s.so.1</p></li></ul></div><p>For m68k-linux the versions differ as follows: </p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>gcc-3.4.x, gcc-4.[0-5].x: libgcc_s.so.1 + </p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>GCC 3.x: libgcc_s.so.1</p></li><li class="listitem"><p>GCC 4.x: libgcc_s.so.1</p></li></ul></div><p>For m68k-linux the versions differ as follows: </p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>GCC 3.4, GCC 4.x: libgcc_s.so.1 when configuring <code class="code">--with-sjlj-exceptions</code>, or - libgcc_s.so.2 </p></li></ul></div><p>For hppa-linux the versions differ as follows: </p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>gcc-3.4.x, gcc-4.[0-1].x: either libgcc_s.so.1 + libgcc_s.so.2 </p></li></ul></div><p>For hppa-linux the versions differ as follows: </p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>GCC 3.4, GCC 4.[0-1]: either libgcc_s.so.1 when configuring <code class="code">--with-sjlj-exceptions</code>, or - libgcc_s.so.2 </p></li><li class="listitem"><p>gcc-4.[2-5].x: either libgcc_s.so.3 when configuring + libgcc_s.so.2 </p></li><li class="listitem"><p>GCC 4.[2-7]: either libgcc_s.so.3 when configuring <code class="code">--with-sjlj-exceptions</code>) or libgcc_s.so.4 </p></li></ul></div></li><li class="listitem"><p>Symbol versioning on the libgcc_s.so binary.</p><p>It is versioned with the following labels and version definitions, where the version definition is the maximum for a particular release. Labels are cumulative. If a particular release is not listed, it has the same version labels as the preceding - release.</p><p>This corresponds to the mapfile: gcc/libgcc-std.ver</p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>gcc-3.0.0: GCC_3.0</p></li><li class="listitem"><p>gcc-3.3.0: GCC_3.3</p></li><li class="listitem"><p>gcc-3.3.1: GCC_3.3.1</p></li><li class="listitem"><p>gcc-3.3.2: GCC_3.3.2</p></li><li class="listitem"><p>gcc-3.3.4: GCC_3.3.4</p></li><li class="listitem"><p>gcc-3.4.0: GCC_3.4</p></li><li class="listitem"><p>gcc-3.4.2: GCC_3.4.2</p></li><li class="listitem"><p>gcc-3.4.4: GCC_3.4.4</p></li><li class="listitem"><p>gcc-4.0.0: GCC_4.0.0</p></li><li class="listitem"><p>gcc-4.1.0: GCC_4.1.0</p></li><li class="listitem"><p>gcc-4.2.0: GCC_4.2.0</p></li><li class="listitem"><p>gcc-4.3.0: GCC_4.3.0</p></li><li class="listitem"><p>gcc-4.4.0: GCC_4.4.0</p></li></ul></div></li><li class="listitem"><p> + release.</p><p>This corresponds to the mapfile: gcc/libgcc-std.ver</p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>GCC 3.0.0: GCC_3.0</p></li><li class="listitem"><p>GCC 3.3.0: GCC_3.3</p></li><li class="listitem"><p>GCC 3.3.1: GCC_3.3.1</p></li><li class="listitem"><p>GCC 3.3.2: GCC_3.3.2</p></li><li class="listitem"><p>GCC 3.3.4: GCC_3.3.4</p></li><li class="listitem"><p>GCC 3.4.0: GCC_3.4</p></li><li class="listitem"><p>GCC 3.4.2: GCC_3.4.2</p></li><li class="listitem"><p>GCC 3.4.4: GCC_3.4.4</p></li><li class="listitem"><p>GCC 4.0.0: GCC_4.0.0</p></li><li class="listitem"><p>GCC 4.1.0: GCC_4.1.0</p></li><li class="listitem"><p>GCC 4.2.0: GCC_4.2.0</p></li><li class="listitem"><p>GCC 4.3.0: GCC_4.3.0</p></li><li class="listitem"><p>GCC 4.4.0: GCC_4.4.0</p></li><li class="listitem"><p>GCC 4.5.0: GCC_4.5.0</p></li><li class="listitem"><p>GCC 4.6.0: GCC_4.6.0</p></li><li class="listitem"><p>GCC 4.7.0: GCC_4.7.0</p></li></ul></div></li><li class="listitem"><p> Release versioning on the libstdc++.so binary, implemented in the same way as the libgcc_s.so binary above. Listed is the filename: <code class="constant">DT_SONAME</code> can be deduced from @@ -108,8 +108,11 @@ compatible. <code class="constant">DT_SONAME</code>s are forward-compatibile: in the table below, releases incompatible with the previous one are explicitly noted. + If a particular release is not listed, its libstdc++.so binary + has the same filename and <code class="constant">DT_SONAME</code> as the + preceding release. </p><p>It is versioned as follows: - </p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>gcc-3.0.0: libstdc++.so.3.0.0</p></li><li class="listitem"><p>gcc-3.0.1: libstdc++.so.3.0.1</p></li><li class="listitem"><p>gcc-3.0.2: libstdc++.so.3.0.2</p></li><li class="listitem"><p>gcc-3.0.3: libstdc++.so.3.0.2 (See Note 1)</p></li><li class="listitem"><p>gcc-3.0.4: libstdc++.so.3.0.4</p></li><li class="listitem"><p>gcc-3.1.0: libstdc++.so.4.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>gcc-3.1.1: libstdc++.so.4.0.1</p></li><li class="listitem"><p>gcc-3.2.0: libstdc++.so.5.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>gcc-3.2.1: libstdc++.so.5.0.1</p></li><li class="listitem"><p>gcc-3.2.2: libstdc++.so.5.0.2</p></li><li class="listitem"><p>gcc-3.2.3: libstdc++.so.5.0.3 (See Note 2)</p></li><li class="listitem"><p>gcc-3.3.0: libstdc++.so.5.0.4</p></li><li class="listitem"><p>gcc-3.3.1: libstdc++.so.5.0.5</p></li><li class="listitem"><p>gcc-3.3.2: libstdc++.so.5.0.5</p></li><li class="listitem"><p>gcc-3.3.3: libstdc++.so.5.0.5</p></li><li class="listitem"><p>gcc-3.4.0: libstdc++.so.6.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>gcc-3.4.1: libstdc++.so.6.0.1</p></li><li class="listitem"><p>gcc-3.4.2: libstdc++.so.6.0.2</p></li><li class="listitem"><p>gcc-3.4.3: libstdc++.so.6.0.3</p></li><li class="listitem"><p>gcc-3.4.4: libstdc++.so.6.0.3</p></li><li class="listitem"><p>gcc-3.4.5: libstdc++.so.6.0.3</p></li><li class="listitem"><p>gcc-3.4.6: libstdc++.so.6.0.3</p></li><li class="listitem"><p>gcc-4.0.0: libstdc++.so.6.0.4</p></li><li class="listitem"><p>gcc-4.0.1: libstdc++.so.6.0.5</p></li><li class="listitem"><p>gcc-4.0.2: libstdc++.so.6.0.6</p></li><li class="listitem"><p>gcc-4.0.3: libstdc++.so.6.0.7</p></li><li class="listitem"><p>gcc-4.1.0: libstdc++.so.6.0.7</p></li><li class="listitem"><p>gcc-4.1.1: libstdc++.so.6.0.8</p></li><li class="listitem"><p>gcc-4.1.2: libstdc++.so.6.0.8</p></li><li class="listitem"><p>gcc-4.2.0: libstdc++.so.6.0.9</p></li><li class="listitem"><p>gcc-4.2.1: libstdc++.so.6.0.9 (See Note 3)</p></li><li class="listitem"><p>gcc-4.2.2: libstdc++.so.6.0.9</p></li><li class="listitem"><p>gcc-4.2.3: libstdc++.so.6.0.9</p></li><li class="listitem"><p>gcc-4.2.4: libstdc++.so.6.0.9</p></li><li class="listitem"><p>gcc-4.3.0: libstdc++.so.6.0.10</p></li><li class="listitem"><p>gcc-4.3.1: libstdc++.so.6.0.10</p></li><li class="listitem"><p>gcc-4.3.2: libstdc++.so.6.0.10</p></li><li class="listitem"><p>gcc-4.3.3: libstdc++.so.6.0.10</p></li><li class="listitem"><p>gcc-4.3.4: libstdc++.so.6.0.10</p></li><li class="listitem"><p>gcc-4.4.0: libstdc++.so.6.0.11</p></li><li class="listitem"><p>gcc-4.4.1: libstdc++.so.6.0.12</p></li><li class="listitem"><p>gcc-4.4.2: libstdc++.so.6.0.13</p></li><li class="listitem"><p>gcc-4.5.0: libstdc++.so.6.0.14</p></li></ul></div><p> + </p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>GCC 3.0.0: libstdc++.so.3.0.0</p></li><li class="listitem"><p>GCC 3.0.1: libstdc++.so.3.0.1</p></li><li class="listitem"><p>GCC 3.0.2: libstdc++.so.3.0.2</p></li><li class="listitem"><p>GCC 3.0.3: libstdc++.so.3.0.2 (See Note 1)</p></li><li class="listitem"><p>GCC 3.0.4: libstdc++.so.3.0.4</p></li><li class="listitem"><p>GCC 3.1.0: libstdc++.so.4.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 3.1.1: libstdc++.so.4.0.1</p></li><li class="listitem"><p>GCC 3.2.0: libstdc++.so.5.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 3.2.1: libstdc++.so.5.0.1</p></li><li class="listitem"><p>GCC 3.2.2: libstdc++.so.5.0.2</p></li><li class="listitem"><p>GCC 3.2.3: libstdc++.so.5.0.3 (See Note 2)</p></li><li class="listitem"><p>GCC 3.3.0: libstdc++.so.5.0.4</p></li><li class="listitem"><p>GCC 3.3.1: libstdc++.so.5.0.5</p></li><li class="listitem"><p>GCC 3.4.0: libstdc++.so.6.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>GCC 3.4.1: libstdc++.so.6.0.1</p></li><li class="listitem"><p>GCC 3.4.2: libstdc++.so.6.0.2</p></li><li class="listitem"><p>GCC 3.4.3: libstdc++.so.6.0.3</p></li><li class="listitem"><p>GCC 4.0.0: libstdc++.so.6.0.4</p></li><li class="listitem"><p>GCC 4.0.1: libstdc++.so.6.0.5</p></li><li class="listitem"><p>GCC 4.0.2: libstdc++.so.6.0.6</p></li><li class="listitem"><p>GCC 4.0.3: libstdc++.so.6.0.7</p></li><li class="listitem"><p>GCC 4.1.0: libstdc++.so.6.0.7</p></li><li class="listitem"><p>GCC 4.1.1: libstdc++.so.6.0.8</p></li><li class="listitem"><p>GCC 4.2.0: libstdc++.so.6.0.9</p></li><li class="listitem"><p>GCC 4.2.1: libstdc++.so.6.0.9 (See Note 3)</p></li><li class="listitem"><p>GCC 4.2.2: libstdc++.so.6.0.9</p></li><li class="listitem"><p>GCC 4.3.0: libstdc++.so.6.0.10</p></li><li class="listitem"><p>GCC 4.4.0: libstdc++.so.6.0.11</p></li><li class="listitem"><p>GCC 4.4.1: libstdc++.so.6.0.12</p></li><li class="listitem"><p>GCC 4.4.2: libstdc++.so.6.0.13</p></li><li class="listitem"><p>GCC 4.5.0: libstdc++.so.6.0.14</p></li><li class="listitem"><p>GCC 4.6.0: libstdc++.so.6.0.15</p></li><li class="listitem"><p>GCC 4.6.1: libstdc++.so.6.0.16</p></li></ul></div><p> Note 1: Error should be libstdc++.so.3.0.3. </p><p> Note 2: Not strictly required. @@ -123,13 +126,13 @@ compatible. will use the maximum version definition. Thus, for release series with the same label, but incremented version definitions, the later release has both versions. (An example of this would be the - gcc-3.2.1 release, which has GLIBCPP_3.2.1 for new symbols and - GLIBCPP_3.2 for symbols that were introduced in the gcc-3.2.0 + GCC 3.2.1 release, which has GLIBCPP_3.2.1 for new symbols and + GLIBCPP_3.2 for symbols that were introduced in the GCC 3.2.0 release.) If a particular release is not listed, it has the same version labels as the preceding release. - </p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>gcc-3.0.0: (Error, not versioned)</p></li><li class="listitem"><p>gcc-3.0.1: (Error, not versioned)</p></li><li class="listitem"><p>gcc-3.0.2: (Error, not versioned)</p></li><li class="listitem"><p>gcc-3.0.3: (Error, not versioned)</p></li><li class="listitem"><p>gcc-3.0.4: (Error, not versioned)</p></li><li class="listitem"><p>gcc-3.1.0: GLIBCPP_3.1, CXXABI_1</p></li><li class="listitem"><p>gcc-3.1.1: GLIBCPP_3.1, CXXABI_1</p></li><li class="listitem"><p>gcc-3.2.0: GLIBCPP_3.2, CXXABI_1.2</p></li><li class="listitem"><p>gcc-3.2.1: GLIBCPP_3.2.1, CXXABI_1.2</p></li><li class="listitem"><p>gcc-3.2.2: GLIBCPP_3.2.2, CXXABI_1.2</p></li><li class="listitem"><p>gcc-3.2.3: GLIBCPP_3.2.2, CXXABI_1.2</p></li><li class="listitem"><p>gcc-3.3.0: GLIBCPP_3.2.2, CXXABI_1.2.1</p></li><li class="listitem"><p>gcc-3.3.1: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>gcc-3.3.2: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>gcc-3.3.3: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>gcc-3.4.0: GLIBCXX_3.4, CXXABI_1.3</p></li><li class="listitem"><p>gcc-3.4.1: GLIBCXX_3.4.1, CXXABI_1.3</p></li><li class="listitem"><p>gcc-3.4.2: GLIBCXX_3.4.2</p></li><li class="listitem"><p>gcc-3.4.3: GLIBCXX_3.4.3</p></li><li class="listitem"><p>gcc-4.0.0: GLIBCXX_3.4.4, CXXABI_1.3.1</p></li><li class="listitem"><p>gcc-4.0.1: GLIBCXX_3.4.5</p></li><li class="listitem"><p>gcc-4.0.2: GLIBCXX_3.4.6</p></li><li class="listitem"><p>gcc-4.0.3: GLIBCXX_3.4.7</p></li><li class="listitem"><p>gcc-4.1.1: GLIBCXX_3.4.8</p></li><li class="listitem"><p>gcc-4.2.0: GLIBCXX_3.4.9</p></li><li class="listitem"><p>gcc-4.3.0: GLIBCXX_3.4.10, CXXABI_1.3.2</p></li><li class="listitem"><p>gcc-4.4.0: GLIBCXX_3.4.11, CXXABI_1.3.3</p></li><li class="listitem"><p>gcc-4.4.1: GLIBCXX_3.4.12, CXXABI_1.3.3</p></li><li class="listitem"><p>gcc-4.4.2: GLIBCXX_3.4.13, CXXABI_1.3.3</p></li><li class="listitem"><p>gcc-4.5.0: GLIBCXX_3.4.14, CXXABI_1.3.4</p></li></ul></div></li><li class="listitem"><p>Incremental bumping of a compiler pre-defined macro, + </p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>GCC 3.0.0: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.1: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.2: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.3: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.0.4: (Error, not versioned)</p></li><li class="listitem"><p>GCC 3.1.0: GLIBCPP_3.1, CXXABI_1</p></li><li class="listitem"><p>GCC 3.1.1: GLIBCPP_3.1, CXXABI_1</p></li><li class="listitem"><p>GCC 3.2.0: GLIBCPP_3.2, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.2.1: GLIBCPP_3.2.1, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.2.2: GLIBCPP_3.2.2, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.2.3: GLIBCPP_3.2.2, CXXABI_1.2</p></li><li class="listitem"><p>GCC 3.3.0: GLIBCPP_3.2.2, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.3.1: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.3.2: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.3.3: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>GCC 3.4.0: GLIBCXX_3.4, CXXABI_1.3</p></li><li class="listitem"><p>GCC 3.4.1: GLIBCXX_3.4.1, CXXABI_1.3</p></li><li class="listitem"><p>GCC 3.4.2: GLIBCXX_3.4.2</p></li><li class="listitem"><p>GCC 3.4.3: GLIBCXX_3.4.3</p></li><li class="listitem"><p>GCC 4.0.0: GLIBCXX_3.4.4, CXXABI_1.3.1</p></li><li class="listitem"><p>GCC 4.0.1: GLIBCXX_3.4.5</p></li><li class="listitem"><p>GCC 4.0.2: GLIBCXX_3.4.6</p></li><li class="listitem"><p>GCC 4.0.3: GLIBCXX_3.4.7</p></li><li class="listitem"><p>GCC 4.1.1: GLIBCXX_3.4.8</p></li><li class="listitem"><p>GCC 4.2.0: GLIBCXX_3.4.9</p></li><li class="listitem"><p>GCC 4.3.0: GLIBCXX_3.4.10, CXXABI_1.3.2</p></li><li class="listitem"><p>GCC 4.4.0: GLIBCXX_3.4.11, CXXABI_1.3.3</p></li><li class="listitem"><p>GCC 4.4.1: GLIBCXX_3.4.12, CXXABI_1.3.3</p></li><li class="listitem"><p>GCC 4.4.2: GLIBCXX_3.4.13, CXXABI_1.3.3</p></li><li class="listitem"><p>GCC 4.5.0: GLIBCXX_3.4.14, CXXABI_1.3.4</p></li><li class="listitem"><p>GCC 4.6.0: GLIBCXX_3.4.15, CXXABI_1.3.5</p></li><li class="listitem"><p>GCC 4.6.1: GLIBCXX_3.4.16, CXXABI_1.3.5</p></li></ul></div></li><li class="listitem"><p>Incremental bumping of a compiler pre-defined macro, __GXX_ABI_VERSION. This macro is defined as the version of the - compiler v3 ABI, with g++ 3.0.x being version 100. This macro will + compiler v3 ABI, with g++ 3.0 being version 100. This macro will be automatically defined whenever g++ is used (the curious can test this by invoking g++ with the '-v' flag.) </p><p> @@ -139,11 +142,11 @@ compatible. '-fabi-version' command line option. </p><p> It is versioned as follows, where 'n' is given by '-fabi-version=n': - </p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>gcc-3.0.x: 100</p></li><li class="listitem"><p>gcc-3.1.x: 100 (Error, should be 101)</p></li><li class="listitem"><p>gcc-3.2.x: 102</p></li><li class="listitem"><p>gcc-3.3.x: 102</p></li><li class="listitem"><p>gcc-3.4.x, gcc-4.[0-5].x: 102 (when n=1)</p></li><li class="listitem"><p>gcc-3.4.x, gcc-4.[0-5].x: 1000 + n (when n>1) </p></li><li class="listitem"><p>gcc-3.4.x, gcc-4.[0-5].x: 999999 (when n=0)</p></li></ul></div><p/></li><li class="listitem"><p>Changes to the default compiler option for + </p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>GCC 3.0: 100</p></li><li class="listitem"><p>GCC 3.1: 100 (Error, should be 101)</p></li><li class="listitem"><p>GCC 3.2: 102</p></li><li class="listitem"><p>GCC 3.3: 102</p></li><li class="listitem"><p>GCC 3.4, GCC 4.x: 102 (when n=1)</p></li><li class="listitem"><p>GCC 3.4, GCC 4.x: 1000 + n (when n>1) </p></li><li class="listitem"><p>GCC 3.4, GCC 4.x: 999999 (when n=0)</p></li></ul></div><p/></li><li class="listitem"><p>Changes to the default compiler option for <code class="code">-fabi-version</code>. </p><p> It is versioned as follows: - </p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>gcc-3.0.x: (Error, not versioned) </p></li><li class="listitem"><p>gcc-3.1.x: (Error, not versioned) </p></li><li class="listitem"><p>gcc-3.2.x: <code class="code">-fabi-version=1</code></p></li><li class="listitem"><p>gcc-3.3.x: <code class="code">-fabi-version=1</code></p></li><li class="listitem"><p>gcc-3.4.x, gcc-4.[0-5].x: <code class="code">-fabi-version=2</code> <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li></ul></div><p/></li><li class="listitem"><p>Incremental bumping of a library pre-defined macro. For releases + </p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>GCC 3.0: (Error, not versioned) </p></li><li class="listitem"><p>GCC 3.1: (Error, not versioned) </p></li><li class="listitem"><p>GCC 3.2: <code class="code">-fabi-version=1</code></p></li><li class="listitem"><p>GCC 3.3: <code class="code">-fabi-version=1</code></p></li><li class="listitem"><p>GCC 3.4, GCC 4.x: <code class="code">-fabi-version=2</code> <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li></ul></div><p/></li><li class="listitem"><p>Incremental bumping of a library pre-defined macro. For releases before 3.4.0, the macro is __GLIBCPP__. For later releases, it's __GLIBCXX__. (The libstdc++ project generously changed from CPP to CXX throughout its source to allow the "C" pre-processor the CPP @@ -151,16 +154,16 @@ compatible. was released, in compressed ISO date format, as an unsigned long. </p><p> This macro is defined in the file "c++config" in the - "libstdc++-v3/include/bits" directory. (Up to gcc-4.1.0, it was - changed every night by an automated script. Since gcc-4.1.0, it is + "libstdc++-v3/include/bits" directory. (Up to GCC 4.1.0, it was + changed every night by an automated script. Since GCC 4.1.0, it is the same value as gcc/DATESTAMP.) </p><p> It is versioned as follows: - </p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>gcc-3.0.0: 20010615</p></li><li class="listitem"><p>gcc-3.0.1: 20010819</p></li><li class="listitem"><p>gcc-3.0.2: 20011023</p></li><li class="listitem"><p>gcc-3.0.3: 20011220</p></li><li class="listitem"><p>gcc-3.0.4: 20020220</p></li><li class="listitem"><p>gcc-3.1.0: 20020514</p></li><li class="listitem"><p>gcc-3.1.1: 20020725</p></li><li class="listitem"><p>gcc-3.2.0: 20020814</p></li><li class="listitem"><p>gcc-3.2.1: 20021119</p></li><li class="listitem"><p>gcc-3.2.2: 20030205</p></li><li class="listitem"><p>gcc-3.2.3: 20030422</p></li><li class="listitem"><p>gcc-3.3.0: 20030513</p></li><li class="listitem"><p>gcc-3.3.1: 20030804</p></li><li class="listitem"><p>gcc-3.3.2: 20031016</p></li><li class="listitem"><p>gcc-3.3.3: 20040214</p></li><li class="listitem"><p>gcc-3.4.0: 20040419</p></li><li class="listitem"><p>gcc-3.4.1: 20040701</p></li><li class="listitem"><p>gcc-3.4.2: 20040906</p></li><li class="listitem"><p>gcc-3.4.3: 20041105</p></li><li class="listitem"><p>gcc-3.4.4: 20050519</p></li><li class="listitem"><p>gcc-3.4.5: 20051201</p></li><li class="listitem"><p>gcc-3.4.6: 20060306</p></li><li class="listitem"><p>gcc-4.0.0: 20050421</p></li><li class="listitem"><p>gcc-4.0.1: 20050707</p></li><li class="listitem"><p>gcc-4.0.2: 20050921</p></li><li class="listitem"><p>gcc-4.0.3: 20060309</p></li><li class="listitem"><p>gcc-4.1.0: 20060228</p></li><li class="listitem"><p>gcc-4.1.1: 20060524</p></li><li class="listitem"><p>gcc-4.1.2: 20070214</p></li><li class="listitem"><p>gcc-4.2.0: 20070514</p></li><li class="listitem"><p>gcc-4.2.1: 20070719</p></li><li class="listitem"><p>gcc-4.2.2: 20071007</p></li><li class="listitem"><p>gcc-4.2.3: 20080201</p></li><li class="listitem"><p>gcc-4.2.4: 20080519</p></li><li class="listitem"><p>gcc-4.3.0: 20080306</p></li><li class="listitem"><p>gcc-4.3.1: 20080606</p></li><li class="listitem"><p>gcc-4.3.2: 20080827</p></li><li class="listitem"><p>gcc-4.3.3: 20090124</p></li><li class="listitem"><p>gcc-4.4.0: 20090421</p></li><li class="listitem"><p>gcc-4.4.1: 20090722</p></li><li class="listitem"><p>gcc-4.4.2: 20091015</p></li></ul></div><p/></li><li class="listitem"><p> + </p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>GCC 3.0.0: 20010615</p></li><li class="listitem"><p>GCC 3.0.1: 20010819</p></li><li class="listitem"><p>GCC 3.0.2: 20011023</p></li><li class="listitem"><p>GCC 3.0.3: 20011220</p></li><li class="listitem"><p>GCC 3.0.4: 20020220</p></li><li class="listitem"><p>GCC 3.1.0: 20020514</p></li><li class="listitem"><p>GCC 3.1.1: 20020725</p></li><li class="listitem"><p>GCC 3.2.0: 20020814</p></li><li class="listitem"><p>GCC 3.2.1: 20021119</p></li><li class="listitem"><p>GCC 3.2.2: 20030205</p></li><li class="listitem"><p>GCC 3.2.3: 20030422</p></li><li class="listitem"><p>GCC 3.3.0: 20030513</p></li><li class="listitem"><p>GCC 3.3.1: 20030804</p></li><li class="listitem"><p>GCC 3.3.2: 20031016</p></li><li class="listitem"><p>GCC 3.3.3: 20040214</p></li><li class="listitem"><p>GCC 3.4.0: 20040419</p></li><li class="listitem"><p>GCC 3.4.1: 20040701</p></li><li class="listitem"><p>GCC 3.4.2: 20040906</p></li><li class="listitem"><p>GCC 3.4.3: 20041105</p></li><li class="listitem"><p>GCC 3.4.4: 20050519</p></li><li class="listitem"><p>GCC 3.4.5: 20051201</p></li><li class="listitem"><p>GCC 3.4.6: 20060306</p></li><li class="listitem"><p>GCC 4.0.0: 20050421</p></li><li class="listitem"><p>GCC 4.0.1: 20050707</p></li><li class="listitem"><p>GCC 4.0.2: 20050921</p></li><li class="listitem"><p>GCC 4.0.3: 20060309</p></li><li class="listitem"><p>GCC 4.1.0: 20060228</p></li><li class="listitem"><p>GCC 4.1.1: 20060524</p></li><li class="listitem"><p>GCC 4.1.2: 20070214</p></li><li class="listitem"><p>GCC 4.2.0: 20070514</p></li><li class="listitem"><p>GCC 4.2.1: 20070719</p></li><li class="listitem"><p>GCC 4.2.2: 20071007</p></li><li class="listitem"><p>GCC 4.2.3: 20080201</p></li><li class="listitem"><p>GCC 4.2.4: 20080519</p></li><li class="listitem"><p>GCC 4.3.0: 20080306</p></li><li class="listitem"><p>GCC 4.3.1: 20080606</p></li><li class="listitem"><p>GCC 4.3.2: 20080827</p></li><li class="listitem"><p>GCC 4.3.3: 20090124</p></li><li class="listitem"><p>GCC 4.3.4: 20090804</p></li><li class="listitem"><p>GCC 4.3.5: 20100522</p></li><li class="listitem"><p>GCC 4.3.6: 20110627</p></li><li class="listitem"><p>GCC 4.4.0: 20090421</p></li><li class="listitem"><p>GCC 4.4.1: 20090722</p></li><li class="listitem"><p>GCC 4.4.2: 20091015</p></li><li class="listitem"><p>GCC 4.4.3: 20100121</p></li><li class="listitem"><p>GCC 4.4.4: 20100429</p></li><li class="listitem"><p>GCC 4.4.5: 20101001</p></li><li class="listitem"><p>GCC 4.4.6: 20110416</p></li><li class="listitem"><p>GCC 4.5.0: 20100414</p></li><li class="listitem"><p>GCC 4.5.1: 20100731</p></li><li class="listitem"><p>GCC 4.5.2: 20101216</p></li><li class="listitem"><p>GCC 4.5.3: 20110428</p></li><li class="listitem"><p>GCC 4.6.0: 20110325</p></li><li class="listitem"><p>GCC 4.6.1: 20110627</p></li><li class="listitem"><p>GCC 4.6.2: 20111026</p></li></ul></div><p/></li><li class="listitem"><p> Incremental bumping of a library pre-defined macro, _GLIBCPP_VERSION. This macro is defined as the released version of the library, as a string literal. This is only implemented in - gcc-3.1.0 releases and higher, and is deprecated in 3.4 (where it + GCC 3.1.0 releases and higher, and is deprecated in 3.4 (where it is called _GLIBCXX_VERSION). </p><p> This macro is defined in the file "c++config" in the @@ -169,19 +172,20 @@ compatible. of config.h. </p><p> It is versioned as follows: - </p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>gcc-3.0.0: "3.0.0"</p></li><li class="listitem"><p>gcc-3.0.1: "3.0.0" (Error, should be "3.0.1")</p></li><li class="listitem"><p>gcc-3.0.2: "3.0.0" (Error, should be "3.0.2")</p></li><li class="listitem"><p>gcc-3.0.3: "3.0.0" (Error, should be "3.0.3")</p></li><li class="listitem"><p>gcc-3.0.4: "3.0.0" (Error, should be "3.0.4")</p></li><li class="listitem"><p>gcc-3.1.0: "3.1.0"</p></li><li class="listitem"><p>gcc-3.1.1: "3.1.1"</p></li><li class="listitem"><p>gcc-3.2.0: "3.2"</p></li><li class="listitem"><p>gcc-3.2.1: "3.2.1"</p></li><li class="listitem"><p>gcc-3.2.2: "3.2.2"</p></li><li class="listitem"><p>gcc-3.2.3: "3.2.3"</p></li><li class="listitem"><p>gcc-3.3.0: "3.3"</p></li><li class="listitem"><p>gcc-3.3.1: "3.3.1"</p></li><li class="listitem"><p>gcc-3.3.2: "3.3.2"</p></li><li class="listitem"><p>gcc-3.3.3: "3.3.3"</p></li><li class="listitem"><p>gcc-3.4.x: "version-unused"</p></li><li class="listitem"><p>gcc-4.[0-5].x: "version-unused"</p></li></ul></div><p/></li><li class="listitem"><p> + </p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>GCC 3.0.0: "3.0.0"</p></li><li class="listitem"><p>GCC 3.0.1: "3.0.0" (Error, should be "3.0.1")</p></li><li class="listitem"><p>GCC 3.0.2: "3.0.0" (Error, should be "3.0.2")</p></li><li class="listitem"><p>GCC 3.0.3: "3.0.0" (Error, should be "3.0.3")</p></li><li class="listitem"><p>GCC 3.0.4: "3.0.0" (Error, should be "3.0.4")</p></li><li class="listitem"><p>GCC 3.1.0: "3.1.0"</p></li><li class="listitem"><p>GCC 3.1.1: "3.1.1"</p></li><li class="listitem"><p>GCC 3.2.0: "3.2"</p></li><li class="listitem"><p>GCC 3.2.1: "3.2.1"</p></li><li class="listitem"><p>GCC 3.2.2: "3.2.2"</p></li><li class="listitem"><p>GCC 3.2.3: "3.2.3"</p></li><li class="listitem"><p>GCC 3.3.0: "3.3"</p></li><li class="listitem"><p>GCC 3.3.1: "3.3.1"</p></li><li class="listitem"><p>GCC 3.3.2: "3.3.2"</p></li><li class="listitem"><p>GCC 3.3.3: "3.3.3"</p></li><li class="listitem"><p>GCC 3.4: "version-unused"</p></li><li class="listitem"><p>GCC 4.x: "version-unused"</p></li></ul></div><p/></li><li class="listitem"><p> Matching each specific C++ compiler release to a specific set of - C++ include files. This is only implemented in gcc-3.1.1 releases + C++ include files. This is only implemented in GCC 3.1.1 releases and higher. </p><p> - All C++ includes are installed in include/c++, then nest in a + All C++ includes are installed in + <code class="filename">include/c++</code>, then nest in a directory hierarchy corresponding to the C++ compiler's released version. This version corresponds to the variable "gcc_version" in "libstdc++-v3/acinclude.m4," and more details can be found in that - file's macro GLIBCXX_CONFIGURE (GLIBCPP_CONFIGURE before gcc-3.4.0). + file's macro GLIBCXX_CONFIGURE (GLIBCPP_CONFIGURE before GCC 3.4.0). </p><p> C++ includes are versioned as follows: - </p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>gcc-3.0.0: include/g++-v3</p></li><li class="listitem"><p>gcc-3.0.1: include/g++-v3</p></li><li class="listitem"><p>gcc-3.0.2: include/g++-v3</p></li><li class="listitem"><p>gcc-3.0.3: include/g++-v3</p></li><li class="listitem"><p>gcc-3.0.4: include/g++-v3</p></li><li class="listitem"><p>gcc-3.1.0: include/g++-v3</p></li><li class="listitem"><p>gcc-3.1.1: include/c++/3.1.1</p></li><li class="listitem"><p>gcc-3.2.0: include/c++/3.2</p></li><li class="listitem"><p>gcc-3.2.1: include/c++/3.2.1</p></li><li class="listitem"><p>gcc-3.2.2: include/c++/3.2.2</p></li><li class="listitem"><p>gcc-3.2.3: include/c++/3.2.3</p></li><li class="listitem"><p>gcc-3.3.0: include/c++/3.3</p></li><li class="listitem"><p>gcc-3.3.1: include/c++/3.3.1</p></li><li class="listitem"><p>gcc-3.3.2: include/c++/3.3.2</p></li><li class="listitem"><p>gcc-3.3.3: include/c++/3.3.3</p></li><li class="listitem"><p>gcc-3.4.0: include/c++/3.4.0</p></li><li class="listitem"><p>gcc-3.4.1: include/c++/3.4.1</p></li><li class="listitem"><p>gcc-3.4.2: include/c++/3.4.2</p></li><li class="listitem"><p>gcc-3.4.3: include/c++/3.4.3</p></li><li class="listitem"><p>gcc-3.4.4: include/c++/3.4.4</p></li><li class="listitem"><p>gcc-3.4.5: include/c++/3.4.5</p></li><li class="listitem"><p>gcc-3.4.6: include/c++/3.4.6</p></li><li class="listitem"><p>gcc-4.0.0: include/c++/4.0.0</p></li><li class="listitem"><p>gcc-4.0.1: include/c++/4.0.1</p></li><li class="listitem"><p>gcc-4.0.2: include/c++/4.0.2</p></li><li class="listitem"><p>gcc-4.0.3: include/c++/4.0.3</p></li><li class="listitem"><p>gcc-4.1.0: include/c++/4.1.0</p></li><li class="listitem"><p>gcc-4.1.1: include/c++/4.1.1</p></li><li class="listitem"><p>gcc-4.1.2: include/c++/4.1.2</p></li><li class="listitem"><p>gcc-4.2.0: include/c++/4.2.0</p></li><li class="listitem"><p>gcc-4.2.1: include/c++/4.2.1</p></li><li class="listitem"><p>gcc-4.2.2: include/c++/4.2.2</p></li><li class="listitem"><p>gcc-4.2.3: include/c++/4.2.3</p></li><li class="listitem"><p>gcc-4.2.4: include/c++/4.2.4</p></li><li class="listitem"><p>gcc-4.3.0: include/c++/4.3.0</p></li><li class="listitem"><p>gcc-4.3.1: include/c++/4.3.1</p></li><li class="listitem"><p>gcc-4.3.3: include/c++/4.3.3</p></li><li class="listitem"><p>gcc-4.3.4: include/c++/4.3.4</p></li><li class="listitem"><p>gcc-4.4.0: include/c++/4.4.0</p></li><li class="listitem"><p>gcc-4.4.1: include/c++/4.4.1</p></li><li class="listitem"><p>gcc-4.4.2: include/c++/4.4.2</p></li><li class="listitem"><p>gcc-4.5.0: include/c++/4.5.0</p></li></ul></div><p/></li></ol></div><p> + </p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>GCC 3.0.0: include/g++-v3</p></li><li class="listitem"><p>GCC 3.0.1: include/g++-v3</p></li><li class="listitem"><p>GCC 3.0.2: include/g++-v3</p></li><li class="listitem"><p>GCC 3.0.3: include/g++-v3</p></li><li class="listitem"><p>GCC 3.0.4: include/g++-v3</p></li><li class="listitem"><p>GCC 3.1.0: include/g++-v3</p></li><li class="listitem"><p>GCC 3.1.1: include/c++/3.1.1</p></li><li class="listitem"><p>GCC 3.2.0: include/c++/3.2</p></li><li class="listitem"><p>GCC 3.2.1: include/c++/3.2.1</p></li><li class="listitem"><p>GCC 3.2.2: include/c++/3.2.2</p></li><li class="listitem"><p>GCC 3.2.3: include/c++/3.2.3</p></li><li class="listitem"><p>GCC 3.3.0: include/c++/3.3</p></li><li class="listitem"><p>GCC 3.3.1: include/c++/3.3.1</p></li><li class="listitem"><p>GCC 3.3.2: include/c++/3.3.2</p></li><li class="listitem"><p>GCC 3.3.3: include/c++/3.3.3</p></li><li class="listitem"><p>GCC 3.4.x: include/c++/3.4.x</p></li><li class="listitem"><p>GCC 4.x.y: include/c++/4.x.y</p></li></ul></div><p/></li></ol></div><p> Taken together, these techniques can accurately specify interface and implementation changes in the GNU C++ tools themselves. Used properly, they allow both the GNU C++ tools implementation, and @@ -199,8 +203,8 @@ compatible. attempt to version symbols (or age gracefully, really) until version 3.1.0. </p><p> - Most modern Linux and BSD versions, particularly ones using - gcc-3.1.x tools and more recent vintages, will meet the + Most modern GNU/Linux and BSD versions, particularly ones using + GCC 3.1 and later, will meet the requirements above, as does Solaris 2.5 and up. </p></div><div class="section" title="Configuring"><div class="titlepage"><div><div><h4 class="title"><a id="abi.versioning.config"/>Configuring</h4></div></div></div><p> It turns out that most of the configure options that change @@ -409,8 +413,8 @@ us. We'd like to know about them! </p></div><div class="section" title="Multiple ABI Testing"><div class="titlepage"><div><div><h4 class="title"><a id="abi.testing.multi"/>Multiple ABI Testing</h4></div></div></div><p> A "C" application, dynamically linked to two shared libraries, liba, libb. The dependent library liba is a C++ shared library compiled with -gcc-3.3.x, and uses io, exceptions, locale, etc. The dependent library -libb is a C++ shared library compiled with gcc-3.4.x, and also uses io, +GCC 3.3, and uses io, exceptions, locale, etc. The dependent library +libb is a C++ shared library compiled with GCC 3.4, and also uses io, exceptions, locale, etc. </p><p> As above, libone is constructed as follows: </p><pre class="programlisting"> %$bld/H-x86-gcc-3.4.0/bin/g++ -fPIC -DPIC -c a.cc @@ -490,39 +494,39 @@ gcc test.c -g -O2 -L. -lone -ltwo /usr/lib/libstdc++.so.5 /usr/lib/libstdc++.so. <a class="link" href="http://www.codesourcery.com/public/cxx-abi"> C++ ABI Summary </a> - </em>. </span></p></div><div class="biblioentry" title="Intel Compilers for Linux Compatibility with the GNU Compilers"><a id="id617197"/><p><span class="title"><em> + </em>. </span></p></div><div class="biblioentry" title="Intel Compilers for Linux Compatibility with the GNU Compilers"><a id="id668092"/><p><span class="title"><em> <a class="link" href="http://www.intel.com/cd/software/products/asmo-na/eng/284736.htm"> Intel Compilers for Linux Compatibility with the GNU Compilers </a> - </em>. </span></p></div><div class="biblioentry" title="Linker and Libraries Guide (document 819-0690)"><a id="id617212"/><p><span class="title"><em> + </em>. </span></p></div><div class="biblioentry" title="Linker and Libraries Guide (document 819-0690)"><a id="id668108"/><p><span class="title"><em> <a class="link" href="http://download.oracle.com/docs/cd/E19963-01/html/819-0690/index.html"> Linker and Libraries Guide (document 819-0690) </a> - </em>. </span></p></div><div class="biblioentry" title="Sun Studio 11: C++ Migration Guide (document 819-3689)"><a id="id617228"/><p><span class="title"><em> + </em>. </span></p></div><div class="biblioentry" title="Sun Studio 11: C++ Migration Guide (document 819-3689)"><a id="id668123"/><p><span class="title"><em> <a class="link" href="http://download.oracle.com/docs/cd/E19422-01/819-3689/index.html"> Sun Studio 11: C++ Migration Guide (document 819-3689) </a> - </em>. </span></p></div><div class="biblioentry" title="How to Write Shared Libraries"><a id="id617243"/><p><span class="title"><em> + </em>. </span></p></div><div class="biblioentry" title="How to Write Shared Libraries"><a id="id668138"/><p><span class="title"><em> <a class="link" href="http://www.akkadia.org/drepper/dsohowto.pdf"> How to Write Shared Libraries </a> - </em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span></p></div><div class="biblioentry" title="C++ ABI for the ARM Architecture"><a id="id617272"/><p><span class="title"><em> + </em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span></p></div><div class="biblioentry" title="C++ ABI for the ARM Architecture"><a id="id668167"/><p><span class="title"><em> <a class="link" href="http://www.arm.com/miscPDFs/8033.pdf"> C++ ABI for the ARM Architecture </a> - </em>. </span></p></div><div class="biblioentry" title="Dynamic Shared Objects: Survey and Issues"><a id="id617287"/><p><span class="title"><em> + </em>. </span></p></div><div class="biblioentry" title="Dynamic Shared Objects: Survey and Issues"><a id="id668182"/><p><span class="title"><em> <a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1976.html"> Dynamic Shared Objects: Survey and Issues </a> </em>. </span><span class="subtitle"> ISO C++ J16/06-0046 - . </span><span class="author"><span class="firstname">Benjamin</span> <span class="surname">Kosnik</span>. </span></p></div><div class="biblioentry" title="Versioning With Namespaces"><a id="id617314"/><p><span class="title"><em> + . </span><span class="author"><span class="firstname">Benjamin</span> <span class="surname">Kosnik</span>. </span></p></div><div class="biblioentry" title="Versioning With Namespaces"><a id="id668210"/><p><span class="title"><em> <a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2013.html"> Versioning With Namespaces </a> </em>. </span><span class="subtitle"> ISO C++ J16/06-0083 - . </span><span class="author"><span class="firstname">Benjamin</span> <span class="surname">Kosnik</span>. </span></p></div><div class="biblioentry" title="Binary Compatibility of Shared Libraries Implemented in C++ on GNU/Linux Systems"><a id="id617342"/><p><span class="title"><em> + . </span><span class="author"><span class="firstname">Benjamin</span> <span class="surname">Kosnik</span>. </span></p></div><div class="biblioentry" title="Binary Compatibility of Shared Libraries Implemented in C++ on GNU/Linux Systems"><a id="id668237"/><p><span class="title"><em> <a class="link" href="http://syrcose.ispras.ru/2009/files/SYRCoSE2009-CfP.pdf"> Binary Compatibility of Shared Libraries Implemented in C++ on GNU/Linux Systems diff --git a/libstdc++-v3/doc/html/manual/algorithms.html b/libstdc++-v3/doc/html/manual/algorithms.html index 900ccf31053..0b8c4b3be42 100644 --- a/libstdc++-v3/doc/html/manual/algorithms.html +++ b/libstdc++-v3/doc/html/manual/algorithms.html @@ -7,7 +7,7 @@ Standard Contents </th><td align="right"> <a accesskey="n" href="numerics.html">Next</a></td></tr></table><hr/></div><div class="chapter" title="Chapter 11. Algorithms"><div class="titlepage"><div><div><h2 class="title"><a id="std.algorithms"/>Chapter 11. Algorithms - <a id="id561444" class="indexterm"/> + <a id="id612473" class="indexterm"/> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="algorithms.html#std.algorithms.mutating">Mutating</a></span></dt><dd><dl><dt><span class="section"><a href="algorithms.html#algorithms.mutating.swap"><code class="function">swap</code></a></span></dt><dd><dl><dt><span class="section"><a href="algorithms.html#algorithms.swap.specializations">Specializations</a></span></dt></dl></dd></dl></dd></dl></div><p> The neatest accomplishment of the algorithms sect1 is that all the work is done via iterators, not containers directly. This means two diff --git a/libstdc++-v3/doc/html/manual/api.html b/libstdc++-v3/doc/html/manual/api.html index 7ae8b270702..980f8664b98 100644 --- a/libstdc++-v3/doc/html/manual/api.html +++ b/libstdc++-v3/doc/html/manual/api.html @@ -75,11 +75,11 @@ _Alloc_traits</code> have been removed. <span class="type">__alloc</span> to select an underlying allocator that satisfied memory allocation requests. The selection of this underlying allocator was not user-configurable. - </p><div class="table"><a id="id617901"/><p class="title"><strong>Table B.6. Extension Allocators</strong></p><div class="table-contents"><table summary="Extension Allocators" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Allocator (3.4)</th><th style="text-align: left">Header (3.4)</th><th style="text-align: left">Allocator (3.[0-3])</th><th style="text-align: left">Header (3.[0-3])</th></tr></thead><tbody><tr><td style="text-align: left"><code class="classname">__gnu_cxx::new_allocator<T></code></td><td style="text-align: left"><code class="filename">ext/new_allocator.h</code></td><td style="text-align: left"><code class="classname">std::__new_alloc</code></td><td style="text-align: left"><code class="filename">memory</code></td></tr><tr><td style="text-align: left"><code class="classname">__gnu_cxx::malloc_allocator<T></code></td><td style="text-align: left"><code class="filename">ext/malloc_allocator.h</code></td><td style="text-align: left"><code class="classname">std::__malloc_alloc_template<int></code></td><td style="text-align: left"><code class="filename">memory</code></td></tr><tr><td style="text-align: left"><code class="classname">__gnu_cxx::debug_allocator<T></code></td><td style="text-align: left"><code class="filename">ext/debug_allocator.h</code></td><td style="text-align: left"><code class="classname">std::debug_alloc<T></code></td><td style="text-align: left"><code class="filename">memory</code></td></tr><tr><td style="text-align: left"><code class="classname">__gnu_cxx::__pool_alloc<T></code></td><td style="text-align: left"><code class="filename">ext/pool_allocator.h</code></td><td style="text-align: left"><code class="classname">std::__default_alloc_template<bool,int></code></td><td style="text-align: left"><code class="filename">memory</code></td></tr><tr><td style="text-align: left"><code class="classname">__gnu_cxx::__mt_alloc<T></code></td><td style="text-align: left"><code class="filename">ext/mt_allocator.h</code></td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left"><code class="classname">__gnu_cxx::bitmap_allocator<T></code></td><td style="text-align: left"><code class="filename">ext/bitmap_allocator.h</code></td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr></tbody></table></div></div><br class="table-break"/><p> Releases after gcc-3.4 have continued to add to the collection + </p><div class="table"><a id="id668796"/><p class="title"><strong>Table B.6. Extension Allocators</strong></p><div class="table-contents"><table summary="Extension Allocators" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Allocator (3.4)</th><th style="text-align: left">Header (3.4)</th><th style="text-align: left">Allocator (3.[0-3])</th><th style="text-align: left">Header (3.[0-3])</th></tr></thead><tbody><tr><td style="text-align: left"><code class="classname">__gnu_cxx::new_allocator<T></code></td><td style="text-align: left"><code class="filename">ext/new_allocator.h</code></td><td style="text-align: left"><code class="classname">std::__new_alloc</code></td><td style="text-align: left"><code class="filename">memory</code></td></tr><tr><td style="text-align: left"><code class="classname">__gnu_cxx::malloc_allocator<T></code></td><td style="text-align: left"><code class="filename">ext/malloc_allocator.h</code></td><td style="text-align: left"><code class="classname">std::__malloc_alloc_template<int></code></td><td style="text-align: left"><code class="filename">memory</code></td></tr><tr><td style="text-align: left"><code class="classname">__gnu_cxx::debug_allocator<T></code></td><td style="text-align: left"><code class="filename">ext/debug_allocator.h</code></td><td style="text-align: left"><code class="classname">std::debug_alloc<T></code></td><td style="text-align: left"><code class="filename">memory</code></td></tr><tr><td style="text-align: left"><code class="classname">__gnu_cxx::__pool_alloc<T></code></td><td style="text-align: left"><code class="filename">ext/pool_allocator.h</code></td><td style="text-align: left"><code class="classname">std::__default_alloc_template<bool,int></code></td><td style="text-align: left"><code class="filename">memory</code></td></tr><tr><td style="text-align: left"><code class="classname">__gnu_cxx::__mt_alloc<T></code></td><td style="text-align: left"><code class="filename">ext/mt_allocator.h</code></td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left"><code class="classname">__gnu_cxx::bitmap_allocator<T></code></td><td style="text-align: left"><code class="filename">ext/bitmap_allocator.h</code></td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr></tbody></table></div></div><br class="table-break"/><p> Releases after gcc-3.4 have continued to add to the collection of available allocators. All of these new allocators are standard-style. The following table includes details, along with the first released version of GCC that included the extension allocator. - </p><div class="table"><a id="id618132"/><p class="title"><strong>Table B.7. Extension Allocators Continued</strong></p><div class="table-contents"><table summary="Extension Allocators Continued" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/></colgroup><thead><tr><th style="text-align: left">Allocator</th><th style="text-align: left">Include</th><th style="text-align: left">Version</th></tr></thead><tbody><tr><td style="text-align: left"><code class="classname">__gnu_cxx::array_allocator<T></code></td><td style="text-align: left"><code class="filename">ext/array_allocator.h</code></td><td style="text-align: left">4.0.0</td></tr><tr><td style="text-align: left"><code class="classname">__gnu_cxx::throw_allocator<T></code></td><td style="text-align: left"><code class="filename">ext/throw_allocator.h</code></td><td style="text-align: left">4.2.0</td></tr></tbody></table></div></div><br class="table-break"/><p> + </p><div class="table"><a id="id669027"/><p class="title"><strong>Table B.7. Extension Allocators Continued</strong></p><div class="table-contents"><table summary="Extension Allocators Continued" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/></colgroup><thead><tr><th style="text-align: left">Allocator</th><th style="text-align: left">Include</th><th style="text-align: left">Version</th></tr></thead><tbody><tr><td style="text-align: left"><code class="classname">__gnu_cxx::array_allocator<T></code></td><td style="text-align: left"><code class="filename">ext/array_allocator.h</code></td><td style="text-align: left">4.0.0</td></tr><tr><td style="text-align: left"><code class="classname">__gnu_cxx::throw_allocator<T></code></td><td style="text-align: left"><code class="filename">ext/throw_allocator.h</code></td><td style="text-align: left">4.2.0</td></tr></tbody></table></div></div><br class="table-break"/><p> Debug mode first appears. </p><p> Precompiled header support <acronym class="acronym">PCH</acronym> support. diff --git a/libstdc++-v3/doc/html/manual/appendix_contributing.html b/libstdc++-v3/doc/html/manual/appendix_contributing.html index 7be7e1a83c7..c4e168434a0 100644 --- a/libstdc++-v3/doc/html/manual/appendix_contributing.html +++ b/libstdc++-v3/doc/html/manual/appendix_contributing.html @@ -7,7 +7,7 @@ Appendices </th><td align="right"> <a accesskey="n" href="source_organization.html">Next</a></td></tr></table><hr/></div><div class="appendix" title="Appendix A. Contributing"><div class="titlepage"><div><div><h1 class="title"><a id="appendix.contrib"/> Contributing - <a id="id608700" class="indexterm"/> + <a id="id659738" class="indexterm"/> </h1></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="appendix_contributing.html#contrib.list">Contributor Checklist</a></span></dt><dd><dl><dt><span class="section"><a href="appendix_contributing.html#list.reading">Reading</a></span></dt><dt><span class="section"><a href="appendix_contributing.html#list.copyright">Assignment</a></span></dt><dt><span class="section"><a href="appendix_contributing.html#list.getting">Getting Sources</a></span></dt><dt><span class="section"><a href="appendix_contributing.html#list.patches">Submitting Patches</a></span></dt></dl></dd><dt><span class="section"><a href="source_organization.html">Directory Layout and Source Conventions</a></span></dt><dt><span class="section"><a href="source_code_style.html">Coding Style</a></span></dt><dd><dl><dt><span class="section"><a href="source_code_style.html#coding_style.bad_identifiers">Bad Identifiers</a></span></dt><dt><span class="section"><a href="source_code_style.html#coding_style.example">By Example</a></span></dt></dl></dd><dt><span class="section"><a href="source_design_notes.html">Design Notes</a></span></dt></dl></div><p> The GNU C++ Library follows an open development model. Active contributors are assigned maintainer-ship responsibility, and given @@ -22,20 +22,19 @@ two meeting commitment for voting rights, may get a copy of the standard from their respective national standards organization. In the USA, this national standards - organization is ANSI and their web-site is right - <a class="link" href="http://www.ansi.org">here.</a> - (And if you've already registered with them, clicking this link will take you to directly to the place where you can - <a class="link" href="http://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC+14882:2003">buy the standard on-line</a>.) + organization is + <a class="link" href="http://www.ansi.org">ANSI</a>. + (And if you've already registered with them you can + <a class="link" href="http://webstore.ansi.org/RecordDetail.aspx?sku=INCITS%2fISO%2fIEC+14882-2003">buy the standard on-line</a>.) </p></li><li class="listitem"><p> The library working group bugs, and known defects, can be obtained here: - <a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/">http://www.open-std.org/jtc1/sc22/wg21 </a> + <a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/">http://www.open-std.org/jtc1/sc22/wg21</a> </p></li><li class="listitem"><p> The newsgroup dedicated to standardization issues is - comp.std.c++: this FAQ for this group is quite useful and - can be - found <a class="link" href="http://www.comeaucomputing.com/csc/faq.html"> - here </a>. + comp.std.c++: the + <a class="link" href="http://www.comeaucomputing.com/csc/faq.html">FAQ</a> + for this group is quite useful. </p></li><li class="listitem"><p> Peruse the <a class="link" href="http://www.gnu.org/prep/standards">GNU @@ -44,11 +43,11 @@ </p></li><li class="listitem"><p> Be familiar with the extensions that preceded these general GNU rules. These style issues for libstdc++ can be - found <a class="link" href="source_code_style.html" title="Coding Style">here</a>. + found in <a class="link" href="source_code_style.html" title="Coding Style">Coding Style</a>. </p></li><li class="listitem"><p> And last but certainly not least, read the - library-specific information - found <a class="link" href="appendix_porting.html" title="Appendix B. Porting and Maintenance"> here</a>. + library-specific information found in + <a class="link" href="appendix_porting.html" title="Appendix B. Porting and Maintenance">Porting and Maintenance</a>. </p></li></ul></div></div><div class="section" title="Assignment"><div class="titlepage"><div><div><h3 class="title"><a id="list.copyright"/>Assignment</h3></div></div></div><p> Small changes can be accepted without a copyright assignment form on file. New code and additions to the library need completed copyright diff --git a/libstdc++-v3/doc/html/manual/appendix_free.html b/libstdc++-v3/doc/html/manual/appendix_free.html index d8aba6b3f36..81134b71bff 100644 --- a/libstdc++-v3/doc/html/manual/appendix_free.html +++ b/libstdc++-v3/doc/html/manual/appendix_free.html @@ -7,7 +7,7 @@ Appendices </th><td align="right"> <a accesskey="n" href="appendix_gpl.html">Next</a></td></tr></table><hr/></div><div class="appendix" title="Appendix C. Free Software Needs Free Documentation"><div class="titlepage"><div><div><h1 class="title"><a id="appendix.free"/> Free Software Needs Free Documentation - <a id="id621207" class="indexterm"/> + <a id="id672102" class="indexterm"/> </h1></div></div></div><p> The biggest deficiency in free operating systems is not in the software--it is the lack of good free manuals that we can include in diff --git a/libstdc++-v3/doc/html/manual/appendix_gpl.html b/libstdc++-v3/doc/html/manual/appendix_gpl.html index bc4036768f2..c66586f8b67 100644 --- a/libstdc++-v3/doc/html/manual/appendix_gpl.html +++ b/libstdc++-v3/doc/html/manual/appendix_gpl.html @@ -78,7 +78,7 @@ </p><p> The precise terms and conditions for copying, distribution and modification follow. - </p><h2><a id="id621546"/> + </p><h2><a id="id672441"/> TERMS AND CONDITIONS </h2><h2><a id="gpl-3-definitions"/> 0. Definitions. @@ -619,7 +619,7 @@ waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. - </p><h2><a id="id622370"/> + </p><h2><a id="id673265"/> END OF TERMS AND CONDITIONS </h2><h2><a id="HowToApply"/> How to Apply These Terms to Your New Programs diff --git a/libstdc++-v3/doc/html/manual/appendix_porting.html b/libstdc++-v3/doc/html/manual/appendix_porting.html index 78733b7a02b..5f340ddc924 100644 --- a/libstdc++-v3/doc/html/manual/appendix_porting.html +++ b/libstdc++-v3/doc/html/manual/appendix_porting.html @@ -7,7 +7,7 @@ Appendices </th><td align="right"> <a accesskey="n" href="documentation_hacking.html">Next</a></td></tr></table><hr/></div><div class="appendix" title="Appendix B. Porting and Maintenance"><div class="titlepage"><div><div><h1 class="title"><a id="appendix.porting"/> Porting and Maintenance - <a id="id609819" class="indexterm"/> + <a id="id660856" class="indexterm"/> </h1></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="appendix_porting.html#appendix.porting.build_hacking">Configure and Build Hacking</a></span></dt><dd><dl><dt><span class="section"><a href="appendix_porting.html#build_hacking.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="appendix_porting.html#build_hacking.map">Overview: What Comes from Where</a></span></dt><dt><span class="section"><a href="appendix_porting.html#build_hacking.scripts">Storing Information in non-AC files (like configure.host)</a></span></dt><dt><span class="section"><a href="appendix_porting.html#build_hacking.conventions">Coding and Commenting Conventions</a></span></dt><dt><span class="section"><a href="appendix_porting.html#build_hacking.acinclude">The acinclude.m4 layout</a></span></dt><dt><span class="section"><a href="appendix_porting.html#build_hacking.enable"><code class="constant">GLIBCXX_ENABLE</code>, the <code class="literal">--enable</code> maker</a></span></dt></dl></dd><dt><span class="section"><a href="documentation_hacking.html">Writing and Generating Documentation</a></span></dt><dd><dl><dt><span class="section"><a href="documentation_hacking.html#doc.intro">Introduction</a></span></dt><dt><span class="section"><a href="documentation_hacking.html#doc.generation">Generating Documentation</a></span></dt><dt><span class="section"><a href="documentation_hacking.html#doc.doxygen">Doxygen</a></span></dt><dd><dl><dt><span class="section"><a href="documentation_hacking.html#doxygen.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="documentation_hacking.html#doxygen.rules">Generating the Doxygen Files</a></span></dt><dt><span class="section"><a href="documentation_hacking.html#doxygen.markup">Markup</a></span></dt></dl></dd><dt><span class="section"><a href="documentation_hacking.html#doc.docbook">Docbook</a></span></dt><dd><dl><dt><span class="section"><a href="documentation_hacking.html#docbook.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="documentation_hacking.html#docbook.rules">Generating the DocBook Files</a></span></dt><dt><span class="section"><a href="documentation_hacking.html#docbook.validation">Editing and Validation</a></span></dt><dt><span class="section"><a href="documentation_hacking.html#docbook.examples">File Organization and Basics</a></span></dt><dt><span class="section"><a href="documentation_hacking.html#docbook.markup">Markup By Example</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="internals.html">Porting to New Hardware or Operating Systems</a></span></dt><dd><dl><dt><span class="section"><a href="internals.html#internals.os">Operating System</a></span></dt><dt><span class="section"><a href="internals.html#internals.cpu">CPU</a></span></dt><dt><span class="section"><a href="internals.html#internals.char_types">Character Types</a></span></dt><dt><span class="section"><a href="internals.html#internals.thread_safety">Thread Safety</a></span></dt><dt><span class="section"><a href="internals.html#internals.numeric_limits">Numeric Limits</a></span></dt><dt><span class="section"><a href="internals.html#internals.libtool">Libtool</a></span></dt></dl></dd><dt><span class="section"><a href="test.html">Test</a></span></dt><dd><dl><dt><span class="section"><a href="test.html#test.organization">Organization</a></span></dt><dd><dl><dt><span class="section"><a href="test.html#test.organization.layout">Directory Layout</a></span></dt><dt><span class="section"><a href="test.html#test.organization.naming">Naming Conventions</a></span></dt></dl></dd><dt><span class="section"><a href="test.html#test.run">Running the Testsuite</a></span></dt><dd><dl><dt><span class="section"><a href="test.html#test.run.basic">Basic</a></span></dt><dt><span class="section"><a href="test.html#test.run.variations">Variations</a></span></dt><dt><span class="section"><a href="test.html#test.run.permutations">Permutations</a></span></dt></dl></dd><dt><span class="section"><a href="test.html#test.new_tests">Writing a new test case</a></span></dt><dt><span class="section"><a href="test.html#test.harness">Test Harness and Utilities</a></span></dt><dd><dl><dt><span class="section"><a href="test.html#test.harness.dejagnu">Dejagnu Harness Details</a></span></dt><dt><span class="section"><a href="test.html#test.harness.utils">Utilities</a></span></dt></dl></dd><dt><span class="section"><a href="test.html#test.special">Special Topics</a></span></dt><dd><dl><dt><span class="section"><a href="test.html#test.exception.safety"> Qualifying Exception Safety Guarantees @@ -41,7 +41,7 @@ Support for C++11 dialect. in GCC try to stay in sync with each other in terms of versions of the auto-tools used, so please try to play nicely with the neighbors. - </p></div><div class="section" title="Overview: What Comes from Where"><div class="titlepage"><div><div><h3 class="title"><a id="build_hacking.map"/>Overview: What Comes from Where</h3></div></div></div><div class="figure"><a id="id609952"/><p class="title"><strong>Figure B.1. Configure and Build File Dependencies</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/confdeps.png" style="text-align: middle" alt="Dependency Graph for Configure and Build Files"/></div></div></div><br class="figure-break"/><p> + </p></div><div class="section" title="Overview: What Comes from Where"><div class="titlepage"><div><div><h3 class="title"><a id="build_hacking.map"/>Overview: What Comes from Where</h3></div></div></div><div class="figure"><a id="id660988"/><p class="title"><strong>Figure B.1. Configure and Build File Dependencies</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/confdeps.png" style="text-align: middle" alt="Dependency Graph for Configure and Build Files"/></div></div></div><br class="figure-break"/><p> Regenerate all generated files by using the command sequence <code class="code">"autoreconf"</code> at the top level of the libstdc++ source directory. The following will also work, but is much more complex: diff --git a/libstdc++-v3/doc/html/manual/atomics.html b/libstdc++-v3/doc/html/manual/atomics.html index efcb8f3c7c0..084dabdcbff 100644 --- a/libstdc++-v3/doc/html/manual/atomics.html +++ b/libstdc++-v3/doc/html/manual/atomics.html @@ -7,7 +7,7 @@ Standard Contents </th><td align="right"> <a accesskey="n" href="concurrency.html">Next</a></td></tr></table><hr/></div><div class="chapter" title="Chapter 14. Atomics"><div class="titlepage"><div><div><h2 class="title"><a id="std.atomics"/>Chapter 14. Atomics - <a id="id563096" class="indexterm"/> + <a id="id614125" class="indexterm"/> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="atomics.html#std.atomics.api">API Reference</a></span></dt></dl></div><p> Facilities for atomic operations. </p><div class="section" title="API Reference"><div class="titlepage"><div><div><h2 class="title"><a id="std.atomics.api"/>API Reference</h2></div></div></div><p> diff --git a/libstdc++-v3/doc/html/manual/backwards.html b/libstdc++-v3/doc/html/manual/backwards.html index 48732f2ca46..a95e0cdfd2c 100644 --- a/libstdc++-v3/doc/html/manual/backwards.html +++ b/libstdc++-v3/doc/html/manual/backwards.html @@ -812,7 +812,7 @@ AC_DEFUN([AC_HEADER_STDCXX_11], [ #include <cmath> #include <csetjmp> #include <csignal> - // #include <cstdalign> + #include <cstdalign> #include <cstdarg> #include <cstdbool> #include <cstddef> @@ -840,11 +840,11 @@ AC_DEFUN([AC_HEADER_STDCXX_11], [ #include <fstream> #include <functional> #include <future> + #include <initializer_list> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> - #include <initializer_list> #include <istream> #include <iterator> #include <limits> @@ -941,15 +941,15 @@ AC_DEFUN([AC_HEADER_UNORDERED_SET], [ This is a change in behavior from older versions. Now, most <span class="type">iterator_type</span> typedefs in container classes are POD objects, not <span class="type">value_type</span> pointers. -</p></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="backwards.biblio"/>Bibliography</h3></div></div></div><div class="biblioentry" title="Migrating to GCC 4.1"><a id="id621110"/><p><span class="title"><em> +</p></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="backwards.biblio"/>Bibliography</h3></div></div></div><div class="biblioentry" title="Migrating to GCC 4.1"><a id="id672005"/><p><span class="title"><em> <a class="link" href="http://www.kegel.com/gcc/gcc4.html"> Migrating to GCC 4.1 </a> - </em>. </span><span class="author"><span class="firstname">Dan</span> <span class="surname">Kegel</span>. </span></p></div><div class="biblioentry" title="Building the Whole Debian Archive with GCC 4.1: A Summary"><a id="id621133"/><p><span class="title"><em> + </em>. </span><span class="author"><span class="firstname">Dan</span> <span class="surname">Kegel</span>. </span></p></div><div class="biblioentry" title="Building the Whole Debian Archive with GCC 4.1: A Summary"><a id="id672028"/><p><span class="title"><em> <a class="link" href="http://lists.debian.org/debian-gcc/2006/03/msg00405.html"> Building the Whole Debian Archive with GCC 4.1: A Summary </a> - </em>. </span><span class="author"><span class="firstname">Martin</span> <span class="surname">Michlmayr</span>. </span></p></div><div class="biblioentry" title="Migration guide for GCC-3.2"><a id="id621157"/><p><span class="title"><em> + </em>. </span><span class="author"><span class="firstname">Martin</span> <span class="surname">Michlmayr</span>. </span></p></div><div class="biblioentry" title="Migration guide for GCC-3.2"><a id="id672052"/><p><span class="title"><em> <a class="link" href="http://annwm.lbl.gov/~leggett/Atlas/gcc-3.2.html"> Migration guide for GCC-3.2 </a> diff --git a/libstdc++-v3/doc/html/manual/bk01pt02.html b/libstdc++-v3/doc/html/manual/bk01pt02.html index bdd5c0e3f59..edbb8966cfe 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt02.html +++ b/libstdc++-v3/doc/html/manual/bk01pt02.html @@ -13,13 +13,13 @@ </a></span></dt><dd><dl><dt><span class="section"><a href="diagnostics.html#std.diagnostics.exceptions">Exceptions</a></span></dt><dd><dl><dt><span class="section"><a href="diagnostics.html#std.diagnostics.exceptions.api">API Reference</a></span></dt><dt><span class="section"><a href="diagnostics.html#std.diagnostics.exceptions.data">Adding Data to <code class="classname">exception</code></a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt02ch05s02.html">Concept Checking</a></span></dt></dl></dd><dt><span class="chapter"><a href="utilities.html">6. Utilities -</a></span></dt><dd><dl><dt><span class="section"><a href="utilities.html#std.util.functors">Functors</a></span></dt><dt><span class="section"><a href="pairs.html">Pairs</a></span></dt><dt><span class="section"><a href="memory.html">Memory</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#std.util.memory.allocator">Allocators</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#allocator.req">Requirements</a></span></dt><dt><span class="section"><a href="memory.html#allocator.design_issues">Design Issues</a></span></dt><dt><span class="section"><a href="memory.html#allocator.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#id542426">Interface Design</a></span></dt><dt><span class="section"><a href="memory.html#id542456">Selecting Default Allocation Policy</a></span></dt><dt><span class="section"><a href="memory.html#id542566">Disabling Memory Caching</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#allocator.using">Using a Specific Allocator</a></span></dt><dt><span class="section"><a href="memory.html#allocator.custom">Custom Allocators</a></span></dt><dt><span class="section"><a href="memory.html#allocator.ext">Extension Allocators</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#std.util.memory.auto_ptr">auto_ptr</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#auto_ptr.limitations">Limitations</a></span></dt><dt><span class="section"><a href="memory.html#auto_ptr.using">Use in Containers</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#std.util.memory.shared_ptr">shared_ptr</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#shared_ptr.req">Requirements</a></span></dt><dt><span class="section"><a href="memory.html#shared_ptr.design_issues">Design Issues</a></span></dt><dt><span class="section"><a href="memory.html#shared_ptr.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#id543565">Class Hierarchy</a></span></dt><dt><span class="section"><a href="memory.html#id543744">Thread Safety</a></span></dt><dt><span class="section"><a href="memory.html#id543814">Selecting Lock Policy</a></span></dt><dt><span class="section"><a href="memory.html#id543936">Dual C++11 and TR1 Implementation</a></span></dt><dt><span class="section"><a href="memory.html#id543992">Related functions and classes</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#shared_ptr.using">Use</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#id556361">Examples</a></span></dt><dt><span class="section"><a href="memory.html#id556391">Unresolved Issues</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#shared_ptr.ack">Acknowledgments</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="traits.html">Traits</a></span></dt></dl></dd><dt><span class="chapter"><a href="strings.html">7. +</a></span></dt><dd><dl><dt><span class="section"><a href="utilities.html#std.util.functors">Functors</a></span></dt><dt><span class="section"><a href="pairs.html">Pairs</a></span></dt><dt><span class="section"><a href="memory.html">Memory</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#std.util.memory.allocator">Allocators</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#allocator.req">Requirements</a></span></dt><dt><span class="section"><a href="memory.html#allocator.design_issues">Design Issues</a></span></dt><dt><span class="section"><a href="memory.html#allocator.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#id593505">Interface Design</a></span></dt><dt><span class="section"><a href="memory.html#id593534">Selecting Default Allocation Policy</a></span></dt><dt><span class="section"><a href="memory.html#id593645">Disabling Memory Caching</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#allocator.using">Using a Specific Allocator</a></span></dt><dt><span class="section"><a href="memory.html#allocator.custom">Custom Allocators</a></span></dt><dt><span class="section"><a href="memory.html#allocator.ext">Extension Allocators</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#std.util.memory.auto_ptr">auto_ptr</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#auto_ptr.limitations">Limitations</a></span></dt><dt><span class="section"><a href="memory.html#auto_ptr.using">Use in Containers</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#std.util.memory.shared_ptr">shared_ptr</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#shared_ptr.req">Requirements</a></span></dt><dt><span class="section"><a href="memory.html#shared_ptr.design_issues">Design Issues</a></span></dt><dt><span class="section"><a href="memory.html#shared_ptr.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#id594644">Class Hierarchy</a></span></dt><dt><span class="section"><a href="memory.html#id594832">Thread Safety</a></span></dt><dt><span class="section"><a href="memory.html#id594892">Selecting Lock Policy</a></span></dt><dt><span class="section"><a href="memory.html#id595014">Related functions and classes</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#shared_ptr.using">Use</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#id607385">Examples</a></span></dt><dt><span class="section"><a href="memory.html#id607415">Unresolved Issues</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#shared_ptr.ack">Acknowledgments</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="traits.html">Traits</a></span></dt></dl></dd><dt><span class="chapter"><a href="strings.html">7. Strings </a></span></dt><dd><dl><dt><span class="section"><a href="strings.html#std.strings.string">String Classes</a></span></dt><dd><dl><dt><span class="section"><a href="strings.html#strings.string.simple">Simple Transformations</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.case">Case Sensitivity</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.character_types">Arbitrary Character Types</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.token">Tokenizing</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.shrink">Shrink to Fit</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.Cstring">CString (MFC)</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="localization.html">8. Localization -</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales">Locales</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locales.locale.req">Requirements</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.design">Design</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locale.impl.c">Interacting with "C" locales</a></span></dt></dl></dd><dt><span class="section"><a href="localization.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="facets.html">Facets</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#std.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.ctype.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#id558091">Specializations</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#std.localization.facet.codecvt">codecvt</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#codecvt.design.wchar_t_size"><span class="type">wchar_t</span> Size</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.unicode">Support for Unicode</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.issues">Other Issues</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#manual.localization.facet.messages">messages</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.messages.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.design">Design</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#messages.impl.models">Models</a></span></dt><dt><span class="section"><a href="facets.html#messages.impl.gnu">The GNU Model</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.messages.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="chapter"><a href="containers.html">9. +</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales">Locales</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locales.locale.req">Requirements</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.design">Design</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locale.impl.c">Interacting with "C" locales</a></span></dt></dl></dd><dt><span class="section"><a href="localization.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="facets.html">Facets</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#std.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.ctype.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#id609115">Specializations</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#std.localization.facet.codecvt">codecvt</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#codecvt.design.wchar_t_size"><span class="type">wchar_t</span> Size</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.unicode">Support for Unicode</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.issues">Other Issues</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#manual.localization.facet.messages">messages</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.messages.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.design">Design</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#messages.impl.models">Models</a></span></dt><dt><span class="section"><a href="facets.html#messages.impl.gnu">The GNU Model</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.messages.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="chapter"><a href="containers.html">9. Containers </a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="section"><a href="containers.html#containers.sequences.vector">vector</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="iterators.html">10. diff --git a/libstdc++-v3/doc/html/manual/bk01pt03ch17s03.html b/libstdc++-v3/doc/html/manual/bk01pt03ch17s03.html index 0518f10fd15..f57a0af3c2e 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt03ch17s03.html +++ b/libstdc++-v3/doc/html/manual/bk01pt03ch17s03.html @@ -19,6 +19,6 @@ mode or with debug mode. The following table provides the names and headers of the debugging containers: -</p><div class="table"><a id="id563932"/><p class="title"><strong>Table 17.1. Debugging Containers</strong></p><div class="table-contents"><table summary="Debugging Containers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Container</th><th style="text-align: left">Header</th><th style="text-align: left">Debug container</th><th style="text-align: left">Debug header</th></tr></thead><tbody><tr><td style="text-align: left"><code class="classname">std::bitset</code></td><td style="text-align: left"><code class="filename">bitset</code></td><td style="text-align: left"><code class="classname">__gnu_debug::bitset</code></td><td style="text-align: left"><code class="filename"><debug/bitset></code></td></tr><tr><td style="text-align: left"><code class="classname">std::deque</code></td><td style="text-align: left"><code class="filename">deque</code></td><td style="text-align: left"><code class="classname">__gnu_debug::deque</code></td><td style="text-align: left"><code class="filename"><debug/deque></code></td></tr><tr><td style="text-align: left"><code class="classname">std::list</code></td><td style="text-align: left"><code class="filename">list</code></td><td style="text-align: left"><code class="classname">__gnu_debug::list</code></td><td style="text-align: left"><code class="filename"><debug/list></code></td></tr><tr><td style="text-align: left"><code class="classname">std::map</code></td><td style="text-align: left"><code class="filename">map</code></td><td style="text-align: left"><code class="classname">__gnu_debug::map</code></td><td style="text-align: left"><code class="filename"><debug/map></code></td></tr><tr><td style="text-align: left"><code class="classname">std::multimap</code></td><td style="text-align: left"><code class="filename">map</code></td><td style="text-align: left"><code class="classname">__gnu_debug::multimap</code></td><td style="text-align: left"><code class="filename"><debug/map></code></td></tr><tr><td style="text-align: left"><code class="classname">std::multiset</code></td><td style="text-align: left"><code class="filename">set</code></td><td style="text-align: left"><code class="classname">__gnu_debug::multiset</code></td><td style="text-align: left"><code class="filename"><debug/set></code></td></tr><tr><td style="text-align: left"><code class="classname">std::set</code></td><td style="text-align: left"><code class="filename">set</code></td><td style="text-align: left"><code class="classname">__gnu_debug::set</code></td><td style="text-align: left"><code class="filename"><debug/set></code></td></tr><tr><td style="text-align: left"><code class="classname">std::string</code></td><td style="text-align: left"><code class="filename">string</code></td><td style="text-align: left"><code class="classname">__gnu_debug::string</code></td><td style="text-align: left"><code class="filename"><debug/string></code></td></tr><tr><td style="text-align: left"><code class="classname">std::wstring</code></td><td style="text-align: left"><code class="filename">string</code></td><td style="text-align: left"><code class="classname">__gnu_debug::wstring</code></td><td style="text-align: left"><code class="filename"><debug/string></code></td></tr><tr><td style="text-align: left"><code class="classname">std::basic_string</code></td><td style="text-align: left"><code class="filename">string</code></td><td style="text-align: left"><code class="classname">__gnu_debug::basic_string</code></td><td style="text-align: left"><code class="filename"><debug/string></code></td></tr><tr><td style="text-align: left"><code class="classname">std::vector</code></td><td style="text-align: left"><code class="filename">vector</code></td><td style="text-align: left"><code class="classname">__gnu_debug::vector</code></td><td style="text-align: left"><code class="filename"><debug/vector></code></td></tr></tbody></table></div></div><br class="table-break"/><p>In addition, when compiling in C++11 mode, these additional +</p><div class="table"><a id="id614962"/><p class="title"><strong>Table 17.1. Debugging Containers</strong></p><div class="table-contents"><table summary="Debugging Containers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Container</th><th style="text-align: left">Header</th><th style="text-align: left">Debug container</th><th style="text-align: left">Debug header</th></tr></thead><tbody><tr><td style="text-align: left"><code class="classname">std::bitset</code></td><td style="text-align: left"><code class="filename">bitset</code></td><td style="text-align: left"><code class="classname">__gnu_debug::bitset</code></td><td style="text-align: left"><code class="filename"><debug/bitset></code></td></tr><tr><td style="text-align: left"><code class="classname">std::deque</code></td><td style="text-align: left"><code class="filename">deque</code></td><td style="text-align: left"><code class="classname">__gnu_debug::deque</code></td><td style="text-align: left"><code class="filename"><debug/deque></code></td></tr><tr><td style="text-align: left"><code class="classname">std::list</code></td><td style="text-align: left"><code class="filename">list</code></td><td style="text-align: left"><code class="classname">__gnu_debug::list</code></td><td style="text-align: left"><code class="filename"><debug/list></code></td></tr><tr><td style="text-align: left"><code class="classname">std::map</code></td><td style="text-align: left"><code class="filename">map</code></td><td style="text-align: left"><code class="classname">__gnu_debug::map</code></td><td style="text-align: left"><code class="filename"><debug/map></code></td></tr><tr><td style="text-align: left"><code class="classname">std::multimap</code></td><td style="text-align: left"><code class="filename">map</code></td><td style="text-align: left"><code class="classname">__gnu_debug::multimap</code></td><td style="text-align: left"><code class="filename"><debug/map></code></td></tr><tr><td style="text-align: left"><code class="classname">std::multiset</code></td><td style="text-align: left"><code class="filename">set</code></td><td style="text-align: left"><code class="classname">__gnu_debug::multiset</code></td><td style="text-align: left"><code class="filename"><debug/set></code></td></tr><tr><td style="text-align: left"><code class="classname">std::set</code></td><td style="text-align: left"><code class="filename">set</code></td><td style="text-align: left"><code class="classname">__gnu_debug::set</code></td><td style="text-align: left"><code class="filename"><debug/set></code></td></tr><tr><td style="text-align: left"><code class="classname">std::string</code></td><td style="text-align: left"><code class="filename">string</code></td><td style="text-align: left"><code class="classname">__gnu_debug::string</code></td><td style="text-align: left"><code class="filename"><debug/string></code></td></tr><tr><td style="text-align: left"><code class="classname">std::wstring</code></td><td style="text-align: left"><code class="filename">string</code></td><td style="text-align: left"><code class="classname">__gnu_debug::wstring</code></td><td style="text-align: left"><code class="filename"><debug/string></code></td></tr><tr><td style="text-align: left"><code class="classname">std::basic_string</code></td><td style="text-align: left"><code class="filename">string</code></td><td style="text-align: left"><code class="classname">__gnu_debug::basic_string</code></td><td style="text-align: left"><code class="filename"><debug/string></code></td></tr><tr><td style="text-align: left"><code class="classname">std::vector</code></td><td style="text-align: left"><code class="filename">vector</code></td><td style="text-align: left"><code class="classname">__gnu_debug::vector</code></td><td style="text-align: left"><code class="filename"><debug/vector></code></td></tr></tbody></table></div></div><br class="table-break"/><p>In addition, when compiling in C++11 mode, these additional containers have additional debug capability. -</p><div class="table"><a id="id564306"/><p class="title"><strong>Table 17.2. Debugging Containers C++11</strong></p><div class="table-contents"><table summary="Debugging Containers C++11" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Container</th><th style="text-align: left">Header</th><th style="text-align: left">Debug container</th><th style="text-align: left">Debug header</th></tr></thead><tbody><tr><td style="text-align: left"><code class="classname">std::unordered_map</code></td><td style="text-align: left"><code class="filename">unordered_map</code></td><td style="text-align: left"><code class="classname">__gnu_debug::unordered_map</code></td><td style="text-align: left"><code class="filename"><debug/unordered_map></code></td></tr><tr><td style="text-align: left"><code class="classname">std::unordered_multimap</code></td><td style="text-align: left"><code class="filename">unordered_map</code></td><td style="text-align: left"><code class="classname">__gnu_debug::unordered_multimap</code></td><td style="text-align: left"><code class="filename"><debug/unordered_map></code></td></tr><tr><td style="text-align: left"><code class="classname">std::unordered_set</code></td><td style="text-align: left"><code class="filename">unordered_set</code></td><td style="text-align: left"><code class="classname">__gnu_debug::unordered_set</code></td><td style="text-align: left"><code class="filename"><debug/unordered_set></code></td></tr><tr><td style="text-align: left"><code class="classname">std::unordered_multiset</code></td><td style="text-align: left"><code class="filename">unordered_set</code></td><td style="text-align: left"><code class="classname">__gnu_debug::unordered_multiset</code></td><td style="text-align: left"><code class="filename"><debug/unordered_set></code></td></tr></tbody></table></div></div><br class="table-break"/></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td align="left"><a accesskey="p" href="bk01pt03ch17s02.html">Prev</a> </td><td align="center"><a accesskey="u" href="debug_mode.html">Up</a></td><td align="right"> <a accesskey="n" href="bk01pt03ch17s04.html">Next</a></td></tr><tr><td align="left" valign="top">Semantics </td><td align="center"><a accesskey="h" href="../index.html">Home</a></td><td align="right" valign="top"> Design</td></tr></table></div></body></html> +</p><div class="table"><a id="id615336"/><p class="title"><strong>Table 17.2. Debugging Containers C++11</strong></p><div class="table-contents"><table summary="Debugging Containers C++11" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Container</th><th style="text-align: left">Header</th><th style="text-align: left">Debug container</th><th style="text-align: left">Debug header</th></tr></thead><tbody><tr><td style="text-align: left"><code class="classname">std::unordered_map</code></td><td style="text-align: left"><code class="filename">unordered_map</code></td><td style="text-align: left"><code class="classname">__gnu_debug::unordered_map</code></td><td style="text-align: left"><code class="filename"><debug/unordered_map></code></td></tr><tr><td style="text-align: left"><code class="classname">std::unordered_multimap</code></td><td style="text-align: left"><code class="filename">unordered_map</code></td><td style="text-align: left"><code class="classname">__gnu_debug::unordered_multimap</code></td><td style="text-align: left"><code class="filename"><debug/unordered_map></code></td></tr><tr><td style="text-align: left"><code class="classname">std::unordered_set</code></td><td style="text-align: left"><code class="filename">unordered_set</code></td><td style="text-align: left"><code class="classname">__gnu_debug::unordered_set</code></td><td style="text-align: left"><code class="filename"><debug/unordered_set></code></td></tr><tr><td style="text-align: left"><code class="classname">std::unordered_multiset</code></td><td style="text-align: left"><code class="filename">unordered_set</code></td><td style="text-align: left"><code class="classname">__gnu_debug::unordered_multiset</code></td><td style="text-align: left"><code class="filename"><debug/unordered_set></code></td></tr></tbody></table></div></div><br class="table-break"/></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td align="left"><a accesskey="p" href="bk01pt03ch17s02.html">Prev</a> </td><td align="center"><a accesskey="u" href="debug_mode.html">Up</a></td><td align="right"> <a accesskey="n" href="bk01pt03ch17s04.html">Next</a></td></tr><tr><td align="left" valign="top">Semantics </td><td align="center"><a accesskey="h" href="../index.html">Home</a></td><td align="right" valign="top"> Design</td></tr></table></div></body></html> diff --git a/libstdc++-v3/doc/html/manual/bk01pt03ch18s03.html b/libstdc++-v3/doc/html/manual/bk01pt03ch18s03.html index 5bd27806aa6..5e2dc3f7830 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt03ch18s03.html +++ b/libstdc++-v3/doc/html/manual/bk01pt03ch18s03.html @@ -63,4 +63,4 @@ Then compile this code with the prerequisite compiler flags flags for atomic operations.) </p><p> The following table provides the names and headers of all the parallel algorithms that can be used in a similar manner: -</p><div class="table"><a id="id565894"/><p class="title"><strong>Table 18.1. Parallel Algorithms</strong></p><div class="table-contents"><table summary="Parallel Algorithms" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Algorithm</th><th style="text-align: left">Header</th><th style="text-align: left">Parallel algorithm</th><th style="text-align: left">Parallel header</th></tr></thead><tbody><tr><td style="text-align: left"><code class="function">std::accumulate</code></td><td style="text-align: left"><code class="filename">numeric</code></td><td style="text-align: left"><code class="function">__gnu_parallel::accumulate</code></td><td style="text-align: left"><code class="filename">parallel/numeric</code></td></tr><tr><td style="text-align: left"><code class="function">std::adjacent_difference</code></td><td style="text-align: left"><code class="filename">numeric</code></td><td style="text-align: left"><code class="function">__gnu_parallel::adjacent_difference</code></td><td style="text-align: left"><code class="filename">parallel/numeric</code></td></tr><tr><td style="text-align: left"><code class="function">std::inner_product</code></td><td style="text-align: left"><code class="filename">numeric</code></td><td style="text-align: left"><code class="function">__gnu_parallel::inner_product</code></td><td style="text-align: left"><code class="filename">parallel/numeric</code></td></tr><tr><td style="text-align: left"><code class="function">std::partial_sum</code></td><td style="text-align: left"><code class="filename">numeric</code></td><td style="text-align: left"><code class="function">__gnu_parallel::partial_sum</code></td><td style="text-align: left"><code class="filename">parallel/numeric</code></td></tr><tr><td style="text-align: left"><code class="function">std::adjacent_find</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::adjacent_find</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::count</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::count</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::count_if</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::count_if</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::equal</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::equal</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::find</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::find</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::find_if</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::find_if</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::find_first_of</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::find_first_of</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::for_each</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::for_each</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::generate</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::generate</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::generate_n</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::generate_n</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::lexicographical_compare</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::lexicographical_compare</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::mismatch</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::mismatch</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::search</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::search</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::search_n</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::search_n</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::transform</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::transform</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::replace</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::replace</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::replace_if</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::replace_if</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::max_element</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::max_element</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::merge</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::merge</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::min_element</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::min_element</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::nth_element</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::nth_element</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::partial_sort</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::partial_sort</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::partition</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::partition</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::random_shuffle</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::random_shuffle</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::set_union</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::set_union</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::set_intersection</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::set_intersection</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::set_symmetric_difference</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::set_symmetric_difference</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::set_difference</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::set_difference</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::sort</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::sort</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::stable_sort</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::stable_sort</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::unique_copy</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::unique_copy</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr></tbody></table></div></div><br class="table-break"/></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td align="left"><a accesskey="p" href="bk01pt03ch18s02.html">Prev</a> </td><td align="center"><a accesskey="u" href="parallel_mode.html">Up</a></td><td align="right"> <a accesskey="n" href="bk01pt03ch18s04.html">Next</a></td></tr><tr><td align="left" valign="top">Semantics </td><td align="center"><a accesskey="h" href="../index.html">Home</a></td><td align="right" valign="top"> Design</td></tr></table></div></body></html> +</p><div class="table"><a id="id616923"/><p class="title"><strong>Table 18.1. Parallel Algorithms</strong></p><div class="table-contents"><table summary="Parallel Algorithms" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Algorithm</th><th style="text-align: left">Header</th><th style="text-align: left">Parallel algorithm</th><th style="text-align: left">Parallel header</th></tr></thead><tbody><tr><td style="text-align: left"><code class="function">std::accumulate</code></td><td style="text-align: left"><code class="filename">numeric</code></td><td style="text-align: left"><code class="function">__gnu_parallel::accumulate</code></td><td style="text-align: left"><code class="filename">parallel/numeric</code></td></tr><tr><td style="text-align: left"><code class="function">std::adjacent_difference</code></td><td style="text-align: left"><code class="filename">numeric</code></td><td style="text-align: left"><code class="function">__gnu_parallel::adjacent_difference</code></td><td style="text-align: left"><code class="filename">parallel/numeric</code></td></tr><tr><td style="text-align: left"><code class="function">std::inner_product</code></td><td style="text-align: left"><code class="filename">numeric</code></td><td style="text-align: left"><code class="function">__gnu_parallel::inner_product</code></td><td style="text-align: left"><code class="filename">parallel/numeric</code></td></tr><tr><td style="text-align: left"><code class="function">std::partial_sum</code></td><td style="text-align: left"><code class="filename">numeric</code></td><td style="text-align: left"><code class="function">__gnu_parallel::partial_sum</code></td><td style="text-align: left"><code class="filename">parallel/numeric</code></td></tr><tr><td style="text-align: left"><code class="function">std::adjacent_find</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::adjacent_find</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::count</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::count</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::count_if</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::count_if</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::equal</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::equal</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::find</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::find</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::find_if</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::find_if</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::find_first_of</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::find_first_of</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::for_each</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::for_each</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::generate</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::generate</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::generate_n</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::generate_n</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::lexicographical_compare</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::lexicographical_compare</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::mismatch</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::mismatch</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::search</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::search</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::search_n</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::search_n</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::transform</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::transform</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::replace</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::replace</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::replace_if</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::replace_if</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::max_element</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::max_element</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::merge</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::merge</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::min_element</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::min_element</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::nth_element</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::nth_element</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::partial_sort</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::partial_sort</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::partition</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::partition</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::random_shuffle</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::random_shuffle</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::set_union</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::set_union</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::set_intersection</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::set_intersection</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::set_symmetric_difference</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::set_symmetric_difference</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::set_difference</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::set_difference</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::sort</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::sort</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::stable_sort</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::stable_sort</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::unique_copy</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::unique_copy</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr></tbody></table></div></div><br class="table-break"/></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td align="left"><a accesskey="p" href="bk01pt03ch18s02.html">Prev</a> </td><td align="center"><a accesskey="u" href="parallel_mode.html">Up</a></td><td align="right"> <a accesskey="n" href="bk01pt03ch18s04.html">Next</a></td></tr><tr><td align="left" valign="top">Semantics </td><td align="center"><a accesskey="h" href="../index.html">Home</a></td><td align="right" valign="top"> Design</td></tr></table></div></body></html> diff --git a/libstdc++-v3/doc/html/manual/bk01pt03ch19s02.html b/libstdc++-v3/doc/html/manual/bk01pt03ch19s02.html index a4d54e0b454..4d214dd9f48 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt03ch19s02.html +++ b/libstdc++-v3/doc/html/manual/bk01pt03ch19s02.html @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><title>Design</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"/><meta name="keywords" content=" C++ , library , profile "/><meta name="keywords" content=" ISO C++ , library "/><meta name="keywords" content=" ISO C++ , runtime , library "/><link rel="home" href="../index.html" title="The GNU C++ Library"/><link rel="up" href="profile_mode.html" title="Chapter 19. Profile Mode"/><link rel="prev" href="profile_mode.html" title="Chapter 19. Profile Mode"/><link rel="next" href="bk01pt03ch19s03.html" title="Extensions for Custom Containers"/></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Design</th></tr><tr><td align="left"><a accesskey="p" href="profile_mode.html">Prev</a> </td><th width="60%" align="center">Chapter 19. Profile Mode</th><td align="right"> <a accesskey="n" href="bk01pt03ch19s03.html">Next</a></td></tr></table><hr/></div><div class="section" title="Design"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.profile_mode.design"/>Design</h2></div></div></div><p> -</p><div class="table"><a id="id568017"/><p class="title"><strong>Table 19.1. Profile Code Location</strong></p><div class="table-contents"><table summary="Profile Code Location" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/></colgroup><thead><tr><th style="text-align: left">Code Location</th><th style="text-align: left">Use</th></tr></thead><tbody><tr><td style="text-align: left"><code class="code">libstdc++-v3/include/std/*</code></td><td style="text-align: left">Preprocessor code to redirect to profile extension headers.</td></tr><tr><td style="text-align: left"><code class="code">libstdc++-v3/include/profile/*</code></td><td style="text-align: left">Profile extension public headers (map, vector, ...).</td></tr><tr><td style="text-align: left"><code class="code">libstdc++-v3/include/profile/impl/*</code></td><td style="text-align: left">Profile extension internals. Implementation files are +</p><div class="table"><a id="id619047"/><p class="title"><strong>Table 19.1. Profile Code Location</strong></p><div class="table-contents"><table summary="Profile Code Location" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/></colgroup><thead><tr><th style="text-align: left">Code Location</th><th style="text-align: left">Use</th></tr></thead><tbody><tr><td style="text-align: left"><code class="code">libstdc++-v3/include/std/*</code></td><td style="text-align: left">Preprocessor code to redirect to profile extension headers.</td></tr><tr><td style="text-align: left"><code class="code">libstdc++-v3/include/profile/*</code></td><td style="text-align: left">Profile extension public headers (map, vector, ...).</td></tr><tr><td style="text-align: left"><code class="code">libstdc++-v3/include/profile/impl/*</code></td><td style="text-align: left">Profile extension internals. Implementation files are only included from <code class="code">impl/profiler.h</code>, which is the only file included from the public headers.</td></tr></tbody></table></div></div><br class="table-break"/><p> </p><div class="section" title="Wrapper Model"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.design.wrapper"/>Wrapper Model</h3></div></div></div><p> diff --git a/libstdc++-v3/doc/html/manual/bk01pt03ch19s07.html b/libstdc++-v3/doc/html/manual/bk01pt03ch19s07.html index f2f6cb6e769..e8c5e6ea799 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt03ch19s07.html +++ b/libstdc++-v3/doc/html/manual/bk01pt03ch19s07.html @@ -18,7 +18,7 @@ A high accuracy means that the diagnostic is unlikely to be wrong. These grades are not perfect. They are just meant to guide users with specific needs or time budgets. - </p><div class="table"><a id="id568899"/><p class="title"><strong>Table 19.2. Profile Diagnostics</strong></p><div class="table-contents"><table summary="Profile Diagnostics" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/><col style="text-align: left" class="c6"/><col style="text-align: left" class="c7"/></colgroup><thead><tr><th style="text-align: left">Group</th><th style="text-align: left">Flag</th><th style="text-align: left">Benefit</th><th style="text-align: left">Cost</th><th style="text-align: left">Freq.</th><th style="text-align: left">Implemented</th><td class="auto-generated"> </td></tr></thead><tbody><tr><td style="text-align: left"><a class="link" href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.containers" title="Containers"> + </p><div class="table"><a id="id619929"/><p class="title"><strong>Table 19.2. Profile Diagnostics</strong></p><div class="table-contents"><table summary="Profile Diagnostics" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/><col style="text-align: left" class="c6"/><col style="text-align: left" class="c7"/></colgroup><thead><tr><th style="text-align: left">Group</th><th style="text-align: left">Flag</th><th style="text-align: left">Benefit</th><th style="text-align: left">Cost</th><th style="text-align: left">Freq.</th><th style="text-align: left">Implemented</th><td class="auto-generated"> </td></tr></thead><tbody><tr><td style="text-align: left"><a class="link" href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.containers" title="Containers"> CONTAINERS</a></td><td style="text-align: left"><a class="link" href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.hashtable_too_small" title="Hashtable Too Small"> HASHTABLE_TOO_SMALL</a></td><td style="text-align: left">10</td><td style="text-align: left">1</td><td style="text-align: left"> </td><td style="text-align: left">10</td><td style="text-align: left">yes</td></tr><tr><td style="text-align: left"> </td><td style="text-align: left"><a class="link" href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.hashtable_too_large" title="Hashtable Too Large"> HASHTABLE_TOO_LARGE</a></td><td style="text-align: left">5</td><td style="text-align: left">1</td><td style="text-align: left"> </td><td style="text-align: left">10</td><td style="text-align: left">yes</td></tr><tr><td style="text-align: left"> </td><td style="text-align: left"><a class="link" href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.inefficient_hash" title="Inefficient Hash"> diff --git a/libstdc++-v3/doc/html/manual/bk01pt03ch21s02.html b/libstdc++-v3/doc/html/manual/bk01pt03ch21s02.html index a60f57b1d1a..b07129edf7f 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt03ch21s02.html +++ b/libstdc++-v3/doc/html/manual/bk01pt03ch21s02.html @@ -76,7 +76,7 @@ else return false.</p></li></ol></div><p> </p><p> Consider a block of size 64 ints. In memory, it would look like this: (assume a 32-bit system where, size_t is a 32-bit entity). - </p><div class="table"><a id="id572329"/><p class="title"><strong>Table 21.1. Bitmap Allocator Memory Map</strong></p><div class="table-contents"><table summary="Bitmap Allocator Memory Map" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left">268</td><td style="text-align: left">0</td><td style="text-align: left">4294967295</td><td style="text-align: left">4294967295</td><td style="text-align: left">Data -> Space for 64 ints</td></tr></tbody></table></div></div><br class="table-break"/><p> + </p><div class="table"><a id="id623359"/><p class="title"><strong>Table 21.1. Bitmap Allocator Memory Map</strong></p><div class="table-contents"><table summary="Bitmap Allocator Memory Map" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left">268</td><td style="text-align: left">0</td><td style="text-align: left">4294967295</td><td style="text-align: left">4294967295</td><td style="text-align: left">Data -> Space for 64 ints</td></tr></tbody></table></div></div><br class="table-break"/><p> The first Column(268) represents the size of the Block in bytes as seen by the Bitmap Allocator. Internally, a global free list is used to keep track of the free blocks used and given back by the diff --git a/libstdc++-v3/doc/html/manual/bk01pt03ch30s02.html b/libstdc++-v3/doc/html/manual/bk01pt03ch30s02.html index 7d38a24dc7a..001502fa0ef 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt03ch30s02.html +++ b/libstdc++-v3/doc/html/manual/bk01pt03ch30s02.html @@ -13,10 +13,14 @@ conditionally, via the <code class="code">-march</code> command line flag. This usage vary depending on the target hardware and the flags used during compile. </p><p> +<em><span class="remark"> +Incomplete/inconsistent. This is only C++11. +</span></em> +</p><p> If builtins are possible for bool-sized integral types, -<code class="code">_GLIBCXX_ATOMIC_BUILTINS_1</code> will be defined. +<code class="code">ATOMIC_BOOL_LOCK_FREE</code> will be defined. If builtins are possible for int-sized integral types, -<code class="code">_GLIBCXX_ATOMIC_BUILTINS_4</code> will be defined. +<code class="code">ATOMIC_INT_LOCK_FREE</code> will be defined. </p><p>For the following hosts, intrinsics are enabled by default. </p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>alpha</p></li><li class="listitem"><p>ia64</p></li><li class="listitem"><p>powerpc</p></li><li class="listitem"><p>s390</p></li></ul></div><p>For others, some form of <code class="code">-march</code> may work. On non-ancient x86 hardware, <code class="code">-march=native</code> usually does the diff --git a/libstdc++-v3/doc/html/manual/bk01pt03pr01.html b/libstdc++-v3/doc/html/manual/bk01pt03pr01.html index 61dd4083a1e..961f3d07aab 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt03pr01.html +++ b/libstdc++-v3/doc/html/manual/bk01pt03pr01.html @@ -3,7 +3,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"><head><title/><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"/><meta name="keywords" content=" ISO C++ , library "/><meta name="keywords" content=" ISO C++ , runtime , library "/><link rel="home" href="../index.html" title="The GNU C++ Library"/><link rel="up" href="extensions.html" title="Part III. Extensions"/><link rel="prev" href="extensions.html" title="Part III. Extensions"/><link rel="next" href="ext_compile_checks.html" title="Chapter 16. Compile Time Checks"/></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"/></tr><tr><td align="left"><a accesskey="p" href="extensions.html">Prev</a> </td><th width="60%" align="center">Part III. Extensions -</th><td align="right"> <a accesskey="n" href="ext_compile_checks.html">Next</a></td></tr></table><hr/></div><div class="preface"><div class="titlepage"><div><div><h1 class="title"><a id="id563399"/></h1></div></div></div><p> +</th><td align="right"> <a accesskey="n" href="ext_compile_checks.html">Next</a></td></tr></table><hr/></div><div class="preface"><div class="titlepage"><div><div><h1 class="title"><a id="id614429"/></h1></div></div></div><p> Here we will make an attempt at describing the non-Standard extensions to the library. Some of these are from older versions of standard library components, namely SGI's STL, and some of these are diff --git a/libstdc++-v3/doc/html/manual/concurrency.html b/libstdc++-v3/doc/html/manual/concurrency.html index 945592cad0a..7f3f7ad024b 100644 --- a/libstdc++-v3/doc/html/manual/concurrency.html +++ b/libstdc++-v3/doc/html/manual/concurrency.html @@ -7,7 +7,7 @@ Standard Contents </th><td align="right"> <a accesskey="n" href="extensions.html">Next</a></td></tr></table><hr/></div><div class="chapter" title="Chapter 15. Concurrency"><div class="titlepage"><div><div><h2 class="title"><a id="std.concurrency"/>Chapter 15. Concurrency - <a id="id563216" class="indexterm"/> + <a id="id614245" class="indexterm"/> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="concurrency.html#std.concurrency.api">API Reference</a></span></dt></dl></div><p> Facilities for concurrent operation, and control thereof. </p><div class="section" title="API Reference"><div class="titlepage"><div><div><h2 class="title"><a id="std.concurrency.api"/>API Reference</h2></div></div></div><p> diff --git a/libstdc++-v3/doc/html/manual/configure.html b/libstdc++-v3/doc/html/manual/configure.html index c2cf8d4c13a..ecc4b845fea 100644 --- a/libstdc++-v3/doc/html/manual/configure.html +++ b/libstdc++-v3/doc/html/manual/configure.html @@ -181,11 +181,14 @@ additional requirements are necessary and present for activation, and if so, will turn symbol versioning on. This option can change the library ABI. - </p></dd><dt><span class="term"><code class="code">--enable-visibility</code></span></dt><dd><p> In 4.2 and later, enables or disables visibility attributes. - If enabled (as by default), and the compiler seems capable of - passing the simple sanity checks thrown at it, adjusts items - in namespace std, namespace std::tr1, and namespace __gnu_cxx - so that -fvisibility options work. + </p></dd><dt><span class="term"><code class="code">--enable-libstdcxx-visibility</code></span></dt><dd><p> In 4.2 and later, enables or disables visibility + attributes. If enabled (as by default), and the compiler seems + capable of passing the simple sanity checks thrown at it, adjusts + items in namespace std, namespace std::tr1, namespace std::tr2, + and namespace __gnu_cxx to have <code class="code">visibility ("default")</code> + so that -fvisibility options can be used without affecting the + normal external-visibility of namespace std entities. + Prior to 4.7 this option was spelled <code class="code">--enable-visibility</code>. </p></dd><dt><span class="term"><code class="code">--enable-libstdcxx-pch</code></span></dt><dd><p>In 3.4 and later, tries to turn on the generation of stdc++.h.gch, a pre-compiled file including all the standard C++ includes. If enabled (as by default), and the compiler diff --git a/libstdc++-v3/doc/html/manual/containers.html b/libstdc++-v3/doc/html/manual/containers.html index 7b7e373464e..7d80e503137 100644 --- a/libstdc++-v3/doc/html/manual/containers.html +++ b/libstdc++-v3/doc/html/manual/containers.html @@ -7,7 +7,7 @@ Standard Contents </th><td align="right"> <a accesskey="n" href="associative.html">Next</a></td></tr></table><hr/></div><div class="chapter" title="Chapter 9. Containers"><div class="titlepage"><div><div><h2 class="title"><a id="std.containers"/>Chapter 9. Containers - <a id="id560262" class="indexterm"/> + <a id="id611291" class="indexterm"/> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="section"><a href="containers.html#containers.sequences.vector">vector</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></div><div class="section" title="Sequences"><div class="titlepage"><div><div><h2 class="title"><a id="std.containers.sequences"/>Sequences</h2></div></div></div><div class="section" title="list"><div class="titlepage"><div><div><h3 class="title"><a id="containers.sequences.list"/>list</h3></div></div></div><div class="section" title="list::size() is O(n)"><div class="titlepage"><div><div><h4 class="title"><a id="sequences.list.size"/>list::size() is O(n)</h4></div></div></div><p> Yes it is, and that's okay. This is a decision that we preserved when we imported SGI's STL implementation. The following is diff --git a/libstdc++-v3/doc/html/manual/diagnostics.html b/libstdc++-v3/doc/html/manual/diagnostics.html index 5652a78c1c7..701fa412277 100644 --- a/libstdc++-v3/doc/html/manual/diagnostics.html +++ b/libstdc++-v3/doc/html/manual/diagnostics.html @@ -7,7 +7,7 @@ Standard Contents </th><td align="right"> <a accesskey="n" href="bk01pt02ch05s02.html">Next</a></td></tr></table><hr/></div><div class="chapter" title="Chapter 5. Diagnostics"><div class="titlepage"><div><div><h2 class="title"><a id="std.diagnostics"/>Chapter 5. Diagnostics - <a id="id541707" class="indexterm"/> + <a id="id592786" class="indexterm"/> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="diagnostics.html#std.diagnostics.exceptions">Exceptions</a></span></dt><dd><dl><dt><span class="section"><a href="diagnostics.html#std.diagnostics.exceptions.api">API Reference</a></span></dt><dt><span class="section"><a href="diagnostics.html#std.diagnostics.exceptions.data">Adding Data to <code class="classname">exception</code></a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt02ch05s02.html">Concept Checking</a></span></dt></dl></div><div class="section" title="Exceptions"><div class="titlepage"><div><div><h2 class="title"><a id="std.diagnostics.exceptions"/>Exceptions</h2></div></div></div><div class="section" title="API Reference"><div class="titlepage"><div><div><h3 class="title"><a id="std.diagnostics.exceptions.api"/>API Reference</h3></div></div></div><p> All exception objects are defined in one of the standard header files: <code class="filename">exception</code>, diff --git a/libstdc++-v3/doc/html/manual/documentation_hacking.html b/libstdc++-v3/doc/html/manual/documentation_hacking.html index dfeface9583..6cfdf885cfc 100644 --- a/libstdc++-v3/doc/html/manual/documentation_hacking.html +++ b/libstdc++-v3/doc/html/manual/documentation_hacking.html @@ -117,7 +117,7 @@ supported, and are always aliased to dummy rules. These unsupported formats are: <span class="emphasis"><em>info</em></span>, <span class="emphasis"><em>ps</em></span>, and <span class="emphasis"><em>dvi</em></span>. - </p></div><div class="section" title="Doxygen"><div class="titlepage"><div><div><h3 class="title"><a id="doc.doxygen"/>Doxygen</h3></div></div></div><div class="section" title="Prerequisites"><div class="titlepage"><div><div><h4 class="title"><a id="doxygen.prereq"/>Prerequisites</h4></div></div></div><div class="table"><a id="id610857"/><p class="title"><strong>Table B.1. Doxygen Prerequisites</strong></p><div class="table-contents"><table summary="Doxygen Prerequisites" border="1"><colgroup><col style="text-align: center" class="c1"/><col style="text-align: center" class="c2"/><col style="text-align: center" class="c3"/></colgroup><thead><tr><th style="text-align: center">Tool</th><th style="text-align: center">Version</th><th style="text-align: center">Required By</th></tr></thead><tbody><tr><td style="text-align: center">coreutils</td><td style="text-align: center">8.5</td><td style="text-align: center">all</td></tr><tr><td style="text-align: center">bash</td><td style="text-align: center">4.1</td><td style="text-align: center">all</td></tr><tr><td style="text-align: center">doxygen</td><td style="text-align: center">1.7.0</td><td style="text-align: center">all</td></tr><tr><td style="text-align: center">graphviz</td><td style="text-align: center">2.26</td><td style="text-align: center">graphical hierarchies</td></tr><tr><td style="text-align: center">pdflatex</td><td style="text-align: center">2007-59</td><td style="text-align: center">pdf output</td></tr></tbody></table></div></div><br class="table-break"/><p> + </p></div><div class="section" title="Doxygen"><div class="titlepage"><div><div><h3 class="title"><a id="doc.doxygen"/>Doxygen</h3></div></div></div><div class="section" title="Prerequisites"><div class="titlepage"><div><div><h4 class="title"><a id="doxygen.prereq"/>Prerequisites</h4></div></div></div><div class="table"><a id="id661894"/><p class="title"><strong>Table B.1. Doxygen Prerequisites</strong></p><div class="table-contents"><table summary="Doxygen Prerequisites" border="1"><colgroup><col style="text-align: center" class="c1"/><col style="text-align: center" class="c2"/><col style="text-align: center" class="c3"/></colgroup><thead><tr><th style="text-align: center">Tool</th><th style="text-align: center">Version</th><th style="text-align: center">Required By</th></tr></thead><tbody><tr><td style="text-align: center">coreutils</td><td style="text-align: center">8.5</td><td style="text-align: center">all</td></tr><tr><td style="text-align: center">bash</td><td style="text-align: center">4.1</td><td style="text-align: center">all</td></tr><tr><td style="text-align: center">doxygen</td><td style="text-align: center">1.7.0</td><td style="text-align: center">all</td></tr><tr><td style="text-align: center">graphviz</td><td style="text-align: center">2.26</td><td style="text-align: center">graphical hierarchies</td></tr><tr><td style="text-align: center">pdflatex</td><td style="text-align: center">2007-59</td><td style="text-align: center">pdf output</td></tr></tbody></table></div></div><br class="table-break"/><p> Prerequisite tools are Bash 2.0 or later, <a class="link" href="http://www.doxygen.org/">Doxygen</a>, and the <a class="link" href="http://www.gnu.org/software/coreutils/">GNU @@ -263,7 +263,7 @@ writing Doxygen comments. Single and double quotes, and separators in filenames are two common trouble spots. When in doubt, consult the following table. - </p><div class="table"><a id="id611360"/><p class="title"><strong>Table B.2. HTML to Doxygen Markup Comparison</strong></p><div class="table-contents"><table summary="HTML to Doxygen Markup Comparison" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/></colgroup><thead><tr><th style="text-align: left">HTML</th><th style="text-align: left">Doxygen</th></tr></thead><tbody><tr><td style="text-align: left">\</td><td style="text-align: left">\\</td></tr><tr><td style="text-align: left">"</td><td style="text-align: left">\"</td></tr><tr><td style="text-align: left">'</td><td style="text-align: left">\'</td></tr><tr><td style="text-align: left"><i></td><td style="text-align: left">@a word</td></tr><tr><td style="text-align: left"><b></td><td style="text-align: left">@b word</td></tr><tr><td style="text-align: left"><code></td><td style="text-align: left">@c word</td></tr><tr><td style="text-align: left"><em></td><td style="text-align: left">@a word</td></tr><tr><td style="text-align: left"><em></td><td style="text-align: left"><em>two words or more</em></td></tr></tbody></table></div></div><br class="table-break"/></div></div><div class="section" title="Docbook"><div class="titlepage"><div><div><h3 class="title"><a id="doc.docbook"/>Docbook</h3></div></div></div><div class="section" title="Prerequisites"><div class="titlepage"><div><div><h4 class="title"><a id="docbook.prereq"/>Prerequisites</h4></div></div></div><div class="table"><a id="id611522"/><p class="title"><strong>Table B.3. Docbook Prerequisites</strong></p><div class="table-contents"><table summary="Docbook Prerequisites" border="1"><colgroup><col style="text-align: center" class="c1"/><col style="text-align: center" class="c2"/><col style="text-align: center" class="c3"/></colgroup><thead><tr><th style="text-align: center">Tool</th><th style="text-align: center">Version</th><th style="text-align: center">Required By</th></tr></thead><tbody><tr><td style="text-align: center">docbook5-style-xsl</td><td style="text-align: center">1.76.1</td><td style="text-align: center">all</td></tr><tr><td style="text-align: center">xsltproc</td><td style="text-align: center">1.1.26</td><td style="text-align: center">all</td></tr><tr><td style="text-align: center">xmllint</td><td style="text-align: center">2.7.7</td><td style="text-align: center">validation</td></tr><tr><td style="text-align: center">dblatex</td><td style="text-align: center">0.3</td><td style="text-align: center">pdf output</td></tr><tr><td style="text-align: center">pdflatex</td><td style="text-align: center">2007-59</td><td style="text-align: center">pdf output</td></tr><tr><td style="text-align: center">docbook2X</td><td style="text-align: center">0.8.8</td><td style="text-align: center">info output</td></tr></tbody></table></div></div><br class="table-break"/><p> + </p><div class="table"><a id="id662396"/><p class="title"><strong>Table B.2. HTML to Doxygen Markup Comparison</strong></p><div class="table-contents"><table summary="HTML to Doxygen Markup Comparison" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/></colgroup><thead><tr><th style="text-align: left">HTML</th><th style="text-align: left">Doxygen</th></tr></thead><tbody><tr><td style="text-align: left">\</td><td style="text-align: left">\\</td></tr><tr><td style="text-align: left">"</td><td style="text-align: left">\"</td></tr><tr><td style="text-align: left">'</td><td style="text-align: left">\'</td></tr><tr><td style="text-align: left"><i></td><td style="text-align: left">@a word</td></tr><tr><td style="text-align: left"><b></td><td style="text-align: left">@b word</td></tr><tr><td style="text-align: left"><code></td><td style="text-align: left">@c word</td></tr><tr><td style="text-align: left"><em></td><td style="text-align: left">@a word</td></tr><tr><td style="text-align: left"><em></td><td style="text-align: left"><em>two words or more</em></td></tr></tbody></table></div></div><br class="table-break"/></div></div><div class="section" title="Docbook"><div class="titlepage"><div><div><h3 class="title"><a id="doc.docbook"/>Docbook</h3></div></div></div><div class="section" title="Prerequisites"><div class="titlepage"><div><div><h4 class="title"><a id="docbook.prereq"/>Prerequisites</h4></div></div></div><div class="table"><a id="id662558"/><p class="title"><strong>Table B.3. Docbook Prerequisites</strong></p><div class="table-contents"><table summary="Docbook Prerequisites" border="1"><colgroup><col style="text-align: center" class="c1"/><col style="text-align: center" class="c2"/><col style="text-align: center" class="c3"/></colgroup><thead><tr><th style="text-align: center">Tool</th><th style="text-align: center">Version</th><th style="text-align: center">Required By</th></tr></thead><tbody><tr><td style="text-align: center">docbook5-style-xsl</td><td style="text-align: center">1.76.1</td><td style="text-align: center">all</td></tr><tr><td style="text-align: center">xsltproc</td><td style="text-align: center">1.1.26</td><td style="text-align: center">all</td></tr><tr><td style="text-align: center">xmllint</td><td style="text-align: center">2.7.7</td><td style="text-align: center">validation</td></tr><tr><td style="text-align: center">dblatex</td><td style="text-align: center">0.3</td><td style="text-align: center">pdf output</td></tr><tr><td style="text-align: center">pdflatex</td><td style="text-align: center">2007-59</td><td style="text-align: center">pdf output</td></tr><tr><td style="text-align: center">docbook2X</td><td style="text-align: center">0.8.8</td><td style="text-align: center">info output</td></tr></tbody></table></div></div><br class="table-break"/><p> Editing the DocBook sources requires an XML editor. Many exist: some notable options include <span class="command"><strong>emacs</strong></span>, <span class="application">Kate</span>, @@ -419,11 +419,11 @@ make <code class="literal">XSL_STYLE_DIR="/usr/share/xml/docbook/stylesheet/nwal <a class="link" href="http://www.docbook.org/tdg/en/html/part2.html">online</a>. An incomplete reference for HTML to Docbook conversion is detailed in the table below. - </p><div class="table"><a id="id612000"/><p class="title"><strong>Table B.4. HTML to Docbook XML Markup Comparison</strong></p><div class="table-contents"><table summary="HTML to Docbook XML Markup Comparison" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/></colgroup><thead><tr><th style="text-align: left">HTML</th><th style="text-align: left">Docbook</th></tr></thead><tbody><tr><td style="text-align: left"><p></td><td style="text-align: left"><para></td></tr><tr><td style="text-align: left"><pre></td><td style="text-align: left"><computeroutput>, <programlisting>, + </p><div class="table"><a id="id663036"/><p class="title"><strong>Table B.4. HTML to Docbook XML Markup Comparison</strong></p><div class="table-contents"><table summary="HTML to Docbook XML Markup Comparison" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/></colgroup><thead><tr><th style="text-align: left">HTML</th><th style="text-align: left">Docbook</th></tr></thead><tbody><tr><td style="text-align: left"><p></td><td style="text-align: left"><para></td></tr><tr><td style="text-align: left"><pre></td><td style="text-align: left"><computeroutput>, <programlisting>, <literallayout></td></tr><tr><td style="text-align: left"><ul></td><td style="text-align: left"><itemizedlist></td></tr><tr><td style="text-align: left"><ol></td><td style="text-align: left"><orderedlist></td></tr><tr><td style="text-align: left"><il></td><td style="text-align: left"><listitem></td></tr><tr><td style="text-align: left"><dl></td><td style="text-align: left"><variablelist></td></tr><tr><td style="text-align: left"><dt></td><td style="text-align: left"><term></td></tr><tr><td style="text-align: left"><dd></td><td style="text-align: left"><listitem></td></tr><tr><td style="text-align: left"><a href=""></td><td style="text-align: left"><ulink url=""></td></tr><tr><td style="text-align: left"><code></td><td style="text-align: left"><literal>, <programlisting></td></tr><tr><td style="text-align: left"><strong></td><td style="text-align: left"><emphasis></td></tr><tr><td style="text-align: left"><em></td><td style="text-align: left"><emphasis></td></tr><tr><td style="text-align: left">"</td><td style="text-align: left"><quote></td></tr></tbody></table></div></div><br class="table-break"/><p> And examples of detailed markup for which there are no real HTML equivalents are listed in the table below. -</p><div class="table"><a id="id612201"/><p class="title"><strong>Table B.5. Docbook XML Element Use</strong></p><div class="table-contents"><table summary="Docbook XML Element Use" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/></colgroup><thead><tr><th style="text-align: left">Element</th><th style="text-align: left">Use</th></tr></thead><tbody><tr><td style="text-align: left"><structname></td><td style="text-align: left"><structname>char_traits</structname></td></tr><tr><td style="text-align: left"><classname></td><td style="text-align: left"><classname>string</classname></td></tr><tr><td style="text-align: left"><function></td><td style="text-align: left"> +</p><div class="table"><a id="id663237"/><p class="title"><strong>Table B.5. Docbook XML Element Use</strong></p><div class="table-contents"><table summary="Docbook XML Element Use" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/></colgroup><thead><tr><th style="text-align: left">Element</th><th style="text-align: left">Use</th></tr></thead><tbody><tr><td style="text-align: left"><structname></td><td style="text-align: left"><structname>char_traits</structname></td></tr><tr><td style="text-align: left"><classname></td><td style="text-align: left"><classname>string</classname></td></tr><tr><td style="text-align: left"><function></td><td style="text-align: left"> <p><function>clear()</function></p> <p><function>fs.clear()</function></p> </td></tr><tr><td style="text-align: left"><type></td><td style="text-align: left"><type>long long</type></td></tr><tr><td style="text-align: left"><varname></td><td style="text-align: left"><varname>fs</varname></td></tr><tr><td style="text-align: left"><literal></td><td style="text-align: left"> diff --git a/libstdc++-v3/doc/html/manual/extensions.html b/libstdc++-v3/doc/html/manual/extensions.html index 0d5474ac211..61e3362efc7 100644 --- a/libstdc++-v3/doc/html/manual/extensions.html +++ b/libstdc++-v3/doc/html/manual/extensions.html @@ -5,7 +5,7 @@ </th></tr><tr><td align="left"><a accesskey="p" href="io_and_c.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library Manual</th><td align="right"> <a accesskey="n" href="bk01pt03pr01.html">Next</a></td></tr></table><hr/></div><div class="part" title="Part III. Extensions"><div class="titlepage"><div><div><h1 class="title"><a id="manual.ext"/>Part III. Extensions - <a id="id563381" class="indexterm"/> + <a id="id614410" class="indexterm"/> </h1></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="preface"><a href="bk01pt03pr01.html"/></span></dt><dt><span class="chapter"><a href="ext_compile_checks.html">16. Compile Time Checks</a></span></dt><dt><span class="chapter"><a href="debug_mode.html">17. Debug Mode</a></span></dt><dd><dl><dt><span class="section"><a href="debug_mode.html#manual.ext.debug_mode.intro">Intro</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s02.html">Semantics</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s03.html">Using</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch17s03.html#debug_mode.using.mode">Using the Debug Mode</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s03.html#debug_mode.using.specific">Using a Specific Debug Container</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch17s04.html">Design</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch17s04.html#debug_mode.design.goals">Goals</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s04.html#debug_mode.design.methods">Methods</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch17s04.html#debug_mode.design.methods.wrappers">The Wrapper Model</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch17s04.html#debug_mode.design.methods.safe_iter">Safe Iterators</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s04.html#debug_mode.design.methods.safe_seq">Safe Sequences (Containers)</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch17s04.html#debug_mode.design.methods.precond">Precondition Checking</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s04.html#debug_mode.design.methods.coexistence">Release- and debug-mode coexistence</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch17s04.html#methods.coexistence.compile">Compile-time coexistence of release- and debug-mode components</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s04.html#methods.coexistence.link">Link- and run-time coexistence of release- and debug-mode components</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s04.html#methods.coexistence.alt">Alternatives for Coexistence</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="bk01pt03ch17s04.html#debug_mode.design.other">Other Implementations</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="parallel_mode.html">18. Parallel Mode</a></span></dt><dd><dl><dt><span class="section"><a href="parallel_mode.html#manual.ext.parallel_mode.intro">Intro</a></span></dt><dt><span class="section"><a href="bk01pt03ch18s02.html">Semantics</a></span></dt><dt><span class="section"><a href="bk01pt03ch18s03.html">Using</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch18s03.html#parallel_mode.using.prereq_flags">Prerequisite Compiler Flags</a></span></dt><dt><span class="section"><a href="bk01pt03ch18s03.html#parallel_mode.using.parallel_mode">Using Parallel Mode</a></span></dt><dt><span class="section"><a href="bk01pt03ch18s03.html#parallel_mode.using.specific">Using Specific Parallel Components</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch18s04.html">Design</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch18s04.html#parallel_mode.design.intro">Interface Basics</a></span></dt><dt><span class="section"><a href="bk01pt03ch18s04.html#parallel_mode.design.tuning">Configuration and Tuning</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch18s04.html#parallel_mode.design.tuning.omp">Setting up the OpenMP Environment</a></span></dt><dt><span class="section"><a href="bk01pt03ch18s04.html#parallel_mode.design.tuning.compile">Compile Time Switches</a></span></dt><dt><span class="section"><a href="bk01pt03ch18s04.html#parallel_mode.design.tuning.settings">Run Time Settings and Defaults</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch18s04.html#parallel_mode.design.impl">Implementation Namespaces</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch18s05.html">Testing</a></span></dt><dt><span class="bibliography"><a href="parallel_mode.html#parallel_mode.biblio">Bibliography</a></span></dt></dl></dd><dt><span class="chapter"><a href="profile_mode.html">19. Profile Mode</a></span></dt><dd><dl><dt><span class="section"><a href="profile_mode.html#manual.ext.profile_mode.intro">Intro</a></span></dt><dd><dl><dt><span class="section"><a href="profile_mode.html#manual.ext.profile_mode.using">Using the Profile Mode</a></span></dt><dt><span class="section"><a href="profile_mode.html#manual.ext.profile_mode.tuning">Tuning the Profile Mode</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch19s02.html">Design</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch19s02.html#manual.ext.profile_mode.design.wrapper">Wrapper Model</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s02.html#manual.ext.profile_mode.design.instrumentation">Instrumentation</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s02.html#manual.ext.profile_mode.design.rtlib">Run Time Behavior</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s02.html#manual.ext.profile_mode.design.analysis">Analysis and Diagnostics</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s02.html#manual.ext.profile_mode.design.cost-model">Cost Model</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s02.html#manual.ext.profile_mode.design.reports">Reports</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s02.html#manual.ext.profile_mode.design.testing">Testing</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch19s03.html">Extensions for Custom Containers</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s04.html">Empirical Cost Model</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s05.html">Implementation Issues</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch19s05.html#manual.ext.profile_mode.implementation.stack">Stack Traces</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s05.html#manual.ext.profile_mode.implementation.symbols">Symbolization of Instruction Addresses</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s05.html#manual.ext.profile_mode.implementation.concurrency">Concurrency</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s05.html#manual.ext.profile_mode.implementation.stdlib-in-proflib">Using the Standard Library in the Instrumentation Implementation</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s05.html#manual.ext.profile_mode.implementation.malloc-hooks">Malloc Hooks</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s05.html#manual.ext.profile_mode.implementation.construction-destruction">Construction and Destruction of Global Objects</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch19s06.html">Developer Information</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch19s06.html#manual.ext.profile_mode.developer.bigpic">Big Picture</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s06.html#manual.ext.profile_mode.developer.howto">How To Add A Diagnostic</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch19s07.html">Diagnostics</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.template">Diagnostic Template</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.containers">Containers</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.hashtable_too_small">Hashtable Too Small</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.hashtable_too_large">Hashtable Too Large</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.inefficient_hash">Inefficient Hash</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.vector_too_small">Vector Too Small</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.vector_too_large">Vector Too Large</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.vector_to_hashtable">Vector to Hashtable</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.hashtable_to_vector">Hashtable to Vector</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.vector_to_list">Vector to List</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.list_to_vector">List to Vector</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.list_to_slist">List to Forward List (Slist)</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.assoc_ord_to_unord">Ordered to Unordered Associative Container</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.algorithms">Algorithms</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.algorithms.sort">Sort Algorithm Performance</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.locality">Data Locality</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.locality.sw_prefetch">Need Software Prefetch</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.locality.linked">Linked Structure Locality</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.mthread">Multithreaded Data Access</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.mthread.ddtest">Data Dependence Violations at Container Level</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.mthread.false_share">False Sharing</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.statistics">Statistics</a></span></dt></dl></dd><dt><span class="bibliography"><a href="profile_mode.html#profile_mode.biblio">Bibliography</a></span></dt></dl></dd><dt><span class="chapter"><a href="mt_allocator.html">20. The mt_allocator</a></span></dt><dd><dl><dt><span class="section"><a href="mt_allocator.html#allocator.mt.intro">Intro</a></span></dt><dt><span class="section"><a href="bk01pt03ch20s02.html">Design Issues</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch20s02.html#allocator.mt.overview">Overview</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch20s03.html">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch20s03.html#allocator.mt.tune">Tunable Parameters</a></span></dt><dt><span class="section"><a href="bk01pt03ch20s03.html#allocator.mt.init">Initialization</a></span></dt><dt><span class="section"><a href="bk01pt03ch20s03.html#allocator.mt.deallocation">Deallocation Notes</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch20s04.html">Single Thread Example</a></span></dt><dt><span class="section"><a href="bk01pt03ch20s05.html">Multiple Thread Example</a></span></dt></dl></dd><dt><span class="chapter"><a href="bitmap_allocator.html">21. The bitmap_allocator</a></span></dt><dd><dl><dt><span class="section"><a href="bitmap_allocator.html#allocator.bitmap.design">Design</a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.free_list_store">Free List Store</a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.super_block">Super Block</a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.super_block_data">Super Block Data Layout</a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.max_wasted">Maximum Wasted Percentage</a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.allocate"><code class="function">allocate</code></a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.deallocate"><code class="function">deallocate</code></a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.questions">Questions</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.question.1">1</a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.question.2">2</a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.question.3">3</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.locality">Locality</a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.grow_policy">Overhead and Grow Policy</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="policy_data_structures.html">22. Policy-Based Data Structures</a></span></dt><dd><dl><dt><span class="section"><a href="policy_data_structures.html#pbds.intro">Intro</a></span></dt><dd><dl><dt><span class="section"><a href="policy_data_structures.html#pbds.intro.issues">Performance Issues</a></span></dt><dd><dl><dt><span class="section"><a href="policy_data_structures.html#pbds.intro.issues.associative">Associative</a></span></dt><dt><span class="section"><a href="policy_data_structures.html#pbds.intro.issues.priority_queue">Priority Que</a></span></dt></dl></dd><dt><span class="section"><a href="policy_data_structures.html#pbds.intro.motivation">Goals</a></span></dt><dd><dl><dt><span class="section"><a href="policy_data_structures.html#pbds.intro.motivation.associative">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="policy_data_structures.html#motivation.associative.policy">Policy Choices</a></span></dt><dt><span class="section"><a href="policy_data_structures.html#motivation.associative.underlying">Underlying Data Structures</a></span></dt><dt><span class="section"><a href="policy_data_structures.html#motivation.associative.iterators">Iterators</a></span></dt><dt><span class="section"><a href="policy_data_structures.html#motivation.associative.functions">Functional</a></span></dt></dl></dd><dt><span class="section"><a href="policy_data_structures.html#pbds.intro.motivation.priority_queue">Priority Queues</a></span></dt><dd><dl><dt><span class="section"><a href="policy_data_structures.html#motivation.priority_queue.policy">Policy Choices</a></span></dt><dt><span class="section"><a href="policy_data_structures.html#motivation.priority_queue.underlying">Underlying Data Structures</a></span></dt><dt><span class="section"><a href="policy_data_structures.html#motivation.priority_queue.binary_heap">Binary Heaps</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="section"><a href="policy_data_structures_using.html">Using</a></span></dt><dd><dl><dt><span class="section"><a href="policy_data_structures_using.html#pbds.using.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="policy_data_structures_using.html#pbds.using.organization">Organization</a></span></dt><dt><span class="section"><a href="policy_data_structures_using.html#pbds.using.tutorial">Tutorial</a></span></dt><dd><dl><dt><span class="section"><a href="policy_data_structures_using.html#pbds.using.tutorial.basic">Basic Use</a></span></dt><dt><span class="section"><a href="policy_data_structures_using.html#pbds.using.tutorial.configuring"> Configuring via Template Parameters diff --git a/libstdc++-v3/doc/html/manual/facets.html b/libstdc++-v3/doc/html/manual/facets.html index 1da98823ffd..e090b74c77f 100644 --- a/libstdc++-v3/doc/html/manual/facets.html +++ b/libstdc++-v3/doc/html/manual/facets.html @@ -3,7 +3,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"><head><title>Facets</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"/><meta name="keywords" content=" ISO C++ , library "/><meta name="keywords" content=" ISO C++ , runtime , library "/><link rel="home" href="../index.html" title="The GNU C++ Library"/><link rel="up" href="localization.html" title="Chapter 8. Localization"/><link rel="prev" href="localization.html" title="Chapter 8. Localization"/><link rel="next" href="containers.html" title="Chapter 9. Containers"/></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Facets</th></tr><tr><td align="left"><a accesskey="p" href="localization.html">Prev</a> </td><th width="60%" align="center">Chapter 8. Localization -</th><td align="right"> <a accesskey="n" href="containers.html">Next</a></td></tr></table><hr/></div><div class="section" title="Facets"><div class="titlepage"><div><div><h2 class="title"><a id="std.localization.facet"/>Facets</h2></div></div></div><div class="section" title="ctype"><div class="titlepage"><div><div><h3 class="title"><a id="std.localization.facet.ctype"/>ctype</h3></div></div></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h4 class="title"><a id="facet.ctype.impl"/>Implementation</h4></div></div></div><div class="section" title="Specializations"><div class="titlepage"><div><div><h5 class="title"><a id="id558091"/>Specializations</h5></div></div></div><p> +</th><td align="right"> <a accesskey="n" href="containers.html">Next</a></td></tr></table><hr/></div><div class="section" title="Facets"><div class="titlepage"><div><div><h2 class="title"><a id="std.localization.facet"/>Facets</h2></div></div></div><div class="section" title="ctype"><div class="titlepage"><div><div><h3 class="title"><a id="std.localization.facet.ctype"/>ctype</h3></div></div></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h4 class="title"><a id="facet.ctype.impl"/>Implementation</h4></div></div></div><div class="section" title="Specializations"><div class="titlepage"><div><div><h5 class="title"><a id="id609115"/>Specializations</h5></div></div></div><p> For the required specialization codecvt<wchar_t, char, mbstate_t> , conversions are made between the internal character set (always UCS4 on GNU/Linux) and whatever the currently selected locale for the @@ -50,24 +50,24 @@ characters. </p></li><li class="listitem"><p> Rename abstract base class. See if just smash-overriding is a better approach. Clarify, add sanity to naming. - </p></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="facet.ctype.biblio"/>Bibliography</h4></div></div></div><div class="biblioentry"><a id="id558216"/><p><span class="citetitle"><em class="citetitle"> + </p></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="facet.ctype.biblio"/>Bibliography</h4></div></div></div><div class="biblioentry"><a id="id609240"/><p><span class="citetitle"><em class="citetitle"> The GNU C Library - </em>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id558255"/><p><span class="citetitle"><em class="citetitle"> + </em>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id609280"/><p><span class="citetitle"><em class="citetitle"> Correspondence - </em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id558281"/><p><span class="citetitle"><em class="citetitle"> + </em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id609306"/><p><span class="citetitle"><em class="citetitle"> ISO/IEC 14882:1998 Programming languages - C++ - </em>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id558300"/><p><span class="citetitle"><em class="citetitle"> + </em>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id609325"/><p><span class="citetitle"><em class="citetitle"> ISO/IEC 9899:1999 Programming languages - C - </em>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry" title="The Open Group Base Specifications, Issue 6 (IEEE Std. 1003.1-2004)"><a id="id558319"/><p><span class="title"><em> + </em>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry" title="The Open Group Base Specifications, Issue 6 (IEEE Std. 1003.1-2004)"><a id="id609344"/><p><span class="title"><em> <a class="link" href="http://www.unix.org/version3/ieee_std.html"> The Open Group Base Specifications, Issue 6 (IEEE Std. 1003.1-2004) </a> </em>. </span><span class="copyright">Copyright © 1999 - The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. </span></p></div><div class="biblioentry"><a id="id558346"/><p><span class="citetitle"><em class="citetitle"> + The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. </span></p></div><div class="biblioentry"><a id="id609371"/><p><span class="citetitle"><em class="citetitle"> The C++ Programming Language, Special Edition </em>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername"> Addison Wesley - . </span></span></p></div><div class="biblioentry"><a id="id558385"/><p><span class="citetitle"><em class="citetitle"> + . </span></span></p></div><div class="biblioentry"><a id="id609409"/><p><span class="citetitle"><em class="citetitle"> Standard C++ IOStreams and Locales </em>. </span><span class="subtitle"> Advanced Programmer's Guide and Reference @@ -410,42 +410,42 @@ codecvt usage. </p></li><li class="listitem"><p> wchar_t/char internal buffers and conversions between internal/external buffers? - </p></li></ul></div></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="facet.codecvt.biblio"/>Bibliography</h4></div></div></div><div class="biblioentry"><a id="id559035"/><p><span class="citetitle"><em class="citetitle"> + </p></li></ul></div></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="facet.codecvt.biblio"/>Bibliography</h4></div></div></div><div class="biblioentry"><a id="id610059"/><p><span class="citetitle"><em class="citetitle"> The GNU C Library </em>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums"> Chapters 6 Character Set Handling and 7 Locales and Internationalization - . </span></p></div><div class="biblioentry"><a id="id559074"/><p><span class="citetitle"><em class="citetitle"> + . </span></p></div><div class="biblioentry"><a id="id610099"/><p><span class="citetitle"><em class="citetitle"> Correspondence - </em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id559100"/><p><span class="citetitle"><em class="citetitle"> + </em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id610125"/><p><span class="citetitle"><em class="citetitle"> ISO/IEC 14882:1998 Programming languages - C++ - </em>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id559119"/><p><span class="citetitle"><em class="citetitle"> + </em>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id610144"/><p><span class="citetitle"><em class="citetitle"> ISO/IEC 9899:1999 Programming languages - C - </em>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry" title="System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008)"><a id="id559138"/><p><span class="title"><em> + </em>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry" title="System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008)"><a id="id610163"/><p><span class="title"><em> <a class="link" href="http://www.opengroup.org/austin"> System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008) </a> </em>. </span><span class="copyright">Copyright © 2008 The Open Group/The Institute of Electrical and Electronics Engineers, Inc. - . </span></p></div><div class="biblioentry"><a id="id559165"/><p><span class="citetitle"><em class="citetitle"> + . </span></p></div><div class="biblioentry"><a id="id610190"/><p><span class="citetitle"><em class="citetitle"> The C++ Programming Language, Special Edition </em>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername"> Addison Wesley - . </span></span></p></div><div class="biblioentry"><a id="id559204"/><p><span class="citetitle"><em class="citetitle"> + . </span></span></p></div><div class="biblioentry"><a id="id610228"/><p><span class="citetitle"><em class="citetitle"> Standard C++ IOStreams and Locales </em>. </span><span class="subtitle"> Advanced Programmer's Guide and Reference . </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley Longman, Inc.. </span><span class="publisher"><span class="publishername"> Addison Wesley Longman - . </span></span></p></div><div class="biblioentry" title="A brief description of Normative Addendum 1"><a id="id559251"/><p><span class="title"><em> + . </span></span></p></div><div class="biblioentry" title="A brief description of Normative Addendum 1"><a id="id610275"/><p><span class="title"><em> <a class="link" href="http://www.lysator.liu.se/c/na1.html"> A brief description of Normative Addendum 1 </a> - </em>. </span><span class="author"><span class="firstname">Clive</span> <span class="surname">Feather</span>. </span><span class="pagenums">Extended Character Sets. </span></p></div><div class="biblioentry" title="The Unicode HOWTO"><a id="id559278"/><p><span class="title"><em> + </em>. </span><span class="author"><span class="firstname">Clive</span> <span class="surname">Feather</span>. </span><span class="pagenums">Extended Character Sets. </span></p></div><div class="biblioentry" title="The Unicode HOWTO"><a id="id610302"/><p><span class="title"><em> <a class="link" href="http://tldp.org/HOWTO/Unicode-HOWTO.html"> The Unicode HOWTO </a> - </em>. </span><span class="author"><span class="firstname">Bruno</span> <span class="surname">Haible</span>. </span></p></div><div class="biblioentry" title="UTF-8 and Unicode FAQ for Unix/Linux"><a id="id559301"/><p><span class="title"><em> + </em>. </span><span class="author"><span class="firstname">Bruno</span> <span class="surname">Haible</span>. </span></p></div><div class="biblioentry" title="UTF-8 and Unicode FAQ for Unix/Linux"><a id="id610326"/><p><span class="title"><em> <a class="link" href="http://www.cl.cam.ac.uk/~mgk25/unicode.html"> UTF-8 and Unicode FAQ for Unix/Linux </a> @@ -507,8 +507,9 @@ A couple of notes on the standard. </p><p> First, why is <code class="code">messages_base::catalog</code> specified as a typedef to int? This makes sense for implementations that use -<code class="code">catopen</code>, but not for others. Fortunately, it's not heavily -used and so only a minor irritant. +<code class="code">catopen</code> and define <code class="code">nl_catd</code> as int, but not for +others. Fortunately, it's not heavily used and so only a minor irritant. +This has been reported as a possible defect in the standard (LWG 2028). </p><p> Second, by making the member functions <code class="code">const</code>, it is impossible to save state in them. Thus, storing away information used @@ -690,39 +691,39 @@ void test01() model. As of this writing, it is unknown how to query to see if a specified message catalog exists using the gettext package. - </p></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="facet.messages.biblio"/>Bibliography</h4></div></div></div><div class="biblioentry"><a id="id559972"/><p><span class="citetitle"><em class="citetitle"> + </p></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="facet.messages.biblio"/>Bibliography</h4></div></div></div><div class="biblioentry"><a id="id611002"/><p><span class="citetitle"><em class="citetitle"> The GNU C Library </em>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling, and 7 Locales and Internationalization - . </span></p></div><div class="biblioentry"><a id="id560012"/><p><span class="citetitle"><em class="citetitle"> + . </span></p></div><div class="biblioentry"><a id="id611041"/><p><span class="citetitle"><em class="citetitle"> Correspondence - </em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id560038"/><p><span class="citetitle"><em class="citetitle"> + </em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id611067"/><p><span class="citetitle"><em class="citetitle"> ISO/IEC 14882:1998 Programming languages - C++ - </em>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id560057"/><p><span class="citetitle"><em class="citetitle"> + </em>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id611086"/><p><span class="citetitle"><em class="citetitle"> ISO/IEC 9899:1999 Programming languages - C - </em>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry" title="System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008)"><a id="id560076"/><p><span class="title"><em> + </em>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry" title="System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008)"><a id="id611105"/><p><span class="title"><em> <a class="link" href="http://www.opengroup.org/austin"> System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008) </a> </em>. </span><span class="copyright">Copyright © 2008 The Open Group/The Institute of Electrical and Electronics Engineers, Inc. - . </span></p></div><div class="biblioentry"><a id="id560103"/><p><span class="citetitle"><em class="citetitle"> + . </span></p></div><div class="biblioentry"><a id="id611132"/><p><span class="citetitle"><em class="citetitle"> The C++ Programming Language, Special Edition </em>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername"> Addison Wesley - . </span></span></p></div><div class="biblioentry"><a id="id560141"/><p><span class="citetitle"><em class="citetitle"> + . </span></span></p></div><div class="biblioentry"><a id="id611171"/><p><span class="citetitle"><em class="citetitle"> Standard C++ IOStreams and Locales </em>. </span><span class="subtitle"> Advanced Programmer's Guide and Reference . </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley Longman, Inc.. </span><span class="publisher"><span class="publishername"> Addison Wesley Longman - . </span></span></p></div><div class="biblioentry" title="API Specifications, Java Platform"><a id="id560188"/><p><span class="title"><em> + . </span></span></p></div><div class="biblioentry" title="API Specifications, Java Platform"><a id="id611218"/><p><span class="title"><em> <a class="link" href="http://java.sun.com/reference/api/index.html"> API Specifications, Java Platform </a> </em>. </span><span class="pagenums">java.util.Properties, java.text.MessageFormat, java.util.Locale, java.util.ResourceBundle - . </span></p></div><div class="biblioentry" title="GNU gettext tools, version 0.10.38, Native Language Support Library and Tools."><a id="id560208"/><p><span class="title"><em> + . </span></p></div><div class="biblioentry" title="GNU gettext tools, version 0.10.38, Native Language Support Library and Tools."><a id="id611237"/><p><span class="title"><em> <a class="link" href="http://www.gnu.org/software/gettext"> GNU gettext tools, version 0.10.38, Native Language Support Library and Tools. diff --git a/libstdc++-v3/doc/html/manual/index.html b/libstdc++-v3/doc/html/manual/index.html index 2a815bacc6e..a118aacae0c 100644 --- a/libstdc++-v3/doc/html/manual/index.html +++ b/libstdc++-v3/doc/html/manual/index.html @@ -5,7 +5,7 @@ </p></div></div><hr/></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="part"><a href="intro.html">I. Introduction -</a></span></dt><dd><dl><dt><span class="chapter"><a href="status.html">1. Status</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#manual.intro.status.iso">Implementation Status</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#status.iso.1998">C++ 1998/2003</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#iso.1998.status">Implementation Status</a></span></dt><dt><span class="section"><a href="status.html#iso.1998.specific">Implementation Specific Behavior</a></span></dt></dl></dd><dt><span class="section"><a href="status.html#status.iso.2011">C++ 2011</a></span></dt><dt><span class="section"><a href="status.html#status.iso.tr1">C++ TR1</a></span></dt><dt><span class="section"><a href="status.html#status.iso.tr24733">C++ TR 24733</a></span></dt></dl></dd><dt><span class="section"><a href="license.html">License</a></span></dt><dd><dl><dt><span class="section"><a href="license.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="section"><a href="license.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="section"><a href="bugs.html">Bugs</a></span></dt><dd><dl><dt><span class="section"><a href="bugs.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="section"><a href="bugs.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="setup.html">2. Setup</a></span></dt><dd><dl><dt><span class="section"><a href="setup.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="configure.html">Configure</a></span></dt><dt><span class="section"><a href="make.html">Make</a></span></dt></dl></dd><dt><span class="chapter"><a href="using.html">3. Using</a></span></dt><dd><dl><dt><span class="section"><a href="using.html#manual.intro.using.flags">Command Options</a></span></dt><dt><span class="section"><a href="using_headers.html">Headers</a></span></dt><dd><dl><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.cheaders">The C Headers and <code class="code">namespace std</code></a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="section"><a href="using_macros.html">Macros</a></span></dt><dt><span class="section"><a href="using_namespaces.html">Namespaces</a></span></dt><dd><dl><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="section"><a href="using_dynamic_or_shared.html">Linking</a></span></dt><dd><dl><dt><span class="section"><a href="using_dynamic_or_shared.html#manual.intro.using.linkage.freestanding">Almost Nothing</a></span></dt><dt><span class="section"><a href="using_dynamic_or_shared.html#manual.intro.using.linkage.dynamic">Finding Dynamic or Shared Libraries</a></span></dt></dl></dd><dt><span class="section"><a href="using_concurrency.html">Concurrency</a></span></dt><dd><dl><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.io">IO</a></span></dt><dd><dl><dt><span class="section"><a href="using_concurrency.html#concurrency.io.structure">Structure</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.defaults">Defaults</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.future">Future</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.alt">Alternatives</a></span></dt></dl></dd><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="section"><a href="using_exceptions.html">Exceptions</a></span></dt><dd><dl><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.propagating">Exception Neutrality</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.no">Doing without</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.compat">Compatibility</a></span></dt><dd><dl><dt><span class="section"><a href="using_exceptions.html#using.exception.compat.c">With <code class="literal">C</code></a></span></dt><dt><span class="section"><a href="using_exceptions.html#using.exception.compat.posix">With <code class="literal">POSIX</code> thread cancellation</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="section"><a href="debug.html#debug.compiler">Using <span class="command"><strong>g++</strong></span></a></span></dt><dt><span class="section"><a href="debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="section"><a href="debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="section"><a href="debug.html#debug.races">Data Race Hunting</a></span></dt><dt><span class="section"><a href="debug.html#debug.gdb">Using <span class="command"><strong>gdb</strong></span></a></span></dt><dt><span class="section"><a href="debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="section"><a href="debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="section"><a href="debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt><dt><span class="section"><a href="debug.html#debug.profile_mode">Profile-based Performance Analysis</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="bk01pt02.html">II. +</a></span></dt><dd><dl><dt><span class="chapter"><a href="status.html">1. Status</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#manual.intro.status.iso">Implementation Status</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#status.iso.1998">C++ 1998/2003</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#iso.1998.status">Implementation Status</a></span></dt><dt><span class="section"><a href="status.html#iso.1998.specific">Implementation Specific Behavior</a></span></dt></dl></dd><dt><span class="section"><a href="status.html#status.iso.2011">C++ 2011</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#iso.2011.specific">Implementation Specific Behavior</a></span></dt></dl></dd><dt><span class="section"><a href="status.html#status.iso.tr1">C++ TR1</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#iso.tr1.specific">Implementation Specific Behavior</a></span></dt></dl></dd><dt><span class="section"><a href="status.html#status.iso.tr24733">C++ TR 24733</a></span></dt></dl></dd><dt><span class="section"><a href="license.html">License</a></span></dt><dd><dl><dt><span class="section"><a href="license.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="section"><a href="license.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="section"><a href="bugs.html">Bugs</a></span></dt><dd><dl><dt><span class="section"><a href="bugs.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="section"><a href="bugs.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="setup.html">2. Setup</a></span></dt><dd><dl><dt><span class="section"><a href="setup.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="configure.html">Configure</a></span></dt><dt><span class="section"><a href="make.html">Make</a></span></dt></dl></dd><dt><span class="chapter"><a href="using.html">3. Using</a></span></dt><dd><dl><dt><span class="section"><a href="using.html#manual.intro.using.flags">Command Options</a></span></dt><dt><span class="section"><a href="using_headers.html">Headers</a></span></dt><dd><dl><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.cheaders">The C Headers and <code class="code">namespace std</code></a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="section"><a href="using_macros.html">Macros</a></span></dt><dt><span class="section"><a href="using_namespaces.html">Namespaces</a></span></dt><dd><dl><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="section"><a href="using_dynamic_or_shared.html">Linking</a></span></dt><dd><dl><dt><span class="section"><a href="using_dynamic_or_shared.html#manual.intro.using.linkage.freestanding">Almost Nothing</a></span></dt><dt><span class="section"><a href="using_dynamic_or_shared.html#manual.intro.using.linkage.dynamic">Finding Dynamic or Shared Libraries</a></span></dt></dl></dd><dt><span class="section"><a href="using_concurrency.html">Concurrency</a></span></dt><dd><dl><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.io">IO</a></span></dt><dd><dl><dt><span class="section"><a href="using_concurrency.html#concurrency.io.structure">Structure</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.defaults">Defaults</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.future">Future</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.alt">Alternatives</a></span></dt></dl></dd><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="section"><a href="using_exceptions.html">Exceptions</a></span></dt><dd><dl><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.propagating">Exception Neutrality</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.no">Doing without</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.compat">Compatibility</a></span></dt><dd><dl><dt><span class="section"><a href="using_exceptions.html#using.exception.compat.c">With <code class="literal">C</code></a></span></dt><dt><span class="section"><a href="using_exceptions.html#using.exception.compat.posix">With <code class="literal">POSIX</code> thread cancellation</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="section"><a href="debug.html#debug.compiler">Using <span class="command"><strong>g++</strong></span></a></span></dt><dt><span class="section"><a href="debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="section"><a href="debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="section"><a href="debug.html#debug.races">Data Race Hunting</a></span></dt><dt><span class="section"><a href="debug.html#debug.gdb">Using <span class="command"><strong>gdb</strong></span></a></span></dt><dt><span class="section"><a href="debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="section"><a href="debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="section"><a href="debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt><dt><span class="section"><a href="debug.html#debug.profile_mode">Profile-based Performance Analysis</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="bk01pt02.html">II. Standard Contents </a></span></dt><dd><dl><dt><span class="chapter"><a href="support.html">4. Support @@ -16,13 +16,13 @@ </a></span></dt><dd><dl><dt><span class="section"><a href="diagnostics.html#std.diagnostics.exceptions">Exceptions</a></span></dt><dd><dl><dt><span class="section"><a href="diagnostics.html#std.diagnostics.exceptions.api">API Reference</a></span></dt><dt><span class="section"><a href="diagnostics.html#std.diagnostics.exceptions.data">Adding Data to <code class="classname">exception</code></a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt02ch05s02.html">Concept Checking</a></span></dt></dl></dd><dt><span class="chapter"><a href="utilities.html">6. Utilities -</a></span></dt><dd><dl><dt><span class="section"><a href="utilities.html#std.util.functors">Functors</a></span></dt><dt><span class="section"><a href="pairs.html">Pairs</a></span></dt><dt><span class="section"><a href="memory.html">Memory</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#std.util.memory.allocator">Allocators</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#allocator.req">Requirements</a></span></dt><dt><span class="section"><a href="memory.html#allocator.design_issues">Design Issues</a></span></dt><dt><span class="section"><a href="memory.html#allocator.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#id542426">Interface Design</a></span></dt><dt><span class="section"><a href="memory.html#id542456">Selecting Default Allocation Policy</a></span></dt><dt><span class="section"><a href="memory.html#id542566">Disabling Memory Caching</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#allocator.using">Using a Specific Allocator</a></span></dt><dt><span class="section"><a href="memory.html#allocator.custom">Custom Allocators</a></span></dt><dt><span class="section"><a href="memory.html#allocator.ext">Extension Allocators</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#std.util.memory.auto_ptr">auto_ptr</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#auto_ptr.limitations">Limitations</a></span></dt><dt><span class="section"><a href="memory.html#auto_ptr.using">Use in Containers</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#std.util.memory.shared_ptr">shared_ptr</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#shared_ptr.req">Requirements</a></span></dt><dt><span class="section"><a href="memory.html#shared_ptr.design_issues">Design Issues</a></span></dt><dt><span class="section"><a href="memory.html#shared_ptr.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#id543565">Class Hierarchy</a></span></dt><dt><span class="section"><a href="memory.html#id543744">Thread Safety</a></span></dt><dt><span class="section"><a href="memory.html#id543814">Selecting Lock Policy</a></span></dt><dt><span class="section"><a href="memory.html#id543936">Dual C++11 and TR1 Implementation</a></span></dt><dt><span class="section"><a href="memory.html#id543992">Related functions and classes</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#shared_ptr.using">Use</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#id556361">Examples</a></span></dt><dt><span class="section"><a href="memory.html#id556391">Unresolved Issues</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#shared_ptr.ack">Acknowledgments</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="traits.html">Traits</a></span></dt></dl></dd><dt><span class="chapter"><a href="strings.html">7. +</a></span></dt><dd><dl><dt><span class="section"><a href="utilities.html#std.util.functors">Functors</a></span></dt><dt><span class="section"><a href="pairs.html">Pairs</a></span></dt><dt><span class="section"><a href="memory.html">Memory</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#std.util.memory.allocator">Allocators</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#allocator.req">Requirements</a></span></dt><dt><span class="section"><a href="memory.html#allocator.design_issues">Design Issues</a></span></dt><dt><span class="section"><a href="memory.html#allocator.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#id593505">Interface Design</a></span></dt><dt><span class="section"><a href="memory.html#id593534">Selecting Default Allocation Policy</a></span></dt><dt><span class="section"><a href="memory.html#id593645">Disabling Memory Caching</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#allocator.using">Using a Specific Allocator</a></span></dt><dt><span class="section"><a href="memory.html#allocator.custom">Custom Allocators</a></span></dt><dt><span class="section"><a href="memory.html#allocator.ext">Extension Allocators</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#std.util.memory.auto_ptr">auto_ptr</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#auto_ptr.limitations">Limitations</a></span></dt><dt><span class="section"><a href="memory.html#auto_ptr.using">Use in Containers</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#std.util.memory.shared_ptr">shared_ptr</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#shared_ptr.req">Requirements</a></span></dt><dt><span class="section"><a href="memory.html#shared_ptr.design_issues">Design Issues</a></span></dt><dt><span class="section"><a href="memory.html#shared_ptr.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#id594644">Class Hierarchy</a></span></dt><dt><span class="section"><a href="memory.html#id594832">Thread Safety</a></span></dt><dt><span class="section"><a href="memory.html#id594892">Selecting Lock Policy</a></span></dt><dt><span class="section"><a href="memory.html#id595014">Related functions and classes</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#shared_ptr.using">Use</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#id607385">Examples</a></span></dt><dt><span class="section"><a href="memory.html#id607415">Unresolved Issues</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#shared_ptr.ack">Acknowledgments</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="traits.html">Traits</a></span></dt></dl></dd><dt><span class="chapter"><a href="strings.html">7. Strings </a></span></dt><dd><dl><dt><span class="section"><a href="strings.html#std.strings.string">String Classes</a></span></dt><dd><dl><dt><span class="section"><a href="strings.html#strings.string.simple">Simple Transformations</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.case">Case Sensitivity</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.character_types">Arbitrary Character Types</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.token">Tokenizing</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.shrink">Shrink to Fit</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.Cstring">CString (MFC)</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="localization.html">8. Localization -</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales">Locales</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locales.locale.req">Requirements</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.design">Design</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locale.impl.c">Interacting with "C" locales</a></span></dt></dl></dd><dt><span class="section"><a href="localization.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="facets.html">Facets</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#std.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.ctype.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#id558091">Specializations</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#std.localization.facet.codecvt">codecvt</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#codecvt.design.wchar_t_size"><span class="type">wchar_t</span> Size</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.unicode">Support for Unicode</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.issues">Other Issues</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#manual.localization.facet.messages">messages</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.messages.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.design">Design</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#messages.impl.models">Models</a></span></dt><dt><span class="section"><a href="facets.html#messages.impl.gnu">The GNU Model</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.messages.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="chapter"><a href="containers.html">9. +</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales">Locales</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locales.locale.req">Requirements</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.design">Design</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locale.impl.c">Interacting with "C" locales</a></span></dt></dl></dd><dt><span class="section"><a href="localization.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="facets.html">Facets</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#std.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.ctype.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#id609115">Specializations</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#std.localization.facet.codecvt">codecvt</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#codecvt.design.wchar_t_size"><span class="type">wchar_t</span> Size</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.unicode">Support for Unicode</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.issues">Other Issues</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#manual.localization.facet.messages">messages</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.messages.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.design">Design</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#messages.impl.models">Models</a></span></dt><dt><span class="section"><a href="facets.html#messages.impl.gnu">The GNU Model</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.messages.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="chapter"><a href="containers.html">9. Containers </a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="section"><a href="containers.html#containers.sequences.vector">vector</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="iterators.html">10. @@ -146,19 +146,19 @@ Support for C++11 dialect. </a></span></dt><dt><span class="appendix"><a href="appendix_gpl.html">D. <acronym class="acronym">GNU</acronym> General Public License version 3 - </a></span></dt><dt><span class="appendix"><a href="appendix_gfdl.html">E. GNU Free Documentation License</a></span></dt></dl></dd></dl></div><div class="list-of-figures"><p><strong>List of Figures</strong></p><dl><dt>22.1. <a href="policy_data_structures.html#id573272">Node Invariants</a></dt><dt>22.2. <a href="policy_data_structures.html#id573328">Underlying Associative Data Structures</a></dt><dt>22.3. <a href="policy_data_structures.html#id573591">Range Iteration in Different Data Structures</a></dt><dt>22.4. <a href="policy_data_structures.html#id573715">Point Iteration in Hash Data Structures</a></dt><dt>22.5. <a href="policy_data_structures.html#id573793">Effect of erase in different underlying data structures</a></dt><dt>22.6. <a href="policy_data_structures.html#id574356">Underlying Priority Queue Data Structures</a></dt><dt>22.7. <a href="policy_data_structures_using.html#id574878">Exception Hierarchy</a></dt><dt>22.8. <a href="policy_data_structures_design.html#id576499">Non-unique Mapping Standard Containers</a></dt><dt>22.9. <a href="policy_data_structures_design.html#fig.pbds_embedded_lists_2"> + </a></span></dt><dt><span class="appendix"><a href="appendix_gfdl.html">E. GNU Free Documentation License</a></span></dt></dl></dd></dl></div><div class="list-of-figures"><p><strong>List of Figures</strong></p><dl><dt>22.1. <a href="policy_data_structures.html#id624302">Node Invariants</a></dt><dt>22.2. <a href="policy_data_structures.html#id624358">Underlying Associative Data Structures</a></dt><dt>22.3. <a href="policy_data_structures.html#id624621">Range Iteration in Different Data Structures</a></dt><dt>22.4. <a href="policy_data_structures.html#id624745">Point Iteration in Hash Data Structures</a></dt><dt>22.5. <a href="policy_data_structures.html#id624822">Effect of erase in different underlying data structures</a></dt><dt>22.6. <a href="policy_data_structures.html#id625386">Underlying Priority Queue Data Structures</a></dt><dt>22.7. <a href="policy_data_structures_using.html#id625908">Exception Hierarchy</a></dt><dt>22.8. <a href="policy_data_structures_design.html#id627529">Non-unique Mapping Standard Containers</a></dt><dt>22.9. <a href="policy_data_structures_design.html#fig.pbds_embedded_lists_2"> Effect of embedded lists in <code class="classname">std::multimap</code> - </a></dt><dt>22.10. <a href="policy_data_structures_design.html#id576695">Non-unique Mapping Containers</a></dt><dt>22.11. <a href="policy_data_structures_design.html#id576861">Point Iterator Hierarchy</a></dt><dt>22.12. <a href="policy_data_structures_design.html#id576972">Invalidation Guarantee Tags Hierarchy</a></dt><dt>22.13. <a href="policy_data_structures_design.html#id577224">Container Tag Hierarchy</a></dt><dt>22.14. <a href="policy_data_structures_design.html#id577556">Hash functions, ranged-hash functions, and - range-hashing functions</a></dt><dt>22.15. <a href="policy_data_structures_design.html#id578093">Insert hash sequence diagram</a></dt><dt>22.16. <a href="policy_data_structures_design.html#id578152">Insert hash sequence diagram with a null policy</a></dt><dt>22.17. <a href="policy_data_structures_design.html#id578292">Hash policy class diagram</a></dt><dt>22.18. <a href="policy_data_structures_design.html#id578450">Balls and bins</a></dt><dt>22.19. <a href="policy_data_structures_design.html#id578707">Insert resize sequence diagram</a></dt><dt>22.20. <a href="policy_data_structures_design.html#id578772">Standard resize policy trigger sequence - diagram</a></dt><dt>22.21. <a href="policy_data_structures_design.html#id578806">Standard resize policy size sequence - diagram</a></dt><dt>22.22. <a href="policy_data_structures_design.html#id579456">Tree node invariants</a></dt><dt>22.23. <a href="policy_data_structures_design.html#id579535">Tree node invalidation</a></dt><dt>22.24. <a href="policy_data_structures_design.html#id579644">A tree and its update policy</a></dt><dt>22.25. <a href="policy_data_structures_design.html#id579742">Restoring node invariants</a></dt><dt>22.26. <a href="policy_data_structures_design.html#id579810">Insert update sequence</a></dt><dt>22.27. <a href="policy_data_structures_design.html#id579995">Useless update path</a></dt><dt>22.28. <a href="policy_data_structures_design.html#id580368">A PATRICIA trie</a></dt><dt>22.29. <a href="policy_data_structures_design.html#id580455">A trie and its update policy</a></dt><dt>22.30. <a href="policy_data_structures_design.html#id580710">A simple list</a></dt><dt>22.31. <a href="policy_data_structures_design.html#id580756">The counter algorithm</a></dt><dt>22.32. <a href="policy_data_structures_design.html#id581288">Underlying Priority-Queue Data-Structures.</a></dt><dt>22.33. <a href="policy_data_structures_design.html#id581579">Priority-Queue Data-Structure Tags.</a></dt><dt>B.1. <a href="appendix_porting.html#id609952">Configure and Build File Dependencies</a></dt></dl></div><div class="list-of-tables"><p><strong>List of Tables</strong></p><dl><dt>1.1. <a href="status.html#id457093">C++ 1998/2003 Implementation Status</a></dt><dt>1.2. <a href="status.html#id488280">C++ 2011 Implementation Status</a></dt><dt>1.3. <a href="status.html#id490902">C++ TR1 Implementation Status</a></dt><dt>1.4. <a href="status.html#id531074">C++ TR 24733 Implementation Status</a></dt><dt>3.1. <a href="using.html#id535140">C++ Command Options</a></dt><dt>3.2. <a href="using_headers.html#id535369">C++ 1998 Library Headers</a></dt><dt>3.3. <a href="using_headers.html#id535673">C++ 1998 Library Headers for C Library Facilities</a></dt><dt>3.4. <a href="using_headers.html#id535879">C++ 2011 Library Headers</a></dt><dt>3.5. <a href="using_headers.html#id536308">C++ 2011 Library Headers for C Library Facilities</a></dt><dt>3.6. <a href="using_headers.html#id536557">C++ TR 1 Library Headers</a></dt><dt>3.7. <a href="using_headers.html#id536698">C++ TR 1 Library Headers for C Library Facilities</a></dt><dt>3.8. <a href="using_headers.html#id536874">C++ TR 24733 Decimal Floating-Point Header</a></dt><dt>3.9. <a href="using_headers.html#id536920">C++ ABI Headers</a></dt><dt>3.10. <a href="using_headers.html#id536973">Extension Headers</a></dt><dt>3.11. <a href="using_headers.html#id537271">Extension Debug Headers</a></dt><dt>3.12. <a href="using_headers.html#id537394">Extension Profile Headers</a></dt><dt>3.13. <a href="using_headers.html#id537505">Extension Parallel Headers</a></dt><dt>17.1. <a href="bk01pt03ch17s03.html#id563932">Debugging Containers</a></dt><dt>17.2. <a href="bk01pt03ch17s03.html#id564306">Debugging Containers C++11</a></dt><dt>18.1. <a href="bk01pt03ch18s03.html#id565894">Parallel Algorithms</a></dt><dt>19.1. <a href="bk01pt03ch19s02.html#id568017">Profile Code Location</a></dt><dt>19.2. <a href="bk01pt03ch19s07.html#id568899">Profile Diagnostics</a></dt><dt>21.1. <a href="bk01pt03ch21s02.html#id572329">Bitmap Allocator Memory Map</a></dt><dt>B.1. <a href="documentation_hacking.html#id610857">Doxygen Prerequisites</a></dt><dt>B.2. <a href="documentation_hacking.html#id611360">HTML to Doxygen Markup Comparison</a></dt><dt>B.3. <a href="documentation_hacking.html#id611522">Docbook Prerequisites</a></dt><dt>B.4. <a href="documentation_hacking.html#id612000">HTML to Docbook XML Markup Comparison</a></dt><dt>B.5. <a href="documentation_hacking.html#id612201">Docbook XML Element Use</a></dt><dt>B.6. <a href="api.html#id617901">Extension Allocators</a></dt><dt>B.7. <a href="api.html#id618132">Extension Allocators Continued</a></dt></dl></div><div class="list-of-equations"><p><strong>List of Equations</strong></p><dl><dt>22.1. <a href="policy_data_structures_design.html#id577671">Ranged Hash Function</a></dt><dt>22.2. <a href="policy_data_structures_design.html#id577720">Range-Hashing, Division Method</a></dt><dt>22.3. <a href="policy_data_structures_design.html#id577758">Division via Prime Modulo</a></dt><dt>22.4. <a href="policy_data_structures_design.html#id577773">Division via Bit Mask</a></dt><dt>22.5. <a href="policy_data_structures_design.html#id577853"> + </a></dt><dt>22.10. <a href="policy_data_structures_design.html#id627725">Non-unique Mapping Containers</a></dt><dt>22.11. <a href="policy_data_structures_design.html#id627891">Point Iterator Hierarchy</a></dt><dt>22.12. <a href="policy_data_structures_design.html#id628002">Invalidation Guarantee Tags Hierarchy</a></dt><dt>22.13. <a href="policy_data_structures_design.html#id628254">Container Tag Hierarchy</a></dt><dt>22.14. <a href="policy_data_structures_design.html#id628586">Hash functions, ranged-hash functions, and + range-hashing functions</a></dt><dt>22.15. <a href="policy_data_structures_design.html#id629123">Insert hash sequence diagram</a></dt><dt>22.16. <a href="policy_data_structures_design.html#id629182">Insert hash sequence diagram with a null policy</a></dt><dt>22.17. <a href="policy_data_structures_design.html#id629321">Hash policy class diagram</a></dt><dt>22.18. <a href="policy_data_structures_design.html#id629480">Balls and bins</a></dt><dt>22.19. <a href="policy_data_structures_design.html#id629737">Insert resize sequence diagram</a></dt><dt>22.20. <a href="policy_data_structures_design.html#id629802">Standard resize policy trigger sequence + diagram</a></dt><dt>22.21. <a href="policy_data_structures_design.html#id629836">Standard resize policy size sequence + diagram</a></dt><dt>22.22. <a href="policy_data_structures_design.html#id630486">Tree node invariants</a></dt><dt>22.23. <a href="policy_data_structures_design.html#id630565">Tree node invalidation</a></dt><dt>22.24. <a href="policy_data_structures_design.html#id630674">A tree and its update policy</a></dt><dt>22.25. <a href="policy_data_structures_design.html#id630772">Restoring node invariants</a></dt><dt>22.26. <a href="policy_data_structures_design.html#id630840">Insert update sequence</a></dt><dt>22.27. <a href="policy_data_structures_design.html#id631025">Useless update path</a></dt><dt>22.28. <a href="policy_data_structures_design.html#id631398">A PATRICIA trie</a></dt><dt>22.29. <a href="policy_data_structures_design.html#id631485">A trie and its update policy</a></dt><dt>22.30. <a href="policy_data_structures_design.html#id631740">A simple list</a></dt><dt>22.31. <a href="policy_data_structures_design.html#id631786">The counter algorithm</a></dt><dt>22.32. <a href="policy_data_structures_design.html#id632318">Underlying Priority-Queue Data-Structures.</a></dt><dt>22.33. <a href="policy_data_structures_design.html#id632609">Priority-Queue Data-Structure Tags.</a></dt><dt>B.1. <a href="appendix_porting.html#id660988">Configure and Build File Dependencies</a></dt></dl></div><div class="list-of-tables"><p><strong>List of Tables</strong></p><dl><dt>1.1. <a href="status.html#id488211">C++ 1998/2003 Implementation Status</a></dt><dt>1.2. <a href="status.html#id539092">C++ 2011 Implementation Status</a></dt><dt>1.3. <a href="status.html#id541936">C++ TR1 Implementation Status</a></dt><dt>1.4. <a href="status.html#id582139">C++ TR 24733 Implementation Status</a></dt><dt>3.1. <a href="using.html#id586219">C++ Command Options</a></dt><dt>3.2. <a href="using_headers.html#id586447">C++ 1998 Library Headers</a></dt><dt>3.3. <a href="using_headers.html#id586751">C++ 1998 Library Headers for C Library Facilities</a></dt><dt>3.4. <a href="using_headers.html#id586958">C++ 2011 Library Headers</a></dt><dt>3.5. <a href="using_headers.html#id587386">C++ 2011 Library Headers for C Library Facilities</a></dt><dt>3.6. <a href="using_headers.html#id587635">C++ TR 1 Library Headers</a></dt><dt>3.7. <a href="using_headers.html#id587776">C++ TR 1 Library Headers for C Library Facilities</a></dt><dt>3.8. <a href="using_headers.html#id587952">C++ TR 24733 Decimal Floating-Point Header</a></dt><dt>3.9. <a href="using_headers.html#id587998">C++ ABI Headers</a></dt><dt>3.10. <a href="using_headers.html#id588051">Extension Headers</a></dt><dt>3.11. <a href="using_headers.html#id588349">Extension Debug Headers</a></dt><dt>3.12. <a href="using_headers.html#id588472">Extension Profile Headers</a></dt><dt>3.13. <a href="using_headers.html#id588584">Extension Parallel Headers</a></dt><dt>17.1. <a href="bk01pt03ch17s03.html#id614962">Debugging Containers</a></dt><dt>17.2. <a href="bk01pt03ch17s03.html#id615336">Debugging Containers C++11</a></dt><dt>18.1. <a href="bk01pt03ch18s03.html#id616923">Parallel Algorithms</a></dt><dt>19.1. <a href="bk01pt03ch19s02.html#id619047">Profile Code Location</a></dt><dt>19.2. <a href="bk01pt03ch19s07.html#id619929">Profile Diagnostics</a></dt><dt>21.1. <a href="bk01pt03ch21s02.html#id623359">Bitmap Allocator Memory Map</a></dt><dt>B.1. <a href="documentation_hacking.html#id661894">Doxygen Prerequisites</a></dt><dt>B.2. <a href="documentation_hacking.html#id662396">HTML to Doxygen Markup Comparison</a></dt><dt>B.3. <a href="documentation_hacking.html#id662558">Docbook Prerequisites</a></dt><dt>B.4. <a href="documentation_hacking.html#id663036">HTML to Docbook XML Markup Comparison</a></dt><dt>B.5. <a href="documentation_hacking.html#id663237">Docbook XML Element Use</a></dt><dt>B.6. <a href="api.html#id668796">Extension Allocators</a></dt><dt>B.7. <a href="api.html#id669027">Extension Allocators Continued</a></dt></dl></div><div class="list-of-equations"><p><strong>List of Equations</strong></p><dl><dt>22.1. <a href="policy_data_structures_design.html#id628701">Ranged Hash Function</a></dt><dt>22.2. <a href="policy_data_structures_design.html#id628750">Range-Hashing, Division Method</a></dt><dt>22.3. <a href="policy_data_structures_design.html#id628788">Division via Prime Modulo</a></dt><dt>22.4. <a href="policy_data_structures_design.html#id628803">Division via Bit Mask</a></dt><dt>22.5. <a href="policy_data_structures_design.html#id628883"> A Standard String Hash Function - </a></dt><dt>22.6. <a href="policy_data_structures_design.html#id577905"> + </a></dt><dt>22.6. <a href="policy_data_structures_design.html#id628934"> Only k String DNA Hash - </a></dt><dt>22.7. <a href="policy_data_structures_design.html#id578496"> + </a></dt><dt>22.7. <a href="policy_data_structures_design.html#id629526"> Probability of Probe Sequence of Length k - </a></dt><dt>22.8. <a href="policy_data_structures_design.html#id578552"> + </a></dt><dt>22.8. <a href="policy_data_structures_design.html#id629582"> Probability Probe Sequence in Some Bin </a></dt></dl></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td align="left"><a accesskey="p" href="../index.html">Prev</a> </td><td align="center"> </td><td align="right"> <a accesskey="n" href="intro.html">Next</a></td></tr><tr><td align="left" valign="top">The GNU C++ Library </td><td align="center"><a accesskey="h" href="../index.html">Home</a></td><td align="right" valign="top"> Part I. Introduction diff --git a/libstdc++-v3/doc/html/manual/intro.html b/libstdc++-v3/doc/html/manual/intro.html index b6a8192a035..5650406e53c 100644 --- a/libstdc++-v3/doc/html/manual/intro.html +++ b/libstdc++-v3/doc/html/manual/intro.html @@ -5,5 +5,5 @@ </th></tr><tr><td align="left"><a accesskey="p" href="index.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library Manual</th><td align="right"> <a accesskey="n" href="status.html">Next</a></td></tr></table><hr/></div><div class="part" title="Part I. Introduction"><div class="titlepage"><div><div><h1 class="title"><a id="manual.intro"/>Part I. Introduction - <a id="id434635" class="indexterm"/> -</h1></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="chapter"><a href="status.html">1. Status</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#manual.intro.status.iso">Implementation Status</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#status.iso.1998">C++ 1998/2003</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#iso.1998.status">Implementation Status</a></span></dt><dt><span class="section"><a href="status.html#iso.1998.specific">Implementation Specific Behavior</a></span></dt></dl></dd><dt><span class="section"><a href="status.html#status.iso.2011">C++ 2011</a></span></dt><dt><span class="section"><a href="status.html#status.iso.tr1">C++ TR1</a></span></dt><dt><span class="section"><a href="status.html#status.iso.tr24733">C++ TR 24733</a></span></dt></dl></dd><dt><span class="section"><a href="license.html">License</a></span></dt><dd><dl><dt><span class="section"><a href="license.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="section"><a href="license.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="section"><a href="bugs.html">Bugs</a></span></dt><dd><dl><dt><span class="section"><a href="bugs.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="section"><a href="bugs.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="setup.html">2. Setup</a></span></dt><dd><dl><dt><span class="section"><a href="setup.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="configure.html">Configure</a></span></dt><dt><span class="section"><a href="make.html">Make</a></span></dt></dl></dd><dt><span class="chapter"><a href="using.html">3. Using</a></span></dt><dd><dl><dt><span class="section"><a href="using.html#manual.intro.using.flags">Command Options</a></span></dt><dt><span class="section"><a href="using_headers.html">Headers</a></span></dt><dd><dl><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.cheaders">The C Headers and <code class="code">namespace std</code></a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="section"><a href="using_macros.html">Macros</a></span></dt><dt><span class="section"><a href="using_namespaces.html">Namespaces</a></span></dt><dd><dl><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="section"><a href="using_dynamic_or_shared.html">Linking</a></span></dt><dd><dl><dt><span class="section"><a href="using_dynamic_or_shared.html#manual.intro.using.linkage.freestanding">Almost Nothing</a></span></dt><dt><span class="section"><a href="using_dynamic_or_shared.html#manual.intro.using.linkage.dynamic">Finding Dynamic or Shared Libraries</a></span></dt></dl></dd><dt><span class="section"><a href="using_concurrency.html">Concurrency</a></span></dt><dd><dl><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.io">IO</a></span></dt><dd><dl><dt><span class="section"><a href="using_concurrency.html#concurrency.io.structure">Structure</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.defaults">Defaults</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.future">Future</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.alt">Alternatives</a></span></dt></dl></dd><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="section"><a href="using_exceptions.html">Exceptions</a></span></dt><dd><dl><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.propagating">Exception Neutrality</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.no">Doing without</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.compat">Compatibility</a></span></dt><dd><dl><dt><span class="section"><a href="using_exceptions.html#using.exception.compat.c">With <code class="literal">C</code></a></span></dt><dt><span class="section"><a href="using_exceptions.html#using.exception.compat.posix">With <code class="literal">POSIX</code> thread cancellation</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="section"><a href="debug.html#debug.compiler">Using <span class="command"><strong>g++</strong></span></a></span></dt><dt><span class="section"><a href="debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="section"><a href="debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="section"><a href="debug.html#debug.races">Data Race Hunting</a></span></dt><dt><span class="section"><a href="debug.html#debug.gdb">Using <span class="command"><strong>gdb</strong></span></a></span></dt><dt><span class="section"><a href="debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="section"><a href="debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="section"><a href="debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt><dt><span class="section"><a href="debug.html#debug.profile_mode">Profile-based Performance Analysis</a></span></dt></dl></dd></dl></dd></dl></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td align="left"><a accesskey="p" href="index.html">Prev</a> </td><td align="center"><a accesskey="u" href="index.html">Up</a></td><td align="right"> <a accesskey="n" href="status.html">Next</a></td></tr><tr><td align="left" valign="top">The GNU C++ Library Manual </td><td align="center"><a accesskey="h" href="../index.html">Home</a></td><td align="right" valign="top"> Chapter 1. Status</td></tr></table></div></body></html> + <a id="id509680" class="indexterm"/> +</h1></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="chapter"><a href="status.html">1. Status</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#manual.intro.status.iso">Implementation Status</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#status.iso.1998">C++ 1998/2003</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#iso.1998.status">Implementation Status</a></span></dt><dt><span class="section"><a href="status.html#iso.1998.specific">Implementation Specific Behavior</a></span></dt></dl></dd><dt><span class="section"><a href="status.html#status.iso.2011">C++ 2011</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#iso.2011.specific">Implementation Specific Behavior</a></span></dt></dl></dd><dt><span class="section"><a href="status.html#status.iso.tr1">C++ TR1</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#iso.tr1.specific">Implementation Specific Behavior</a></span></dt></dl></dd><dt><span class="section"><a href="status.html#status.iso.tr24733">C++ TR 24733</a></span></dt></dl></dd><dt><span class="section"><a href="license.html">License</a></span></dt><dd><dl><dt><span class="section"><a href="license.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="section"><a href="license.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="section"><a href="bugs.html">Bugs</a></span></dt><dd><dl><dt><span class="section"><a href="bugs.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="section"><a href="bugs.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="setup.html">2. Setup</a></span></dt><dd><dl><dt><span class="section"><a href="setup.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="configure.html">Configure</a></span></dt><dt><span class="section"><a href="make.html">Make</a></span></dt></dl></dd><dt><span class="chapter"><a href="using.html">3. Using</a></span></dt><dd><dl><dt><span class="section"><a href="using.html#manual.intro.using.flags">Command Options</a></span></dt><dt><span class="section"><a href="using_headers.html">Headers</a></span></dt><dd><dl><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.cheaders">The C Headers and <code class="code">namespace std</code></a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="section"><a href="using_macros.html">Macros</a></span></dt><dt><span class="section"><a href="using_namespaces.html">Namespaces</a></span></dt><dd><dl><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="section"><a href="using_dynamic_or_shared.html">Linking</a></span></dt><dd><dl><dt><span class="section"><a href="using_dynamic_or_shared.html#manual.intro.using.linkage.freestanding">Almost Nothing</a></span></dt><dt><span class="section"><a href="using_dynamic_or_shared.html#manual.intro.using.linkage.dynamic">Finding Dynamic or Shared Libraries</a></span></dt></dl></dd><dt><span class="section"><a href="using_concurrency.html">Concurrency</a></span></dt><dd><dl><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.io">IO</a></span></dt><dd><dl><dt><span class="section"><a href="using_concurrency.html#concurrency.io.structure">Structure</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.defaults">Defaults</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.future">Future</a></span></dt><dt><span class="section"><a href="using_concurrency.html#concurrency.io.alt">Alternatives</a></span></dt></dl></dd><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="section"><a href="using_exceptions.html">Exceptions</a></span></dt><dd><dl><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.propagating">Exception Neutrality</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.no">Doing without</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.compat">Compatibility</a></span></dt><dd><dl><dt><span class="section"><a href="using_exceptions.html#using.exception.compat.c">With <code class="literal">C</code></a></span></dt><dt><span class="section"><a href="using_exceptions.html#using.exception.compat.posix">With <code class="literal">POSIX</code> thread cancellation</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="section"><a href="debug.html#debug.compiler">Using <span class="command"><strong>g++</strong></span></a></span></dt><dt><span class="section"><a href="debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="section"><a href="debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="section"><a href="debug.html#debug.races">Data Race Hunting</a></span></dt><dt><span class="section"><a href="debug.html#debug.gdb">Using <span class="command"><strong>gdb</strong></span></a></span></dt><dt><span class="section"><a href="debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="section"><a href="debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="section"><a href="debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt><dt><span class="section"><a href="debug.html#debug.profile_mode">Profile-based Performance Analysis</a></span></dt></dl></dd></dl></dd></dl></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td align="left"><a accesskey="p" href="index.html">Prev</a> </td><td align="center"><a accesskey="u" href="index.html">Up</a></td><td align="right"> <a accesskey="n" href="status.html">Next</a></td></tr><tr><td align="left" valign="top">The GNU C++ Library Manual </td><td align="center"><a accesskey="h" href="../index.html">Home</a></td><td align="right" valign="top"> Chapter 1. Status</td></tr></table></div></body></html> diff --git a/libstdc++-v3/doc/html/manual/io.html b/libstdc++-v3/doc/html/manual/io.html index 658024a0ae1..ccf88c73f08 100644 --- a/libstdc++-v3/doc/html/manual/io.html +++ b/libstdc++-v3/doc/html/manual/io.html @@ -7,7 +7,7 @@ Standard Contents </th><td align="right"> <a accesskey="n" href="streambufs.html">Next</a></td></tr></table><hr/></div><div class="chapter" title="Chapter 13. Input and Output"><div class="titlepage"><div><div><h2 class="title"><a id="std.io"/>Chapter 13. Input and Output - <a id="id561984" class="indexterm"/> + <a id="id613013" class="indexterm"/> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="io.html#std.io.objects">Iostream Objects</a></span></dt><dt><span class="section"><a href="streambufs.html">Stream Buffers</a></span></dt><dd><dl><dt><span class="section"><a href="streambufs.html#io.streambuf.derived">Derived streambuf Classes</a></span></dt><dt><span class="section"><a href="streambufs.html#io.streambuf.buffering">Buffering</a></span></dt></dl></dd><dt><span class="section"><a href="stringstreams.html">Memory Based Streams</a></span></dt><dd><dl><dt><span class="section"><a href="stringstreams.html#std.io.memstreams.compat">Compatibility With strstream</a></span></dt></dl></dd><dt><span class="section"><a href="fstreams.html">File Based Streams</a></span></dt><dd><dl><dt><span class="section"><a href="fstreams.html#std.io.filestreams.copying_a_file">Copying a File</a></span></dt><dt><span class="section"><a href="fstreams.html#std.io.filestreams.binary">Binary Input and Output</a></span></dt></dl></dd><dt><span class="section"><a href="io_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="io_and_c.html#std.io.c.FILE">Using FILE* and file descriptors</a></span></dt><dt><span class="section"><a href="io_and_c.html#std.io.c.sync">Performance</a></span></dt></dl></dd></dl></div><div class="section" title="Iostream Objects"><div class="titlepage"><div><div><h2 class="title"><a id="std.io.objects"/>Iostream Objects</h2></div></div></div><p>To minimize the time you have to wait on the compiler, it's good to only include the headers you really need. Many people simply include <iostream> when they don't need to -- and that can <span class="emphasis"><em>penalize diff --git a/libstdc++-v3/doc/html/manual/iterators.html b/libstdc++-v3/doc/html/manual/iterators.html index bc614bedea9..ecf98a14df2 100644 --- a/libstdc++-v3/doc/html/manual/iterators.html +++ b/libstdc++-v3/doc/html/manual/iterators.html @@ -7,7 +7,7 @@ Standard Contents </th><td align="right"> <a accesskey="n" href="algorithms.html">Next</a></td></tr></table><hr/></div><div class="chapter" title="Chapter 10. Iterators"><div class="titlepage"><div><div><h2 class="title"><a id="std.iterators"/>Chapter 10. Iterators - <a id="id561149" class="indexterm"/> + <a id="id612178" class="indexterm"/> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="iterators.html#std.iterators.predefined">Predefined</a></span></dt><dd><dl><dt><span class="section"><a href="iterators.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="section"><a href="iterators.html#iterators.predefined.end">One Past the End</a></span></dt></dl></dd></dl></div><div class="section" title="Predefined"><div class="titlepage"><div><div><h2 class="title"><a id="std.iterators.predefined"/>Predefined</h2></div></div></div><div class="section" title="Iterators vs. Pointers"><div class="titlepage"><div><div><h3 class="title"><a id="iterators.predefined.vs_pointers"/>Iterators vs. Pointers</h3></div></div></div><p> The following FAQ <a class="link" href="../faq.html#faq.iterator_as_pod" title="7.1.">entry</a> points out that diff --git a/libstdc++-v3/doc/html/manual/localization.html b/libstdc++-v3/doc/html/manual/localization.html index 3572f10e842..bbcffbefe15 100644 --- a/libstdc++-v3/doc/html/manual/localization.html +++ b/libstdc++-v3/doc/html/manual/localization.html @@ -7,8 +7,8 @@ Standard Contents </th><td align="right"> <a accesskey="n" href="facets.html">Next</a></td></tr></table><hr/></div><div class="chapter" title="Chapter 8. Localization"><div class="titlepage"><div><div><h2 class="title"><a id="std.localization"/>Chapter 8. Localization - <a id="id557439" class="indexterm"/> -</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="localization.html#std.localization.locales">Locales</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locales.locale.req">Requirements</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.design">Design</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locale.impl.c">Interacting with "C" locales</a></span></dt></dl></dd><dt><span class="section"><a href="localization.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="facets.html">Facets</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#std.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.ctype.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#id558091">Specializations</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#std.localization.facet.codecvt">codecvt</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#codecvt.design.wchar_t_size"><span class="type">wchar_t</span> Size</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.unicode">Support for Unicode</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.issues">Other Issues</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#manual.localization.facet.messages">messages</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.messages.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.design">Design</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#messages.impl.models">Models</a></span></dt><dt><span class="section"><a href="facets.html#messages.impl.gnu">The GNU Model</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.messages.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></div><div class="section" title="Locales"><div class="titlepage"><div><div><h2 class="title"><a id="std.localization.locales"/>Locales</h2></div></div></div><div class="section" title="locale"><div class="titlepage"><div><div><h3 class="title"><a id="std.localization.locales.locale"/>locale</h3></div></div></div><p> + <a id="id608463" class="indexterm"/> +</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="localization.html#std.localization.locales">Locales</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locales.locale.req">Requirements</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.design">Design</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locale.impl.c">Interacting with "C" locales</a></span></dt></dl></dd><dt><span class="section"><a href="localization.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="facets.html">Facets</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#std.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.ctype.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#id609115">Specializations</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#std.localization.facet.codecvt">codecvt</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#codecvt.design.wchar_t_size"><span class="type">wchar_t</span> Size</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.unicode">Support for Unicode</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.issues">Other Issues</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#manual.localization.facet.messages">messages</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.messages.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.design">Design</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#messages.impl.models">Models</a></span></dt><dt><span class="section"><a href="facets.html#messages.impl.gnu">The GNU Model</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.messages.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></div><div class="section" title="Locales"><div class="titlepage"><div><div><h2 class="title"><a id="std.localization.locales"/>Locales</h2></div></div></div><div class="section" title="locale"><div class="titlepage"><div><div><h3 class="title"><a id="std.localization.locales.locale"/>locale</h3></div></div></div><p> Describes the basic locale object, including nested classes id, facet, and the reference-counted implementation object, class _Impl. @@ -403,29 +403,29 @@ global locale" (emphasis Paolo), that is: What should non-required facet instantiations do? If the generic implementation is provided, then how to end-users provide specializations? - </p></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="locales.locale.biblio"/>Bibliography</h4></div></div></div><div class="biblioentry"><a id="id557801"/><p><span class="citetitle"><em class="citetitle"> + </p></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="locales.locale.biblio"/>Bibliography</h4></div></div></div><div class="biblioentry"><a id="id608826"/><p><span class="citetitle"><em class="citetitle"> The GNU C Library </em>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums"> Chapters 6 Character Set Handling and 7 Locales and Internationalization - . </span></p></div><div class="biblioentry"><a id="id557841"/><p><span class="citetitle"><em class="citetitle"> + . </span></p></div><div class="biblioentry"><a id="id608865"/><p><span class="citetitle"><em class="citetitle"> Correspondence - </em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id557867"/><p><span class="citetitle"><em class="citetitle"> + </em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id608891"/><p><span class="citetitle"><em class="citetitle"> ISO/IEC 14882:1998 Programming languages - C++ - </em>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id557886"/><p><span class="citetitle"><em class="citetitle"> + </em>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id608910"/><p><span class="citetitle"><em class="citetitle"> ISO/IEC 9899:1999 Programming languages - C - </em>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry" title="System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008)"><a id="id557905"/><p><span class="title"><em> + </em>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry" title="System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008)"><a id="id608929"/><p><span class="title"><em> <a class="link" href="http://www.opengroup.org/austin/"> System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008) </a> </em>. </span><span class="copyright">Copyright © 2008 The Open Group/The Institute of Electrical and Electronics Engineers, Inc. - . </span></p></div><div class="biblioentry"><a id="id557932"/><p><span class="citetitle"><em class="citetitle"> + . </span></p></div><div class="biblioentry"><a id="id608956"/><p><span class="citetitle"><em class="citetitle"> The C++ Programming Language, Special Edition </em>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername"> Addison Wesley - . </span></span></p></div><div class="biblioentry"><a id="id557970"/><p><span class="citetitle"><em class="citetitle"> + . </span></span></p></div><div class="biblioentry"><a id="id608994"/><p><span class="citetitle"><em class="citetitle"> Standard C++ IOStreams and Locales </em>. </span><span class="subtitle"> Advanced Programmer's Guide and Reference diff --git a/libstdc++-v3/doc/html/manual/memory.html b/libstdc++-v3/doc/html/manual/memory.html index 24f7381b7bb..12671f32c2f 100644 --- a/libstdc++-v3/doc/html/manual/memory.html +++ b/libstdc++-v3/doc/html/manual/memory.html @@ -93,7 +93,7 @@ or loading and unloading shared objects in memory. As such, using caching allocators on systems that do not support <code class="function">abi::__cxa_atexit</code> is not recommended. - </p></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h4 class="title"><a id="allocator.impl"/>Implementation</h4></div></div></div><div class="section" title="Interface Design"><div class="titlepage"><div><div><h5 class="title"><a id="id542426"/>Interface Design</h5></div></div></div><p> + </p></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h4 class="title"><a id="allocator.impl"/>Implementation</h4></div></div></div><div class="section" title="Interface Design"><div class="titlepage"><div><div><h5 class="title"><a id="id593505"/>Interface Design</h5></div></div></div><p> The only allocator interface that is supported is the standard C++ interface. As such, all STL containers have been adjusted, and all external allocators have @@ -106,7 +106,7 @@ </p><p> The base class that <code class="classname">allocator</code> is derived from may not be user-configurable. -</p></div><div class="section" title="Selecting Default Allocation Policy"><div class="titlepage"><div><div><h5 class="title"><a id="id542456"/>Selecting Default Allocation Policy</h5></div></div></div><p> +</p></div><div class="section" title="Selecting Default Allocation Policy"><div class="titlepage"><div><div><h5 class="title"><a id="id593534"/>Selecting Default Allocation Policy</h5></div></div></div><p> It's difficult to pick an allocation strategy that will provide maximum utility, without excessively penalizing some behavior. In fact, it's difficult just deciding which typical actions to measure @@ -143,7 +143,7 @@ The current default choice for <code class="classname">allocator</code> is <code class="classname">__gnu_cxx::new_allocator</code>. - </p></div><div class="section" title="Disabling Memory Caching"><div class="titlepage"><div><div><h5 class="title"><a id="id542566"/>Disabling Memory Caching</h5></div></div></div><p> + </p></div><div class="section" title="Disabling Memory Caching"><div class="titlepage"><div><div><h5 class="title"><a id="id593645"/>Disabling Memory Caching</h5></div></div></div><p> In use, <code class="classname">allocator</code> may allocate and deallocate using implementation-specified strategies and heuristics. Because of this, every call to an allocator object's @@ -308,33 +308,33 @@ A high-performance allocator that uses a bit-map to keep track of the used and unused memory locations. It has its own documentation, found <a class="link" href="bitmap_allocator.html" title="Chapter 21. The bitmap_allocator">here</a>. - </p></li></ol></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="allocator.biblio"/>Bibliography</h4></div></div></div><div class="biblioentry"><a id="id543017"/><p><span class="citetitle"><em class="citetitle"> + </p></li></ol></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="allocator.biblio"/>Bibliography</h4></div></div></div><div class="biblioentry"><a id="id594096"/><p><span class="citetitle"><em class="citetitle"> ISO/IEC 14882:1998 Programming languages - C++ </em>. </span> isoc++_1998 - <span class="pagenums">20.4 Memory. </span></p></div><div class="biblioentry" title="The Standard Librarian: What Are Allocators Good For?"><a id="id543032"/><p><span class="title"><em> + <span class="pagenums">20.4 Memory. </span></p></div><div class="biblioentry" title="The Standard Librarian: What Are Allocators Good For?"><a id="id594111"/><p><span class="title"><em> <a class="link" href="http://www.drdobbs.com/cpp/184403759"> The Standard Librarian: What Are Allocators Good For? </a> </em>. </span><span class="author"><span class="firstname">Matt</span> <span class="surname">Austern</span>. </span><span class="publisher"><span class="publishername"> C/C++ Users Journal - . </span></span></p></div><div class="biblioentry" title="The Hoard Memory Allocator"><a id="id543063"/><p><span class="title"><em> + . </span></span></p></div><div class="biblioentry" title="The Hoard Memory Allocator"><a id="id594142"/><p><span class="title"><em> <a class="link" href="http://www.cs.umass.edu/~emery/hoard"> The Hoard Memory Allocator </a> - </em>. </span><span class="author"><span class="firstname">Emery</span> <span class="surname">Berger</span>. </span></p></div><div class="biblioentry" title="Reconsidering Custom Memory Allocation"><a id="id543087"/><p><span class="title"><em> + </em>. </span><span class="author"><span class="firstname">Emery</span> <span class="surname">Berger</span>. </span></p></div><div class="biblioentry" title="Reconsidering Custom Memory Allocation"><a id="id594165"/><p><span class="title"><em> <a class="link" href="http://www.cs.umass.edu/~emery/pubs/berger-oopsla2002.pdf"> Reconsidering Custom Memory Allocation </a> - </em>. </span><span class="author"><span class="firstname">Emery</span> <span class="surname">Berger</span>. </span><span class="author"><span class="firstname">Ben</span> <span class="surname">Zorn</span>. </span><span class="author"><span class="firstname">Kathryn</span> <span class="surname">McKinley</span>. </span><span class="copyright">Copyright © 2002 OOPSLA. </span></p></div><div class="biblioentry" title="Allocator Types"><a id="id543138"/><p><span class="title"><em> + </em>. </span><span class="author"><span class="firstname">Emery</span> <span class="surname">Berger</span>. </span><span class="author"><span class="firstname">Ben</span> <span class="surname">Zorn</span>. </span><span class="author"><span class="firstname">Kathryn</span> <span class="surname">McKinley</span>. </span><span class="copyright">Copyright © 2002 OOPSLA. </span></p></div><div class="biblioentry" title="Allocator Types"><a id="id594216"/><p><span class="title"><em> <a class="link" href="http://www.angelikalanger.com/Articles/C++Report/Allocators/Allocators.html"> Allocator Types </a> </em>. </span><span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="publisher"><span class="publishername"> C/C++ Users Journal - . </span></span></p></div><div class="biblioentry"><a id="id543177"/><p><span class="citetitle"><em class="citetitle">The C++ Programming Language</em>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 . </span><span class="pagenums">19.4 Allocators. </span><span class="publisher"><span class="publishername"> + . </span></span></p></div><div class="biblioentry"><a id="id594256"/><p><span class="citetitle"><em class="citetitle">The C++ Programming Language</em>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 . </span><span class="pagenums">19.4 Allocators. </span><span class="publisher"><span class="publishername"> Addison Wesley - . </span></span></p></div><div class="biblioentry"><a id="id543214"/><p><span class="citetitle"><em class="citetitle">Yalloc: A Recycling C++ Allocator</em>. </span><span class="author"><span class="firstname">Felix</span> <span class="surname">Yen</span>. </span></p></div></div></div><div class="section" title="auto_ptr"><div class="titlepage"><div><div><h3 class="title"><a id="std.util.memory.auto_ptr"/>auto_ptr</h3></div></div></div><div class="section" title="Limitations"><div class="titlepage"><div><div><h4 class="title"><a id="auto_ptr.limitations"/>Limitations</h4></div></div></div><p>Explaining all of the fun and delicious things that can + . </span></span></p></div><div class="biblioentry"><a id="id594293"/><p><span class="citetitle"><em class="citetitle">Yalloc: A Recycling C++ Allocator</em>. </span><span class="author"><span class="firstname">Felix</span> <span class="surname">Yen</span>. </span></p></div></div></div><div class="section" title="auto_ptr"><div class="titlepage"><div><div><h3 class="title"><a id="std.util.memory.auto_ptr"/>auto_ptr</h3></div></div></div><div class="section" title="Limitations"><div class="titlepage"><div><div><h4 class="title"><a id="auto_ptr.limitations"/>Limitations</h4></div></div></div><p>Explaining all of the fun and delicious things that can happen with misuse of the <code class="classname">auto_ptr</code> class template (called <acronym class="acronym">AP</acronym> here) would take some time. Suffice it to say that the use of <acronym class="acronym">AP</acronym> @@ -444,7 +444,7 @@ drops to zero. Derived classes override those functions to destroy resources in a context where the correct dynamic type is known. This is an application of the technique known as type erasure. - </p></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h4 class="title"><a id="shared_ptr.impl"/>Implementation</h4></div></div></div><div class="section" title="Class Hierarchy"><div class="titlepage"><div><div><h5 class="title"><a id="id543565"/>Class Hierarchy</h5></div></div></div><p> + </p></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h4 class="title"><a id="shared_ptr.impl"/>Implementation</h4></div></div></div><div class="section" title="Class Hierarchy"><div class="titlepage"><div><div><h5 class="title"><a id="id594644"/>Class Hierarchy</h5></div></div></div><p> A <code class="classname">shared_ptr<T></code> contains a pointer of type <span class="type">T*</span> and an object of type <code class="classname">__shared_count</code>. The shared_count contains a @@ -459,13 +459,13 @@ the counts drop to zero. The managed object is destroyed when the last strong reference is dropped, but the _Sp_counted_base itself must exist until the last weak reference is dropped. </p></dd><dt><span class="term"><code class="classname">_Sp_counted_base_impl<Ptr, Deleter, Lp></code></span></dt><dd><p> -Inherits from _Sp_counted_base and stores a pointer of type <span class="type">Ptr</span> -and a deleter of type <code class="code">Deleter</code>. <code class="code">_Sp_deleter</code> is +Inherits from _Sp_counted_base and stores a pointer of type <code class="code">Ptr</code> +and a deleter of type <code class="code">Deleter</code>. <code class="classname">_Sp_deleter</code> is used when the user doesn't supply a custom deleter. Unlike Boost's, this default deleter is not "checked" because GCC already issues a warning if <code class="function">delete</code> is used with an incomplete type. -This is the only derived type used by <code class="classname">shared_ptr<Ptr></code> -and it is never used by <code class="classname">shared_ptr</code>, which uses one of +This is the only derived type used by <code class="classname">tr1::shared_ptr<Ptr></code> +and it is never used by <code class="classname">std::shared_ptr</code>, which uses one of the following types, depending on how the shared_ptr is constructed. </p></dd><dt><span class="term"><code class="classname">_Sp_counted_ptr<Ptr, Lp></code></span></dt><dd><p> Inherits from _Sp_counted_base and stores a pointer of type <span class="type">Ptr</span>, @@ -486,12 +486,12 @@ be forwarded to <span class="type">Tp</span>'s constructor. Unlike the other <code class="classname">_Sp_counted_*</code> classes, this one is parameterized on the type of object, not the type of pointer; this is purely a convenience that simplifies the implementation slightly. - </p></dd></dl></div></div><div class="section" title="Thread Safety"><div class="titlepage"><div><div><h5 class="title"><a id="id543744"/>Thread Safety</h5></div></div></div><p> + </p></dd></dl></div><p> C++11-only features are: rvalue-ref/move support, allocator support, aliasing constructor, make_shared & allocate_shared. Additionally, the constructors taking <code class="classname">auto_ptr</code> parameters are deprecated in C++11 mode. - </p><p> + </p></div><div class="section" title="Thread Safety"><div class="titlepage"><div><div><h5 class="title"><a id="id594832"/>Thread Safety</h5></div></div></div><p> The <a class="link" href="http://boost.org/libs/smart_ptr/shared_ptr.htm#ThreadSafety">Thread Safety</a> section of the Boost shared_ptr documentation says "shared_ptr @@ -536,7 +536,7 @@ compiler, standard library, platform etc. For the version of shared_ptr in libstdc++ the compiler and library are fixed, which makes things much simpler: we have an atomic CAS or we don't, see Lock Policy below for details. -</p></div><div class="section" title="Selecting Lock Policy"><div class="titlepage"><div><div><h5 class="title"><a id="id543814"/>Selecting Lock Policy</h5></div></div></div><p> +</p></div><div class="section" title="Selecting Lock Policy"><div class="titlepage"><div><div><h5 class="title"><a id="id594892"/>Selecting Lock Policy</h5></div></div></div><p> </p><p> There is a single <code class="classname">_Sp_counted_base</code> class, which is a template parameterized on the enum @@ -553,7 +553,7 @@ not be conforming for <code class="classname">shared_ptr</code> to have an extra template parameter, even if it had a default value. The available policies are: </p><div class="orderedlist"><ol class="orderedlist"><li class="listitem"><p> - <span class="type">_S_Atomic</span> + <code class="constant">_S_Atomic</code> </p><p> Selected when GCC supports a builtin atomic compare-and-swap operation on the target processor (see <a class="link" href="http://gcc.gnu.org/onlinedocs/gcc/Atomic-Builtins.html">Atomic @@ -561,13 +561,13 @@ Builtins</a>.) The reference counts are maintained using a lock-free algorithm and GCC's atomic builtins, which provide the required memory synchronisation. </p></li><li class="listitem"><p> - <span class="type">_S_Mutex</span> + <code class="constant">_S_Mutex</code> </p><p> The _Sp_counted_base specialization for this policy contains a mutex, which is locked in add_ref_lock(). This policy is used when GCC's atomic builtins aren't available so explicit memory barriers are needed in places. </p></li><li class="listitem"><p> - <span class="type">_S_Single</span> + <code class="constant">_S_Single</code> </p><p> This policy uses a non-reentrant add_ref_lock() with no locking. It is used when libstdc++ is built without <code class="literal">--enable-threads</code>. @@ -577,24 +577,7 @@ used when libstdc++ is built without <code class="literal">--enable-threads</cod <code class="filename">ext/atomicity.h</code>, which detect if the program is multi-threaded. If only one thread of execution exists in the program then less expensive non-atomic operations are used. - </p></div><div class="section" title="Dual C++11 and TR1 Implementation"><div class="titlepage"><div><div><h5 class="title"><a id="id543936"/>Dual C++11 and TR1 Implementation</h5></div></div></div><p> -The interface of <code class="classname">tr1::shared_ptr</code> was extended for C++11 -with support for rvalue-references and the other features from N2351. -The <code class="classname">_Sp_counted_base</code> base class is implemented in -<code class="filename">tr1/boost_sp_shared_count.h</code> and is common to the TR1 -and C++11 versions of <code class="classname">shared_ptr</code>. -</p><p> -The classes derived from <code class="classname">_Sp_counted_base</code> (see Class Hierarchy -above) and <code class="classname">__shared_count</code> are implemented separately for C++11 -and TR1, in <code class="filename">bits/shared_ptr.h</code> and -<code class="filename">tr1/shared_ptr.h</code> respectively. -</p><p> -The TR1 implementation is considered relatively stable, so is unlikely to -change unless bug fixes require it. If the code that is common to both -C++11 and TR1 versions needs to diverge further then it might be necessary to -duplicate <code class="classname">_Sp_counted_base</code> and only make changes to -the C++11 version. -</p></div><div class="section" title="Related functions and classes"><div class="titlepage"><div><div><h5 class="title"><a id="id543992"/>Related functions and classes</h5></div></div></div><div class="variablelist"><dl><dt><span class="term"><code class="code">dynamic_pointer_cast</code>, <code class="code">static_pointer_cast</code>, + </p></div><div class="section" title="Related functions and classes"><div class="titlepage"><div><div><h5 class="title"><a id="id595014"/>Related functions and classes</h5></div></div></div><div class="variablelist"><dl><dt><span class="term"><code class="code">dynamic_pointer_cast</code>, <code class="code">static_pointer_cast</code>, <code class="code">const_pointer_cast</code></span></dt><dd><p> As noted in N2351, these functions can be implemented non-intrusively using the alias constructor. However the aliasing constructor is only available @@ -627,13 +610,13 @@ is called. Users should not try to use this. As well as the extra constructors, this implementation also needs some members of _Sp_counted_deleter to be protected where they could otherwise be private. - </p></dd></dl></div></div></div><div class="section" title="Use"><div class="titlepage"><div><div><h4 class="title"><a id="shared_ptr.using"/>Use</h4></div></div></div><div class="section" title="Examples"><div class="titlepage"><div><div><h5 class="title"><a id="id556361"/>Examples</h5></div></div></div><p> + </p></dd></dl></div></div></div><div class="section" title="Use"><div class="titlepage"><div><div><h4 class="title"><a id="shared_ptr.using"/>Use</h4></div></div></div><div class="section" title="Examples"><div class="titlepage"><div><div><h5 class="title"><a id="id607385"/>Examples</h5></div></div></div><p> Examples of use can be found in the testsuite, under <code class="filename">testsuite/tr1/2_general_utilities/shared_ptr</code>, <code class="filename">testsuite/20_util/shared_ptr</code> and <code class="filename">testsuite/20_util/weak_ptr</code>. - </p></div><div class="section" title="Unresolved Issues"><div class="titlepage"><div><div><h5 class="title"><a id="id556391"/>Unresolved Issues</h5></div></div></div><p> + </p></div><div class="section" title="Unresolved Issues"><div class="titlepage"><div><div><h5 class="title"><a id="id607415"/>Unresolved Issues</h5></div></div></div><p> The <span class="emphasis"><em><code class="classname">shared_ptr</code> atomic access</em></span> clause in the C++11 standard is not implemented in GCC. </p><p> @@ -674,25 +657,25 @@ be private. code to work with, Peter Dimov in particular for his help and invaluable advice on thread safety. Phillip Jordan and Paolo Carlini for the lock policy implementation. - </p></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="shared_ptr.biblio"/>Bibliography</h4></div></div></div><div class="biblioentry" title="Improving shared_ptr for C++0x, Revision 2"><a id="id556484"/><p><span class="title"><em> + </p></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="shared_ptr.biblio"/>Bibliography</h4></div></div></div><div class="biblioentry" title="Improving shared_ptr for C++0x, Revision 2"><a id="id607509"/><p><span class="title"><em> <a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2351.htm"> Improving shared_ptr for C++0x, Revision 2 </a> </em>. </span><span class="subtitle"> N2351 - . </span></p></div><div class="biblioentry" title="C++ Standard Library Active Issues List"><a id="id556504"/><p><span class="title"><em> + . </span></p></div><div class="biblioentry" title="C++ Standard Library Active Issues List"><a id="id607528"/><p><span class="title"><em> <a class="link" href="http://open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2456.html"> C++ Standard Library Active Issues List </a> </em>. </span><span class="subtitle"> N2456 - . </span></p></div><div class="biblioentry" title="Working Draft, Standard for Programming Language C++"><a id="id556523"/><p><span class="title"><em> + . </span></p></div><div class="biblioentry" title="Working Draft, Standard for Programming Language C++"><a id="id607547"/><p><span class="title"><em> <a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2461.pdf"> Working Draft, Standard for Programming Language C++ </a> </em>. </span><span class="subtitle"> N2461 - . </span></p></div><div class="biblioentry" title="Boost C++ Libraries documentation, shared_ptr"><a id="id556542"/><p><span class="title"><em> + . </span></p></div><div class="biblioentry" title="Boost C++ Libraries documentation, shared_ptr"><a id="id607566"/><p><span class="title"><em> <a class="link" href="http://boost.org/libs/smart_ptr/shared_ptr.htm"> Boost C++ Libraries documentation, shared_ptr </a> diff --git a/libstdc++-v3/doc/html/manual/numerics.html b/libstdc++-v3/doc/html/manual/numerics.html index 93088e5d9ac..b2054d2c97c 100644 --- a/libstdc++-v3/doc/html/manual/numerics.html +++ b/libstdc++-v3/doc/html/manual/numerics.html @@ -7,7 +7,7 @@ Standard Contents </th><td align="right"> <a accesskey="n" href="generalized_numeric_operations.html">Next</a></td></tr></table><hr/></div><div class="chapter" title="Chapter 12. Numerics"><div class="titlepage"><div><div><h2 class="title"><a id="std.numerics"/>Chapter 12. Numerics - <a id="id561638" class="indexterm"/> + <a id="id612667" class="indexterm"/> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="numerics.html#std.numerics.complex">Complex</a></span></dt><dd><dl><dt><span class="section"><a href="numerics.html#numerics.complex.processing">complex Processing</a></span></dt></dl></dd><dt><span class="section"><a href="generalized_numeric_operations.html">Generalized Operations</a></span></dt><dt><span class="section"><a href="numerics_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="numerics_and_c.html#numerics.c.array">Numerics vs. Arrays</a></span></dt><dt><span class="section"><a href="numerics_and_c.html#numerics.c.c99">C99</a></span></dt></dl></dd></dl></div><div class="section" title="Complex"><div class="titlepage"><div><div><h2 class="title"><a id="std.numerics.complex"/>Complex</h2></div></div></div><p> </p><div class="section" title="complex Processing"><div class="titlepage"><div><div><h3 class="title"><a id="numerics.complex.processing"/>complex Processing</h3></div></div></div><p> </p><p>Using <code class="code">complex<></code> becomes even more comple- er, sorry, diff --git a/libstdc++-v3/doc/html/manual/pairs.html b/libstdc++-v3/doc/html/manual/pairs.html index 472337b36bf..e5c0263ee3e 100644 --- a/libstdc++-v3/doc/html/manual/pairs.html +++ b/libstdc++-v3/doc/html/manual/pairs.html @@ -14,8 +14,7 @@ pair (const T1& x, const T2& y); </pre><p>does what you think it does, <code class="code">first</code> getting <code class="code">x</code> and <code class="code">second</code> getting <code class="code">y</code>. - </p><p>There is a copy constructor, but it requires that your compiler - handle member function templates: + </p><p>There is a constructor template for copying pairs of other types: </p><pre class="programlisting"> template <class U, class V> pair (const pair<U,V>& p); </pre><p>The compiler will convert as necessary from U to T1 and from diff --git a/libstdc++-v3/doc/html/manual/parallel_mode.html b/libstdc++-v3/doc/html/manual/parallel_mode.html index 3408e18e4fa..5b175f10074 100644 --- a/libstdc++-v3/doc/html/manual/parallel_mode.html +++ b/libstdc++-v3/doc/html/manual/parallel_mode.html @@ -13,11 +13,11 @@ explicit source declaration or by compiling existing sources with a specific compiler flag. </p><div class="section" title="Intro"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.parallel_mode.intro"/>Intro</h2></div></div></div><p>The following library components in the include <code class="filename">numeric</code> are included in the parallel mode:</p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p><code class="function">std::accumulate</code></p></li><li class="listitem"><p><code class="function">std::adjacent_difference</code></p></li><li class="listitem"><p><code class="function">std::inner_product</code></p></li><li class="listitem"><p><code class="function">std::partial_sum</code></p></li></ul></div><p>The following library components in the include -<code class="filename">algorithm</code> are included in the parallel mode:</p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p><code class="function">std::adjacent_find</code></p></li><li class="listitem"><p><code class="function">std::count</code></p></li><li class="listitem"><p><code class="function">std::count_if</code></p></li><li class="listitem"><p><code class="function">std::equal</code></p></li><li class="listitem"><p><code class="function">std::find</code></p></li><li class="listitem"><p><code class="function">std::find_if</code></p></li><li class="listitem"><p><code class="function">std::find_first_of</code></p></li><li class="listitem"><p><code class="function">std::for_each</code></p></li><li class="listitem"><p><code class="function">std::generate</code></p></li><li class="listitem"><p><code class="function">std::generate_n</code></p></li><li class="listitem"><p><code class="function">std::lexicographical_compare</code></p></li><li class="listitem"><p><code class="function">std::mismatch</code></p></li><li class="listitem"><p><code class="function">std::search</code></p></li><li class="listitem"><p><code class="function">std::search_n</code></p></li><li class="listitem"><p><code class="function">std::transform</code></p></li><li class="listitem"><p><code class="function">std::replace</code></p></li><li class="listitem"><p><code class="function">std::replace_if</code></p></li><li class="listitem"><p><code class="function">std::max_element</code></p></li><li class="listitem"><p><code class="function">std::merge</code></p></li><li class="listitem"><p><code class="function">std::min_element</code></p></li><li class="listitem"><p><code class="function">std::nth_element</code></p></li><li class="listitem"><p><code class="function">std::partial_sort</code></p></li><li class="listitem"><p><code class="function">std::partition</code></p></li><li class="listitem"><p><code class="function">std::random_shuffle</code></p></li><li class="listitem"><p><code class="function">std::set_union</code></p></li><li class="listitem"><p><code class="function">std::set_intersection</code></p></li><li class="listitem"><p><code class="function">std::set_symmetric_difference</code></p></li><li class="listitem"><p><code class="function">std::set_difference</code></p></li><li class="listitem"><p><code class="function">std::sort</code></p></li><li class="listitem"><p><code class="function">std::stable_sort</code></p></li><li class="listitem"><p><code class="function">std::unique_copy</code></p></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h2 class="title"><a id="parallel_mode.biblio"/>Bibliography</h2></div></div></div><div class="biblioentry"><a id="id567562"/><p><span class="citetitle"><em class="citetitle"> +<code class="filename">algorithm</code> are included in the parallel mode:</p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p><code class="function">std::adjacent_find</code></p></li><li class="listitem"><p><code class="function">std::count</code></p></li><li class="listitem"><p><code class="function">std::count_if</code></p></li><li class="listitem"><p><code class="function">std::equal</code></p></li><li class="listitem"><p><code class="function">std::find</code></p></li><li class="listitem"><p><code class="function">std::find_if</code></p></li><li class="listitem"><p><code class="function">std::find_first_of</code></p></li><li class="listitem"><p><code class="function">std::for_each</code></p></li><li class="listitem"><p><code class="function">std::generate</code></p></li><li class="listitem"><p><code class="function">std::generate_n</code></p></li><li class="listitem"><p><code class="function">std::lexicographical_compare</code></p></li><li class="listitem"><p><code class="function">std::mismatch</code></p></li><li class="listitem"><p><code class="function">std::search</code></p></li><li class="listitem"><p><code class="function">std::search_n</code></p></li><li class="listitem"><p><code class="function">std::transform</code></p></li><li class="listitem"><p><code class="function">std::replace</code></p></li><li class="listitem"><p><code class="function">std::replace_if</code></p></li><li class="listitem"><p><code class="function">std::max_element</code></p></li><li class="listitem"><p><code class="function">std::merge</code></p></li><li class="listitem"><p><code class="function">std::min_element</code></p></li><li class="listitem"><p><code class="function">std::nth_element</code></p></li><li class="listitem"><p><code class="function">std::partial_sort</code></p></li><li class="listitem"><p><code class="function">std::partition</code></p></li><li class="listitem"><p><code class="function">std::random_shuffle</code></p></li><li class="listitem"><p><code class="function">std::set_union</code></p></li><li class="listitem"><p><code class="function">std::set_intersection</code></p></li><li class="listitem"><p><code class="function">std::set_symmetric_difference</code></p></li><li class="listitem"><p><code class="function">std::set_difference</code></p></li><li class="listitem"><p><code class="function">std::sort</code></p></li><li class="listitem"><p><code class="function">std::stable_sort</code></p></li><li class="listitem"><p><code class="function">std::unique_copy</code></p></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h2 class="title"><a id="parallel_mode.biblio"/>Bibliography</h2></div></div></div><div class="biblioentry"><a id="id618592"/><p><span class="citetitle"><em class="citetitle"> Parallelization of Bulk Operations for STL Dictionaries </em>. </span><span class="author"><span class="firstname">Johannes</span> <span class="surname">Singler</span>. </span><span class="author"><span class="firstname">Leonor</span> <span class="surname">Frias</span>. </span><span class="copyright">Copyright © 2007 . </span><span class="publisher"><span class="publishername"> Workshop on Highly Parallel Processing on a Chip (HPPC) 2007. (LNCS) - . </span></span></p></div><div class="biblioentry"><a id="id567604"/><p><span class="citetitle"><em class="citetitle"> + . </span></span></p></div><div class="biblioentry"><a id="id618634"/><p><span class="citetitle"><em class="citetitle"> The Multi-Core Standard Template Library </em>. </span><span class="author"><span class="firstname">Johannes</span> <span class="surname">Singler</span>. </span><span class="author"><span class="firstname">Peter</span> <span class="surname">Sanders</span>. </span><span class="author"><span class="firstname">Felix</span> <span class="surname">Putze</span>. </span><span class="copyright">Copyright © 2007 . </span><span class="publisher"><span class="publishername"> Euro-Par 2007: Parallel Processing. (LNCS 4641) diff --git a/libstdc++-v3/doc/html/manual/policy_data_structures.html b/libstdc++-v3/doc/html/manual/policy_data_structures.html index e3d2a5d169d..eff28f2999f 100644 --- a/libstdc++-v3/doc/html/manual/policy_data_structures.html +++ b/libstdc++-v3/doc/html/manual/policy_data_structures.html @@ -251,7 +251,7 @@ these invariants, one must supply some policy that is aware of these changes. Without this, it would be better to use a linked list (in itself very efficient for these purposes). - </p></li></ol></div><div class="figure"><a id="id573272"/><p class="title"><strong>Figure 22.1. Node Invariants</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_node_invariants.png" style="text-align: middle" alt="Node Invariants"/></div></div></div><br class="figure-break"/></div><div class="section" title="Underlying Data Structures"><div class="titlepage"><div><div><h5 class="title"><a id="motivation.associative.underlying"/>Underlying Data Structures</h5></div></div></div><p> + </p></li></ol></div><div class="figure"><a id="id624302"/><p class="title"><strong>Figure 22.1. Node Invariants</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_node_invariants.png" style="text-align: middle" alt="Node Invariants"/></div></div></div><br class="figure-break"/></div><div class="section" title="Underlying Data Structures"><div class="titlepage"><div><div><h5 class="title"><a id="motivation.associative.underlying"/>Underlying Data Structures</h5></div></div></div><p> The standard C++ library contains associative containers based on red-black trees and collision-chaining hash tables. These are very useful, but they are not ideal for all types of @@ -259,7 +259,7 @@ </p><p> The figure below shows the different underlying data structures currently supported in this library. - </p><div class="figure"><a id="id573328"/><p class="title"><strong>Figure 22.2. Underlying Associative Data Structures</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_different_underlying_dss_1.png" style="text-align: middle" alt="Underlying Associative Data Structures"/></div></div></div><br class="figure-break"/><p> + </p><div class="figure"><a id="id624358"/><p class="title"><strong>Figure 22.2. Underlying Associative Data Structures</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_different_underlying_dss_1.png" style="text-align: middle" alt="Underlying Associative Data Structures"/></div></div></div><br class="figure-break"/><p> A shows a collision-chaining hash-table, B shows a probing hash-table, C shows a red-black tree, D shows a splay tree, E shows a tree based on an ordered vector(implicit in the order of the @@ -378,7 +378,7 @@ no guarantee that the elements traversed will coincide with the <span class="emphasis"><em>logical</em></span> elements between 1 and 5, as in label B. - </p><div class="figure"><a id="id573591"/><p class="title"><strong>Figure 22.3. Range Iteration in Different Data Structures</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_point_iterators_range_ops_1.png" style="text-align: middle" alt="Node Invariants"/></div></div></div><br class="figure-break"/><p> + </p><div class="figure"><a id="id624621"/><p class="title"><strong>Figure 22.3. Range Iteration in Different Data Structures</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_point_iterators_range_ops_1.png" style="text-align: middle" alt="Node Invariants"/></div></div></div><br class="figure-break"/><p> In our opinion, this problem is not caused just because red-black trees are order preserving while collision-chaining hash tables are (generally) not - it @@ -429,7 +429,7 @@ list, as in the graphic below, label B. Here the iterators are as light as can be, but the hash-table's operations are more complicated. - </p><div class="figure"><a id="id573715"/><p class="title"><strong>Figure 22.4. Point Iteration in Hash Data Structures</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_point_iterators_range_ops_2.png" style="text-align: middle" alt="Point Iteration in Hash Data Structures"/></div></div></div><br class="figure-break"/><p> + </p><div class="figure"><a id="id624745"/><p class="title"><strong>Figure 22.4. Point Iteration in Hash Data Structures</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_point_iterators_range_ops_2.png" style="text-align: middle" alt="Point Iteration in Hash Data Structures"/></div></div></div><br class="figure-break"/><p> It should be noted that containers based on collision-chaining hash-tables are not the only ones with this type of behavior; many other self-organizing data structures display it as well. @@ -445,7 +445,7 @@ container. The graphic below shows three cases: A1 and A2 show a red-black tree; B1 and B2 show a probing hash-table; C1 and C2 show a collision-chaining hash table. - </p><div class="figure"><a id="id573793"/><p class="title"><strong>Figure 22.5. Effect of erase in different underlying data structures</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_invalidation_guarantee_erase.png" style="text-align: middle" alt="Effect of erase in different underlying data structures"/></div></div></div><br class="figure-break"/><div class="orderedlist"><ol class="orderedlist"><li class="listitem"><p> + </p><div class="figure"><a id="id624822"/><p class="title"><strong>Figure 22.5. Effect of erase in different underlying data structures</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_invalidation_guarantee_erase.png" style="text-align: middle" alt="Effect of erase in different underlying data structures"/></div></div></div><br class="figure-break"/><div class="orderedlist"><ol class="orderedlist"><li class="listitem"><p> Erasing 5 from A1 yields A2. Clearly, an iterator to 3 can be de-referenced and incremented. The sequence of iterators changed, but in a way that is well-defined by the interface. @@ -681,7 +681,7 @@ typically less structured than an associative container's tree; the third simply uses an associative container. These are shown in the figure below with labels A1 and A2, B, and C. - </p><div class="figure"><a id="id574356"/><p class="title"><strong>Figure 22.6. Underlying Priority Queue Data Structures</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_different_underlying_dss_2.png" style="text-align: middle" alt="Underlying Priority Queue Data Structures"/></div></div></div><br class="figure-break"/><p> + </p><div class="figure"><a id="id625386"/><p class="title"><strong>Figure 22.6. Underlying Priority Queue Data Structures</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_different_underlying_dss_2.png" style="text-align: middle" alt="Underlying Priority Queue Data Structures"/></div></div></div><br class="figure-break"/><p> No single implementation can completely replace any of the others. Some have better <code class="function">push</code> and <code class="function">pop</code> amortized performance, some have diff --git a/libstdc++-v3/doc/html/manual/policy_data_structures_design.html b/libstdc++-v3/doc/html/manual/policy_data_structures_design.html index 25808634a06..2e7b1263937 100644 --- a/libstdc++-v3/doc/html/manual/policy_data_structures_design.html +++ b/libstdc++-v3/doc/html/manual/policy_data_structures_design.html @@ -171,7 +171,7 @@ naturally; collision-chaining hash tables (label B) store equivalent-key values in the same bucket, the bucket can be arranged so that equivalent-key values are consecutive. - </p><div class="figure"><a id="id576499"/><p class="title"><strong>Figure 22.8. Non-unique Mapping Standard Containers</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_embedded_lists_1.png" style="text-align: middle" alt="Non-unique Mapping Standard Containers"/></div></div></div><br class="figure-break"/><p> + </p><div class="figure"><a id="id627529"/><p class="title"><strong>Figure 22.8. Non-unique Mapping Standard Containers</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_embedded_lists_1.png" style="text-align: middle" alt="Non-unique Mapping Standard Containers"/></div></div></div><br class="figure-break"/><p> Put differently, the standards' non-unique mapping associative-containers are associative containers that map primary keys to linked lists that are embedded into the @@ -253,7 +253,7 @@ first graphic above. Labels A and B, respectively. Each shaded box represents some size-type or secondary associative-container. - </p><div class="figure"><a id="id576695"/><p class="title"><strong>Figure 22.10. Non-unique Mapping Containers</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_embedded_lists_3.png" style="text-align: middle" alt="Non-unique Mapping Containers"/></div></div></div><br class="figure-break"/><p> + </p><div class="figure"><a id="id627725"/><p class="title"><strong>Figure 22.10. Non-unique Mapping Containers</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_embedded_lists_3.png" style="text-align: middle" alt="Non-unique Mapping Containers"/></div></div></div><br class="figure-break"/><p> In the first example above, then, one would use an associative container mapping each user to an associative container which maps each application id to a start time (see @@ -306,7 +306,7 @@ shows invariants for order-preserving containers: point-type iterators are synonymous with range-type iterators. Orthogonally, <span class="emphasis"><em>C</em></span>shows invariants for "set" - containers: iterators are synonymous with const iterators.</p><div class="figure"><a id="id576861"/><p class="title"><strong>Figure 22.11. Point Iterator Hierarchy</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_point_iterator_hierarchy.png" style="text-align: middle" alt="Point Iterator Hierarchy"/></div></div></div><br class="figure-break"/><p>Note that point-type iterators in self-organizing containers + containers: iterators are synonymous with const iterators.</p><div class="figure"><a id="id627891"/><p class="title"><strong>Figure 22.11. Point Iterator Hierarchy</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_point_iterator_hierarchy.png" style="text-align: middle" alt="Point Iterator Hierarchy"/></div></div></div><br class="figure-break"/><p>Note that point-type iterators in self-organizing containers (hash-based associative containers) lack movement operators, such as <code class="literal">operator++</code> - in fact, this is the reason why this library differentiates from the standard C++ librarys @@ -345,7 +345,7 @@ to the question of whether point-type iterators and range-type iterators are valid. The graphic below shows tags corresponding to different types of invalidation guarantees. - </p><div class="figure"><a id="id576972"/><p class="title"><strong>Figure 22.12. Invalidation Guarantee Tags Hierarchy</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_invalidation_tag_hierarchy.png" style="text-align: middle" alt="Invalidation Guarantee Tags Hierarchy"/></div></div></div><br class="figure-break"/><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p> + </p><div class="figure"><a id="id628002"/><p class="title"><strong>Figure 22.12. Invalidation Guarantee Tags Hierarchy</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_invalidation_tag_hierarchy.png" style="text-align: middle" alt="Invalidation Guarantee Tags Hierarchy"/></div></div></div><br class="figure-break"/><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p> <code class="classname">basic_invalidation_guarantee</code> corresponds to a basic guarantee that a point-type iterator, a found pointer, or a found reference, remains valid as long @@ -429,7 +429,7 @@ </p><p> This library contains a container tag hierarchy corresponding to the diagram below. - </p><div class="figure"><a id="id577224"/><p class="title"><strong>Figure 22.13. Container Tag Hierarchy</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_container_tag_hierarchy.png" style="text-align: middle" alt="Container Tag Hierarchy"/></div></div></div><br class="figure-break"/><p> + </p><div class="figure"><a id="id628254"/><p class="title"><strong>Figure 22.13. Container Tag Hierarchy</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_container_tag_hierarchy.png" style="text-align: middle" alt="Container Tag Hierarchy"/></div></div></div><br class="figure-break"/><p> Given any container <span class="type">Cntnr</span>, the tag of the underlying data structure can be found via <code class="literal">typename Cntnr::container_category</code>. @@ -488,7 +488,7 @@ collision-chaining container, except for the following.</p><div class="orderedlist"><ol class="orderedlist"><li class="listitem"><p><code class="classname">Comb_Probe_Fn</code> describes how to transform a probe sequence into a sequence of positions within the table.</p></li><li class="listitem"><p><code class="classname">Probe_Fn</code> describes a probe sequence policy.</p></li></ol></div><p>Some of the default template values depend on the values of other parameters, and are explained below.</p></div><div class="section" title="Details"><div class="titlepage"><div><div><h5 class="title"><a id="container.hash.details"/>Details</h5></div></div></div><div class="section" title="Hash Policies"><div class="titlepage"><div><div><h6 class="title"><a id="container.hash.details.hash_policies"/>Hash Policies</h6></div></div></div><div class="section" title="General"><div class="titlepage"><div><div><h6 class="title"><a id="details.hash_policies.general"/>General</h6></div></div></div><p>Following is an explanation of some functions which hashing - involves. The graphic below illustrates the discussion.</p><div class="figure"><a id="id577556"/><p class="title"><strong>Figure 22.14. Hash functions, ranged-hash functions, and + involves. The graphic below illustrates the discussion.</p><div class="figure"><a id="id628586"/><p class="title"><strong>Figure 22.14. Hash functions, ranged-hash functions, and range-hashing functions</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_hash_ranged_hash_range_hashing_fns.png" style="text-align: middle" alt="Hash functions, ranged-hash functions, and range-hashing functions"/></div></div></div><br class="figure-break"/><p>Let U be a domain (e.g., the integers, or the strings of 3 characters). A hash-table algorithm needs to map elements of U "uniformly" into the range [0,..., m - @@ -505,7 +505,7 @@ Z<sub>+</sub>,</p><p>which maps a non-negative hash value, and a non-negative range upper-bound into a non-negative integral in the range between 0 (inclusive) and the range upper bound (exclusive), - i.e., for any r in Z<sub>+</sub>,</p><p>0 ≤ g(r, m) ≤ m - 1</p><p>The resulting ranged-hash function, is</p><div class="equation"><a id="id577671"/><p class="title"><strong>Equation 22.1. Ranged Hash Function</strong></p><div class="equation-contents"><span class="mathphrase"> + i.e., for any r in Z<sub>+</sub>,</p><p>0 ≤ g(r, m) ≤ m - 1</p><p>The resulting ranged-hash function, is</p><div class="equation"><a id="id628701"/><p class="title"><strong>Equation 22.1. Ranged Hash Function</strong></p><div class="equation-contents"><span class="mathphrase"> f(u , m) = g(h(u), m) </span></div></div><br class="equation-break"/><p>From the above, it is obvious that given g and h, f can always be composed (however the converse @@ -525,7 +525,7 @@ transforming the sequence of hash values into a sequence of positions.</p></div><div class="section" title="Range Hashing"><div class="titlepage"><div><div><h6 class="title"><a id="details.hash_policies.range"/>Range Hashing</h6></div></div></div><p>Some common choices for range-hashing functions are the division, multiplication, and middle-square methods (<a class="xref" href="policy_data_structures.html#biblio.knuth98sorting" title="The Art of Computer Programming - Sorting and Searching">[biblio.knuth98sorting]</a>), defined - as</p><div class="equation"><a id="id577720"/><p class="title"><strong>Equation 22.2. Range-Hashing, Division Method</strong></p><div class="equation-contents"><span class="mathphrase"> + as</p><div class="equation"><a id="id628750"/><p class="title"><strong>Equation 22.2. Range-Hashing, Division Method</strong></p><div class="equation-contents"><span class="mathphrase"> g(r, m) = r mod m </span></div></div><br class="equation-break"/><p>g(r, m) = ⌈ u/v ( a r mod v ) ⌉</p><p>and</p><p>g(r, m) = ⌈ u/v ( r<sup>2</sup> mod v ) ⌉</p><p>respectively, for some positive integrals u and v (typically powers of 2), and some a. Each of @@ -536,9 +536,9 @@ implement using the low level % (modulo) operation (for any m), or the low level & (bit-mask) operation (for the case where - m is a power of 2), i.e.,</p><div class="equation"><a id="id577758"/><p class="title"><strong>Equation 22.3. Division via Prime Modulo</strong></p><div class="equation-contents"><span class="mathphrase"> + m is a power of 2), i.e.,</p><div class="equation"><a id="id628788"/><p class="title"><strong>Equation 22.3. Division via Prime Modulo</strong></p><div class="equation-contents"><span class="mathphrase"> g(r, m) = r % m - </span></div></div><br class="equation-break"/><p>and</p><div class="equation"><a id="id577773"/><p class="title"><strong>Equation 22.4. Division via Bit Mask</strong></p><div class="equation-contents"><span class="mathphrase"> + </span></div></div><br class="equation-break"/><p>and</p><div class="equation"><a id="id628803"/><p class="title"><strong>Equation 22.4. Division via Bit Mask</strong></p><div class="equation-contents"><span class="mathphrase"> g(r, m) = r & m - 1, (with m = 2<sup>k</sup> for some k) </span></div></div><br class="equation-break"/><p>respectively.</p><p>The % (modulo) implementation has the advantage that for @@ -564,7 +564,7 @@ s = [ s<sub>0</sub>,..., s<sub>t - 1</sub>] </p><p>be a string of t characters, each of which is from domain S. Consider the following ranged-hash - function:</p><div class="equation"><a id="id577853"/><p class="title"><strong>Equation 22.5. + function:</p><div class="equation"><a id="id628883"/><p class="title"><strong>Equation 22.5. A Standard String Hash Function </strong></p><div class="equation-contents"><span class="mathphrase"> f<sub>1</sub>(s, m) = ∑ <sub>i = @@ -576,7 +576,7 @@ of a long DNA sequence (and so S = {'A', 'C', 'G', 'T'}). In this case, scanning the entire string might be prohibitively expensive. A possible alternative might be to use - only the first k characters of the string, where</p><p>|S|<sup>k</sup> ≥ m ,</p><p>i.e., using the hash function</p><div class="equation"><a id="id577905"/><p class="title"><strong>Equation 22.6. + only the first k characters of the string, where</p><p>|S|<sup>k</sup> ≥ m ,</p><p>i.e., using the hash function</p><div class="equation"><a id="id628934"/><p class="title"><strong>Equation 22.6. Only k String DNA Hash </strong></p><div class="equation-contents"><span class="mathphrase"> f<sub>2</sub>(s, m) = ∑ <sub>i @@ -607,12 +607,12 @@ the container transforms the key into a non-negative integral using the hash functor (points B and C), and transforms the result into a position using the combining functor (points D - and E).</p><div class="figure"><a id="id578093"/><p class="title"><strong>Figure 22.15. Insert hash sequence diagram</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_hash_range_hashing_seq_diagram.png" style="text-align: middle" alt="Insert hash sequence diagram"/></div></div></div><br class="figure-break"/><p>If <code class="classname">cc_hash_table</code>'s + and E).</p><div class="figure"><a id="id629123"/><p class="title"><strong>Figure 22.15. Insert hash sequence diagram</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_hash_range_hashing_seq_diagram.png" style="text-align: middle" alt="Insert hash sequence diagram"/></div></div></div><br class="figure-break"/><p>If <code class="classname">cc_hash_table</code>'s hash-functor, <code class="classname">Hash_Fn</code> is instantiated by <code class="classname">null_type</code> , then <code class="classname">Comb_Hash_Fn</code> is taken to be a ranged-hash function. The graphic below shows an <code class="function">insert</code> sequence diagram. The user inserts an element (point A), the container transforms the key into a position using the combining functor - (points B and C).</p><div class="figure"><a id="id578152"/><p class="title"><strong>Figure 22.16. Insert hash sequence diagram with a null policy</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_hash_range_hashing_seq_diagram2.png" style="text-align: middle" alt="Insert hash sequence diagram with a null policy"/></div></div></div><br class="figure-break"/></div><div class="section" title="Probing tables"><div class="titlepage"><div><div><h6 class="title"><a id="hash_policies.implementation.probe"/> + (points B and C).</p><div class="figure"><a id="id629182"/><p class="title"><strong>Figure 22.16. Insert hash sequence diagram with a null policy</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_hash_range_hashing_seq_diagram2.png" style="text-align: middle" alt="Insert hash sequence diagram with a null policy"/></div></div></div><br class="figure-break"/></div><div class="section" title="Probing tables"><div class="titlepage"><div><div><h6 class="title"><a id="hash_policies.implementation.probe"/> Probing tables </h6></div></div></div><p><code class="classname">gp_hash_table</code> is parametrized by <code class="classname">Hash_Fn</code>, <code class="classname">Probe_Fn</code>, @@ -635,7 +635,7 @@ a linear probe and a quadratic probe function, respectively.</p></li></ol></div><p> The graphic below shows the relationships. - </p><div class="figure"><a id="id578292"/><p class="title"><strong>Figure 22.17. Hash policy class diagram</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_hash_policy_cd.png" style="text-align: middle" alt="Hash policy class diagram"/></div></div></div><br class="figure-break"/></div></div></div><div class="section" title="Resize Policies"><div class="titlepage"><div><div><h6 class="title"><a id="container.hash.details.resize_policies"/>Resize Policies</h6></div></div></div><div class="section" title="General"><div class="titlepage"><div><div><h6 class="title"><a id="resize_policies.general"/>General</h6></div></div></div><p>Hash-tables, as opposed to trees, do not naturally grow or + </p><div class="figure"><a id="id629321"/><p class="title"><strong>Figure 22.17. Hash policy class diagram</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_hash_policy_cd.png" style="text-align: middle" alt="Hash policy class diagram"/></div></div></div><br class="figure-break"/></div></div></div><div class="section" title="Resize Policies"><div class="titlepage"><div><div><h6 class="title"><a id="container.hash.details.resize_policies"/>Resize Policies</h6></div></div></div><div class="section" title="General"><div class="titlepage"><div><div><h6 class="title"><a id="resize_policies.general"/>General</h6></div></div></div><p>Hash-tables, as opposed to trees, do not naturally grow or shrink. It is necessary to specify policies to determine how and when a hash table should change its size. Usually, resize policies can be decomposed into orthogonal policies:</p><div class="orderedlist"><ol class="orderedlist"><li class="listitem"><p>A size policy indicating how a hash table @@ -668,10 +668,10 @@ and some load factor be denoted by Α. We would like to calculate the minimal length of k, such that if there were Α m elements in the hash table, a probe sequence of length k would - be found with probability at most 1/m.</p><div class="figure"><a id="id578450"/><p class="title"><strong>Figure 22.18. Balls and bins</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_balls_and_bins.png" style="text-align: middle" alt="Balls and bins"/></div></div></div><br class="figure-break"/><p>Denote the probability that a probe sequence of length + be found with probability at most 1/m.</p><div class="figure"><a id="id629480"/><p class="title"><strong>Figure 22.18. Balls and bins</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_balls_and_bins.png" style="text-align: middle" alt="Balls and bins"/></div></div></div><br class="figure-break"/><p>Denote the probability that a probe sequence of length k appears in bin i by p<sub>i</sub>, the length of the probe sequence of bin i by - l<sub>i</sub>, and assume uniform distribution. Then</p><div class="equation"><a id="id578496"/><p class="title"><strong>Equation 22.7. + l<sub>i</sub>, and assume uniform distribution. Then</p><div class="equation"><a id="id629526"/><p class="title"><strong>Equation 22.7. Probability of Probe Sequence of Length k </strong></p><div class="equation-contents"><span class="mathphrase"> p<sub>1</sub> = @@ -685,7 +685,7 @@ l<sub>i</sub> are negatively-dependent (<a class="xref" href="policy_data_structures.html#biblio.dubhashi98neg" title="Balls and bins: A study in negative dependence">[biblio.dubhashi98neg]</a>) . Let - I(.) denote the indicator function. Then</p><div class="equation"><a id="id578552"/><p class="title"><strong>Equation 22.8. + I(.) denote the indicator function. Then</p><div class="equation"><a id="id629582"/><p class="title"><strong>Equation 22.8. Probability Probe Sequence in Some Bin </strong></p><div class="equation-contents"><span class="mathphrase"> P( exists<sub>i</sub> l<sub>i</sub> ≥ k ) = @@ -724,7 +724,7 @@ a resize is needed, and if so, what is the new size (points D to G); following the resize, it notifies the policy that a resize has completed (point H); finally, the element is - inserted, and the policy notified (point I).</p><div class="figure"><a id="id578707"/><p class="title"><strong>Figure 22.19. Insert resize sequence diagram</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_insert_resize_sequence_diagram1.png" style="text-align: middle" alt="Insert resize sequence diagram"/></div></div></div><br class="figure-break"/><p>In practice, a resize policy can be usually orthogonally + inserted, and the policy notified (point I).</p><div class="figure"><a id="id629737"/><p class="title"><strong>Figure 22.19. Insert resize sequence diagram</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_insert_resize_sequence_diagram1.png" style="text-align: middle" alt="Insert resize sequence diagram"/></div></div></div><br class="figure-break"/><p>In practice, a resize policy can be usually orthogonally decomposed to a size policy and a trigger policy. Consequently, the library contains a single class for instantiating a resize policy: <code class="classname">hash_standard_resize_policy</code> @@ -733,8 +733,8 @@ both, and acts as a standard delegate (<a class="xref" href="policy_data_structures.html#biblio.gof" title="Design Patterns - Elements of Reusable Object-Oriented Software">[biblio.gof]</a>) to these policies.</p><p>The two graphics immediately below show sequence diagrams illustrating the interaction between the standard resize policy - and its trigger and size policies, respectively.</p><div class="figure"><a id="id578772"/><p class="title"><strong>Figure 22.20. Standard resize policy trigger sequence - diagram</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_insert_resize_sequence_diagram2.png" style="text-align: middle" alt="Standard resize policy trigger sequence diagram"/></div></div></div><br class="figure-break"/><div class="figure"><a id="id578806"/><p class="title"><strong>Figure 22.21. Standard resize policy size sequence + and its trigger and size policies, respectively.</p><div class="figure"><a id="id629802"/><p class="title"><strong>Figure 22.20. Standard resize policy trigger sequence + diagram</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_insert_resize_sequence_diagram2.png" style="text-align: middle" alt="Standard resize policy trigger sequence diagram"/></div></div></div><br class="figure-break"/><div class="figure"><a id="id629836"/><p class="title"><strong>Figure 22.21. Standard resize policy size sequence diagram</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_insert_resize_sequence_diagram3.png" style="text-align: middle" alt="Standard resize policy size sequence diagram"/></div></div></div><br class="figure-break"/></div><div class="section" title="Predefined Policies"><div class="titlepage"><div><div><h6 class="title"><a id="resize_policies.impl.predefined"/>Predefined Policies</h6></div></div></div><p>The library includes the following instantiations of size and trigger policies:</p><div class="orderedlist"><ol class="orderedlist"><li class="listitem"><p><code class="classname">hash_load_check_resize_trigger</code> implements a load check trigger policy.</p></li><li class="listitem"><p><code class="classname">cc_hash_max_collision_check_resize_trigger</code> @@ -877,7 +877,7 @@ each node, and maintains node invariants (see <a class="xref" href="policy_data_structures.html#biblio.clrs2001" title="Introduction to Algorithms, 2nd edition">[biblio.clrs2001]</a>.) The first stores in each node the size of the sub-tree rooted at the node; the second stores at each node the maximal endpoint of the - intervals at the sub-tree rooted at the node.</p><div class="figure"><a id="id579456"/><p class="title"><strong>Figure 22.22. Tree node invariants</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_tree_node_invariants.png" style="text-align: middle" alt="Tree node invariants"/></div></div></div><br class="figure-break"/><p>Supporting such trees is difficult for a number of + intervals at the sub-tree rooted at the node.</p><div class="figure"><a id="id630486"/><p class="title"><strong>Figure 22.22. Tree node invariants</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_tree_node_invariants.png" style="text-align: middle" alt="Tree node invariants"/></div></div></div><br class="figure-break"/><p>Supporting such trees is difficult for a number of reasons:</p><div class="orderedlist"><ol class="orderedlist"><li class="listitem"><p>There must be a way to specify what a node's metadata should be (if any).</p></li><li class="listitem"><p>Various operations can invalidate node invariants. The graphic below shows how a right rotation, @@ -891,7 +891,7 @@ metadata.</p></li><li class="listitem"><p>It is not feasible to know in advance which methods trees can support. Besides the usual <code class="classname">find</code> method, the first tree can support a <code class="classname">find_by_order</code> method, while - the second can support an <code class="classname">overlaps</code> method.</p></li></ol></div><div class="figure"><a id="id579535"/><p class="title"><strong>Figure 22.23. Tree node invalidation</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_tree_node_invalidations.png" style="text-align: middle" alt="Tree node invalidation"/></div></div></div><br class="figure-break"/><p>These problems are solved by a combination of two means: + the second can support an <code class="classname">overlaps</code> method.</p></li></ol></div><div class="figure"><a id="id630565"/><p class="title"><strong>Figure 22.23. Tree node invalidation</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_tree_node_invalidations.png" style="text-align: middle" alt="Tree node invalidation"/></div></div></div><br class="figure-break"/><p>These problems are solved by a combination of two means: node iterators, and template-template node updater parameters.</p><div class="section" title="Node Iterators"><div class="titlepage"><div><div><h6 class="title"><a id="container.tree.node.iterators"/>Node Iterators</h6></div></div></div><p>Each tree-based container defines two additional iterator types, <code class="classname">const_node_iterator</code> @@ -920,7 +920,7 @@ <code class="classname">node_update</code> class, and publicly subclasses <code class="classname">node_update</code>. The graphic below shows this scheme, as well as some predefined policies (which are explained - below).</p><div class="figure"><a id="id579644"/><p class="title"><strong>Figure 22.24. A tree and its update policy</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_tree_node_updator_policy_cd.png" style="text-align: middle" alt="A tree and its update policy"/></div></div></div><br class="figure-break"/><p><code class="classname">node_update</code> (an instantiation of + below).</p><div class="figure"><a id="id630674"/><p class="title"><strong>Figure 22.24. A tree and its update policy</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_tree_node_updator_policy_cd.png" style="text-align: middle" alt="A tree and its update policy"/></div></div></div><br class="figure-break"/><p><code class="classname">node_update</code> (an instantiation of <code class="classname">Node_Update</code>) must define <code class="classname">metadata_type</code> as the type of metadata it requires. For order statistics, e.g., <code class="classname">metadata_type</code> might be <code class="classname">size_t</code>. @@ -939,7 +939,7 @@ <code class="classname">nd_it</code>. For example, say node x in the graphic below label A has an invalid invariant, but its' children, y and z have valid invariants. After the invocation, all three - nodes should have valid invariants, as in label B.</p><div class="figure"><a id="id579742"/><p class="title"><strong>Figure 22.25. Restoring node invariants</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_restoring_node_invariants.png" style="text-align: middle" alt="Restoring node invariants"/></div></div></div><br class="figure-break"/><p>When a tree operation might invalidate some node invariant, + nodes should have valid invariants, as in label B.</p><div class="figure"><a id="id630772"/><p class="title"><strong>Figure 22.25. Restoring node invariants</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_restoring_node_invariants.png" style="text-align: middle" alt="Restoring node invariants"/></div></div></div><br class="figure-break"/><p>When a tree operation might invalidate some node invariant, it invokes this method in its <code class="classname">node_update</code> base to restore the invariant. For example, the graphic below shows an <code class="function">insert</code> operation (point A); the tree performs some @@ -947,7 +947,7 @@ C, and D). (It is well known that any <code class="function">insert</code>, <code class="function">erase</code>, <code class="function">split</code> or <code class="function">join</code>, can restore all node invariants by a small number of node invariant updates (<a class="xref" href="policy_data_structures.html#biblio.clrs2001" title="Introduction to Algorithms, 2nd edition">[biblio.clrs2001]</a>) - .</p><div class="figure"><a id="id579810"/><p class="title"><strong>Figure 22.26. Insert update sequence</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_update_seq_diagram.png" style="text-align: middle" alt="Insert update sequence"/></div></div></div><br class="figure-break"/><p>To complete the description of the scheme, three questions + .</p><div class="figure"><a id="id630840"/><p class="title"><strong>Figure 22.26. Insert update sequence</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_update_seq_diagram.png" style="text-align: middle" alt="Insert update sequence"/></div></div></div><br class="figure-break"/><p>To complete the description of the scheme, three questions need to be answered:</p><div class="orderedlist"><ol class="orderedlist"><li class="listitem"><p>How can a tree which supports order statistics define a method such as <code class="classname">find_by_order</code>?</p></li><li class="listitem"><p>How can the node updater base access methods of the tree?</p></li><li class="listitem"><p>How can the following cyclic dependency be resolved? @@ -989,7 +989,7 @@ node's metadata (this is halting reducible). In the graphic below, assume the shaded node is inserted. The tree would have to traverse the useless path shown to the root, applying - redundant updates all the way.</p></li></ol></div><div class="figure"><a id="id579995"/><p class="title"><strong>Figure 22.27. Useless update path</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_rationale_null_node_updator.png" style="text-align: middle" alt="Useless update path"/></div></div></div><br class="figure-break"/><p>A null policy class, <code class="classname">null_node_update</code> + redundant updates all the way.</p></li></ol></div><div class="figure"><a id="id631025"/><p class="title"><strong>Figure 22.27. Useless update path</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_rationale_null_node_updator.png" style="text-align: middle" alt="Useless update path"/></div></div></div><br class="figure-break"/><p>A null policy class, <code class="classname">null_node_update</code> solves both these problems. The tree detects that node invariants are irrelevant, and defines all accordingly.</p></div></div><div class="section" title="Split and Join"><div class="titlepage"><div><div><h6 class="title"><a id="container.tree.details.split"/>Split and Join</h6></div></div></div><p>Tree-based containers support split and join methods. It is possible to split a tree so that it passes @@ -1072,7 +1072,7 @@ sub-tree with leafs "a" and "as". The maximal common prefix is "a". The internal node contains, consequently, to const iterators, one pointing to <code class="varname">'a'</code>, and the other to - <code class="varname">'s'</code>.</p><div class="figure"><a id="id580368"/><p class="title"><strong>Figure 22.28. A PATRICIA trie</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_pat_trie.png" style="text-align: middle" alt="A PATRICIA trie"/></div></div></div><br class="figure-break"/></div><div class="section" title="Node Invariants"><div class="titlepage"><div><div><h6 class="title"><a id="container.trie.details.node"/>Node Invariants</h6></div></div></div><p>Trie-based containers support node invariants, as do + <code class="varname">'s'</code>.</p><div class="figure"><a id="id631398"/><p class="title"><strong>Figure 22.28. A PATRICIA trie</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_pat_trie.png" style="text-align: middle" alt="A PATRICIA trie"/></div></div></div><br class="figure-break"/></div><div class="section" title="Node Invariants"><div class="titlepage"><div><div><h6 class="title"><a id="container.trie.details.node"/>Node Invariants</h6></div></div></div><p>Trie-based containers support node invariants, as do tree-based containers. There are two minor differences, though, which, unfortunately, thwart sharing them sharing the same node-updating policies:</p><div class="orderedlist"><ol class="orderedlist"><li class="listitem"><p>A trie's <code class="classname">Node_Update</code> template-template @@ -1081,7 +1081,7 @@ parametrized by <code class="classname">Cmp_Fn</code>.</p></li><li class="listitem"><p>Tree-based containers store values in all nodes, while trie-based containers (at least in this implementation) store values in leafs.</p></li></ol></div><p>The graphic below shows the scheme, as well as some predefined - policies (which are explained below).</p><div class="figure"><a id="id580455"/><p class="title"><strong>Figure 22.29. A trie and its update policy</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_trie_node_updator_policy_cd.png" style="text-align: middle" alt="A trie and its update policy"/></div></div></div><br class="figure-break"/><p>This library offers the following pre-defined trie node + policies (which are explained below).</p><div class="figure"><a id="id631485"/><p class="title"><strong>Figure 22.29. A trie and its update policy</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_trie_node_updator_policy_cd.png" style="text-align: middle" alt="A trie and its update policy"/></div></div></div><br class="figure-break"/><p>This library offers the following pre-defined trie node updating policies:</p><div class="orderedlist"><ol class="orderedlist"><li class="listitem"><p> <code class="classname">trie_order_statistics_node_update</code> supports order statistics. @@ -1129,7 +1129,7 @@ simple list of integer keys. If we search for the integer 6, we are paying an overhead: the link with key 6 is only the fifth link; if it were the first link, it could be accessed - faster.</p><div class="figure"><a id="id580710"/><p class="title"><strong>Figure 22.30. A simple list</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_simple_list.png" style="text-align: middle" alt="A simple list"/></div></div></div><br class="figure-break"/><p>List-update algorithms reorder lists as elements are + faster.</p><div class="figure"><a id="id631740"/><p class="title"><strong>Figure 22.30. A simple list</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_simple_list.png" style="text-align: middle" alt="A simple list"/></div></div></div><br class="figure-break"/><p>List-update algorithms reorder lists as elements are accessed. They try to determine, by the access history, which keys to move to the front of the list. Some of these algorithms require adding some metadata alongside each entry.</p><p>For example, in the graphic below label A shows the counter @@ -1139,7 +1139,7 @@ predetermined value, say 10, as shown in label C, the count is set to 0 and the node is moved to the front of the list, as in label D. - </p><div class="figure"><a id="id580756"/><p class="title"><strong>Figure 22.31. The counter algorithm</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_list_update.png" style="text-align: middle" alt="The counter algorithm"/></div></div></div><br class="figure-break"/></div><div class="section" title="Policies"><div class="titlepage"><div><div><h6 class="title"><a id="container.list.details.policies"/>Policies</h6></div></div></div><p>this library allows instantiating lists with policies + </p><div class="figure"><a id="id631786"/><p class="title"><strong>Figure 22.31. The counter algorithm</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_list_update.png" style="text-align: middle" alt="The counter algorithm"/></div></div></div><br class="figure-break"/></div><div class="section" title="Policies"><div class="titlepage"><div><div><h6 class="title"><a id="container.list.details.policies"/>Policies</h6></div></div></div><p>this library allows instantiating lists with policies implementing any algorithm moving nodes to the front of the list (policies implementing algorithms interchanging nodes are unsupported).</p><p>Associative containers based on lists are parametrized by a @@ -1311,7 +1311,7 @@ sequence; the second uses a tree (or forest of trees), which is typically less structured than an associative container's tree; the third simply uses an associative container. These are - shown in the graphic below, in labels A1 and A2, label B, and label C.</p><div class="figure"><a id="id581288"/><p class="title"><strong>Figure 22.32. Underlying Priority-Queue Data-Structures.</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_priority_queue_different_underlying_dss.png" style="text-align: middle" alt="Underlying Priority-Queue Data-Structures."/></div></div></div><br class="figure-break"/><p>Roughly speaking, any value that is both pushed and popped + shown in the graphic below, in labels A1 and A2, label B, and label C.</p><div class="figure"><a id="id632318"/><p class="title"><strong>Figure 22.32. Underlying Priority-Queue Data-Structures.</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_priority_queue_different_underlying_dss.png" style="text-align: middle" alt="Underlying Priority-Queue Data-Structures."/></div></div></div><br class="figure-break"/><p>Roughly speaking, any value that is both pushed and popped from a priority queue must incur a logarithmic expense (in the amortized sense). Any priority queue implementation that would avoid this, would violate known bounds on comparison-based @@ -1391,7 +1391,7 @@ container <code class="classname">Cntnr</code>, the tag of the underlying data structure can be found via <code class="classname">typename Cntnr::container_category</code>; this is one of the possible tags shown in the graphic below. - </p><div class="figure"><a id="id581579"/><p class="title"><strong>Figure 22.33. Priority-Queue Data-Structure Tags.</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_priority_queue_tag_hierarchy.png" style="text-align: middle" alt="Priority-Queue Data-Structure Tags."/></div></div></div><br class="figure-break"/><p>Additionally, a traits mechanism can be used to query a + </p><div class="figure"><a id="id632609"/><p class="title"><strong>Figure 22.33. Priority-Queue Data-Structure Tags.</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_priority_queue_tag_hierarchy.png" style="text-align: middle" alt="Priority-Queue Data-Structure Tags."/></div></div></div><br class="figure-break"/><p>Additionally, a traits mechanism can be used to query a container type for its attributes. Given any container <code class="classname">Cntnr</code>, then </p><pre class="programlisting">__gnu_pbds::container_traits<Cntnr></pre><p> is a traits class identifying the properties of the diff --git a/libstdc++-v3/doc/html/manual/policy_data_structures_using.html b/libstdc++-v3/doc/html/manual/policy_data_structures_using.html index 519973fabd7..43141311840 100644 --- a/libstdc++-v3/doc/html/manual/policy_data_structures_using.html +++ b/libstdc++-v3/doc/html/manual/policy_data_structures_using.html @@ -62,7 +62,7 @@ In addition, there are the following diagnostics classes, used to report errors specific to this library's data structures. - </p><div class="figure"><a id="id574878"/><p class="title"><strong>Figure 22.7. Exception Hierarchy</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_exception_hierarchy.png" style="text-align: middle" alt="Exception Hierarchy"/></div></div></div><br class="figure-break"/></div><div class="section" title="Tutorial"><div class="titlepage"><div><div><h3 class="title"><a id="pbds.using.tutorial"/>Tutorial</h3></div></div></div><div class="section" title="Basic Use"><div class="titlepage"><div><div><h4 class="title"><a id="pbds.using.tutorial.basic"/>Basic Use</h4></div></div></div><p> + </p><div class="figure"><a id="id625908"/><p class="title"><strong>Figure 22.7. Exception Hierarchy</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="../images/pbds_exception_hierarchy.png" style="text-align: middle" alt="Exception Hierarchy"/></div></div></div><br class="figure-break"/></div><div class="section" title="Tutorial"><div class="titlepage"><div><div><h3 class="title"><a id="pbds.using.tutorial"/>Tutorial</h3></div></div></div><div class="section" title="Basic Use"><div class="titlepage"><div><div><h4 class="title"><a id="pbds.using.tutorial.basic"/>Basic Use</h4></div></div></div><p> For the most part, the policy-based containers containers in namespace <code class="literal">__gnu_pbds</code> have the same interface as the equivalent containers in the standard C++ library, except for diff --git a/libstdc++-v3/doc/html/manual/profile_mode.html b/libstdc++-v3/doc/html/manual/profile_mode.html index fc00a8a668d..4a9b22fd71d 100644 --- a/libstdc++-v3/doc/html/manual/profile_mode.html +++ b/libstdc++-v3/doc/html/manual/profile_mode.html @@ -138,7 +138,7 @@ vector-size: improvement = 3: call stack = 0x804842c ... call context. (Environment variable not supported.) </p></li></ul></div><p> - </p></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h2 class="title"><a id="profile_mode.biblio"/>Bibliography</h2></div></div></div><div class="biblioentry"><a id="id571454"/><p><span class="citetitle"><em class="citetitle"> + </p></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h2 class="title"><a id="profile_mode.biblio"/>Bibliography</h2></div></div></div><div class="biblioentry"><a id="id622483"/><p><span class="citetitle"><em class="citetitle"> Perflint: A Context Sensitive Performance Advisor for C++ Programs </em>. </span><span class="author"><span class="firstname">Lixia</span> <span class="surname">Liu</span>. </span><span class="author"><span class="firstname">Silvius</span> <span class="surname">Rus</span>. </span><span class="copyright">Copyright © 2009 . </span><span class="publisher"><span class="publishername"> Proceedings of the 2009 International Symposium on Code Generation diff --git a/libstdc++-v3/doc/html/manual/source_organization.html b/libstdc++-v3/doc/html/manual/source_organization.html index b7329bb88ec..2526e6ab976 100644 --- a/libstdc++-v3/doc/html/manual/source_organization.html +++ b/libstdc++-v3/doc/html/manual/source_organization.html @@ -57,7 +57,7 @@ It has subdirectories:<br/>     Files that are used in constructing the library, but are not<br/>     installed.<br/> <br/> -  testsuites/[backward, demangle, ext, performance, thread, 17_* to 27_*]<br/> +  testsuites/[backward, demangle, ext, performance, thread, 17_* to 30_*]<br/>     Test programs are here, and may be used to begin to exercise the<br/>     library.  Support for "make check" and "make check-install" is<br/>     complete, and runs through all the subdirectories here when this<br/> diff --git a/libstdc++-v3/doc/html/manual/status.html b/libstdc++-v3/doc/html/manual/status.html index 3ca20267fb6..cca4608851b 100644 --- a/libstdc++-v3/doc/html/manual/status.html +++ b/libstdc++-v3/doc/html/manual/status.html @@ -3,12 +3,12 @@ <html xmlns="http://www.w3.org/1999/xhtml"><head><title>Chapter 1. Status</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"/><meta name="keywords" content=" ISO C++ , library "/><meta name="keywords" content=" ISO C++ , runtime , library "/><link rel="home" href="../index.html" title="The GNU C++ Library"/><link rel="up" href="intro.html" title="Part I. Introduction"/><link rel="prev" href="intro.html" title="Part I. Introduction"/><link rel="next" href="license.html" title="License"/></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 1. Status</th></tr><tr><td align="left"><a accesskey="p" href="intro.html">Prev</a> </td><th width="60%" align="center">Part I. Introduction -</th><td align="right"> <a accesskey="n" href="license.html">Next</a></td></tr></table><hr/></div><div class="chapter" title="Chapter 1. Status"><div class="titlepage"><div><div><h2 class="title"><a id="manual.intro.status"/>Chapter 1. Status</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="status.html#manual.intro.status.iso">Implementation Status</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#status.iso.1998">C++ 1998/2003</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#iso.1998.status">Implementation Status</a></span></dt><dt><span class="section"><a href="status.html#iso.1998.specific">Implementation Specific Behavior</a></span></dt></dl></dd><dt><span class="section"><a href="status.html#status.iso.2011">C++ 2011</a></span></dt><dt><span class="section"><a href="status.html#status.iso.tr1">C++ TR1</a></span></dt><dt><span class="section"><a href="status.html#status.iso.tr24733">C++ TR 24733</a></span></dt></dl></dd><dt><span class="section"><a href="license.html">License</a></span></dt><dd><dl><dt><span class="section"><a href="license.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="section"><a href="license.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="section"><a href="bugs.html">Bugs</a></span></dt><dd><dl><dt><span class="section"><a href="bugs.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="section"><a href="bugs.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></div><div class="section" title="Implementation Status"><div class="titlepage"><div><div><h2 class="title"><a id="manual.intro.status.iso"/>Implementation Status</h2></div></div></div><div class="section" title="C++ 1998/2003"><div class="titlepage"><div><div><h3 class="title"><a id="status.iso.1998"/>C++ 1998/2003</h3></div></div></div><div class="section" title="Implementation Status"><div class="titlepage"><div><div><h4 class="title"><a id="iso.1998.status"/>Implementation Status</h4></div></div></div><p> +</th><td align="right"> <a accesskey="n" href="license.html">Next</a></td></tr></table><hr/></div><div class="chapter" title="Chapter 1. Status"><div class="titlepage"><div><div><h2 class="title"><a id="manual.intro.status"/>Chapter 1. Status</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="status.html#manual.intro.status.iso">Implementation Status</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#status.iso.1998">C++ 1998/2003</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#iso.1998.status">Implementation Status</a></span></dt><dt><span class="section"><a href="status.html#iso.1998.specific">Implementation Specific Behavior</a></span></dt></dl></dd><dt><span class="section"><a href="status.html#status.iso.2011">C++ 2011</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#iso.2011.specific">Implementation Specific Behavior</a></span></dt></dl></dd><dt><span class="section"><a href="status.html#status.iso.tr1">C++ TR1</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#iso.tr1.specific">Implementation Specific Behavior</a></span></dt></dl></dd><dt><span class="section"><a href="status.html#status.iso.tr24733">C++ TR 24733</a></span></dt></dl></dd><dt><span class="section"><a href="license.html">License</a></span></dt><dd><dl><dt><span class="section"><a href="license.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="section"><a href="license.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="section"><a href="bugs.html">Bugs</a></span></dt><dd><dl><dt><span class="section"><a href="bugs.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="section"><a href="bugs.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></div><div class="section" title="Implementation Status"><div class="titlepage"><div><div><h2 class="title"><a id="manual.intro.status.iso"/>Implementation Status</h2></div></div></div><div class="section" title="C++ 1998/2003"><div class="titlepage"><div><div><h3 class="title"><a id="status.iso.1998"/>C++ 1998/2003</h3></div></div></div><div class="section" title="Implementation Status"><div class="titlepage"><div><div><h4 class="title"><a id="iso.1998.status"/>Implementation Status</h4></div></div></div><p> This status table is based on the table of contents of ISO/IEC 14882:2003. </p><p> This page describes the C++ support in mainline GCC SVN, not in any particular release. -</p><div class="table"><a id="id457093"/><p class="title"><strong>Table 1.1. C++ 1998/2003 Implementation Status</strong></p><div class="table-contents"><table summary="C++ 1998/2003 Implementation Status" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Section</th><th style="text-align: left">Description</th><th style="text-align: left">Status</th><th style="text-align: left">Comments</th></tr></thead><tbody><tr><td style="text-align: left"> +</p><div class="table"><a id="id488211"/><p class="title"><strong>Table 1.1. C++ 1998/2003 Implementation Status</strong></p><div class="table-contents"><table summary="C++ 1998/2003 Implementation Status" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Section</th><th style="text-align: left">Description</th><th style="text-align: left">Status</th><th style="text-align: left">Comments</th></tr></thead><tbody><tr><td style="text-align: left"> <span class="emphasis"><em>18</em></span> </td><td colspan="3" style="text-align: left"> <span class="emphasis"><em>Language support</em></span> @@ -143,6 +143,7 @@ particular release. </p><p><span class="emphasis"><em>[27.8.1.4]/16</em></span> Calling <code class="code">fstream::sync</code> when a get area exists will... whatever <code class="code">fflush()</code> does, I think. </p></div></div><div class="section" title="C++ 2011"><div class="titlepage"><div><div><h3 class="title"><a id="status.iso.2011"/>C++ 2011</h3></div></div></div><p> +<a id="status.iso.200x"/> This table is based on the table of contents of ISO/IEC JTC1 SC22 WG21 Doc No: N3290 Date: 2011-04-11 Final Draft International Standard, Standard for Programming Language C++ @@ -157,11 +158,11 @@ presence of the required flag. </p><p> This page describes the C++11 support in mainline GCC SVN, not in any particular release. -</p><div class="table"><a id="id488280"/><p class="title"><strong>Table 1.2. C++ 2011 Implementation Status</strong></p><div class="table-contents"><table summary="C++ 2011 Implementation Status" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Section</th><th style="text-align: left">Description</th><th style="text-align: left">Status</th><th style="text-align: left">Comments</th></tr></thead><tbody><tr><td style="text-align: left"> +</p><div class="table"><a id="id539092"/><p class="title"><strong>Table 1.2. C++ 2011 Implementation Status</strong></p><div class="table-contents"><table summary="C++ 2011 Implementation Status" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Section</th><th style="text-align: left">Description</th><th style="text-align: left">Status</th><th style="text-align: left">Comments</th></tr></thead><tbody><tr><td style="text-align: left"> <span class="emphasis"><em>18</em></span> </td><td colspan="3" style="text-align: left"> <span class="emphasis"><em>Language support</em></span> - </td></tr><tr><td style="text-align: left">18.1</td><td style="text-align: left">General</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">18.2</td><td style="text-align: left">Types</td><td style="text-align: left">Partial</td><td style="text-align: left">Missing offsetof, max_align_t</td></tr><tr><td style="text-align: left">18.3</td><td style="text-align: left">Implementation properties</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.3.2</td><td style="text-align: left">Numeric Limits</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.3.2.3</td><td style="text-align: left">Class template <code class="code">numeric_limits</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.3.2.4</td><td style="text-align: left"><code class="code">numeric_limits</code> members</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">18.3.2.5</td><td style="text-align: left"><code class="code">float_round_style</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">18.3.2.6</td><td style="text-align: left"><code class="code">float_denorm_style</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.3.2.7</td><td style="text-align: left"><code class="code">numeric_limits</code> specializations</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.3.3</td><td style="text-align: left">C Library</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.4</td><td style="text-align: left">Integer types</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.4.1</td><td style="text-align: left">Header <code class="code"><cstdint></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">18.5</td><td style="text-align: left">Start and termination</td><td style="text-align: left">Partial</td><td style="text-align: left">C library dependency for quick_exit, at_quick_exit</td></tr><tr><td style="text-align: left">18.6</td><td style="text-align: left">Dynamic memory management</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.7</td><td style="text-align: left">Type identification</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.7.1</td><td style="text-align: left">Class type_info</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.7.2</td><td style="text-align: left">Class bad_cast</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.7.3</td><td style="text-align: left">Class bad_typeid</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.8</td><td style="text-align: left">Exception handling</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.8.1</td><td style="text-align: left">Class exception</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.8.2</td><td style="text-align: left">Class bad_exception</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.8.3</td><td style="text-align: left">Abnormal termination</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.8.4</td><td style="text-align: left"><code class="code">uncaught_exception</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.8.5</td><td style="text-align: left">Exception Propagation</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.8.6</td><td style="text-align: left"><code class="code">nested_exception</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.9</td><td style="text-align: left">Initializer lists</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.9.1</td><td style="text-align: left">Initializer list constructors</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.9.2</td><td style="text-align: left">Initializer list access</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.9.3</td><td style="text-align: left">Initializer list range access</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">18.10</td><td style="text-align: left">Other runtime support</td><td style="text-align: left">Partial</td><td style="text-align: left">Missing <code class="filename"><cstdalign></code> </td></tr><tr><td style="text-align: left"> + </td></tr><tr><td style="text-align: left">18.1</td><td style="text-align: left">General</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">18.2</td><td style="text-align: left">Types</td><td style="text-align: left">Partial</td><td style="text-align: left">Missing offsetof, max_align_t</td></tr><tr><td style="text-align: left">18.3</td><td style="text-align: left">Implementation properties</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.3.2</td><td style="text-align: left">Numeric Limits</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.3.2.3</td><td style="text-align: left">Class template <code class="code">numeric_limits</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.3.2.4</td><td style="text-align: left"><code class="code">numeric_limits</code> members</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">18.3.2.5</td><td style="text-align: left"><code class="code">float_round_style</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">18.3.2.6</td><td style="text-align: left"><code class="code">float_denorm_style</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.3.2.7</td><td style="text-align: left"><code class="code">numeric_limits</code> specializations</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.3.3</td><td style="text-align: left">C Library</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.4</td><td style="text-align: left">Integer types</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.4.1</td><td style="text-align: left">Header <code class="code"><cstdint></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">18.5</td><td style="text-align: left">Start and termination</td><td style="text-align: left">Partial</td><td style="text-align: left">C library dependency for quick_exit, at_quick_exit</td></tr><tr><td style="text-align: left">18.6</td><td style="text-align: left">Dynamic memory management</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.7</td><td style="text-align: left">Type identification</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.7.1</td><td style="text-align: left">Class type_info</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.7.2</td><td style="text-align: left">Class bad_cast</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.7.3</td><td style="text-align: left">Class bad_typeid</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.8</td><td style="text-align: left">Exception handling</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.8.1</td><td style="text-align: left">Class exception</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.8.2</td><td style="text-align: left">Class bad_exception</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.8.3</td><td style="text-align: left">Abnormal termination</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.8.4</td><td style="text-align: left"><code class="code">uncaught_exception</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.8.5</td><td style="text-align: left">Exception Propagation</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.8.6</td><td style="text-align: left"><code class="code">nested_exception</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.9</td><td style="text-align: left">Initializer lists</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.9.1</td><td style="text-align: left">Initializer list constructors</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.9.2</td><td style="text-align: left">Initializer list access</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.9.3</td><td style="text-align: left">Initializer list range access</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.10</td><td style="text-align: left">Other runtime support</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left"> <span class="emphasis"><em>19</em></span> </td><td colspan="3" style="text-align: left"> <span class="emphasis"><em>Diagnostics</em></span> @@ -169,7 +170,8 @@ particular release. <span class="emphasis"><em>20</em></span> </td><td colspan="3" style="text-align: left"> <span class="emphasis"><em>General utilities</em></span> - </td></tr><tr><td style="text-align: left">20.1</td><td style="text-align: left">General</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.2</td><td style="text-align: left">Utility components</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.2.1</td><td style="text-align: left">Operators</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.2.2</td><td style="text-align: left">Swap</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.2.3</td><td style="text-align: left"><code class="code">forward</code> and <code class="code">move</code> helpers</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.2.4</td><td style="text-align: left">Function template <code class="code">declval</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.3</td><td style="text-align: left">Pairs</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.3.1</td><td style="text-align: left">In general</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.3.2</td><td style="text-align: left">Class template <code class="code">pair</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.3.3</td><td style="text-align: left">Specialized algorithms</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.3.4</td><td style="text-align: left">Tuple-like access to <code class="code">pair</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.3.5</td><td style="text-align: left">Piecewise construction</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4</td><td style="text-align: left">Tuples</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.1</td><td style="text-align: left">In general</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2</td><td style="text-align: left">Class template <code class="code">tuple</code></td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.1</td><td style="text-align: left">Construction</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.2</td><td style="text-align: left">Assignment</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.3</td><td style="text-align: left">Swap</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.4</td><td style="text-align: left">Tuple creation functions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.5</td><td style="text-align: left">Tuple helper classes</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.6</td><td style="text-align: left">Element access</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.7</td><td style="text-align: left">Relational operators</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.8</td><td style="text-align: left">Tuple traits</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.9</td><td style="text-align: left">Tuple specialized algorithms</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.5</td><td style="text-align: left">Class template <code class="code">bitset</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.5.1</td><td style="text-align: left"><code class="code">bitset</code> constructors</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.5.2</td><td style="text-align: left"><code class="code">bitset</code> members</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.5.3</td><td style="text-align: left"><code class="code">bitset</code> hash support</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.5.4</td><td style="text-align: left"><code class="code">bitset</code> operators</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6</td><td style="text-align: left">Memory</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.1</td><td style="text-align: left">In general</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.2</td><td style="text-align: left">Header <code class="code"><memory></code> synopsis</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">20.6.3</td><td style="text-align: left">Pointer traits</td><td style="text-align: left">Partial</td><td style="text-align: left">Missing rebind</td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">20.6.4</td><td style="text-align: left">Pointer safety</td><td style="text-align: left">Partial</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">20.6.5</td><td style="text-align: left">Align</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.6</td><td style="text-align: left">Allocator argument tag</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.7</td><td style="text-align: left"><code class="code">uses_allocator</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">20.6.8</td><td style="text-align: left">Allocator traits</td><td style="text-align: left">Partial</td><td style="text-align: left">Missing rebind_alloc and rebind_traits</td></tr><tr><td style="text-align: left">20.6.9</td><td style="text-align: left">The default allocator</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.10</td><td style="text-align: left">Raw storage iterator</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.11</td><td style="text-align: left">Temporary buffers</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.12</td><td style="text-align: left">Specialized algorithms</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.12.1</td><td style="text-align: left"><code class="code">addressof</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.12.2</td><td style="text-align: left"><code class="code">uninitialized_copy</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.12.3</td><td style="text-align: left"><code class="code">uninitialized_fill</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.12.4</td><td style="text-align: left"><code class="code">uninitialized_fill_n</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.13</td><td style="text-align: left">C library</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.7</td><td style="text-align: left">Smart pointers</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.7.1</td><td style="text-align: left">Class template <code class="code">unique_ptr</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.7.2</td><td style="text-align: left">Shared-ownership pointers</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.7.2.1</td><td style="text-align: left">Class <code class="code">bad_weak_ptr</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.7.2.2</td><td style="text-align: left">Class template <code class="code">shared_ptr</code></td><td style="text-align: left">Y</td><td style="text-align: left"> + </td></tr><tr><td style="text-align: left">20.1</td><td style="text-align: left">General</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.2</td><td style="text-align: left">Utility components</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.2.1</td><td style="text-align: left">Operators</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.2.2</td><td style="text-align: left">Swap</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.2.3</td><td style="text-align: left"><code class="code">forward</code> and <code class="code">move</code> helpers</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.2.4</td><td style="text-align: left">Function template <code class="code">declval</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.3</td><td style="text-align: left">Pairs</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.3.1</td><td style="text-align: left">In general</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">20.3.2</td><td style="text-align: left">Class template <code class="code">pair</code></td><td style="text-align: left">Partial</td><td style="text-align: left">Piecewise construction requires an accessible copy/move + constructor.</td></tr><tr><td style="text-align: left">20.3.3</td><td style="text-align: left">Specialized algorithms</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.3.4</td><td style="text-align: left">Tuple-like access to <code class="code">pair</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.3.5</td><td style="text-align: left">Piecewise construction</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4</td><td style="text-align: left">Tuples</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.1</td><td style="text-align: left">In general</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2</td><td style="text-align: left">Class template <code class="code">tuple</code></td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.1</td><td style="text-align: left">Construction</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.2</td><td style="text-align: left">Assignment</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.3</td><td style="text-align: left">Swap</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.4</td><td style="text-align: left">Tuple creation functions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.5</td><td style="text-align: left">Tuple helper classes</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.6</td><td style="text-align: left">Element access</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.7</td><td style="text-align: left">Relational operators</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.8</td><td style="text-align: left">Tuple traits</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.9</td><td style="text-align: left">Tuple specialized algorithms</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.5</td><td style="text-align: left">Class template <code class="code">bitset</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.5.1</td><td style="text-align: left"><code class="code">bitset</code> constructors</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.5.2</td><td style="text-align: left"><code class="code">bitset</code> members</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.5.3</td><td style="text-align: left"><code class="code">bitset</code> hash support</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.5.4</td><td style="text-align: left"><code class="code">bitset</code> operators</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6</td><td style="text-align: left">Memory</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.1</td><td style="text-align: left">In general</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.2</td><td style="text-align: left">Header <code class="code"><memory></code> synopsis</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">20.6.3</td><td style="text-align: left">Pointer traits</td><td style="text-align: left">Partial</td><td style="text-align: left">Missing rebind</td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">20.6.4</td><td style="text-align: left">Pointer safety</td><td style="text-align: left">Partial</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">20.6.5</td><td style="text-align: left">Align</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.6</td><td style="text-align: left">Allocator argument tag</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.7</td><td style="text-align: left"><code class="code">uses_allocator</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">20.6.8</td><td style="text-align: left">Allocator traits</td><td style="text-align: left">Partial</td><td style="text-align: left">Missing rebind_alloc and rebind_traits</td></tr><tr><td style="text-align: left">20.6.9</td><td style="text-align: left">The default allocator</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.10</td><td style="text-align: left">Raw storage iterator</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.11</td><td style="text-align: left">Temporary buffers</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.12</td><td style="text-align: left">Specialized algorithms</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.12.1</td><td style="text-align: left"><code class="code">addressof</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.12.2</td><td style="text-align: left"><code class="code">uninitialized_copy</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.12.3</td><td style="text-align: left"><code class="code">uninitialized_fill</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.12.4</td><td style="text-align: left"><code class="code">uninitialized_fill_n</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.13</td><td style="text-align: left">C library</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.7</td><td style="text-align: left">Smart pointers</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.7.1</td><td style="text-align: left">Class template <code class="code">unique_ptr</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.7.2</td><td style="text-align: left">Shared-ownership pointers</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.7.2.1</td><td style="text-align: left">Class <code class="code">bad_weak_ptr</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.7.2.2</td><td style="text-align: left">Class template <code class="code">shared_ptr</code></td><td style="text-align: left">Y</td><td style="text-align: left"> <p> Uses code from <a class="link" href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm">boost::shared_ptr</a>. @@ -198,7 +200,8 @@ particular release. <span class="emphasis"><em>23</em></span> </td><td colspan="3" style="text-align: left"> <span class="emphasis"><em>Containers</em></span> - </td></tr><tr><td style="text-align: left">23.1</td><td style="text-align: left">General</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.2</td><td style="text-align: left">Container requirements</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.2.1</td><td style="text-align: left">General container requirements</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.2.2</td><td style="text-align: left">Container data races</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.2.3</td><td style="text-align: left">Sequence containers</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">23.2.4</td><td style="text-align: left">Associative containers</td><td style="text-align: left">Partial</td><td style="text-align: left">Missing emplace members</td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">23.2.5</td><td style="text-align: left">Unordered associative containers</td><td style="text-align: left">Partial</td><td style="text-align: left">Missing emplace members</td></tr><tr><td style="text-align: left">23.3</td><td style="text-align: left">Sequence containers</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.3.2</td><td style="text-align: left">Class template <code class="code">array</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.3.3</td><td style="text-align: left">Class template <code class="code">deque</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.3.4</td><td style="text-align: left">Class template <code class="code">forward_list</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.3.5</td><td style="text-align: left">Class template <code class="code">list</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.3.6</td><td style="text-align: left">Class template <code class="code">vector</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.3.7</td><td style="text-align: left">Class <code class="code">vector<bool></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.4</td><td style="text-align: left">Associative containers</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.4.4</td><td style="text-align: left">Class template <code class="code">map</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.4.5</td><td style="text-align: left">Class template <code class="code">multimap</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.4.6</td><td style="text-align: left">Class template <code class="code">set</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.4.7</td><td style="text-align: left">Class template <code class="code">multiset</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.5</td><td style="text-align: left">Unordered associative containers</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.5.4</td><td style="text-align: left">Class template <code class="code">unordered_map</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.5.5</td><td style="text-align: left">Class template <code class="code">unordered_multimap</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.5.6</td><td style="text-align: left">Class template <code class="code">unordered_set</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.5.7</td><td style="text-align: left">Class template <code class="code">unordered_multiset</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.6</td><td style="text-align: left">Container adaptors</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.6.1</td><td style="text-align: left">Class template <code class="code">queue</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.6.2</td><td style="text-align: left">Class template <code class="code">priority_queue</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.6.3</td><td style="text-align: left">Class template <code class="code">stack</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left"> + </td></tr><tr><td style="text-align: left">23.1</td><td style="text-align: left">General</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.2</td><td style="text-align: left">Container requirements</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">23.2.1</td><td style="text-align: left">General container requirements</td><td style="text-align: left">Partial</td><td style="text-align: left">Only <code class="code">vector</code> meets the requirements + relating to allocator use and propagation.</td></tr><tr><td style="text-align: left">23.2.2</td><td style="text-align: left">Container data races</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.2.3</td><td style="text-align: left">Sequence containers</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">23.2.4</td><td style="text-align: left">Associative containers</td><td style="text-align: left">Partial</td><td style="text-align: left">Missing emplace members</td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">23.2.5</td><td style="text-align: left">Unordered associative containers</td><td style="text-align: left">Partial</td><td style="text-align: left">Missing emplace members</td></tr><tr><td style="text-align: left">23.3</td><td style="text-align: left">Sequence containers</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.3.2</td><td style="text-align: left">Class template <code class="code">array</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.3.3</td><td style="text-align: left">Class template <code class="code">deque</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.3.4</td><td style="text-align: left">Class template <code class="code">forward_list</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.3.5</td><td style="text-align: left">Class template <code class="code">list</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.3.6</td><td style="text-align: left">Class template <code class="code">vector</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.3.7</td><td style="text-align: left">Class <code class="code">vector<bool></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.4</td><td style="text-align: left">Associative containers</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.4.4</td><td style="text-align: left">Class template <code class="code">map</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.4.5</td><td style="text-align: left">Class template <code class="code">multimap</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.4.6</td><td style="text-align: left">Class template <code class="code">set</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.4.7</td><td style="text-align: left">Class template <code class="code">multiset</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.5</td><td style="text-align: left">Unordered associative containers</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.5.4</td><td style="text-align: left">Class template <code class="code">unordered_map</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.5.5</td><td style="text-align: left">Class template <code class="code">unordered_multimap</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.5.6</td><td style="text-align: left">Class template <code class="code">unordered_set</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.5.7</td><td style="text-align: left">Class template <code class="code">unordered_multiset</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.6</td><td style="text-align: left">Container adaptors</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.6.1</td><td style="text-align: left">Class template <code class="code">queue</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.6.2</td><td style="text-align: left">Class template <code class="code">priority_queue</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">23.6.3</td><td style="text-align: left">Class template <code class="code">stack</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left"> <span class="emphasis"><em>24</em></span> </td><td colspan="3" style="text-align: left"> <span class="emphasis"><em>Iterators</em></span> @@ -215,8 +218,9 @@ particular release. </td><td colspan="3" style="text-align: left"> <span class="emphasis"><em>Input/output library</em></span> </td></tr><tr><td style="text-align: left">27.1</td><td style="text-align: left">General</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">27.2</td><td style="text-align: left">Iostreams requirements</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">27.2.1</td><td style="text-align: left">Imbue Limitations</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">27.2.2</td><td style="text-align: left">Positioning Type Limitations</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">27.2.3</td><td style="text-align: left">Thread safety</td><td style="text-align: left">Partial</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">27.3</td><td style="text-align: left">Forward declarations</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">27.4</td><td style="text-align: left">Standard iostream objects</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">27.4.1</td><td style="text-align: left">Overview</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">27.4.2</td><td style="text-align: left">Narrow stream objects</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">27.4.3</td><td style="text-align: left">Wide stream objects</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">27.5</td><td style="text-align: left">Iostreams base classes</td><td style="text-align: left">Partial</td><td style="text-align: left"> - Missing move and swap operations on <code class="code">basic_ios</code>. Missing - <code class="code">make_error_code</code> and <code class="code">make_error_condition</code>. + Missing move and swap operations on <code class="code">basic_ios</code>. + Missing <code class="code">io_errc</code> and <code class="code">iostream_category</code>. + <code class="code">ios_base::failure</code> is not derived from <code class="code">system_error</code>. </td></tr><tr><td style="text-align: left">27.6</td><td style="text-align: left">Stream buffers</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">27.7</td><td style="text-align: left">Formatting and manipulators</td><td style="text-align: left">Partial</td><td style="text-align: left">Missing move and swap operations</td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">27.8</td><td style="text-align: left">String-based streams</td><td style="text-align: left">Partial</td><td style="text-align: left">Missing move and swap operations</td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">27.9</td><td style="text-align: left">File-based streams</td><td style="text-align: left">Partial</td><td style="text-align: left">Missing move and swap operations</td></tr><tr><td style="text-align: left"> <span class="emphasis"><em>28</em></span> </td><td colspan="3" style="text-align: left"> @@ -232,11 +236,50 @@ particular release. <span class="emphasis"><em>30</em></span> </td><td colspan="3" style="text-align: left"> <span class="emphasis"><em>Thread support</em></span> - </td></tr><tr><td style="text-align: left">30.1</td><td style="text-align: left">General</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.2</td><td style="text-align: left">Requirements</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.3</td><td style="text-align: left">Threads</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">30.3.1</td><td style="text-align: left">Class <code class="code">thread</code></td><td style="text-align: left">Partial</td><td style="text-align: left"><code class="code">thread::id</code> comparisons not well-defined</td></tr><tr><td style="text-align: left">30.3.2</td><td style="text-align: left">Namespace <code class="code">this_thread</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4</td><td style="text-align: left">Mutual exclusion</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1</td><td style="text-align: left">Mutex requirements</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1.1</td><td style="text-align: left">In general</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1.2</td><td style="text-align: left">Mutex types</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1.2.1</td><td style="text-align: left">Class <code class="code">mutex</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1.2.2</td><td style="text-align: left">Class <code class="code">recursive_mutex</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1.3</td><td style="text-align: left">Timed mutex types</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1.3.1</td><td style="text-align: left">Class <code class="code">timed_mutex</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1.3.2</td><td style="text-align: left">Class <code class="code">recursive_timed_mutex</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.2</td><td style="text-align: left">Locks</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.2.1</td><td style="text-align: left">Class template <code class="code">lock_guard</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.2.2</td><td style="text-align: left">Class template <code class="code">unique_lock</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.3</td><td style="text-align: left">Generic locking algorithms</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.4</td><td style="text-align: left">Call once</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.4.1</td><td style="text-align: left">Struct <code class="code">once_flag</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.4.2</td><td style="text-align: left">Function <code class="code">call_once</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">30.5</td><td style="text-align: left">Condition variables</td><td style="text-align: left">Partial</td><td style="text-align: left">Missing notify_all_at_thread_exit</td></tr><tr><td style="text-align: left">30.5.1</td><td style="text-align: left">Class <code class="code">condition_variable</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.5.2</td><td style="text-align: left">Class <code class="code">condition_variable_any</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.6</td><td style="text-align: left">Futures</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.6.1</td><td style="text-align: left">Overview</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.6.2</td><td style="text-align: left">Error handling</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.6.3</td><td style="text-align: left">Class <code class="code">future_error</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.6.4</td><td style="text-align: left">Shared state</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">30.6.5</td><td style="text-align: left">Class template <code class="code">promise</code></td><td style="text-align: left">Partial</td><td style="text-align: left">Missing set_*_at_thread_exit</td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">30.6.6</td><td style="text-align: left">Class template <code class="code">future</code></td><td style="text-align: left">Partial</td><td style="text-align: left">Timed waiting functions do not return future_status</td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">30.6.7</td><td style="text-align: left">Class template <code class="code">shared_future</code></td><td style="text-align: left">Partial</td><td style="text-align: left">Timed waiting functions do not return future_status</td></tr><tr><td style="text-align: left">30.6.8</td><td style="text-align: left">Function template <code class="code">async</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">30.6.9</td><td style="text-align: left">Class template <code class="code">packaged_task</code></td><td style="text-align: left">Partial</td><td style="text-align: left">Missing make_ready_at_thread_exit</td></tr><tr><td style="text-align: left"> + </td></tr><tr><td style="text-align: left">30.1</td><td style="text-align: left">General</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.2</td><td style="text-align: left">Requirements</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.3</td><td style="text-align: left">Threads</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">30.3.1</td><td style="text-align: left">Class <code class="code">thread</code></td><td style="text-align: left">Partial</td><td style="text-align: left"><code class="code">thread::id</code> comparisons not well-defined</td></tr><tr><td style="text-align: left">30.3.2</td><td style="text-align: left">Namespace <code class="code">this_thread</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4</td><td style="text-align: left">Mutual exclusion</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1</td><td style="text-align: left">Mutex requirements</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1.1</td><td style="text-align: left">In general</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1.2</td><td style="text-align: left">Mutex types</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1.2.1</td><td style="text-align: left">Class <code class="code">mutex</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1.2.2</td><td style="text-align: left">Class <code class="code">recursive_mutex</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1.3</td><td style="text-align: left">Timed mutex types</td><td style="text-align: left"> </td><td style="text-align: left">On POSIX sytems these types are only defined if the OS + supports the POSIX Timeouts option. </td></tr><tr><td style="text-align: left">30.4.1.3.1</td><td style="text-align: left">Class <code class="code">timed_mutex</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1.3.2</td><td style="text-align: left">Class <code class="code">recursive_timed_mutex</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.2</td><td style="text-align: left">Locks</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.2.1</td><td style="text-align: left">Class template <code class="code">lock_guard</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.2.2</td><td style="text-align: left">Class template <code class="code">unique_lock</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.3</td><td style="text-align: left">Generic locking algorithms</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.4</td><td style="text-align: left">Call once</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.4.1</td><td style="text-align: left">Struct <code class="code">once_flag</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.4.2</td><td style="text-align: left">Function <code class="code">call_once</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">30.5</td><td style="text-align: left">Condition variables</td><td style="text-align: left">Partial</td><td style="text-align: left">Missing notify_all_at_thread_exit</td></tr><tr><td style="text-align: left">30.5.1</td><td style="text-align: left">Class <code class="code">condition_variable</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.5.2</td><td style="text-align: left">Class <code class="code">condition_variable_any</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.6</td><td style="text-align: left">Futures</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.6.1</td><td style="text-align: left">Overview</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.6.2</td><td style="text-align: left">Error handling</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.6.3</td><td style="text-align: left">Class <code class="code">future_error</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.6.4</td><td style="text-align: left">Shared state</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">30.6.5</td><td style="text-align: left">Class template <code class="code">promise</code></td><td style="text-align: left">Partial</td><td style="text-align: left">Missing set_*_at_thread_exit</td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">30.6.6</td><td style="text-align: left">Class template <code class="code">future</code></td><td style="text-align: left">Partial</td><td style="text-align: left">Timed waiting functions do not return future_status</td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">30.6.7</td><td style="text-align: left">Class template <code class="code">shared_future</code></td><td style="text-align: left">Partial</td><td style="text-align: left">Timed waiting functions do not return future_status</td></tr><tr><td style="text-align: left">30.6.8</td><td style="text-align: left">Function template <code class="code">async</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">30.6.9</td><td style="text-align: left">Class template <code class="code">packaged_task</code></td><td style="text-align: left">Partial</td><td style="text-align: left">Missing make_ready_at_thread_exit</td></tr><tr><td style="text-align: left"> <span class="emphasis"><em>Appendix D</em></span> </td><td colspan="3" style="text-align: left"> <span class="emphasis"><em>Compatibility features</em></span> - </td></tr><tr><td style="text-align: left">D.1</td><td style="text-align: left">Increment operator with <code class="code">bool</code> operand</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">D.2</td><td style="text-align: left"><code class="code">register</code> keyword</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">D.3</td><td style="text-align: left">Implicit declaration of copy functions</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">D.4</td><td style="text-align: left">Dynamic exception specifications</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">D.5</td><td style="text-align: left">C standard library headers</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">D.6</td><td style="text-align: left">Old iostreams members</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">D.7</td><td style="text-align: left"><code class="code">char*</code> streams</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">D.8</td><td style="text-align: left">Function objects</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">D.9</td><td style="text-align: left">Binders</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">D.10</td><td style="text-align: left"><code class="code">auto_ptr</code></td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">D.11</td><td style="text-align: left">Violating exception-specifications</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr></tbody></table></div></div><br class="table-break"/></div><div class="section" title="C++ TR1"><div class="titlepage"><div><div><h3 class="title"><a id="status.iso.tr1"/>C++ TR1</h3></div></div></div><p> + </td></tr><tr><td style="text-align: left">D.1</td><td style="text-align: left">Increment operator with <code class="code">bool</code> operand</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">D.2</td><td style="text-align: left"><code class="code">register</code> keyword</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">D.3</td><td style="text-align: left">Implicit declaration of copy functions</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">D.4</td><td style="text-align: left">Dynamic exception specifications</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">D.5</td><td style="text-align: left">C standard library headers</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">D.6</td><td style="text-align: left">Old iostreams members</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">D.7</td><td style="text-align: left"><code class="code">char*</code> streams</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">D.8</td><td style="text-align: left">Function objects</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">D.9</td><td style="text-align: left">Binders</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">D.10</td><td style="text-align: left"><code class="code">auto_ptr</code></td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">D.11</td><td style="text-align: left">Violating exception-specifications</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr></tbody></table></div></div><br class="table-break"/><div class="section" title="Implementation Specific Behavior"><div class="titlepage"><div><div><h4 class="title"><a id="iso.2011.specific"/>Implementation Specific Behavior</h4></div></div></div><p>For behaviour which is also specified by the 1998 and 2003 standards, + see <a class="link" href="status.html#iso.1998.specific" title="Implementation Specific Behavior">C++ 1998/2003 Implementation + Specific Behavior</a>. This section only documents behaviour which + is new in the 2011 standard. + </p><p> + <span class="emphasis"><em>20.8.9.1.3 [func.bind.place]/1</em></span> There are 29 + placeholders defined and the placeholder types are + <code class="literal">CopyAssignable</code>. + </p><p> + <span class="emphasis"><em>30.2.3 [thread.req.native]/1</em></span> + <code class="classname">native_handle_type</code> and + <code class="methodname">native_handle</code> are provided. The handle types + are defined in terms of the Gthreads abstraction layer. + </p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p><code class="classname">thread</code>: The native handle type is + a typedef for <code class="code">__gthread_t</code> i.e. <code class="code">pthread_t</code> + when GCC is configured with the <code class="literal">posix</code> thread + model. The value of the native handle is undefined for a thread + which is not joinable. + </p></li><li class="listitem"><p><code class="classname">mutex</code> and + <code class="classname">timed_mutex</code>: + The native handle type is <code class="code">__gthread_mutex_t*</code> i.e. + <code class="code">pthread_mutex_t*</code> for the <code class="literal">posix</code> + thread model. + </p></li><li class="listitem"><p><code class="classname">recursive_mutex</code> and + <code class="classname">recursive_timed_mutex</code>: + The native handle type is <code class="code">__gthread_recursive_mutex_t*</code> + i.e. <code class="code">pthread_mutex_t*</code> for the <code class="literal">posix</code> + thread model. + </p></li><li class="listitem"><p><code class="classname">condition_variable</code>: The native + handle type is <code class="code">__gthread_cond_t*</code> i.e. + <code class="code">pthread_cond_t*</code> for the <code class="literal">posix</code> + thread model. + </p></li></ul></div><p> + </p><p> + <span class="emphasis"><em>30.6.1 [futures.overview]/2</em></span> + <code class="code">launch</code> is a scoped enumeration type with + overloaded operators to support bitmask operations. There are no + additional bitmask elements defined. + </p></div></div><div class="section" title="C++ TR1"><div class="titlepage"><div><div><h3 class="title"><a id="status.iso.tr1"/>C++ TR1</h3></div></div></div><p> This table is based on the table of contents of ISO/IEC DTR 19768 Doc No: N1836=05-0096 Date: 2005-06-24 Draft Technical Report on C++ Library Extensions @@ -247,12 +290,20 @@ In this implementation the header names are prefixed by </p><p> This page describes the TR1 support in mainline GCC SVN, not in any particular release. -</p><div class="table"><a id="id490902"/><p class="title"><strong>Table 1.3. C++ TR1 Implementation Status</strong></p><div class="table-contents"><table summary="C++ TR1 Implementation Status" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Section</th><th style="text-align: left">Description</th><th style="text-align: left">Status</th><th style="text-align: left">Comments</th></tr></thead><tbody><tr><td style="text-align: left"><span class="emphasis"><em>2</em></span></td><td colspan="3" style="text-align: left"><span class="emphasis"><em>General Utilities</em></span></td></tr><tr><td style="text-align: left">2.1</td><td style="text-align: left">Reference wrappers</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.1.1</td><td style="text-align: left">Additions to header <code class="code"><functional></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.1.2</td><td style="text-align: left">Class template <code class="code">reference_wrapper</code></td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.1.2.1</td><td style="text-align: left"><code class="code">reference_wrapper</code> construct/copy/destroy</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.1.2.2</td><td style="text-align: left"><code class="code">reference_wrapper</code> assignment</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.1.2.3</td><td style="text-align: left"><code class="code">reference_wrapper</code> access</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.1.2.4</td><td style="text-align: left"><code class="code">reference_wrapper</code> invocation</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.1.2.5</td><td style="text-align: left"><code class="code">reference_wrapper</code> helper functions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2</td><td style="text-align: left">Smart pointers</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.1</td><td style="text-align: left">Additions to header <code class="code"><memory></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.2</td><td style="text-align: left">Class <code class="code">bad_weak_ptr</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.3</td><td style="text-align: left">Class template <code class="code">shared_ptr</code></td><td style="text-align: left"> </td><td style="text-align: left"> +</p><div class="table"><a id="id541936"/><p class="title"><strong>Table 1.3. C++ TR1 Implementation Status</strong></p><div class="table-contents"><table summary="C++ TR1 Implementation Status" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Section</th><th style="text-align: left">Description</th><th style="text-align: left">Status</th><th style="text-align: left">Comments</th></tr></thead><tbody><tr><td style="text-align: left"><span class="emphasis"><em>2</em></span></td><td colspan="3" style="text-align: left"><span class="emphasis"><em>General Utilities</em></span></td></tr><tr><td style="text-align: left">2.1</td><td style="text-align: left">Reference wrappers</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.1.1</td><td style="text-align: left">Additions to header <code class="code"><functional></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.1.2</td><td style="text-align: left">Class template <code class="code">reference_wrapper</code></td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.1.2.1</td><td style="text-align: left"><code class="code">reference_wrapper</code> construct/copy/destroy</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.1.2.2</td><td style="text-align: left"><code class="code">reference_wrapper</code> assignment</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.1.2.3</td><td style="text-align: left"><code class="code">reference_wrapper</code> access</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.1.2.4</td><td style="text-align: left"><code class="code">reference_wrapper</code> invocation</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.1.2.5</td><td style="text-align: left"><code class="code">reference_wrapper</code> helper functions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2</td><td style="text-align: left">Smart pointers</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.1</td><td style="text-align: left">Additions to header <code class="code"><memory></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.2</td><td style="text-align: left">Class <code class="code">bad_weak_ptr</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.3</td><td style="text-align: left">Class template <code class="code">shared_ptr</code></td><td style="text-align: left"> </td><td style="text-align: left"> <p> Uses code from <a class="link" href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm">boost::shared_ptr</a>. </p> - </td></tr><tr><td style="text-align: left">2.2.3.1</td><td style="text-align: left"><code class="code">shared_ptr</code> constructors</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.3.2</td><td style="text-align: left"><code class="code">shared_ptr</code> destructor</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.3.3</td><td style="text-align: left"><code class="code">shared_ptr</code> assignment</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.3.4</td><td style="text-align: left"><code class="code">shared_ptr</code> modifiers</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.3.5</td><td style="text-align: left"><code class="code">shared_ptr</code> observers</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.3.6</td><td style="text-align: left"><code class="code">shared_ptr</code> comparison</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.3.7</td><td style="text-align: left"><code class="code">shared_ptr</code> I/O</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.3.8</td><td style="text-align: left"><code class="code">shared_ptr</code> specialized algorithms</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.3.9</td><td style="text-align: left"><code class="code">shared_ptr</code> casts</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.3.10</td><td style="text-align: left"><code class="code">get_deleter</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.4</td><td style="text-align: left">Class template <code class="code">weak_ptr</code></td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.4.1</td><td style="text-align: left"><code class="code">weak_ptr</code> constructors</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.4.2</td><td style="text-align: left"><code class="code">weak_ptr</code> destructor</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.4.3</td><td style="text-align: left"><code class="code">weak_ptr</code> assignment</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.4.4</td><td style="text-align: left"><code class="code">weak_ptr</code> modifiers</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.4.5</td><td style="text-align: left"><code class="code">weak_ptr</code> observers</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.4.6</td><td style="text-align: left"><code class="code">weak_ptr</code> comparison</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.4.7</td><td style="text-align: left"><code class="code">weak_ptr</code> specialized algorithms</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.5</td><td style="text-align: left">Class template <code class="code">enable_shared_from_this</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left"><span class="emphasis"><em>3</em></span></td><td colspan="3" style="text-align: left"><span class="emphasis"><em>Function Objects</em></span></td></tr><tr><td style="text-align: left">3.1</td><td style="text-align: left">Definitions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.2</td><td style="text-align: left">Additions to <code class="code"><functional> synopsis</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.3</td><td style="text-align: left">Requirements</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.4</td><td style="text-align: left">Function return types</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.5</td><td style="text-align: left">Function template <code class="code">mem_fn</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.6</td><td style="text-align: left">Function object binders</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.6.1</td><td style="text-align: left">Class template <code class="code">is_bind_expression</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.6.2</td><td style="text-align: left">Class template <code class="code">is_placeholder</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.6.3</td><td style="text-align: left">Function template <code class="code">bind</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.6.4</td><td style="text-align: left">Placeholders</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.7</td><td style="text-align: left">Polymorphic function wrappers</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.7.1</td><td style="text-align: left">Class <code class="code">bad_function_call</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.7.1.1</td><td style="text-align: left"><code class="code">bad_function_call</code> constructor</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.7.2</td><td style="text-align: left">Class template <code class="code">function</code></td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.7.2.1</td><td style="text-align: left"><code class="code">function</code> construct/copy/destroy</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.7.2.2</td><td style="text-align: left"><code class="code">function</code> modifiers</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.7.2.3</td><td style="text-align: left"><code class="code">function</code> capacity</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.7.2.4</td><td style="text-align: left"><code class="code">function</code> invocation</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.7.2.5</td><td style="text-align: left"><code class="code">function</code> target access</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.7.2.6</td><td style="text-align: left">undefined operators</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.7.2.7</td><td style="text-align: left">null pointer comparison operators</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.7.2.8</td><td style="text-align: left">specialized algorithms</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left"><span class="emphasis"><em>4</em></span></td><td colspan="3" style="text-align: left"><span class="emphasis"><em>Metaprogramming and type traits</em></span></td></tr><tr><td style="text-align: left">4.1</td><td style="text-align: left">Requirements</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.2</td><td style="text-align: left">Header <code class="code"><type_traits></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.3</td><td style="text-align: left">Helper classes</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.4</td><td style="text-align: left">General Requirements</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.5</td><td style="text-align: left">Unary Type Traits</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.5.1</td><td style="text-align: left">Primary Type Categories</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.5.2</td><td style="text-align: left">Composite type traits</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.5.3</td><td style="text-align: left">Type properties</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.6</td><td style="text-align: left">Relationships between types</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.7</td><td style="text-align: left">Transformations between types</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.7.1</td><td style="text-align: left">Const-volatile modifications</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.7.2</td><td style="text-align: left">Reference modifications</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.7.3</td><td style="text-align: left">Array modifications</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.7.4</td><td style="text-align: left">Pointer modifications</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.8</td><td style="text-align: left">Other transformations</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.9</td><td style="text-align: left">Implementation requirements</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left"><span class="emphasis"><em>5</em></span></td><td colspan="3" style="text-align: left"><span class="emphasis"><em>Numerical Facilities</em></span></td></tr><tr><td style="text-align: left">5.1</td><td style="text-align: left">Random number generation</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.1</td><td style="text-align: left">Requirements</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.2</td><td style="text-align: left">Header <code class="code"><random></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.3</td><td style="text-align: left">Class template <code class="code">variate_generator</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.4</td><td style="text-align: left">Random number engine class templates</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.4.1</td><td style="text-align: left">Class template <code class="code">linear_congruential</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.4.2</td><td style="text-align: left">Class template <code class="code">mersenne_twister</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.4.3</td><td style="text-align: left">Class template <code class="code">subtract_with_carry</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.4.4</td><td style="text-align: left">Class template <code class="code">subtract_with_carry_01</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.4.5</td><td style="text-align: left">Class template <code class="code">discard_block</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.4.6</td><td style="text-align: left">Class template <code class="code">xor_combine</code></td><td style="text-align: left">Y</td><td style="text-align: left">operator()() per N2079</td></tr><tr><td style="text-align: left">5.1.5</td><td style="text-align: left">Engines with predefined parameters</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.6</td><td style="text-align: left">Class <code class="code">random_device</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.7</td><td style="text-align: left">Random distribution class templates</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.7.1</td><td style="text-align: left">Class template <code class="code">uniform_int</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.7.2</td><td style="text-align: left">Class <code class="code">bernoulli_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.7.3</td><td style="text-align: left">Class template <code class="code">geometric_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.7.4</td><td style="text-align: left">Class template <code class="code">poisson_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.7.5</td><td style="text-align: left">Class template <code class="code">binomial_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.7.6</td><td style="text-align: left">Class template <code class="code">uniform_real</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.7.7</td><td style="text-align: left">Class template <code class="code">exponential_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.7.8</td><td style="text-align: left">Class template <code class="code">normal_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.7.9</td><td style="text-align: left">Class template <code class="code">gamma_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2</td><td style="text-align: left">Mathematical special functions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1</td><td style="text-align: left">Additions to header <code class="code"><cmath></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.1</td><td style="text-align: left">associated Laguerre polynomials</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.2</td><td style="text-align: left">associated Legendre functions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.3</td><td style="text-align: left">beta function</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.4</td><td style="text-align: left">(complete) elliptic integral of the first kind</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.5</td><td style="text-align: left">(complete) elliptic integral of the second kind</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.6</td><td style="text-align: left">(complete) elliptic integral of the third kind</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.7</td><td style="text-align: left">confluent hypergeometric functions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.8</td><td style="text-align: left">regular modified cylindrical Bessel functions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.9</td><td style="text-align: left">cylindrical Bessel functions (of the first kind)</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.10</td><td style="text-align: left">irregular modified cylindrical Bessel functions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.11</td><td style="text-align: left">cylindrical Neumann functions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.12</td><td style="text-align: left">(incomplete) elliptic integral of the first kind</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.13</td><td style="text-align: left">(incomplete) elliptic integral of the second kind</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.14</td><td style="text-align: left">(incomplete) elliptic integral of the third kind</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.15</td><td style="text-align: left">exponential integral</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.16</td><td style="text-align: left">Hermite polynomials</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.17</td><td style="text-align: left">hypergeometric functions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.18</td><td style="text-align: left">Laguerre polynomials</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.19</td><td style="text-align: left">Legendre polynomials</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.20</td><td style="text-align: left">Riemann zeta function</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.21</td><td style="text-align: left">spherical Bessel functions (of the first kind)</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.22</td><td style="text-align: left">spherical associated Legendre functions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.23</td><td style="text-align: left">spherical Neumann functions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.2</td><td style="text-align: left">Additions to header <code class="code"><math.h></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left"><span class="emphasis"><em>6</em></span></td><td colspan="3" style="text-align: left"><span class="emphasis"><em>Containers</em></span></td></tr><tr><td style="text-align: left">6.1</td><td style="text-align: left">Tuple types</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.1.1</td><td style="text-align: left">Header <code class="code"><tuple></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.1.2</td><td style="text-align: left">Additions to header <code class="code"><utility></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.1.3</td><td style="text-align: left">Class template <code class="code">tuple</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.1.3.1</td><td style="text-align: left">Construction</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.1.3.2</td><td style="text-align: left">Tuple creation functions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.1.3.3</td><td style="text-align: left">Tuple helper classes</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.1.3.4</td><td style="text-align: left">Element access</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.1.3.5</td><td style="text-align: left">Relational operators</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.1.4</td><td style="text-align: left">Pairs</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.2</td><td style="text-align: left">Fixed size array</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.2.1</td><td style="text-align: left">Header <code class="code"><array></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.2.2</td><td style="text-align: left">Class template <code class="code">array</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.2.2.1</td><td style="text-align: left"><code class="code">array</code> constructors, copy, and assignment</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.2.2.2</td><td style="text-align: left"><code class="code">array</code> specialized algorithms</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.2.2.3</td><td style="text-align: left"><code class="code">array</code> size</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.2.2.4</td><td style="text-align: left">Zero sized <code class="code">array</code>s</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.2.2.5</td><td style="text-align: left">Tuple interface to class template <code class="code">array</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3</td><td style="text-align: left">Unordered associative containers</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.1</td><td style="text-align: left">Unordered associative container requirements</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.1.1</td><td style="text-align: left">Exception safety guarantees</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.2</td><td style="text-align: left">Additions to header <code class="code"><functional></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.3</td><td style="text-align: left">Class template <code class="code">hash</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4</td><td style="text-align: left">Unordered associative container classes</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.1</td><td style="text-align: left">Header <code class="code"><unordered_set></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.2</td><td style="text-align: left">Header <code class="code"><unordered_map></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.3</td><td style="text-align: left">Class template <code class="code">unordered_set</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.3.1</td><td style="text-align: left"><code class="code">unordered_set</code> constructors</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.3.2</td><td style="text-align: left"><code class="code">unordered_set</code> swap</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.4</td><td style="text-align: left">Class template <code class="code">unordered_map</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.4.1</td><td style="text-align: left"><code class="code">unordered_map</code> constructors</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.4.2</td><td style="text-align: left"><code class="code">unordered_map</code> element access</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.4.3</td><td style="text-align: left"><code class="code">unordered_map</code> swap</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.5</td><td style="text-align: left">Class template <code class="code">unordered_multiset</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.5.1</td><td style="text-align: left"><code class="code">unordered_multiset</code> constructors</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.5.2</td><td style="text-align: left"><code class="code">unordered_multiset</code> swap</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.6</td><td style="text-align: left">Class template <code class="code">unordered_multimap</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.6.1</td><td style="text-align: left"><code class="code">unordered_multimap</code> constructors</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.6.2</td><td style="text-align: left"><code class="code">unordered_multimap</code> swap</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left"><span class="emphasis"><em>7</em></span></td><td colspan="3" style="text-align: left"><span class="emphasis"><em>Regular Expressions</em></span></td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.1</td><td style="text-align: left">Definitions</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.2</td><td style="text-align: left">Requirements</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.3</td><td style="text-align: left">Regular expressions summary</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.4</td><td style="text-align: left">Header <code class="code"><regex></code> synopsis</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.5</td><td style="text-align: left">Namespace <code class="code">tr1::regex_constants</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.5.1</td><td style="text-align: left">Bitmask Type <code class="code">syntax_option_type</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.5.2</td><td style="text-align: left">Bitmask Type <code class="code">regex_constants::match_flag_type</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.5.3</td><td style="text-align: left">Implementation defined <code class="code">error_type</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.6</td><td style="text-align: left">Class <code class="code">regex_error</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.7</td><td style="text-align: left">Class template <code class="code">regex_traits</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.8</td><td style="text-align: left">Class template <code class="code">basic_regex</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.8.1</td><td style="text-align: left"><code class="code">basic_regex</code> constants</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.8.2</td><td style="text-align: left"><code class="code">basic_regex</code> constructors</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.8.3</td><td style="text-align: left"><code class="code">basic_regex</code> assign</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.8.4</td><td style="text-align: left"><code class="code">basic_regex</code> constant operations</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.8.5</td><td style="text-align: left"><code class="code">basic_regex</code> locale</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.8.6</td><td style="text-align: left"><code class="code">basic_regex</code> swap</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.8.7</td><td style="text-align: left"><code class="code">basic_regex</code> non-member functions</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.8.7.1</td><td style="text-align: left"><code class="code">basic_regex</code> non-member swap</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.9</td><td style="text-align: left">Class template <code class="code">sub_match</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.9.1</td><td style="text-align: left"><code class="code">sub_match</code> members</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.9.2</td><td style="text-align: left"><code class="code">sub_match</code> non-member operators</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.10</td><td style="text-align: left">Class template <code class="code">match_results</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.10.1</td><td style="text-align: left"><code class="code">match_results</code> constructors</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.10.2</td><td style="text-align: left"><code class="code">match_results</code> size</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.10.3</td><td style="text-align: left"><code class="code">match_results</code> element access</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.10.4</td><td style="text-align: left"><code class="code">match_results</code> formatting</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.10.5</td><td style="text-align: left"><code class="code">match_results</code> allocator</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.10.6</td><td style="text-align: left"><code class="code">match_results</code> swap</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.11</td><td style="text-align: left">Regular expression algorithms</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.11.1</td><td style="text-align: left">exceptions</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.11.2</td><td style="text-align: left"><code class="code">regex_match</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.11.3</td><td style="text-align: left"><code class="code">regex_search</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.11.4</td><td style="text-align: left"><code class="code">regex_replace</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.12</td><td style="text-align: left">Regular expression Iterators</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.12.1</td><td style="text-align: left">Class template <code class="code">regex_iterator</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.12.1.1</td><td style="text-align: left"><code class="code">regex_iterator</code> constructors</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.12.1.2</td><td style="text-align: left"><code class="code">regex_iterator</code> comparisons</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.12.1.3</td><td style="text-align: left"><code class="code">regex_iterator</code> dereference</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.12.1.4</td><td style="text-align: left"><code class="code">regex_iterator</code> increment</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.12.2</td><td style="text-align: left">Class template <code class="code">regex_token_iterator</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.12.2.1</td><td style="text-align: left"><code class="code">regex_token_iterator</code> constructors</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.12.2.2</td><td style="text-align: left"><code class="code">regex_token_iterator</code> comparisons</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.12.2.3</td><td style="text-align: left"><code class="code">regex_token_iterator</code> dereference</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.12.2.4</td><td style="text-align: left"><code class="code">regex_token_iterator</code> increment</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.13</td><td style="text-align: left">Modified ECMAScript regular expression grammar</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left"><span class="emphasis"><em>8</em></span></td><td colspan="3" style="text-align: left"><span class="emphasis"><em>C Compatibility</em></span></td></tr><tr><td style="text-align: left">8.1</td><td style="text-align: left">Additions to header <code class="code"><complex></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.1.1</td><td style="text-align: left">Synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.1.2</td><td style="text-align: left">Function <code class="code">acos</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.1.3</td><td style="text-align: left">Function <code class="code">asin</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.1.4</td><td style="text-align: left">Function <code class="code">atan</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.1.5</td><td style="text-align: left">Function <code class="code">acosh</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.1.6</td><td style="text-align: left">Function <code class="code">asinh</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.1.7</td><td style="text-align: left">Function <code class="code">atanh</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.1.8</td><td style="text-align: left">Function <code class="code">fabs</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.1.9</td><td style="text-align: left">Additional Overloads</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">8.2</td><td style="text-align: left">Header <code class="code"><ccomplex></code></td><td style="text-align: left">N</td><td style="text-align: left">DR 551</td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">8.3</td><td style="text-align: left">Header <code class="code"><complex.h></code></td><td style="text-align: left">N</td><td style="text-align: left">DR 551</td></tr><tr><td style="text-align: left">8.4</td><td style="text-align: left">Additions to header <code class="code"><cctype></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.4.1</td><td style="text-align: left">Synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.4.2</td><td style="text-align: left">Function <code class="code">isblank</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.5</td><td style="text-align: left">Additions to header <code class="code"><ctype.h></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.6</td><td style="text-align: left">Header <code class="code"><cfenv></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.6.1</td><td style="text-align: left">Synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.6.2</td><td style="text-align: left">Definitions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.7</td><td style="text-align: left">Header <code class="code"><fenv.h></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.8</td><td style="text-align: left">Additions to header <code class="code"><cfloat></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.9</td><td style="text-align: left">Additions to header <code class="code"><float.h></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">8.10</td><td style="text-align: left">Additions to header <code class="code"><ios></code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">8.10.1</td><td style="text-align: left">Synopsis</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">8.10.2</td><td style="text-align: left">Function <code class="code">hexfloat</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.11</td><td style="text-align: left">Header <code class="code"><cinttypes></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.11.1</td><td style="text-align: left">Synopsis</td><td style="text-align: left">Y</td><td style="text-align: left">DR 557</td></tr><tr><td style="text-align: left">8.11.2</td><td style="text-align: left">Definitions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.12</td><td style="text-align: left">Header <code class="code"><inttypes.h></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.13</td><td style="text-align: left">Additions to header <code class="code"><climits></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.14</td><td style="text-align: left">Additions to header <code class="code"><limits.h></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">8.15</td><td style="text-align: left">Additions to header <code class="code"><locale></code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.16</td><td style="text-align: left">Additions to header <code class="code"><cmath></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.16.1</td><td style="text-align: left">Synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.16.2</td><td style="text-align: left">Definitions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.16.3</td><td style="text-align: left">Function template definitions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.16.4</td><td style="text-align: left">Additional overloads</td><td style="text-align: left">Y</td><td style="text-align: left">DR 568; DR 550</td></tr><tr><td style="text-align: left">8.17</td><td style="text-align: left">Additions to header <code class="code"><math.h></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.18</td><td style="text-align: left">Additions to header <code class="code"><cstdarg></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.19</td><td style="text-align: left">Additions to header <code class="code"><stdarg.h></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.20</td><td style="text-align: left">The header <code class="code"><cstdbool></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.21</td><td style="text-align: left">The header <code class="code"><stdbool.h></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.22</td><td style="text-align: left">The header <code class="code"><cstdint></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.22.1</td><td style="text-align: left">Synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.22.2</td><td style="text-align: left">Definitions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.23</td><td style="text-align: left">The header <code class="code"><stdint.h></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.24</td><td style="text-align: left">Additions to header <code class="code"><cstdio></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.24.1</td><td style="text-align: left">Synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.24.2</td><td style="text-align: left">Definitions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.24.3</td><td style="text-align: left">Additional format specifiers</td><td style="text-align: left">Y</td><td style="text-align: left">C library dependency</td></tr><tr><td style="text-align: left">8.24.4</td><td style="text-align: left">Additions to header <code class="code"><stdio.h></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.25</td><td style="text-align: left">Additions to header <code class="code"><cstdlib></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.25.1</td><td style="text-align: left">Synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.25.2</td><td style="text-align: left">Definitions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.25.3</td><td style="text-align: left">Function <code class="code">abs</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.25.4</td><td style="text-align: left">Function <code class="code">div</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.26</td><td style="text-align: left">Additions to header <code class="code"><stdlib.h></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.27</td><td style="text-align: left">Header <code class="code"><ctgmath></code></td><td style="text-align: left">Y</td><td style="text-align: left">DR 551</td></tr><tr><td style="text-align: left">8.28</td><td style="text-align: left">Header <code class="code"><tgmath.h></code></td><td style="text-align: left">Y</td><td style="text-align: left">DR 551</td></tr><tr><td style="text-align: left">8.29</td><td style="text-align: left">Additions to header <code class="code"><ctime></code></td><td style="text-align: left">Y</td><td style="text-align: left">C library dependency</td></tr><tr><td style="text-align: left">8.30</td><td style="text-align: left">Additions to header <code class="code"><cwchar></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.30.1</td><td style="text-align: left">Synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.30.2</td><td style="text-align: left">Definitions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.30.3</td><td style="text-align: left">Additional wide format specifiers</td><td style="text-align: left">Y</td><td style="text-align: left">C library dependency</td></tr><tr><td style="text-align: left">8.31</td><td style="text-align: left">Additions to header <code class="code"><wchar.h></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.32</td><td style="text-align: left">Additions to header <code class="code"><cwctype></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.32.1</td><td style="text-align: left">Synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.32.2</td><td style="text-align: left">Function <code class="code">iswblank</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.33</td><td style="text-align: left">Additions to header <code class="code"><wctype.h></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr></tbody></table></div></div><br class="table-break"/></div><div class="section" title="C++ TR 24733"><div class="titlepage"><div><div><h3 class="title"><a id="status.iso.tr24733"/>C++ TR 24733</h3></div></div></div><p> + </td></tr><tr><td style="text-align: left">2.2.3.1</td><td style="text-align: left"><code class="code">shared_ptr</code> constructors</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.3.2</td><td style="text-align: left"><code class="code">shared_ptr</code> destructor</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.3.3</td><td style="text-align: left"><code class="code">shared_ptr</code> assignment</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.3.4</td><td style="text-align: left"><code class="code">shared_ptr</code> modifiers</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.3.5</td><td style="text-align: left"><code class="code">shared_ptr</code> observers</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.3.6</td><td style="text-align: left"><code class="code">shared_ptr</code> comparison</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.3.7</td><td style="text-align: left"><code class="code">shared_ptr</code> I/O</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.3.8</td><td style="text-align: left"><code class="code">shared_ptr</code> specialized algorithms</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.3.9</td><td style="text-align: left"><code class="code">shared_ptr</code> casts</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.3.10</td><td style="text-align: left"><code class="code">get_deleter</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.4</td><td style="text-align: left">Class template <code class="code">weak_ptr</code></td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.4.1</td><td style="text-align: left"><code class="code">weak_ptr</code> constructors</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.4.2</td><td style="text-align: left"><code class="code">weak_ptr</code> destructor</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.4.3</td><td style="text-align: left"><code class="code">weak_ptr</code> assignment</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.4.4</td><td style="text-align: left"><code class="code">weak_ptr</code> modifiers</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.4.5</td><td style="text-align: left"><code class="code">weak_ptr</code> observers</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.4.6</td><td style="text-align: left"><code class="code">weak_ptr</code> comparison</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.4.7</td><td style="text-align: left"><code class="code">weak_ptr</code> specialized algorithms</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.5</td><td style="text-align: left">Class template <code class="code">enable_shared_from_this</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left"><span class="emphasis"><em>3</em></span></td><td colspan="3" style="text-align: left"><span class="emphasis"><em>Function Objects</em></span></td></tr><tr><td style="text-align: left">3.1</td><td style="text-align: left">Definitions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.2</td><td style="text-align: left">Additions to <code class="code"><functional> synopsis</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.3</td><td style="text-align: left">Requirements</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.4</td><td style="text-align: left">Function return types</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.5</td><td style="text-align: left">Function template <code class="code">mem_fn</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.6</td><td style="text-align: left">Function object binders</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.6.1</td><td style="text-align: left">Class template <code class="code">is_bind_expression</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.6.2</td><td style="text-align: left">Class template <code class="code">is_placeholder</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.6.3</td><td style="text-align: left">Function template <code class="code">bind</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.6.4</td><td style="text-align: left">Placeholders</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.7</td><td style="text-align: left">Polymorphic function wrappers</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.7.1</td><td style="text-align: left">Class <code class="code">bad_function_call</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.7.1.1</td><td style="text-align: left"><code class="code">bad_function_call</code> constructor</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.7.2</td><td style="text-align: left">Class template <code class="code">function</code></td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.7.2.1</td><td style="text-align: left"><code class="code">function</code> construct/copy/destroy</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.7.2.2</td><td style="text-align: left"><code class="code">function</code> modifiers</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.7.2.3</td><td style="text-align: left"><code class="code">function</code> capacity</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.7.2.4</td><td style="text-align: left"><code class="code">function</code> invocation</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.7.2.5</td><td style="text-align: left"><code class="code">function</code> target access</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.7.2.6</td><td style="text-align: left">undefined operators</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.7.2.7</td><td style="text-align: left">null pointer comparison operators</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">3.7.2.8</td><td style="text-align: left">specialized algorithms</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left"><span class="emphasis"><em>4</em></span></td><td colspan="3" style="text-align: left"><span class="emphasis"><em>Metaprogramming and type traits</em></span></td></tr><tr><td style="text-align: left">4.1</td><td style="text-align: left">Requirements</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.2</td><td style="text-align: left">Header <code class="code"><type_traits></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.3</td><td style="text-align: left">Helper classes</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.4</td><td style="text-align: left">General Requirements</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.5</td><td style="text-align: left">Unary Type Traits</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.5.1</td><td style="text-align: left">Primary Type Categories</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.5.2</td><td style="text-align: left">Composite type traits</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.5.3</td><td style="text-align: left">Type properties</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.6</td><td style="text-align: left">Relationships between types</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.7</td><td style="text-align: left">Transformations between types</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.7.1</td><td style="text-align: left">Const-volatile modifications</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.7.2</td><td style="text-align: left">Reference modifications</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.7.3</td><td style="text-align: left">Array modifications</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.7.4</td><td style="text-align: left">Pointer modifications</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.8</td><td style="text-align: left">Other transformations</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">4.9</td><td style="text-align: left">Implementation requirements</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left"><span class="emphasis"><em>5</em></span></td><td colspan="3" style="text-align: left"><span class="emphasis"><em>Numerical Facilities</em></span></td></tr><tr><td style="text-align: left">5.1</td><td style="text-align: left">Random number generation</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.1</td><td style="text-align: left">Requirements</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.2</td><td style="text-align: left">Header <code class="code"><random></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.3</td><td style="text-align: left">Class template <code class="code">variate_generator</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.4</td><td style="text-align: left">Random number engine class templates</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.4.1</td><td style="text-align: left">Class template <code class="code">linear_congruential</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.4.2</td><td style="text-align: left">Class template <code class="code">mersenne_twister</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.4.3</td><td style="text-align: left">Class template <code class="code">subtract_with_carry</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.4.4</td><td style="text-align: left">Class template <code class="code">subtract_with_carry_01</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.4.5</td><td style="text-align: left">Class template <code class="code">discard_block</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.4.6</td><td style="text-align: left">Class template <code class="code">xor_combine</code></td><td style="text-align: left">Y</td><td style="text-align: left">operator()() per N2079</td></tr><tr><td style="text-align: left">5.1.5</td><td style="text-align: left">Engines with predefined parameters</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.6</td><td style="text-align: left">Class <code class="code">random_device</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.7</td><td style="text-align: left">Random distribution class templates</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.7.1</td><td style="text-align: left">Class template <code class="code">uniform_int</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.7.2</td><td style="text-align: left">Class <code class="code">bernoulli_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.7.3</td><td style="text-align: left">Class template <code class="code">geometric_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.7.4</td><td style="text-align: left">Class template <code class="code">poisson_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.7.5</td><td style="text-align: left">Class template <code class="code">binomial_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.7.6</td><td style="text-align: left">Class template <code class="code">uniform_real</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.7.7</td><td style="text-align: left">Class template <code class="code">exponential_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.7.8</td><td style="text-align: left">Class template <code class="code">normal_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.1.7.9</td><td style="text-align: left">Class template <code class="code">gamma_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2</td><td style="text-align: left">Mathematical special functions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1</td><td style="text-align: left">Additions to header <code class="code"><cmath></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.1</td><td style="text-align: left">associated Laguerre polynomials</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.2</td><td style="text-align: left">associated Legendre functions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.3</td><td style="text-align: left">beta function</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.4</td><td style="text-align: left">(complete) elliptic integral of the first kind</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.5</td><td style="text-align: left">(complete) elliptic integral of the second kind</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.6</td><td style="text-align: left">(complete) elliptic integral of the third kind</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.7</td><td style="text-align: left">confluent hypergeometric functions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.8</td><td style="text-align: left">regular modified cylindrical Bessel functions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.9</td><td style="text-align: left">cylindrical Bessel functions (of the first kind)</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.10</td><td style="text-align: left">irregular modified cylindrical Bessel functions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.11</td><td style="text-align: left">cylindrical Neumann functions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.12</td><td style="text-align: left">(incomplete) elliptic integral of the first kind</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.13</td><td style="text-align: left">(incomplete) elliptic integral of the second kind</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.14</td><td style="text-align: left">(incomplete) elliptic integral of the third kind</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.15</td><td style="text-align: left">exponential integral</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.16</td><td style="text-align: left">Hermite polynomials</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.17</td><td style="text-align: left">hypergeometric functions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.18</td><td style="text-align: left">Laguerre polynomials</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.19</td><td style="text-align: left">Legendre polynomials</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.20</td><td style="text-align: left">Riemann zeta function</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.21</td><td style="text-align: left">spherical Bessel functions (of the first kind)</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.22</td><td style="text-align: left">spherical associated Legendre functions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.1.23</td><td style="text-align: left">spherical Neumann functions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">5.2.2</td><td style="text-align: left">Additions to header <code class="code"><math.h></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left"><span class="emphasis"><em>6</em></span></td><td colspan="3" style="text-align: left"><span class="emphasis"><em>Containers</em></span></td></tr><tr><td style="text-align: left">6.1</td><td style="text-align: left">Tuple types</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.1.1</td><td style="text-align: left">Header <code class="code"><tuple></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.1.2</td><td style="text-align: left">Additions to header <code class="code"><utility></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.1.3</td><td style="text-align: left">Class template <code class="code">tuple</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.1.3.1</td><td style="text-align: left">Construction</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.1.3.2</td><td style="text-align: left">Tuple creation functions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.1.3.3</td><td style="text-align: left">Tuple helper classes</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.1.3.4</td><td style="text-align: left">Element access</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.1.3.5</td><td style="text-align: left">Relational operators</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.1.4</td><td style="text-align: left">Pairs</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.2</td><td style="text-align: left">Fixed size array</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.2.1</td><td style="text-align: left">Header <code class="code"><array></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.2.2</td><td style="text-align: left">Class template <code class="code">array</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.2.2.1</td><td style="text-align: left"><code class="code">array</code> constructors, copy, and assignment</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.2.2.2</td><td style="text-align: left"><code class="code">array</code> specialized algorithms</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.2.2.3</td><td style="text-align: left"><code class="code">array</code> size</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.2.2.4</td><td style="text-align: left">Zero sized <code class="code">array</code>s</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.2.2.5</td><td style="text-align: left">Tuple interface to class template <code class="code">array</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3</td><td style="text-align: left">Unordered associative containers</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.1</td><td style="text-align: left">Unordered associative container requirements</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.1.1</td><td style="text-align: left">Exception safety guarantees</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.2</td><td style="text-align: left">Additions to header <code class="code"><functional></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.3</td><td style="text-align: left">Class template <code class="code">hash</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4</td><td style="text-align: left">Unordered associative container classes</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.1</td><td style="text-align: left">Header <code class="code"><unordered_set></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.2</td><td style="text-align: left">Header <code class="code"><unordered_map></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.3</td><td style="text-align: left">Class template <code class="code">unordered_set</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.3.1</td><td style="text-align: left"><code class="code">unordered_set</code> constructors</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.3.2</td><td style="text-align: left"><code class="code">unordered_set</code> swap</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.4</td><td style="text-align: left">Class template <code class="code">unordered_map</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.4.1</td><td style="text-align: left"><code class="code">unordered_map</code> constructors</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.4.2</td><td style="text-align: left"><code class="code">unordered_map</code> element access</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.4.3</td><td style="text-align: left"><code class="code">unordered_map</code> swap</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.5</td><td style="text-align: left">Class template <code class="code">unordered_multiset</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.5.1</td><td style="text-align: left"><code class="code">unordered_multiset</code> constructors</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.5.2</td><td style="text-align: left"><code class="code">unordered_multiset</code> swap</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.6</td><td style="text-align: left">Class template <code class="code">unordered_multimap</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.6.1</td><td style="text-align: left"><code class="code">unordered_multimap</code> constructors</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">6.3.4.6.2</td><td style="text-align: left"><code class="code">unordered_multimap</code> swap</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left"><span class="emphasis"><em>7</em></span></td><td colspan="3" style="text-align: left"><span class="emphasis"><em>Regular Expressions</em></span></td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.1</td><td style="text-align: left">Definitions</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.2</td><td style="text-align: left">Requirements</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.3</td><td style="text-align: left">Regular expressions summary</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.4</td><td style="text-align: left">Header <code class="code"><regex></code> synopsis</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.5</td><td style="text-align: left">Namespace <code class="code">tr1::regex_constants</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.5.1</td><td style="text-align: left">Bitmask Type <code class="code">syntax_option_type</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.5.2</td><td style="text-align: left">Bitmask Type <code class="code">regex_constants::match_flag_type</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.5.3</td><td style="text-align: left">Implementation defined <code class="code">error_type</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.6</td><td style="text-align: left">Class <code class="code">regex_error</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.7</td><td style="text-align: left">Class template <code class="code">regex_traits</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.8</td><td style="text-align: left">Class template <code class="code">basic_regex</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.8.1</td><td style="text-align: left"><code class="code">basic_regex</code> constants</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.8.2</td><td style="text-align: left"><code class="code">basic_regex</code> constructors</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.8.3</td><td style="text-align: left"><code class="code">basic_regex</code> assign</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.8.4</td><td style="text-align: left"><code class="code">basic_regex</code> constant operations</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.8.5</td><td style="text-align: left"><code class="code">basic_regex</code> locale</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.8.6</td><td style="text-align: left"><code class="code">basic_regex</code> swap</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.8.7</td><td style="text-align: left"><code class="code">basic_regex</code> non-member functions</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.8.7.1</td><td style="text-align: left"><code class="code">basic_regex</code> non-member swap</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.9</td><td style="text-align: left">Class template <code class="code">sub_match</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.9.1</td><td style="text-align: left"><code class="code">sub_match</code> members</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.9.2</td><td style="text-align: left"><code class="code">sub_match</code> non-member operators</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.10</td><td style="text-align: left">Class template <code class="code">match_results</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.10.1</td><td style="text-align: left"><code class="code">match_results</code> constructors</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.10.2</td><td style="text-align: left"><code class="code">match_results</code> size</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.10.3</td><td style="text-align: left"><code class="code">match_results</code> element access</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.10.4</td><td style="text-align: left"><code class="code">match_results</code> formatting</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.10.5</td><td style="text-align: left"><code class="code">match_results</code> allocator</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.10.6</td><td style="text-align: left"><code class="code">match_results</code> swap</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.11</td><td style="text-align: left">Regular expression algorithms</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.11.1</td><td style="text-align: left">exceptions</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.11.2</td><td style="text-align: left"><code class="code">regex_match</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.11.3</td><td style="text-align: left"><code class="code">regex_search</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.11.4</td><td style="text-align: left"><code class="code">regex_replace</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.12</td><td style="text-align: left">Regular expression Iterators</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.12.1</td><td style="text-align: left">Class template <code class="code">regex_iterator</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.12.1.1</td><td style="text-align: left"><code class="code">regex_iterator</code> constructors</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.12.1.2</td><td style="text-align: left"><code class="code">regex_iterator</code> comparisons</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.12.1.3</td><td style="text-align: left"><code class="code">regex_iterator</code> dereference</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.12.1.4</td><td style="text-align: left"><code class="code">regex_iterator</code> increment</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.12.2</td><td style="text-align: left">Class template <code class="code">regex_token_iterator</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.12.2.1</td><td style="text-align: left"><code class="code">regex_token_iterator</code> constructors</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.12.2.2</td><td style="text-align: left"><code class="code">regex_token_iterator</code> comparisons</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.12.2.3</td><td style="text-align: left"><code class="code">regex_token_iterator</code> dereference</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.12.2.4</td><td style="text-align: left"><code class="code">regex_token_iterator</code> increment</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">7.13</td><td style="text-align: left">Modified ECMAScript regular expression grammar</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left"><span class="emphasis"><em>8</em></span></td><td colspan="3" style="text-align: left"><span class="emphasis"><em>C Compatibility</em></span></td></tr><tr><td style="text-align: left">8.1</td><td style="text-align: left">Additions to header <code class="code"><complex></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.1.1</td><td style="text-align: left">Synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.1.2</td><td style="text-align: left">Function <code class="code">acos</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.1.3</td><td style="text-align: left">Function <code class="code">asin</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.1.4</td><td style="text-align: left">Function <code class="code">atan</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.1.5</td><td style="text-align: left">Function <code class="code">acosh</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.1.6</td><td style="text-align: left">Function <code class="code">asinh</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.1.7</td><td style="text-align: left">Function <code class="code">atanh</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.1.8</td><td style="text-align: left">Function <code class="code">fabs</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.1.9</td><td style="text-align: left">Additional Overloads</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">8.2</td><td style="text-align: left">Header <code class="code"><ccomplex></code></td><td style="text-align: left">N</td><td style="text-align: left">DR 551</td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">8.3</td><td style="text-align: left">Header <code class="code"><complex.h></code></td><td style="text-align: left">N</td><td style="text-align: left">DR 551</td></tr><tr><td style="text-align: left">8.4</td><td style="text-align: left">Additions to header <code class="code"><cctype></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.4.1</td><td style="text-align: left">Synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.4.2</td><td style="text-align: left">Function <code class="code">isblank</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.5</td><td style="text-align: left">Additions to header <code class="code"><ctype.h></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.6</td><td style="text-align: left">Header <code class="code"><cfenv></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.6.1</td><td style="text-align: left">Synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.6.2</td><td style="text-align: left">Definitions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.7</td><td style="text-align: left">Header <code class="code"><fenv.h></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.8</td><td style="text-align: left">Additions to header <code class="code"><cfloat></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.9</td><td style="text-align: left">Additions to header <code class="code"><float.h></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">8.10</td><td style="text-align: left">Additions to header <code class="code"><ios></code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">8.10.1</td><td style="text-align: left">Synopsis</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">8.10.2</td><td style="text-align: left">Function <code class="code">hexfloat</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.11</td><td style="text-align: left">Header <code class="code"><cinttypes></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.11.1</td><td style="text-align: left">Synopsis</td><td style="text-align: left">Y</td><td style="text-align: left">DR 557</td></tr><tr><td style="text-align: left">8.11.2</td><td style="text-align: left">Definitions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.12</td><td style="text-align: left">Header <code class="code"><inttypes.h></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.13</td><td style="text-align: left">Additions to header <code class="code"><climits></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.14</td><td style="text-align: left">Additions to header <code class="code"><limits.h></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">8.15</td><td style="text-align: left">Additions to header <code class="code"><locale></code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.16</td><td style="text-align: left">Additions to header <code class="code"><cmath></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.16.1</td><td style="text-align: left">Synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.16.2</td><td style="text-align: left">Definitions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.16.3</td><td style="text-align: left">Function template definitions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.16.4</td><td style="text-align: left">Additional overloads</td><td style="text-align: left">Y</td><td style="text-align: left">DR 568; DR 550</td></tr><tr><td style="text-align: left">8.17</td><td style="text-align: left">Additions to header <code class="code"><math.h></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.18</td><td style="text-align: left">Additions to header <code class="code"><cstdarg></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.19</td><td style="text-align: left">Additions to header <code class="code"><stdarg.h></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.20</td><td style="text-align: left">The header <code class="code"><cstdbool></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.21</td><td style="text-align: left">The header <code class="code"><stdbool.h></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.22</td><td style="text-align: left">The header <code class="code"><cstdint></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.22.1</td><td style="text-align: left">Synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.22.2</td><td style="text-align: left">Definitions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.23</td><td style="text-align: left">The header <code class="code"><stdint.h></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.24</td><td style="text-align: left">Additions to header <code class="code"><cstdio></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.24.1</td><td style="text-align: left">Synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.24.2</td><td style="text-align: left">Definitions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.24.3</td><td style="text-align: left">Additional format specifiers</td><td style="text-align: left">Y</td><td style="text-align: left">C library dependency</td></tr><tr><td style="text-align: left">8.24.4</td><td style="text-align: left">Additions to header <code class="code"><stdio.h></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.25</td><td style="text-align: left">Additions to header <code class="code"><cstdlib></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.25.1</td><td style="text-align: left">Synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.25.2</td><td style="text-align: left">Definitions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.25.3</td><td style="text-align: left">Function <code class="code">abs</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.25.4</td><td style="text-align: left">Function <code class="code">div</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.26</td><td style="text-align: left">Additions to header <code class="code"><stdlib.h></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.27</td><td style="text-align: left">Header <code class="code"><ctgmath></code></td><td style="text-align: left">Y</td><td style="text-align: left">DR 551</td></tr><tr><td style="text-align: left">8.28</td><td style="text-align: left">Header <code class="code"><tgmath.h></code></td><td style="text-align: left">Y</td><td style="text-align: left">DR 551</td></tr><tr><td style="text-align: left">8.29</td><td style="text-align: left">Additions to header <code class="code"><ctime></code></td><td style="text-align: left">Y</td><td style="text-align: left">C library dependency</td></tr><tr><td style="text-align: left">8.30</td><td style="text-align: left">Additions to header <code class="code"><cwchar></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.30.1</td><td style="text-align: left">Synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.30.2</td><td style="text-align: left">Definitions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.30.3</td><td style="text-align: left">Additional wide format specifiers</td><td style="text-align: left">Y</td><td style="text-align: left">C library dependency</td></tr><tr><td style="text-align: left">8.31</td><td style="text-align: left">Additions to header <code class="code"><wchar.h></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.32</td><td style="text-align: left">Additions to header <code class="code"><cwctype></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.32.1</td><td style="text-align: left">Synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.32.2</td><td style="text-align: left">Function <code class="code">iswblank</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">8.33</td><td style="text-align: left">Additions to header <code class="code"><wctype.h></code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr></tbody></table></div></div><br class="table-break"/><div class="section" title="Implementation Specific Behavior"><div class="titlepage"><div><div><h4 class="title"><a id="iso.tr1.specific"/>Implementation Specific Behavior</h4></div></div></div><p>For behaviour which is specified by the 1998 and 2003 standards, + see <a class="link" href="status.html#iso.1998.specific" title="Implementation Specific Behavior">C++ 1998/2003 Implementation + Specific Behavior</a>. This section documents behaviour which + is required by TR1. + </p><p> + <span class="emphasis"><em>3.6.4 [tr.func.bind.place]/1</em></span> There are 29 + placeholders defined and the placeholder types are + <code class="literal">Assignable</code>. + </p></div></div><div class="section" title="C++ TR 24733"><div class="titlepage"><div><div><h3 class="title"><a id="status.iso.tr24733"/>C++ TR 24733</h3></div></div></div><p> This table is based on the table of contents of ISO/IEC TR 24733 Date: 2009-08-28 Extension for the programming language C++ to support @@ -260,7 +311,7 @@ decimal floating-point arithmetic </p><p> This page describes the TR 24733 support in mainline GCC SVN, not in any particular release. -</p><div class="table"><a id="id531074"/><p class="title"><strong>Table 1.4. C++ TR 24733 Implementation Status</strong></p><div class="table-contents"><table summary="C++ TR 24733 Implementation Status" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Section</th><th style="text-align: left">Description</th><th style="text-align: left">Status</th><th style="text-align: left">Comments</th></tr></thead><tbody><tr><td style="text-align: left"> +</p><div class="table"><a id="id582139"/><p class="title"><strong>Table 1.4. C++ TR 24733 Implementation Status</strong></p><div class="table-contents"><table summary="C++ TR 24733 Implementation Status" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Section</th><th style="text-align: left">Description</th><th style="text-align: left">Status</th><th style="text-align: left">Comments</th></tr></thead><tbody><tr><td style="text-align: left"> <span class="emphasis"><em>0</em></span> </td><td colspan="3" style="text-align: left"> <span class="emphasis"><em>Introduction</em></span> diff --git a/libstdc++-v3/doc/html/manual/strings.html b/libstdc++-v3/doc/html/manual/strings.html index 5eabed2067f..930d41c8db3 100644 --- a/libstdc++-v3/doc/html/manual/strings.html +++ b/libstdc++-v3/doc/html/manual/strings.html @@ -7,7 +7,7 @@ Standard Contents </th><td align="right"> <a accesskey="n" href="localization.html">Next</a></td></tr></table><hr/></div><div class="chapter" title="Chapter 7. Strings"><div class="titlepage"><div><div><h2 class="title"><a id="std.strings"/>Chapter 7. Strings - <a id="id556618" class="indexterm"/> + <a id="id607642" class="indexterm"/> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="strings.html#std.strings.string">String Classes</a></span></dt><dd><dl><dt><span class="section"><a href="strings.html#strings.string.simple">Simple Transformations</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.case">Case Sensitivity</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.character_types">Arbitrary Character Types</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.token">Tokenizing</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.shrink">Shrink to Fit</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.Cstring">CString (MFC)</a></span></dt></dl></dd></dl></div><div class="section" title="String Classes"><div class="titlepage"><div><div><h2 class="title"><a id="std.strings.string"/>String Classes</h2></div></div></div><div class="section" title="Simple Transformations"><div class="titlepage"><div><div><h3 class="title"><a id="strings.string.simple"/>Simple Transformations</h3></div></div></div><p> Here are Standard, simple, and portable ways to perform common transformations on a <code class="code">string</code> instance, such as diff --git a/libstdc++-v3/doc/html/manual/support.html b/libstdc++-v3/doc/html/manual/support.html index 1017aa36b48..42a7a6c0475 100644 --- a/libstdc++-v3/doc/html/manual/support.html +++ b/libstdc++-v3/doc/html/manual/support.html @@ -7,7 +7,7 @@ Standard Contents </th><td align="right"> <a accesskey="n" href="dynamic_memory.html">Next</a></td></tr></table><hr/></div><div class="chapter" title="Chapter 4. Support"><div class="titlepage"><div><div><h2 class="title"><a id="std.support"/>Chapter 4. Support - <a id="id540958" class="indexterm"/> + <a id="id592037" class="indexterm"/> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="support.html#std.support.types">Types</a></span></dt><dd><dl><dt><span class="section"><a href="support.html#std.support.types.fundamental">Fundamental Types</a></span></dt><dt><span class="section"><a href="support.html#std.support.types.numeric_limits">Numeric Properties</a></span></dt><dt><span class="section"><a href="support.html#std.support.types.null">NULL</a></span></dt></dl></dd><dt><span class="section"><a href="dynamic_memory.html">Dynamic Memory</a></span></dt><dt><span class="section"><a href="termination.html">Termination</a></span></dt><dd><dl><dt><span class="section"><a href="termination.html#support.termination.handlers">Termination Handlers</a></span></dt><dt><span class="section"><a href="termination.html#support.termination.verbose">Verbose Terminate Handler</a></span></dt></dl></dd></dl></div><p> This part deals with the functions called and objects created automatically during the course of a program's existence. diff --git a/libstdc++-v3/doc/html/manual/test.html b/libstdc++-v3/doc/html/manual/test.html index 19c51d26ffb..c1c7d8e9eec 100644 --- a/libstdc++-v3/doc/html/manual/test.html +++ b/libstdc++-v3/doc/html/manual/test.html @@ -493,7 +493,7 @@ only default variables. reporting functions including: </p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>time_counter</p></li><li class="listitem"><p>resource_counter</p></li><li class="listitem"><p>report_performance</p></li></ul></div></li></ul></div></div></div><div class="section" title="Special Topics"><div class="titlepage"><div><div><h3 class="title"><a id="test.special"/>Special Topics</h3></div></div></div><div class="section" title="Qualifying Exception Safety Guarantees"><div class="titlepage"><div><div><h4 class="title"><a id="test.exception.safety"/> Qualifying Exception Safety Guarantees - <a id="id614459" class="indexterm"/> + <a id="id665496" class="indexterm"/> </h4></div></div></div><div class="section" title="Overview"><div class="titlepage"><div><div><h5 class="title"><a id="test.exception.safety.overview"/>Overview</h5></div></div></div><p> Testing is composed of running a particular test sequence, and looking at what happens to the surrounding code when diff --git a/libstdc++-v3/doc/html/manual/using.html b/libstdc++-v3/doc/html/manual/using.html index 29905cd7cc6..c297929d163 100644 --- a/libstdc++-v3/doc/html/manual/using.html +++ b/libstdc++-v3/doc/html/manual/using.html @@ -11,5 +11,5 @@ enumerated and detailed in the table below. </p><p> By default, <span class="command"><strong>g++</strong></span> is equivalent to <span class="command"><strong>g++ -std=gnu++98</strong></span>. The standard library also defaults to this dialect. - </p><div class="table"><a id="id535140"/><p class="title"><strong>Table 3.1. C++ Command Options</strong></p><div class="table-contents"><table summary="C++ Command Options" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/></colgroup><thead><tr><th style="text-align: left">Option Flags</th><th style="text-align: left">Description</th></tr></thead><tbody><tr><td style="text-align: left"><code class="literal">-std=c++98</code></td><td style="text-align: left">Use the 1998 ISO C++ standard plus amendments.</td></tr><tr><td style="text-align: left"><code class="literal">-std=gnu++98</code></td><td style="text-align: left">As directly above, with GNU extensions.</td></tr><tr><td style="text-align: left"><code class="literal">-std=c++11</code></td><td style="text-align: left">Use the 2011 ISO C++ standard.</td></tr><tr><td style="text-align: left"><code class="literal">-std=gnu++11</code></td><td style="text-align: left">As directly above, with GNU extensions.</td></tr><tr><td style="text-align: left"><code class="literal">-fexceptions</code></td><td style="text-align: left">See <a class="link" href="using_exceptions.html#intro.using.exception.no" title="Doing without">exception-free dialect</a></td></tr><tr><td style="text-align: left"><code class="literal">-frtti</code></td><td style="text-align: left">As above, but RTTI-free dialect.</td></tr><tr><td style="text-align: left"><code class="literal">-pthread</code> or <code class="literal">-pthreads</code></td><td style="text-align: left">For ISO C++11 <thread>, <future>, + </p><div class="table"><a id="id586219"/><p class="title"><strong>Table 3.1. C++ Command Options</strong></p><div class="table-contents"><table summary="C++ Command Options" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/></colgroup><thead><tr><th style="text-align: left">Option Flags</th><th style="text-align: left">Description</th></tr></thead><tbody><tr><td style="text-align: left"><code class="literal">-std=c++98</code></td><td style="text-align: left">Use the 1998 ISO C++ standard plus amendments.</td></tr><tr><td style="text-align: left"><code class="literal">-std=gnu++98</code></td><td style="text-align: left">As directly above, with GNU extensions.</td></tr><tr><td style="text-align: left"><code class="literal">-std=c++11</code></td><td style="text-align: left">Use the 2011 ISO C++ standard.</td></tr><tr><td style="text-align: left"><code class="literal">-std=gnu++11</code></td><td style="text-align: left">As directly above, with GNU extensions.</td></tr><tr><td style="text-align: left"><code class="literal">-fexceptions</code></td><td style="text-align: left">See <a class="link" href="using_exceptions.html#intro.using.exception.no" title="Doing without">exception-free dialect</a></td></tr><tr><td style="text-align: left"><code class="literal">-frtti</code></td><td style="text-align: left">As above, but RTTI-free dialect.</td></tr><tr><td style="text-align: left"><code class="literal">-pthread</code> or <code class="literal">-pthreads</code></td><td style="text-align: left">For ISO C++11 <thread>, <future>, <mutex>, or <condition_variable>.</td></tr><tr><td style="text-align: left"><code class="literal">-fopenmp</code></td><td style="text-align: left">For <a class="link" href="parallel_mode.html" title="Chapter 18. Parallel Mode">parallel</a> mode.</td></tr></tbody></table></div></div><br class="table-break"/></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td align="left"><a accesskey="p" href="make.html">Prev</a> </td><td align="center"><a accesskey="u" href="intro.html">Up</a></td><td align="right"> <a accesskey="n" href="using_headers.html">Next</a></td></tr><tr><td align="left" valign="top">Make </td><td align="center"><a accesskey="h" href="../index.html">Home</a></td><td align="right" valign="top"> Headers</td></tr></table></div></body></html> diff --git a/libstdc++-v3/doc/html/manual/using_concurrency.html b/libstdc++-v3/doc/html/manual/using_concurrency.html index e0c729263cd..2d203bb93fd 100644 --- a/libstdc++-v3/doc/html/manual/using_concurrency.html +++ b/libstdc++-v3/doc/html/manual/using_concurrency.html @@ -29,7 +29,7 @@ to display how ad hoc this is: On Solaris, both -pthreads and -threads (with subtly different meanings) are honored. On OSF, -pthread and -threads (with subtly different meanings) are - honored. On Linux/i386, -pthread is honored. On FreeBSD, + honored. On GNU/Linux x86, -pthread is honored. On FreeBSD, -pthread is honored. Some other ports use other switches. AFAIK, none of this is properly documented anywhere other than in ``gcc -dumpspecs'' (look at lib and cpp entries). diff --git a/libstdc++-v3/doc/html/manual/using_dynamic_or_shared.html b/libstdc++-v3/doc/html/manual/using_dynamic_or_shared.html index 4d1d6745b73..1c04a6f5844 100644 --- a/libstdc++-v3/doc/html/manual/using_dynamic_or_shared.html +++ b/libstdc++-v3/doc/html/manual/using_dynamic_or_shared.html @@ -76,7 +76,7 @@ A quick read of the relevant part of the GCC the linker. The exact format of the options is dependent on which linker you use: </p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p> - GNU ld (default on Linux): + GNU ld (default on GNU/Linux): <code class="literal">-Wl,-rpath,</code><code class="filename">destdir/lib</code> </p></li><li class="listitem"><p> IRIX ld: @@ -92,7 +92,7 @@ A quick read of the relevant part of the GCC On some platforms the system administrator can configure the dynamic linker to always look for libraries in <code class="filename">destdir/lib</code>, for example - by using the <span class="command"><strong>ldconfig</strong></span> utility on Linux + by using the <span class="command"><strong>ldconfig</strong></span> utility on GNU/Linux or the <span class="command"><strong>crle</strong></span> utility on Solaris. This is a system-wide change which can make the system unusable so if you are unsure then use one of the other methods described above. diff --git a/libstdc++-v3/doc/html/manual/using_exceptions.html b/libstdc++-v3/doc/html/manual/using_exceptions.html index ad340b234d3..b7f0118573a 100644 --- a/libstdc++-v3/doc/html/manual/using_exceptions.html +++ b/libstdc++-v3/doc/html/manual/using_exceptions.html @@ -266,7 +266,7 @@ is called. } catch(...) { this->_M_setstate(ios_base::badbit); } -</pre></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="using.exceptions.biblio"/>Bibliography</h3></div></div></div><div class="biblioentry" title="System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008)"><a id="id540116"/><p><span class="title"><em> +</pre></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="using.exceptions.biblio"/>Bibliography</h3></div></div></div><div class="biblioentry" title="System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008)"><a id="id591195"/><p><span class="title"><em> <a class="link" href="http://www.opengroup.org/austin"> System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008) </a> @@ -275,39 +275,39 @@ is called. . </span><span class="copyright">Copyright © 2008 The Open Group/The Institute of Electrical and Electronics Engineers, Inc. - . </span></p></div><div class="biblioentry" title="Error and Exception Handling"><a id="id540147"/><p><span class="title"><em> + . </span></p></div><div class="biblioentry" title="Error and Exception Handling"><a id="id591226"/><p><span class="title"><em> <a class="link" href="http://www.boost.org/community/error_handling.html"> Error and Exception Handling </a> </em>. </span><span class="author"><span class="firstname">David</span> <span class="surname">Abrahams </span>. </span><span class="publisher"><span class="publishername"> Boost - . </span></span></p></div><div class="biblioentry" title="Exception-Safety in Generic Components"><a id="id540177"/><p><span class="title"><em> + . </span></span></p></div><div class="biblioentry" title="Exception-Safety in Generic Components"><a id="id591256"/><p><span class="title"><em> <a class="link" href="http://www.boost.org/community/exception_safety.html"> Exception-Safety in Generic Components </a> </em>. </span><span class="author"><span class="firstname">David</span> <span class="surname">Abrahams</span>. </span><span class="publisher"><span class="publishername"> Boost - . </span></span></p></div><div class="biblioentry" title="Standard Library Exception Policy"><a id="id540208"/><p><span class="title"><em> + . </span></span></p></div><div class="biblioentry" title="Standard Library Exception Policy"><a id="id591287"/><p><span class="title"><em> <a class="link" href="www.open-std.org/jtc1/sc22/wg21/docs/papers/1997/N1077.pdf"> Standard Library Exception Policy </a> </em>. </span><span class="author"><span class="firstname">Matt</span> <span class="surname">Austern</span>. </span><span class="publisher"><span class="publishername"> WG21 N1077 - . </span></span></p></div><div class="biblioentry" title="ia64 c++ abi exception handling"><a id="id540239"/><p><span class="title"><em> + . </span></span></p></div><div class="biblioentry" title="ia64 c++ abi exception handling"><a id="id591318"/><p><span class="title"><em> <a class="link" href="http://gcc.gnu.org/ml/gcc-patches/2001-03/msg00661.html"> ia64 c++ abi exception handling </a> </em>. </span><span class="author"><span class="firstname">Richard</span> <span class="surname">Henderson</span>. </span><span class="publisher"><span class="publishername"> GNU - . </span></span></p></div><div class="biblioentry" title="Appendix E: Standard-Library Exception Safety"><a id="id540270"/><p><span class="title"><em> + . </span></span></p></div><div class="biblioentry" title="Appendix E: Standard-Library Exception Safety"><a id="id591349"/><p><span class="title"><em> <a class="link" href="http://www.research.att.com/~bs/3rd_safe.pdf"> Appendix E: Standard-Library Exception Safety </a> - </em>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span></p></div><div class="biblioentry"><a id="id540294"/><p><span class="citetitle"><em class="citetitle"> + </em>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span></p></div><div class="biblioentry"><a id="id591372"/><p><span class="citetitle"><em class="citetitle"> Exceptional C++ </em>. </span><span class="pagenums"> Exception-Safety Issues and Techniques - . </span><span class="author"><span class="firstname">Herb</span> <span class="surname">Sutter</span>. </span></p></div><div class="biblioentry" title="GCC Bug 25191: exception_defines.h #defines try/catch"><a id="id540313"/><p><span class="title"><em> + . </span><span class="author"><span class="firstname">Herb</span> <span class="surname">Sutter</span>. </span></p></div><div class="biblioentry" title="GCC Bug 25191: exception_defines.h #defines try/catch"><a id="id591392"/><p><span class="title"><em> <a class="link" href="http://gcc.gnu.org/PR25191"> GCC Bug 25191: exception_defines.h #defines try/catch </a> diff --git a/libstdc++-v3/doc/html/manual/using_headers.html b/libstdc++-v3/doc/html/manual/using_headers.html index 2b843bbef55..a4d24e236e0 100644 --- a/libstdc++-v3/doc/html/manual/using_headers.html +++ b/libstdc++-v3/doc/html/manual/using_headers.html @@ -19,19 +19,19 @@ the 1998 standard as updated for 2003, and the current 2011 standard. </p><p> C++98/03 include files. These are available in the default compilation mode, i.e. <code class="code">-std=c++98</code> or <code class="code">-std=gnu++98</code>. - </p><div class="table"><a id="id535369"/><p class="title"><strong>Table 3.2. C++ 1998 Library Headers</strong></p><div class="table-contents"><table summary="C++ 1998 Library Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="filename">bitset</code></td><td style="text-align: left"><code class="filename">complex</code></td><td style="text-align: left"><code class="filename">deque</code></td><td style="text-align: left"><code class="filename">exception</code></td></tr><tr><td style="text-align: left"><code class="filename">fstream</code></td><td style="text-align: left"><code class="filename">functional</code></td><td style="text-align: left"><code class="filename">iomanip</code></td><td style="text-align: left"><code class="filename">ios</code></td><td style="text-align: left"><code class="filename">iosfwd</code></td></tr><tr><td style="text-align: left"><code class="filename">iostream</code></td><td style="text-align: left"><code class="filename">istream</code></td><td style="text-align: left"><code class="filename">iterator</code></td><td style="text-align: left"><code class="filename">limits</code></td><td style="text-align: left"><code class="filename">list</code></td></tr><tr><td style="text-align: left"><code class="filename">locale</code></td><td style="text-align: left"><code class="filename">map</code></td><td style="text-align: left"><code class="filename">memory</code></td><td style="text-align: left"><code class="filename">new</code></td><td style="text-align: left"><code class="filename">numeric</code></td></tr><tr><td style="text-align: left"><code class="filename">ostream</code></td><td style="text-align: left"><code class="filename">queue</code></td><td style="text-align: left"><code class="filename">set</code></td><td style="text-align: left"><code class="filename">sstream</code></td><td style="text-align: left"><code class="filename">stack</code></td></tr><tr><td style="text-align: left"><code class="filename">stdexcept</code></td><td style="text-align: left"><code class="filename">streambuf</code></td><td style="text-align: left"><code class="filename">string</code></td><td style="text-align: left"><code class="filename">utility</code></td><td style="text-align: left"><code class="filename">typeinfo</code></td></tr><tr><td style="text-align: left"><code class="filename">valarray</code></td><td style="text-align: left"><code class="filename">vector</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break"/><p/><div class="table"><a id="id535673"/><p class="title"><strong>Table 3.3. C++ 1998 Library Headers for C Library Facilities</strong></p><div class="table-contents"><table summary="C++ 1998 Library Headers for C Library Facilities" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">cassert</code></td><td style="text-align: left"><code class="filename">cerrno</code></td><td style="text-align: left"><code class="filename">cctype</code></td><td style="text-align: left"><code class="filename">cfloat</code></td><td style="text-align: left"><code class="filename">ciso646</code></td></tr><tr><td style="text-align: left"><code class="filename">climits</code></td><td style="text-align: left"><code class="filename">clocale</code></td><td style="text-align: left"><code class="filename">cmath</code></td><td style="text-align: left"><code class="filename">csetjmp</code></td><td style="text-align: left"><code class="filename">csignal</code></td></tr><tr><td style="text-align: left"><code class="filename">cstdarg</code></td><td style="text-align: left"><code class="filename">cstddef</code></td><td style="text-align: left"><code class="filename">cstdio</code></td><td style="text-align: left"><code class="filename">cstdlib</code></td><td style="text-align: left"><code class="filename">cstring</code></td></tr><tr><td style="text-align: left"><code class="filename">ctime</code></td><td style="text-align: left"><code class="filename">cwchar</code></td><td style="text-align: left"><code class="filename">cwctype</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break"/><p> + </p><div class="table"><a id="id586447"/><p class="title"><strong>Table 3.2. C++ 1998 Library Headers</strong></p><div class="table-contents"><table summary="C++ 1998 Library Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="filename">bitset</code></td><td style="text-align: left"><code class="filename">complex</code></td><td style="text-align: left"><code class="filename">deque</code></td><td style="text-align: left"><code class="filename">exception</code></td></tr><tr><td style="text-align: left"><code class="filename">fstream</code></td><td style="text-align: left"><code class="filename">functional</code></td><td style="text-align: left"><code class="filename">iomanip</code></td><td style="text-align: left"><code class="filename">ios</code></td><td style="text-align: left"><code class="filename">iosfwd</code></td></tr><tr><td style="text-align: left"><code class="filename">iostream</code></td><td style="text-align: left"><code class="filename">istream</code></td><td style="text-align: left"><code class="filename">iterator</code></td><td style="text-align: left"><code class="filename">limits</code></td><td style="text-align: left"><code class="filename">list</code></td></tr><tr><td style="text-align: left"><code class="filename">locale</code></td><td style="text-align: left"><code class="filename">map</code></td><td style="text-align: left"><code class="filename">memory</code></td><td style="text-align: left"><code class="filename">new</code></td><td style="text-align: left"><code class="filename">numeric</code></td></tr><tr><td style="text-align: left"><code class="filename">ostream</code></td><td style="text-align: left"><code class="filename">queue</code></td><td style="text-align: left"><code class="filename">set</code></td><td style="text-align: left"><code class="filename">sstream</code></td><td style="text-align: left"><code class="filename">stack</code></td></tr><tr><td style="text-align: left"><code class="filename">stdexcept</code></td><td style="text-align: left"><code class="filename">streambuf</code></td><td style="text-align: left"><code class="filename">string</code></td><td style="text-align: left"><code class="filename">utility</code></td><td style="text-align: left"><code class="filename">typeinfo</code></td></tr><tr><td style="text-align: left"><code class="filename">valarray</code></td><td style="text-align: left"><code class="filename">vector</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break"/><p/><div class="table"><a id="id586751"/><p class="title"><strong>Table 3.3. C++ 1998 Library Headers for C Library Facilities</strong></p><div class="table-contents"><table summary="C++ 1998 Library Headers for C Library Facilities" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">cassert</code></td><td style="text-align: left"><code class="filename">cerrno</code></td><td style="text-align: left"><code class="filename">cctype</code></td><td style="text-align: left"><code class="filename">cfloat</code></td><td style="text-align: left"><code class="filename">ciso646</code></td></tr><tr><td style="text-align: left"><code class="filename">climits</code></td><td style="text-align: left"><code class="filename">clocale</code></td><td style="text-align: left"><code class="filename">cmath</code></td><td style="text-align: left"><code class="filename">csetjmp</code></td><td style="text-align: left"><code class="filename">csignal</code></td></tr><tr><td style="text-align: left"><code class="filename">cstdarg</code></td><td style="text-align: left"><code class="filename">cstddef</code></td><td style="text-align: left"><code class="filename">cstdio</code></td><td style="text-align: left"><code class="filename">cstdlib</code></td><td style="text-align: left"><code class="filename">cstring</code></td></tr><tr><td style="text-align: left"><code class="filename">ctime</code></td><td style="text-align: left"><code class="filename">cwchar</code></td><td style="text-align: left"><code class="filename">cwctype</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break"/><p> C++11 include files. These are only available in C++11 compilation mode, i.e. <code class="literal">-std=c++11</code> or <code class="literal">-std=gnu++11</code>. -</p><p/><div class="table"><a id="id535879"/><p class="title"><strong>Table 3.4. C++ 2011 Library Headers</strong></p><div class="table-contents"><table summary="C++ 2011 Library Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="filename">array</code></td><td style="text-align: left"><code class="filename">bitset</code></td><td style="text-align: left"><code class="filename">chrono</code></td><td style="text-align: left"><code class="filename">complex</code></td></tr><tr><td style="text-align: left"><code class="filename">condition_variable</code></td><td style="text-align: left"><code class="filename">deque</code></td><td style="text-align: left"><code class="filename">exception</code></td><td style="text-align: left"><code class="filename">forward_list</code></td><td style="text-align: left"><code class="filename">fstream</code></td></tr><tr><td style="text-align: left"><code class="filename">functional</code></td><td style="text-align: left"><code class="filename">future</code></td><td style="text-align: left"><code class="filename">initalizer_list</code></td><td style="text-align: left"><code class="filename">iomanip</code></td><td style="text-align: left"><code class="filename">ios</code></td></tr><tr><td style="text-align: left"><code class="filename">iosfwd</code></td><td style="text-align: left"><code class="filename">iostream</code></td><td style="text-align: left"><code class="filename">istream</code></td><td style="text-align: left"><code class="filename">iterator</code></td><td style="text-align: left"><code class="filename">limits</code></td></tr><tr><td style="text-align: left"><code class="filename">list</code></td><td style="text-align: left"><code class="filename">locale</code></td><td style="text-align: left"><code class="filename">map</code></td><td style="text-align: left"><code class="filename">memory</code></td><td style="text-align: left"><code class="filename">mutex</code></td></tr><tr><td style="text-align: left"><code class="filename">new</code></td><td style="text-align: left"><code class="filename">numeric</code></td><td style="text-align: left"><code class="filename">ostream</code></td><td style="text-align: left"><code class="filename">queue</code></td><td style="text-align: left"><code class="filename">random</code></td></tr><tr><td style="text-align: left"><code class="filename">ratio</code></td><td style="text-align: left"><code class="filename">regex</code></td><td style="text-align: left"><code class="filename">set</code></td><td style="text-align: left"><code class="filename">sstream</code></td><td style="text-align: left"><code class="filename">stack</code></td></tr><tr><td style="text-align: left"><code class="filename">stdexcept</code></td><td style="text-align: left"><code class="filename">streambuf</code></td><td style="text-align: left"><code class="filename">string</code></td><td style="text-align: left"><code class="filename">system_error</code></td><td style="text-align: left"><code class="filename">thread</code></td></tr><tr><td style="text-align: left"><code class="filename">tuple</code></td><td style="text-align: left"><code class="filename">type_traits</code></td><td style="text-align: left"><code class="filename">typeinfo</code></td><td style="text-align: left"><code class="filename">unordered_map</code></td><td style="text-align: left"><code class="filename">unordered_set</code></td></tr><tr><td style="text-align: left"><code class="filename">utility</code></td><td style="text-align: left"><code class="filename">valarray</code></td><td style="text-align: left"><code class="filename">vector</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break"/><p/><div class="table"><a id="id536308"/><p class="title"><strong>Table 3.5. C++ 2011 Library Headers for C Library Facilities</strong></p><div class="table-contents"><table summary="C++ 2011 Library Headers for C Library Facilities" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">cassert</code></td><td style="text-align: left"><code class="filename">ccomplex</code></td><td style="text-align: left"><code class="filename">cctype</code></td><td style="text-align: left"><code class="filename">cerrno</code></td><td style="text-align: left"><code class="filename">cfenv</code></td></tr><tr><td style="text-align: left"><code class="filename">cfloat</code></td><td style="text-align: left"><code class="filename">cinttypes</code></td><td style="text-align: left"><code class="filename">ciso646</code></td><td style="text-align: left"><code class="filename">climits</code></td><td style="text-align: left"><code class="filename">clocale</code></td></tr><tr><td style="text-align: left"><code class="filename">cmath</code></td><td style="text-align: left"><code class="filename">csetjmp</code></td><td style="text-align: left"><code class="filename">csignal</code></td><td style="text-align: left"><code class="filename">cstdarg</code></td><td style="text-align: left"><code class="filename">cstdbool</code></td></tr><tr><td style="text-align: left"><code class="filename">cstddef</code></td><td style="text-align: left"><code class="filename">cstdint</code></td><td style="text-align: left"><code class="filename">cstdlib</code></td><td style="text-align: left"><code class="filename">cstdio</code></td><td style="text-align: left"><code class="filename">cstring</code></td></tr><tr><td style="text-align: left"><code class="filename">ctgmath</code></td><td style="text-align: left"><code class="filename">ctime</code></td><td style="text-align: left"><code class="filename">cuchar</code></td><td style="text-align: left"><code class="filename">cwchar</code></td><td style="text-align: left"><code class="filename">cwctype</code></td></tr></tbody></table></div></div><br class="table-break"/><p> +</p><p/><div class="table"><a id="id586958"/><p class="title"><strong>Table 3.4. C++ 2011 Library Headers</strong></p><div class="table-contents"><table summary="C++ 2011 Library Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="filename">array</code></td><td style="text-align: left"><code class="filename">bitset</code></td><td style="text-align: left"><code class="filename">chrono</code></td><td style="text-align: left"><code class="filename">complex</code></td></tr><tr><td style="text-align: left"><code class="filename">condition_variable</code></td><td style="text-align: left"><code class="filename">deque</code></td><td style="text-align: left"><code class="filename">exception</code></td><td style="text-align: left"><code class="filename">forward_list</code></td><td style="text-align: left"><code class="filename">fstream</code></td></tr><tr><td style="text-align: left"><code class="filename">functional</code></td><td style="text-align: left"><code class="filename">future</code></td><td style="text-align: left"><code class="filename">initalizer_list</code></td><td style="text-align: left"><code class="filename">iomanip</code></td><td style="text-align: left"><code class="filename">ios</code></td></tr><tr><td style="text-align: left"><code class="filename">iosfwd</code></td><td style="text-align: left"><code class="filename">iostream</code></td><td style="text-align: left"><code class="filename">istream</code></td><td style="text-align: left"><code class="filename">iterator</code></td><td style="text-align: left"><code class="filename">limits</code></td></tr><tr><td style="text-align: left"><code class="filename">list</code></td><td style="text-align: left"><code class="filename">locale</code></td><td style="text-align: left"><code class="filename">map</code></td><td style="text-align: left"><code class="filename">memory</code></td><td style="text-align: left"><code class="filename">mutex</code></td></tr><tr><td style="text-align: left"><code class="filename">new</code></td><td style="text-align: left"><code class="filename">numeric</code></td><td style="text-align: left"><code class="filename">ostream</code></td><td style="text-align: left"><code class="filename">queue</code></td><td style="text-align: left"><code class="filename">random</code></td></tr><tr><td style="text-align: left"><code class="filename">ratio</code></td><td style="text-align: left"><code class="filename">regex</code></td><td style="text-align: left"><code class="filename">set</code></td><td style="text-align: left"><code class="filename">sstream</code></td><td style="text-align: left"><code class="filename">stack</code></td></tr><tr><td style="text-align: left"><code class="filename">stdexcept</code></td><td style="text-align: left"><code class="filename">streambuf</code></td><td style="text-align: left"><code class="filename">string</code></td><td style="text-align: left"><code class="filename">system_error</code></td><td style="text-align: left"><code class="filename">thread</code></td></tr><tr><td style="text-align: left"><code class="filename">tuple</code></td><td style="text-align: left"><code class="filename">type_traits</code></td><td style="text-align: left"><code class="filename">typeinfo</code></td><td style="text-align: left"><code class="filename">unordered_map</code></td><td style="text-align: left"><code class="filename">unordered_set</code></td></tr><tr><td style="text-align: left"><code class="filename">utility</code></td><td style="text-align: left"><code class="filename">valarray</code></td><td style="text-align: left"><code class="filename">vector</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break"/><p/><div class="table"><a id="id587386"/><p class="title"><strong>Table 3.5. C++ 2011 Library Headers for C Library Facilities</strong></p><div class="table-contents"><table summary="C++ 2011 Library Headers for C Library Facilities" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">cassert</code></td><td style="text-align: left"><code class="filename">ccomplex</code></td><td style="text-align: left"><code class="filename">cctype</code></td><td style="text-align: left"><code class="filename">cerrno</code></td><td style="text-align: left"><code class="filename">cfenv</code></td></tr><tr><td style="text-align: left"><code class="filename">cfloat</code></td><td style="text-align: left"><code class="filename">cinttypes</code></td><td style="text-align: left"><code class="filename">ciso646</code></td><td style="text-align: left"><code class="filename">climits</code></td><td style="text-align: left"><code class="filename">clocale</code></td></tr><tr><td style="text-align: left"><code class="filename">cmath</code></td><td style="text-align: left"><code class="filename">csetjmp</code></td><td style="text-align: left"><code class="filename">csignal</code></td><td style="text-align: left"><code class="filename">cstdarg</code></td><td style="text-align: left"><code class="filename">cstdbool</code></td></tr><tr><td style="text-align: left"><code class="filename">cstddef</code></td><td style="text-align: left"><code class="filename">cstdint</code></td><td style="text-align: left"><code class="filename">cstdlib</code></td><td style="text-align: left"><code class="filename">cstdio</code></td><td style="text-align: left"><code class="filename">cstring</code></td></tr><tr><td style="text-align: left"><code class="filename">ctgmath</code></td><td style="text-align: left"><code class="filename">ctime</code></td><td style="text-align: left"><code class="filename">cuchar</code></td><td style="text-align: left"><code class="filename">cwchar</code></td><td style="text-align: left"><code class="filename">cwctype</code></td></tr></tbody></table></div></div><br class="table-break"/><p> In addition, TR1 includes as: -</p><div class="table"><a id="id536557"/><p class="title"><strong>Table 3.6. C++ TR 1 Library Headers</strong></p><div class="table-contents"><table summary="C++ TR 1 Library Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">tr1/array</code></td><td style="text-align: left"><code class="filename">tr1/complex</code></td><td style="text-align: left"><code class="filename">tr1/memory</code></td><td style="text-align: left"><code class="filename">tr1/functional</code></td><td style="text-align: left"><code class="filename">tr1/random</code></td></tr><tr><td style="text-align: left"><code class="filename">tr1/regex</code></td><td style="text-align: left"><code class="filename">tr1/tuple</code></td><td style="text-align: left"><code class="filename">tr1/type_traits</code></td><td style="text-align: left"><code class="filename">tr1/unordered_map</code></td><td style="text-align: left"><code class="filename">tr1/unordered_set</code></td></tr><tr><td style="text-align: left"><code class="filename">tr1/utility</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break"/><p/><div class="table"><a id="id536698"/><p class="title"><strong>Table 3.7. C++ TR 1 Library Headers for C Library Facilities</strong></p><div class="table-contents"><table summary="C++ TR 1 Library Headers for C Library Facilities" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">tr1/ccomplex</code></td><td style="text-align: left"><code class="filename">tr1/cfenv</code></td><td style="text-align: left"><code class="filename">tr1/cfloat</code></td><td style="text-align: left"><code class="filename">tr1/cmath</code></td><td style="text-align: left"><code class="filename">tr1/cinttypes</code></td></tr><tr><td style="text-align: left"><code class="filename">tr1/climits</code></td><td style="text-align: left"><code class="filename">tr1/cstdarg</code></td><td style="text-align: left"><code class="filename">tr1/cstdbool</code></td><td style="text-align: left"><code class="filename">tr1/cstdint</code></td><td style="text-align: left"><code class="filename">tr1/cstdio</code></td></tr><tr><td style="text-align: left"><code class="filename">tr1/cstdlib</code></td><td style="text-align: left"><code class="filename">tr1/ctgmath</code></td><td style="text-align: left"><code class="filename">tr1/ctime</code></td><td style="text-align: left"><code class="filename">tr1/cwchar</code></td><td style="text-align: left"><code class="filename">tr1/cwctype</code></td></tr></tbody></table></div></div><br class="table-break"/><p>Decimal floating-point arithmetic is available if the C++ +</p><div class="table"><a id="id587635"/><p class="title"><strong>Table 3.6. C++ TR 1 Library Headers</strong></p><div class="table-contents"><table summary="C++ TR 1 Library Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">tr1/array</code></td><td style="text-align: left"><code class="filename">tr1/complex</code></td><td style="text-align: left"><code class="filename">tr1/memory</code></td><td style="text-align: left"><code class="filename">tr1/functional</code></td><td style="text-align: left"><code class="filename">tr1/random</code></td></tr><tr><td style="text-align: left"><code class="filename">tr1/regex</code></td><td style="text-align: left"><code class="filename">tr1/tuple</code></td><td style="text-align: left"><code class="filename">tr1/type_traits</code></td><td style="text-align: left"><code class="filename">tr1/unordered_map</code></td><td style="text-align: left"><code class="filename">tr1/unordered_set</code></td></tr><tr><td style="text-align: left"><code class="filename">tr1/utility</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break"/><p/><div class="table"><a id="id587776"/><p class="title"><strong>Table 3.7. C++ TR 1 Library Headers for C Library Facilities</strong></p><div class="table-contents"><table summary="C++ TR 1 Library Headers for C Library Facilities" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">tr1/ccomplex</code></td><td style="text-align: left"><code class="filename">tr1/cfenv</code></td><td style="text-align: left"><code class="filename">tr1/cfloat</code></td><td style="text-align: left"><code class="filename">tr1/cmath</code></td><td style="text-align: left"><code class="filename">tr1/cinttypes</code></td></tr><tr><td style="text-align: left"><code class="filename">tr1/climits</code></td><td style="text-align: left"><code class="filename">tr1/cstdarg</code></td><td style="text-align: left"><code class="filename">tr1/cstdbool</code></td><td style="text-align: left"><code class="filename">tr1/cstdint</code></td><td style="text-align: left"><code class="filename">tr1/cstdio</code></td></tr><tr><td style="text-align: left"><code class="filename">tr1/cstdlib</code></td><td style="text-align: left"><code class="filename">tr1/ctgmath</code></td><td style="text-align: left"><code class="filename">tr1/ctime</code></td><td style="text-align: left"><code class="filename">tr1/cwchar</code></td><td style="text-align: left"><code class="filename">tr1/cwctype</code></td></tr></tbody></table></div></div><br class="table-break"/><p>Decimal floating-point arithmetic is available if the C++ compiler supports scalar decimal floating-point types defined via <code class="code">__attribute__((mode(SD|DD|LD)))</code>. -</p><div class="table"><a id="id536874"/><p class="title"><strong>Table 3.8. C++ TR 24733 Decimal Floating-Point Header</strong></p><div class="table-contents"><table summary="C++ TR 24733 Decimal Floating-Point Header" border="1"><colgroup><col style="text-align: left" class="c1"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">decimal/decimal</code></td></tr></tbody></table></div></div><br class="table-break"/><p> +</p><div class="table"><a id="id587952"/><p class="title"><strong>Table 3.8. C++ TR 24733 Decimal Floating-Point Header</strong></p><div class="table-contents"><table summary="C++ TR 24733 Decimal Floating-Point Header" border="1"><colgroup><col style="text-align: left" class="c1"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">decimal/decimal</code></td></tr></tbody></table></div></div><br class="table-break"/><p> Also included are files for the C++ ABI interface: -</p><div class="table"><a id="id536920"/><p class="title"><strong>Table 3.9. C++ ABI Headers</strong></p><div class="table-contents"><table summary="C++ ABI Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">cxxabi.h</code></td><td style="text-align: left"><code class="filename">cxxabi_forced.h</code></td></tr></tbody></table></div></div><br class="table-break"/><p> +</p><div class="table"><a id="id587998"/><p class="title"><strong>Table 3.9. C++ ABI Headers</strong></p><div class="table-contents"><table summary="C++ ABI Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">cxxabi.h</code></td><td style="text-align: left"><code class="filename">cxxabi_forced.h</code></td></tr></tbody></table></div></div><br class="table-break"/><p> And a large variety of extensions. -</p><div class="table"><a id="id536973"/><p class="title"><strong>Table 3.10. Extension Headers</strong></p><div class="table-contents"><table summary="Extension Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">ext/algorithm</code></td><td style="text-align: left"><code class="filename">ext/atomicity.h</code></td><td style="text-align: left"><code class="filename">ext/array_allocator.h</code></td><td style="text-align: left"><code class="filename">ext/bitmap_allocator.h</code></td><td style="text-align: left"><code class="filename">ext/cast.h</code></td></tr><tr><td style="text-align: left"><code class="filename">ext/codecvt_specializations.h</code></td><td style="text-align: left"><code class="filename">ext/concurrence.h</code></td><td style="text-align: left"><code class="filename">ext/debug_allocator.h</code></td><td style="text-align: left"><code class="filename">ext/enc_filebuf.h</code></td><td style="text-align: left"><code class="filename">ext/extptr_allocator.h</code></td></tr><tr><td style="text-align: left"><code class="filename">ext/functional</code></td><td style="text-align: left"><code class="filename">ext/iterator</code></td><td style="text-align: left"><code class="filename">ext/malloc_allocator.h</code></td><td style="text-align: left"><code class="filename">ext/memory</code></td><td style="text-align: left"><code class="filename">ext/mt_allocator.h</code></td></tr><tr><td style="text-align: left"><code class="filename">ext/new_allocator.h</code></td><td style="text-align: left"><code class="filename">ext/numeric</code></td><td style="text-align: left"><code class="filename">ext/numeric_traits.h</code></td><td style="text-align: left"><code class="filename">ext/pb_ds/assoc_container.h</code></td><td style="text-align: left"><code class="filename">ext/pb_ds/priority_queue.h</code></td></tr><tr><td style="text-align: left"><code class="filename">ext/pod_char_traits.h</code></td><td style="text-align: left"><code class="filename">ext/pool_allocator.h</code></td><td style="text-align: left"><code class="filename">ext/rb_tree</code></td><td style="text-align: left"><code class="filename">ext/rope</code></td><td style="text-align: left"><code class="filename">ext/slist</code></td></tr><tr><td style="text-align: left"><code class="filename">ext/stdio_filebuf.h</code></td><td style="text-align: left"><code class="filename">ext/stdio_sync_filebuf.h</code></td><td style="text-align: left"><code class="filename">ext/throw_allocator.h</code></td><td style="text-align: left"><code class="filename">ext/typelist.h</code></td><td style="text-align: left"><code class="filename">ext/type_traits.h</code></td></tr><tr><td style="text-align: left"><code class="filename">ext/vstring.h</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break"/><p/><div class="table"><a id="id537271"/><p class="title"><strong>Table 3.11. Extension Debug Headers</strong></p><div class="table-contents"><table summary="Extension Debug Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">debug/bitset</code></td><td style="text-align: left"><code class="filename">debug/deque</code></td><td style="text-align: left"><code class="filename">debug/list</code></td><td style="text-align: left"><code class="filename">debug/map</code></td><td style="text-align: left"><code class="filename">debug/set</code></td></tr><tr><td style="text-align: left"><code class="filename">debug/string</code></td><td style="text-align: left"><code class="filename">debug/unordered_map</code></td><td style="text-align: left"><code class="filename">debug/unordered_set</code></td><td style="text-align: left"><code class="filename">debug/vector</code></td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break"/><p/><div class="table"><a id="id537394"/><p class="title"><strong>Table 3.12. Extension Profile Headers</strong></p><div class="table-contents"><table summary="Extension Profile Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">profile/bitset</code></td><td style="text-align: left"><code class="filename">profile/deque</code></td><td style="text-align: left"><code class="filename">profile/list</code></td><td style="text-align: left"><code class="filename">profile/map</code></td></tr><tr><td style="text-align: left"><code class="filename">profile/set</code></td><td style="text-align: left"><code class="filename">profile/unordered_map</code></td><td style="text-align: left"><code class="filename">profile/unordered_set</code></td><td style="text-align: left"><code class="filename">profile/vector</code></td></tr></tbody></table></div></div><br class="table-break"/><p/><div class="table"><a id="id537505"/><p class="title"><strong>Table 3.13. Extension Parallel Headers</strong></p><div class="table-contents"><table summary="Extension Parallel Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">parallel/algorithm</code></td><td style="text-align: left"><code class="filename">parallel/numeric</code></td></tr></tbody></table></div></div><br class="table-break"/></div><div class="section" title="Mixing Headers"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.using.headers.mixing"/>Mixing Headers</h3></div></div></div><p> A few simple rules. +</p><div class="table"><a id="id588051"/><p class="title"><strong>Table 3.10. Extension Headers</strong></p><div class="table-contents"><table summary="Extension Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">ext/algorithm</code></td><td style="text-align: left"><code class="filename">ext/atomicity.h</code></td><td style="text-align: left"><code class="filename">ext/array_allocator.h</code></td><td style="text-align: left"><code class="filename">ext/bitmap_allocator.h</code></td><td style="text-align: left"><code class="filename">ext/cast.h</code></td></tr><tr><td style="text-align: left"><code class="filename">ext/codecvt_specializations.h</code></td><td style="text-align: left"><code class="filename">ext/concurrence.h</code></td><td style="text-align: left"><code class="filename">ext/debug_allocator.h</code></td><td style="text-align: left"><code class="filename">ext/enc_filebuf.h</code></td><td style="text-align: left"><code class="filename">ext/extptr_allocator.h</code></td></tr><tr><td style="text-align: left"><code class="filename">ext/functional</code></td><td style="text-align: left"><code class="filename">ext/iterator</code></td><td style="text-align: left"><code class="filename">ext/malloc_allocator.h</code></td><td style="text-align: left"><code class="filename">ext/memory</code></td><td style="text-align: left"><code class="filename">ext/mt_allocator.h</code></td></tr><tr><td style="text-align: left"><code class="filename">ext/new_allocator.h</code></td><td style="text-align: left"><code class="filename">ext/numeric</code></td><td style="text-align: left"><code class="filename">ext/numeric_traits.h</code></td><td style="text-align: left"><code class="filename">ext/pb_ds/assoc_container.h</code></td><td style="text-align: left"><code class="filename">ext/pb_ds/priority_queue.h</code></td></tr><tr><td style="text-align: left"><code class="filename">ext/pod_char_traits.h</code></td><td style="text-align: left"><code class="filename">ext/pool_allocator.h</code></td><td style="text-align: left"><code class="filename">ext/rb_tree</code></td><td style="text-align: left"><code class="filename">ext/rope</code></td><td style="text-align: left"><code class="filename">ext/slist</code></td></tr><tr><td style="text-align: left"><code class="filename">ext/stdio_filebuf.h</code></td><td style="text-align: left"><code class="filename">ext/stdio_sync_filebuf.h</code></td><td style="text-align: left"><code class="filename">ext/throw_allocator.h</code></td><td style="text-align: left"><code class="filename">ext/typelist.h</code></td><td style="text-align: left"><code class="filename">ext/type_traits.h</code></td></tr><tr><td style="text-align: left"><code class="filename">ext/vstring.h</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break"/><p/><div class="table"><a id="id588349"/><p class="title"><strong>Table 3.11. Extension Debug Headers</strong></p><div class="table-contents"><table summary="Extension Debug Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">debug/bitset</code></td><td style="text-align: left"><code class="filename">debug/deque</code></td><td style="text-align: left"><code class="filename">debug/list</code></td><td style="text-align: left"><code class="filename">debug/map</code></td><td style="text-align: left"><code class="filename">debug/set</code></td></tr><tr><td style="text-align: left"><code class="filename">debug/string</code></td><td style="text-align: left"><code class="filename">debug/unordered_map</code></td><td style="text-align: left"><code class="filename">debug/unordered_set</code></td><td style="text-align: left"><code class="filename">debug/vector</code></td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break"/><p/><div class="table"><a id="id588472"/><p class="title"><strong>Table 3.12. Extension Profile Headers</strong></p><div class="table-contents"><table summary="Extension Profile Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">profile/bitset</code></td><td style="text-align: left"><code class="filename">profile/deque</code></td><td style="text-align: left"><code class="filename">profile/list</code></td><td style="text-align: left"><code class="filename">profile/map</code></td></tr><tr><td style="text-align: left"><code class="filename">profile/set</code></td><td style="text-align: left"><code class="filename">profile/unordered_map</code></td><td style="text-align: left"><code class="filename">profile/unordered_set</code></td><td style="text-align: left"><code class="filename">profile/vector</code></td></tr></tbody></table></div></div><br class="table-break"/><p/><div class="table"><a id="id588584"/><p class="title"><strong>Table 3.13. Extension Parallel Headers</strong></p><div class="table-contents"><table summary="Extension Parallel Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">parallel/algorithm</code></td><td style="text-align: left"><code class="filename">parallel/numeric</code></td></tr></tbody></table></div></div><br class="table-break"/></div><div class="section" title="Mixing Headers"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.using.headers.mixing"/>Mixing Headers</h3></div></div></div><p> A few simple rules. </p><p>First, mixing different dialects of the standard headers is not possible. It's an all-or-nothing affair. Thus, code like </p><pre class="programlisting"> diff --git a/libstdc++-v3/doc/html/manual/utilities.html b/libstdc++-v3/doc/html/manual/utilities.html index 7534a18cb4e..0825e39ed21 100644 --- a/libstdc++-v3/doc/html/manual/utilities.html +++ b/libstdc++-v3/doc/html/manual/utilities.html @@ -7,11 +7,11 @@ Standard Contents </th><td align="right"> <a accesskey="n" href="pairs.html">Next</a></td></tr></table><hr/></div><div class="chapter" title="Chapter 6. Utilities"><div class="titlepage"><div><div><h2 class="title"><a id="std.util"/>Chapter 6. Utilities - <a id="id541935" class="indexterm"/> -</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="utilities.html#std.util.functors">Functors</a></span></dt><dt><span class="section"><a href="pairs.html">Pairs</a></span></dt><dt><span class="section"><a href="memory.html">Memory</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#std.util.memory.allocator">Allocators</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#allocator.req">Requirements</a></span></dt><dt><span class="section"><a href="memory.html#allocator.design_issues">Design Issues</a></span></dt><dt><span class="section"><a href="memory.html#allocator.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#id542426">Interface Design</a></span></dt><dt><span class="section"><a href="memory.html#id542456">Selecting Default Allocation Policy</a></span></dt><dt><span class="section"><a href="memory.html#id542566">Disabling Memory Caching</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#allocator.using">Using a Specific Allocator</a></span></dt><dt><span class="section"><a href="memory.html#allocator.custom">Custom Allocators</a></span></dt><dt><span class="section"><a href="memory.html#allocator.ext">Extension Allocators</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#std.util.memory.auto_ptr">auto_ptr</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#auto_ptr.limitations">Limitations</a></span></dt><dt><span class="section"><a href="memory.html#auto_ptr.using">Use in Containers</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#std.util.memory.shared_ptr">shared_ptr</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#shared_ptr.req">Requirements</a></span></dt><dt><span class="section"><a href="memory.html#shared_ptr.design_issues">Design Issues</a></span></dt><dt><span class="section"><a href="memory.html#shared_ptr.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#id543565">Class Hierarchy</a></span></dt><dt><span class="section"><a href="memory.html#id543744">Thread Safety</a></span></dt><dt><span class="section"><a href="memory.html#id543814">Selecting Lock Policy</a></span></dt><dt><span class="section"><a href="memory.html#id543936">Dual C++11 and TR1 Implementation</a></span></dt><dt><span class="section"><a href="memory.html#id543992">Related functions and classes</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#shared_ptr.using">Use</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#id556361">Examples</a></span></dt><dt><span class="section"><a href="memory.html#id556391">Unresolved Issues</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#shared_ptr.ack">Acknowledgments</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="traits.html">Traits</a></span></dt></dl></div><div class="section" title="Functors"><div class="titlepage"><div><div><h2 class="title"><a id="std.util.functors"/>Functors</h2></div></div></div><p>If you don't know what functors are, you're not alone. Many people + <a id="id593014" class="indexterm"/> +</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="utilities.html#std.util.functors">Functors</a></span></dt><dt><span class="section"><a href="pairs.html">Pairs</a></span></dt><dt><span class="section"><a href="memory.html">Memory</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#std.util.memory.allocator">Allocators</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#allocator.req">Requirements</a></span></dt><dt><span class="section"><a href="memory.html#allocator.design_issues">Design Issues</a></span></dt><dt><span class="section"><a href="memory.html#allocator.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#id593505">Interface Design</a></span></dt><dt><span class="section"><a href="memory.html#id593534">Selecting Default Allocation Policy</a></span></dt><dt><span class="section"><a href="memory.html#id593645">Disabling Memory Caching</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#allocator.using">Using a Specific Allocator</a></span></dt><dt><span class="section"><a href="memory.html#allocator.custom">Custom Allocators</a></span></dt><dt><span class="section"><a href="memory.html#allocator.ext">Extension Allocators</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#std.util.memory.auto_ptr">auto_ptr</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#auto_ptr.limitations">Limitations</a></span></dt><dt><span class="section"><a href="memory.html#auto_ptr.using">Use in Containers</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#std.util.memory.shared_ptr">shared_ptr</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#shared_ptr.req">Requirements</a></span></dt><dt><span class="section"><a href="memory.html#shared_ptr.design_issues">Design Issues</a></span></dt><dt><span class="section"><a href="memory.html#shared_ptr.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#id594644">Class Hierarchy</a></span></dt><dt><span class="section"><a href="memory.html#id594832">Thread Safety</a></span></dt><dt><span class="section"><a href="memory.html#id594892">Selecting Lock Policy</a></span></dt><dt><span class="section"><a href="memory.html#id595014">Related functions and classes</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#shared_ptr.using">Use</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#id607385">Examples</a></span></dt><dt><span class="section"><a href="memory.html#id607415">Unresolved Issues</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#shared_ptr.ack">Acknowledgments</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="traits.html">Traits</a></span></dt></dl></div><div class="section" title="Functors"><div class="titlepage"><div><div><h2 class="title"><a id="std.util.functors"/>Functors</h2></div></div></div><p>If you don't know what functors are, you're not alone. Many people get slightly the wrong idea. In the interest of not reinventing the wheel, we will refer you to the introduction to the functor - concept written by SGI as chapter of their STL, in + concept written by SGI as part of their STL, in <a class="link" href="http://www.sgi.com/tech/stl/functors.html">their http://www.sgi.com/tech/stl/functors.html</a>. </p></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td align="left"><a accesskey="p" href="bk01pt02ch05s02.html">Prev</a> </td><td align="center"><a accesskey="u" href="bk01pt02.html">Up</a></td><td align="right"> <a accesskey="n" href="pairs.html">Next</a></td></tr><tr><td align="left" valign="top">Concept Checking </td><td align="center"><a accesskey="h" href="../index.html">Home</a></td><td align="right" valign="top"> Pairs</td></tr></table></div></body></html> diff --git a/libstdc++-v3/doc/xml/manual/abi.xml b/libstdc++-v3/doc/xml/manual/abi.xml index b79075df36a..6dc74136389 100644 --- a/libstdc++-v3/doc/xml/manual/abi.xml +++ b/libstdc++-v3/doc/xml/manual/abi.xml @@ -164,28 +164,14 @@ compatible. </para> <itemizedlist> - <listitem><para>gcc-3.0.0: libgcc_s.so.1</para></listitem> - <listitem><para>gcc-3.0.1: libgcc_s.so.1</para></listitem> - <listitem><para>gcc-3.0.2: libgcc_s.so.1</para></listitem> - <listitem><para>gcc-3.0.3: libgcc_s.so.1</para></listitem> - <listitem><para>gcc-3.0.4: libgcc_s.so.1</para></listitem> - <listitem><para>gcc-3.1.0: libgcc_s.so.1</para></listitem> - <listitem><para>gcc-3.1.1: libgcc_s.so.1</para></listitem> - <listitem><para>gcc-3.2.0: libgcc_s.so.1</para></listitem> - <listitem><para>gcc-3.2.1: libgcc_s.so.1</para></listitem> - <listitem><para>gcc-3.2.2: libgcc_s.so.1</para></listitem> - <listitem><para>gcc-3.2.3: libgcc_s.so.1</para></listitem> - <listitem><para>gcc-3.3.0: libgcc_s.so.1</para></listitem> - <listitem><para>gcc-3.3.1: libgcc_s.so.1</para></listitem> - <listitem><para>gcc-3.3.2: libgcc_s.so.1</para></listitem> - <listitem><para>gcc-3.3.3: libgcc_s.so.1</para></listitem> - <listitem><para>gcc-3.4.x, gcc-4.[0-5].x: libgcc_s.so.1</para></listitem> + <listitem><para>GCC 3.x: libgcc_s.so.1</para></listitem> + <listitem><para>GCC 4.x: libgcc_s.so.1</para></listitem> </itemizedlist> <para>For m68k-linux the versions differ as follows: </para> <itemizedlist> - <listitem><para>gcc-3.4.x, gcc-4.[0-5].x: libgcc_s.so.1 + <listitem><para>GCC 3.4, GCC 4.x: libgcc_s.so.1 when configuring <code>--with-sjlj-exceptions</code>, or libgcc_s.so.2 </para> </listitem> </itemizedlist> @@ -193,10 +179,10 @@ compatible. <para>For hppa-linux the versions differ as follows: </para> <itemizedlist> - <listitem><para>gcc-3.4.x, gcc-4.[0-1].x: either libgcc_s.so.1 + <listitem><para>GCC 3.4, GCC 4.[0-1]: either libgcc_s.so.1 when configuring <code>--with-sjlj-exceptions</code>, or libgcc_s.so.2 </para> </listitem> - <listitem><para>gcc-4.[2-5].x: either libgcc_s.so.3 when configuring + <listitem><para>GCC 4.[2-7]: either libgcc_s.so.3 when configuring <code>--with-sjlj-exceptions</code>) or libgcc_s.so.4 </para> </listitem> </itemizedlist> @@ -213,19 +199,22 @@ compatible. <para>This corresponds to the mapfile: gcc/libgcc-std.ver</para> <itemizedlist> - <listitem><para>gcc-3.0.0: GCC_3.0</para></listitem> - <listitem><para>gcc-3.3.0: GCC_3.3</para></listitem> - <listitem><para>gcc-3.3.1: GCC_3.3.1</para></listitem> - <listitem><para>gcc-3.3.2: GCC_3.3.2</para></listitem> - <listitem><para>gcc-3.3.4: GCC_3.3.4</para></listitem> - <listitem><para>gcc-3.4.0: GCC_3.4</para></listitem> - <listitem><para>gcc-3.4.2: GCC_3.4.2</para></listitem> - <listitem><para>gcc-3.4.4: GCC_3.4.4</para></listitem> - <listitem><para>gcc-4.0.0: GCC_4.0.0</para></listitem> - <listitem><para>gcc-4.1.0: GCC_4.1.0</para></listitem> - <listitem><para>gcc-4.2.0: GCC_4.2.0</para></listitem> - <listitem><para>gcc-4.3.0: GCC_4.3.0</para></listitem> - <listitem><para>gcc-4.4.0: GCC_4.4.0</para></listitem> + <listitem><para>GCC 3.0.0: GCC_3.0</para></listitem> + <listitem><para>GCC 3.3.0: GCC_3.3</para></listitem> + <listitem><para>GCC 3.3.1: GCC_3.3.1</para></listitem> + <listitem><para>GCC 3.3.2: GCC_3.3.2</para></listitem> + <listitem><para>GCC 3.3.4: GCC_3.3.4</para></listitem> + <listitem><para>GCC 3.4.0: GCC_3.4</para></listitem> + <listitem><para>GCC 3.4.2: GCC_3.4.2</para></listitem> + <listitem><para>GCC 3.4.4: GCC_3.4.4</para></listitem> + <listitem><para>GCC 4.0.0: GCC_4.0.0</para></listitem> + <listitem><para>GCC 4.1.0: GCC_4.1.0</para></listitem> + <listitem><para>GCC 4.2.0: GCC_4.2.0</para></listitem> + <listitem><para>GCC 4.3.0: GCC_4.3.0</para></listitem> + <listitem><para>GCC 4.4.0: GCC_4.4.0</para></listitem> + <listitem><para>GCC 4.5.0: GCC_4.5.0</para></listitem> + <listitem><para>GCC 4.6.0: GCC_4.6.0</para></listitem> + <listitem><para>GCC 4.7.0: GCC_4.7.0</para></listitem> </itemizedlist> </listitem> @@ -241,54 +230,47 @@ compatible. <constant>DT_SONAME</constant>s are forward-compatibile: in the table below, releases incompatible with the previous one are explicitly noted. + If a particular release is not listed, its libstdc++.so binary + has the same filename and <constant>DT_SONAME</constant> as the + preceding release. </para> <para>It is versioned as follows: </para> <itemizedlist> - <listitem><para>gcc-3.0.0: libstdc++.so.3.0.0</para></listitem> - <listitem><para>gcc-3.0.1: libstdc++.so.3.0.1</para></listitem> - <listitem><para>gcc-3.0.2: libstdc++.so.3.0.2</para></listitem> - <listitem><para>gcc-3.0.3: libstdc++.so.3.0.2 (See Note 1)</para></listitem> - <listitem><para>gcc-3.0.4: libstdc++.so.3.0.4</para></listitem> - <listitem><para>gcc-3.1.0: libstdc++.so.4.0.0 <emphasis>(Incompatible with previous)</emphasis></para></listitem> - <listitem><para>gcc-3.1.1: libstdc++.so.4.0.1</para></listitem> - <listitem><para>gcc-3.2.0: libstdc++.so.5.0.0 <emphasis>(Incompatible with previous)</emphasis></para></listitem> - <listitem><para>gcc-3.2.1: libstdc++.so.5.0.1</para></listitem> - <listitem><para>gcc-3.2.2: libstdc++.so.5.0.2</para></listitem> - <listitem><para>gcc-3.2.3: libstdc++.so.5.0.3 (See Note 2)</para></listitem> - <listitem><para>gcc-3.3.0: libstdc++.so.5.0.4</para></listitem> - <listitem><para>gcc-3.3.1: libstdc++.so.5.0.5</para></listitem> - <listitem><para>gcc-3.3.2: libstdc++.so.5.0.5</para></listitem> - <listitem><para>gcc-3.3.3: libstdc++.so.5.0.5</para></listitem> - <listitem><para>gcc-3.4.0: libstdc++.so.6.0.0 <emphasis>(Incompatible with previous)</emphasis></para></listitem> - <listitem><para>gcc-3.4.1: libstdc++.so.6.0.1</para></listitem> - <listitem><para>gcc-3.4.2: libstdc++.so.6.0.2</para></listitem> - <listitem><para>gcc-3.4.3: libstdc++.so.6.0.3</para></listitem> - <listitem><para>gcc-3.4.4: libstdc++.so.6.0.3</para></listitem> - <listitem><para>gcc-3.4.5: libstdc++.so.6.0.3</para></listitem> - <listitem><para>gcc-3.4.6: libstdc++.so.6.0.3</para></listitem> - <listitem><para>gcc-4.0.0: libstdc++.so.6.0.4</para></listitem> - <listitem><para>gcc-4.0.1: libstdc++.so.6.0.5</para></listitem> - <listitem><para>gcc-4.0.2: libstdc++.so.6.0.6</para></listitem> - <listitem><para>gcc-4.0.3: libstdc++.so.6.0.7</para></listitem> - <listitem><para>gcc-4.1.0: libstdc++.so.6.0.7</para></listitem> - <listitem><para>gcc-4.1.1: libstdc++.so.6.0.8</para></listitem> - <listitem><para>gcc-4.1.2: libstdc++.so.6.0.8</para></listitem> - <listitem><para>gcc-4.2.0: libstdc++.so.6.0.9</para></listitem> - <listitem><para>gcc-4.2.1: libstdc++.so.6.0.9 (See Note 3)</para></listitem> - <listitem><para>gcc-4.2.2: libstdc++.so.6.0.9</para></listitem> - <listitem><para>gcc-4.2.3: libstdc++.so.6.0.9</para></listitem> - <listitem><para>gcc-4.2.4: libstdc++.so.6.0.9</para></listitem> - <listitem><para>gcc-4.3.0: libstdc++.so.6.0.10</para></listitem> - <listitem><para>gcc-4.3.1: libstdc++.so.6.0.10</para></listitem> - <listitem><para>gcc-4.3.2: libstdc++.so.6.0.10</para></listitem> - <listitem><para>gcc-4.3.3: libstdc++.so.6.0.10</para></listitem> - <listitem><para>gcc-4.3.4: libstdc++.so.6.0.10</para></listitem> - <listitem><para>gcc-4.4.0: libstdc++.so.6.0.11</para></listitem> - <listitem><para>gcc-4.4.1: libstdc++.so.6.0.12</para></listitem> - <listitem><para>gcc-4.4.2: libstdc++.so.6.0.13</para></listitem> - <listitem><para>gcc-4.5.0: libstdc++.so.6.0.14</para></listitem> + <listitem><para>GCC 3.0.0: libstdc++.so.3.0.0</para></listitem> + <listitem><para>GCC 3.0.1: libstdc++.so.3.0.1</para></listitem> + <listitem><para>GCC 3.0.2: libstdc++.so.3.0.2</para></listitem> + <listitem><para>GCC 3.0.3: libstdc++.so.3.0.2 (See Note 1)</para></listitem> + <listitem><para>GCC 3.0.4: libstdc++.so.3.0.4</para></listitem> + <listitem><para>GCC 3.1.0: libstdc++.so.4.0.0 <emphasis>(Incompatible with previous)</emphasis></para></listitem> + <listitem><para>GCC 3.1.1: libstdc++.so.4.0.1</para></listitem> + <listitem><para>GCC 3.2.0: libstdc++.so.5.0.0 <emphasis>(Incompatible with previous)</emphasis></para></listitem> + <listitem><para>GCC 3.2.1: libstdc++.so.5.0.1</para></listitem> + <listitem><para>GCC 3.2.2: libstdc++.so.5.0.2</para></listitem> + <listitem><para>GCC 3.2.3: libstdc++.so.5.0.3 (See Note 2)</para></listitem> + <listitem><para>GCC 3.3.0: libstdc++.so.5.0.4</para></listitem> + <listitem><para>GCC 3.3.1: libstdc++.so.5.0.5</para></listitem> + <listitem><para>GCC 3.4.0: libstdc++.so.6.0.0 <emphasis>(Incompatible with previous)</emphasis></para></listitem> + <listitem><para>GCC 3.4.1: libstdc++.so.6.0.1</para></listitem> + <listitem><para>GCC 3.4.2: libstdc++.so.6.0.2</para></listitem> + <listitem><para>GCC 3.4.3: libstdc++.so.6.0.3</para></listitem> + <listitem><para>GCC 4.0.0: libstdc++.so.6.0.4</para></listitem> + <listitem><para>GCC 4.0.1: libstdc++.so.6.0.5</para></listitem> + <listitem><para>GCC 4.0.2: libstdc++.so.6.0.6</para></listitem> + <listitem><para>GCC 4.0.3: libstdc++.so.6.0.7</para></listitem> + <listitem><para>GCC 4.1.0: libstdc++.so.6.0.7</para></listitem> + <listitem><para>GCC 4.1.1: libstdc++.so.6.0.8</para></listitem> + <listitem><para>GCC 4.2.0: libstdc++.so.6.0.9</para></listitem> + <listitem><para>GCC 4.2.1: libstdc++.so.6.0.9 (See Note 3)</para></listitem> + <listitem><para>GCC 4.2.2: libstdc++.so.6.0.9</para></listitem> + <listitem><para>GCC 4.3.0: libstdc++.so.6.0.10</para></listitem> + <listitem><para>GCC 4.4.0: libstdc++.so.6.0.11</para></listitem> + <listitem><para>GCC 4.4.1: libstdc++.so.6.0.12</para></listitem> + <listitem><para>GCC 4.4.2: libstdc++.so.6.0.13</para></listitem> + <listitem><para>GCC 4.5.0: libstdc++.so.6.0.14</para></listitem> + <listitem><para>GCC 4.6.0: libstdc++.so.6.0.15</para></listitem> + <listitem><para>GCC 4.6.1: libstdc++.so.6.0.16</para></listitem> </itemizedlist> <para> Note 1: Error should be libstdc++.so.3.0.3. @@ -312,49 +294,51 @@ compatible. will use the maximum version definition. Thus, for release series with the same label, but incremented version definitions, the later release has both versions. (An example of this would be the - gcc-3.2.1 release, which has GLIBCPP_3.2.1 for new symbols and - GLIBCPP_3.2 for symbols that were introduced in the gcc-3.2.0 + GCC 3.2.1 release, which has GLIBCPP_3.2.1 for new symbols and + GLIBCPP_3.2 for symbols that were introduced in the GCC 3.2.0 release.) If a particular release is not listed, it has the same version labels as the preceding release. </para> <itemizedlist> - <listitem><para>gcc-3.0.0: (Error, not versioned)</para></listitem> - <listitem><para>gcc-3.0.1: (Error, not versioned)</para></listitem> - <listitem><para>gcc-3.0.2: (Error, not versioned)</para></listitem> - <listitem><para>gcc-3.0.3: (Error, not versioned)</para></listitem> - <listitem><para>gcc-3.0.4: (Error, not versioned)</para></listitem> - <listitem><para>gcc-3.1.0: GLIBCPP_3.1, CXXABI_1</para></listitem> - <listitem><para>gcc-3.1.1: GLIBCPP_3.1, CXXABI_1</para></listitem> - <listitem><para>gcc-3.2.0: GLIBCPP_3.2, CXXABI_1.2</para></listitem> - <listitem><para>gcc-3.2.1: GLIBCPP_3.2.1, CXXABI_1.2</para></listitem> - <listitem><para>gcc-3.2.2: GLIBCPP_3.2.2, CXXABI_1.2</para></listitem> - <listitem><para>gcc-3.2.3: GLIBCPP_3.2.2, CXXABI_1.2</para></listitem> - <listitem><para>gcc-3.3.0: GLIBCPP_3.2.2, CXXABI_1.2.1</para></listitem> - <listitem><para>gcc-3.3.1: GLIBCPP_3.2.3, CXXABI_1.2.1</para></listitem> - <listitem><para>gcc-3.3.2: GLIBCPP_3.2.3, CXXABI_1.2.1</para></listitem> - <listitem><para>gcc-3.3.3: GLIBCPP_3.2.3, CXXABI_1.2.1</para></listitem> - <listitem><para>gcc-3.4.0: GLIBCXX_3.4, CXXABI_1.3</para></listitem> - <listitem><para>gcc-3.4.1: GLIBCXX_3.4.1, CXXABI_1.3</para></listitem> - <listitem><para>gcc-3.4.2: GLIBCXX_3.4.2</para></listitem> - <listitem><para>gcc-3.4.3: GLIBCXX_3.4.3</para></listitem> - <listitem><para>gcc-4.0.0: GLIBCXX_3.4.4, CXXABI_1.3.1</para></listitem> - <listitem><para>gcc-4.0.1: GLIBCXX_3.4.5</para></listitem> - <listitem><para>gcc-4.0.2: GLIBCXX_3.4.6</para></listitem> - <listitem><para>gcc-4.0.3: GLIBCXX_3.4.7</para></listitem> - <listitem><para>gcc-4.1.1: GLIBCXX_3.4.8</para></listitem> - <listitem><para>gcc-4.2.0: GLIBCXX_3.4.9</para></listitem> - <listitem><para>gcc-4.3.0: GLIBCXX_3.4.10, CXXABI_1.3.2</para></listitem> - <listitem><para>gcc-4.4.0: GLIBCXX_3.4.11, CXXABI_1.3.3</para></listitem> - <listitem><para>gcc-4.4.1: GLIBCXX_3.4.12, CXXABI_1.3.3</para></listitem> - <listitem><para>gcc-4.4.2: GLIBCXX_3.4.13, CXXABI_1.3.3</para></listitem> - <listitem><para>gcc-4.5.0: GLIBCXX_3.4.14, CXXABI_1.3.4</para></listitem> + <listitem><para>GCC 3.0.0: (Error, not versioned)</para></listitem> + <listitem><para>GCC 3.0.1: (Error, not versioned)</para></listitem> + <listitem><para>GCC 3.0.2: (Error, not versioned)</para></listitem> + <listitem><para>GCC 3.0.3: (Error, not versioned)</para></listitem> + <listitem><para>GCC 3.0.4: (Error, not versioned)</para></listitem> + <listitem><para>GCC 3.1.0: GLIBCPP_3.1, CXXABI_1</para></listitem> + <listitem><para>GCC 3.1.1: GLIBCPP_3.1, CXXABI_1</para></listitem> + <listitem><para>GCC 3.2.0: GLIBCPP_3.2, CXXABI_1.2</para></listitem> + <listitem><para>GCC 3.2.1: GLIBCPP_3.2.1, CXXABI_1.2</para></listitem> + <listitem><para>GCC 3.2.2: GLIBCPP_3.2.2, CXXABI_1.2</para></listitem> + <listitem><para>GCC 3.2.3: GLIBCPP_3.2.2, CXXABI_1.2</para></listitem> + <listitem><para>GCC 3.3.0: GLIBCPP_3.2.2, CXXABI_1.2.1</para></listitem> + <listitem><para>GCC 3.3.1: GLIBCPP_3.2.3, CXXABI_1.2.1</para></listitem> + <listitem><para>GCC 3.3.2: GLIBCPP_3.2.3, CXXABI_1.2.1</para></listitem> + <listitem><para>GCC 3.3.3: GLIBCPP_3.2.3, CXXABI_1.2.1</para></listitem> + <listitem><para>GCC 3.4.0: GLIBCXX_3.4, CXXABI_1.3</para></listitem> + <listitem><para>GCC 3.4.1: GLIBCXX_3.4.1, CXXABI_1.3</para></listitem> + <listitem><para>GCC 3.4.2: GLIBCXX_3.4.2</para></listitem> + <listitem><para>GCC 3.4.3: GLIBCXX_3.4.3</para></listitem> + <listitem><para>GCC 4.0.0: GLIBCXX_3.4.4, CXXABI_1.3.1</para></listitem> + <listitem><para>GCC 4.0.1: GLIBCXX_3.4.5</para></listitem> + <listitem><para>GCC 4.0.2: GLIBCXX_3.4.6</para></listitem> + <listitem><para>GCC 4.0.3: GLIBCXX_3.4.7</para></listitem> + <listitem><para>GCC 4.1.1: GLIBCXX_3.4.8</para></listitem> + <listitem><para>GCC 4.2.0: GLIBCXX_3.4.9</para></listitem> + <listitem><para>GCC 4.3.0: GLIBCXX_3.4.10, CXXABI_1.3.2</para></listitem> + <listitem><para>GCC 4.4.0: GLIBCXX_3.4.11, CXXABI_1.3.3</para></listitem> + <listitem><para>GCC 4.4.1: GLIBCXX_3.4.12, CXXABI_1.3.3</para></listitem> + <listitem><para>GCC 4.4.2: GLIBCXX_3.4.13, CXXABI_1.3.3</para></listitem> + <listitem><para>GCC 4.5.0: GLIBCXX_3.4.14, CXXABI_1.3.4</para></listitem> + <listitem><para>GCC 4.6.0: GLIBCXX_3.4.15, CXXABI_1.3.5</para></listitem> + <listitem><para>GCC 4.6.1: GLIBCXX_3.4.16, CXXABI_1.3.5</para></listitem> </itemizedlist> </listitem> <listitem> <para>Incremental bumping of a compiler pre-defined macro, __GXX_ABI_VERSION. This macro is defined as the version of the - compiler v3 ABI, with g++ 3.0.x being version 100. This macro will + compiler v3 ABI, with g++ 3.0 being version 100. This macro will be automatically defined whenever g++ is used (the curious can test this by invoking g++ with the '-v' flag.) </para> @@ -370,13 +354,13 @@ compatible. It is versioned as follows, where 'n' is given by '-fabi-version=n': </para> <itemizedlist> - <listitem><para>gcc-3.0.x: 100</para></listitem> - <listitem><para>gcc-3.1.x: 100 (Error, should be 101)</para></listitem> - <listitem><para>gcc-3.2.x: 102</para></listitem> - <listitem><para>gcc-3.3.x: 102</para></listitem> - <listitem><para>gcc-3.4.x, gcc-4.[0-5].x: 102 (when n=1)</para></listitem> - <listitem><para>gcc-3.4.x, gcc-4.[0-5].x: 1000 + n (when n>1) </para></listitem> - <listitem><para>gcc-3.4.x, gcc-4.[0-5].x: 999999 (when n=0)</para></listitem> + <listitem><para>GCC 3.0: 100</para></listitem> + <listitem><para>GCC 3.1: 100 (Error, should be 101)</para></listitem> + <listitem><para>GCC 3.2: 102</para></listitem> + <listitem><para>GCC 3.3: 102</para></listitem> + <listitem><para>GCC 3.4, GCC 4.x: 102 (when n=1)</para></listitem> + <listitem><para>GCC 3.4, GCC 4.x: 1000 + n (when n>1) </para></listitem> + <listitem><para>GCC 3.4, GCC 4.x: 999999 (when n=0)</para></listitem> </itemizedlist> <para/> </listitem> @@ -389,11 +373,11 @@ compatible. It is versioned as follows: </para> <itemizedlist> - <listitem><para>gcc-3.0.x: (Error, not versioned) </para></listitem> - <listitem><para>gcc-3.1.x: (Error, not versioned) </para></listitem> - <listitem><para>gcc-3.2.x: <code>-fabi-version=1</code></para></listitem> - <listitem><para>gcc-3.3.x: <code>-fabi-version=1</code></para></listitem> - <listitem><para>gcc-3.4.x, gcc-4.[0-5].x: <code>-fabi-version=2</code> <emphasis>(Incompatible with previous)</emphasis></para></listitem> + <listitem><para>GCC 3.0: (Error, not versioned) </para></listitem> + <listitem><para>GCC 3.1: (Error, not versioned) </para></listitem> + <listitem><para>GCC 3.2: <code>-fabi-version=1</code></para></listitem> + <listitem><para>GCC 3.3: <code>-fabi-version=1</code></para></listitem> + <listitem><para>GCC 3.4, GCC 4.x: <code>-fabi-version=2</code> <emphasis>(Incompatible with previous)</emphasis></para></listitem> </itemizedlist> <para/> </listitem> @@ -409,55 +393,69 @@ compatible. <para> This macro is defined in the file "c++config" in the - "libstdc++-v3/include/bits" directory. (Up to gcc-4.1.0, it was - changed every night by an automated script. Since gcc-4.1.0, it is + "libstdc++-v3/include/bits" directory. (Up to GCC 4.1.0, it was + changed every night by an automated script. Since GCC 4.1.0, it is the same value as gcc/DATESTAMP.) </para> <para> It is versioned as follows: </para> <itemizedlist> - <listitem><para>gcc-3.0.0: 20010615</para></listitem> - <listitem><para>gcc-3.0.1: 20010819</para></listitem> - <listitem><para>gcc-3.0.2: 20011023</para></listitem> - <listitem><para>gcc-3.0.3: 20011220</para></listitem> - <listitem><para>gcc-3.0.4: 20020220</para></listitem> - <listitem><para>gcc-3.1.0: 20020514</para></listitem> - <listitem><para>gcc-3.1.1: 20020725</para></listitem> - <listitem><para>gcc-3.2.0: 20020814</para></listitem> - <listitem><para>gcc-3.2.1: 20021119</para></listitem> - <listitem><para>gcc-3.2.2: 20030205</para></listitem> - <listitem><para>gcc-3.2.3: 20030422</para></listitem> - <listitem><para>gcc-3.3.0: 20030513</para></listitem> - <listitem><para>gcc-3.3.1: 20030804</para></listitem> - <listitem><para>gcc-3.3.2: 20031016</para></listitem> - <listitem><para>gcc-3.3.3: 20040214</para></listitem> - <listitem><para>gcc-3.4.0: 20040419</para></listitem> - <listitem><para>gcc-3.4.1: 20040701</para></listitem> - <listitem><para>gcc-3.4.2: 20040906</para></listitem> - <listitem><para>gcc-3.4.3: 20041105</para></listitem> - <listitem><para>gcc-3.4.4: 20050519</para></listitem> - <listitem><para>gcc-3.4.5: 20051201</para></listitem> - <listitem><para>gcc-3.4.6: 20060306</para></listitem> - <listitem><para>gcc-4.0.0: 20050421</para></listitem> - <listitem><para>gcc-4.0.1: 20050707</para></listitem> - <listitem><para>gcc-4.0.2: 20050921</para></listitem> - <listitem><para>gcc-4.0.3: 20060309</para></listitem> - <listitem><para>gcc-4.1.0: 20060228</para></listitem> - <listitem><para>gcc-4.1.1: 20060524</para></listitem> - <listitem><para>gcc-4.1.2: 20070214</para></listitem> - <listitem><para>gcc-4.2.0: 20070514</para></listitem> - <listitem><para>gcc-4.2.1: 20070719</para></listitem> - <listitem><para>gcc-4.2.2: 20071007</para></listitem> - <listitem><para>gcc-4.2.3: 20080201</para></listitem> - <listitem><para>gcc-4.2.4: 20080519</para></listitem> - <listitem><para>gcc-4.3.0: 20080306</para></listitem> - <listitem><para>gcc-4.3.1: 20080606</para></listitem> - <listitem><para>gcc-4.3.2: 20080827</para></listitem> - <listitem><para>gcc-4.3.3: 20090124</para></listitem> - <listitem><para>gcc-4.4.0: 20090421</para></listitem> - <listitem><para>gcc-4.4.1: 20090722</para></listitem> - <listitem><para>gcc-4.4.2: 20091015</para></listitem> + <listitem><para>GCC 3.0.0: 20010615</para></listitem> + <listitem><para>GCC 3.0.1: 20010819</para></listitem> + <listitem><para>GCC 3.0.2: 20011023</para></listitem> + <listitem><para>GCC 3.0.3: 20011220</para></listitem> + <listitem><para>GCC 3.0.4: 20020220</para></listitem> + <listitem><para>GCC 3.1.0: 20020514</para></listitem> + <listitem><para>GCC 3.1.1: 20020725</para></listitem> + <listitem><para>GCC 3.2.0: 20020814</para></listitem> + <listitem><para>GCC 3.2.1: 20021119</para></listitem> + <listitem><para>GCC 3.2.2: 20030205</para></listitem> + <listitem><para>GCC 3.2.3: 20030422</para></listitem> + <listitem><para>GCC 3.3.0: 20030513</para></listitem> + <listitem><para>GCC 3.3.1: 20030804</para></listitem> + <listitem><para>GCC 3.3.2: 20031016</para></listitem> + <listitem><para>GCC 3.3.3: 20040214</para></listitem> + <listitem><para>GCC 3.4.0: 20040419</para></listitem> + <listitem><para>GCC 3.4.1: 20040701</para></listitem> + <listitem><para>GCC 3.4.2: 20040906</para></listitem> + <listitem><para>GCC 3.4.3: 20041105</para></listitem> + <listitem><para>GCC 3.4.4: 20050519</para></listitem> + <listitem><para>GCC 3.4.5: 20051201</para></listitem> + <listitem><para>GCC 3.4.6: 20060306</para></listitem> + <listitem><para>GCC 4.0.0: 20050421</para></listitem> + <listitem><para>GCC 4.0.1: 20050707</para></listitem> + <listitem><para>GCC 4.0.2: 20050921</para></listitem> + <listitem><para>GCC 4.0.3: 20060309</para></listitem> + <listitem><para>GCC 4.1.0: 20060228</para></listitem> + <listitem><para>GCC 4.1.1: 20060524</para></listitem> + <listitem><para>GCC 4.1.2: 20070214</para></listitem> + <listitem><para>GCC 4.2.0: 20070514</para></listitem> + <listitem><para>GCC 4.2.1: 20070719</para></listitem> + <listitem><para>GCC 4.2.2: 20071007</para></listitem> + <listitem><para>GCC 4.2.3: 20080201</para></listitem> + <listitem><para>GCC 4.2.4: 20080519</para></listitem> + <listitem><para>GCC 4.3.0: 20080306</para></listitem> + <listitem><para>GCC 4.3.1: 20080606</para></listitem> + <listitem><para>GCC 4.3.2: 20080827</para></listitem> + <listitem><para>GCC 4.3.3: 20090124</para></listitem> + <listitem><para>GCC 4.3.4: 20090804</para></listitem> + <listitem><para>GCC 4.3.5: 20100522</para></listitem> + <listitem><para>GCC 4.3.6: 20110627</para></listitem> + <listitem><para>GCC 4.4.0: 20090421</para></listitem> + <listitem><para>GCC 4.4.1: 20090722</para></listitem> + <listitem><para>GCC 4.4.2: 20091015</para></listitem> + <listitem><para>GCC 4.4.3: 20100121</para></listitem> + <listitem><para>GCC 4.4.4: 20100429</para></listitem> + <listitem><para>GCC 4.4.5: 20101001</para></listitem> + <listitem><para>GCC 4.4.6: 20110416</para></listitem> + <listitem><para>GCC 4.5.0: 20100414</para></listitem> + <listitem><para>GCC 4.5.1: 20100731</para></listitem> + <listitem><para>GCC 4.5.2: 20101216</para></listitem> + <listitem><para>GCC 4.5.3: 20110428</para></listitem> + <listitem><para>GCC 4.6.0: 20110325</para></listitem> + <listitem><para>GCC 4.6.1: 20110627</para></listitem> + <listitem><para>GCC 4.6.2: 20111026</para></listitem> </itemizedlist> <para/> </listitem> @@ -467,7 +465,7 @@ compatible. Incremental bumping of a library pre-defined macro, _GLIBCPP_VERSION. This macro is defined as the released version of the library, as a string literal. This is only implemented in - gcc-3.1.0 releases and higher, and is deprecated in 3.4 (where it + GCC 3.1.0 releases and higher, and is deprecated in 3.4 (where it is called _GLIBCXX_VERSION). </para> @@ -482,23 +480,23 @@ compatible. It is versioned as follows: </para> <itemizedlist> - <listitem><para>gcc-3.0.0: "3.0.0"</para></listitem> - <listitem><para>gcc-3.0.1: "3.0.0" (Error, should be "3.0.1")</para></listitem> - <listitem><para>gcc-3.0.2: "3.0.0" (Error, should be "3.0.2")</para></listitem> - <listitem><para>gcc-3.0.3: "3.0.0" (Error, should be "3.0.3")</para></listitem> - <listitem><para>gcc-3.0.4: "3.0.0" (Error, should be "3.0.4")</para></listitem> - <listitem><para>gcc-3.1.0: "3.1.0"</para></listitem> - <listitem><para>gcc-3.1.1: "3.1.1"</para></listitem> - <listitem><para>gcc-3.2.0: "3.2"</para></listitem> - <listitem><para>gcc-3.2.1: "3.2.1"</para></listitem> - <listitem><para>gcc-3.2.2: "3.2.2"</para></listitem> - <listitem><para>gcc-3.2.3: "3.2.3"</para></listitem> - <listitem><para>gcc-3.3.0: "3.3"</para></listitem> - <listitem><para>gcc-3.3.1: "3.3.1"</para></listitem> - <listitem><para>gcc-3.3.2: "3.3.2"</para></listitem> - <listitem><para>gcc-3.3.3: "3.3.3"</para></listitem> - <listitem><para>gcc-3.4.x: "version-unused"</para></listitem> - <listitem><para>gcc-4.[0-5].x: "version-unused"</para></listitem> + <listitem><para>GCC 3.0.0: "3.0.0"</para></listitem> + <listitem><para>GCC 3.0.1: "3.0.0" (Error, should be "3.0.1")</para></listitem> + <listitem><para>GCC 3.0.2: "3.0.0" (Error, should be "3.0.2")</para></listitem> + <listitem><para>GCC 3.0.3: "3.0.0" (Error, should be "3.0.3")</para></listitem> + <listitem><para>GCC 3.0.4: "3.0.0" (Error, should be "3.0.4")</para></listitem> + <listitem><para>GCC 3.1.0: "3.1.0"</para></listitem> + <listitem><para>GCC 3.1.1: "3.1.1"</para></listitem> + <listitem><para>GCC 3.2.0: "3.2"</para></listitem> + <listitem><para>GCC 3.2.1: "3.2.1"</para></listitem> + <listitem><para>GCC 3.2.2: "3.2.2"</para></listitem> + <listitem><para>GCC 3.2.3: "3.2.3"</para></listitem> + <listitem><para>GCC 3.3.0: "3.3"</para></listitem> + <listitem><para>GCC 3.3.1: "3.3.1"</para></listitem> + <listitem><para>GCC 3.3.2: "3.3.2"</para></listitem> + <listitem><para>GCC 3.3.3: "3.3.3"</para></listitem> + <listitem><para>GCC 3.4: "version-unused"</para></listitem> + <listitem><para>GCC 4.x: "version-unused"</para></listitem> </itemizedlist> <para/> </listitem> @@ -506,62 +504,38 @@ compatible. <listitem> <para> Matching each specific C++ compiler release to a specific set of - C++ include files. This is only implemented in gcc-3.1.1 releases + C++ include files. This is only implemented in GCC 3.1.1 releases and higher. </para> <para> - All C++ includes are installed in include/c++, then nest in a + All C++ includes are installed in + <filename class="directory">include/c++</filename>, then nest in a directory hierarchy corresponding to the C++ compiler's released version. This version corresponds to the variable "gcc_version" in "libstdc++-v3/acinclude.m4," and more details can be found in that - file's macro GLIBCXX_CONFIGURE (GLIBCPP_CONFIGURE before gcc-3.4.0). + file's macro GLIBCXX_CONFIGURE (GLIBCPP_CONFIGURE before GCC 3.4.0). </para> <para> C++ includes are versioned as follows: </para> <itemizedlist> - <listitem><para>gcc-3.0.0: include/g++-v3</para></listitem> - <listitem><para>gcc-3.0.1: include/g++-v3</para></listitem> - <listitem><para>gcc-3.0.2: include/g++-v3</para></listitem> - <listitem><para>gcc-3.0.3: include/g++-v3</para></listitem> - <listitem><para>gcc-3.0.4: include/g++-v3</para></listitem> - <listitem><para>gcc-3.1.0: include/g++-v3</para></listitem> - <listitem><para>gcc-3.1.1: include/c++/3.1.1</para></listitem> - <listitem><para>gcc-3.2.0: include/c++/3.2</para></listitem> - <listitem><para>gcc-3.2.1: include/c++/3.2.1</para></listitem> - <listitem><para>gcc-3.2.2: include/c++/3.2.2</para></listitem> - <listitem><para>gcc-3.2.3: include/c++/3.2.3</para></listitem> - <listitem><para>gcc-3.3.0: include/c++/3.3</para></listitem> - <listitem><para>gcc-3.3.1: include/c++/3.3.1</para></listitem> - <listitem><para>gcc-3.3.2: include/c++/3.3.2</para></listitem> - <listitem><para>gcc-3.3.3: include/c++/3.3.3</para></listitem> - <listitem><para>gcc-3.4.0: include/c++/3.4.0</para></listitem> - <listitem><para>gcc-3.4.1: include/c++/3.4.1</para></listitem> - <listitem><para>gcc-3.4.2: include/c++/3.4.2</para></listitem> - <listitem><para>gcc-3.4.3: include/c++/3.4.3</para></listitem> - <listitem><para>gcc-3.4.4: include/c++/3.4.4</para></listitem> - <listitem><para>gcc-3.4.5: include/c++/3.4.5</para></listitem> - <listitem><para>gcc-3.4.6: include/c++/3.4.6</para></listitem> - <listitem><para>gcc-4.0.0: include/c++/4.0.0</para></listitem> - <listitem><para>gcc-4.0.1: include/c++/4.0.1</para></listitem> - <listitem><para>gcc-4.0.2: include/c++/4.0.2</para></listitem> - <listitem><para>gcc-4.0.3: include/c++/4.0.3</para></listitem> - <listitem><para>gcc-4.1.0: include/c++/4.1.0</para></listitem> - <listitem><para>gcc-4.1.1: include/c++/4.1.1</para></listitem> - <listitem><para>gcc-4.1.2: include/c++/4.1.2</para></listitem> - <listitem><para>gcc-4.2.0: include/c++/4.2.0</para></listitem> - <listitem><para>gcc-4.2.1: include/c++/4.2.1</para></listitem> - <listitem><para>gcc-4.2.2: include/c++/4.2.2</para></listitem> - <listitem><para>gcc-4.2.3: include/c++/4.2.3</para></listitem> - <listitem><para>gcc-4.2.4: include/c++/4.2.4</para></listitem> - <listitem><para>gcc-4.3.0: include/c++/4.3.0</para></listitem> - <listitem><para>gcc-4.3.1: include/c++/4.3.1</para></listitem> - <listitem><para>gcc-4.3.3: include/c++/4.3.3</para></listitem> - <listitem><para>gcc-4.3.4: include/c++/4.3.4</para></listitem> - <listitem><para>gcc-4.4.0: include/c++/4.4.0</para></listitem> - <listitem><para>gcc-4.4.1: include/c++/4.4.1</para></listitem> - <listitem><para>gcc-4.4.2: include/c++/4.4.2</para></listitem> - <listitem><para>gcc-4.5.0: include/c++/4.5.0</para></listitem> + <listitem><para>GCC 3.0.0: include/g++-v3</para></listitem> + <listitem><para>GCC 3.0.1: include/g++-v3</para></listitem> + <listitem><para>GCC 3.0.2: include/g++-v3</para></listitem> + <listitem><para>GCC 3.0.3: include/g++-v3</para></listitem> + <listitem><para>GCC 3.0.4: include/g++-v3</para></listitem> + <listitem><para>GCC 3.1.0: include/g++-v3</para></listitem> + <listitem><para>GCC 3.1.1: include/c++/3.1.1</para></listitem> + <listitem><para>GCC 3.2.0: include/c++/3.2</para></listitem> + <listitem><para>GCC 3.2.1: include/c++/3.2.1</para></listitem> + <listitem><para>GCC 3.2.2: include/c++/3.2.2</para></listitem> + <listitem><para>GCC 3.2.3: include/c++/3.2.3</para></listitem> + <listitem><para>GCC 3.3.0: include/c++/3.3</para></listitem> + <listitem><para>GCC 3.3.1: include/c++/3.3.1</para></listitem> + <listitem><para>GCC 3.3.2: include/c++/3.3.2</para></listitem> + <listitem><para>GCC 3.3.3: include/c++/3.3.3</para></listitem> + <listitem><para>GCC 3.4.x: include/c++/3.4.x</para></listitem> + <listitem><para>GCC 4.x.y: include/c++/4.x.y</para></listitem> </itemizedlist> <para/> </listitem> @@ -989,8 +963,8 @@ us. We'd like to know about them! <para> A "C" application, dynamically linked to two shared libraries, liba, libb. The dependent library liba is a C++ shared library compiled with -gcc-3.3.x, and uses io, exceptions, locale, etc. The dependent library -libb is a C++ shared library compiled with gcc-3.4.x, and also uses io, +GCC 3.3, and uses io, exceptions, locale, etc. The dependent library +libb is a C++ shared library compiled with GCC 3.4, and also uses io, exceptions, locale, etc. </para> diff --git a/libstdc++-v3/doc/xml/manual/status_cxx2011.xml b/libstdc++-v3/doc/xml/manual/status_cxx2011.xml index f47710e3b90..1f39ce5e5b8 100644 --- a/libstdc++-v3/doc/xml/manual/status_cxx2011.xml +++ b/libstdc++-v3/doc/xml/manual/status_cxx2011.xml @@ -1403,11 +1403,10 @@ particular release. <entry>Missing emplace members</entry> </row> <row> - <?dbhtml bgcolor="#B0B0B0" ?> <entry>23.2.5</entry> <entry>Unordered associative containers</entry> - <entry>Partial</entry> - <entry>Missing emplace members</entry> + <entry>Y</entry> + <entry/> </row> <row> <entry>23.3</entry> diff --git a/libstdc++-v3/include/bits/atomic_base.h b/libstdc++-v3/include/bits/atomic_base.h index 3f00cda6775..ef17b7e12e6 100644 --- a/libstdc++-v3/include/bits/atomic_base.h +++ b/libstdc++-v3/include/bits/atomic_base.h @@ -59,14 +59,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION memory_order_seq_cst } memory_order; - inline memory_order - __calculate_memory_order(memory_order __m) noexcept + // Drop release ordering as per [atomics.types.operations.req]/21 + constexpr memory_order + __cmpexch_failure_order(memory_order __m) noexcept { - const bool __cond1 = __m == memory_order_release; - const bool __cond2 = __m == memory_order_acq_rel; - memory_order __mo1(__cond1 ? memory_order_relaxed : __m); - memory_order __mo2(__cond2 ? memory_order_acquire : __mo1); - return __mo2; + return __m == memory_order_acq_rel ? memory_order_acquire + : __m == memory_order_release ? memory_order_relaxed : __m; } inline void @@ -505,7 +503,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION memory_order __m = memory_order_seq_cst) noexcept { return compare_exchange_weak(__i1, __i2, __m, - __calculate_memory_order(__m)); + __cmpexch_failure_order(__m)); } bool @@ -513,7 +511,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION memory_order __m = memory_order_seq_cst) volatile noexcept { return compare_exchange_weak(__i1, __i2, __m, - __calculate_memory_order(__m)); + __cmpexch_failure_order(__m)); } bool @@ -544,7 +542,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION memory_order __m = memory_order_seq_cst) noexcept { return compare_exchange_strong(__i1, __i2, __m, - __calculate_memory_order(__m)); + __cmpexch_failure_order(__m)); } bool @@ -552,7 +550,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION memory_order __m = memory_order_seq_cst) volatile noexcept { return compare_exchange_strong(__i1, __i2, __m, - __calculate_memory_order(__m)); + __cmpexch_failure_order(__m)); } __int_type diff --git a/libstdc++-v3/include/bits/hashtable.h b/libstdc++-v3/include/bits/hashtable.h index 712b1df91c2..3874cbc5a64 100644 --- a/libstdc++-v3/include/bits/hashtable.h +++ b/libstdc++-v3/include/bits/hashtable.h @@ -467,6 +467,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _Insert_Conv_Type; protected: + template<typename... _Args> + std::pair<iterator, bool> + _M_emplace(std::true_type, _Args&&... __args); + + template<typename... _Args> + iterator + _M_emplace(std::false_type, _Args&&... __args); + template<typename _Arg> std::pair<iterator, bool> _M_insert(_Arg&&, std::true_type); @@ -476,7 +484,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_insert(_Arg&&, std::false_type); public: - // Insert and erase + // Emplace, insert and erase + template<typename... _Args> + _Insert_Return_Type + emplace(_Args&&... __args) + { return _M_emplace(integral_constant<bool, __unique_keys>(), + std::forward<_Args>(__args)...); } + + template<typename... _Args> + iterator + emplace_hint(const_iterator, _Args&&... __args) + { return _Insert_Conv_Type()(emplace(std::forward<_Args>(__args)...)); } + _Insert_Return_Type insert(const value_type& __v) { return _M_insert(__v, integral_constant<bool, __unique_keys>()); } @@ -1160,6 +1179,128 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __prev_n; } + template<typename _Key, typename _Value, + typename _Allocator, typename _ExtractKey, typename _Equal, + typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, + bool __chc, bool __cit, bool __uk> + template<typename... _Args> + std::pair<typename _Hashtable<_Key, _Value, _Allocator, + _ExtractKey, _Equal, _H1, + _H2, _Hash, _RehashPolicy, + __chc, __cit, __uk>::iterator, bool> + _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, + _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>:: + _M_emplace(std::true_type, _Args&&... __args) + { + // First build the node to get access to the hash code + _Node* __new_node = _M_allocate_node(std::forward<_Args>(__args)...); + __try + { + const key_type& __k = this->_M_extract(__new_node->_M_v); + typename _Hashtable::_Hash_code_type __code + = this->_M_hash_code(__k); + size_type __bkt + = this->_M_bucket_index(__k, __code, _M_bucket_count); + + if (_Node* __p = _M_find_node(__bkt, __k, __code)) + { + // There is already an equivalent node, no insertion + _M_deallocate_node(__new_node); + return std::make_pair(iterator(__p), false); + } + + // We are going to insert this node + this->_M_store_code(__new_node, __code); + const _RehashPolicyState& __saved_state + = _M_rehash_policy._M_state(); + std::pair<bool, std::size_t> __do_rehash + = _M_rehash_policy._M_need_rehash(_M_bucket_count, + _M_element_count, 1); + + if (__do_rehash.first) + { + _M_rehash(__do_rehash.second, __saved_state); + __bkt = this->_M_bucket_index(__k, __code, _M_bucket_count); + } + + if (_M_buckets[__bkt]) + _M_insert_after(__bkt, _M_buckets[__bkt], __new_node); + else + _M_insert_bucket_begin(__bkt, __new_node); + ++_M_element_count; + return std::make_pair(iterator(__new_node), true); + } + __catch(...) + { + _M_deallocate_node(__new_node); + __throw_exception_again; + } + } + + template<typename _Key, typename _Value, + typename _Allocator, typename _ExtractKey, typename _Equal, + typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, + bool __chc, bool __cit, bool __uk> + template<typename... _Args> + typename _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, + _H1, _H2, _Hash, _RehashPolicy, + __chc, __cit, __uk>::iterator + _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, + _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>:: + _M_emplace(std::false_type, _Args&&... __args) + { + const _RehashPolicyState& __saved_state = _M_rehash_policy._M_state(); + std::pair<bool, std::size_t> __do_rehash + = _M_rehash_policy._M_need_rehash(_M_bucket_count, + _M_element_count, 1); + + // First build the node to get its hash code + _Node* __new_node = _M_allocate_node(std::forward<_Args>(__args)...); + __try + { + const key_type& __k = this->_M_extract(__new_node->_M_v); + typename _Hashtable::_Hash_code_type __code + = this->_M_hash_code(__k); + this->_M_store_code(__new_node, __code); + size_type __bkt + = this->_M_bucket_index(__k, __code, _M_bucket_count); + + // Second find the node, avoid rehash if compare throws. + _Node* __prev = _M_find_node(__bkt, __k, __code); + + if (__do_rehash.first) + { + _M_rehash(__do_rehash.second, __saved_state); + __bkt = this->_M_bucket_index(__k, __code, _M_bucket_count); + // __prev is still valid because rehash do not invalidate nodes + } + + if (__prev) + // Insert after the previous equivalent node + _M_insert_after(__bkt, __prev, __new_node); + else if (_M_buckets[__bkt]) + // Bucket is not empty and the inserted node has no equivalent in + // the hashtable. We must insert the new node at the beginning or + // end of the bucket to preserve equivalent elements relative + // positions. + if (__bkt != _M_begin_bucket_index) + // We insert the new node at the beginning + _M_insert_after(__bkt, _M_buckets[__bkt], __new_node); + else + // We insert the new node at the end + _M_insert_after(__bkt, _M_bucket_end(__bkt), __new_node); + else + _M_insert_bucket_begin(__bkt, __new_node); + ++_M_element_count; + return iterator(__new_node); + } + __catch(...) + { + _M_deallocate_node(__new_node); + __throw_exception_again; + } + } + // Insert v in bucket n (assumes no element with its key already present). template<typename _Key, typename _Value, typename _Allocator, typename _ExtractKey, typename _Equal, @@ -1300,7 +1441,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_deallocate_node(__new_node); __throw_exception_again; } - } template<typename _Key, typename _Value, diff --git a/libstdc++-v3/include/bits/hashtable_policy.h b/libstdc++-v3/include/bits/hashtable_policy.h index 44c749af515..e97685c6ae7 100644 --- a/libstdc++-v3/include/bits/hashtable_policy.h +++ b/libstdc++-v3/include/bits/hashtable_policy.h @@ -300,23 +300,30 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { // Optimize lookups involving the first elements of __prime_list. // (useful to speed-up, eg, constructors) - static const unsigned long __fast_bkt[12] + static const unsigned char __fast_bkt[12] = { 2, 2, 2, 3, 5, 5, 7, 7, 11, 11, 11, 11 }; + if (__n <= 11) + { + _M_prev_resize = 0; + _M_next_resize + = __builtin_ceil(__fast_bkt[__n] * (long double)_M_max_load_factor); + return __fast_bkt[__n]; + } + const unsigned long* __p - = __n <= 11 ? __fast_bkt + __n - : std::lower_bound(__prime_list + 5, - __prime_list + _S_n_primes, __n); - - _M_prev_resize = __builtin_floor(*__p * (long double)_M_max_load_factor); - if (__p != __fast_bkt) - _M_prev_resize = std::min(_M_prev_resize, - static_cast<std::size_t>(*(__p - 1))); - // Lets guaranty a minimal grow step of 11: + = std::lower_bound(__prime_list + 5, __prime_list + _S_n_primes, __n); + + // Shrink will take place only if the number of elements is small enough + // so that the prime number 2 steps before __p is large enough to still + // conform to the max load factor: + _M_prev_resize + = __builtin_floor(*(__p - 2) * (long double)_M_max_load_factor); + + // Let's guaranty that a minimal grow step of 11 is used if (*__p - __n < 11) - __p = std::lower_bound(__prime_list + 5, - __prime_list + _S_n_primes, __n + 11); - _M_next_resize = __builtin_floor(*__p * (long double)_M_max_load_factor); + __p = std::lower_bound(__p, __prime_list + _S_n_primes, __n + 11); + _M_next_resize = __builtin_ceil(*__p * (long double)_M_max_load_factor); return *__p; } diff --git a/libstdc++-v3/include/bits/locale_classes.h b/libstdc++-v3/include/bits/locale_classes.h index 88bbf691c2e..4beca40d34d 100644 --- a/libstdc++-v3/include/bits/locale_classes.h +++ b/libstdc++-v3/include/bits/locale_classes.h @@ -571,39 +571,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /** - * @brief Test for the presence of a facet. - * - * has_facet tests the locale argument for the presence of the facet type - * provided as the template parameter. Facets derived from the facet - * parameter will also return true. - * - * @tparam _Facet The facet type to test the presence of. - * @param __loc The locale to test. - * @return true if __loc contains a facet of type _Facet, else false. - */ - template<typename _Facet> - bool - has_facet(const locale& __loc) throw(); - - /** - * @brief Return a facet. - * - * use_facet looks for and returns a reference to a facet of type Facet - * where Facet is the template parameter. If has_facet(locale) is true, - * there is a suitable facet to return. It throws std::bad_cast if the - * locale doesn't contain a facet of type Facet. - * - * @tparam _Facet The facet type to access. - * @param __loc The locale to use. - * @return Reference to facet of type Facet. - * @throw std::bad_cast if __loc doesn't contain a facet of type _Facet. - */ - template<typename _Facet> - const _Facet& - use_facet(const locale& __loc); - - - /** * @brief Facet for localized string comparison. * * This facet encapsulates the code to compare strings in a localized diff --git a/libstdc++-v3/include/bits/locale_classes.tcc b/libstdc++-v3/include/bits/locale_classes.tcc index 5b2901aea9e..c796e0eaa4e 100644 --- a/libstdc++-v3/include/bits/locale_classes.tcc +++ b/libstdc++-v3/include/bits/locale_classes.tcc @@ -87,7 +87,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __s2.data(), __s2.data() + __s2.length()) < 0); } - + /** + * @brief Test for the presence of a facet. + * + * has_facet tests the locale argument for the presence of the facet type + * provided as the template parameter. Facets derived from the facet + * parameter will also return true. + * + * @tparam _Facet The facet type to test the presence of. + * @param __loc The locale to test. + * @return true if @p __loc contains a facet of type _Facet, else false. + */ template<typename _Facet> bool has_facet(const locale& __loc) throw() @@ -102,6 +112,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif } + /** + * @brief Return a facet. + * + * use_facet looks for and returns a reference to a facet of type Facet + * where Facet is the template parameter. If has_facet(locale) is true, + * there is a suitable facet to return. It throws std::bad_cast if the + * locale doesn't contain a facet of type Facet. + * + * @tparam _Facet The facet type to access. + * @param __loc The locale to use. + * @return Reference to facet of type Facet. + * @throw std::bad_cast if @p __loc doesn't contain a facet of type _Facet. + */ template<typename _Facet> const _Facet& use_facet(const locale& __loc) diff --git a/libstdc++-v3/include/bits/shared_ptr.h b/libstdc++-v3/include/bits/shared_ptr.h index 33128dd4ed6..070d2d1360b 100644 --- a/libstdc++-v3/include/bits/shared_ptr.h +++ b/libstdc++-v3/include/bits/shared_ptr.h @@ -100,6 +100,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION constexpr shared_ptr() noexcept : __shared_ptr<_Tp>() { } + shared_ptr(const shared_ptr&) noexcept = default; + /** * @brief Construct a %shared_ptr that owns the pointer @a __p. * @param __p A pointer that is convertible to element_type*. @@ -211,7 +213,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @param __r A %shared_ptr. * @post get() == __r.get() && use_count() == __r.use_count() */ - shared_ptr(const shared_ptr&) noexcept = default; template<typename _Tp1, typename = typename std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type> shared_ptr(const shared_ptr<_Tp1>& __r) noexcept @@ -266,6 +267,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : __shared_ptr<_Tp>(__p) { } shared_ptr& operator=(const shared_ptr&) noexcept = default; + template<typename _Tp1> shared_ptr& operator=(const shared_ptr<_Tp1>& __r) noexcept diff --git a/libstdc++-v3/include/bits/stl_algo.h b/libstdc++-v3/include/bits/stl_algo.h index 10c7e2d0756..c517a1963d1 100644 --- a/libstdc++-v3/include/bits/stl_algo.h +++ b/libstdc++-v3/include/bits/stl_algo.h @@ -1664,9 +1664,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @return Nothing. * * Rotates the elements of the range @p [__first,__last) by - * @p(__middle - __first) positions so that the element at @p __middle + * @p (__middle - __first) positions so that the element at @p __middle * is moved to @p __first, the element at @p __middle+1 is moved to - * @ __first+1 and so on for each element in the range + * @p __first+1 and so on for each element in the range * @p [__first,__last). * * This effectively swaps the ranges @p [__first,__middle) and @@ -1705,7 +1705,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * range beginning at @result, rotating the copied elements by * @p (__middle-__first) positions so that the element at @p __middle * is moved to @p __result, the element at @p __middle+1 is moved - * to @__result+1 and so on for each element in the range @p + * to @p __result+1 and so on for each element in the range @p * [__first,__last). * * Performs @@ -1947,9 +1947,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * to the range beginning at @p __result_first, where the number of * elements to be copied, @p N, is the smaller of @p (__last-__first) and * @p (__result_last-__result_first). - * After the sort if @p i and @j are iterators in the range - * @p [__result_first,__result_first+N) such that @i precedes @j then - * @p *j<*i is false. + * After the sort if @e i and @e j are iterators in the range + * @p [__result_first,__result_first+N) such that i precedes j then + * *j<*i is false. * The value returned is @p __result_first+N. */ template<typename _InputIterator, typename _RandomAccessIterator> @@ -2013,8 +2013,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * to the range beginning at @p result_first, where the number of * elements to be copied, @p N, is the smaller of @p (__last-__first) and * @p (__result_last-__result_first). - * After the sort if @p i and @j are iterators in the range - * @p [__result_first,__result_first+N) such that @i precedes @j then + * After the sort if @e i and @e j are iterators in the range + * @p [__result_first,__result_first+N) such that i precedes j then * @p __comp(*j,*i) is false. * The value returned is @p __result_first+N. */ @@ -2387,7 +2387,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // lower_bound moved to stl_algobase.h /** - * @brief Finds the first position in which @a val could be inserted + * @brief Finds the first position in which @p __val could be inserted * without changing the ordering. * @ingroup binary_search_algorithms * @param __first An iterator. @@ -2395,8 +2395,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @param __val The search term. * @param __comp A functor to use for comparisons. * @return An iterator pointing to the first element <em>not less - * than</em> @a __val, or end() if every element is less - * than @a __val. + * than</em> @p __val, or end() if every element is less + * than @p __val. * @ingroup binary_search_algorithms * * The comparison function should have the same effects on ordering as @@ -2439,14 +2439,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } /** - * @brief Finds the last position in which @a val could be inserted + * @brief Finds the last position in which @p __val could be inserted * without changing the ordering. * @ingroup binary_search_algorithms * @param __first An iterator. * @param __last Another iterator. * @param __val The search term. - * @return An iterator pointing to the first element greater than @a __val, - * or end() if no elements are greater than @a __val. + * @return An iterator pointing to the first element greater than @p __val, + * or end() if no elements are greater than @p __val. * @ingroup binary_search_algorithms */ template<typename _ForwardIterator, typename _Tp> @@ -2484,15 +2484,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } /** - * @brief Finds the last position in which @a val could be inserted + * @brief Finds the last position in which @p __val could be inserted * without changing the ordering. * @ingroup binary_search_algorithms * @param __first An iterator. * @param __last Another iterator. * @param __val The search term. * @param __comp A functor to use for comparisons. - * @return An iterator pointing to the first element greater than @a __val, - * or end() if no elements are greater than @a __val. + * @return An iterator pointing to the first element greater than @p __val, + * or end() if no elements are greater than @p __val. * @ingroup binary_search_algorithms * * The comparison function should have the same effects on ordering as @@ -2535,7 +2535,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } /** - * @brief Finds the largest subrange in which @a val could be inserted + * @brief Finds the largest subrange in which @p __val could be inserted * at any place in it without changing the ordering. * @ingroup binary_search_algorithms * @param __first An iterator. @@ -2597,7 +2597,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } /** - * @brief Finds the largest subrange in which @a val could be inserted + * @brief Finds the largest subrange in which @p __val could be inserted * at any place in it without changing the ordering. * @param __first An iterator. * @param __last Another iterator. @@ -2668,10 +2668,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @param __first An iterator. * @param __last Another iterator. * @param __val The search term. - * @return True if @a __val (or its equivalent) is in [@a - * __first,@a __last ]. + * @return True if @p __val (or its equivalent) is in [@p + * __first,@p __last ]. * - * Note that this does not actually return an iterator to @a __val. For + * Note that this does not actually return an iterator to @p __val. For * that, use std::find or a container's specialized find member functions. */ template<typename _ForwardIterator, typename _Tp> @@ -2699,9 +2699,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @param __last Another iterator. * @param __val The search term. * @param __comp A functor to use for comparisons. - * @return True if @a val (or its equivalent) is in [@a first,@a last ]. + * @return True if @p __val (or its equivalent) is in @p [__first,__last]. * - * Note that this does not actually return an iterator to @a val. For + * Note that this does not actually return an iterator to @p __val. For * that, use std::find or a container's specialized find member functions. * * The comparison function should have the same effects on ordering as @@ -3523,7 +3523,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * each element in [__first2,__last2) within [__first1,__last1). * The iterators over each range only move forward, so this is a * linear algorithm. If an element in [__first2,__last2) is not - * found before the search iterator reaches @a __last2, false is + * found before the search iterator reaches @p __last2, false is * returned. */ template<typename _InputIterator1, typename _InputIterator2> @@ -3574,7 +3574,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * using comp to decide. The iterators over each range only move * forward, so this is a linear algorithm. If an element in * [__first2,__last2) is not found before the search iterator - * reaches @a __last2, false is returned. + * reaches @p __last2, false is returned. */ template<typename _InputIterator1, typename _InputIterator2, typename _Compare> @@ -3620,13 +3620,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // max_element /** - * @brief Permute range into the next @a dictionary ordering. + * @brief Permute range into the next @e dictionary ordering. * @ingroup sorting_algorithms * @param __first Start of range. * @param __last End of range. * @return False if wrapped to first permutation, true otherwise. * - * Treats all permutations of the range as a set of @a dictionary sorted + * Treats all permutations of the range as a set of @e dictionary sorted * sequences. Permutes the current sequence into the next one of this set. * Returns true if there are more sequences to generate. If the sequence * is the largest of the set, the smallest is generated and false returned. @@ -3674,7 +3674,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } /** - * @brief Permute range into the next @a dictionary ordering using + * @brief Permute range into the next @e dictionary ordering using * comparison functor. * @ingroup sorting_algorithms * @param __first Start of range. @@ -3683,7 +3683,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @return False if wrapped to first permutation, true otherwise. * * Treats all permutations of the range [__first,__last) as a set of - * @a dictionary sorted sequences ordered by @a comp. Permutes the current + * @e dictionary sorted sequences ordered by @p __comp. Permutes the current * sequence into the next one of this set. Returns true if there are more * sequences to generate. If the sequence is the largest of the set, the * smallest is generated and false returned. @@ -3732,13 +3732,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } /** - * @brief Permute range into the previous @a dictionary ordering. + * @brief Permute range into the previous @e dictionary ordering. * @ingroup sorting_algorithms * @param __first Start of range. * @param __last End of range. * @return False if wrapped to last permutation, true otherwise. * - * Treats all permutations of the range as a set of @a dictionary sorted + * Treats all permutations of the range as a set of @e dictionary sorted * sequences. Permutes the current sequence into the previous one of this * set. Returns true if there are more sequences to generate. If the * sequence is the smallest of the set, the largest is generated and false @@ -3787,7 +3787,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } /** - * @brief Permute range into the previous @a dictionary ordering using + * @brief Permute range into the previous @e dictionary ordering using * comparison functor. * @ingroup sorting_algorithms * @param __first Start of range. @@ -3796,7 +3796,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @return False if wrapped to last permutation, true otherwise. * * Treats all permutations of the range [__first,__last) as a set of - * @a dictionary sorted sequences ordered by @a comp. Permutes the current + * @e dictionary sorted sequences ordered by @p __comp. Permutes the current * sequence into the previous one of this set. Returns true if there are * more sequences to generate. If the sequence is the smallest of the set, * the largest is generated and false returned. @@ -4032,7 +4032,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @ingroup sorting_algorithms * @param __a A thing of arbitrary type. * @param __b Another thing of arbitrary type. - * @param __comp A @link comparison_functor comparison functor @endlink. + * @param __comp A @link comparison_functors comparison functor @endlink. * @return A pair(__b, __a) if __b is smaller than __a, pair(__a, * __b) otherwise. */ @@ -5258,9 +5258,9 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO * @p [first,last) and moves them to the range @p [__first,__middle). The * order of the remaining elements in the range @p [__middle,__last) is * undefined. - * After the sort if @p i and @j are iterators in the range - * @p [__first,__middle) such that @i precedes @j and @k is an iterator in - * the range @p [__middle,__last) then @p *j<*i and @p *k<*i are both false. + * After the sort if @e i and @e j are iterators in the range + * @p [__first,__middle) such that i precedes j and @e k is an iterator in + * the range @p [__middle,__last) then *j<*i and *k<*i are both false. */ template<typename _RandomAccessIterator> inline void @@ -5296,8 +5296,8 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO * @p [__first,__last) and moves them to the range @p [__first,__middle). The * order of the remaining elements in the range @p [__middle,__last) is * undefined. - * After the sort if @p i and @j are iterators in the range - * @p [__first,__middle) such that @i precedes @j and @k is an iterator in + * After the sort if @e i and @e j are iterators in the range + * @p [__first,__middle) such that i precedes j and @e k is an iterator in * the range @p [__middle,__last) then @p *__comp(j,*i) and @p __comp(*k,*i) * are both false. */ @@ -5333,11 +5333,10 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO * * Rearranges the elements in the range @p [__first,__last) so that @p *__nth * is the same element that would have been in that position had the - * whole sequence been sorted. * whole sequence been sorted. The elements either side of @p *__nth are - * not completely sorted, but for any iterator @i in the range - * @p [__first,__nth) and any iterator @j in the range @p [__nth,__last) it - * holds that @p *j<*i is false. + * not completely sorted, but for any iterator @e i in the range + * @p [__first,__nth) and any iterator @e j in the range @p [__nth,__last) it + * holds that *j < *i is false. */ template<typename _RandomAccessIterator> inline void @@ -5374,8 +5373,8 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO * Rearranges the elements in the range @p [__first,__last) so that @p *__nth * is the same element that would have been in that position had the * whole sequence been sorted. The elements either side of @p *__nth are - * not completely sorted, but for any iterator @i in the range - * @p [__first,__nth) and any iterator @j in the range @p [__nth,__last) it + * not completely sorted, but for any iterator @e i in the range + * @p [__first,__nth) and any iterator @e j in the range @p [__nth,__last) it * holds that @p __comp(*j,*i) is false. */ template<typename _RandomAccessIterator, typename _Compare> @@ -5410,8 +5409,8 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO * @return Nothing. * * Sorts the elements in the range @p [__first,__last) in ascending order, - * such that @p *(i+1)<*i is false for each iterator @p i in the range - * @p [__first,__last-1). + * such that for each iterator @e i in the range @p [__first,__last-1), + * *(i+1)<*i is false. * * The relative ordering of equivalent elements is not preserved, use * @p stable_sort() if this is needed. @@ -5446,7 +5445,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO * @return Nothing. * * Sorts the elements in the range @p [__first,__last) in ascending order, - * such that @p __comp(*(i+1),*i) is false for every iterator @p i in the + * such that @p __comp(*(i+1),*i) is false for every iterator @e i in the * range @p [__first,__last-1). * * The relative ordering of equivalent elements is not preserved, use @@ -5484,10 +5483,10 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO * @param __last2 Another iterator. * @param __result An iterator pointing to the end of the merged range. * @return An iterator pointing to the first element <em>not less - * than</em> @a val. + * than</em> @e val. * - * Merges the ranges [__first1,__last1) and [__first2,__last2) into - * the sorted range [__result, __result + (__last1-__first1) + + * Merges the ranges @p [__first1,__last1) and @p [__first2,__last2) into + * the sorted range @p [__result, __result + (__last1-__first1) + * (__last2-__first2)). Both input ranges must be sorted, and the * output range must not overlap with either of the input ranges. * The sort is @e stable, that is, for equivalent elements in the @@ -5545,10 +5544,10 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO * @param __result An iterator pointing to the end of the merged range. * @param __comp A functor to use for comparisons. * @return An iterator pointing to the first element "not less - * than" @a val. + * than" @e val. * - * Merges the ranges [__first1,__last1) and [__first2,__last2) into - * the sorted range [__result, __result + (__last1-__first1) + + * Merges the ranges @p [__first1,__last1) and @p [__first2,__last2) into + * the sorted range @p [__result, __result + (__last1-__first1) + * (__last2-__first2)). Both input ranges must be sorted, and the * output range must not overlap with either of the input ranges. * The sort is @e stable, that is, for equivalent elements in the @@ -5610,8 +5609,8 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO * @return Nothing. * * Sorts the elements in the range @p [__first,__last) in ascending order, - * such that @p *(i+1)<*i is false for each iterator @p i in the range - * @p [__first,__last-1). + * such that for each iterator @p i in the range @p [__first,__last-1), + * @p *(i+1)<*i is false. * * The relative ordering of equivalent elements is preserved, so any two * elements @p x and @p y in the range @p [__first,__last) such that @@ -5652,8 +5651,8 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO * @return Nothing. * * Sorts the elements in the range @p [__first,__last) in ascending order, - * such that @p __comp(*(i+1),*i) is false for each iterator @p i in the - * range @p [__first,__last-1). + * such that for each iterator @p i in the range @p [__first,__last-1), + * @p __comp(*(i+1),*i) is false. * * The relative ordering of equivalent elements is preserved, so any two * elements @p x and @p y in the range @p [__first,__last) such that @@ -5768,8 +5767,8 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO * This operation iterates over both ranges, copying elements present in * each range in order to the output range. Iterators increment for each * range. When the current element of one range is less than the other - * according to @a __comp, that element is copied and the iterator advanced. - * If an equivalent element according to @a __comp is contained in both + * according to @p __comp, that element is copied and the iterator advanced. + * If an equivalent element according to @p __comp is contained in both * ranges, the element from the first range is copied and both ranges * advance. The output range may not overlap either input range. */ @@ -5892,8 +5891,8 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO * This operation iterates over both ranges, copying elements present in * both ranges in order to the output range. Iterators increment for each * range. When the current element of one range is less than the other - * according to @a __comp, that iterator advances. If an element is - * contained in both ranges according to @a __comp, the element from the + * according to @p __comp, that iterator advances. If an element is + * contained in both ranges according to @p __comp, the element from the * first range is copied and both ranges advance. The output range may not * overlap either input range. */ @@ -6009,10 +6008,10 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO * This operation iterates over both ranges, copying elements present in * the first range but not the second in order to the output range. * Iterators increment for each range. When the current element of the - * first range is less than the second according to @a comp, that element + * first range is less than the second according to @p __comp, that element * is copied and the iterator advances. If the current element of the * second range is less, no element is copied and the iterator advances. - * If an element is contained in both ranges according to @a comp, no + * If an element is contained in both ranges according to @p __comp, no * elements are copied and both ranges advance. The output range may not * overlap either input range. */ @@ -6135,9 +6134,9 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO * This operation iterates over both ranges, copying elements present in * one range but not the other in order to the output range. Iterators * increment for each range. When the current element of one range is less - * than the other according to @a comp, that element is copied and the + * than the other according to @p comp, that element is copied and the * iterator advances. If an element is contained in both ranges according - * to @a comp, no elements are copied and both ranges advance. The output + * to @p __comp, no elements are copied and both ranges advance. The output * range may not overlap either input range. */ template<typename _InputIterator1, typename _InputIterator2, @@ -6223,7 +6222,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO * @param __last End of range. * @param __comp Comparison functor. * @return Iterator referencing the first instance of the smallest value - * according to comp. + * according to __comp. */ template<typename _ForwardIterator, typename _Compare> _ForwardIterator diff --git a/libstdc++-v3/include/bits/stl_list.h b/libstdc++-v3/include/bits/stl_list.h index fc1d8f8c6ea..e422de88e60 100644 --- a/libstdc++-v3/include/bits/stl_list.h +++ b/libstdc++-v3/include/bits/stl_list.h @@ -1441,9 +1441,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER /** * @brief Merge sorted lists according to comparison function. - * @param __x Sorted list to merge. * @tparam _StrictWeakOrdering Comparison function defining * sort order. + * @param __x Sorted list to merge. + * @param __comp Comparison functor. * * Assumes that both @a __x and this list are sorted according to * StrictWeakOrdering. Merges elements of @a __x into this list diff --git a/libstdc++-v3/include/bits/stl_numeric.h b/libstdc++-v3/include/bits/stl_numeric.h index 0ec746f541e..085fe9313dd 100644 --- a/libstdc++-v3/include/bits/stl_numeric.h +++ b/libstdc++-v3/include/bits/stl_numeric.h @@ -133,7 +133,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO * @brief Accumulate values in a range with operation. * * Accumulates the values in the range [first,last) using the function - * object @a binary_op. The initial value is @a init. The values are + * object @p __binary_op. The initial value is @p __init. The values are * processed in order. * * @param __first Start of range. @@ -159,7 +159,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO /** * @brief Compute inner product of two ranges. * - * Starting with an initial value of @a init, multiplies successive + * Starting with an initial value of @p __init, multiplies successive * elements from the two ranges and adds each product into the accumulated * value using operator+(). The values in the ranges are processed in * order. @@ -188,9 +188,9 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO /** * @brief Compute inner product of two ranges. * - * Starting with an initial value of @a init, applies @a binary_op2 to + * Starting with an initial value of @p __init, applies @p __binary_op2 to * successive elements from the two ranges and accumulates each result into - * the accumulated value using @a binary_op1. The values in the ranges are + * the accumulated value using @p __binary_op1. The values in the ranges are * processed in order. * * @param __first1 Start of range 1. @@ -224,14 +224,14 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO * * Accumulates the values in the range [first,last) using operator+(). * As each successive input value is added into the total, that partial sum - * is written to @a result. Therefore, the first value in result is the + * is written to @p __result. Therefore, the first value in result is the * first value of the input, the second value in result is the sum of the * first and second input values, and so on. * * @param __first Start of input range. * @param __last End of input range. - * @param __result Output to write sums to. - * @return Iterator pointing just beyond the values written to result. + * @param __result Output sum. + * @return Iterator pointing just beyond the values written to __result. */ template<typename _InputIterator, typename _OutputIterator> _OutputIterator @@ -263,14 +263,14 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO * * Accumulates the values in the range [first,last) using operator+(). * As each successive input value is added into the total, that partial sum - * is written to @a result. Therefore, the first value in result is the + * is written to @p __result. Therefore, the first value in result is the * first value of the input, the second value in result is the sum of the * first and second input values, and so on. * * @param __first Start of input range. * @param __last End of input range. - * @param __result Output to write sums to. - * @return Iterator pointing just beyond the values written to result. + * @param __result Output sum. + * @return Iterator pointing just beyond the values written to __result. */ template<typename _InputIterator, typename _OutputIterator, typename _BinaryOperation> @@ -302,11 +302,11 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO * @brief Return differences between adjacent values. * * Computes the difference between adjacent values in the range - * [first,last) using operator-() and writes the result to @a result. + * [first,last) using operator-() and writes the result to @p __result. * * @param __first Start of input range. * @param __last End of input range. - * @param __result Output to write sums to. + * @param __result Output sums. * @return Iterator pointing just beyond the values written to result. * * _GLIBCXX_RESOLVE_LIB_DEFECTS @@ -342,12 +342,13 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO * @brief Return differences between adjacent values. * * Computes the difference between adjacent values in the range - * [__first,__last) using the function object @a __binary_op and writes the - * result to @a __result. + * [__first,__last) using the function object @p __binary_op and writes the + * result to @p __result. * * @param __first Start of input range. * @param __last End of input range. - * @param __result Output to write sums to. + * @param __result Output sum. + * @param __binary_op Function object. * @return Iterator pointing just beyond the values written to result. * * _GLIBCXX_RESOLVE_LIB_DEFECTS diff --git a/libstdc++-v3/include/debug/safe_base.h b/libstdc++-v3/include/debug/safe_base.h index 1348004cb57..a1aa53687b9 100644 --- a/libstdc++-v3/include/debug/safe_base.h +++ b/libstdc++-v3/include/debug/safe_base.h @@ -79,7 +79,7 @@ namespace __gnu_debug { } /** Initialize the iterator to reference the sequence pointed to - * by @p__seq. @p __constant is true when we are initializing a + * by @p __seq. @p __constant is true when we are initializing a * constant iterator, and false if it is a mutable iterator. Note * that @p __seq may be NULL, in which case the iterator will be * singular. Otherwise, the iterator will reference @p __seq and diff --git a/libstdc++-v3/include/debug/unordered_map b/libstdc++-v3/include/debug/unordered_map index 6ad46b627d3..cf84948f049 100644 --- a/libstdc++-v3/include/debug/unordered_map +++ b/libstdc++-v3/include/debug/unordered_map @@ -204,6 +204,29 @@ namespace __debug cend(size_type __b) const { return const_local_iterator(_Base::cend(__b), __b, this); } + template<typename... _Args> + std::pair<iterator, bool> + emplace(_Args&&... __args) + { + size_type __bucket_count = this->bucket_count(); + std::pair<_Base_iterator, bool> __res + = _Base::emplace(std::forward<_Args>(__args)...); + _M_check_rehashed(__bucket_count); + return std::make_pair(iterator(__res.first, this), __res.second); + } + + template<typename... _Args> + iterator + emplace_hint(const_iterator __hint, _Args&&... __args) + { + __glibcxx_check_insert(__hint); + size_type __bucket_count = this->bucket_count(); + _Base_iterator __it = _Base::emplace_hint(__hint.base(), + std::forward<_Args>(__args)...); + _M_check_rehashed(__bucket_count); + return iterator(__it, this); + } + std::pair<iterator, bool> insert(const value_type& __obj) { @@ -587,6 +610,29 @@ namespace __debug cend(size_type __b) const { return const_local_iterator(_Base::cend(__b), __b, this); } + template<typename... _Args> + iterator + emplace(_Args&&... __args) + { + size_type __bucket_count = this->bucket_count(); + _Base_iterator __it + = _Base::emplace(std::forward<_Args>(__args)...); + _M_check_rehashed(__bucket_count); + return iterator(__it, this); + } + + template<typename... _Args> + iterator + emplace_hint(const_iterator __hint, _Args&&... __args) + { + __glibcxx_check_insert(__hint); + size_type __bucket_count = this->bucket_count(); + _Base_iterator __it = _Base::emplace_hint(__hint.base(), + std::forward<_Args>(__args)...); + _M_check_rehashed(__bucket_count); + return iterator(__it, this); + } + iterator insert(const value_type& __obj) { diff --git a/libstdc++-v3/include/debug/unordered_set b/libstdc++-v3/include/debug/unordered_set index 2f41bc3a25d..ba4404028e3 100644 --- a/libstdc++-v3/include/debug/unordered_set +++ b/libstdc++-v3/include/debug/unordered_set @@ -204,6 +204,29 @@ namespace __debug cend(size_type __b) const { return const_local_iterator(_Base::cend(__b), __b, this); } + template<typename... _Args> + std::pair<iterator, bool> + emplace(_Args&&... __args) + { + size_type __bucket_count = this->bucket_count(); + std::pair<_Base_iterator, bool> __res + = _Base::emplace(std::forward<_Args>(__args)...); + _M_check_rehashed(__bucket_count); + return std::make_pair(iterator(__res.first, this), __res.second); + } + + template<typename... _Args> + iterator + emplace_hint(const_iterator __hint, _Args&&... __args) + { + __glibcxx_check_insert(__hint); + size_type __bucket_count = this->bucket_count(); + _Base_iterator __it = _Base::emplace_hint(__hint.base(), + std::forward<_Args>(__args)...); + _M_check_rehashed(__bucket_count); + return iterator(__it, this); + } + std::pair<iterator, bool> insert(const value_type& __obj) { @@ -582,6 +605,29 @@ namespace __debug cend(size_type __b) const { return const_local_iterator(_Base::cend(__b), __b, this); } + template<typename... _Args> + iterator + emplace(_Args&&... __args) + { + size_type __bucket_count = this->bucket_count(); + _Base_iterator __it + = _Base::emplace(std::forward<_Args>(__args)...); + _M_check_rehashed(__bucket_count); + return iterator(__it, this); + } + + template<typename... _Args> + iterator + emplace_hint(const_iterator __hint, _Args&&... __args) + { + __glibcxx_check_insert(__hint); + size_type __bucket_count = this->bucket_count(); + _Base_iterator __it = _Base::emplace_hint(__hint.base(), + std::forward<_Args>(__args)...); + _M_check_rehashed(__bucket_count); + return iterator(__it, this); + } + iterator insert(const value_type& __obj) { diff --git a/libstdc++-v3/include/parallel/equally_split.h b/libstdc++-v3/include/parallel/equally_split.h index a840ae3147a..31a0fca72bf 100644 --- a/libstdc++-v3/include/parallel/equally_split.h +++ b/libstdc++-v3/include/parallel/equally_split.h @@ -68,6 +68,7 @@ namespace __gnu_parallel * thread number __thread_no+1 (excluded). * @param __n Number of elements * @param __num_threads Number of parts + * @param __thread_no Number of threads * @returns splitting point */ template<typename _DifferenceType> _DifferenceType diff --git a/libstdc++-v3/include/profile/unordered_map b/libstdc++-v3/include/profile/unordered_map index 5d57df53769..3688d549f65 100644 --- a/libstdc++-v3/include/profile/unordered_map +++ b/libstdc++-v3/include/profile/unordered_map @@ -171,6 +171,28 @@ namespace __profile _Base::clear(); } + template<typename... _Args> + std::pair<iterator, bool> + emplace(_Args&&... __args) + { + size_type __old_size = _Base::bucket_count(); + std::pair<iterator, bool> __res + = _Base::emplace(std::forward<_Args>(__args)...); + _M_profile_resize(__old_size); + return __res; + } + + template<typename... _Args> + iterator + emplace_hint(const_iterator __it, _Args&&... __args) + { + size_type __old_size = _Base::bucket_count(); + iterator __res + = _Base::emplace_hint(__it, std::forward<_Args>(__args)...); + _M_profile_resize(__old_size); + return __res; + } + void insert(std::initializer_list<value_type> __l) { @@ -182,7 +204,7 @@ namespace __profile std::pair<iterator, bool> insert(const value_type& __obj) { - size_type __old_size = _Base::bucket_count(); + size_type __old_size = _Base::bucket_count(); std::pair<iterator, bool> __res = _Base::insert(__obj); _M_profile_resize(__old_size); return __res; @@ -203,7 +225,7 @@ namespace __profile std::pair<iterator, bool> insert(_Pair&& __obj) { - size_type __old_size = _Base::bucket_count(); + size_type __old_size = _Base::bucket_count(); std::pair<iterator, bool> __res = _Base::insert(std::forward<_Pair>(__obj)); _M_profile_resize(__old_size); @@ -243,7 +265,7 @@ namespace __profile mapped_type& operator[](const _Key& __k) { - size_type __old_size = _Base::bucket_count(); + size_type __old_size = _Base::bucket_count(); mapped_type& __res = _M_base()[__k]; _M_profile_resize(__old_size); return __res; @@ -252,7 +274,7 @@ namespace __profile mapped_type& operator[](_Key&& __k) { - size_type __old_size = _Base::bucket_count(); + size_type __old_size = _Base::bucket_count(); mapped_type& __res = _M_base()[std::move(__k)]; _M_profile_resize(__old_size); return __res; @@ -264,9 +286,9 @@ namespace __profile void rehash(size_type __n) { - size_type __old_size = _Base::bucket_count(); - _Base::rehash(__n); - _M_profile_resize(__old_size); + size_type __old_size = _Base::bucket_count(); + _Base::rehash(__n); + _M_profile_resize(__old_size); } private: @@ -274,33 +296,33 @@ namespace __profile _M_profile_resize(size_type __old_size) { size_type __new_size = _Base::bucket_count(); - if (__old_size != __new_size) + if (__old_size != __new_size) __profcxx_hashtable_resize(this, __old_size, __new_size); } void _M_profile_destruct() { - size_type __hops = 0, __lc = 0, __chain = 0; - for (iterator __it = _M_base().begin(); __it != _M_base().end(); - ++__it) + size_type __hops = 0, __lc = 0, __chain = 0; + iterator __it = this->begin(); + while (__it != this->end()) { - while (__it._M_cur_node->_M_next) - { - ++__chain; - ++__it; - } + size_type __bkt = this->bucket(__it->first); + for (++__it; __it != this->end() + && this->bucket(__it->first) == __bkt; + ++__it) + ++__chain; if (__chain) { ++__chain; - __lc = __lc > __chain ? __lc : __chain; + __lc = __lc > __chain ? __lc : __chain; __hops += __chain * (__chain - 1) / 2; __chain = 0; } } - __profcxx_hashtable_destruct2(this, __lc, _Base::size(), __hops); + __profcxx_hashtable_destruct2(this, __lc, _Base::size(), __hops); } - }; + }; template<typename _Key, typename _Tp, typename _Hash, typename _Pred, typename _Alloc> @@ -429,12 +451,6 @@ namespace __profile _M_profile_destruct(); } - _Base& - _M_base() noexcept { return *this; } - - const _Base& - _M_base() const noexcept { return *this; } - void clear() noexcept { @@ -444,20 +460,42 @@ namespace __profile _Base::clear(); } + template<typename... _Args> + iterator + emplace(_Args&&... __args) + { + size_type __old_size = _Base::bucket_count(); + iterator __res + = _Base::emplace(std::forward<_Args>(__args)...); + _M_profile_resize(__old_size); + return __res; + } + + template<typename... _Args> + iterator + emplace_hint(const_iterator __it, _Args&&... __args) + { + size_type __old_size = _Base::bucket_count(); + iterator __res + = _Base::emplace_hint(__it, std::forward<_Args>(__args)...); + _M_profile_resize(__old_size); + return __res; + } + void insert(std::initializer_list<value_type> __l) { - size_type __old_size = _Base::bucket_count(); + size_type __old_size = _Base::bucket_count(); _Base::insert(__l); - _M_profile_resize(__old_size, _Base::bucket_count()); + _M_profile_resize(__old_size); } iterator insert(const value_type& __obj) { - size_type __old_size = _Base::bucket_count(); + size_type __old_size = _Base::bucket_count(); iterator __res = _Base::insert(__obj); - _M_profile_resize(__old_size, _Base::bucket_count()); + _M_profile_resize(__old_size); return __res; } @@ -466,7 +504,7 @@ namespace __profile { size_type __old_size = _Base::bucket_count(); iterator __res = _Base::insert(__iter, __v); - _M_profile_resize(__old_size, _Base::bucket_count()); + _M_profile_resize(__old_size); return __res; } @@ -476,9 +514,9 @@ namespace __profile iterator insert(_Pair&& __obj) { - size_type __old_size = _Base::bucket_count(); + size_type __old_size = _Base::bucket_count(); iterator __res = _Base::insert(std::forward<_Pair>(__obj)); - _M_profile_resize(__old_size, _Base::bucket_count()); + _M_profile_resize(__old_size); return __res; } @@ -490,7 +528,7 @@ namespace __profile { size_type __old_size = _Base::bucket_count(); iterator __res = _Base::insert(__iter, std::forward<_Pair>(__v)); - _M_profile_resize(__old_size, _Base::bucket_count()); + _M_profile_resize(__old_size); return __res; } @@ -500,7 +538,7 @@ namespace __profile { size_type __old_size = _Base::bucket_count(); _Base::insert(__first, __last); - _M_profile_resize(__old_size, _Base::bucket_count()); + _M_profile_resize(__old_size); } void @@ -508,7 +546,7 @@ namespace __profile { size_type __old_size = _Base::bucket_count(); _Base::insert(__first, __last); - _M_profile_resize(__old_size, _Base::bucket_count()); + _M_profile_resize(__old_size); } void @@ -517,15 +555,16 @@ namespace __profile void rehash(size_type __n) { - size_type __old_size = _Base::bucket_count(); + size_type __old_size = _Base::bucket_count(); _Base::rehash(__n); - _M_profile_resize(__old_size, _Base::bucket_count()); + _M_profile_resize(__old_size); } private: void - _M_profile_resize(size_type __old_size, size_type __new_size) + _M_profile_resize(size_type __old_size) { + size_type __new_size = _Base::bucket_count(); if (__old_size != __new_size) __profcxx_hashtable_resize(this, __old_size, __new_size); } @@ -533,15 +572,15 @@ namespace __profile void _M_profile_destruct() { - size_type __hops = 0, __lc = 0, __chain = 0; - for (iterator __it = _M_base().begin(); __it != _M_base().end(); - ++__it) + size_type __hops = 0, __lc = 0, __chain = 0; + iterator __it = this->begin(); + while (__it != this->end()) { - while (__it._M_cur_node->_M_next) - { - ++__chain; - ++__it; - } + size_type __bkt = this->bucket(__it->first); + for (++__it; __it != this->end() + && this->bucket(__it->first) == __bkt; + ++__it) + ++__chain; if (__chain) { ++__chain; @@ -550,10 +589,9 @@ namespace __profile __chain = 0; } } - __profcxx_hashtable_destruct2(this, __lc, _Base::size(), __hops); + __profcxx_hashtable_destruct2(this, __lc, _Base::size(), __hops); } - - }; + }; template<typename _Key, typename _Tp, typename _Hash, typename _Pred, typename _Alloc> diff --git a/libstdc++-v3/include/profile/unordered_set b/libstdc++-v3/include/profile/unordered_set index 4af778bbf7c..55177b33559 100644 --- a/libstdc++-v3/include/profile/unordered_set +++ b/libstdc++-v3/include/profile/unordered_set @@ -170,12 +170,34 @@ namespace __profile _Base::clear(); } + template<typename... _Args> + std::pair<iterator, bool> + emplace(_Args&&... __args) + { + size_type __old_size = _Base::bucket_count(); + std::pair<iterator, bool> __res + = _Base::emplace(std::forward<_Args>(__args)...); + _M_profile_resize(__old_size); + return __res; + } + + template<typename... _Args> + iterator + emplace_hint(const_iterator __it, _Args&&... __args) + { + size_type __old_size = _Base::bucket_count(); + iterator __res + = _Base::emplace_hint(__it, std::forward<_Args>(__args)...); + _M_profile_resize(__old_size); + return __res; + } + void insert(std::initializer_list<value_type> __l) { - size_type __old_size = _Base::bucket_count(); + size_type __old_size = _Base::bucket_count(); _Base::insert(__l); - _M_profile_resize(__old_size, _Base::bucket_count()); + _M_profile_resize(__old_size); } std::pair<iterator, bool> @@ -183,7 +205,7 @@ namespace __profile { size_type __old_size = _Base::bucket_count(); std::pair<iterator, bool> __res = _Base::insert(__obj); - _M_profile_resize(__old_size, _Base::bucket_count()); + _M_profile_resize(__old_size); return __res; } @@ -192,7 +214,7 @@ namespace __profile { size_type __old_size = _Base::bucket_count(); iterator __res = _Base::insert(__iter, __v); - _M_profile_resize(__old_size, _Base::bucket_count()); + _M_profile_resize(__old_size); return __res; } @@ -201,7 +223,7 @@ namespace __profile { size_type __old_size = _Base::bucket_count(); std::pair<iterator, bool> __res = _Base::insert(std::move(__obj)); - _M_profile_resize(__old_size, _Base::bucket_count()); + _M_profile_resize(__old_size); return __res; } @@ -210,7 +232,7 @@ namespace __profile { size_type __old_size = _Base::bucket_count(); iterator __res = _Base::insert(__iter, std::move(__v)); - _M_profile_resize(__old_size, _Base::bucket_count()); + _M_profile_resize(__old_size); return __res; } @@ -220,7 +242,7 @@ namespace __profile { size_type __old_size = _Base::bucket_count(); _Base::insert(__first, __last); - _M_profile_resize(__old_size, _Base::bucket_count()); + _M_profile_resize(__old_size); } void @@ -228,55 +250,48 @@ namespace __profile { size_type __old_size = _Base::bucket_count(); _Base::insert(__first, __last); - _M_profile_resize(__old_size, _Base::bucket_count()); + _M_profile_resize(__old_size); } void rehash(size_type __n) { - size_type __old_size = _Base::bucket_count(); + size_type __old_size = _Base::bucket_count(); _Base::rehash(__n); - _M_profile_resize(__old_size, _Base::bucket_count()); + _M_profile_resize(__old_size); } private: - _Base& - _M_base() noexcept { return *this; } - - const _Base& - _M_base() const noexcept { return *this; } - void - _M_profile_resize(size_type __old_size, size_type __new_size) + _M_profile_resize(size_type __old_size) { - if (__old_size != __new_size) + size_type __new_size = _Base::bucket_count(); + if (__old_size != __new_size) __profcxx_hashtable_resize(this, __old_size, __new_size); } void _M_profile_destruct() { - size_type __hops = 0, __lc = 0, __chain = 0; - for (iterator __it = _M_base().begin(); __it != _M_base().end(); - ++__it) - { - while (__it._M_cur_node->_M_next) - { + size_type __hops = 0, __lc = 0, __chain = 0; + iterator __it = this->begin(); + while (__it != this->end()) + { + size_type __bkt = this->bucket(*__it); + for (++__it; __it != this->end() && this->bucket(*__it) == __bkt; + ++__it) ++__chain; - ++__it; - } - if (__chain) - { - ++__chain; - __lc = __lc > __chain ? __lc : __chain; - __hops += __chain * (__chain - 1) / 2; - __chain = 0; - } - } - __profcxx_hashtable_destruct2(this, __lc, _Base::size(), __hops); + if (__chain) + { + ++__chain; + __lc = __lc > __chain ? __lc : __chain; + __hops += __chain * (__chain - 1) / 2; + __chain = 0; + } + } + __profcxx_hashtable_destruct2(this, __lc, _Base::size(), __hops); } - - }; + }; template<typename _Value, typename _Hash, typename _Pred, typename _Alloc> inline void @@ -418,20 +433,41 @@ namespace __profile _Base::clear(); } + template<typename... _Args> + iterator + emplace(_Args&&... __args) + { + size_type __old_size = _Base::bucket_count(); + iterator __res = _Base::emplace(std::forward<_Args>(__args)...); + _M_profile_resize(__old_size); + return __res; + } + + template<typename... _Args> + iterator + emplace_hint(const_iterator __it, _Args&&... __args) + { + size_type __old_size = _Base::bucket_count(); + iterator __res + = _Base::emplace_hint(__it, std::forward<_Args>(__args)...); + _M_profile_resize(__old_size); + return __res; + } + void insert(std::initializer_list<value_type> __l) { - size_type __old_size = _Base::bucket_count(); + size_type __old_size = _Base::bucket_count(); _Base::insert(__l); - _M_profile_resize(__old_size, _Base::bucket_count()); + _M_profile_resize(__old_size); } iterator insert(const value_type& __obj) { - size_type __old_size = _Base::bucket_count(); + size_type __old_size = _Base::bucket_count(); iterator __res = _Base::insert(__obj); - _M_profile_resize(__old_size, _Base::bucket_count()); + _M_profile_resize(__old_size); return __res; } @@ -440,16 +476,16 @@ namespace __profile { size_type __old_size = _Base::bucket_count(); iterator __res = _Base::insert(__iter, __v); - _M_profile_resize(__old_size, _Base::bucket_count()); + _M_profile_resize(__old_size); return __res; } iterator insert(value_type&& __obj) { - size_type __old_size = _Base::bucket_count(); + size_type __old_size = _Base::bucket_count(); iterator __res = _Base::insert(std::move(__obj)); - _M_profile_resize(__old_size, _Base::bucket_count()); + _M_profile_resize(__old_size); return __res; } @@ -458,7 +494,7 @@ namespace __profile { size_type __old_size = _Base::bucket_count(); iterator __res = _Base::insert(__iter, std::move(__v)); - _M_profile_resize(__old_size, _Base::bucket_count()); + _M_profile_resize(__old_size); return __res; } @@ -468,7 +504,7 @@ namespace __profile { size_type __old_size = _Base::bucket_count(); _Base::insert(__first, __last); - _M_profile_resize(__old_size, _Base::bucket_count()); + _M_profile_resize(__old_size); } void @@ -476,26 +512,21 @@ namespace __profile { size_type __old_size = _Base::bucket_count(); _Base::insert(__first, __last); - _M_profile_resize(__old_size, _Base::bucket_count()); + _M_profile_resize(__old_size); } void rehash(size_type __n) { - size_type __old_size = _Base::bucket_count(); + size_type __old_size = _Base::bucket_count(); _Base::rehash(__n); - _M_profile_resize(__old_size, _Base::bucket_count()); + _M_profile_resize(__old_size); } private: - _Base& - _M_base() noexcept { return *this; } - - const _Base& - _M_base() const noexcept { return *this; } - void - _M_profile_resize(size_type __old_size, size_type __new_size) + _M_profile_resize(size_type __old_size) { + size_type __new_size = _Base::bucket_count(); if (__old_size != __new_size) __profcxx_hashtable_resize(this, __old_size, __new_size); } @@ -503,27 +534,25 @@ namespace __profile void _M_profile_destruct() { - size_type __hops = 0, __lc = 0, __chain = 0; - for (iterator __it = _M_base().begin(); __it != _M_base().end(); - ++__it) - { - while (__it._M_cur_node->_M_next) - { - ++__chain; - ++__it; - } - - if (__chain) - { + size_type __hops = 0, __lc = 0, __chain = 0; + iterator __it = this->begin(); + while (__it != this->end()) + { + size_type __bkt = this->bucket(*__it); + for (++__it; __it != this->end() && this->bucket(*__it) == __bkt; + ++__it) ++__chain; - __lc = __lc > __chain ? __lc : __chain; - __hops += __chain * (__chain - 1) / 2; - __chain = 0; - } - } - __profcxx_hashtable_destruct2(this, __lc, _Base::size(), __hops); - } + if (__chain) + { + ++__chain; + __lc = __lc > __chain ? __lc : __chain; + __hops += __chain * (__chain - 1) / 2; + __chain = 0; + } + } + __profcxx_hashtable_destruct2(this, __lc, _Base::size(), __hops); + } }; template<typename _Value, typename _Hash, typename _Pred, typename _Alloc> diff --git a/libstdc++-v3/include/std/atomic b/libstdc++-v3/include/std/atomic index 70f613f5c50..31673e96a7c 100644 --- a/libstdc++-v3/include/std/atomic +++ b/libstdc++-v3/include/std/atomic @@ -408,7 +408,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION memory_order __m = memory_order_seq_cst) noexcept { return compare_exchange_weak(__p1, __p2, __m, - __calculate_memory_order(__m)); + __cmpexch_failure_order(__m)); } bool @@ -416,7 +416,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION memory_order __m = memory_order_seq_cst) volatile noexcept { return compare_exchange_weak(__p1, __p2, __m, - __calculate_memory_order(__m)); + __cmpexch_failure_order(__m)); } bool @@ -435,7 +435,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION memory_order __m = memory_order_seq_cst) noexcept { return _M_b.compare_exchange_strong(__p1, __p2, __m, - __calculate_memory_order(__m)); + __cmpexch_failure_order(__m)); } bool @@ -443,7 +443,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION memory_order __m = memory_order_seq_cst) volatile noexcept { return _M_b.compare_exchange_strong(__p1, __p2, __m, - __calculate_memory_order(__m)); + __cmpexch_failure_order(__m)); } __pointer_type diff --git a/libstdc++-v3/include/std/bitset b/libstdc++-v3/include/std/bitset index e07c5e08970..792a05ace15 100644 --- a/libstdc++-v3/include/std/bitset +++ b/libstdc++-v3/include/std/bitset @@ -683,7 +683,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER #endif /** - * @brief The %bitset class represents a @e fixed-size sequence of bits. + * The %bitset class represents a @e fixed-size sequence of bits. * * @ingroup containers * @@ -855,7 +855,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER #endif /** - * @brief Use a subset of a string. + * Use a subset of a string. * @param __s A string of @a 0 and @a 1 characters. * @param __position Index of the first character in @a __s to use; * defaults to zero. @@ -878,7 +878,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER } /** - * @brief Use a subset of a string. + * Use a subset of a string. * @param __s A string of @a 0 and @a 1 characters. * @param __position Index of the first character in @a __s to use. * @param __n The number of characters to copy. @@ -914,7 +914,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER #ifdef __GXX_EXPERIMENTAL_CXX0X__ /** - * @brief Construct from a character %array. + * Construct from a character %array. * @param __str An %array of characters @a zero and @a one. * @param __n The number of characters to use. * @param __zero The character corresponding to the value 0. @@ -944,7 +944,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER // 23.3.5.2 bitset operations: //@{ /** - * @brief Operations on bitsets. + * Operations on bitsets. * @param __rhs A same-sized bitset. * * These should be self-explanatory. @@ -973,7 +973,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER //@{ /** - * @brief Operations on bitsets. + * Operations on bitsets. * @param __position The number of places to shift. * * These should be self-explanatory. diff --git a/libstdc++-v3/include/std/complex b/libstdc++-v3/include/std/complex index 1ab016e659a..c0e333117de 100644 --- a/libstdc++-v3/include/std/complex +++ b/libstdc++-v3/include/std/complex @@ -1035,8 +1035,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : std::pow(complex<_Tp>(__x), __y); } - // 26.2.3 complex specializations - // complex<float> specialization + /// 26.2.3 complex specializations + /// complex<float> specialization template<> struct complex<float> { @@ -1182,8 +1182,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _ComplexT _M_value; }; - // 26.2.3 complex specializations - // complex<double> specialization + /// 26.2.3 complex specializations + /// complex<double> specialization template<> struct complex<double> { @@ -1330,8 +1330,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _ComplexT _M_value; }; - // 26.2.3 complex specializations - // complex<long double> specialization + /// 26.2.3 complex specializations + /// complex<long double> specialization template<> struct complex<long double> { diff --git a/libstdc++-v3/include/std/fstream b/libstdc++-v3/include/std/fstream index 245404e84cf..65de272811f 100644 --- a/libstdc++-v3/include/std/fstream +++ b/libstdc++-v3/include/std/fstream @@ -620,7 +620,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @param __mode Open file in specified mode (see std::ios_base). * * @c ios_base::out|ios_base::trunc is automatically included in - * @a __mode. + * @p __mode. * * Tip: When using std::string to hold the filename, you must use * .c_str() before passing it to this constructor. diff --git a/libstdc++-v3/include/std/istream b/libstdc++-v3/include/std/istream index 19bc42bab11..57b21130fcc 100644 --- a/libstdc++-v3/include/std/istream +++ b/libstdc++-v3/include/std/istream @@ -44,9 +44,8 @@ namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION - // [27.6.1.1] Template class basic_istream /** - * @brief Controlling input. + * @brief Template class basic_istream. * @ingroup io * * This is the base class for all input streams. It provides text @@ -58,19 +57,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { public: // Types (inherited from basic_ios (27.4.4)): - typedef _CharT char_type; + typedef _CharT char_type; typedef typename _Traits::int_type int_type; typedef typename _Traits::pos_type pos_type; typedef typename _Traits::off_type off_type; - typedef _Traits traits_type; - + typedef _Traits traits_type; + // Non-standard Types: typedef basic_streambuf<_CharT, _Traits> __streambuf_type; typedef basic_ios<_CharT, _Traits> __ios_type; typedef basic_istream<_CharT, _Traits> __istream_type; - typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > + typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > __num_get_type; - typedef ctype<_CharT> __ctype_type; + typedef ctype<_CharT> __ctype_type; protected: // Data Members: @@ -81,7 +80,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION streamsize _M_gcount; public: - // [27.6.1.1.1] constructor/destructor /** * @brief Base constructor. * @@ -99,23 +97,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * * This does very little apart from providing a virtual base dtor. */ - virtual - ~basic_istream() + virtual + ~basic_istream() { _M_gcount = streamsize(0); } - // [27.6.1.1.2] prefix/suffix + /// Safe prefix/suffix operations. class sentry; friend class sentry; - // [27.6.1.2] formatted input - // [27.6.1.2.3] basic_istream::operator>> //@{ /** * @brief Interface for manipulators. * * Manipulators such as @c std::ws and @c std::dec use these - * functions in constructs like - * <code>std::cin >> std::ws</code>. + * functions in constructs like + * <code>std::cin >> std::ws</code>. * For more information, see the iomanip header. */ __istream_type& @@ -124,7 +120,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __istream_type& operator>>(__ios_type& (*__pf)(__ios_type&)) - { + { __pf(*this); return *this; } @@ -136,10 +132,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return *this; } //@} - - // [27.6.1.2.2] arithmetic extractors + + //@{ /** - * @name Arithmetic Extractors + * @name Extractors * * All the @c operator>> functions (aka <em>formatted input * functions</em>) have some common behavior. Each starts by @@ -156,64 +152,84 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * ios_base::failure to be thrown. The original exception will then * be rethrown. */ + //@{ /** - * @brief Basic arithmetic extractors - * @param __n, __f, __p: A variable of builtin type. + * @brief Integer arithmetic extractors + * @param __n A variable of builtin integral type. * @return @c *this if successful * * These functions use the stream's current locale (specifically, the * @c num_get facet) to parse the input data. */ - __istream_type& + __istream_type& operator>>(bool& __n) { return _M_extract(__n); } - - __istream_type& + + __istream_type& operator>>(short& __n); - - __istream_type& + + __istream_type& operator>>(unsigned short& __n) { return _M_extract(__n); } - __istream_type& + __istream_type& operator>>(int& __n); - - __istream_type& + + __istream_type& operator>>(unsigned int& __n) { return _M_extract(__n); } - __istream_type& + __istream_type& operator>>(long& __n) { return _M_extract(__n); } - - __istream_type& + + __istream_type& operator>>(unsigned long& __n) { return _M_extract(__n); } #ifdef _GLIBCXX_USE_LONG_LONG - __istream_type& + __istream_type& operator>>(long long& __n) { return _M_extract(__n); } - __istream_type& + __istream_type& operator>>(unsigned long long& __n) { return _M_extract(__n); } #endif + //@} - __istream_type& + //@{ + /** + * @brief Floating point arithmetic extractors + * @param __f A variable of builtin floating point type. + * @return @c *this if successful + * + * These functions use the stream's current locale (specifically, the + * @c num_get facet) to parse the input data. + */ + __istream_type& operator>>(float& __f) { return _M_extract(__f); } - __istream_type& + __istream_type& operator>>(double& __f) { return _M_extract(__f); } - __istream_type& + __istream_type& operator>>(long double& __f) { return _M_extract(__f); } + //@} - __istream_type& + /** + * @brief Basic arithmetic extractors + * @param __p A variable of pointer type. + * @return @c *this if successful + * + * These functions use the stream's current locale (specifically, the + * @c num_get facet) to parse the input data. + */ + __istream_type& operator>>(void*& __p) { return _M_extract(__p); } @@ -225,10 +241,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * in that it also constructs a sentry object and has the same error * handling behavior. * - * If @a __sb is NULL, the stream will set failbit in its error state. + * If @p __sb is NULL, the stream will set failbit in its error state. * * Characters are extracted from this stream and inserted into the - * @a sb streambuf until one of the following occurs: + * @p __sb streambuf until one of the following occurs: * * - the input stream reaches end-of-file, * - insertion into the output buffer fails (in this case, the @@ -237,20 +253,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * * If the function inserts no characters, failbit is set. */ - __istream_type& + __istream_type& operator>>(__streambuf_type* __sb); //@} - + // [27.6.1.3] unformatted input /** * @brief Character counting * @return The number of characters extracted by the previous * unformatted input function dispatched for this stream. */ - streamsize - gcount() const + streamsize + gcount() const { return _M_gcount; } - + + //@{ /** * @name Unformatted Input Functions * @@ -271,7 +288,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * ios_base::failure to be thrown. The original exception will then * be rethrown. */ - //@{ + /** * @brief Simple extraction. * @return A character, or eof(). @@ -279,7 +296,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * Tries to extract a character. If none are available, sets failbit * and returns traits::eof(). */ - int_type + int_type get(); /** @@ -293,7 +310,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @note This function is not overloaded on signed char and * unsigned char. */ - __istream_type& + __istream_type& get(char_type& __c); /** @@ -320,7 +337,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @note This function is not overloaded on signed char and * unsigned char. */ - __istream_type& + __istream_type& get(char_type* __s, streamsize __n, char_type __delim); /** @@ -331,7 +348,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * * Returns @c get(__s,__n,widen('\\n')). */ - __istream_type& + __istream_type& get(char_type* __s, streamsize __n) { return this->get(__s, __n, this->widen('\n')); } @@ -393,7 +410,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * In any case, a null character is stored in the next location in * the array. */ - __istream_type& + __istream_type& getline(char_type* __s, streamsize __n, char_type __delim); /** @@ -404,7 +421,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * * Returns @c getline(__s,__n,widen('\\n')). */ - __istream_type& + __istream_type& getline(char_type* __s, streamsize __n) { return this->getline(__s, __n, this->widen('\n')); } @@ -428,13 +445,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * better performing implementation, while still conforming to * the Standard. */ - __istream_type& + __istream_type& ignore(streamsize __n, int_type __delim); - __istream_type& + __istream_type& ignore(streamsize __n); - __istream_type& + __istream_type& ignore(); /** @@ -445,9 +462,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * returns @c traits::eof(). Otherwise reads but does not extract * the next input character. */ - int_type + int_type peek(); - + /** * @brief Extraction without delimiters. * @param __s A character array. @@ -463,7 +480,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @note This function is not overloaded on signed char and * unsigned char. */ - __istream_type& + __istream_type& read(char_type* __s, streamsize __n); /** @@ -482,9 +499,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * The goal is to empty the current buffer, and to not request any * more from the external input sequence controlled by the streambuf. */ - streamsize + streamsize readsome(char_type* __s, streamsize __n); - + /** * @brief Unextracting a single character. * @param __c The character to push back into the input stream. @@ -499,7 +516,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * are extracted, the next call to @c gcount() will return 0, * as required by DR 60. */ - __istream_type& + __istream_type& putback(char_type __c); /** @@ -515,7 +532,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * are extracted, the next call to @c gcount() will return 0, * as required by DR 60. */ - __istream_type& + __istream_type& unget(); /** @@ -533,7 +550,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * extracted, if any, and therefore does not affect the next * call to @c gcount(). */ - int + int sync(); /** @@ -579,7 +596,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * number of characters extracted, if any, and therefore does * not affect the next call to @c gcount(). */ - __istream_type& + __istream_type& seekg(off_type, ios_base::seekdir); //@} @@ -589,29 +606,29 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { this->init(0); } template<typename _ValueT> - __istream_type& - _M_extract(_ValueT& __v); + __istream_type& + _M_extract(_ValueT& __v); }; - // Explicit specialization declarations, defined in src/istream.cc. - template<> - basic_istream<char>& + /// Explicit specialization declarations, defined in src/istream.cc. + template<> + basic_istream<char>& basic_istream<char>:: getline(char_type* __s, streamsize __n, char_type __delim); - + template<> basic_istream<char>& basic_istream<char>:: ignore(streamsize __n); - + template<> basic_istream<char>& basic_istream<char>:: ignore(streamsize __n, int_type __delim); #ifdef _GLIBCXX_USE_WCHAR_T - template<> - basic_istream<wchar_t>& + template<> + basic_istream<wchar_t>& basic_istream<wchar_t>:: getline(char_type* __s, streamsize __n, char_type __delim); @@ -619,7 +636,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION basic_istream<wchar_t>& basic_istream<wchar_t>:: ignore(streamsize __n); - + template<> basic_istream<wchar_t>& basic_istream<wchar_t>:: @@ -687,7 +704,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return _M_ok; } }; - // [27.6.1.2.3] character extraction templates //@{ /** * @brief Character extractors @@ -762,9 +778,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return (__in >> reinterpret_cast<char*>(__s)); } //@} - // 27.6.1.5 Template class basic_iostream /** - * @brief Merging istream and ostream capabilities. + * @brief Template class basic_iostream * @ingroup io * * This class multiply inherits from the input and output stream classes @@ -772,18 +787,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ template<typename _CharT, typename _Traits> class basic_iostream - : public basic_istream<_CharT, _Traits>, + : public basic_istream<_CharT, _Traits>, public basic_ostream<_CharT, _Traits> { public: // _GLIBCXX_RESOLVE_LIB_DEFECTS // 271. basic_iostream missing typedefs // Types (inherited): - typedef _CharT char_type; + typedef _CharT char_type; typedef typename _Traits::int_type int_type; typedef typename _Traits::pos_type pos_type; typedef typename _Traits::off_type off_type; - typedef _Traits traits_type; + typedef _Traits traits_type; // Non-standard Types: typedef basic_istream<_CharT, _Traits> __istream_type; @@ -802,7 +817,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Destructor does nothing. */ - virtual + virtual ~basic_iostream() { } protected: @@ -810,7 +825,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : __istream_type(), __ostream_type() { } }; - // [27.6.1.4] standard basic_istream manipulators /** * @brief Quick and easy way to eat whitespace * @@ -832,7 +846,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * std::basic_istream::sentry inside your definition of operator>>. */ template<typename _CharT, typename _Traits> - basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>& ws(basic_istream<_CharT, _Traits>& __is); #ifdef __GXX_EXPERIMENTAL_CXX0X__ diff --git a/libstdc++-v3/include/std/ostream b/libstdc++-v3/include/std/ostream index f1f948f7041..498a060c2f5 100644 --- a/libstdc++-v3/include/std/ostream +++ b/libstdc++-v3/include/std/ostream @@ -44,9 +44,8 @@ namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION - // [27.6.2.1] Template class basic_ostream /** - * @brief Controlling output. + * @brief Template class basic_ostream. * @ingroup io * * This is the base class for all output streams. It provides text @@ -57,22 +56,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION class basic_ostream : virtual public basic_ios<_CharT, _Traits> { public: - // Types (inherited from basic_ios (27.4.4)): - typedef _CharT char_type; + // Types (inherited from basic_ios): + typedef _CharT char_type; typedef typename _Traits::int_type int_type; typedef typename _Traits::pos_type pos_type; typedef typename _Traits::off_type off_type; - typedef _Traits traits_type; - + typedef _Traits traits_type; + // Non-standard Types: typedef basic_streambuf<_CharT, _Traits> __streambuf_type; typedef basic_ios<_CharT, _Traits> __ios_type; typedef basic_ostream<_CharT, _Traits> __ostream_type; - typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > + typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > __num_put_type; - typedef ctype<_CharT> __ctype_type; + typedef ctype<_CharT> __ctype_type; - // [27.6.2.2] constructor/destructor /** * @brief Base constructor. * @@ -80,7 +78,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * derived classes' initialization lists, which pass a pointer to * their own stream buffer. */ - explicit + explicit basic_ostream(__streambuf_type* __sb) { this->init(__sb); } @@ -89,15 +87,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * * This does very little apart from providing a virtual base dtor. */ - virtual + virtual ~basic_ostream() { } - // [27.6.2.3] prefix/suffix + /// Safe prefix/suffix operations. class sentry; friend class sentry; - - // [27.6.2.5] formatted output - // [27.6.2.5.3] basic_ostream::operator<< + //@{ /** * @brief Interface for manipulators. @@ -136,9 +132,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } //@} - // [27.6.2.5.2] arithmetic inserters + //@{ /** - * @name Arithmetic Inserters + * @name Inserters * * All the @c operator<< functions (aka <em>formatted output * functions</em>) have some common behavior. Each starts by @@ -154,31 +150,32 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * ios_base::failure to be thrown. The original exception will then * be rethrown. */ + //@{ /** - * @brief Basic arithmetic inserters - * @param __n, __f, __p A variable of builtin type. + * @brief Integer arithmetic inserters + * @param __n A variable of builtin integral type. * @return @c *this if successful * * These functions use the stream's current locale (specifically, the * @c num_get facet) to perform numeric formatting. */ - __ostream_type& + __ostream_type& operator<<(long __n) { return _M_insert(__n); } - - __ostream_type& + + __ostream_type& operator<<(unsigned long __n) - { return _M_insert(__n); } + { return _M_insert(__n); } - __ostream_type& + __ostream_type& operator<<(bool __n) { return _M_insert(__n); } - __ostream_type& + __ostream_type& operator<<(short __n); - __ostream_type& + __ostream_type& operator<<(unsigned short __n) { // _GLIBCXX_RESOLVE_LIB_DEFECTS @@ -186,10 +183,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return _M_insert(static_cast<unsigned long>(__n)); } - __ostream_type& + __ostream_type& operator<<(int __n); - __ostream_type& + __ostream_type& operator<<(unsigned int __n) { // _GLIBCXX_RESOLVE_LIB_DEFECTS @@ -198,20 +195,30 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } #ifdef _GLIBCXX_USE_LONG_LONG - __ostream_type& + __ostream_type& operator<<(long long __n) { return _M_insert(__n); } - __ostream_type& + __ostream_type& operator<<(unsigned long long __n) - { return _M_insert(__n); } + { return _M_insert(__n); } #endif + //@} - __ostream_type& + //@{ + /** + * @brief Floating point arithmetic inserters + * @param __f A variable of builtin floating point type. + * @return @c *this if successful + * + * These functions use the stream's current locale (specifically, the + * @c num_get facet) to perform numeric formatting. + */ + __ostream_type& operator<<(double __f) { return _M_insert(__f); } - __ostream_type& + __ostream_type& operator<<(float __f) { // _GLIBCXX_RESOLVE_LIB_DEFECTS @@ -219,11 +226,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return _M_insert(static_cast<double>(__f)); } - __ostream_type& + __ostream_type& operator<<(long double __f) { return _M_insert(__f); } + //@} - __ostream_type& + /** + * @brief Pointer arithmetic inserters + * @param __p A variable of pointer type. + * @return @c *this if successful + * + * These functions use the stream's current locale (specifically, the + * @c num_get facet) to perform numeric formatting. + */ + __ostream_type& operator<<(const void* __p) { return _M_insert(__p); } @@ -235,24 +251,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * in that it also constructs a sentry object and has the same error * handling behavior. * - * If @a __sb is NULL, the stream will set failbit in its error state. + * If @p __sb is NULL, the stream will set failbit in its error state. * - * Characters are extracted from @a __sb and inserted into @c *this + * Characters are extracted from @p __sb and inserted into @c *this * until one of the following occurs: * * - the input stream reaches end-of-file, * - insertion into the output sequence fails (in this case, the * character that would have been inserted is not extracted), or - * - an exception occurs while getting a character from @a __sb, which + * - an exception occurs while getting a character from @p __sb, which * sets failbit in the error state * * If the function inserts no characters, failbit is set. */ - __ostream_type& + __ostream_type& operator<<(__streambuf_type* __sb); //@} - // [27.6.2.6] unformatted output functions + //@{ /** * @name Unformatted Output Functions * @@ -270,21 +286,25 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * the stream's exceptions mask, the exception will be rethrown * without completing its actions. */ - //@{ + /** * @brief Simple insertion. * @param __c The character to insert. * @return *this * - * Tries to insert @a c. + * Tries to insert @p __c. * * @note This function is not overloaded on signed char and * unsigned char. */ - __ostream_type& + __ostream_type& put(char_type __c); - // Core write functionality, without sentry. + /** + * @brief Core write functionality, without sentry. + * @param __s The array to insert. + * @param __n Maximum number of characters to insert. + */ void _M_write(const char_type* __s, streamsize __n) { @@ -299,17 +319,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @param __n Maximum number of characters to insert. * @return *this * - * Characters are copied from @a __s and inserted into the stream until + * Characters are copied from @p __s and inserted into the stream until * one of the following happens: * - * - @a __n characters are inserted + * - @p __n characters are inserted * - inserting into the output sequence fails (in this case, badbit * will be set in the stream's error state) * * @note This function is not overloaded on signed char and * unsigned char. */ - __ostream_type& + __ostream_type& write(const char_type* __s, streamsize __n); //@} @@ -322,10 +342,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * Otherwise, calls @c rdbuf()->pubsync(), and if that returns -1, * sets badbit. */ - __ostream_type& + __ostream_type& flush(); - // [27.6.2.4] seek members /** * @brief Getting the current write position. * @return A file position object. @@ -333,7 +352,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * If @c fail() is not false, returns @c pos_type(-1) to indicate * failure. Otherwise returns @c rdbuf()->pubseekoff(0,cur,out). */ - pos_type + pos_type tellp(); /** @@ -344,7 +363,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * If @c fail() is not true, calls @c rdbuf()->pubseekpos(pos). If * that function fails, sets failbit. */ - __ostream_type& + __ostream_type& seekp(pos_type); /** @@ -356,16 +375,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * If @c fail() is not true, calls @c rdbuf()->pubseekoff(off,dir). * If that function fails, sets failbit. */ - __ostream_type& + __ostream_type& seekp(off_type, ios_base::seekdir); - + protected: basic_ostream() { this->init(0); } template<typename _ValueT> - __ostream_type& - _M_insert(_ValueT __v); + __ostream_type& + _M_insert(_ValueT __v); }; /** @@ -381,7 +400,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Data Members. bool _M_ok; basic_ostream<_CharT, _Traits>& _M_os; - + public: /** * @brief The constructor performs preparatory work. @@ -429,7 +448,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return _M_ok; } }; - // [27.6.2.5.4] character insertion templates //@{ /** * @brief Character inserters @@ -443,7 +461,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * padding (as determined by [22.2.2.2.2]). @c __out.width(0) is then * called. * - * If @a __c is of type @c char and the character type of the stream is not + * If @p __c is of type @c char and the character type of the stream is not * @c char, the character is widened before insertion. */ template<typename _CharT, typename _Traits> @@ -457,7 +475,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return (__out << __out.widen(__c)); } // Specialization - template <class _Traits> + template <class _Traits> inline basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>& __out, char __c) { return __ostream_insert(__out, &__c, 1); } @@ -467,25 +485,25 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION inline basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>& __out, signed char __c) { return (__out << static_cast<char>(__c)); } - + template<class _Traits> inline basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) { return (__out << static_cast<char>(__c)); } //@} - + //@{ /** * @brief String inserters * @param __out An output stream. * @param __s A character string. * @return out - * @pre @a s must be a non-NULL pointer + * @pre @p __s must be a non-NULL pointer * * Behaves like one of the formatted arithmetic inserters described in * std::basic_ostream. After constructing a sentry object with good * status, this function inserts @c traits::length(__s) characters starting - * at @a __s, widened if necessary, followed by any required padding (as + * at @p __s, widened if necessary, followed by any required padding (as * determined by [22.2.2.2.2]). @c __out.width(0) is then called. */ template<typename _CharT, typename _Traits> @@ -529,7 +547,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return (__out << reinterpret_cast<const char*>(__s)); } //@} - // [27.6.2.7] standard basic_ostream manipulators + // Standard basic_ostream manipulators + /** * @brief Write a newline and flush the stream. * @@ -539,33 +558,33 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * for more on this subject. */ template<typename _CharT, typename _Traits> - inline basic_ostream<_CharT, _Traits>& + inline basic_ostream<_CharT, _Traits>& endl(basic_ostream<_CharT, _Traits>& __os) { return flush(__os.put(__os.widen('\n'))); } /** * @brief Write a null character into the output sequence. * - * <em>Null character</em> is @c CharT() by definition. For CharT of @c char, - * this correctly writes the ASCII @c NUL character string terminator. + * <em>Null character</em> is @c CharT() by definition. For CharT + * of @c char, this correctly writes the ASCII @c NUL character + * string terminator. */ template<typename _CharT, typename _Traits> - inline basic_ostream<_CharT, _Traits>& + inline basic_ostream<_CharT, _Traits>& ends(basic_ostream<_CharT, _Traits>& __os) { return __os.put(_CharT()); } - + /** * @brief Flushes the output stream. * * This manipulator simply calls the stream's @c flush() member function. */ template<typename _CharT, typename _Traits> - inline basic_ostream<_CharT, _Traits>& + inline basic_ostream<_CharT, _Traits>& flush(basic_ostream<_CharT, _Traits>& __os) { return __os.flush(); } #ifdef __GXX_EXPERIMENTAL_CXX0X__ - // [27.7.2.9] Rvalue stream insertion /** * @brief Generic inserter for rvalue stream * @param __os An input stream. @@ -583,7 +602,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif // __GXX_EXPERIMENTAL_CXX0X__ _GLIBCXX_END_NAMESPACE_VERSION -} // namespace +} // namespace std #include <bits/ostream.tcc> diff --git a/libstdc++-v3/include/tr2/dynamic_bitset b/libstdc++-v3/include/tr2/dynamic_bitset index b5c3bf3fcc8..4c06b84c2a5 100644 --- a/libstdc++-v3/include/tr2/dynamic_bitset +++ b/libstdc++-v3/include/tr2/dynamic_bitset @@ -738,10 +738,10 @@ public: /** * @brief Use a subset of a string. - * @param str A string of '0' and '1' characters. - * @param pos Index of the first character in @a s to use. - * @param n The number of characters to copy. - * @throw std::out_of_range If @a pos is bigger the size of @a s. + * @param __str A string of '0' and '1' characters. + * @param __pos Index of the first character in @p __str to use. + * @param __n The number of characters to copy. + * @throw std::out_of_range If @p __pos is bigger the size of @p __str. * @throw std::invalid_argument If a character appears in the string * which is neither '0' nor '1'. */ @@ -770,7 +770,7 @@ public: /** * @brief Construct from a string. - * @param str A string of '0' and '1' characters. + * @param __str A string of '0' and '1' characters. * @throw std::invalid_argument If a character appears in the string * which is neither '0' nor '1'. */ @@ -907,7 +907,7 @@ public: //@{ /** * @brief Operations on dynamic_bitsets. - * @param rhs A same-sized dynamic_bitset. + * @param __rhs A same-sized dynamic_bitset. * * These should be self-explanatory. */ @@ -950,7 +950,7 @@ public: //@{ /** * @brief Operations on dynamic_bitsets. - * @param position The number of places to shift. + * @param __pos The number of places to shift. * * These should be self-explanatory. */ @@ -995,9 +995,9 @@ public: /** * @brief Sets a given bit to a particular value. - * @param position The index of the bit. - * @param val Either true or false, defaults to true. - * @throw std::out_of_range If @a pos is bigger the size of the %set. + * @param __pos The index of the bit. + * @param __val Either true or false, defaults to true. + * @throw std::out_of_range If @a __pos is bigger the size of the %set. */ dynamic_bitset<_WordT, _Alloc>& set(size_type __pos, bool __val = true) @@ -1019,10 +1019,10 @@ public: /** * @brief Sets a given bit to false. - * @param position The index of the bit. - * @throw std::out_of_range If @a pos is bigger the size of the %set. + * @param __pos The index of the bit. + * @throw std::out_of_range If @a __pos is bigger the size of the %set. * - * Same as writing @c set(pos,false). + * Same as writing @c set(__pos, false). */ dynamic_bitset<_WordT, _Alloc>& reset(size_type __pos) @@ -1045,8 +1045,8 @@ public: /** * @brief Toggles a given bit to its opposite value. - * @param position The index of the bit. - * @throw std::out_of_range If @a pos is bigger the size of the %set. + * @param __pos The index of the bit. + * @throw std::out_of_range If @a __pos is bigger the size of the %set. */ dynamic_bitset<_WordT, _Alloc>& flip(size_type __pos) @@ -1064,7 +1064,7 @@ public: //@{ /** * @brief Array-indexing support. - * @param position Index into the %dynamic_bitset. + * @param __pos Index into the %dynamic_bitset. * @return A bool for a 'const %dynamic_bitset'. For non-const * bitsets, an instance of the reference proxy class. * @note These operators do no range checking and throw no @@ -1167,9 +1167,9 @@ public: /** * @brief Tests the value of a bit. - * @param position The index of a bit. - * @return The value at @a pos. - * @throw std::out_of_range If @a pos is bigger the size of the %set. + * @param __pos The index of a bit. + * @return The value at @a __pos. + * @throw std::out_of_range If @a __pos is bigger the size of the %set. */ bool test(size_type __pos) const @@ -1226,7 +1226,7 @@ public: /** * @brief Finds the index of the next "on" bit after prev. * @return The index of the next bit set, or size() if not found. - * @param prev Where to start searching. + * @param __prev Where to start searching. * @sa find_first */ size_type @@ -1321,8 +1321,8 @@ public: //@{ /** * @brief Global bitwise operations on bitsets. - * @param x A bitset. - * @param y A bitset of the same size as @a x. + * @param __x A bitset. + * @param __y A bitset of the same size as @a __x. * @return A new bitset. * * These should be self-explanatory. diff --git a/libstdc++-v3/scripts/run_doxygen b/libstdc++-v3/scripts/run_doxygen index af2d0fc3809..45b3f4a066a 100644 --- a/libstdc++-v3/scripts/run_doxygen +++ b/libstdc++-v3/scripts/run_doxygen @@ -325,14 +325,6 @@ for f in *__profile_*; do newname=`echo $f | sed 's/__profile_/__profile::/'` mv $f $newname done -for f in *__atomic0_*; do - newname=`echo $f | sed 's/__atomic0_/__atomic0::/'` - mv $f $newname -done -for f in *__atomic2_*; do - newname=`echo $f | sed 's/__atomic2_/__atomic2::/'` - mv $f $newname -done # Then, clean up other top-level namespaces. for f in std_tr1_*; do @@ -373,11 +365,6 @@ for f in __cxxabiv1_*; do done # Then piecemeal nested classes -for f in *__future_base_*; do - newname=`echo $f | sed 's/__future_base_/__future_base::/'` - mv $f $newname -done - # Generic removal bits, where there are things in the generated man diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc index 6349ea2ca4e..42f28db9ab3 100644 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc @@ -18,7 +18,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1551 } +// { dg-error "no matching" "" { target *-*-* } 1552 } #include <list> diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc index 12f28fffd0f..d4a446408f4 100644 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc @@ -18,7 +18,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1507 } +// { dg-error "no matching" "" { target *-*-* } 1508 } #include <list> diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc index 05993340af9..fb32ee497f5 100644 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc @@ -18,7 +18,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1507 } +// { dg-error "no matching" "" { target *-*-* } 1508 } #include <list> #include <utility> diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc index 22acf3ad82d..d34be99e155 100644 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc @@ -18,7 +18,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1507 } +// { dg-error "no matching" "" { target *-*-* } 1508 } #include <list> diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/emplace.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/emplace.cc new file mode 100644 index 00000000000..0a0dff8c2b7 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/emplace.cc @@ -0,0 +1,116 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +// range insert + +#include <utility> +#include <tuple> +#include <vector> +#include <unordered_map> +#include <testsuite_hooks.h> + +class PathPoint +{ +public: + PathPoint(char t, const std::vector<double>& c) + : type(t), coords(c) { } + PathPoint(char t, std::vector<double>&& c) + : type(t), coords(std::move(c)) { } + char getType() const { return type; } + const std::vector<double>& getCoords() const { return coords; } +private: + char type; + std::vector<double> coords; +}; + +bool test __attribute__((unused)) = true; + +void test01() +{ + typedef std::unordered_map<char, std::vector<double>> Map; + Map m; + + std::vector<double> coord1 = { 0.0, 1.0, 2.0 }; + + auto ret = m.emplace('a', coord1); + VERIFY( ret.second ); + VERIFY( m.size() == 1 ); + VERIFY( ret.first->first == 'a' ); + + coord1[0] = 3.0; + ret = m.emplace('a', coord1); + VERIFY( !ret.second ); + VERIFY( m.size() == 1 ); + VERIFY( ret.first->first == 'a' ); + VERIFY( ret.first->second[0] == 0.0 ); + + auto it = m.emplace_hint(m.begin(), 'b', coord1); + VERIFY( it != m.end() ); + VERIFY( it->first == 'b' ); + VERIFY( it->second[0] == 3.0 ); + + double *px = &coord1[0]; + ret = m.emplace('c', std::move(coord1)); + VERIFY( ret.second ); + VERIFY( ret.first->first == 'c' ); + VERIFY( &(ret.first->second[0]) == px ); +} + +void test02() +{ + using namespace std; + typedef unordered_map<char, PathPoint> Map; + Map m; + + std::vector<double> coord1 = { 0.0, 1.0, 2.0 }; + + auto ret = m.emplace(piecewise_construct, + make_tuple('a'), make_tuple('a', coord1)); + VERIFY( ret.second ); + VERIFY( m.size() == 1 ); + VERIFY( ret.first->first == 'a' ); + + coord1[0] = 3.0; + ret = m.emplace(piecewise_construct, + make_tuple('a'), make_tuple( 'b', coord1)); + VERIFY( !ret.second ); + VERIFY( m.size() == 1 ); + VERIFY( ret.first->first == 'a' ); + VERIFY( ret.first->second.getCoords()[0] == 0.0 ); + + auto it = m.emplace_hint(m.begin(), piecewise_construct, + make_tuple('b'), make_tuple('c', coord1)); + VERIFY( it != m.end() ); + VERIFY( it->first == 'b' ); + VERIFY( it->second.getCoords()[0] == 3.0 ); + + double *px = &coord1[0]; + ret = m.emplace(piecewise_construct, + make_tuple('c'), make_tuple('d', move(coord1))); + VERIFY( ret.second ); + VERIFY( ret.first->first == 'c' ); + VERIFY( &(ret.first->second.getCoords()[0]) == px ); +} + +int main() +{ + test01(); + test02(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/modifiers/emplace.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/modifiers/emplace.cc new file mode 100644 index 00000000000..40aef98ad41 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/modifiers/emplace.cc @@ -0,0 +1,110 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +// range insert + +#include <tuple> +#include <vector> +#include <unordered_map> +#include <testsuite_hooks.h> + +class PathPoint +{ +public: + PathPoint(char t, const std::vector<double>& c) + : type(t), coords(c) { } + PathPoint(char t, std::vector<double>&& c) + : type(t), coords(std::move(c)) { } + char getType() const { return type; } + const std::vector<double>& getCoords() const { return coords; } +private: + char type; + std::vector<double> coords; +}; + +bool test __attribute__((unused)) = true; + +void test01() +{ + typedef std::unordered_multimap<char, std::vector<double>> MMap; + MMap mm; + + std::vector<double> coord1 = { 0.0, 1.0, 2.0 }; + + auto it = mm.emplace('a', coord1); + VERIFY( mm.size() == 1 ); + VERIFY( it->first == 'a' ); + + coord1[0] = 3.0; + it = mm.emplace('a', coord1); + VERIFY( mm.size() == 2 ); + VERIFY( it->first == 'a' ); + VERIFY( it->second[0] == 3.0 ); + + it = mm.emplace_hint(mm.begin(), 'b', coord1); + VERIFY( it != mm.end() ); + VERIFY( it->first == 'b' ); + VERIFY( it->second[0] == 3.0 ); + + double *px = &coord1[0]; + it = mm.emplace('c', std::move(coord1)); + VERIFY( it->first == 'c' ); + VERIFY( &(it->second[0]) == px ); +} + +void test02() +{ + using namespace std; + typedef unordered_multimap<char, PathPoint> Map; + Map m; + + std::vector<double> coord1 = { 0.0, 1.0, 2.0 }; + + auto it = m.emplace(piecewise_construct, + make_tuple('a'), make_tuple('a', coord1)); + VERIFY( m.size() == 1 ); + VERIFY( it->first == 'a' ); + + coord1[0] = 3.0; + it = m.emplace(piecewise_construct, + make_tuple('a'), make_tuple( 'b', coord1)); + VERIFY( m.size() == 2 ); + VERIFY( it->first == 'a' ); + VERIFY( it->second.getCoords()[0] == 3.0 ); + + it = m.emplace_hint(m.begin(), piecewise_construct, + make_tuple('b'), make_tuple('c', coord1)); + VERIFY( it != m.end() ); + VERIFY( it->first == 'b' ); + VERIFY( it->second.getCoords()[0] == 3.0 ); + + double *px = &coord1[0]; + it = m.emplace(piecewise_construct, + make_tuple('c'), make_tuple('d', move(coord1))); + VERIFY( it->first == 'c' ); + VERIFY( &(it->second.getCoords()[0]) == px ); +} + + +int main() +{ + test01(); + test02(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/modifiers/emplace.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/modifiers/emplace.cc new file mode 100644 index 00000000000..057e326fbf8 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/modifiers/emplace.cc @@ -0,0 +1,88 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +// range insert + +#include <vector> +#include <unordered_set> +#include <testsuite_hooks.h> + +class PathPoint +{ +public: + PathPoint(char t, const std::vector<double>& c) + : type(t), coords(c) { } + PathPoint(char t, std::vector<double>&& c) + : type(t), coords(std::move(c)) { } + char getType() const { return type; } + const std::vector<double>& getCoords() const { return coords; } +private: + char type; + std::vector<double> coords; +}; + +struct PathPointHasher +{ + std::size_t operator() (const PathPoint& __pp) const + { return __pp.getType(); } +}; + +struct PathPointEqual +{ + bool operator() (const PathPoint& __lhs, const PathPoint& __rhs) const + { return __lhs.getType() == __rhs.getType(); } +}; + +bool test __attribute__((unused)) = true; + +void test01() +{ + typedef std::unordered_multiset<PathPoint, PathPointHasher, + PathPointEqual> Mset; + Mset ms; + + std::vector<double> coord1 = { 0.0, 1.0, 2.0 }; + + auto it = ms.emplace('a', coord1); + VERIFY( ms.size() == 1 ); + VERIFY( it->getType() == 'a' ); + + coord1[0] = 3.0; + it = ms.emplace('a', coord1); + VERIFY( ms.size() == 2 ); + VERIFY( it->getType() == 'a' ); + VERIFY( it->getCoords()[0] == 3.0 ); + + it = ms.emplace_hint(ms.begin(), 'b', coord1); + VERIFY( it != ms.end() ); + VERIFY( it->getType() == 'b' ); + VERIFY( it->getCoords()[0] == 3.0 ); + + double *px = &coord1[0]; + it = ms.emplace('c', std::move(coord1)); + VERIFY( ms.size() == 4 ); + VERIFY( it->getType() == 'c' ); + VERIFY( &(it->getCoords()[0]) == px ); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/modifiers/emplace.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/modifiers/emplace.cc new file mode 100644 index 00000000000..2ae4e763d60 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/modifiers/emplace.cc @@ -0,0 +1,89 @@ +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +// range insert + +#include <vector> +#include <unordered_set> +#include <testsuite_hooks.h> + +class PathPoint +{ +public: + PathPoint(char t, const std::vector<double>& c) + : type(t), coords(c) { } + PathPoint(char t, std::vector<double>&& c) + : type(t), coords(std::move(c)) { } + char getType() const { return type; } + const std::vector<double>& getCoords() const { return coords; } +private: + char type; + std::vector<double> coords; +}; + +struct PathPointHasher +{ + std::size_t operator() (const PathPoint& __pp) const + { return __pp.getType(); } +}; + +struct PathPointEqual +{ + bool operator() (const PathPoint& __lhs, const PathPoint& __rhs) const + { return __lhs.getType() == __rhs.getType(); } +}; + +bool test __attribute__((unused)) = true; + +void test01() +{ + typedef std::unordered_set<PathPoint, PathPointHasher, PathPointEqual> Set; + Set s; + + std::vector<double> coord1 = { 0.0, 1.0, 2.0 }; + + auto ret = s.emplace('a', coord1); + VERIFY( ret.second ); + VERIFY( s.size() == 1 ); + VERIFY( ret.first->getType() == 'a' ); + + coord1[0] = 3.0; + ret = s.emplace('a', coord1); + VERIFY( !ret.second ); + VERIFY( s.size() == 1 ); + VERIFY( ret.first->getType() == 'a' ); + VERIFY( ret.first->getCoords()[0] == 0.0 ); + + auto it = s.emplace_hint(s.begin(), 'b', coord1); + VERIFY( it != s.end() ); + VERIFY( it->getType() == 'b' ); + VERIFY( it->getCoords()[0] == 3.0 ); + + double *px = &coord1[0]; + ret = s.emplace('c', std::move(coord1)); + VERIFY( ret.second ); + VERIFY( ret.first->getType() == 'c' ); + VERIFY( &(ret.first->getCoords()[0]) == px ); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/util/exception/safety.h b/libstdc++-v3/testsuite/util/exception/safety.h index b85f7fe4e5f..50418983ca6 100644 --- a/libstdc++-v3/testsuite/util/exception/safety.h +++ b/libstdc++-v3/testsuite/util/exception/safety.h @@ -826,6 +826,110 @@ namespace __gnu_test operator()(_Tp&, _Tp&) { } }; + template<typename _Tp, + bool = traits<_Tp>::has_emplace::value> + struct emplace; + + // Specialization for most containers. + template<typename _Tp> + struct emplace<_Tp, true> + { + typedef _Tp container_type; + typedef typename container_type::value_type value_type; + typedef typename container_type::size_type size_type; + + void + operator()(_Tp& __test) + { + try + { + const value_type cv = generate_unique<value_type>(); + __test.emplace(cv); + } + catch(const __gnu_cxx::forced_error&) + { throw; } + } + + // Assumes containers start out equivalent. + void + operator()(_Tp& __control, _Tp& __test) + { + try + { + const value_type cv = generate_unique<value_type>(); + __test.emplace(cv); + } + catch(const __gnu_cxx::forced_error&) + { throw; } + } + }; + + // Specialization, empty. + template<typename _Tp> + struct emplace<_Tp, false> + { + void + operator()(_Tp&) { } + + void + operator()(_Tp&, _Tp&) { } + }; + + template<typename _Tp, + bool = traits<_Tp>::has_emplace::value> + struct emplace_hint; + + // Specialization for most containers. + template<typename _Tp> + struct emplace_hint<_Tp, true> + { + typedef _Tp container_type; + typedef typename container_type::value_type value_type; + + void + operator()(_Tp& __test) + { + try + { + const value_type cv = generate_unique<value_type>(); + const size_type sz = std::distance(__test.begin(), __test.end()); + size_type s = generate(sz); + auto i = __test.begin(); + std::advance(i, s); + __test.emplace_hint(i, cv); + } + catch(const __gnu_cxx::forced_error&) + { throw; } + } + + // Assumes containers start out equivalent. + void + operator()(_Tp& __control, _Tp& __test) + { + try + { + const value_type cv = generate_unique<value_type>(); + const size_type sz = std::distance(__test.begin(), __test.end()); + size_type s = generate(sz); + auto i = __test.begin(); + std::advance(i, s); + __test.emplace_hint(i, cv); + } + catch(const __gnu_cxx::forced_error&) + { throw; } + } + }; + + // Specialization, empty. + template<typename _Tp> + struct emplace_hint<_Tp, false> + { + void + operator()(_Tp&) { } + + void + operator()(_Tp&, _Tp&) { } + }; template<typename _Tp, bool = traits<_Tp>::is_associative::value || traits<_Tp>::is_unordered::value> @@ -1023,6 +1127,8 @@ namespace __gnu_test typedef erase_point<container_type> erase_point; typedef erase_range<container_type> erase_range; typedef insert_point<container_type> insert_point; + typedef emplace<container_type> emplace; + typedef emplace_hint<container_type> emplace_hint; typedef pop_front<container_type> pop_front; typedef pop_back<container_type> pop_back; typedef push_front<container_type> push_front; @@ -1039,6 +1145,8 @@ namespace __gnu_test erase_point _M_erasep; erase_range _M_eraser; insert_point _M_insertp; + emplace _M_emplace; + emplace_hint _M_emplaceh; pop_front _M_popf; pop_back _M_popb; push_front _M_pushf; @@ -1098,6 +1206,8 @@ namespace __gnu_test _M_functions.push_back(function_type(base_type::_M_erasep)); _M_functions.push_back(function_type(base_type::_M_eraser)); _M_functions.push_back(function_type(base_type::_M_insertp)); + _M_functions.push_back(function_type(base_type::_M_emplace)); + _M_functions.push_back(function_type(base_type::_M_emplaceh)); _M_functions.push_back(function_type(base_type::_M_popf)); _M_functions.push_back(function_type(base_type::_M_popb)); _M_functions.push_back(function_type(base_type::_M_pushf)); diff --git a/libstdc++-v3/testsuite/util/testsuite_container_traits.h b/libstdc++-v3/testsuite/util/testsuite_container_traits.h index 4d8ff997ae8..cce91b739bf 100644 --- a/libstdc++-v3/testsuite/util/testsuite_container_traits.h +++ b/libstdc++-v3/testsuite/util/testsuite_container_traits.h @@ -43,6 +43,7 @@ namespace __gnu_test typedef std::false_type has_throwing_erase; typedef std::false_type has_insert; typedef std::false_type has_insert_after; + typedef std::false_type has_emplace; typedef std::false_type has_push_pop; typedef std::false_type has_size_type_constructor; }; @@ -216,6 +217,7 @@ namespace __gnu_test typedef std::true_type has_erase; typedef std::true_type has_insert; + typedef std::true_type has_emplace; }; template<typename _Tp1, typename _Tp2, typename _Tp3, @@ -230,6 +232,7 @@ namespace __gnu_test typedef std::true_type has_erase; typedef std::true_type has_insert; + typedef std::true_type has_emplace; }; template<typename _Tp1, typename _Tp2, typename _Tp3, typename _Tp4> @@ -242,6 +245,7 @@ namespace __gnu_test typedef std::true_type has_erase; typedef std::true_type has_insert; + typedef std::true_type has_emplace; }; template<typename _Tp1, typename _Tp2, typename _Tp3, typename _Tp4> @@ -254,6 +258,7 @@ namespace __gnu_test typedef std::true_type has_erase; typedef std::true_type has_insert; + typedef std::true_type has_emplace; }; } // namespace __gnu_test |