diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-22 09:02:39 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-22 09:02:39 +0000 |
commit | 2b099144ddcff64e3ed12b91d51e79906e59d188 (patch) | |
tree | a1d5a7af2124ea7d6a3fd432ae37469d40d78af1 | |
parent | 4e6469142eff1233657edb68f7fad4c23ec71bd3 (diff) | |
download | gcc-2b099144ddcff64e3ed12b91d51e79906e59d188.tar.gz |
2012-02-22 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 184458 using svnmerge
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@184460 138bc75d-0d04-0410-961f-82ee72b054a4
76 files changed, 1516 insertions, 782 deletions
diff --git a/ChangeLog.MELT b/ChangeLog.MELT index 49fb5f8b4c6..396745aaab6 100644 --- a/ChangeLog.MELT +++ b/ChangeLog.MELT @@ -1,4 +1,8 @@ +2012-02-22 Basile Starynkevitch <basile@starynkevitch.net> + + MELT branch merged with trunk rev 184458 using svnmerge + 2012-02-20 Basile Starynkevitch <basile@starynkevitch.net> MELT branch merged with trunk rev 184385 using svnmerge diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 07635dfbe79..88c01d4eb83 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,165 @@ +2012-02-21 Bernd Schmidt <bernds@codesourcery.com> + + * ira.c (check_allocation): Use REG_WORDS_BIG_ENDIAN, not + WORDS_BIG_ENDIAN. + * ira-color.c (setup_profitable_hard_regs, check_hard_reg_p, + assign_hard_reg): Likewise. + +2012-02-21 Georg-Johann Lay <avr@gjlay.de> + + * config/avr/avr.md (neghi2): Remove "!d,0" alternative. Tweak "r,0". + +2012-02-21 Georg-Johann Lay <avr@gjlay.de> + + * config/avr/avr.md + (*dec-and-branchhi!=-1.d.clobber): New text peephole. + (*dec-and-branchhi!=-1.l.clobber): New text peephole. + +2012-02-21 Georg-Johann Lay <avr@gjlay.de> + + * config/avr/avr-protos.h (avr_accumulate_outgoing_args): Move + prototype from here to... + * config/avr/avr.h: ...here. + +2012-02-21 Richard Earnshaw <rearnsha@arm.com> + + PR target/52294 + * thumb2.md (thumb2_shiftsi3_short): Split register and + immediate shifts. For register shifts tie operands 0 and 1. + (peephole2 for above): Check that register-controlled shifts + have suitably tied operands. + +2012-02-21 Quentin Neill <quentin.neill@amd.com> + + PR target/52137 + * config/i386/bdver1.md (bdver1_call, bdver1_push, + bdver1_pop, bdver1_leave, bdver1_lea, bdver1_imul_DI, bdver1_imul, + bdver1_imul_mem_DI, bdver1_imul_mem, bdver1_idiv, bdver1_idiv_mem, + bdver1_str, bdver1_idirect, bdver1_ivector, bdver1_idirect_loadmov, + bdver1_idirect_load, bdver1_ivector_load, bdver1_idirect_movstore, + bdver1_idirect_both, bdver1_ivector_both, bdver1_idirect_store, + bdver1_ivector_store, bdver1_fldxf, bdver1_fld, bdver1_fstxf, + bdver1_fst, bdver1_fist, bdver1_fmov_bdver1, bdver1_fadd_load, + bdver1_fadd, bdver1_fmul_load, bdver1_fmul, bdver1_fsgn, + bdver1_fdiv_load, bdver1_fdiv, bdver1_fpspc_load, bdver1_fpspc, + bdver1_fcmov_load, bdver1_fcmov, bdver1_fcomi_load, + bdver1_fcomi, bdver1_fcom_load, bdver1_fcom, + bdver1_fxch, bdver1_ssevector_avx128_unaligned_load, + bdver1_ssevector_avx256_unaligned_load, + bdver1_ssevector_sse128_unaligned_load, + bdver1_ssevector_avx128_load, bdver1_ssevector_avx256_load, + bdver1_ssevector_sse128_load, bdver1_ssescalar_movq_load, + bdver1_ssescalar_vmovss_load, bdver1_ssescalar_sse128_load, + bdver1_mmxsse_load, bdver1_sse_store_avx256, bdver1_sse_store, + bdver1_mmxsse_store_short, bdver1_ssevector_avx256, + bdver1_movss_movsd, bdver1_mmxssemov, bdver1_sselog_load_256, + bdver1_sselog_256, bdver1_sselog_load, bdver1_sselog, + bdver1_ssecmp_load, bdver1_ssecmp, bdver1_ssecomi_load, + bdver1_ssecomi, bdver1_vcvtX2Y_avx256_load, bdver1_vcvtX2Y_avx256, + bdver1_ssecvt_cvtss2sd_load, bdver1_ssecvt_cvtss2sd, + bdver1_sseicvt_cvtsi2sd_load, bdver1_sseicvt_cvtsi2sd, + bdver1_ssecvt_cvtpd2ps_load, bdver1_ssecvt_cvtpd2ps, + bdver1_ssecvt_cvtdq2ps_load, bdver1_ssecvt_cvtdq2ps, + bdver1_ssecvt_cvtdq2pd_load, bdver1_ssecvt_cvtdq2pd, + bdver1_ssecvt_cvtps2pd_load, bdver1_ssecvt_cvtps2pd, + bdver1_ssecvt_cvtsX2si_load, bdver1_ssecvt_cvtsX2si, + bdver1_ssecvt_cvtpd2pi_load, bdver1_ssecvt_cvtpd2pi, + bdver1_ssecvt_cvtpd2dq_load, bdver1_ssecvt_cvtpd2dq, + bdver1_ssecvt_cvtps2pi_load, bdver1_ssecvt_cvtps2pi, + bdver1_ssemuladd_load_256, bdver1_ssemuladd_256, + bdver1_ssemuladd_load, bdver1_ssemuladd, bdver1_sseimul_load, + bdver1_sseimul, bdver1_sseiadd_load, bdver1_sseiadd, + bdver1_ssediv_double_load_256, bdver1_ssediv_double_256, + bdver1_ssediv_single_load_256, bdver1_ssediv_single_256, + bdver1_ssediv_double_load, bdver1_ssediv_double, + bdver1_ssediv_single_load, bdver1_ssediv_single, bdver1_sseins): + Add "bdver2" attribute. + +2012-02-21 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> + + * config/s390/s390.c (s390_option_override): Make -mhard-dfp the + default if possible and not specified otherwise. + +2012-02-21 Richard Guenther <rguenther@suse.de> + + PR middle-end/52314 + * gimplify.c (create_tmp_from_val): Use the main variant type + for the type of the temporary we create. + +2012-02-21 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/52324 + * gimplify.c (gimplify_expr): When re-gimplifying expressions + do not gimplify a MEM_REF address operand if it is already + in suitable form. + +2012-02-21 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> + + * config/s390/s390.md ("fixuns_trunc<mode>si2"): Replace + TARGET_HARD_FLOAT with TARGET_HARD_DFP. + +2012-02-21 Richard Guenther <rguenther@suse.de> + + * tree-vect-stmts.c (vectorizable_load): Use pre-computed + nested_in_vect_loop. + +2012-02-21 Jakub Jelinek <jakub@redhat.com> + + PR tree-optimization/52318 + * gimple-fold.c (gimplify_and_update_call_from_tree): Add + vdef also to non-pure/const call stmts in the sequence. + +2012-02-20 David S. Miller <davem@davemloft.net> + + * config/sparc/sparc.md (load_pcrel_sym<P:mode>): Explain why we + don't use the "rd %pc" instruction on v9 for PIC register loads. + +2012-02-20 Aldy Hernandez <aldyh@redhat.com> + + PR middle-end/52141 + * trans-mem.c (ipa_tm_scan_irr_block): Error out on GIMPLE_ASM's + in a transaction safe function. + +2012-02-20 Kai Tietz <ktietz@redhat.com> + + PR target/52238 + * stor-layout.c (place_field): Handle desired_align for + ms-bitfields, too. + +2012-02-20 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/52298 + * tree-vect-stmts.c (vectorizable_store): Properly use + STMT_VINFO_DR_STEP instead of DR_STEP when vectorizing + outer loops. + (vectorizable_load): Likewise. + * tree-vect-data-refs.c (vect_analyze_data_ref_access): + Access DR_STEP after ensuring it is not NULL. + +2012-02-20 Jakub Jelinek <jakub@redhat.com> + + PR tree-optimization/52286 + * fold-const.c (fold_binary_loc): For (X & C1) | C2 + optimization use double_int_to_tree instead of build_int_cst_wide, + rewrite to use double_int vars. + +2012-02-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + PR target/50166 + * acinclude.m4 (gcc_AC_INITFINI_ARRAY): Require gcc_SUN_LD_VERSION. + Define _start. + Remove -e 0 from $gcc_cv_ld invocation. + Only use __GLIBC_PREREQ if defined. + Enable on Solaris since Solaris 8 patch. + (gcc_SUN_LD_VERSION): New macro. + * configure.ac (ld_ver) <*-*-solaris2*>: Refer to + gcc_SUN_LD_VERSION for version number format. + * configure: Regenerate. + * varasm.c (get_elf_initfini_array_priority_section): Set + SECTION_NOTYPE for non-default priority. + Use get_section instead of get_unnamed_section to emit + .init_array/.fini_array with default priority. + 2012-02-19 Richard Sandiford <rdsandiford@googlemail.com> * config/mips/mips.c (mips_need_mips16_rdhwr_p): New variable. diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 2bf1d04f5a3..76109fbd651 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120220 +20120222 diff --git a/gcc/acinclude.m4 b/gcc/acinclude.m4 index 933f81167c6..0c6170ca143 100644 --- a/gcc/acinclude.m4 +++ b/gcc/acinclude.m4 @@ -1,4 +1,5 @@ -dnl Copyright (C) 2005, 2006, 2007, 2008, 2011 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 +dnl Free Software Foundation, Inc. dnl dnl This file is part of GCC. dnl @@ -370,7 +371,8 @@ fi fi]) AC_DEFUN([gcc_AC_INITFINI_ARRAY], -[AC_ARG_ENABLE(initfini-array, +[AC_REQUIRE([gcc_SUN_LD_VERSION])dnl +AC_ARG_ENABLE(initfini-array, [ --enable-initfini-array use .init_array/.fini_array sections], [], [ AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support, @@ -427,9 +429,11 @@ int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; .balign 4 .byte 'H', 'H', 'H', 'H' .text +.globl _start +_start: EOF if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ - && $gcc_cv_ld -e 0 -o conftest conftest.o > /dev/null 2>&1 \ + && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1 \ && $gcc_cv_objdump -s -j .init_array conftest \ | grep HHHHFFFFDDDDBBBB > /dev/null 2>&1 \ && $gcc_cv_objdump -s -j .fini_array conftest \ @@ -442,14 +446,38 @@ changequote([,])dnl fi AC_PREPROC_IFELSE([AC_LANG_SOURCE([ #ifndef __ELF__ -#error Not an ELF OS +# error Not an ELF OS #endif #include <stdlib.h> -#if defined __GLIBC_PREREQ && __GLIBC_PREREQ (2, 4) +#if defined __GLIBC_PREREQ +# if __GLIBC_PREREQ (2, 4) +# else +# error GLIBC 2.4 required +# endif #else -#error The C library not known to support .init_array/.fini_array +# if defined __sun__ && defined __svr4__ + /* Solaris ld.so.1 supports .init_array/.fini_array since Solaris 8. */ +# else +# error The C library not known to support .init_array/.fini_array +# endif #endif -])],, [gcc_cv_initfini_array=no]);; +])],[ + case "${target}" in + *-*-solaris2.8*) + # .init_array/.fini_array support was introduced in Solaris 8 + # patches 109147-08 (sparc) and 109148-08 (x86). Since ld.so.1 and + # ld are guaranteed to be updated in lockstep, we can check ld -V + # instead. Unfortunately, proper ld version numbers were only + # introduced in rev. -14, so we check for that. + if test "$gcc_cv_sun_ld_vers_minor" -lt 272; then + gcc_cv_initfini_array=no + fi + ;; + *-*-solaris2.9* | *-*-solaris2.1[[0-9]]*) + # .init_array/.fini_array support is present since Solaris 9 FCS. + ;; + esac +], [gcc_cv_initfini_array=no]);; esac else AC_MSG_CHECKING(cross compile... guessing) @@ -569,6 +597,43 @@ if test $[$2] = yes; then $7 fi])]) +dnl gcc_SUN_LD_VERSION +dnl +dnl Determines Sun linker version numbers, setting gcc_cv_sun_ld_vers to +dnl the complete version number and gcc_cv_sun_ld_vers_{major, minor} to +dnl the corresponding fields. +dnl +dnl ld and ld.so.1 are guaranteed to be updated in lockstep, so ld version +dnl numbers can be used in ld.so.1 feature checks even if a different +dnl linker is configured. +dnl +AC_DEFUN([gcc_SUN_LD_VERSION], +[changequote(,)dnl +if test "x${build}" = "x${target}" && test "x${build}" = "x${host}"; then + case "${target}" in + *-*-solaris2*) + # + # Solaris 2 ld -V output looks like this for a regular version: + # + # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1699 + # + # but test versions add stuff at the end: + # + # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1701:onnv-ab196087-6931056-03/25/10 + # + gcc_cv_sun_ld_ver=`/usr/ccs/bin/ld -V 2>&1` + if echo "$gcc_cv_sun_ld_ver" | grep 'Solaris Link Editors' > /dev/null; then + gcc_cv_sun_ld_vers=`echo $gcc_cv_sun_ld_ver | sed -n \ + -e 's,^.*: 5\.[0-9][0-9]*-\([0-9]\.[0-9][0-9]*\).*$,\1,p'` + gcc_cv_sun_ld_vers_major=`expr "$gcc_cv_sun_ld_vers" : '\([0-9]*\)'` + gcc_cv_sun_ld_vers_minor=`expr "$gcc_cv_sun_ld_vers" : '[0-9]*\.\([0-9]*\)'` + fi + ;; + esac +fi +changequote([,])dnl +]) + dnl GCC_TARGET_TEMPLATE(KEY) dnl ------------------------ dnl Define KEY as a valid configure key on the target machine. diff --git a/gcc/aclocal.m4 b/gcc/aclocal.m4 index e466ae17839..5949ed9ad46 100644 --- a/gcc/aclocal.m4 +++ b/gcc/aclocal.m4 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.11.2 -*- Autoconf -*- +# generated automatically by aclocal 1.11.3 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, diff --git a/gcc/config/arm/thumb2.md b/gcc/config/arm/thumb2.md index ad05feb8958..39a2138a689 100644 --- a/gcc/config/arm/thumb2.md +++ b/gcc/config/arm/thumb2.md @@ -686,6 +686,7 @@ (match_operand:SI 2 "low_reg_or_int_operand" "")]))] "TARGET_THUMB2 && peep2_regno_dead_p(0, CC_REGNUM) + && (CONST_INT_P (operands[2]) || operands[1] == operands[0]) && ((GET_CODE(operands[3]) != ROTATE && GET_CODE(operands[3]) != ROTATERT) || REG_P(operands[2]))" [(parallel @@ -698,10 +699,10 @@ ) (define_insn "*thumb2_shiftsi3_short" - [(set (match_operand:SI 0 "low_register_operand" "=l") + [(set (match_operand:SI 0 "low_register_operand" "=l,l") (match_operator:SI 3 "shift_operator" - [(match_operand:SI 1 "low_register_operand" "l") - (match_operand:SI 2 "low_reg_or_int_operand" "lM")])) + [(match_operand:SI 1 "low_register_operand" "0,l") + (match_operand:SI 2 "low_reg_or_int_operand" "l,M")])) (clobber (reg:CC CC_REGNUM))] "TARGET_THUMB2 && reload_completed && ((GET_CODE(operands[3]) != ROTATE && GET_CODE(operands[3]) != ROTATERT) diff --git a/gcc/config/avr/avr-protos.h b/gcc/config/avr/avr-protos.h index fa8c421addc..229f38541c9 100644 --- a/gcc/config/avr/avr-protos.h +++ b/gcc/config/avr/avr-protos.h @@ -33,7 +33,6 @@ extern int avr_simple_epilogue (void); extern int avr_hard_regno_rename_ok (unsigned int, unsigned int); extern rtx avr_return_addr_rtx (int count, rtx tem); extern void avr_register_target_pragmas (void); -extern bool avr_accumulate_outgoing_args (void); extern void avr_init_expanders (void); #ifdef TREE_CODE diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h index 1b7bd3551cc..6bc73de974f 100644 --- a/gcc/config/avr/avr.h +++ b/gcc/config/avr/avr.h @@ -676,6 +676,10 @@ struct GTY(()) machine_function required in order for pushes to be generated. */ #define PUSH_ROUNDING(X) (X) +/* Define prototype here to avoid build warning. Some files using + ACCUMULATE_OUTGOING_ARGS (directly or indirectly) include + tm.h but not tm_p.h. */ +extern bool avr_accumulate_outgoing_args (void); #define ACCUMULATE_OUTGOING_ARGS avr_accumulate_outgoing_args() #define INIT_EXPANDERS avr_init_expanders() diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md index 88117b1cc37..a7fa04cb51f 100644 --- a/gcc/config/avr/avr.md +++ b/gcc/config/avr/avr.md @@ -3807,15 +3807,14 @@ (set_attr "cc" "set_n")]) (define_insn "neghi2" - [(set (match_operand:HI 0 "register_operand" "=!d,r,&r") - (neg:HI (match_operand:HI 1 "register_operand" "0,0,r")))] + [(set (match_operand:HI 0 "register_operand" "=r,&r") + (neg:HI (match_operand:HI 1 "register_operand" "0,r")))] "" "@ - com %B0\;neg %A0\;sbci %B0,lo8(-1) - com %B0\;neg %A0\;sbc %B0,__zero_reg__\;inc %B0 + neg %B0\;neg %A0\;sbc %B0,__zero_reg__ clr %A0\;clr %B0\;sub %A0,%A1\;sbc %B0,%B1" - [(set_attr "length" "3,4,4") - (set_attr "cc" "set_czn,set_n,set_czn")]) + [(set_attr "length" "3,4") + (set_attr "cc" "set_czn")]) (define_insn "negpsi2" [(set (match_operand:PSI 0 "register_operand" "=!d,r,&r") @@ -4919,7 +4918,7 @@ ;; ************************* Peepholes ******************************** -(define_peephole +(define_peephole ; "*dec-and-branchsi!=-1.d.clobber" [(parallel [(set (match_operand:SI 0 "d_register_operand" "") (plus:SI (match_dup 0) (const_int -1))) @@ -4960,7 +4959,7 @@ return ""; }) -(define_peephole +(define_peephole ; "*dec-and-branchhi!=-1" [(set (match_operand:HI 0 "d_register_operand" "") (plus:HI (match_dup 0) (const_int -1))) @@ -4996,7 +4995,81 @@ return ""; }) -(define_peephole +;; Same as above but with clobber flavour of addhi3 +(define_peephole ; "*dec-and-branchhi!=-1.d.clobber" + [(parallel [(set (match_operand:HI 0 "d_register_operand" "") + (plus:HI (match_dup 0) + (const_int -1))) + (clobber (scratch:QI))]) + (parallel [(set (cc0) + (compare (match_dup 0) + (const_int -1))) + (clobber (match_operand:QI 1 "d_register_operand" ""))]) + (set (pc) + (if_then_else (ne (cc0) + (const_int 0)) + (label_ref (match_operand 2 "" "")) + (pc)))] + "" + { + CC_STATUS_INIT; + if (test_hard_reg_class (ADDW_REGS, operands[0])) + output_asm_insn ("sbiw %0,1", operands); + else + output_asm_insn ("subi %A0,1" CR_TAB + "sbc %B0,__zero_reg__", operands); + + switch (avr_jump_mode (operands[2], insn)) + { + case 1: + return "brcc %2"; + case 2: + return "brcs .+2\;rjmp %2"; + case 3: + return "brcs .+4\;jmp %2"; + } + + gcc_unreachable(); + return ""; + }) + +;; Same as above but with clobber flavour of addhi3 +(define_peephole ; "*dec-and-branchhi!=-1.l.clobber" + [(parallel [(set (match_operand:HI 0 "l_register_operand" "") + (plus:HI (match_dup 0) + (const_int -1))) + (clobber (match_operand:QI 3 "d_register_operand" ""))]) + (parallel [(set (cc0) + (compare (match_dup 0) + (const_int -1))) + (clobber (match_operand:QI 1 "d_register_operand" ""))]) + (set (pc) + (if_then_else (ne (cc0) + (const_int 0)) + (label_ref (match_operand 2 "" "")) + (pc)))] + "" + { + CC_STATUS_INIT; + output_asm_insn ("ldi %3,1" CR_TAB + "sub %A0,%3" CR_TAB + "sbc %B0,__zero_reg__", operands); + + switch (avr_jump_mode (operands[2], insn)) + { + case 1: + return "brcc %2"; + case 2: + return "brcs .+2\;rjmp %2"; + case 3: + return "brcs .+4\;jmp %2"; + } + + gcc_unreachable(); + return ""; + }) + +(define_peephole ; "*dec-and-branchqi!=-1" [(set (match_operand:QI 0 "d_register_operand" "") (plus:QI (match_dup 0) (const_int -1))) diff --git a/gcc/config/i386/bdver1.md b/gcc/config/i386/bdver1.md index 3cde476b5fd..10f95ffa75e 100644 --- a/gcc/config/i386/bdver1.md +++ b/gcc/config/i386/bdver1.md @@ -123,50 +123,50 @@ ;; Jump instructions are executed in the branch unit completely transparent to us. (define_insn_reservation "bdver1_call" 0 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (eq_attr "type" "call,callv")) "bdver1-double,bdver1-agu,bdver1-ieu") ;; PUSH mem is double path. (define_insn_reservation "bdver1_push" 1 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (eq_attr "type" "push")) "bdver1-direct,bdver1-agu,bdver1-store") ;; POP r16/mem are double path. (define_insn_reservation "bdver1_pop" 1 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (eq_attr "type" "pop")) "bdver1-direct,(bdver1-ieu+bdver1-load)") ;; LEAVE no latency info so far, assume same with amdfam10. (define_insn_reservation "bdver1_leave" 3 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (eq_attr "type" "leave")) "bdver1-vector,(bdver1-ieu+bdver1-load)") ;; LEA executes in AGU unit with 1 cycle latency on BDVER1. (define_insn_reservation "bdver1_lea" 1 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (eq_attr "type" "lea")) "bdver1-direct,bdver1-agu,nothing") ;; MUL executes in special multiplier unit attached to IEU1. (define_insn_reservation "bdver1_imul_DI" 6 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "imul") (and (eq_attr "mode" "DI") (eq_attr "memory" "none,unknown")))) "bdver1-direct1,bdver1-ieu1,bdver1-mult,nothing,bdver1-ieu1") (define_insn_reservation "bdver1_imul" 4 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "imul") (eq_attr "memory" "none,unknown"))) "bdver1-direct1,bdver1-ieu1,bdver1-mult,bdver1-ieu1") (define_insn_reservation "bdver1_imul_mem_DI" 10 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "imul") (and (eq_attr "mode" "DI") (eq_attr "memory" "load,both")))) "bdver1-direct1,bdver1-load,bdver1-ieu,bdver1-mult,nothing,bdver1-ieu") (define_insn_reservation "bdver1_imul_mem" 8 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "imul") (eq_attr "memory" "load,both"))) "bdver1-direct1,bdver1-load,bdver1-ieu,bdver1-mult,bdver1-ieu") @@ -178,13 +178,13 @@ ;; ??? Experiments show that the IDIV can overlap with roughly 6 cycles ;; of the other code. (define_insn_reservation "bdver1_idiv" 6 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "idiv") (eq_attr "memory" "none,unknown"))) "bdver1-vector,(bdver1-ieu0*6+(bdver1-fpsched,bdver1-fvector))") (define_insn_reservation "bdver1_idiv_mem" 10 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "idiv") (eq_attr "memory" "load,both"))) "bdver1-vector,((bdver1-load,bdver1-ieu0*6)+(bdver1-fpsched,bdver1-fvector))") @@ -193,48 +193,48 @@ ;; as IDIV to create smaller automata. This probably does not matter much. ;; Using the same heuristics for bdver1 as amdfam10 and K8 with IDIV. (define_insn_reservation "bdver1_str" 6 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "str") (eq_attr "memory" "load,both,store"))) "bdver1-vector,bdver1-load,bdver1-ieu0*6") ;; Integer instructions. (define_insn_reservation "bdver1_idirect" 1 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "bdver1_decode" "direct") (and (eq_attr "unit" "integer,unknown") (eq_attr "memory" "none,unknown")))) "bdver1-direct,bdver1-ieu") (define_insn_reservation "bdver1_ivector" 2 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "bdver1_decode" "vector") (and (eq_attr "unit" "integer,unknown") (eq_attr "memory" "none,unknown")))) "bdver1-vector,bdver1-ieu,bdver1-ieu") (define_insn_reservation "bdver1_idirect_loadmov" 4 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "imov") (eq_attr "memory" "load"))) "bdver1-direct,bdver1-load") (define_insn_reservation "bdver1_idirect_load" 5 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "bdver1_decode" "direct") (and (eq_attr "unit" "integer,unknown") (eq_attr "memory" "load")))) "bdver1-direct,bdver1-load,bdver1-ieu") (define_insn_reservation "bdver1_ivector_load" 6 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "bdver1_decode" "vector") (and (eq_attr "unit" "integer,unknown") (eq_attr "memory" "load")))) "bdver1-vector,bdver1-load,bdver1-ieu,bdver1-ieu") (define_insn_reservation "bdver1_idirect_movstore" 4 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "imov") (eq_attr "memory" "store"))) "bdver1-direct,bdver1-agu,bdver1-store") (define_insn_reservation "bdver1_idirect_both" 4 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "bdver1_decode" "direct") (and (eq_attr "unit" "integer,unknown") (eq_attr "memory" "both")))) @@ -242,7 +242,7 @@ bdver1-ieu,bdver1-store, bdver1-store") (define_insn_reservation "bdver1_ivector_both" 5 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "bdver1_decode" "vector") (and (eq_attr "unit" "integer,unknown") (eq_attr "memory" "both")))) @@ -251,14 +251,14 @@ bdver1-ieu, bdver1-store") (define_insn_reservation "bdver1_idirect_store" 4 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "bdver1_decode" "direct") (and (eq_attr "unit" "integer,unknown") (eq_attr "memory" "store")))) "bdver1-direct,(bdver1-ieu+bdver1-agu), bdver1-store") (define_insn_reservation "bdver1_ivector_store" 5 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "bdver1_decode" "vector") (and (eq_attr "unit" "integer,unknown") (eq_attr "memory" "store")))) @@ -267,113 +267,113 @@ ;; BDVER1 floating point units. (define_insn_reservation "bdver1_fldxf" 13 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "fmov") (and (eq_attr "memory" "load") (eq_attr "mode" "XF")))) "bdver1-vector,bdver1-fpload2,bdver1-fvector*9") (define_insn_reservation "bdver1_fld" 5 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "fmov") (eq_attr "memory" "load"))) "bdver1-direct,bdver1-fpload,bdver1-ffma") (define_insn_reservation "bdver1_fstxf" 8 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "fmov") (and (eq_attr "memory" "store,both") (eq_attr "mode" "XF")))) "bdver1-vector,(bdver1-fpsched+bdver1-agu),(bdver1-store2+(bdver1-fvector*6))") (define_insn_reservation "bdver1_fst" 2 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "fmov") (eq_attr "memory" "store,both"))) "bdver1-double,(bdver1-fpsched+bdver1-agu),(bdver1-fsto+bdver1-store)") (define_insn_reservation "bdver1_fist" 2 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (eq_attr "type" "fistp,fisttp")) "bdver1-double,(bdver1-fpsched+bdver1-agu),(bdver1-fsto+bdver1-store)") (define_insn_reservation "bdver1_fmov_bdver1" 2 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (eq_attr "type" "fmov")) "bdver1-direct,bdver1-fpsched,bdver1-ffma") (define_insn_reservation "bdver1_fadd_load" 10 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "fop") (eq_attr "memory" "load"))) "bdver1-direct,bdver1-fpload,bdver1-ffma") (define_insn_reservation "bdver1_fadd" 6 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (eq_attr "type" "fop")) "bdver1-direct,bdver1-fpsched,bdver1-ffma") (define_insn_reservation "bdver1_fmul_load" 10 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "fmul") (eq_attr "memory" "load"))) "bdver1-double,bdver1-fpload,bdver1-ffma") (define_insn_reservation "bdver1_fmul" 6 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (eq_attr "type" "fmul")) "bdver1-direct,bdver1-fpsched,bdver1-ffma") (define_insn_reservation "bdver1_fsgn" 2 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (eq_attr "type" "fsgn")) "bdver1-direct,bdver1-fpsched,bdver1-ffma") (define_insn_reservation "bdver1_fdiv_load" 46 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "fdiv") (eq_attr "memory" "load"))) "bdver1-direct,bdver1-fpload,bdver1-ffma") (define_insn_reservation "bdver1_fdiv" 42 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (eq_attr "type" "fdiv")) "bdver1-direct,bdver1-fpsched,bdver1-ffma") (define_insn_reservation "bdver1_fpspc_load" 103 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "fpspc") (eq_attr "memory" "load"))) "bdver1-vector,bdver1-fpload,bdver1-fvector") (define_insn_reservation "bdver1_fpspc" 100 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "fpspc") (eq_attr "memory" "load"))) "bdver1-vector,bdver1-fpload,bdver1-fvector") (define_insn_reservation "bdver1_fcmov_load" 17 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "fcmov") (eq_attr "memory" "load"))) "bdver1-vector,bdver1-fpload,bdver1-fvector") (define_insn_reservation "bdver1_fcmov" 15 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (eq_attr "type" "fcmov")) "bdver1-vector,bdver1-fpsched,bdver1-fvector") (define_insn_reservation "bdver1_fcomi_load" 6 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "fcmp") (and (eq_attr "bdver1_decode" "double") (eq_attr "memory" "load")))) "bdver1-double,bdver1-fpload,(bdver1-ffma | bdver1-fsto)") (define_insn_reservation "bdver1_fcomi" 2 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "bdver1_decode" "double") (eq_attr "type" "fcmp"))) "bdver1-double,bdver1-fpsched,(bdver1-ffma | bdver1-fsto)") (define_insn_reservation "bdver1_fcom_load" 6 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "fcmp") (eq_attr "memory" "load"))) "bdver1-direct,bdver1-fpload,bdver1-ffma") (define_insn_reservation "bdver1_fcom" 2 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (eq_attr "type" "fcmp")) "bdver1-direct,bdver1-fpsched,bdver1-ffma") (define_insn_reservation "bdver1_fxch" 2 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (eq_attr "type" "fxch")) "bdver1-direct,bdver1-fpsched,bdver1-ffma") ;; SSE loads. (define_insn_reservation "bdver1_ssevector_avx128_unaligned_load" 4 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssemov") (and (eq_attr "prefix" "vex") (and (eq_attr "movu" "1") @@ -381,139 +381,139 @@ (eq_attr "memory" "load")))))) "bdver1-direct,bdver1-fpload") (define_insn_reservation "bdver1_ssevector_avx256_unaligned_load" 5 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssemov") (and (eq_attr "movu" "1") (and (eq_attr "mode" "V8SF,V4DF") (eq_attr "memory" "load"))))) "bdver1-double,bdver1-fpload") (define_insn_reservation "bdver1_ssevector_sse128_unaligned_load" 4 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssemov") (and (eq_attr "movu" "1") (and (eq_attr "mode" "V4SF,V2DF") (eq_attr "memory" "load"))))) "bdver1-direct,bdver1-fpload,bdver1-fmal") (define_insn_reservation "bdver1_ssevector_avx128_load" 4 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssemov") (and (eq_attr "prefix" "vex") (and (eq_attr "mode" "V4SF,V2DF,TI") (eq_attr "memory" "load"))))) "bdver1-direct,bdver1-fpload,bdver1-fmal") (define_insn_reservation "bdver1_ssevector_avx256_load" 5 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssemov") (and (eq_attr "mode" "V8SF,V4DF,OI") (eq_attr "memory" "load")))) "bdver1-double,bdver1-fpload,bdver1-fmal") (define_insn_reservation "bdver1_ssevector_sse128_load" 4 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssemov") (and (eq_attr "mode" "V4SF,V2DF,TI") (eq_attr "memory" "load")))) "bdver1-direct,bdver1-fpload") (define_insn_reservation "bdver1_ssescalar_movq_load" 4 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssemov") (and (eq_attr "mode" "DI") (eq_attr "memory" "load")))) "bdver1-direct,bdver1-fpload,bdver1-fmal") (define_insn_reservation "bdver1_ssescalar_vmovss_load" 4 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssemov") (and (eq_attr "prefix" "vex") (and (eq_attr "mode" "SF") (eq_attr "memory" "load"))))) "bdver1-direct,bdver1-fpload") (define_insn_reservation "bdver1_ssescalar_sse128_load" 4 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssemov") (and (eq_attr "mode" "SF,DF") (eq_attr "memory" "load")))) "bdver1-direct,bdver1-fpload, bdver1-ffma") (define_insn_reservation "bdver1_mmxsse_load" 4 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "mmxmov,ssemov") (eq_attr "memory" "load"))) "bdver1-direct,bdver1-fpload, bdver1-fmal") ;; SSE stores. (define_insn_reservation "bdver1_sse_store_avx256" 5 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssemov") (and (eq_attr "mode" "V8SF,V4DF,OI") (eq_attr "memory" "store,both")))) "bdver1-double,(bdver1-fpsched+bdver1-agu),((bdver1-fsto+bdver1-store)*2)") (define_insn_reservation "bdver1_sse_store" 4 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssemov") (and (eq_attr "mode" "V4SF,V2DF,TI") (eq_attr "memory" "store,both")))) "bdver1-direct,(bdver1-fpsched+bdver1-agu),((bdver1-fsto+bdver1-store)*2)") (define_insn_reservation "bdver1_mmxsse_store_short" 4 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "mmxmov,ssemov") (eq_attr "memory" "store,both"))) "bdver1-direct,(bdver1-fpsched+bdver1-agu),(bdver1-fsto+bdver1-store)") ;; Register moves. (define_insn_reservation "bdver1_ssevector_avx256" 3 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssemov") (and (eq_attr "mode" "V8SF,V4DF,OI") (eq_attr "memory" "none")))) "bdver1-double,bdver1-fpsched,bdver1-fmal") (define_insn_reservation "bdver1_movss_movsd" 2 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssemov") (and (eq_attr "mode" "SF,DF") (eq_attr "memory" "none")))) "bdver1-direct,bdver1-fpsched,bdver1-ffma") (define_insn_reservation "bdver1_mmxssemov" 2 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "mmxmov,ssemov") (eq_attr "memory" "none"))) "bdver1-direct,bdver1-fpsched,bdver1-fmal") ;; SSE logs. (define_insn_reservation "bdver1_sselog_load_256" 7 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "sselog,sselog1") (and (eq_attr "mode" "V8SF") (eq_attr "memory" "load")))) "bdver1-double,bdver1-fpload,bdver1-fmal") (define_insn_reservation "bdver1_sselog_256" 3 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "sselog,sselog1") (eq_attr "mode" "V8SF"))) "bdver1-double,bdver1-fpsched,bdver1-fmal") (define_insn_reservation "bdver1_sselog_load" 6 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "sselog,sselog1") (eq_attr "memory" "load"))) "bdver1-direct,bdver1-fpload,bdver1-fxbar") (define_insn_reservation "bdver1_sselog" 2 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (eq_attr "type" "sselog,sselog1")) "bdver1-direct,bdver1-fpsched,bdver1-fxbar") ;; PCMP actually executes in FMAL. (define_insn_reservation "bdver1_ssecmp_load" 6 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssecmp") (eq_attr "memory" "load"))) "bdver1-direct,bdver1-fpload,bdver1-ffma") (define_insn_reservation "bdver1_ssecmp" 2 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (eq_attr "type" "ssecmp")) "bdver1-direct,bdver1-fpsched,bdver1-ffma") (define_insn_reservation "bdver1_ssecomi_load" 6 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssecomi") (eq_attr "memory" "load"))) "bdver1-double,bdver1-fpload,(bdver1-ffma | bdver1-fsto)") (define_insn_reservation "bdver1_ssecomi" 2 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (eq_attr "type" "ssecomi")) "bdver1-double,bdver1-fpsched,(bdver1-ffma | bdver1-fsto)") @@ -522,7 +522,7 @@ ;; 256 bit conversion. (define_insn_reservation "bdver1_vcvtX2Y_avx256_load" 8 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssecvt") (and (eq_attr "memory" "load") (ior (ior (match_operand:V4DF 0 "register_operand") @@ -533,7 +533,7 @@ (match_operand:V8SI 1 "nonimmediate_operand"))))))) "bdver1-vector,bdver1-fpload,bdver1-fvector") (define_insn_reservation "bdver1_vcvtX2Y_avx256" 4 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssecvt") (and (eq_attr "memory" "none") (ior (ior (match_operand:V4DF 0 "register_operand") @@ -545,40 +545,40 @@ "bdver1-vector,bdver1-fpsched,bdver1-fvector") ;; CVTSS2SD, CVTSD2SS. (define_insn_reservation "bdver1_ssecvt_cvtss2sd_load" 8 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssecvt") (and (eq_attr "mode" "SF,DF") (eq_attr "memory" "load")))) "bdver1-direct,bdver1-fpload,bdver1-fcvt") (define_insn_reservation "bdver1_ssecvt_cvtss2sd" 4 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssecvt") (and (eq_attr "mode" "SF,DF") (eq_attr "memory" "none")))) "bdver1-direct,bdver1-fpsched,bdver1-fcvt") ;; CVTSI2SD, CVTSI2SS, CVTSI2SDQ, CVTSI2SSQ. (define_insn_reservation "bdver1_sseicvt_cvtsi2sd_load" 8 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "sseicvt") (and (eq_attr "mode" "SF,DF") (eq_attr "memory" "load")))) "bdver1-direct,bdver1-fpload,bdver1-fcvt") (define_insn_reservation "bdver1_sseicvt_cvtsi2sd" 4 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "sseicvt") (and (eq_attr "mode" "SF,DF") (eq_attr "memory" "none")))) "bdver1-double,bdver1-fpsched,(nothing | bdver1-fcvt)") ;; CVTPD2PS. (define_insn_reservation "bdver1_ssecvt_cvtpd2ps_load" 8 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssecvt") (and (eq_attr "memory" "load") (and (match_operand:V4SF 0 "register_operand") (match_operand:V2DF 1 "nonimmediate_operand"))))) "bdver1-double,bdver1-fpload,(bdver1-fxbar | bdver1-fcvt)") (define_insn_reservation "bdver1_ssecvt_cvtpd2ps" 4 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssecvt") (and (eq_attr "memory" "none") (and (match_operand:V4SF 0 "register_operand") @@ -586,7 +586,7 @@ "bdver1-double,bdver1-fpsched,(bdver1-fxbar | bdver1-fcvt)") ;; CVTPI2PS, CVTDQ2PS. (define_insn_reservation "bdver1_ssecvt_cvtdq2ps_load" 8 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssecvt") (and (eq_attr "memory" "load") (and (match_operand:V4SF 0 "register_operand") @@ -594,7 +594,7 @@ (match_operand:V4SI 1 "nonimmediate_operand")))))) "bdver1-direct,bdver1-fpload,bdver1-fcvt") (define_insn_reservation "bdver1_ssecvt_cvtdq2ps" 4 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssecvt") (and (eq_attr "memory" "none") (and (match_operand:V4SF 0 "register_operand") @@ -603,14 +603,14 @@ "bdver1-direct,bdver1-fpsched,bdver1-fcvt") ;; CVTDQ2PD. (define_insn_reservation "bdver1_ssecvt_cvtdq2pd_load" 8 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssecvt") (and (eq_attr "memory" "load") (and (match_operand:V2DF 0 "register_operand") (match_operand:V4SI 1 "nonimmediate_operand"))))) "bdver1-double,bdver1-fpload,(bdver1-fxbar | bdver1-fcvt)") (define_insn_reservation "bdver1_ssecvt_cvtdq2pd" 4 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssecvt") (and (eq_attr "memory" "none") (and (match_operand:V2DF 0 "register_operand") @@ -618,7 +618,7 @@ "bdver1-double,bdver1-fpsched,(bdver1-fxbar | bdver1-fcvt)") ;; CVTPS2PD, CVTPI2PD. (define_insn_reservation "bdver1_ssecvt_cvtps2pd_load" 6 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssecvt") (and (eq_attr "memory" "load") (and (match_operand:V2DF 0 "register_operand") @@ -626,7 +626,7 @@ (match_operand:V4SF 1 "nonimmediate_operand")))))) "bdver1-double,bdver1-fpload,(bdver1-fxbar | bdver1-fcvt)") (define_insn_reservation "bdver1_ssecvt_cvtps2pd" 2 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssecvt") (and (eq_attr "memory" "load") (and (match_operand:V2DF 0 "register_operand") @@ -635,27 +635,27 @@ "bdver1-double,bdver1-fpsched,(bdver1-fxbar | bdver1-fcvt)") ;; CVTSD2SI, CVTSD2SIQ, CVTSS2SI, CVTSS2SIQ, CVTTSD2SI, CVTTSD2SIQ, CVTTSS2SI, CVTTSS2SIQ. (define_insn_reservation "bdver1_ssecvt_cvtsX2si_load" 8 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "sseicvt") (and (eq_attr "mode" "SI,DI") (eq_attr "memory" "load")))) "bdver1-double,bdver1-fpload,(bdver1-fcvt | bdver1-fsto)") (define_insn_reservation "bdver1_ssecvt_cvtsX2si" 4 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "sseicvt") (and (eq_attr "mode" "SI,DI") (eq_attr "memory" "none")))) "bdver1-double,bdver1-fpsched,(bdver1-fcvt | bdver1-fsto)") ;; CVTPD2PI, CVTTPD2PI. (define_insn_reservation "bdver1_ssecvt_cvtpd2pi_load" 8 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssecvt") (and (eq_attr "memory" "load") (and (match_operand:V2DF 1 "nonimmediate_operand") (match_operand:V2SI 0 "register_operand"))))) "bdver1-double,bdver1-fpload,(bdver1-fcvt | bdver1-fxbar)") (define_insn_reservation "bdver1_ssecvt_cvtpd2pi" 4 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssecvt") (and (eq_attr "memory" "none") (and (match_operand:V2DF 1 "nonimmediate_operand") @@ -663,14 +663,14 @@ "bdver1-double,bdver1-fpsched,(bdver1-fcvt | bdver1-fxbar)") ;; CVTPD2DQ, CVTTPD2DQ. (define_insn_reservation "bdver1_ssecvt_cvtpd2dq_load" 6 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssecvt") (and (eq_attr "memory" "load") (and (match_operand:V2DF 1 "nonimmediate_operand") (match_operand:V4SI 0 "register_operand"))))) "bdver1-double,bdver1-fpload,(bdver1-fcvt | bdver1-fxbar)") (define_insn_reservation "bdver1_ssecvt_cvtpd2dq" 2 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssecvt") (and (eq_attr "memory" "none") (and (match_operand:V2DF 1 "nonimmediate_operand") @@ -678,7 +678,7 @@ "bdver1-double,bdver1-fpsched,(bdver1-fcvt | bdver1-fxbar)") ;; CVTPS2PI, CVTTPS2PI, CVTPS2DQ, CVTTPS2DQ. (define_insn_reservation "bdver1_ssecvt_cvtps2pi_load" 8 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssecvt") (and (eq_attr "memory" "load") (and (match_operand:V4SF 1 "nonimmediate_operand") @@ -686,7 +686,7 @@ (match_operand: V4SI 0 "register_operand")))))) "bdver1-direct,bdver1-fpload,bdver1-fcvt") (define_insn_reservation "bdver1_ssecvt_cvtps2pi" 4 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssecvt") (and (eq_attr "memory" "none") (and (match_operand:V4SF 1 "nonimmediate_operand") @@ -696,100 +696,100 @@ ;; SSE MUL, ADD, and MULADD. (define_insn_reservation "bdver1_ssemuladd_load_256" 11 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssemul,sseadd,ssemuladd") (and (eq_attr "mode" "V8SF,V4DF") (eq_attr "memory" "load")))) "bdver1-double,bdver1-fpload,bdver1-ffma") (define_insn_reservation "bdver1_ssemuladd_256" 7 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssemul,sseadd,ssemuladd") (and (eq_attr "mode" "V8SF,V4DF") (eq_attr "memory" "none")))) "bdver1-double,bdver1-fpsched,bdver1-ffma") (define_insn_reservation "bdver1_ssemuladd_load" 10 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssemul,sseadd,ssemuladd") (eq_attr "memory" "load"))) "bdver1-direct,bdver1-fpload,bdver1-ffma") (define_insn_reservation "bdver1_ssemuladd" 6 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssemul,sseadd,ssemuladd") (eq_attr "memory" "none"))) "bdver1-direct,bdver1-fpsched,bdver1-ffma") (define_insn_reservation "bdver1_sseimul_load" 8 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "sseimul") (eq_attr "memory" "load"))) "bdver1-direct,bdver1-fpload,bdver1-fmma") (define_insn_reservation "bdver1_sseimul" 4 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "sseimul") (eq_attr "memory" "none"))) "bdver1-direct,bdver1-fpsched,bdver1-fmma") (define_insn_reservation "bdver1_sseiadd_load" 6 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "sseiadd") (eq_attr "memory" "load"))) "bdver1-direct,bdver1-fpload,bdver1-fmal") (define_insn_reservation "bdver1_sseiadd" 2 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "sseiadd") (eq_attr "memory" "none"))) "bdver1-direct,bdver1-fpsched,bdver1-fmal") ;; SSE DIV: no throughput information (assume same as amdfam10). (define_insn_reservation "bdver1_ssediv_double_load_256" 31 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssediv") (and (eq_attr "mode" "V4DF") (eq_attr "memory" "load")))) "bdver1-double,bdver1-fpload,(bdver1-ffma0*17 | bdver1-ffma1*17)") (define_insn_reservation "bdver1_ssediv_double_256" 27 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssediv") (and (eq_attr "mode" "V4DF") (eq_attr "memory" "none")))) "bdver1-double,bdver1-fpsched,(bdver1-ffma0*17 | bdver1-ffma1*17)") (define_insn_reservation "bdver1_ssediv_single_load_256" 28 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssediv") (and (eq_attr "mode" "V8SF") (eq_attr "memory" "load")))) "bdver1-double,bdver1-fpload,(bdver1-ffma0*17 | bdver1-ffma1*17)") (define_insn_reservation "bdver1_ssediv_single_256" 24 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssediv") (and (eq_attr "mode" "V8SF") (eq_attr "memory" "none")))) "bdver1-double,bdver1-fpsched,(bdver1-ffma0*17 | bdver1-ffma1*17)") (define_insn_reservation "bdver1_ssediv_double_load" 31 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssediv") (and (eq_attr "mode" "DF,V2DF") (eq_attr "memory" "load")))) "bdver1-direct,bdver1-fpload,(bdver1-ffma0*17 | bdver1-ffma1*17)") (define_insn_reservation "bdver1_ssediv_double" 27 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssediv") (and (eq_attr "mode" "DF,V2DF") (eq_attr "memory" "none")))) "bdver1-direct,bdver1-fpsched,(bdver1-ffma0*17 | bdver1-ffma1*17)") (define_insn_reservation "bdver1_ssediv_single_load" 28 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssediv") (and (eq_attr "mode" "SF,V4SF") (eq_attr "memory" "load")))) "bdver1-direct,bdver1-fpload,(bdver1-ffma0*17 | bdver1-ffma1*17)") (define_insn_reservation "bdver1_ssediv_single" 24 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "ssediv") (and (eq_attr "mode" "SF,V4SF") (eq_attr "memory" "none")))) "bdver1-direct,bdver1-fpsched,(bdver1-ffma0*17 | bdver1-ffma1*17)") (define_insn_reservation "bdver1_sseins" 3 - (and (eq_attr "cpu" "bdver1") + (and (eq_attr "cpu" "bdver1,bdver2") (and (eq_attr "type" "sseins") (eq_attr "mode" "TI"))) "bdver1-direct,bdver1-fpsched,bdver1-fxbar") diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 824308addc6..d6e250fd5a8 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -1540,6 +1540,11 @@ s390_option_override (void) if (TARGET_64BIT && !TARGET_ZARCH) error ("64-bit ABI not supported in ESA/390 mode"); + /* Use hardware DFP if available and not explicitly disabled by + user. E.g. with -m31 -march=z10 -mzarch */ + if (!(target_flags_explicit & MASK_HARD_DFP) && TARGET_DFP) + target_flags |= MASK_HARD_DFP; + if (TARGET_HARD_DFP && !TARGET_DFP) { if (target_flags_explicit & MASK_HARD_DFP) diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index 6f854a565b3..a875eec7b9f 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -4012,7 +4012,7 @@ (unsigned_fix:SI (match_operand:DFP 1 "register_operand" ""))) (unspec:SI [(const_int 5)] UNSPEC_ROUND) (clobber (reg:CC CC_REGNUM))])] - "TARGET_Z196 && TARGET_HARD_FLOAT" + "TARGET_Z196 && TARGET_HARD_DFP" "") ; fixuns_trunc(tf|df|sf|td|dd)(di|si)2 instruction patterns. diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md index f70acd37337..c0c1ef8ac38 100644 --- a/gcc/config/sparc/sparc.md +++ b/gcc/config/sparc/sparc.md @@ -1352,6 +1352,10 @@ ;; Load in operand 0 the (absolute) address of operand 1, which is a symbolic ;; value subject to a PC-relative relocation. Operand 2 is a helper function ;; that adds the PC value at the call point to register #(operand 3). +;; +;; Even on V9 we use this call sequence with a stub, instead of "rd %pc, ..." +;; because the RDPC instruction is extremely expensive and incurs a complete +;; instruction pipeline flush. (define_insn "load_pcrel_sym<P:mode>" [(set (match_operand:P 0 "register_operand" "=r") diff --git a/gcc/config/vms/vms-ld.c b/gcc/config/vms/vms-ld.c index 18776fa2e38..cc57d8a24be 100644 --- a/gcc/config/vms/vms-ld.c +++ b/gcc/config/vms/vms-ld.c @@ -640,7 +640,7 @@ main (int argc, char **argv) { /* Comes from pragma Ident (). */ fprintf (optfile, "case_sensitive=yes\n"); - fprintf (optfile, "IDENTIFICATION=\"%15.15s\"\n", &argv[i][17]); + fprintf (optfile, "IDENTIFICATION=\"%-.15s\"\n", &argv[i][17]); fprintf (optfile, "case_sensitive=NO\n"); } } diff --git a/gcc/configure b/gcc/configure index 15a9ece5e6f..2a84fc37073 100755 --- a/gcc/configure +++ b/gcc/configure @@ -22214,15 +22214,11 @@ if test $in_tree_ld != yes ; then else case "${target}" in *-*-solaris2*) + # See acinclude.m4 (gcc_SUN_LD_VERSION) for the version number + # format. # - # Solaris 2 ld -V output looks like this for a regular version: - # - # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1699 - # - # but test versions add stuff at the end: - # - # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1701:onnv-ab196087-6931056-03/25/10 - # + # Don't reuse gcc_gv_sun_ld_vers_* in case a linker other than + # /usr/ccs/bin/ld has been configured. ld_ver=`$gcc_cv_ld -V 2>&1` if echo "$ld_ver" | grep 'Solaris Link Editors' > /dev/null; then ld_vers=`echo $ld_ver | sed -n \ @@ -22350,6 +22346,29 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_ro_rw_mix" >&5 $as_echo "$gcc_cv_ld_ro_rw_mix" >&6; } +if test "x${build}" = "x${target}" && test "x${build}" = "x${host}"; then + case "${target}" in + *-*-solaris2*) + # + # Solaris 2 ld -V output looks like this for a regular version: + # + # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1699 + # + # but test versions add stuff at the end: + # + # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1701:onnv-ab196087-6931056-03/25/10 + # + gcc_cv_sun_ld_ver=`/usr/ccs/bin/ld -V 2>&1` + if echo "$gcc_cv_sun_ld_ver" | grep 'Solaris Link Editors' > /dev/null; then + gcc_cv_sun_ld_vers=`echo $gcc_cv_sun_ld_ver | sed -n \ + -e 's,^.*: 5\.[0-9][0-9]*-\([0-9]\.[0-9][0-9]*\).*$,\1,p'` + gcc_cv_sun_ld_vers_major=`expr "$gcc_cv_sun_ld_vers" : '\([0-9]*\)'` + gcc_cv_sun_ld_vers_minor=`expr "$gcc_cv_sun_ld_vers" : '[0-9]*\.\([0-9]*\)'` + fi + ;; + esac +fi + # Check whether --enable-initfini-array was given. if test "${enable_initfini_array+set}" = set; then : enableval=$enable_initfini_array; @@ -22425,9 +22444,11 @@ fi .balign 4 .byte 'H', 'H', 'H', 'H' .text +.globl _start +_start: EOF if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ - && $gcc_cv_ld -e 0 -o conftest conftest.o > /dev/null 2>&1 \ + && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1 \ && $gcc_cv_objdump -s -j .init_array conftest \ | grep HHHHFFFFDDDDBBBB > /dev/null 2>&1 \ && $gcc_cv_objdump -s -j .fini_array conftest \ @@ -22440,17 +22461,41 @@ EOF /* end confdefs.h. */ #ifndef __ELF__ -#error Not an ELF OS +# error Not an ELF OS #endif #include <stdlib.h> -#if defined __GLIBC_PREREQ && __GLIBC_PREREQ (2, 4) +#if defined __GLIBC_PREREQ +# if __GLIBC_PREREQ (2, 4) +# else +# error GLIBC 2.4 required +# endif #else -#error The C library not known to support .init_array/.fini_array +# if defined __sun__ && defined __svr4__ + /* Solaris ld.so.1 supports .init_array/.fini_array since Solaris 8. */ +# else +# error The C library not known to support .init_array/.fini_array +# endif #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : + case "${target}" in + *-*-solaris2.8*) + # .init_array/.fini_array support was introduced in Solaris 8 + # patches 109147-08 (sparc) and 109148-08 (x86). Since ld.so.1 and + # ld are guaranteed to be updated in lockstep, we can check ld -V + # instead. Unfortunately, proper ld version numbers were only + # introduced in rev. -14, so we check for that. + if test "$gcc_cv_sun_ld_vers_minor" -lt 272; then + gcc_cv_initfini_array=no + fi + ;; + *-*-solaris2.9* | *-*-solaris2.1[0-9]*) + # .init_array/.fini_array support is present since Solaris 9 FCS. + ;; + esac + else gcc_cv_initfini_array=no fi diff --git a/gcc/configure.ac b/gcc/configure.ac index 5d6aa5d3c28..97be57b83e3 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -2296,15 +2296,11 @@ if test $in_tree_ld != yes ; then else case "${target}" in *-*-solaris2*) + # See acinclude.m4 (gcc_SUN_LD_VERSION) for the version number + # format. # - # Solaris 2 ld -V output looks like this for a regular version: - # - # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1699 - # - # but test versions add stuff at the end: - # - # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1701:onnv-ab196087-6931056-03/25/10 - # + # Don't reuse gcc_gv_sun_ld_vers_* in case a linker other than + # /usr/ccs/bin/ld has been configured. ld_ver=`$gcc_cv_ld -V 2>&1` if echo "$ld_ver" | grep 'Solaris Link Editors' > /dev/null; then ld_vers=`echo $ld_ver | sed -n \ diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index faa85939428..2c81a8a4119 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2012-02-21 Jakub Jelinek <jakub@redhat.com> + + PR c++/52312 + * typeck.c (check_literal_operator_args): Initialize *long_double_p + and *long_long_unsigned_p even if processing_template_decl. + 2012-02-16 Jason Merrill <jason@redhat.com> PR c++/52248 diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 91e7a0a09ca..ba5ae46814e 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -8483,6 +8483,9 @@ check_literal_operator_args (const_tree decl, bool *long_long_unsigned_p, bool *long_double_p) { tree argtypes = TYPE_ARG_TYPES (TREE_TYPE (decl)); + + *long_long_unsigned_p = false; + *long_double_p = false; if (processing_template_decl || processing_specialization) return argtypes == void_list_node; else @@ -8491,9 +8494,6 @@ check_literal_operator_args (const_tree decl, int arity; int max_arity = 2; - *long_long_unsigned_p = false; - *long_double_p = false; - /* Count the number and type of arguments and check for ellipsis. */ for (argtype = argtypes, arity = 0; argtype && argtype != void_list_node; diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 40a0986dda8..ef630fb0d47 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -1,7 +1,7 @@ /* Fold a constant sub-tree into a single node for C-compiler Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 - Free Software Foundation, Inc. + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, + 2012 Free Software Foundation, Inc. This file is part of GCC. @@ -10959,66 +10959,50 @@ fold_binary_loc (location_t loc, && TREE_CODE (arg1) == INTEGER_CST && TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST) { - unsigned HOST_WIDE_INT hi1, lo1, hi2, lo2, hi3, lo3, mlo, mhi; + double_int c1, c2, c3, msk; int width = TYPE_PRECISION (type), w; - hi1 = TREE_INT_CST_HIGH (TREE_OPERAND (arg0, 1)); - lo1 = TREE_INT_CST_LOW (TREE_OPERAND (arg0, 1)); - hi2 = TREE_INT_CST_HIGH (arg1); - lo2 = TREE_INT_CST_LOW (arg1); + c1 = tree_to_double_int (TREE_OPERAND (arg0, 1)); + c2 = tree_to_double_int (arg1); /* If (C1&C2) == C1, then (X&C1)|C2 becomes (X,C2). */ - if ((hi1 & hi2) == hi1 && (lo1 & lo2) == lo1) + if (double_int_equal_p (double_int_and (c1, c2), c1)) return omit_one_operand_loc (loc, type, arg1, - TREE_OPERAND (arg0, 0)); + TREE_OPERAND (arg0, 0)); - if (width > HOST_BITS_PER_WIDE_INT) - { - mhi = (unsigned HOST_WIDE_INT) -1 - >> (2 * HOST_BITS_PER_WIDE_INT - width); - mlo = -1; - } - else - { - mhi = 0; - mlo = (unsigned HOST_WIDE_INT) -1 - >> (HOST_BITS_PER_WIDE_INT - width); - } + msk = double_int_mask (width); /* If (C1|C2) == ~0 then (X&C1)|C2 becomes X|C2. */ - if ((~(hi1 | hi2) & mhi) == 0 && (~(lo1 | lo2) & mlo) == 0) + if (double_int_zero_p (double_int_and_not (msk, + double_int_ior (c1, c2)))) return fold_build2_loc (loc, BIT_IOR_EXPR, type, - TREE_OPERAND (arg0, 0), arg1); + TREE_OPERAND (arg0, 0), arg1); /* Minimize the number of bits set in C1, i.e. C1 := C1 & ~C2, unless (C1 & ~C2) | (C2 & C3) for some C3 is a mask of some mode which allows further optimizations. */ - hi1 &= mhi; - lo1 &= mlo; - hi2 &= mhi; - lo2 &= mlo; - hi3 = hi1 & ~hi2; - lo3 = lo1 & ~lo2; + c1 = double_int_and (c1, msk); + c2 = double_int_and (c2, msk); + c3 = double_int_and_not (c1, c2); for (w = BITS_PER_UNIT; w <= width && w <= HOST_BITS_PER_WIDE_INT; w <<= 1) { unsigned HOST_WIDE_INT mask = (unsigned HOST_WIDE_INT) -1 >> (HOST_BITS_PER_WIDE_INT - w); - if (((lo1 | lo2) & mask) == mask - && (lo1 & ~mask) == 0 && hi1 == 0) + if (((c1.low | c2.low) & mask) == mask + && (c1.low & ~mask) == 0 && c1.high == 0) { - hi3 = 0; - lo3 = mask; + c3 = uhwi_to_double_int (mask); break; } } - if (hi3 != hi1 || lo3 != lo1) + if (!double_int_equal_p (c3, c1)) return fold_build2_loc (loc, BIT_IOR_EXPR, type, - fold_build2_loc (loc, BIT_AND_EXPR, type, - TREE_OPERAND (arg0, 0), - build_int_cst_wide (type, - lo3, hi3)), - arg1); + fold_build2_loc (loc, BIT_AND_EXPR, type, + TREE_OPERAND (arg0, 0), + double_int_to_tree (type, + c3)), + arg1); } /* (X & Y) | Y is (X, Y). */ diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c index 935bbdae9ee..eae4cbe4615 100644 --- a/gcc/gimple-fold.c +++ b/gcc/gimple-fold.c @@ -1,5 +1,5 @@ /* Statement simplification on GIMPLE. - Copyright (C) 2010, 2011 Free Software Foundation, Inc. + Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc. Split out from tree-ssa-ccp.c. This file is part of GCC. @@ -591,8 +591,11 @@ gimplify_and_update_call_from_tree (gimple_stmt_iterator *si_p, tree expr) for (i = gsi_last (stmts); !gsi_end_p (i); gsi_prev (&i)) { new_stmt = gsi_stmt (i); - if (gimple_assign_single_p (new_stmt) - && !is_gimple_reg (gimple_assign_lhs (new_stmt))) + if ((gimple_assign_single_p (new_stmt) + && !is_gimple_reg (gimple_assign_lhs (new_stmt))) + || (is_gimple_call (new_stmt) + && (gimple_call_flags (new_stmt) + & (ECF_NOVOPS | ECF_PURE | ECF_CONST | ECF_NORETURN)) == 0)) { tree vdef; if (!laststore) diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 782adc34caf..07eb8fd81df 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -504,7 +504,8 @@ create_tmp_reg (tree type, const char *prefix) static inline tree create_tmp_from_val (tree val) { - return create_tmp_var (TREE_TYPE (val), get_name (val)); + /* Drop all qualifiers and address-space information from the value type. */ + return create_tmp_var (TYPE_MAIN_VARIANT (TREE_TYPE (val)), get_name (val)); } /* Create a temporary to hold the value of VAL. If IS_FORMAL, try to reuse @@ -7061,15 +7062,23 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, ret = GS_OK; break; } - ret = gimplify_expr (&TREE_OPERAND (*expr_p, 0), pre_p, post_p, - is_gimple_mem_ref_addr, fb_rvalue); - if (ret == GS_ERROR) - break; + /* Avoid re-gimplifying the address operand if it is already + in suitable form. Re-gimplifying would mark the address + operand addressable. Always gimplify when not in SSA form + as we still may have to gimplify decls with value-exprs. */ + if (!gimplify_ctxp || !gimplify_ctxp->into_ssa + || !is_gimple_mem_ref_addr (TREE_OPERAND (*expr_p, 0))) + { + ret = gimplify_expr (&TREE_OPERAND (*expr_p, 0), pre_p, post_p, + is_gimple_mem_ref_addr, fb_rvalue); + if (ret == GS_ERROR) + break; + } recalculate_side_effects (*expr_p); ret = GS_ALL_DONE; break; - /* Constants need not be gimplified. */ + /* Constants need not be gimplified. */ case INTEGER_CST: case REAL_CST: case FIXED_CST: diff --git a/gcc/ira-color.c b/gcc/ira-color.c index c638e58f333..a01d050fbb7 100644 --- a/gcc/ira-color.c +++ b/gcc/ira-color.c @@ -1,5 +1,5 @@ /* IRA allocation based on graph coloring. - Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 + Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. Contributed by Vladimir Makarov <vmakarov@redhat.com>. @@ -1067,7 +1067,7 @@ setup_profitable_hard_regs (void) { int num = OBJECT_SUBWORD (conflict_obj); - if (WORDS_BIG_ENDIAN) + if (REG_WORDS_BIG_ENDIAN) CLEAR_HARD_REG_BIT (ALLOCNO_COLOR_DATA (conflict_a)->profitable_hard_regs, hard_regno + nobj - num - 1); @@ -1451,7 +1451,7 @@ check_hard_reg_p (ira_allocno_t a, int hard_regno, if (nregs == nwords) { - if (WORDS_BIG_ENDIAN) + if (REG_WORDS_BIG_ENDIAN) set_to_test_start = nwords - j - 1; else set_to_test_start = j; @@ -1610,7 +1610,7 @@ assign_hard_reg (ira_allocno_t a, bool retry_p) { int num = OBJECT_SUBWORD (conflict_obj); - if (WORDS_BIG_ENDIAN) + if (REG_WORDS_BIG_ENDIAN) SET_HARD_REG_BIT (conflicting_regs[word], hard_regno + n_objects - num - 1); else diff --git a/gcc/ira.c b/gcc/ira.c index 2bdf9fd7fb6..41a2928d0c9 100644 --- a/gcc/ira.c +++ b/gcc/ira.c @@ -1,5 +1,5 @@ /* Integrated Register Allocator (IRA) entry point. - Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 + Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. Contributed by Vladimir Makarov <vmakarov@redhat.com>. @@ -2089,7 +2089,7 @@ check_allocation (void) int this_regno = hard_regno; if (n > 1) { - if (WORDS_BIG_ENDIAN) + if (REG_WORDS_BIG_ENDIAN) this_regno += n - i - 1; else this_regno += i; @@ -2108,7 +2108,7 @@ check_allocation (void) if (ALLOCNO_NUM_OBJECTS (conflict_a) > 1 && conflict_nregs == ALLOCNO_NUM_OBJECTS (conflict_a)) { - if (WORDS_BIG_ENDIAN) + if (REG_WORDS_BIG_ENDIAN) conflict_hard_regno += (ALLOCNO_NUM_OBJECTS (conflict_a) - OBJECT_SUBWORD (conflict_obj) - 1); else diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 35320c2fad9..a1ac0008c75 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -1141,15 +1141,14 @@ place_field (record_layout_info rli, tree field) } /* Does this field automatically have alignment it needs by virtue - of the fields that precede it and the record's own alignment? - We already align ms_struct fields, so don't re-align them. */ - if (known_align < desired_align - && !targetm.ms_bitfield_layout_p (rli->t)) + of the fields that precede it and the record's own alignment? */ + if (known_align < desired_align) { /* No, we need to skip space before this field. Bump the cumulative size to multiple of field alignment. */ - if (DECL_SOURCE_LOCATION (field) != BUILTINS_LOCATION) + if (!targetm.ms_bitfield_layout_p (rli->t) + && DECL_SOURCE_LOCATION (field) != BUILTINS_LOCATION) warning (OPT_Wpadded, "padding struct to align %q+D", field); /* If the alignment is still within offset_align, just align @@ -1171,7 +1170,8 @@ place_field (record_layout_info rli, tree field) if (! TREE_CONSTANT (rli->offset)) rli->offset_align = desired_align; - + if (targetm.ms_bitfield_layout_p (rli->t)) + rli->prev_field = NULL; } /* Handle compatibility with PCC. Note that if the record has any diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8c66e09ee71..3091af5c01f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,49 @@ +2012-02-21 Kai Tietz <ktietz@redhat.com> + + * gcc.dg/bf-ms-layout-3.c: Mark char typed bitfield + as extension. + +2012-02-21 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/52324 + * gcc.dg/tree-ssa/ssa-lim-10.c: New testcase. + +2012-02-21 Georg-Johann Lay <avr@gjlay.de> + + PR middle-end/51782 + * gcc.target/avr/torture/pr51782-1.c: New test. + +2012-02-21 Jakub Jelinek <jakub@redhat.com> + + PR tree-optimization/52318 + * gcc.dg/pr52318.c: New test. + +2012-02-20 Kai Tietz <ktietz@redhat.com> + + * gcc.dg/bf-ms-layout-3.c: New testcase. + +2012-02-20 Thomas Koenig <tkoenig@gcc.gnu.org> + + PR testsuite/52229 + PR fortran/32380 + * gfortran.dg/vect/pr32380.f: XFAIL on PowerPC and ia-64. + +2012-02-20 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/52298 + * gcc.dg/torture/pr52298.c: New testcase. + * gcc.dg/vect/pr52298.c: Likewise. + +2012-02-20 Georg-Johann Lay <avr@gjlay.de> + + * gcc.dg/pr52132.c: Fix FAIL on 16-bit int platforms. + * gcc.c-torture/execute/pr52286.c: Ditto. + +2012-02-20 Jakub Jelinek <jakub@redhat.com> + + PR tree-optimization/52286 + * gcc.c-torture/execute/pr52286.c: New test. + 2012-02-18 Tobias Burnus <burnus@net-b.de> PR fortran/52295 diff --git a/gcc/testsuite/gcc.c-torture/execute/pr52286.c b/gcc/testsuite/gcc.c-torture/execute/pr52286.c new file mode 100644 index 00000000000..bb56295ab52 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr52286.c @@ -0,0 +1,20 @@ +/* PR tree-optimization/52286 */ + +extern void abort (void); + +int +main () +{ +#if __SIZEOF_INT__ > 2 + int a, b; + asm ("" : "=r" (a) : "0" (0)); + b = (~a | 1) & -2038094497; +#else + long a, b; + asm ("" : "=r" (a) : "0" (0)); + b = (~a | 1) & -2038094497L; +#endif + if (b >= 0) + abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/bf-ms-layout-3.c b/gcc/testsuite/gcc.dg/bf-ms-layout-3.c new file mode 100644 index 00000000000..a4e9ab3ff6f --- /dev/null +++ b/gcc/testsuite/gcc.dg/bf-ms-layout-3.c @@ -0,0 +1,52 @@ +/* Test for MS bitfield layout */ +/* { dg-do run { target *-*-interix* *-*-mingw* *-*-cygwin* i?86-*-* x86_64-*-* } } */ + +extern void abort(); + +struct s1_t { + char a; + char b __attribute__ ((aligned (16))); +} __attribute__ ((ms_struct)); +struct s1_t s1; + +struct s2_t { + char a; + char b; +} __attribute__ ((ms_struct)); +struct s2_t s2; + +struct s3_t { + __extension__ char a : 6; + char b __attribute__ ((aligned (16))); +} __attribute__ ((ms_struct)); +struct s3_t s3; + +struct s4_t { + __extension__ char a : 6; + char b __attribute__ ((aligned (2))); +} __attribute__ ((ms_struct)); +struct s4_t s4; + +struct s5_t { + __extension__ char a : 6; + char b __attribute__ ((aligned (1))); +} __attribute__ ((ms_struct)); +struct s5_t s5; + +__extension__ +static __PTRDIFF_TYPE__ offs (const void *a, const void *b) +{ + return (__PTRDIFF_TYPE__) ((const char*)a - (const char*)b); +} + +int main() +{ + if (offs (&s1.b, &s1) != 16 + || offs (&s2.b, &s2) != 1 + || offs (&s3.b, &s3) != 16 + || offs (&s4.b, &s4) != 2 + || offs (&s5.b, &s5) != 1) + abort (); + return 0; +} + diff --git a/gcc/testsuite/gcc.dg/pr52132.c b/gcc/testsuite/gcc.dg/pr52132.c index 8374994424a..ed1eb1becd2 100644 --- a/gcc/testsuite/gcc.dg/pr52132.c +++ b/gcc/testsuite/gcc.dg/pr52132.c @@ -2,6 +2,11 @@ /* { dg-do compile } */ /* { dg-options "-std=c99 -O2 -g" } */ +#if (__SIZEOF_INT__ < __SIZEOF_FLOAT__) \ + && (__SIZEOF_LONG__ == __SIZEOF_FLOAT__) +#define int long +#endif + int l; void bar (void); @@ -10,7 +15,11 @@ foo (int *x, float y) { float b; union { float f; int i; } u = { .f = y }; +#if (__SIZEOF_INT__ < __SIZEOF_FLOAT__) + u.i += 127L << 23; +#else u.i += 127 << 23; +#endif u.f = ((-1.0f / 3) * u.f + 2) * u.f - 2.0f / 3; b = 0.5 * (u.f + l); if (b >= *x) diff --git a/gcc/testsuite/gcc.dg/pr52318.c b/gcc/testsuite/gcc.dg/pr52318.c new file mode 100644 index 00000000000..4f367aa1cd4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr52318.c @@ -0,0 +1,17 @@ +/* PR tree-optimization/52318 */ +/* { dg-do compile } */ +/* { dg-options "-O3 -ftracer -fno-tree-ccp -fno-tree-copy-prop -fno-tree-dce" } */ + +int c; +char *p; + +void +foo (int i) +{ + char a[2]; + char b[20]; + p = __builtin___stpcpy_chk (a, "", 2); + p = __builtin___stpcpy_chk (&b[16], i ? "e" : "jkl", 4); + if (c) + foo (i); +} diff --git a/gcc/testsuite/gcc.dg/tm/pr52141.c b/gcc/testsuite/gcc.dg/tm/pr52141.c new file mode 100644 index 00000000000..0dabf76ce6d --- /dev/null +++ b/gcc/testsuite/gcc.dg/tm/pr52141.c @@ -0,0 +1,24 @@ +/* { dg-do compile } */ +/* { dg-options "-fgnu-tm -O0 -w" } */ + +__attribute__((always_inline)) +static void asmfunc(void) +{ + __asm__ (""); /* { dg-error "asm not allowed in .transaction_safe" } */ +} + +__attribute__((transaction_safe)) +static void f(void) +{ + asmfunc(); +} + +int main() +{ + __transaction_atomic { + f(); + } + return 0; +} + +/* { dg-message "inlined from \'f\'" "" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/torture/pr52298.c b/gcc/testsuite/gcc.dg/torture/pr52298.c new file mode 100644 index 00000000000..f0799c1a5c8 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr52298.c @@ -0,0 +1,16 @@ +/* { dg-do compile } */ + +int a, b, c, h; + +int i[5][5]; + +void +fn1 () +{ + int l = 0; + + for (a = 0; a <= 3; a++) + for (b = 1; b >= 0; b -= 1) + l |= i[0][b]; + c = l; +} diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-10.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-10.c new file mode 100644 index 00000000000..bc149265dd7 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-10.c @@ -0,0 +1,31 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-lim1-details" } */ + +int *l, *r; +int test_func(void) +{ + int i; + int direction; + static int pos; + + pos = 0; + direction = 1; + + for ( i = 0; i <= 400; i++ ) + { + if ( direction == 0 ) + pos = l[pos]; + else + pos = r[pos]; + + if ( pos == -1 ) + { + pos = 0; + direction = !direction; + } + } + return i; +} + +/* { dg-final { scan-tree-dump "Executing store motion of pos" "lim1" } } */ +/* { dg-final { cleanup-tree-dump "lim1" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/pr52298.c b/gcc/testsuite/gcc.dg/vect/pr52298.c new file mode 100644 index 00000000000..c2401607c45 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/pr52298.c @@ -0,0 +1,31 @@ +/* { dg-do run } */ +/* { dg-options "-O1 -ftree-vectorize -fno-tree-pre -fno-tree-loop-im" } */ + +extern void abort (void); +int c[80]; + +__attribute__((noinline)) int +foo (void) +{ + int l = 0; + int a, b; + + for (a = 3; a >= 0; a--) + for (b = 7; b >= 0; b--) + l |= c[a+60]; + return l; +} + +int +main () +{ + int i; + for (i = 0; i < 60; i++) + c[i] = 1; + for (; i < 64; i++) + c[i] = 1 << (i - 59); + if (foo () != 30) + abort (); + return 0; +} + diff --git a/gcc/testsuite/gcc.target/avr/torture/pr51782-1.c b/gcc/testsuite/gcc.target/avr/torture/pr51782-1.c new file mode 100644 index 00000000000..ff0f9d45fae --- /dev/null +++ b/gcc/testsuite/gcc.target/avr/torture/pr51782-1.c @@ -0,0 +1,51 @@ +/* PR middle-end/51782 */ +/* { dg-do run } */ +/* { dg-options { "-std=gnu99" } } */ + +#include <stdlib.h> + +struct R { char r; }; +struct RGB { char r,g,b; }; + +__flash const struct R r1 = { 12 }; +__flash const struct RGB r3 = { 23, 56, 78 }; + +char __attribute__((noinline,noclone)) +read1_bug (const __flash struct R *s) +{ + struct R t = *s; + return t.r; +} + +char __attribute__((noinline,noclone)) +read1_ok (const __flash struct R *s) +{ + return s->r; +} + +char __attribute__((noinline,noclone)) +read3_bug (const __flash struct RGB *s) +{ + struct RGB t = *s; + return t.r + t.g + t.b; +} + +char __attribute__((noinline,noclone)) +read3_ok (const __flash struct RGB *s) +{ + return s->r + s->g + s->b; +} + +__flash const struct R * volatile p1 = &r1; +__flash const struct RGB * volatile p3 = &r3; + +int main (void) +{ + if (read1_bug (p1) != read1_ok (p1)) + abort(); + + if (read3_bug (p3) != read3_ok (p3)) + abort(); + + exit (0); +} diff --git a/gcc/testsuite/gfortran.dg/vect/pr32380.f b/gcc/testsuite/gfortran.dg/vect/pr32380.f index ebe61cc4cd2..747f88ac68e 100644 --- a/gcc/testsuite/gfortran.dg/vect/pr32380.f +++ b/gcc/testsuite/gfortran.dg/vect/pr32380.f @@ -259,5 +259,5 @@ c return end -! { dg-final { scan-tree-dump-times "vectorized 7 loops" 1 "vect" } } +! { dg-final { scan-tree-dump-times "vectorized 7 loops" 1 "vect" { xfail powerpc*-*-* ia64-*-*-* } } } ! { dg-final { cleanup-tree-dump "vect" } } diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c index d760db34b2a..aa330dd95c4 100644 --- a/gcc/trans-mem.c +++ b/gcc/trans-mem.c @@ -3736,6 +3736,13 @@ ipa_tm_scan_irr_block (basic_block bb) assembly statement is not relevant to the transaction is to wrap it in a __tm_waiver block. This is not yet implemented, so we can't check for it. */ + if (is_tm_safe (current_function_decl)) + { + tree t = build1 (NOP_EXPR, void_type_node, size_zero_node); + SET_EXPR_LOCATION (t, gimple_location (stmt)); + TREE_BLOCK (t) = gimple_block (stmt); + error ("%Kasm not allowed in %<transaction_safe%> function", t); + } return true; default: diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index 43f7662e658..b7d0cb51742 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -2319,7 +2319,7 @@ vect_analyze_data_ref_access (struct data_reference *dr) stmt_vec_info stmt_info = vinfo_for_stmt (stmt); loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info); struct loop *loop = NULL; - HOST_WIDE_INT dr_step = TREE_INT_CST_LOW (step); + HOST_WIDE_INT dr_step; if (loop_vinfo) loop = LOOP_VINFO_LOOP (loop_vinfo); @@ -2332,6 +2332,7 @@ vect_analyze_data_ref_access (struct data_reference *dr) } /* Allow invariant loads in loops. */ + dr_step = TREE_INT_CST_LOW (step); if (loop_vinfo && dr_step == 0) { GROUP_FIRST_ELEMENT (vinfo_for_stmt (stmt)) = NULL; diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 20f10f37437..78dd4d1615e 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -3753,7 +3753,9 @@ vectorizable_store (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt, if (!STMT_VINFO_DATA_REF (stmt_info)) return false; - if (tree_int_cst_compare (DR_STEP (dr), size_zero_node) < 0) + if (tree_int_cst_compare (loop && nested_in_vect_loop_p (loop, stmt) + ? STMT_VINFO_DR_STEP (stmt_info) : DR_STEP (dr), + size_zero_node) < 0) { if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "negative step for store."); @@ -4266,7 +4268,10 @@ vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt, if (!STMT_VINFO_DATA_REF (stmt_info)) return false; - negative = tree_int_cst_compare (DR_STEP (dr), size_zero_node) < 0; + negative = tree_int_cst_compare (nested_in_vect_loop + ? STMT_VINFO_DR_STEP (stmt_info) + : DR_STEP (dr), + size_zero_node) < 0; if (negative && ncopies > 1) { if (vect_print_dump_info (REPORT_DETAILS)) @@ -4653,8 +4658,8 @@ vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt, This can only occur when vectorizing memory accesses in the inner-loop nested within an outer-loop that is being vectorized. */ - if (loop && nested_in_vect_loop_p (loop, stmt) - && (TREE_INT_CST_LOW (DR_STEP (dr)) + if (nested_in_vect_loop + && (TREE_INT_CST_LOW (STMT_VINFO_DR_STEP (stmt_info)) % GET_MODE_SIZE (TYPE_MODE (vectype)) != 0)) { gcc_assert (alignment_support_scheme != dr_explicit_realign_optimized); diff --git a/gcc/varasm.c b/gcc/varasm.c index 86134672cbe..79c81fa7991 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -7658,7 +7658,7 @@ get_elf_initfini_array_priority_section (int priority, sprintf (buf, "%s.%.5u", constructor_p ? ".init_array" : ".fini_array", priority); - sec = get_section (buf, SECTION_WRITE, NULL_TREE); + sec = get_section (buf, SECTION_WRITE | SECTION_NOTYPE, NULL_TREE); } else { @@ -7666,16 +7666,16 @@ get_elf_initfini_array_priority_section (int priority, { if (elf_init_array_section == NULL) elf_init_array_section - = get_unnamed_section (0, output_section_asm_op, - "\t.section\t.init_array"); + = get_section (".init_array", + SECTION_WRITE | SECTION_NOTYPE, NULL_TREE); sec = elf_init_array_section; } else { if (elf_fini_array_section == NULL) elf_fini_array_section - = get_unnamed_section (0, output_section_asm_op, - "\t.section\t.fini_array"); + = get_section (".fini_array", + SECTION_WRITE | SECTION_NOTYPE, NULL_TREE); sec = elf_fini_array_section; } } diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 90edc28fb41..61d9b591702 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,11 @@ +2012-02-20 Kai Tietz <ktietz@redhat.com> + + PR libstdc++/52300 + * gthr.h (GTHREAD_USE_WEAK): Define as zero for mingw. + + * config.host (i686-*-mingw*): Set md_unwind_header only for dw2-mode + to w32-unwind.h header. + 2012-02-19 Richard Sandiford <rdsandiford@googlemail.com> * config.host (mips64*-*-linux*, mipsisa64*-*-linux*) diff --git a/libgcc/config.host b/libgcc/config.host index ee1a62c78bf..257622a09ff 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -606,6 +606,7 @@ i[34567]86-*-mingw*) tmake_eh_file="i386/t-sjlj-eh" else tmake_eh_file="i386/t-dw2-eh" + md_unwind_header=i386/w32-unwind.h fi # Shared libgcc DLL install dir depends on cross/native build. if test x${build} = x${host} ; then @@ -614,7 +615,6 @@ i[34567]86-*-mingw*) tmake_dlldir_file="i386/t-dlldir-x" fi tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} i386/t-slibgcc-cygming i386/t-cygming i386/t-mingw32 i386/t-crtfm i386/t-chkstk t-dfprules" - md_unwind_header=i386/w32-unwind.h ;; x86_64-*-mingw*) case ${target_thread_file} in diff --git a/libgcc/gthr.h b/libgcc/gthr.h index 607c26eb563..03a3ee1d84f 100644 --- a/libgcc/gthr.h +++ b/libgcc/gthr.h @@ -135,6 +135,14 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see */ #if SUPPORTS_WEAK +/* The pe-coff weak support isn't fully compatible to ELF's weak. + For static libraries it might would work, but as we need to deal + with shared versions too, we disable it for mingw-targets. */ +#ifdef __MINGW32__ +#undef GTHREAD_USE_WEAK +#define GTHREAD_USE_WEAK 0 +#endif + #ifndef GTHREAD_USE_WEAK #define GTHREAD_USE_WEAK 1 #endif diff --git a/libitm/ChangeLog b/libitm/ChangeLog index e103ca0288b..2676cbef4b0 100644 --- a/libitm/ChangeLog +++ b/libitm/ChangeLog @@ -1,3 +1,38 @@ +2012-02-20 Torvald Riegel <triegel@redhat.com> + + * method-gl.cc (gl_wt_dispatch::orec): Put on separate cacheline. + +2012-02-20 Torvald Riegel <triegel@redhat.com> + + * method-gl.cc (gl_wt_dispatch::rollback): Optimize memory orders. + +2012-02-20 Torvald Riegel <triegel@redhat.com> + + * method-gl.cc (gl_wt_dispatch::trycommit): Remove handling of + serial mode corner cases made obsolete by prior gtm_rwlock changes. + (gl_wt_dispatch.rollback): Same. + +2012-02-20 Torvald Riegel <triegel@redhat.com> + + * method-gl.cc (gl_wt_dispatch::pre_write): Optimize memory orders. + +2012-02-20 Torvald Riegel <triegel@redhat.com> + + * method-gl.cc (gl_wt_dispatch::memtransfer_static): Add missing undo + for RfW src. Optimize number of calls to gtm_thr. + +2012-02-20 Torvald Riegel <triegel@redhat.com> + + * beginend.cc (GTM::gtm_thread::begin_transaction): Move serial lock + acquisition to ... + * retry.cc (GTM::gtm_thread::decide_begin_dispatch): ... here. + (default_dispatch): Make atomic. + (GTM::gtm_thread::set_default_dispatch): Access atomically. + (GTM::gtm_thread::decide_retry_strategy): Access atomically and + use decide_begin_dispatch() if default_dispatch might have changed. + (GTM::gtm_thread::number_of_threads_changed): Initialize + default_dispatch here. + 2012-02-15 Iain Sandoe <iains@gcc.gnu.org> Patrick Marlier <patrick.marlier@gmail.com> diff --git a/libitm/beginend.cc b/libitm/beginend.cc index 08c2174ea67..e6a84de13e2 100644 --- a/libitm/beginend.cc +++ b/libitm/beginend.cc @@ -233,16 +233,6 @@ GTM::gtm_thread::begin_transaction (uint32_t prop, const gtm_jmpbuf *jb) { // Outermost transaction disp = tx->decide_begin_dispatch (prop); - if (disp == dispatch_serialirr() || disp == dispatch_serial()) - { - tx->state = STATE_SERIAL; - if (disp == dispatch_serialirr()) - tx->state |= STATE_IRREVOCABLE; - serial_lock.write_lock (); - } - else - serial_lock.read_lock (tx); - set_abi_disp (disp); } diff --git a/libitm/method-gl.cc b/libitm/method-gl.cc index d6d050de3a8..4b6769ba2c0 100644 --- a/libitm/method-gl.cc +++ b/libitm/method-gl.cc @@ -41,7 +41,8 @@ struct gl_mg : public method_group static gtm_word clear_locked(gtm_word l) { return l & ~LOCK_BIT; } // The global ownership record. - atomic<gtm_word> orec; + // No tail-padding necessary (the virtual functions aren't used frequently). + atomic<gtm_word> orec __attribute__((aligned(HW_CACHELINE_SIZE))); virtual void init() { @@ -52,7 +53,6 @@ struct gl_mg : public method_group virtual void fini() { } }; -// TODO cacheline padding static gl_mg o_gl_mg; @@ -76,18 +76,16 @@ static gl_mg o_gl_mg; // validate that no other update transaction comitted before we acquired the // orec, so we have the most recent timestamp and no other transaction can // commit until we have committed). -// However, we therefore cannot use this method for a serial transaction -// (because shared_state needs to remain at ~0) and we have to be careful -// when switching to serial mode (see the special handling in trycommit() and -// rollback()). -// ??? This sharing adds some complexity wrt. serial mode. Just use a separate -// state variable? +// However, we therefore depend on shared_state not being modified by the +// serial lock during upgrades to serial mode, which is ensured by +// gtm_thread::serialirr_mode by not calling gtm_rwlock::write_upgrade_finish +// before we have committed or rolled back. class gl_wt_dispatch : public abi_dispatch { protected: - static void pre_write(const void *addr, size_t len) + static void pre_write(const void *addr, size_t len, + gtm_thread *tx = gtm_thr()) { - gtm_thread *tx = gtm_thr(); gtm_word v = tx->shared_state.load(memory_order_relaxed); if (unlikely(!gl_mg::is_locked(v))) { @@ -104,16 +102,27 @@ protected: tx->restart(RESTART_VALIDATE_WRITE); // CAS global orec from our snapshot time to the locked state. - // We need acq_rel memory order here to synchronize with other loads - // and modifications of orec. + // We need acquire memory order here to synchronize with other + // (ownership) releases of the orec. We do not need acq_rel order + // because whenever another thread reads from this CAS' + // modification, then it will abort anyway and does not rely on + // any further happens-before relation to be established. + // Also note that unlike in ml_wt's increase of the global time + // base (remember that the global orec is used as time base), we do + // not need require memory order here because we do not need to make + // prior orec acquisitions visible to other threads that try to + // extend their snapshot time. if (!o_gl_mg.orec.compare_exchange_strong (now, gl_mg::set_locked(now), - memory_order_acq_rel)) + memory_order_acquire)) tx->restart(RESTART_LOCKED_WRITE); // We use an explicit fence here to avoid having to use release // memory order for all subsequent data stores. This fence will // synchronize with loads of the data with acquire memory order. See // validate() for why this is necessary. + // Adding require memory order to the prior CAS is not sufficient, + // at least according to the Batty et al. formalization of the + // memory model. atomic_thread_fence(memory_order_release); // Set shared_state to new value. @@ -123,7 +132,7 @@ protected: tx->undolog.log(addr, len); } - static void validate() + static void validate(gtm_thread *tx = gtm_thr()) { // Check that snapshot is consistent. We expect the previous data load to // have acquire memory order, or be atomic and followed by an acquire @@ -137,7 +146,6 @@ protected: // or read an orec value that was written after the data had been written. // Either will allow us to detect inconsistent reads because it will have // a higher/different value. - gtm_thread *tx = gtm_thr(); gtm_word l = o_gl_mg.orec.load(memory_order_relaxed); if (l != tx->shared_state.load(memory_order_relaxed)) tx->restart(RESTART_VALIDATE_READ); @@ -198,9 +206,13 @@ public: static void memtransfer_static(void *dst, const void* src, size_t size, bool may_overlap, ls_modifier dst_mod, ls_modifier src_mod) { - if ((dst_mod != WaW && src_mod != RaW) - && (dst_mod != NONTXNAL || src_mod == RfW)) - pre_write(dst, size); + gtm_thread *tx = gtm_thr(); + if (dst_mod != WaW && dst_mod != NONTXNAL) + pre_write(dst, size, tx); + // We need at least undo-logging for an RfW src region because we might + // subsequently write there with WaW. + if (src_mod == RfW) + pre_write(src, size, tx); // FIXME We should use atomics here (see store()). Let's just hope that // memcpy/memmove are good enough. @@ -211,7 +223,7 @@ public: if (src_mod != RfW && src_mod != RaW && src_mod != NONTXNAL && dst_mod != WaW) - validate(); + validate(tx); } static void memset_static(void *dst, int c, size_t size, ls_modifier mod) @@ -269,15 +281,6 @@ public: gtm_thread* tx = gtm_thr(); gtm_word v = tx->shared_state.load(memory_order_relaxed); - // Special case: If shared_state is ~0, then we have acquired the - // serial lock (tx->state is not updated yet). In this case, the previous - // value isn't available anymore, so grab it from the global lock, which - // must have a meaningful value because no other transactions are active - // anymore. In particular, if it is locked, then we are an update - // transaction, which is all we care about for commit. - if (v == ~(typeof v)0) - v = o_gl_mg.orec.load(memory_order_relaxed); - // Release the orec but do not reset shared_state, which will be modified // by the serial lock right after our commit anyway. Also, resetting // shared state here would interfere with the serial lock's use of this @@ -305,40 +308,32 @@ public: gtm_thread *tx = gtm_thr(); gtm_word v = tx->shared_state.load(memory_order_relaxed); - // Special case: If shared_state is ~0, then we have acquired the - // serial lock (tx->state is not updated yet). In this case, the previous - // value isn't available anymore, so grab it from the global lock, which - // must have a meaningful value because no other transactions are active - // anymore. In particular, if it is locked, then we are an update - // transaction, which is all we care about for rollback. - bool is_serial = v == ~(typeof v)0; - if (is_serial) - v = o_gl_mg.orec.load(memory_order_relaxed); // Release lock and increment version number to prevent dirty reads. // Also reset shared state here, so that begin_or_restart() can expect a // value that is correct wrt. privatization safety. if (gl_mg::is_locked(v)) { - // Release the global orec, increasing its version number / timestamp. - // See begin_or_restart() for why we need release memory order here. + // With our rollback, global time increases. v = gl_mg::clear_locked(v) + 1; - o_gl_mg.orec.store(v, memory_order_release); - // Also reset the timestamp published via shared_state. - // Special case: Only do this if we are not a serial transaction - // because otherwise, we would interfere with the serial lock. - if (!is_serial) - tx->shared_state.store(v, memory_order_release); - - // We need a store-load barrier after this store to prevent it - // from becoming visible after later data loads because the - // previous value of shared_state has been higher than the actual - // snapshot time (the lock bit had been set), which could break - // privatization safety. We do not need a barrier before this - // store (see pre_write() for an explanation). - // ??? What is the precise reasoning in the C++11 model? - atomic_thread_fence(memory_order_seq_cst); + // First reset the timestamp published via shared_state. Release + // memory order will make this happen after undoing prior data writes. + // This must also happen before we actually release the global orec + // next, so that future update transactions in other threads observe + // a meaningful snapshot time for our transaction; otherwise, they + // could read a shared_store value with the LOCK_BIT set, which can + // break privatization safety because it's larger than the actual + // snapshot time. Note that we only need to consider other update + // transactions because only those will potentially privatize data. + tx->shared_state.store(v, memory_order_release); + + // Release the global orec, increasing its version number / timestamp. + // See begin_or_restart() for why we need release memory order here, + // and we also need it to make future update transactions read the + // prior update to shared_state too (update transactions acquire the + // global orec with acquire memory order). + o_gl_mg.orec.store(v, memory_order_release); } } diff --git a/libitm/retry.cc b/libitm/retry.cc index d59c1834ef0..2c1483eae5a 100644 --- a/libitm/retry.cc +++ b/libitm/retry.cc @@ -27,8 +27,16 @@ #include <ctype.h> #include "libitm_i.h" -// The default TM method used when starting a new transaction. -static GTM::abi_dispatch* default_dispatch = 0; +// The default TM method used when starting a new transaction. Initialized +// in number_of_threads_changed() below. +// Access to this variable is always synchronized with help of the serial +// lock, except one read access that happens in decide_begin_dispatch() before +// a transaction has become active (by acquiring the serial lock in read or +// write mode). The default_dispatch is only changed and initialized in +// serial mode. Transactions stay active when they restart (see beginend.cc), +// thus decide_retry_strategy() can expect default_dispatch to be unmodified. +// See decide_begin_dispatch() for further comments. +static std::atomic<GTM::abi_dispatch*> default_dispatch; // The default TM method as requested by the user, if any. static GTM::abi_dispatch* default_dispatch_user = 0; @@ -57,20 +65,24 @@ GTM::gtm_thread::decide_retry_strategy (gtm_restart_reason r) // given that re-inits should be very infrequent. serial_lock.read_unlock(this); serial_lock.write_lock(); - if (disp->get_method_group() == default_dispatch->get_method_group()) + if (disp->get_method_group() + == default_dispatch.load(memory_order_relaxed) + ->get_method_group()) // Still the same method group. disp->get_method_group()->reinit(); serial_lock.write_unlock(); - serial_lock.read_lock(this); - if (disp->get_method_group() != default_dispatch->get_method_group()) - { - disp = default_dispatch; - set_abi_disp(disp); - } + // Also, we're making the transaction inactive, so when we become + // active again, some other thread might have changed the default + // dispatch, so we run the same code as for the first execution + // attempt. + disp = decide_begin_dispatch(prop); + set_abi_disp(disp); } else // We are a serial transaction already, which makes things simple. disp->get_method_group()->reinit(); + + return; } bool retry_irr = (r == RESTART_SERIAL_IRR); @@ -124,48 +136,89 @@ GTM::gtm_thread::decide_retry_strategy (gtm_restart_reason r) // Decides which TM method should be used on the first attempt to run this -// transaction. +// transaction. Acquires the serial lock and sets transaction state +// according to the chosen TM method. GTM::abi_dispatch* GTM::gtm_thread::decide_begin_dispatch (uint32_t prop) { + abi_dispatch* dd; // TODO Pay more attention to prop flags (eg, *omitted) when selecting // dispatch. + // ??? We go irrevocable eagerly here, which is not always good for + // performance. Don't do this? if ((prop & pr_doesGoIrrevocable) || !(prop & pr_instrumentedCode)) - return dispatch_serialirr(); - - // If we might need closed nesting and the default dispatch has an - // alternative that supports closed nesting, use it. - // ??? We could choose another TM method that we know supports closed - // nesting but isn't the default (e.g., dispatch_serial()). However, we - // assume that aborts that need closed nesting are infrequent, so don't - // choose a non-default method until we have to actually restart the - // transaction. - if (!(prop & pr_hasNoAbort) && !default_dispatch->closed_nesting() - && default_dispatch->closed_nesting_alternative()) - return default_dispatch->closed_nesting_alternative(); - - // No special case, just use the default dispatch. - return default_dispatch; + dd = dispatch_serialirr(); + + else + { + // Load the default dispatch. We're not an active transaction and so it + // can change concurrently but will still be some valid dispatch. + // Relaxed memory order is okay because we expect each dispatch to be + // constructed properly already (at least that its closed_nesting() and + // closed_nesting_alternatives() will return sensible values). It is + // harmless if we incorrectly chose the serial or serialirr methods, and + // for all other methods we will acquire the serial lock in read mode + // and load the default dispatch again. + abi_dispatch* dd_orig = default_dispatch.load(memory_order_relaxed); + dd = dd_orig; + + // If we might need closed nesting and the default dispatch has an + // alternative that supports closed nesting, use it. + // ??? We could choose another TM method that we know supports closed + // nesting but isn't the default (e.g., dispatch_serial()). However, we + // assume that aborts that need closed nesting are infrequent, so don't + // choose a non-default method until we have to actually restart the + // transaction. + if (!(prop & pr_hasNoAbort) && !dd->closed_nesting() + && dd->closed_nesting_alternative()) + dd = dd->closed_nesting_alternative(); + + if (dd != dispatch_serial() && dd != dispatch_serialirr()) + { + // The current dispatch is supposedly a non-serial one. Become an + // active transaction and verify this. Relaxed memory order is fine + // because the serial lock itself will have established + // happens-before for any change to the selected dispatch. + serial_lock.read_lock (this); + if (default_dispatch.load(memory_order_relaxed) == dd_orig) + return dd; + + // If we raced with a concurrent modification of default_dispatch, + // just fall back to serialirr. The dispatch choice might not be + // up-to-date anymore, but this is harmless. + serial_lock.read_unlock (this); + dd = dispatch_serialirr(); + } + } + + // We are some kind of serial transaction. + serial_lock.write_lock(); + if (dd == dispatch_serialirr()) + state = STATE_SERIAL | STATE_IRREVOCABLE; + else + state = STATE_SERIAL; + return dd; } void GTM::gtm_thread::set_default_dispatch(GTM::abi_dispatch* disp) { - if (default_dispatch == disp) + abi_dispatch* dd = default_dispatch.load(memory_order_relaxed); + if (dd == disp) return; - if (default_dispatch) + if (dd) { // If we are switching method groups, initialize and shut down properly. - if (default_dispatch->get_method_group() != disp->get_method_group()) + if (dd->get_method_group() != disp->get_method_group()) { - default_dispatch->get_method_group()->fini(); + dd->get_method_group()->fini(); disp->get_method_group()->init(); } } else disp->get_method_group()->init(); - default_dispatch = disp; + default_dispatch.store(disp, memory_order_relaxed); } @@ -233,6 +286,7 @@ GTM::gtm_thread::number_of_threads_changed(unsigned previous, unsigned now) { initialized = true; // Check for user preferences here. + default_dispatch = 0; default_dispatch_user = parse_default_method(); } } diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 34fd1410cd7..eee0392bd96 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,10 +1,87 @@ 2012-02-17 Benjamin Kosnik <bkoz@redhat.com> + PR libstdc++/50349 + * config/abi/pre/gnu.ver: Only one local. + * config/abi/pre/gnu-versioned-namespace.ver: Same. + +2012-02-21 Paolo Carlini <paolo.carlini@oracle.com> + + PR libstdc++/52317 (cont) + * include/profile/unordered_map: Ad Library Exception comment. + * include/profile/set: Likewise. + * include/profile/base.h: Likewise. + * include/profile/impl/profiler_list_to_slist.h: Likewise. + * include/profile/impl/profiler_container_size.h: Likewise. + * include/profile/impl/profiler_vector_size.h: Likewise. + * include/profile/impl/profiler_hash_func.h: Likewise. + * include/profile/impl/profiler_trace.h: Likewise. + * include/profile/impl/profiler_list_to_vector.h: Likewise. + * include/profile/impl/profiler_vector_to_list.h: Likewise. + * include/profile/impl/profiler.h: Likewise. + * include/profile/impl/profiler_state.h: Likewise. + * include/profile/impl/profiler_map_to_unordered_map.h: Likewise. + * include/profile/impl/profiler_algos.h: Likewise. + * include/profile/impl/profiler_hashtable_size.h: Likewise. + * include/profile/impl/profiler_node.h: Likewise. + * include/profile/vector: Likewise. + * include/profile/unordered_set: Likewise. + * include/profile/map.h: Likewise. + * include/profile/map: Likewise. + +2012-02-21 Paolo Carlini <paolo.carlini@oracle.com> + + PR libstdc++/52317 + * python/Makefile.am: Update boilerplate license text to GPLv3. + * include/profile/unordered_map: Likewise. + * include/profile/set: Likewise. + * include/profile/base.h: Likewise. + * include/profile/impl/profiler_list_to_slist.h: Likewise. + * include/profile/impl/profiler_container_size.h: Likewise. + * include/profile/impl/profiler_vector_size.h: Likewise. + * include/profile/impl/profiler_hash_func.h: Likewise. + * include/profile/impl/profiler_trace.h: Likewise. + * include/profile/impl/profiler_list_to_vector.h: Likewise. + * include/profile/impl/profiler_vector_to_list.h: Likewise. + * include/profile/impl/profiler.h: Likewise. + * include/profile/impl/profiler_state.h: Likewise. + * include/profile/impl/profiler_map_to_unordered_map.h: Likewise. + * include/profile/impl/profiler_algos.h: Likewise. + * include/profile/impl/profiler_hashtable_size.h: Likewise. + * include/profile/impl/profiler_node.h: Likewise. + * include/profile/vector: Likewise. + * include/profile/unordered_set: Likewise. + * include/profile/map.h: Likewise. + * include/profile/map: Likewise. + * testsuite/21_strings/basic_string/numeric_conversions/ + wchar_t/dr1261.cc: Likewise. + * testsuite/21_strings/basic_string/numeric_conversions/ + char/dr1261.cc: Likewise. + * testsuite/20_util/reference_wrapper/invoke-2.cc: Likewise. + +2012-02-20 Paolo Carlini <paolo.carlini@oracle.com> + + PR libstdc++/52241 + * src/c++98/tree.cc (local_Rb_tree_increment, + local_Rb_tree_decrement): Add. + (_Rb_tree_increment(const _Rb_tree_node_base*), + _Rb_tree_decrement(const _Rb_tree_node_base*)): Use the latter. + (_Rb_tree_increment(_Rb_tree_node_base*), + _Rb_tree_decrement(_Rb_tree_node_base*)): New. + +2012-02-20 Paolo Carlini <paolo.carlini@oracle.com> + + PR libstdc++/52309 + * include/bits/hashtable_policy.h (_Equality_base<, true,>:: + _M_equal(const _Hashtable&)): Compare values with operator==. + * testsuite/23_containers/unordered_set/operators/52309.cc: New. + +2012-02-17 Benjamin Kosnik <bkoz@redhat.com> + PR libstdc++/51798 continued. * acinclude.m4 (GLIBCXX_ENABLE_ATOMIC_BUILTINS): Grep for __atomic_, not __sync. * configure: Regenerated. - + 2012-02-17 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/47058 diff --git a/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver b/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver index 2bd23cd1bea..e7e91624759 100644 --- a/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver +++ b/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver @@ -312,15 +312,12 @@ CXXABI_2.0 { _ZTVN10__cxxabiv120__si_class_type_infoE; _ZTVN10__cxxabiv121__vmi_class_type_infoE; - local: - *; }; # Symbols in the support library (libsupc++) supporting trans-mem. CXXABI_TM_1 { + global: __cxa_tm_cleanup; - local: - *; }; diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver index 41d38a7a376..9657024e3f0 100644 --- a/libstdc++-v3/config/abi/pre/gnu.ver +++ b/libstdc++-v3/config/abi/pre/gnu.ver @@ -1421,8 +1421,6 @@ CXXABI_1.3 { # __gnu_cxx::_verbose_terminate_handler() _ZN9__gnu_cxx27__verbose_terminate_handlerEv; - local: - *; }; CXXABI_1.3.1 { @@ -1471,15 +1469,6 @@ CXXABI_1.3.3 { } CXXABI_1.3.2; -# Symbols in the support library (libsupc++) supporting trans-mem. -CXXABI_TM_1 { - global: - __cxa_tm_cleanup; - - local: - *; -}; - CXXABI_1.3.4 { # typeinfo for decimal floating point types @@ -1521,3 +1510,12 @@ CXXABI_1.3.6 { __cxa_deleted_virtual; } CXXABI_1.3.5; + + +# Symbols in the support library (libsupc++) supporting transactional memory. +CXXABI_TM_1 { + + global: + __cxa_tm_cleanup; + +};
\ No newline at end of file diff --git a/libstdc++-v3/include/bits/hashtable_policy.h b/libstdc++-v3/include/bits/hashtable_policy.h index a06f6e316bc..b585d23a970 100644 --- a/libstdc++-v3/include/bits/hashtable_policy.h +++ b/libstdc++-v3/include/bits/hashtable_policy.h @@ -1113,7 +1113,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION for (auto __itx = __this->begin(); __itx != __this->end(); ++__itx) { const auto __ity = __other.find(_ExtractKey()(*__itx)); - if (__ity == __other.end() || *__ity != *__itx) + if (__ity == __other.end() || !bool(*__ity == *__itx)) return false; } return true; @@ -1151,7 +1151,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION for (_Uiterator __it1 = __first1; __it1 != __last1; ++__it1) { _Uiterator __tmp = __first1; - while (__tmp != __it1 && !(*__tmp == *__it1)) + while (__tmp != __it1 && !bool(*__tmp == *__it1)) ++__tmp; // We've seen this one before. diff --git a/libstdc++-v3/include/profile/base.h b/libstdc++-v3/include/profile/base.h index ef17443b37e..fd3e431df08 100644 --- a/libstdc++-v3/include/profile/base.h +++ b/libstdc++-v3/include/profile/base.h @@ -3,30 +3,23 @@ // Copyright (C) 2009, 2010 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 2, 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 COPYING. If not, write to -// the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -// MA 02111-1307, USA. - -// As a special exception, you may use this file as part of a free -// software library without restriction. Specifically, if other files -// instantiate templates or use macros or inline functions from this -// file, or you compile this file and link it with other files to -// produce an executable, this file does not by itself cause the -// resulting executable to be covered by the GNU General Public -// License. This exception does not however invalidate any other -// reasons why the executable file might be covered by the GNU General -// Public License. +// 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. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// 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/>. /** @file profile/base.h * @brief Sequential helper functions. diff --git a/libstdc++-v3/include/profile/impl/profiler.h b/libstdc++-v3/include/profile/impl/profiler.h index ab9cd903030..49785bbee8f 100644 --- a/libstdc++-v3/include/profile/impl/profiler.h +++ b/libstdc++-v3/include/profile/impl/profiler.h @@ -3,30 +3,23 @@ // Copyright (C) 2009, 2010 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 2, 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. +// 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 COPYING. If not, write to -// the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -// MA 02111-1307, USA. +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. -// As a special exception, you may use this file as part of a free -// software library without restriction. Specifically, if other files -// instantiate templates or use macros or inline functions from this -// file, or you compile this file and link it with other files to -// produce an executable, this file does not by itself cause the -// resulting executable to be covered by the GNU General Public -// License. This exception does not however invalidate any other -// reasons why the executable file might be covered by the GNU General -// Public License. +// 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/>. /** @file profile/impl/profiler.h * @brief Interface of the profiling runtime library. diff --git a/libstdc++-v3/include/profile/impl/profiler_algos.h b/libstdc++-v3/include/profile/impl/profiler_algos.h index d4de43e9ee0..977afaa800c 100644 --- a/libstdc++-v3/include/profile/impl/profiler_algos.h +++ b/libstdc++-v3/include/profile/impl/profiler_algos.h @@ -3,30 +3,23 @@ // Copyright (C) 2010 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 2, 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. +// 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 COPYING. If not, write to -// the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -// MA 02111-1307, USA. +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. -// As a special exception, you may use this file as part of a free -// software library without restriction. Specifically, if other files -// instantiate templates or use macros or inline functions from this -// file, or you compile this file and link it with other files to -// produce an executable, this file does not by itself cause the -// resulting executable to be covered by the GNU General Public -// License. This exception does not however invalidate any other -// reasons why the executable file might be covered by the GNU General -// Public License. +// 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/>. /** @file profile/impl/profiler_algos.h * @brief Algorithms used by the profile extension. diff --git a/libstdc++-v3/include/profile/impl/profiler_container_size.h b/libstdc++-v3/include/profile/impl/profiler_container_size.h index 12cee549695..26b2c72c2e5 100644 --- a/libstdc++-v3/include/profile/impl/profiler_container_size.h +++ b/libstdc++-v3/include/profile/impl/profiler_container_size.h @@ -3,30 +3,23 @@ // Copyright (C) 2009, 2010, 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 2, 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 COPYING. If not, write to -// the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -// MA 02111-1307, USA. - -// As a special exception, you may use this file as part of a free -// software library without restriction. Specifically, if other files -// instantiate templates or use macros or inline functions from this -// file, or you compile this file and link it with other files to -// produce an executable, this file does not by itself cause the -// resulting executable to be covered by the GNU General Public -// License. This exception does not however invalidate any other -// reasons why the executable file might be covered by the GNU General -// Public License. +// 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. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// 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/>. /** @file profile/impl/profiler_container_size.h * @brief Diagnostics for container sizes. diff --git a/libstdc++-v3/include/profile/impl/profiler_hash_func.h b/libstdc++-v3/include/profile/impl/profiler_hash_func.h index 9f6c6416992..7ff11cd03b9 100644 --- a/libstdc++-v3/include/profile/impl/profiler_hash_func.h +++ b/libstdc++-v3/include/profile/impl/profiler_hash_func.h @@ -3,30 +3,23 @@ // Copyright (C) 2009, 2010, 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 2, 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 COPYING. If not, write to -// the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -// MA 02111-1307, USA. - -// As a special exception, you may use this file as part of a free -// software library without restriction. Specifically, if other files -// instantiate templates or use macros or inline functions from this -// file, or you compile this file and link it with other files to -// produce an executable, this file does not by itself cause the -// resulting executable to be covered by the GNU General Public -// License. This exception does not however invalidate any other -// reasons why the executable file might be covered by the GNU General -// Public License. +// 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. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// 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/>. /** @file profile/impl/profiler_hash_func.h * @brief Data structures to represent profiling traces. diff --git a/libstdc++-v3/include/profile/impl/profiler_hashtable_size.h b/libstdc++-v3/include/profile/impl/profiler_hashtable_size.h index 9d5cbc793ef..8557a607316 100644 --- a/libstdc++-v3/include/profile/impl/profiler_hashtable_size.h +++ b/libstdc++-v3/include/profile/impl/profiler_hashtable_size.h @@ -3,30 +3,23 @@ // Copyright (C) 2009, 2010 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 2, 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 COPYING. If not, write to -// the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -// MA 02111-1307, USA. - -// As a special exception, you may use this file as part of a free -// software library without restriction. Specifically, if other files -// instantiate templates or use macros or inline functions from this -// file, or you compile this file and link it with other files to -// produce an executable, this file does not by itself cause the -// resulting executable to be covered by the GNU General Public -// License. This exception does not however invalidate any other -// reasons why the executable file might be covered by the GNU General -// Public License. +// 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. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// 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/>. /** @file profile/impl/profiler_hashtable_size.h * @brief Collection of hashtable size traces. diff --git a/libstdc++-v3/include/profile/impl/profiler_list_to_slist.h b/libstdc++-v3/include/profile/impl/profiler_list_to_slist.h index 299a17d5af6..2195ccf90d9 100644 --- a/libstdc++-v3/include/profile/impl/profiler_list_to_slist.h +++ b/libstdc++-v3/include/profile/impl/profiler_list_to_slist.h @@ -3,30 +3,23 @@ // Copyright (C) 2009, 2010 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 2, 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 COPYING. If not, write to -// the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -// MA 02111-1307, USA. - -// As a special exception, you may use this file as part of a free -// software library without restriction. Specifically, if other files -// instantiate templates or use macros or inline functions from this -// file, or you compile this file and link it with other files to -// produce an executable, this file does not by itself cause the -// resulting executable to be covered by the GNU General Public -// License. This exception does not however invalidate any other -// reasons why the executable file might be covered by the GNU General -// Public License. +// 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. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// 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/>. /** @file profile/impl/profiler_list_to_slist.h * @brief Diagnostics for list to slist. diff --git a/libstdc++-v3/include/profile/impl/profiler_list_to_vector.h b/libstdc++-v3/include/profile/impl/profiler_list_to_vector.h index df03267bd44..b3840a747cf 100644 --- a/libstdc++-v3/include/profile/impl/profiler_list_to_vector.h +++ b/libstdc++-v3/include/profile/impl/profiler_list_to_vector.h @@ -3,30 +3,23 @@ // Copyright (C) 2009, 2010 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 2, 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 COPYING. If not, write to -// the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -// MA 02111-1307, USA. - -// As a special exception, you may use this file as part of a free -// software library without restriction. Specifically, if other files -// instantiate templates or use macros or inline functions from this -// file, or you compile this file and link it with other files to -// produce an executable, this file does not by itself cause the -// resulting executable to be covered by the GNU General Public -// License. This exception does not however invalidate any other -// reasons why the executable file might be covered by the GNU General -// Public License. +// 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. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// 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/>. /** @file profile/impl/profiler_list_to_vector.h * @brief diagnostics for list to vector. diff --git a/libstdc++-v3/include/profile/impl/profiler_map_to_unordered_map.h b/libstdc++-v3/include/profile/impl/profiler_map_to_unordered_map.h index cc7c849a422..e232effe840 100644 --- a/libstdc++-v3/include/profile/impl/profiler_map_to_unordered_map.h +++ b/libstdc++-v3/include/profile/impl/profiler_map_to_unordered_map.h @@ -3,30 +3,23 @@ // Copyright (C) 2009, 2010 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 2, 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 COPYING. If not, write to -// the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -// MA 02111-1307, USA. - -// As a special exception, you may use this file as part of a free -// software library without restriction. Specifically, if other files -// instantiate templates or use macros or inline functions from this -// file, or you compile this file and link it with other files to -// produce an executable, this file does not by itself cause the -// resulting executable to be covered by the GNU General Public -// License. This exception does not however invalidate any other -// reasons why the executable file might be covered by the GNU General -// Public License. +// 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. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// 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/>. /** @file profile/impl/profiler_map_to_unordered_map.h * @brief Diagnostics for map to unordered_map. diff --git a/libstdc++-v3/include/profile/impl/profiler_node.h b/libstdc++-v3/include/profile/impl/profiler_node.h index dfaff8c6b6f..efdfe146787 100644 --- a/libstdc++-v3/include/profile/impl/profiler_node.h +++ b/libstdc++-v3/include/profile/impl/profiler_node.h @@ -3,30 +3,23 @@ // Copyright (C) 2009, 2010, 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 2, 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 COPYING. If not, write to -// the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -// MA 02111-1307, USA. - -// As a special exception, you may use this file as part of a free -// software library without restriction. Specifically, if other files -// instantiate templates or use macros or inline functions from this -// file, or you compile this file and link it with other files to -// produce an executable, this file does not by itself cause the -// resulting executable to be covered by the GNU General Public -// License. This exception does not however invalidate any other -// reasons why the executable file might be covered by the GNU General -// Public License. +// 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. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// 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/>. /** @file profile/impl/profiler_node.h * @brief Data structures to represent a single profiling event. diff --git a/libstdc++-v3/include/profile/impl/profiler_state.h b/libstdc++-v3/include/profile/impl/profiler_state.h index d48801ab561..b0f5f8b275b 100644 --- a/libstdc++-v3/include/profile/impl/profiler_state.h +++ b/libstdc++-v3/include/profile/impl/profiler_state.h @@ -3,30 +3,23 @@ // Copyright (C) 2009, 2010, 2012 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 2, 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. +// 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 COPYING. If not, write to -// the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -// MA 02111-1307, USA. +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. -// As a special exception, you may use this file as part of a free -// software library without restriction. Specifically, if other files -// instantiate templates or use macros or inline functions from this -// file, or you compile this file and link it with other files to -// produce an executable, this file does not by itself cause the -// resulting executable to be covered by the GNU General Public -// License. This exception does not however invalidate any other -// reasons why the executable file might be covered by the GNU General -// Public License. +// 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/>. /** @file profile/impl/profiler_state.h * @brief Global profiler state. diff --git a/libstdc++-v3/include/profile/impl/profiler_trace.h b/libstdc++-v3/include/profile/impl/profiler_trace.h index 1e0054208ca..dadc5cac5e7 100644 --- a/libstdc++-v3/include/profile/impl/profiler_trace.h +++ b/libstdc++-v3/include/profile/impl/profiler_trace.h @@ -3,30 +3,23 @@ // Copyright (C) 2009, 2010 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 2, 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 COPYING. If not, write to -// the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -// MA 02111-1307, USA. - -// As a special exception, you may use this file as part of a free -// software library without restriction. Specifically, if other files -// instantiate templates or use macros or inline functions from this -// file, or you compile this file and link it with other files to -// produce an executable, this file does not by itself cause the -// resulting executable to be covered by the GNU General Public -// License. This exception does not however invalidate any other -// reasons why the executable file might be covered by the GNU General -// Public License. +// 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. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// 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/>. /** @file profile/impl/profiler_trace.h * @brief Data structures to represent profiling traces. diff --git a/libstdc++-v3/include/profile/impl/profiler_vector_size.h b/libstdc++-v3/include/profile/impl/profiler_vector_size.h index 0af384f4ecb..604984577e4 100644 --- a/libstdc++-v3/include/profile/impl/profiler_vector_size.h +++ b/libstdc++-v3/include/profile/impl/profiler_vector_size.h @@ -3,30 +3,23 @@ // Copyright (C) 2009, 2010 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 2, 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 COPYING. If not, write to -// the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -// MA 02111-1307, USA. - -// As a special exception, you may use this file as part of a free -// software library without restriction. Specifically, if other files -// instantiate templates or use macros or inline functions from this -// file, or you compile this file and link it with other files to -// produce an executable, this file does not by itself cause the -// resulting executable to be covered by the GNU General Public -// License. This exception does not however invalidate any other -// reasons why the executable file might be covered by the GNU General -// Public License. +// 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. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// 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/>. /** @file profile/impl/profiler_vector_size.h * @brief Collection of vector size traces. diff --git a/libstdc++-v3/include/profile/impl/profiler_vector_to_list.h b/libstdc++-v3/include/profile/impl/profiler_vector_to_list.h index 91963139bd8..7387ab6145d 100644 --- a/libstdc++-v3/include/profile/impl/profiler_vector_to_list.h +++ b/libstdc++-v3/include/profile/impl/profiler_vector_to_list.h @@ -3,30 +3,23 @@ // Copyright (C) 2009, 2010 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 2, 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 COPYING. If not, write to -// the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -// MA 02111-1307, USA. - -// As a special exception, you may use this file as part of a free -// software library without restriction. Specifically, if other files -// instantiate templates or use macros or inline functions from this -// file, or you compile this file and link it with other files to -// produce an executable, this file does not by itself cause the -// resulting executable to be covered by the GNU General Public -// License. This exception does not however invalidate any other -// reasons why the executable file might be covered by the GNU General -// Public License. +// 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. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// 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/>. /** @file profile/impl/profiler_vector_to_list.h * @brief diagnostics for vector to list. diff --git a/libstdc++-v3/include/profile/map b/libstdc++-v3/include/profile/map index e396b852398..7806b992b59 100644 --- a/libstdc++-v3/include/profile/map +++ b/libstdc++-v3/include/profile/map @@ -5,27 +5,21 @@ // 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 2, or (at your option) +// 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 COPYING. If not, write to the Free -// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -// USA. +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. -// As a special exception, you may use this file as part of a free software -// library without restriction. Specifically, if other files instantiate -// templates or use macros or inline functions from this file, or you compile -// this file and link it with other files to produce an executable, this -// file does not by itself cause the resulting executable to be covered by -// the GNU General Public License. This exception does not however -// invalidate any other reasons why the executable file might be covered by -// the GNU General Public License. +// 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/>. /** @file profile/map * This file is a GNU profile extension to the Standard C++ Library. diff --git a/libstdc++-v3/include/profile/map.h b/libstdc++-v3/include/profile/map.h index eb5c5d90d9c..200da370d73 100644 --- a/libstdc++-v3/include/profile/map.h +++ b/libstdc++-v3/include/profile/map.h @@ -5,27 +5,21 @@ // 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 2, or (at your option) +// 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. +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + // You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -// USA. - -// As a special exception, you may use this file as part of a free software -// library without restriction. Specifically, if other files instantiate -// templates or use macros or inline functions from this file, or you compile -// this file and link it with other files to produce an executable, this -// file does not by itself cause the resulting executable to be covered by -// the GNU General Public License. This exception does not however -// invalidate any other reasons why the executable file might be covered by -// the GNU General Public License. +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. /** @file profile/map.h * This file is a GNU profile extension to the Standard C++ Library. diff --git a/libstdc++-v3/include/profile/set b/libstdc++-v3/include/profile/set index 11603a84858..55ffe74dee5 100644 --- a/libstdc++-v3/include/profile/set +++ b/libstdc++-v3/include/profile/set @@ -5,27 +5,21 @@ // 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 2, or (at your option) +// 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 COPYING. If not, write to the Free -// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -// USA. +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. -// As a special exception, you may use this file as part of a free software -// library without restriction. Specifically, if other files instantiate -// templates or use macros or inline functions from this file, or you compile -// this file and link it with other files to produce an executable, this -// file does not by itself cause the resulting executable to be covered by -// the GNU General Public License. This exception does not however -// invalidate any other reasons why the executable file might be covered by -// the GNU General Public License. +// 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/>. /** @file profile/set * This file is a GNU profile extension to the Standard C++ Library. diff --git a/libstdc++-v3/include/profile/unordered_map b/libstdc++-v3/include/profile/unordered_map index 1d0f0d53064..36f34e0a105 100644 --- a/libstdc++-v3/include/profile/unordered_map +++ b/libstdc++-v3/include/profile/unordered_map @@ -5,27 +5,21 @@ // 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 2, or (at your option) +// 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. +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + // You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -// USA. - -// As a special exception, you may use this file as part of a free software -// library without restriction. Specifically, if other files instantiate -// templates or use macros or inline functions from this file, or you compile -// this file and link it with other files to produce an executable, this -// file does not by itself cause the resulting executable to be covered by -// the GNU General Public License. This exception does not however -// invalidate any other reasons why the executable file might be covered by -// the GNU General Public License. +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. /** @file profile/unordered_map * This file is a GNU profile extension to the Standard C++ Library. diff --git a/libstdc++-v3/include/profile/unordered_set b/libstdc++-v3/include/profile/unordered_set index 7bb10dc45c0..6385605f8ee 100644 --- a/libstdc++-v3/include/profile/unordered_set +++ b/libstdc++-v3/include/profile/unordered_set @@ -5,27 +5,21 @@ // 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 2, or (at your option) +// 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. +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + // You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -// USA. - -// As a special exception, you may use this file as part of a free software -// library without restriction. Specifically, if other files instantiate -// templates or use macros or inline functions from this file, or you compile -// this file and link it with other files to produce an executable, this -// file does not by itself cause the resulting executable to be covered by -// the GNU General Public License. This exception does not however -// invalidate any other reasons why the executable file might be covered by -// the GNU General Public License. +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. /** @file profile/unordered_set * This file is a GNU profile extension to the Standard C++ Library. diff --git a/libstdc++-v3/include/profile/vector b/libstdc++-v3/include/profile/vector index 0526c5aabb7..8a3e681b847 100644 --- a/libstdc++-v3/include/profile/vector +++ b/libstdc++-v3/include/profile/vector @@ -5,27 +5,21 @@ // 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 2, or (at your option) +// 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. +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + // You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -// USA. - -// As a special exception, you may use this file as part of a free software -// library without restriction. Specifically, if other files instantiate -// templates or use macros or inline functions from this file, or you compile -// this file and link it with other files to produce an executable, this -// file does not by itself cause the resulting executable to be covered by -// the GNU General Public License. This exception does not however -// invalidate any other reasons why the executable file might be covered by -// the GNU General Public License. +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. /** @file profile/vector * This file is a GNU profile extension to the Standard C++ Library. diff --git a/libstdc++-v3/python/Makefile.am b/libstdc++-v3/python/Makefile.am index 49d8f86ac23..3626d7a1edb 100644 --- a/libstdc++-v3/python/Makefile.am +++ b/libstdc++-v3/python/Makefile.am @@ -8,18 +8,17 @@ ## 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 2, or (at your option) +## 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 COPYING. If not, write to the Free -## Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -## USA. +## with this library; see the file COPYING3. If not see +## <http://www.gnu.org/licenses/>. include $(top_srcdir)/fragment.am diff --git a/libstdc++-v3/src/c++98/tree.cc b/libstdc++-v3/src/c++98/tree.cc index 0a7f6f9e485..731ce367a92 100644 --- a/libstdc++-v3/src/c++98/tree.cc +++ b/libstdc++-v3/src/c++98/tree.cc @@ -1,6 +1,6 @@ // RB tree utilities implementation -*- C++ -*- -// Copyright (C) 2003, 2005, 2009 Free Software Foundation, Inc. +// Copyright (C) 2003, 2005, 2009, 2012 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 @@ -56,8 +56,8 @@ namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION - _Rb_tree_node_base* - _Rb_tree_increment(_Rb_tree_node_base* __x) throw () + static _Rb_tree_node_base* + local_Rb_tree_increment(_Rb_tree_node_base* __x) throw () { if (__x->_M_right != 0) { @@ -79,14 +79,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __x; } + _Rb_tree_node_base* + _Rb_tree_increment(_Rb_tree_node_base* __x) throw () + { + return local_Rb_tree_increment(__x); + } + const _Rb_tree_node_base* _Rb_tree_increment(const _Rb_tree_node_base* __x) throw () { - return _Rb_tree_increment(const_cast<_Rb_tree_node_base*>(__x)); + return local_Rb_tree_increment(const_cast<_Rb_tree_node_base*>(__x)); } - _Rb_tree_node_base* - _Rb_tree_decrement(_Rb_tree_node_base* __x) throw () + static _Rb_tree_node_base* + local_Rb_tree_decrement(_Rb_tree_node_base* __x) throw () { if (__x->_M_color == _S_red && __x->_M_parent->_M_parent == __x) @@ -111,10 +117,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __x; } + _Rb_tree_node_base* + _Rb_tree_decrement(_Rb_tree_node_base* __x) throw () + { + return local_Rb_tree_decrement(__x); + } + const _Rb_tree_node_base* _Rb_tree_decrement(const _Rb_tree_node_base* __x) throw () { - return _Rb_tree_decrement(const_cast<_Rb_tree_node_base*>(__x)); + return local_Rb_tree_decrement(const_cast<_Rb_tree_node_base*>(__x)); } static void diff --git a/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke-2.cc b/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke-2.cc index 01217a40538..44463a1caf5 100644 --- a/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke-2.cc +++ b/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke-2.cc @@ -5,7 +5,7 @@ // 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 2, or (at your option) +// 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, @@ -14,9 +14,8 @@ // 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 COPYING. If not, write to the Free -// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -// USA. +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. // 20.6.4 function object return types [func.ret] #include <functional> diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/dr1261.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/dr1261.cc index 739ceed3004..2030b7f632d 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/dr1261.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/dr1261.cc @@ -8,18 +8,17 @@ // 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 2, or (at your option) +// 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 COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. #include <string> #include <testsuite_hooks.h> diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/dr1261.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/dr1261.cc index 7d754b30102..e17cc5565b3 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/dr1261.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/dr1261.cc @@ -8,18 +8,17 @@ // 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 2, or (at your option) +// 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 COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. #include <string> #include <testsuite_hooks.h> diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/operators/52309.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/operators/52309.cc new file mode 100644 index 00000000000..5b16f0b3cd9 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/operators/52309.cc @@ -0,0 +1,28 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +// Copyright (C) 2012 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/>. + +#include <unordered_set> + +// libstdc++/52309 +struct value {}; +struct hash { std::size_t operator()(const value&) const; }; +bool operator==(value const&, value const&); +std::unordered_set<value, hash> set; +bool z = (set == set); |