From 8dc9c8d1d98fe6b09f6b54f5f28ba6bab69a6309 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Thu, 27 Oct 2011 21:55:22 +0000 Subject: PR target/50875 * config/i386/sse.md (*avx_unpcklpd256): Remove extra insn constraints. Change alternative 1 to "x,m,1". testsuitee/ChangeLog: PR target/50875 * gfortran.dg/pr50875.f90: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@180582 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/sse.md | 11 +++++----- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gfortran.dg/pr50875.f90 | 39 +++++++++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 6 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/pr50875.f90 diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 492bb204d30..8e6377b392f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-10-27 Uros Bizjak + + PR target/50875 + * config/i386/sse.md (*avx_unpcklpd256): Remove extra insn + constraints. Change alternative 1 to "x,m,1". + 2011-10-26 Jakub Jelinek * BASE-VER: Set to 4.6.3. diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 75364187465..b5b900a02a5 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -4521,15 +4521,14 @@ [(set (match_operand:V4DF 0 "register_operand" "=x,x") (vec_select:V4DF (vec_concat:V8DF - (match_operand:V4DF 1 "nonimmediate_operand" "xm,x") - (match_operand:V4DF 2 "nonimmediate_operand" " 1,xm")) + (match_operand:V4DF 1 "nonimmediate_operand" " x,m") + (match_operand:V4DF 2 "nonimmediate_operand" "xm,1")) (parallel [(const_int 0) (const_int 4) (const_int 2) (const_int 6)])))] - "TARGET_AVX - && (!MEM_P (operands[1]) || rtx_equal_p (operands[1], operands[2]))" + "TARGET_AVX" "@ - vmovddup\t{%1, %0|%0, %1} - vunpcklpd\t{%2, %1, %0|%0, %1, %2}" + vunpcklpd\t{%2, %1, %0|%0, %1, %2} + vmovddup\t{%1, %0|%0, %1}" [(set_attr "type" "sselog") (set_attr "prefix" "vex") (set_attr "mode" "V4DF")]) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5b1ad2cc1b4..797c7c054fa 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2011-10-27 Uros Bizjak + Steven G. Kargl + + PR target/50875 + * gfortran.dg/pr50875.f90: New test. + 2011-10-26 Release Manager * GCC 4.6.2 released. diff --git a/gcc/testsuite/gfortran.dg/pr50875.f90 b/gcc/testsuite/gfortran.dg/pr50875.f90 new file mode 100644 index 00000000000..6b4476c14e4 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr50875.f90 @@ -0,0 +1,39 @@ +! { dg-do compile { target { i?86-*-* x86_64-*-* } } } +! { dg-options "-O3 -mavx" } +! +! PR fortran/50875.f90 + +module test + + implicit none + + integer, parameter :: dp=kind(1.d0) + + integer :: P = 2 + + real(kind=dp), allocatable :: real_array_A(:),real_array_B(:,:) + complex(kind=dp), allocatable :: cmplx_array_A(:) + +contains + + subroutine routine_A + + integer :: i + + allocate(cmplx_array_A(P),real_array_B(P,P),real_array_A(P)) + + real_array_A = 1 + real_array_B = 1 + + do i = 1, p + cmplx_array_A = cmplx(real_array_B(:,i),0.0_dp,dp) + cmplx_array_A = cmplx_array_A * exp(cmplx(0.0_dp,real_array_A+1)) + end do + + deallocate(cmplx_array_A,real_array_B,real_array_A) + + end subroutine routine_A + +end module test + +! { dg-final { cleanup-modules "test" } } -- cgit v1.2.3 From 20ef879576f63398cb01f4eae04c75499a7c87df Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Fri, 28 Oct 2011 00:18:13 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@180587 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 4724836a118..7b927a4ec71 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111027 +20111028 -- cgit v1.2.3 From e53a25110b6b6cca25fb225c8a603cf8a4b18b49 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sat, 29 Oct 2011 00:18:31 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@180645 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 7b927a4ec71..eeccb57920f 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111028 +20111029 -- cgit v1.2.3 From c569203a2c54aac3fde63ee6b579e25046a25f8d Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sat, 29 Oct 2011 20:19:38 +0000 Subject: PR target/50691 * config/pa/pa.c (emit_move_sequence): Legitimize TLS symbol references. * config/pa/pa.h (LEGITIMATE_CONSTANT_P): Return false for TLS_MODEL_GLOBAL_DYNAMIC and TLS_MODEL_LOCAL_DYNAMIC symbol references. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@180662 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/config/pa/pa.c | 5 +++++ gcc/config/pa/pa.h | 3 +++ 3 files changed, 15 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8e6377b392f..296ac8c181e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2011-10-29 John David Anglin + + PR target/50691 + * config/pa/pa.c (emit_move_sequence): Legitimize TLS symbol references. + * config/pa/pa.h (LEGITIMATE_CONSTANT_P): Return false for + TLS_MODEL_GLOBAL_DYNAMIC and TLS_MODEL_LOCAL_DYNAMIC symbol references. + 2011-10-27 Uros Bizjak PR target/50875 diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 8a691c777f8..d5780e5e678 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -1863,6 +1863,11 @@ emit_move_sequence (rtx *operands, enum machine_mode mode, rtx scratch_reg) /* Handle the most common case: storing into a register. */ else if (register_operand (operand0, mode)) { + /* Legitimize TLS symbol references. This happens for references + that aren't a legitimate constant. */ + if (PA_SYMBOL_REF_TLS_P (operand1)) + operand1 = legitimize_tls_address (operand1); + if (register_operand (operand1, mode) || (GET_CODE (operand1) == CONST_INT && cint_ok_for_move (INTVAL (operand1))) diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index 41af1f12f6e..012186854de 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -848,6 +848,9 @@ extern int may_call_alloca; && (NEW_HP_ASSEMBLER \ || TARGET_GAS \ || GET_CODE (X) != LABEL_REF) \ + && (!PA_SYMBOL_REF_TLS_P (X) \ + || (SYMBOL_REF_TLS_MODEL (X) != TLS_MODEL_GLOBAL_DYNAMIC \ + && SYMBOL_REF_TLS_MODEL (X) != TLS_MODEL_LOCAL_DYNAMIC)) \ && (!TARGET_64BIT \ || GET_CODE (X) != CONST_DOUBLE) \ && (!TARGET_64BIT \ -- cgit v1.2.3 From 566f5011b5970f23c868f25a132272991cbfe367 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sat, 29 Oct 2011 20:23:00 +0000 Subject: PR target/50617 * config/pa/pa-protos.h (output_bb): Rename to pa_output_bb. * config/pa/pa.md: Likewise. * config/pa/pa.c: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@180663 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/config/pa/pa-protos.h | 2 +- gcc/config/pa/pa.c | 2 +- gcc/config/pa/pa.md | 16 ++++++++-------- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 296ac8c181e..d3888bda0a3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2011-10-29 John David Anglin + PR target/50617 + * config/pa/pa-protos.h (output_bb): Rename to pa_output_bb. + * config/pa/pa.md: Likewise. + * config/pa/pa.c: Likewise. + PR target/50691 * config/pa/pa.c (emit_move_sequence): Legitimize TLS symbol references. * config/pa/pa.h (LEGITIMATE_CONSTANT_P): Return false for diff --git a/gcc/config/pa/pa-protos.h b/gcc/config/pa/pa-protos.h index dc42e55012f..74fd51d8a5b 100644 --- a/gcc/config/pa/pa-protos.h +++ b/gcc/config/pa/pa-protos.h @@ -40,7 +40,7 @@ extern const char *output_block_move (rtx *, int); extern const char *output_block_clear (rtx *, int); extern const char *output_cbranch (rtx *, int, rtx); extern const char *output_lbranch (rtx, rtx, int); -extern const char *output_bb (rtx *, int, rtx, int); +extern const char *pa_output_bb (rtx *, int, rtx, int); extern const char *output_bvb (rtx *, int, rtx, int); extern const char *output_dbra (rtx *, rtx, int); extern const char *output_movb (rtx *, rtx, int, int); diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index d5780e5e678..91c27bac09b 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -6722,7 +6722,7 @@ output_lbranch (rtx dest, rtx insn, int xdelay) above. it returns the appropriate output template to emit the branch. */ const char * -output_bb (rtx *operands ATTRIBUTE_UNUSED, int negated, rtx insn, int which) +pa_output_bb (rtx *operands ATTRIBUTE_UNUSED, int negated, rtx insn, int which) { static char buf[100]; bool useskip; diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index 1bd9f0b0ab6..e8d5c45c3b5 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -1507,7 +1507,7 @@ "" "* { - return output_bb (operands, 0, insn, 0); + return pa_output_bb (operands, 0, insn, 0); }" [(set_attr "type" "cbranch") (set (attr "length") @@ -1535,7 +1535,7 @@ "TARGET_64BIT" "* { - return output_bb (operands, 0, insn, 0); + return pa_output_bb (operands, 0, insn, 0); }" [(set_attr "type" "cbranch") (set (attr "length") @@ -1563,7 +1563,7 @@ "" "* { - return output_bb (operands, 1, insn, 0); + return pa_output_bb (operands, 1, insn, 0); }" [(set_attr "type" "cbranch") (set (attr "length") @@ -1591,7 +1591,7 @@ "TARGET_64BIT" "* { - return output_bb (operands, 1, insn, 0); + return pa_output_bb (operands, 1, insn, 0); }" [(set_attr "type" "cbranch") (set (attr "length") @@ -1619,7 +1619,7 @@ "" "* { - return output_bb (operands, 0, insn, 1); + return pa_output_bb (operands, 0, insn, 1); }" [(set_attr "type" "cbranch") (set (attr "length") @@ -1647,7 +1647,7 @@ "TARGET_64BIT" "* { - return output_bb (operands, 0, insn, 1); + return pa_output_bb (operands, 0, insn, 1); }" [(set_attr "type" "cbranch") (set (attr "length") @@ -1675,7 +1675,7 @@ "" "* { - return output_bb (operands, 1, insn, 1); + return pa_output_bb (operands, 1, insn, 1); }" [(set_attr "type" "cbranch") (set (attr "length") @@ -1703,7 +1703,7 @@ "TARGET_64BIT" "* { - return output_bb (operands, 1, insn, 1); + return pa_output_bb (operands, 1, insn, 1); }" [(set_attr "type" "cbranch") (set (attr "length") -- cgit v1.2.3 From b5d2de192acb9ff790cf3a18f92885b51c90a4ff Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sat, 29 Oct 2011 21:40:55 +0000 Subject: Revert last change. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@180665 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 ----- gcc/config/pa/pa-protos.h | 2 +- gcc/config/pa/pa.c | 2 +- gcc/config/pa/pa.md | 16 ++++++++-------- 4 files changed, 10 insertions(+), 15 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d3888bda0a3..296ac8c181e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,10 +1,5 @@ 2011-10-29 John David Anglin - PR target/50617 - * config/pa/pa-protos.h (output_bb): Rename to pa_output_bb. - * config/pa/pa.md: Likewise. - * config/pa/pa.c: Likewise. - PR target/50691 * config/pa/pa.c (emit_move_sequence): Legitimize TLS symbol references. * config/pa/pa.h (LEGITIMATE_CONSTANT_P): Return false for diff --git a/gcc/config/pa/pa-protos.h b/gcc/config/pa/pa-protos.h index 74fd51d8a5b..dc42e55012f 100644 --- a/gcc/config/pa/pa-protos.h +++ b/gcc/config/pa/pa-protos.h @@ -40,7 +40,7 @@ extern const char *output_block_move (rtx *, int); extern const char *output_block_clear (rtx *, int); extern const char *output_cbranch (rtx *, int, rtx); extern const char *output_lbranch (rtx, rtx, int); -extern const char *pa_output_bb (rtx *, int, rtx, int); +extern const char *output_bb (rtx *, int, rtx, int); extern const char *output_bvb (rtx *, int, rtx, int); extern const char *output_dbra (rtx *, rtx, int); extern const char *output_movb (rtx *, rtx, int, int); diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 91c27bac09b..d5780e5e678 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -6722,7 +6722,7 @@ output_lbranch (rtx dest, rtx insn, int xdelay) above. it returns the appropriate output template to emit the branch. */ const char * -pa_output_bb (rtx *operands ATTRIBUTE_UNUSED, int negated, rtx insn, int which) +output_bb (rtx *operands ATTRIBUTE_UNUSED, int negated, rtx insn, int which) { static char buf[100]; bool useskip; diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index e8d5c45c3b5..1bd9f0b0ab6 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -1507,7 +1507,7 @@ "" "* { - return pa_output_bb (operands, 0, insn, 0); + return output_bb (operands, 0, insn, 0); }" [(set_attr "type" "cbranch") (set (attr "length") @@ -1535,7 +1535,7 @@ "TARGET_64BIT" "* { - return pa_output_bb (operands, 0, insn, 0); + return output_bb (operands, 0, insn, 0); }" [(set_attr "type" "cbranch") (set (attr "length") @@ -1563,7 +1563,7 @@ "" "* { - return pa_output_bb (operands, 1, insn, 0); + return output_bb (operands, 1, insn, 0); }" [(set_attr "type" "cbranch") (set (attr "length") @@ -1591,7 +1591,7 @@ "TARGET_64BIT" "* { - return pa_output_bb (operands, 1, insn, 0); + return output_bb (operands, 1, insn, 0); }" [(set_attr "type" "cbranch") (set (attr "length") @@ -1619,7 +1619,7 @@ "" "* { - return pa_output_bb (operands, 0, insn, 1); + return output_bb (operands, 0, insn, 1); }" [(set_attr "type" "cbranch") (set (attr "length") @@ -1647,7 +1647,7 @@ "TARGET_64BIT" "* { - return pa_output_bb (operands, 0, insn, 1); + return output_bb (operands, 0, insn, 1); }" [(set_attr "type" "cbranch") (set (attr "length") @@ -1675,7 +1675,7 @@ "" "* { - return pa_output_bb (operands, 1, insn, 1); + return output_bb (operands, 1, insn, 1); }" [(set_attr "type" "cbranch") (set (attr "length") @@ -1703,7 +1703,7 @@ "TARGET_64BIT" "* { - return pa_output_bb (operands, 1, insn, 1); + return output_bb (operands, 1, insn, 1); }" [(set_attr "type" "cbranch") (set (attr "length") -- cgit v1.2.3 From 8357ac5c43aab7fc0ebe5216d535ad4bfed69c9d Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sun, 30 Oct 2011 00:17:27 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@180668 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index eeccb57920f..52e545030a0 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111029 +20111030 -- cgit v1.2.3 From 4f7d7d1b8db8a3d6e6e3b0045387590dbef392d8 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Sun, 30 Oct 2011 00:24:51 +0000 Subject: /cp 2011-10-29 Paolo Carlini PR c++/50901 * call.c (build_new_op_1): Handle ABS_EXPR together with the other unary EXPR. /testsuite 2011-10-29 Paolo Carlini PR c++/50901 * g++.dg/cpp0x/pr50901.C: New. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@180671 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/call.c | 1 + gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/pr50901.C | 9 +++++++++ 4 files changed, 21 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/pr50901.C diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 36d32c135be..6262513c448 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2011-10-29 Paolo Carlini + + PR c++/50901 + * call.c (build_new_op_1): Handle ABS_EXPR together with the + other unary EXPR. + 2011-10-26 Release Manager * GCC 4.6.2 released. diff --git a/gcc/cp/call.c b/gcc/cp/call.c index c54ce7b65f3..50e5c5aff7b 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -4996,6 +4996,7 @@ build_new_op (enum tree_code code, int flags, tree arg1, tree arg2, tree arg3, case POSTDECREMENT_EXPR: case REALPART_EXPR: case IMAGPART_EXPR: + case ABS_EXPR: return cp_build_unary_op (code, arg1, candidates != 0, complain); case ARRAY_REF: diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 797c7c054fa..2f6d6576a74 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-10-29 Paolo Carlini + + PR c++/50901 + * g++.dg/cpp0x/pr50901.C: New. + 2011-10-27 Uros Bizjak Steven G. Kargl diff --git a/gcc/testsuite/g++.dg/cpp0x/pr50901.C b/gcc/testsuite/g++.dg/cpp0x/pr50901.C new file mode 100644 index 00000000000..439c15cc1cd --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/pr50901.C @@ -0,0 +1,9 @@ +// { dg-options "-std=c++0x" } + +template int foo(int a) +{ + const unsigned b = a < 0 ? -a : a; + return 0; +} + +int i = foo(1); -- cgit v1.2.3 From 023ed3ae1941342b1199199e212ad259fcdcabd0 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sun, 30 Oct 2011 16:29:11 +0000 Subject: * ja.po: Update. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@180683 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/po/ChangeLog | 4 + gcc/po/ja.po | 451 ++++++++++++++++++++++++++----------------------------- 2 files changed, 215 insertions(+), 240 deletions(-) diff --git a/gcc/po/ChangeLog b/gcc/po/ChangeLog index 3415a9ebf2f..942cd2e62c2 100644 --- a/gcc/po/ChangeLog +++ b/gcc/po/ChangeLog @@ -1,3 +1,7 @@ +2011-10-30 Joseph Myers + + * ja.po: Update. + 2011-10-26 Release Manager * GCC 4.6.2 released. diff --git a/gcc/po/ja.po b/gcc/po/ja.po index 2c938d63b90..7fdc2162ca4 100644 --- a/gcc/po/ja.po +++ b/gcc/po/ja.po @@ -20,7 +20,7 @@ msgstr "" "Project-Id-Version: gcc 4.6.1\n" "Report-Msgid-Bugs-To: http://gcc.gnu.org/bugs.html\n" "POT-Creation-Date: 2011-06-21 10:27+0000\n" -"PO-Revision-Date: 2011-10-25 22:36+0900\n" +"PO-Revision-Date: 2011-10-30 18:48+0900\n" "Last-Translator: Yasuaki Taniguchi \n" "Language-Team: Japanese \n" "Language: ja\n" @@ -834,12 +834,12 @@ msgstr " -v, --version バージョン番号を表示して #: gcov.c:420 #, c-format msgid " -a, --all-blocks Show information for every basic block\n" -msgstr "" +msgstr " -a, --all-blocks 各基本ブロックに関する情報を表示する\n" #: gcov.c:421 #, c-format msgid " -b, --branch-probabilities Include branch probabilities in output\n" -msgstr "" +msgstr " -b, --branch-probabilities 出力に分岐可能性情報を含める\n" #: gcov.c:422 #, c-format @@ -847,6 +847,8 @@ msgid "" " -c, --branch-counts Given counts of branches taken\n" " rather than percentages\n" msgstr "" +" -c, --branch-counts 分岐に関する百分率では無く行われた\n" +" 回数を取得する\n" #: gcov.c:424 #, c-format @@ -859,21 +861,23 @@ msgid "" " -l, --long-file-names Use long output file names for included\n" " source files\n" msgstr "" +" -l, --long-file-names インクルードされたソースファイルに関する長い\n" +" 出力ファイル名を使用する\n" #: gcov.c:427 #, c-format msgid " -f, --function-summaries Output summaries for each function\n" -msgstr "" +msgstr " -f, --function-summaries 各関数に関する要約を出力する\n" #: gcov.c:428 #, c-format msgid " -o, --object-directory DIR|FILE Search for object files in DIR or called FILE\n" -msgstr "" +msgstr " -o, --object-directory DIR|FILE オブジェクトファイルを DIR 内または呼び出し用 FILE 内で検索する\n" #: gcov.c:429 #, c-format msgid " -p, --preserve-paths Preserve all pathname components\n" -msgstr "" +msgstr " -p, --preserve-paths すべてのパス名要素を保護する\n" #: gcov.c:430 #, c-format @@ -977,7 +981,7 @@ msgstr "%s: 破損しています\n" #: gcov.c:1045 #, c-format msgid "%s:cannot open data file, assuming not executed\n" -msgstr "" +msgstr "%s:データファイルを開けません。実行されていないと見なします\n" #: gcov.c:1052 #, c-format @@ -1027,7 +1031,7 @@ msgstr "" #: gcov.c:1379 #, c-format msgid "%s:graph is unsolvable for '%s'\n" -msgstr "" +msgstr "%s: '%s' 用のグラフが解決できません\n" #: gcov.c:1459 #, c-format @@ -1037,7 +1041,7 @@ msgstr "%s '%s'\n" #: gcov.c:1462 #, c-format msgid "Lines executed:%s of %d\n" -msgstr "" +msgstr "実行された行:%s of %d\n" #: gcov.c:1466 #, c-format @@ -1047,7 +1051,7 @@ msgstr "実行可能な行がありません\n" #: gcov.c:1472 #, c-format msgid "Branches executed:%s of %d\n" -msgstr "" +msgstr "実行された分岐:%s of %d\n" #: gcov.c:1476 #, c-format @@ -1057,12 +1061,12 @@ msgstr "" #: gcov.c:1482 #, c-format msgid "No branches\n" -msgstr "" +msgstr "分岐がありません\n" #: gcov.c:1484 #, c-format msgid "Calls executed:%s of %d\n" -msgstr "" +msgstr "実行された呼び出し:%s of %d\n" #: gcov.c:1488 #, c-format @@ -1075,24 +1079,24 @@ msgid "%s:no lines for '%s'\n" msgstr "%s: '%s' に対する行がありません\n" #: gcov.c:1843 -#, fuzzy, c-format +#, c-format msgid "call %2d returned %s\n" -msgstr "呼び出し %d の戻り = %d\n" +msgstr "" #: gcov.c:1848 -#, fuzzy, c-format +#, c-format msgid "call %2d never executed\n" -msgstr "呼び出し %d は一度も実行せず\n" +msgstr "" #: gcov.c:1853 -#, fuzzy, c-format +#, c-format msgid "branch %2d taken %s%s\n" -msgstr "ブランチ %d 受理 = %d%%\n" +msgstr "" #: gcov.c:1857 -#, fuzzy, c-format +#, c-format msgid "branch %2d never executed\n" -msgstr "ブランチ %d は一度も実行されず\n" +msgstr "" #: gcov.c:1862 #, c-format @@ -1100,9 +1104,9 @@ msgid "unconditional %2d taken %s\n" msgstr "" #: gcov.c:1865 -#, fuzzy, c-format +#, c-format msgid "unconditional %2d never executed\n" -msgstr "呼び出し %d は一度も実行せず\n" +msgstr "" #: gcov.c:1901 #, c-format @@ -1412,11 +1416,11 @@ msgstr "次のオプションは文書化されていません" #: opts.c:1183 msgid "The following options take separate arguments" -msgstr "" +msgstr "次のオプションは分離した引数を取ります" #: opts.c:1185 msgid "The following options take joined arguments" -msgstr "" +msgstr "次のオプションは結合した引数を取ります" #: opts.c:1196 msgid "The following options are language-related" @@ -1472,7 +1476,7 @@ msgstr "命令が制約を満たしません:" #: targhooks.c:1469 #, c-format msgid "created and used with differing settings of '%s'" -msgstr "" +msgstr "作成時と使用時で '%s' の設定が異なります" #: targhooks.c:1471 msgid "out of memory" @@ -1480,11 +1484,11 @@ msgstr "メモリが足りません" #: targhooks.c:1486 msgid "created and used with different settings of -fpic" -msgstr "" +msgstr "作成時と使用時で -fpic の設定が異なります" #: targhooks.c:1488 msgid "created and used with different settings of -fpie" -msgstr "" +msgstr "作成時と使用時で -fpie の設定が異なります" #: tlink.c:386 #, c-format @@ -1717,11 +1721,11 @@ msgstr "" #: params.def:100 msgid "The maximum depth of recursive inlining for inline functions" -msgstr "" +msgstr "インライン関数を再帰的にインライン化する時の最大深度" #: params.def:105 msgid "The maximum depth of recursive inlining for non-inline functions" -msgstr "" +msgstr "非インライン関数を再帰的にインライン化する時の最大深度" #: params.def:110 msgid "Inline recursively only when the probability of call being executed exceeds the parameter" @@ -1761,16 +1765,15 @@ msgstr "" #: params.def:180 msgid "The size of function body to be considered large" -msgstr "" +msgstr "大きいと見なされる関数本体のサイズ" #: params.def:184 msgid "Maximal growth due to inlining of large function (in percent)" msgstr "" #: params.def:188 -#, fuzzy msgid "The size of translation unit to be considered large" -msgstr "翻訳単位全体をファイルにダンプする" +msgstr "大きいと見なされる翻訳単位のサイズ" #: params.def:192 msgid "How much can given compilation unit grow because of the inlining (in percent)" @@ -1786,20 +1789,19 @@ msgstr "" #: params.def:204 msgid "The size of stack frame to be considered large" -msgstr "" +msgstr "大きいと見なされるスタックフレームのサイズ" #: params.def:208 msgid "Maximal stack frame growth due to inlining (in percent)" -msgstr "" +msgstr "インライン化によって増加するスタックフレームの最大量 (百分率)" #: params.def:215 msgid "The maximum amount of memory to be allocated by GCSE" -msgstr "" +msgstr "GCSE によって配置されるメモリの最大量" #: params.def:222 -#, fuzzy msgid "The maximum ratio of insertions to deletions of expressions in GCSE" -msgstr "RPTS 用の最大反復数を指定する" +msgstr "" #: params.def:233 msgid "The threshold ratio for performing partial redundancy elimination after reload" @@ -1963,9 +1965,8 @@ msgid "Bound on number of candidates below that all candidates are considered in msgstr "" #: params.def:470 -#, fuzzy msgid "Bound on number of iv uses in loop optimized in iv optimizations" -msgstr "目立たない、コストのかかる最適化を行なう" +msgstr "" #: params.def:478 msgid "If number of candidates in the set is smaller, we always try to remove unused ivs during its optimization" @@ -2044,9 +2045,8 @@ msgid "The minimum probability of reaching a source block for interblock specula msgstr "" #: params.def:594 -#, fuzzy msgid "The maximum number of iterations through CFG to extend regions" -msgstr "RPTS 用の最大反復数を指定する" +msgstr "" #: params.def:599 msgid "The maximum conflict delay for an insn to be considered for speculative motion" @@ -2077,9 +2077,8 @@ msgid "The maximum number of RTL nodes that can be recorded as combiner's last v msgstr "" #: params.def:637 -#, fuzzy msgid "The upper bound for sharing integer constants" -msgstr "`%s' の列挙値が整数定数ではありません" +msgstr "整数定数を共有するための上限値" #: params.def:656 msgid "Minimum number of virtual mappings to consider switching to full virtual renames" @@ -2111,11 +2110,11 @@ msgstr "" #: params.def:714 msgid "The number of insns executed before prefetch is completed" -msgstr "" +msgstr "プリフェッチが完了する前に実行される命令数" #: params.def:721 msgid "The number of prefetches that can run at the same time" -msgstr "" +msgstr "同時に実行可能なプリフェッチの数" #: params.def:728 msgid "The size of L1 cache" @@ -2162,9 +2161,8 @@ msgid "size of tiles for loop blocking" msgstr "" #: params.def:806 -#, fuzzy msgid "maximum number of parameters in a SCoP" -msgstr "RPTS 用の最大反復数を指定する" +msgstr "SCoP 内のパラメータの最大数" #: params.def:813 msgid "maximum number of basic blocks per function to be analyzed by Graphite" @@ -2597,9 +2595,9 @@ msgid "invalid %%E value" msgstr "無効な %%E 値" #: config/alpha/alpha.c:5431 config/alpha/alpha.c:5479 -#, fuzzy, c-format +#, c-format msgid "unknown relocation unspec" -msgstr "不明な設定済コンストラクタ型です" +msgstr "" #: config/alpha/alpha.c:5440 config/crx/crx.c:1119 #: config/rs6000/rs6000.c:16490 config/spu/spu.c:1726 @@ -3000,32 +2998,32 @@ msgstr "被演算子コード '%c' に無効な被演算子型が使用されま #: config/i386/i386.c:14106 config/i386/i386.c:14146 #, c-format msgid "operand is not a condition code, invalid operand code 'D'" -msgstr "" +msgstr "被演算子は条件コードではありません。無効な被演算子コード 'D' です" #: config/i386/i386.c:14172 #, c-format msgid "operand is neither a constant nor a condition code, invalid operand code 'C'" -msgstr "" +msgstr "被演算子は定数でも条件コードでもありません。無効な被演算子コード 'C' です" #: config/i386/i386.c:14182 #, c-format msgid "operand is neither a constant nor a condition code, invalid operand code 'F'" -msgstr "" +msgstr "被演算子は定数でも条件コードでもありません。無効な被演算子コード 'F' です" #: config/i386/i386.c:14200 #, c-format msgid "operand is neither a constant nor a condition code, invalid operand code 'c'" -msgstr "" +msgstr "被演算子は定数でも条件コードでもありません。無効な被演算子コード 'c' です" #: config/i386/i386.c:14210 #, c-format msgid "operand is neither a constant nor a condition code, invalid operand code 'f'" -msgstr "" +msgstr "被演算子は定数でも条件コードでもありません。無効な被演算子コード 'f' です" #: config/i386/i386.c:14313 #, c-format msgid "operand is not a condition code, invalid operand code 'Y'" -msgstr "" +msgstr "被演算子は条件コードではありません。無効な被演算子コード 'Y' です" #: config/i386/i386.c:14339 #, c-format @@ -3098,7 +3096,7 @@ msgstr "%%d、%%x、または %%X の無効な使用法です" #: config/lm32/lm32.c:529 #, c-format msgid "only 0.0 can be loaded as an immediate" -msgstr "" +msgstr "即値としてロードできるのは 0.0 のみです" #: config/lm32/lm32.c:599 msgid "bad operand" @@ -3138,15 +3136,15 @@ msgstr "%%N コードへの無効な被演算子です" #: config/m32r/m32r.c:2290 msgid "pre-increment address is not a register" -msgstr "" +msgstr "前置増分アドレスがレジスタではありません" #: config/m32r/m32r.c:2297 msgid "pre-decrement address is not a register" -msgstr "" +msgstr "前置減分アドレスがレジスタではありません" #: config/m32r/m32r.c:2304 msgid "post-increment address is not a register" -msgstr "" +msgstr "後置増分アドレスがレジスタではありません" #: config/m32r/m32r.c:2380 config/m32r/m32r.c:2394 #: config/rs6000/rs6000.c:25500 @@ -3252,7 +3250,7 @@ msgstr "stack/frame/arg ポインタ無しで mips_debugger_offset が呼ばれ #: config/mmix/mmix.c:1589 config/mmix/mmix.c:1719 msgid "MMIX Internal: Expected a CONST_INT, not this" -msgstr "" +msgstr "MMIX 内部: CONST_INT が予期されますが、異なっています" #: config/mmix/mmix.c:1668 msgid "MMIX Internal: Bad value for 'm', not a CONST_INT" @@ -3260,11 +3258,11 @@ msgstr "MMIX 内部: 'm' に対する誤った値です。CONST_INT ではあり #: config/mmix/mmix.c:1687 msgid "MMIX Internal: Expected a register, not this" -msgstr "" +msgstr "MMIX 内部: レジスタが予期されますが、異なっています" #: config/mmix/mmix.c:1697 msgid "MMIX Internal: Expected a constant, not this" -msgstr "" +msgstr "MMIX 内部: 定数が予期されますが、異なっています" #. We need the original here. #: config/mmix/mmix.c:1781 @@ -3301,7 +3299,7 @@ msgstr "" #: config/picochip/picochip.c:2983 config/picochip/picochip.c:3015 msgid "Bad address, not (reg+disp):" -msgstr "" +msgstr "誤ったアドレスです。 (reg+disp) ではありません:" #: config/picochip/picochip.c:3029 msgid "Bad address, not register:" @@ -3526,15 +3524,15 @@ msgstr "%%S への無効な被演算子です" #: config/sh/sh.c:9271 msgid "created and used with different architectures / ABIs" -msgstr "" +msgstr "作成時と使用時で アーキテクチャ/ABI が異なります" #: config/sh/sh.c:9273 msgid "created and used with different ABIs" -msgstr "" +msgstr "作成時と使用時で ABI が異なります" #: config/sh/sh.c:9275 msgid "created and used with different endianness" -msgstr "" +msgstr "作成時と使用時でエンディアンが異なります" #: config/sparc/sparc.c:7445 config/sparc/sparc.c:7451 #, c-format @@ -3617,7 +3615,7 @@ msgstr "" #: config/vax/vax.c:427 #, c-format msgid "symbol with offset used in PIC mode" -msgstr "" +msgstr "PIC モードで使用されるオフセット付きのシンボルです" #: config/vax/vax.c:513 #, c-format @@ -3837,19 +3835,19 @@ msgid "%s:%d:%d: recursively instantiated from here" msgstr "%s:%d:%d: ここから再帰的に実体化されました" #: cp/error.c:2913 -#, fuzzy, c-format +#, c-format msgid "%s:%d:%d: instantiated from here" msgstr "%s:%d:%d: ここから実体化されました" #: cp/error.c:2918 #, c-format msgid "%s:%d: recursively instantiated from here" -msgstr "" +msgstr "%s:%d: ここから再帰的に実体化されました" #: cp/error.c:2919 -#, fuzzy, c-format +#, c-format msgid "%s:%d: instantiated from here" -msgstr "%s:%d: ここで実体化されました\n" +msgstr "%s:%d: ここから実体化されました" #: cp/error.c:2962 #, c-format @@ -4029,22 +4027,21 @@ msgstr "致命的エラー:" #: fortran/expr.c:607 #, c-format msgid "Constant expression required at %C" -msgstr "" +msgstr "%C では定数式が要求されます" #: fortran/expr.c:610 #, c-format msgid "Integer expression required at %C" -msgstr "" +msgstr "%C では整数式が要求されます" #: fortran/expr.c:615 -#, fuzzy, c-format +#, c-format msgid "Integer value too large in expression at %C" -msgstr "式の整数がオーバーフローしました" +msgstr "%C の式内で整数値が大きすぎます" #: fortran/expr.c:3147 -#, fuzzy msgid "array assignment" -msgstr "代入" +msgstr "配列代入" #: fortran/gfortranspec.c:303 #, c-format @@ -4080,7 +4077,7 @@ msgstr "非負の幅が必要です" #: fortran/io.c:551 msgid "Unexpected element '%c' in format string at %L" -msgstr "" +msgstr "予期しない要素 '%c' が書式文字列内 (位置 %L) にあります" #: fortran/io.c:553 msgid "Unexpected end of format string" @@ -4088,15 +4085,15 @@ msgstr "予期しない書式文字列終了です" #: fortran/io.c:554 msgid "Zero width in format descriptor" -msgstr "" +msgstr "幅 0 の書式記述子です" #: fortran/io.c:574 msgid "Missing leading left parenthesis" -msgstr "" +msgstr "前に左小括弧がありません" #: fortran/io.c:603 msgid "Left parenthesis required after '*'" -msgstr "" +msgstr "'*' の後には左小括弧が必要です" #: fortran/io.c:634 msgid "Expected P edit descriptor" @@ -4116,9 +4113,8 @@ msgid "Positive width required with T descriptor" msgstr "" #: fortran/io.c:844 -#, fuzzy msgid "E specifier not allowed with g0 descriptor" -msgstr "型指定子 `%s' は struct や class の後には使えません" +msgstr "" #: fortran/io.c:914 msgid "Positive exponent width required" @@ -4362,9 +4358,8 @@ msgid "Start expression in DO loop" msgstr "" #: fortran/resolve.c:6233 -#, fuzzy msgid "End expression in DO loop" -msgstr "オペランドとして無効な式" +msgstr "" #: fortran/resolve.c:6237 msgid "Step expression in DO loop" @@ -4564,7 +4559,7 @@ msgstr " --bootclasspath PATH 組み込みクラスパスを上書きする\ #: java/jcf-dump.c:1148 #, c-format msgid " --extdirs PATH Set extensions directory path\n" -msgstr "" +msgstr " --extdirs PATH 拡張のディレクトリパスを設定する\n" #: java/jcf-dump.c:1149 #, c-format @@ -4734,18 +4729,18 @@ msgstr "静的リンクはサポートされていません" #: config/pa/pa-hpux11.h:111 config/pa/pa64-hpux.h:30 config/pa/pa64-hpux.h:33 #: config/pa/pa64-hpux.h:42 config/pa/pa64-hpux.h:45 msgid "warning: consider linking with '-static' as system libraries with" -msgstr "" +msgstr "警告: システムライブラリとリンクする時は '-static' を指定することを検討してください" #: config/pa/pa-hpux10.h:90 config/pa/pa-hpux10.h:93 config/pa/pa-hpux10.h:101 #: config/pa/pa-hpux10.h:104 config/pa/pa-hpux11.h:109 #: config/pa/pa-hpux11.h:112 config/pa/pa64-hpux.h:31 config/pa/pa64-hpux.h:34 #: config/pa/pa64-hpux.h:43 config/pa/pa64-hpux.h:46 msgid " profiling support are only provided in archive format" -msgstr "" +msgstr " プロファイリングサポートは書庫フォーマット内でのみ提供されます" #: config/rs6000/darwin.h:99 msgid " conflicting code gen style switches are used" -msgstr "" +msgstr " 競合しているコード生成スタイルスイッチが使用されています" #: config/arm/arm.h:178 msgid "-msoft-float and -mhard_float may not be used together" @@ -4805,7 +4800,7 @@ msgstr "-femit-class-file は -fsyntax-only に合わせて使用してくださ #: config/i386/linux-unwind.h:186 msgid "ax ; {int $0x80 | syscall" -msgstr "" +msgstr "ax ; {int $0x80 | syscall" #: config/s390/tpf.h:120 msgid "static is not supported on TPF-OS" @@ -4869,7 +4864,7 @@ msgstr "--encoding=\t入力エンコーディングを選択する ( #: java/lang.opt:206 msgid "--extdirs=\tSet the extension directory path" -msgstr "" +msgstr "--extdirs=\t拡張のディレクトリパスを設定する" #: java/lang.opt:216 msgid "Input file is a file with a list of filenames to compile" @@ -5388,7 +5383,7 @@ msgstr "" #: config/frv/frv.opt:31 msgid "Enable label alignment optimizations" -msgstr "" +msgstr "ラベル整列最適化を有効にする" #: config/frv/frv.opt:35 msgid "Dynamically allocate cc registers" @@ -5452,7 +5447,7 @@ msgstr "64 個の汎用レジスタ (GPR) を使用する" #: config/frv/frv.opt:116 msgid "Enable use of GPREL for read-only data in FDPIC" -msgstr "" +msgstr "FDPIC 内の読み取り専用データ用 GPREL の使用を有効にする" #: config/frv/frv.opt:120 config/rs6000/rs6000.opt:216 #: config/pdp11/pdp11.opt:67 @@ -5460,9 +5455,8 @@ msgid "Use hardware floating point" msgstr "ハードウェア浮動小数点を利用する" #: config/frv/frv.opt:124 config/bfin/bfin.opt:77 -#, fuzzy msgid "Enable inlining of PLT in function calls" -msgstr "関数呼び出しの前後でレジスタの保存を有効にする" +msgstr "関数呼び出し内で PLT のインライン化を有効にする" #: config/frv/frv.opt:128 msgid "Enable PIC support for building libraries" @@ -5478,7 +5472,7 @@ msgstr "大域関数の直接呼び出しを無効にする" #: config/frv/frv.opt:140 msgid "Use media instructions" -msgstr "" +msgstr "media 命令を使用する" #: config/frv/frv.opt:144 msgid "Use multiply add/subtract instructions" @@ -5494,7 +5488,7 @@ msgstr "入れ子にされた条件付き実行の最適化を有効にする" #: config/frv/frv.opt:157 msgid "Do not mark ABI switches in e_flags" -msgstr "" +msgstr "e_flags 内の ABI スイッチをマークしない" #: config/frv/frv.opt:161 msgid "Remove redundant membars" @@ -5506,7 +5500,7 @@ msgstr "" #: config/frv/frv.opt:169 msgid "Enable setting GPRs to the result of comparisons" -msgstr "" +msgstr "比較結果を汎用レジスタに設定することを有効にする" #: config/frv/frv.opt:173 msgid "Change the amount of scheduler lookahead" @@ -5565,9 +5559,8 @@ msgid "Return pointers in both a0 and d0" msgstr "" #: config/mn10300/mn10300.opt:56 -#, fuzzy msgid "Allow gcc to generate LIW instructions" -msgstr "gcc が repeat/erepeat 命令を使用することを許可する" +msgstr "gcc が LIW 命令を生成することを許可する" #: config/s390/tpf.opt:23 msgid "Enable TPF-OS tracing code" @@ -5640,11 +5633,11 @@ msgstr "" #: config/s390/s390.opt:91 msgid "Warn if a function uses alloca or creates an array with dynamic size" -msgstr "" +msgstr "関数で alloca を使用するか、または動的サイズの配列を作成した場合に、警告する" #: config/s390/s390.opt:95 msgid "Warn if a single function's framesize exceeds the given framesize" -msgstr "" +msgstr "一つの関数のフレームサイズが与えられたフレームサイズを超過する場合に警告する" #: config/s390/s390.opt:99 msgid "z/Architecture" @@ -5692,7 +5685,7 @@ msgstr "GP レジスタ不使用のコードを生成する" #: config/ia64/ia64.opt:56 msgid "gp is constant (but save/restore gp on indirect calls)" -msgstr "gp を定数とする(但、間接呼び出しでは gp を save/restore する)" +msgstr "gp を定数とする(ただし、間接呼び出しでは gp を save/restore する)" #: config/ia64/ia64.opt:60 msgid "Generate self-relocatable code" @@ -5741,39 +5734,39 @@ msgstr "より良いスケジューリング用に事前にストップビット #: config/ia64/ia64.opt:107 config/spu/spu.opt:72 config/sh/sh.opt:258 #: config/pa/pa.opt:51 msgid "Specify range of registers to make fixed" -msgstr "" +msgstr "固定するレジスタの範囲を指定する" #: config/ia64/ia64.opt:119 msgid "Use data speculation before reload" -msgstr "" +msgstr "reload 前にデータ投機を使用する" #: config/ia64/ia64.opt:123 msgid "Use data speculation after reload" -msgstr "" +msgstr "reload 後にデータ投機を使用する" #: config/ia64/ia64.opt:127 msgid "Use control speculation" -msgstr "" +msgstr "制御投機を使用する" #: config/ia64/ia64.opt:131 msgid "Use in block data speculation before reload" -msgstr "" +msgstr "reload 前にブロック内データ投機を使用する" #: config/ia64/ia64.opt:135 msgid "Use in block data speculation after reload" -msgstr "" +msgstr "reload 後にブロック内データ投機を使用する" #: config/ia64/ia64.opt:139 msgid "Use in block control speculation" -msgstr "" +msgstr "ブロック内制御投機を使用する" #: config/ia64/ia64.opt:143 msgid "Use simple data speculation check" -msgstr "" +msgstr "単純データ投機検査を使用する" #: config/ia64/ia64.opt:147 msgid "Use simple data speculation check for control speculation" -msgstr "" +msgstr "制御投機用の単純データ投機検査を使用する" #: config/ia64/ia64.opt:151 msgid "If set, data speculative instructions will be chosen for schedule only if there are no other choices at the moment " @@ -5789,7 +5782,7 @@ msgstr "" #: config/ia64/ia64.opt:163 msgid "Place a stop bit after every cycle when scheduling" -msgstr "" +msgstr "スケジューリング時の各サイクル後にストップビットを配置する" #: config/ia64/ia64.opt:167 msgid "Assume that floating-point stores and loads are not likely to cause conflict when placed into one instruction group" @@ -5805,7 +5798,7 @@ msgstr "" #: config/ia64/ia64.opt:179 msgid "Don't generate checks for control speculation in selective scheduling" -msgstr "" +msgstr "選択的スケジューリング内では制御投機用の検査を生成しない" #: config/ia64/vms_symvec_libgcc_s.opt:3 msgid "! It would be better to auto-generate this file." @@ -6109,7 +6102,7 @@ msgstr "'rtd' を使用する異なる呼び出し規約を使用する" #: config/m68k/m68k.opt:160 config/bfin/bfin.opt:61 msgid "Enable separate data segment" -msgstr "" +msgstr "分離データセグメントを有効にする" #: config/m68k/m68k.opt:164 config/bfin/bfin.opt:57 msgid "ID of shared library to build" @@ -6149,7 +6142,7 @@ msgstr "無視される (廃止)" #: config/i386/mingw.opt:23 msgid "Warn about none ISO msvcrt scanf/printf width extensions" -msgstr "" +msgstr "非 ISO の msvcrt scanf/printf の幅拡張に関して警告する" #: config/i386/mingw.opt:27 msgid "For nested functions on stack executable permission is set." @@ -6201,7 +6194,7 @@ msgstr "分岐のコストを指定する (1-5, 任意の個数)" #: config/i386/i386.opt:114 msgid "Data greater than given threshold will go into .ldata section in x86-64 medium model" -msgstr "" +msgstr "x86-64 メディアモデルでは与えられた閾値より大きいデータを .ldata セクションに配置する" #: config/i386/i386.opt:118 msgid "Use given x86-64 code model" @@ -6217,16 +6210,15 @@ msgstr "FPU 用の sin, cos, sqrt を生成する" #: config/i386/i386.opt:129 msgid "Always use Dynamic Realigned Argument Pointer (DRAP) to realign stack" -msgstr "" +msgstr "スタックを再整列するために動的再整列引数ポインタ (Dynamic Realigned Argument Pointer, DRAP) を常に使用する" #: config/i386/i386.opt:133 msgid "Return values of functions in FPU registers" msgstr "FPU レジスタ内の機能の値を返す" #: config/i386/i386.opt:137 -#, fuzzy msgid "Generate floating point mathematics using given instruction set" -msgstr "ハードウェア浮動小数点命令を使用する" +msgstr "与えられた命令集合を使用して浮動小数数値計算を生成する" #: config/i386/i386.opt:149 msgid "Inline all known string operations" @@ -6314,8 +6306,9 @@ msgid "Return 8-byte vectors in memory" msgstr "8 バイトベクトルをメモリに返す" #: config/i386/i386.opt:253 +#, fuzzy msgid "Generate reciprocals instead of divss and sqrtss." -msgstr "" +msgstr "divss および sqrtss の代わりに逆数 (reciprocal) を生成する" #: config/i386/i386.opt:257 msgid "Generate cld instruction in the function prologue." @@ -6331,7 +6324,7 @@ msgstr "" #: config/i386/i386.opt:271 msgid "Use 128-bit AVX instructions instead of 256-bit AVX instructions in the auto-vectorizer." -msgstr "" +msgstr "自動ベクトル化で 256 ビット AVX 命令の代わりに 128 ビット AVX 命令を使用する" #: config/i386/i386.opt:277 msgid "Generate 32bit i386 code" @@ -6382,9 +6375,8 @@ msgid "Do not support SSE4.1 and SSE4.2 built-in functions and code generation" msgstr "SSE4.1 と SSE4.2 の組み込み関数とコード生成をサポートしない" #: config/i386/i386.opt:328 -#, fuzzy msgid "%<-msse5%> was removed" -msgstr "'-msse5' は削除されました" +msgstr "%<-msse5%> は削除されました" #: config/i386/i386.opt:333 msgid "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2 and AVX built-in functions and code generation" @@ -6544,7 +6536,7 @@ msgstr "PowerPC-64 命令セットを使用する" #: config/rs6000/rs6000.opt:152 msgid "Use PowerPC General Purpose group optional instructions" -msgstr "PowerPC 一般用途グループオプション命令を使用する" +msgstr "PowerPC 汎用グループオプション命令を使用する" #: config/rs6000/rs6000.opt:156 msgid "Use PowerPC Graphics group optional instructions" @@ -7002,7 +6994,7 @@ msgstr "リトルエンディアンコードを生成する" #: config/mcore/mcore.opt:56 config/fr30/fr30.opt:27 msgid "Assume that run-time support has been provided, so omit -lsim from the linker command line" -msgstr "" +msgstr "実行時サポートが提供されると見なし、リンカコマンドラインに -lsim を含めない" #: config/mcore/mcore.opt:60 msgid "Use arbitrary sized immediates in bit operations" @@ -7014,7 +7006,7 @@ msgstr "バイトアクセスよりワードアクセスを選ぶ" #: config/mcore/mcore.opt:71 msgid "Set the maximum amount for a single stack increment operation" -msgstr "単一のスタックインクリメント操作の最大値を設定する" +msgstr "単一のスタック増分操作の最大値を設定する" #: config/mcore/mcore.opt:75 msgid "Always treat bitfields as int-sized" @@ -7234,7 +7226,7 @@ msgstr "double を 64 ビット境界に整列する" #: config/sh/sh.opt:246 msgid "Division strategy, one of: call, call2, fp, inv, inv:minlat, inv20u, inv20l, inv:call, inv:call2, inv:fp, call-div1, call-fp, call-table" -msgstr "" +msgstr "除算戦略、次のいずれか: call, call2, fp, inv, inv:minlat, inv20u, inv20l, inv:call, inv:call2, inv:fp, call-div1, call-fp, call-table" #: config/sh/sh.opt:250 msgid "Specify name for 32 bit signed division function" @@ -7282,7 +7274,7 @@ msgstr "リトルエンディアンモードでコードを生成する" #: config/sh/sh.opt:298 msgid "Mark MAC register as call-clobbered" -msgstr "" +msgstr "MAC レジスタを呼び出しで破壊されるとマークする" #: config/sh/sh.opt:304 msgid "Make structs a multiple of 4 bytes (warning: ABI altered)" @@ -7960,7 +7952,7 @@ msgstr "68HCS12 用にコンパイルする" #: config/m68hc11/m68hc11.opt:49 msgid "Auto pre/post decrement increment allowed" -msgstr "自動 pre/post デクリメント インクリメントを許容する" +msgstr "自動 前置/後置 減分/増分 を許容する" #: config/m68hc11/m68hc11.opt:53 msgid "Min/max instructions allowed" @@ -7972,7 +7964,7 @@ msgstr "関数呼び出しと戻り用に call と rtc を使用する" #: config/m68hc11/m68hc11.opt:61 msgid "Auto pre/post decrement increment not allowed" -msgstr "自動 pre/post デクリメント インクリメントを許容しない" +msgstr "自動 前置/後置 減分/増分を許容しない" #: config/m68hc11/m68hc11.opt:65 msgid "Use jsr and rts for function calls and returns" @@ -8346,7 +8338,7 @@ msgstr "" #: config/bfin/bfin.opt:69 msgid "Link with the fast floating-point library" -msgstr "" +msgstr "高速な浮動小数ライブラリとリンクする" #: config/bfin/bfin.opt:81 msgid "Do stack checking using bounds in L1 scratch memory" @@ -8382,7 +8374,7 @@ msgstr "" #: config/picochip/picochip.opt:31 msgid "Specify whether the byte access instructions should be used. Enabled by default." -msgstr "" +msgstr "バイトアクセス命令を使用するかどうかを指定する。デフォルトでは有効となる" #: config/picochip/picochip.opt:35 msgid "Enable debug output to be generated." @@ -8390,11 +8382,11 @@ msgstr "デバッグ出力の生成を有効にする" #: config/picochip/picochip.opt:39 msgid "Allow a symbol value to be used as an immediate value in an instruction." -msgstr "" +msgstr "命令内でシンボル値が即値として使用されることを許可する" #: config/picochip/picochip.opt:43 msgid "Generate warnings when inefficient code is known to be generated." -msgstr "" +msgstr "非効率なコードが生成された時に警告する" #: config/vxworks.opt:36 msgid "Assume the VxWorks RTP environment" @@ -8418,7 +8410,7 @@ msgstr "コンパイル時 CFString オブジェクトを生成する" #: config/darwin.opt:205 msgid "Warn if constant CFString objects contain non-portable characters" -msgstr "" +msgstr "定数 CFString オブジェクトが移植性の無い文字を含む場合に警告する" #: config/darwin.opt:210 msgid "Generate AT&T-style stubs for Mach-O" @@ -8430,7 +8422,7 @@ msgstr "実行可能ファイル用 (共有ライブラリではなく) に適 #: config/darwin.opt:218 msgid "Generate code suitable for fast turn around debugging" -msgstr "" +msgstr "デバッグを高速に行うために適したコードを生成する" #: config/darwin.opt:227 msgid "The earliest MacOS X version on which this program will run" @@ -8442,15 +8434,15 @@ msgstr "sizeof(bool) を 1 に設定する" #: config/darwin.opt:235 msgid "Generate code for darwin loadable kernel extensions" -msgstr "" +msgstr "darwin ロード可能カーネル拡張用のコードを生成する" #: config/darwin.opt:239 msgid "Generate code for the kernel or loadable kernel extensions" -msgstr "" +msgstr "カーネル用、またはロード可能カーネル拡張用のコードを生成する" #: config/darwin.opt:243 msgid "-iframework \tAdd to the end of the system framework include path" -msgstr "" +msgstr "-iframework \t をシステムフレームワークインクルードパスの末尾に加える" #: config/lynx.opt:23 msgid "Support legacy multi-threading" @@ -8737,7 +8729,6 @@ msgid "Use multiply high instructions for high part of 32x32 multiply" msgstr "" #: config/microblaze/microblaze.opt:92 -#, fuzzy msgid "Use hardware floating point conversion instructions" msgstr "ハードウェア浮動小数点変換命令を使用する" @@ -8862,7 +8853,7 @@ msgstr "" #: c-family/c.opt:249 msgid "-MT \tAdd an unquoted target" -msgstr "" +msgstr "-MT \tターゲット (引用符を付けない) を追加する" #: c-family/c.opt:253 msgid "Do not generate #line directives" @@ -8898,11 +8889,11 @@ msgstr "組み込み前処理マクロが未定義になるか再定義された #: c-family/c.opt:288 msgid "Warn about C constructs that are not in the common subset of C and C++" -msgstr "" +msgstr "C と C++ の共通部分集合では無い C 構文に関して警告する" #: c-family/c.opt:292 msgid "Warn about C++ constructs whose meaning differs between ISO C++ 1998 and ISO C++ 200x" -msgstr "" +msgstr "ISO C++ 1998 と ISO C++ 200x で意味が異なる C++ 構文に関して警告する" #: c-family/c.opt:296 msgid "Warn about casts which discard qualifiers" @@ -8962,7 +8953,7 @@ msgstr "if または else 文の中身が空の場合に警告する" #: c-family/c.opt:352 msgid "Warn about stray tokens after #elif and #endif" -msgstr "" +msgstr "#elif および #endif の後にあるはぐれたトークンに関して警告する" #: c-family/c.opt:356 msgid "Warn about comparison of different enum types" @@ -8977,9 +8968,8 @@ msgid "Warn if testing floating point numbers for equality" msgstr "浮動小数点数の等価比較に関して警告する" #: c-family/c.opt:372 -#, fuzzy msgid "Warn about printf/scanf/strftime/strfmon format string anomalies" -msgstr "printf/scanf/strftime/strfmon 形式の変則的なものに関して警告する" +msgstr "printf/scanf/strftime/strfmon 書式文字列異常に関して警告する" #: c-family/c.opt:376 msgid "Warn if passing too many arguments to a function for its format string" @@ -8998,9 +8988,8 @@ msgid "Warn about possible security problems with format functions" msgstr "セキュリティ問題になる可能性がある書式関数に関して警告する" #: c-family/c.opt:392 -#, fuzzy msgid "Warn about strftime formats yielding 2-digit years" -msgstr "strftime 形式が二桁で年を表している時の警告しない" +msgstr "strftime 書式が 2 桁の年の場合に警告する" #: c-family/c.opt:396 msgid "Warn about zero-length formats" @@ -9409,7 +9398,7 @@ msgstr "フレンド関数を囲まれた名前空間内に入れる" #: c-family/c.opt:823 msgid "Don't emit dllexported inline functions unless needed" -msgstr "" +msgstr "必要が無い限り dllexported インライン関数を発行しない" #: c-family/c.opt:830 msgid "Allow implicit conversions between vectors with differing numbers of subparts and/or differing element types." @@ -9501,7 +9490,7 @@ msgstr "自動テンプレート実体化を有効にする" #: c-family/c.opt:942 msgid "Generate run time type descriptor information" -msgstr "" +msgstr "実行時型記述子情報を生成する" #: c-family/c.opt:946 msgid "Use the same size for double as for float" @@ -9889,19 +9878,16 @@ msgid "Warn about functions which might be candidates for __attribute__((pure))" msgstr "関数が __attribute__((pure)) の候補となりそうな場合に警告する" #: common.opt:608 -#, fuzzy msgid "Warn about enumerated switches, with no default, missing a case" -msgstr "列挙定数の switch で case 指定が欠けているものに関して警告する" +msgstr "列挙定数を使用した switch 文で default 文が無いか特定の case が無い場合に警告する" #: common.opt:612 -#, fuzzy msgid "Warn about enumerated switches missing a \"default:\" statement" -msgstr "列挙定数の switch で case 指定が欠けているものに関して警告する" +msgstr "列挙定数を使用した switch 文で \"default:\" 文が無い場合に警告する" #: common.opt:616 -#, fuzzy msgid "Warn about all enumerated switches missing a specific case" -msgstr "列挙定数の switch で case 指定が欠けているものに関して警告する" +msgstr "列挙定数を使用した switch 文で特定の case が無い場合に警告する" #: common.opt:620 msgid "Do not suppress warnings from system headers" @@ -10000,9 +9986,8 @@ msgid "Generate auto-inc/dec instructions" msgstr "自動増加/減少命令を生成する" #: common.opt:821 -#, fuzzy msgid "Generate code to check bounds before indexing arrays" -msgstr "配列の添字と添字境界を検査するコードを生成する" +msgstr "配列の添え字を使用する前に境界検査を行うコードを生成する" #: common.opt:825 #, fuzzy @@ -10043,7 +10028,7 @@ msgstr "" #: common.opt:864 msgid "Looks for opportunities to reduce stack adjustments and stack references." -msgstr "" +msgstr "スタック調整およびスタック参照を削減する機会を探す" #: common.opt:868 msgid "Do not put uninitialized globals in the common section" @@ -10058,18 +10043,16 @@ msgid "Run only the second compilation of -fcompare-debug" msgstr "" #: common.opt:884 -#, fuzzy msgid "Perform comparison elimination after register allocation has finished" -msgstr "グローバル共通部分式を除去する" +msgstr "レジスタは位置が完了した後に比較の除去を行う" #: common.opt:888 msgid "Do not perform optimizations increasing noticeably stack usage" -msgstr "" +msgstr "スタック使用量を著しく増加させる最適化を行わない" #: common.opt:892 -#, fuzzy msgid "Perform a register copy-propagation optimization pass" -msgstr "最適化過程のレジスタつけ変えを行なう" +msgstr "" #: common.opt:896 msgid "Perform cross-jumping optimization" @@ -10101,7 +10084,7 @@ msgstr "-fdbg-cnt=:[,:,...]\tデバッグカウ #: common.opt:928 msgid "Map one directory name to another in debug information" -msgstr "" +msgstr "デバッグ情報内のディレクトリー名を他のものにマップする" #: common.opt:934 msgid "Defer popping functions args from stack until later" @@ -10116,9 +10099,8 @@ msgid "Delete useless null pointer checks" msgstr "無意味な null ポインタ検査を削除する" #: common.opt:946 -#, fuzzy msgid "Try to convert virtual calls to direct ones." -msgstr "リンカが PIC 呼び出しを直接呼び出しに変更することを許可するように試みる" +msgstr "仮想呼び出しを直接呼び出しに変換することを試みる" #: common.opt:950 #, fuzzy @@ -10137,7 +10119,7 @@ msgstr "-fdump-\t様々なコンパイラ内部情報をファイルにダ #: common.opt:978 msgid "-fdump-final-insns=filename\tDump to filename the insns at the end of translation" -msgstr "" +msgstr "-fdump-final-insns=filename\t翻訳終了時に filename へ命令をダンプする" #: common.opt:982 msgid "-fdump-go-spec=filename\tWrite all declarations to file as Go code" @@ -10173,7 +10155,7 @@ msgstr "" #: common.opt:1014 common.opt:1018 msgid "Perform unused type elimination in debug info" -msgstr "" +msgstr "デバッグ情報内で使用されていない型の除去を行う" #: common.opt:1022 msgid "Do not suppress C++ class debug information." @@ -10181,25 +10163,24 @@ msgstr "C++ クラスデバッグ情報を抑止しない。" #: common.opt:1026 msgid "Generate debug information to support Identical Code Folding (ICF)" -msgstr "" +msgstr "Identical Code Folding (ICF) をサポートするためのデバッグ情報を生成する" #: common.opt:1030 msgid "Enable exception handling" msgstr "例外処理を有効にする" #: common.opt:1034 -#, fuzzy msgid "Perform a number of minor, expensive optimizations" -msgstr "目立たない、コストのかかる最適化を行なう" +msgstr "多くの、目立たないがコストが高い最適化を行う" #: common.opt:1038 msgid "-fexcess-precision=[fast|standard]\tSpecify handling of excess floating-point precision" -msgstr "" +msgstr "-fexcess-precision=[fast|standard]\t余分な浮動小数点精度の取り扱いを指定する" #: common.opt:1041 #, c-format msgid "unknown excess precision style %qs" -msgstr "" +msgstr "不明な余分な精度スタイル %qs です" #: common.opt:1054 msgid "Assume no NaNs or infinities are generated" @@ -10222,52 +10203,45 @@ msgid "-ffp-contract=[off|on|fast] Perform floating-point expression contraction msgstr "" #: common.opt:1077 -#, fuzzy, c-format +#, c-format msgid "unknown floating point contraction style %qs" -msgstr "浮動小数点定数を TOC 内に配置する" +msgstr "不明な浮動小数短縮形 %qs です" #: common.opt:1094 msgid "Allow function addresses to be held in registers" msgstr "関数アドレスをレジスタに持たせる事を許可する" #: common.opt:1098 -#, fuzzy msgid "Place each function into its own section" -msgstr "各々の関数をそれ自身のセクションに配置する" +msgstr "それぞれの関数をそれ自身のセクションに配置する" #: common.opt:1102 -#, fuzzy msgid "Perform global common subexpression elimination" -msgstr "グローバル共通部分式を除去する" +msgstr "大域共通部分式の除去を行う" #: common.opt:1106 -#, fuzzy msgid "Perform enhanced load motion during global common subexpression elimination" -msgstr "グローバル共通部分式を除去する" +msgstr "" #: common.opt:1110 -#, fuzzy msgid "Perform store motion after global common subexpression elimination" -msgstr "グローバル共通部分式を除去する" +msgstr "" #: common.opt:1114 msgid "Perform redundant load after store elimination in global common subexpression" msgstr "" #: common.opt:1119 -#, fuzzy msgid "Perform global common subexpression elimination after register allocation" -msgstr "グローバル共通部分式を除去する" +msgstr "レジスタ配置後に大域共通部分式の除去を行う" #: common.opt:1125 -#, fuzzy msgid "Enable in and out of Graphite representation" -msgstr "自動テンプレート実体化を有効にする" +msgstr "" #: common.opt:1129 -#, fuzzy msgid "Enable Graphite Identity transformation" -msgstr "呼び出しグラフ情報を送出する" +msgstr "" #: common.opt:1133 msgid "Mark all loops as parallel" @@ -10306,9 +10280,8 @@ msgid "Perform conversion of conditional jumps to branchless equivalents" msgstr "" #: common.opt:1173 -#, fuzzy msgid "Perform conversion of conditional jumps to conditional execution" -msgstr "条件的な実行への変更のための閾値を変更する" +msgstr "" #: common.opt:1177 msgid "Convert conditional jumps in innermost loops to branchless equivalents" @@ -10376,13 +10349,12 @@ msgid "Perform interprocedural points-to analysis" msgstr "" #: common.opt:1253 -#, fuzzy msgid "Discover pure and const functions" -msgstr "使われない仮想関数を切り捨てる" +msgstr "純粋および定数関数を見つける" #: common.opt:1257 msgid "Discover readonly and non addressable static variables" -msgstr "" +msgstr "読み取り専用およびアドレス付けできない静的変数を見つける" #: common.opt:1261 msgid "Perform matrix layout flattening and transposing based" @@ -10415,9 +10387,8 @@ msgid "Use IRA based register pressure calculation" msgstr "" #: common.opt:1305 -#, fuzzy msgid "Share slots for saving different hard registers." -msgstr "引数レジスタにローカルのものを格納する" +msgstr "" #: common.opt:1309 msgid "Share stack slots for spilled pseudo-registers." @@ -10621,19 +10592,19 @@ msgstr "ループ内の配列で、可能であればプリフェッチ命令を #: common.opt:1521 msgid "Enable basic program profiling code" -msgstr "" +msgstr "基本プログラムプロファイリングコードを有効にする" #: common.opt:1525 msgid "Insert arc-based program profiling code" -msgstr "" +msgstr "円弧ベースプログラムプロファイリングコードを挿入する" #: common.opt:1529 msgid "Set the top-level directory for storing the profile data." -msgstr "" +msgstr "プロファイルデータ保存用の最上位ディレクリーを設定する" #: common.opt:1534 msgid "Enable correction of flow inconsistent profile data input" -msgstr "" +msgstr "フロー一貫性が無いデータ入力の訂正を有効にする" #: common.opt:1538 msgid "Enable common options for generating profile info for profile feedback directed optimizations" @@ -10653,7 +10624,7 @@ msgstr "" #: common.opt:1554 msgid "Insert code to profile values of expressions" -msgstr "" +msgstr "式の値をプロファイルするためのコードを挿入する" #: common.opt:1561 msgid "-frandom-seed=\tMake compile reproducible using " @@ -11836,7 +11807,7 @@ msgstr "ラベル %q+D が使用されましたが、定義されていません #: c-decl.c:1150 #, gcc-internal-format msgid "nested function %q+D declared but never defined" -msgstr "" +msgstr "入れ子になった関数 %q+D が宣言されましたが定義されていません" #: c-decl.c:1162 #, gcc-internal-format @@ -11893,7 +11864,7 @@ msgstr "" #: c-decl.c:1613 #, gcc-internal-format msgid "prototype for %q+D follows non-prototype definition" -msgstr "" +msgstr "非プロトタイプ定義に続いて %q+D 用のプロトタイプがあります" #: c-decl.c:1628 #, gcc-internal-format @@ -11969,9 +11940,9 @@ msgid "redefinition of typedef %q+D with different type" msgstr "%q+D が異なる型で再定義されました" #: c-decl.c:1818 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "redefinition of typedef %q+D with variably modified type" -msgstr "%q+D が異なる型で再定義されました" +msgstr "" #: c-decl.c:1825 #, gcc-internal-format @@ -12016,17 +11987,17 @@ msgstr "%q+D の非スレッド局所宣言の後にスレッド局所宣言が #: c-decl.c:2001 #, gcc-internal-format msgid "extern declaration of %q+D follows declaration with no linkage" -msgstr "" +msgstr "リンク無し宣言の後に %q+D の extern 宣言が続いています" #: c-decl.c:2037 #, gcc-internal-format msgid "declaration of %q+D with no linkage follows extern declaration" -msgstr "" +msgstr "extern 宣言の後にリンク無し %q+D の宣言が続いています" #: c-decl.c:2043 #, gcc-internal-format msgid "redeclaration of %q+D with no linkage" -msgstr "" +msgstr "リンク無し %q+D の再定義です" #: c-decl.c:2069 #, gcc-internal-format @@ -12354,7 +12325,7 @@ msgstr "ISO C は前方仮引数宣言を禁じます" #: c-decl.c:4614 #, gcc-internal-format msgid "defining a type in a compound literal is invalid in C++" -msgstr "" +msgstr "複合リテラル内での型定義は C++ では無効です" #: c-decl.c:4666 c-decl.c:4681 #, gcc-internal-format @@ -13393,23 +13364,23 @@ msgstr "文字列リテラルが予期されます" #: c-parser.c:1829 #, gcc-internal-format msgid "expression in static assertion is not an integer" -msgstr "" +msgstr "静的アサーション内の式が整数ではありません" #: c-parser.c:1836 #, gcc-internal-format msgid "expression in static assertion is not an integer constant expression" -msgstr "" +msgstr "静的アサーション内の式が整数定数式ではありません" #: c-parser.c:1841 #, gcc-internal-format msgid "expression in static assertion is not constant" -msgstr "" +msgstr "静的アサーション内の式が定数ではありません" #. Report the error. #: c-parser.c:1846 cp/semantics.c:4719 #, gcc-internal-format msgid "static assertion failed: %E" -msgstr "" +msgstr "静的アサーションに失敗しました: %E" #: c-parser.c:2207 c-parser.c:3063 c-parser.c:3709 c-parser.c:3983 #: c-parser.c:5084 c-parser.c:5175 c-parser.c:5800 c-parser.c:6083 @@ -14125,12 +14096,12 @@ msgstr "単項感嘆符(!)への引数の型が間違っています" #: c-typeck.c:3578 #, gcc-internal-format msgid "increment of enumeration value is invalid in C++" -msgstr "列挙値のインクリメントは C++ では無効です" +msgstr "列挙値の増分は C++ では無効です" #: c-typeck.c:3581 #, gcc-internal-format msgid "decrement of enumeration value is invalid in C++" -msgstr "列挙値のデクリメントは C++ では無効です" +msgstr "列挙値の減分は C++ では無効です" #: c-typeck.c:3594 #, gcc-internal-format @@ -14140,22 +14111,22 @@ msgstr "ISO C は複素数型に関する %<++%> と %<--%> をサポートし #: c-typeck.c:3613 c-typeck.c:3645 #, gcc-internal-format msgid "wrong type argument to increment" -msgstr "インクリメントする引数の型が間違っています" +msgstr "増分する引数の型が間違っています" #: c-typeck.c:3615 c-typeck.c:3648 #, gcc-internal-format msgid "wrong type argument to decrement" -msgstr "デクリメントする引数の型が間違っています" +msgstr "減分する引数の型が間違っています" #: c-typeck.c:3635 #, gcc-internal-format msgid "increment of pointer to unknown structure" -msgstr "不明な構造体へのポインタのインクリメントです" +msgstr "不明な構造体へのポインタの増分です" #: c-typeck.c:3638 #, gcc-internal-format msgid "decrement of pointer to unknown structure" -msgstr "不明な構造体へのポインタのデクリメントです" +msgstr "不明な構造体へのポインタの減分です" #: c-typeck.c:3722 #, gcc-internal-format @@ -14170,12 +14141,12 @@ msgstr "読み取り専用位置 %qE への代入です" #: c-typeck.c:3895 c-family/c-common.c:8658 #, gcc-internal-format msgid "increment of read-only location %qE" -msgstr "読み取り専用位置 %qE のインクリメントです" +msgstr "読み取り専用位置 %qE の増分です" #: c-typeck.c:3898 c-family/c-common.c:8659 #, gcc-internal-format msgid "decrement of read-only location %qE" -msgstr "読み取り専用位置 %qE のデクリメントです" +msgstr "読み取り専用位置 %qE の減分です" #: c-typeck.c:3939 #, gcc-internal-format @@ -19787,12 +19758,12 @@ msgstr "読み取り専用オブジェクト内のメンバ %qD への代入で #: c-family/c-common.c:8611 #, gcc-internal-format msgid "increment of member %qD in read-only object" -msgstr "読み取り専用オブジェクト内のメンバ %qD のインクリメントです" +msgstr "読み取り専用オブジェクト内のメンバ %qD の増分です" #: c-family/c-common.c:8613 #, gcc-internal-format msgid "decrement of member %qD in read-only object" -msgstr "読み取り専用オブジェクト内のメンバ %qD のデクリメントです" +msgstr "読み取り専用オブジェクト内のメンバ %qD の減分です" #: c-family/c-common.c:8615 #, gcc-internal-format @@ -19807,12 +19778,12 @@ msgstr "読み取り専用メンバ %qD への代入です" #: c-family/c-common.c:8620 #, gcc-internal-format msgid "increment of read-only member %qD" -msgstr "読み取り専用メンバ %qD のインクリメントです" +msgstr "読み取り専用メンバ %qD の増分です" #: c-family/c-common.c:8621 #, gcc-internal-format msgid "decrement of read-only member %qD" -msgstr "読み取り専用メンバ %qD のデクリメントです" +msgstr "読み取り専用メンバ %qD の減分です" #: c-family/c-common.c:8622 #, gcc-internal-format @@ -19827,12 +19798,12 @@ msgstr "読み取り専用変数 %qD への代入です" #: c-family/c-common.c:8627 #, gcc-internal-format msgid "increment of read-only variable %qD" -msgstr "読み取り専用変数 %qD のインクリメントです" +msgstr "読み取り専用変数 %qD の増分です" #: c-family/c-common.c:8628 #, gcc-internal-format msgid "decrement of read-only variable %qD" -msgstr "読み取り専用変数 %qD のデクリメントです" +msgstr "読み取り専用変数 %qD の減分です" #: c-family/c-common.c:8629 #, gcc-internal-format @@ -19847,12 +19818,12 @@ msgstr "読み取り専用パラメータ %qD への代入です" #: c-family/c-common.c:8633 #, gcc-internal-format msgid "increment of read-only parameter %qD" -msgstr "読み取り専用パラメータ %qD のインクリメントです" +msgstr "読み取り専用パラメータ %qD の増分です" #: c-family/c-common.c:8634 #, gcc-internal-format msgid "decrement of read-only parameter %qD" -msgstr "読み取り専用パラメータ %qD のデクリメントです" +msgstr "読み取り専用パラメータ %qD の減分です" #: c-family/c-common.c:8635 #, gcc-internal-format @@ -19867,12 +19838,12 @@ msgstr "読み取り専用名前付き戻り値 %qD への代入です" #: c-family/c-common.c:8642 #, gcc-internal-format msgid "increment of read-only named return value %qD" -msgstr "読み取り専用名前付き戻り値 %qD のインクリメントです" +msgstr "読み取り専用名前付き戻り値 %qD の増分です" #: c-family/c-common.c:8644 #, gcc-internal-format msgid "decrement of read-only named return value %qD" -msgstr "読み取り専用名前付き戻り値 %qD のデクリメントです" +msgstr "読み取り専用名前付き戻り値 %qD の減分です" #: c-family/c-common.c:8646 #, gcc-internal-format @@ -19887,12 +19858,12 @@ msgstr "関数 %qD への代入です" #: c-family/c-common.c:8652 #, gcc-internal-format msgid "increment of function %qD" -msgstr "関数 %qD のインクリメントです" +msgstr "関数 %qD の増分です" #: c-family/c-common.c:8653 #, gcc-internal-format msgid "decrement of function %qD" -msgstr "関数 %qD のデクリメントです" +msgstr "関数 %qD の減分です" #: c-family/c-common.c:8654 #, gcc-internal-format @@ -19912,12 +19883,12 @@ msgstr "代入の左側の被演算子として左辺値が必要です" #: c-family/c-common.c:8677 #, gcc-internal-format msgid "lvalue required as increment operand" -msgstr "インクリメントの被演算子として左辺値が必要です" +msgstr "増分の被演算子として左辺値が必要です" #: c-family/c-common.c:8680 #, gcc-internal-format msgid "lvalue required as decrement operand" -msgstr "デクリメントの被演算子として左辺値が必要です" +msgstr "減分の被演算子として左辺値が必要です" #: c-family/c-common.c:8683 #, gcc-internal-format @@ -20556,12 +20527,12 @@ msgstr "" #: c-family/c-omp.c:375 cp/semantics.c:4431 #, gcc-internal-format msgid "missing increment expression" -msgstr "インクリメント式がありません" +msgstr "増分式がありません" #: c-family/c-omp.c:444 cp/semantics.c:4287 #, gcc-internal-format msgid "invalid increment expression" -msgstr "無効なインクリメント式です" +msgstr "無効な増分式です" #: c-family/c-opts.c:303 #, gcc-internal-format @@ -20571,7 +20542,7 @@ msgstr "-I- が二回指定されました" #: c-family/c-opts.c:306 #, gcc-internal-format msgid "obsolete option -I- used, please use -iquote instead" -msgstr "廃止あれたオプション -I- が使用されています。代わりに -iquote を使用してください" +msgstr "廃止されたオプション -I- が使用されています。代わりに -iquote を使用してください" #: c-family/c-opts.c:486 #, gcc-internal-format -- cgit v1.2.3 From ca3b9f323843704f5279a01c7f508d6a90598f9c Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Mon, 31 Oct 2011 00:17:46 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@180693 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 52e545030a0..d685f3d8b8a 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111030 +20111031 -- cgit v1.2.3 From 6190c0589d8831d75c8f1823da73d8a9e91697aa Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Tue, 1 Nov 2011 00:17:50 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@180720 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index d685f3d8b8a..7fff5588466 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111031 +20111101 -- cgit v1.2.3 From f2fb87bef7b95682637c80f8043b7f6db3784345 Mon Sep 17 00:00:00 2001 From: Julian Brown Date: Tue, 1 Nov 2011 18:38:42 +0000 Subject: PR rtl-optimization/47918 * reload1.c (set_initial_label_offsets): Use initial offsets for labels on the nonlocal_goto_handler_labels chain. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@180740 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/reload1.c | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 296ac8c181e..a06f0e31b85 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2011-11-01 Julian Brown + + PR rtl-optimization/47918 + + * reload1.c (set_initial_label_offsets): Use initial offsets + for labels on the nonlocal_goto_handler_labels chain. + 2011-10-29 John David Anglin PR target/50691 diff --git a/gcc/reload1.c b/gcc/reload1.c index cee127f936b..84cbfca17aa 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -3899,6 +3899,10 @@ set_initial_label_offsets (void) if (XEXP (x, 0)) set_label_offsets (XEXP (x, 0), NULL_RTX, 1); + for (x = nonlocal_goto_handler_labels; x; x = XEXP (x, 1)) + if (XEXP (x, 0)) + set_label_offsets (XEXP (x, 0), NULL_RTX, 1); + for_each_eh_label (set_initial_eh_label_offset); } -- cgit v1.2.3 From ff93d36a67219fb85c10418243ed4acdeaff7edd Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Tue, 1 Nov 2011 22:59:36 +0000 Subject: * config/i386/i386.md (splitters for int-float conversion): Use SUBREG_REG on SUBREGs in splitter constraints. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@180749 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 +++++- gcc/config/i386/i386.md | 18 +++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a06f0e31b85..9d13db9862e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,7 +1,11 @@ +2011-11-01 Uros Bizjak + + * config/i386/i386.md (splitters for int-float conversion): Use + SUBREG_REG on SUBREGs in splitter constraints. + 2011-11-01 Julian Brown PR rtl-optimization/47918 - * reload1.c (set_initial_label_offsets): Use initial offsets for labels on the nonlocal_goto_handler_labels chain. diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 7d2c561e4e2..cfacea4d93d 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -5103,7 +5103,7 @@ && reload_completed && (SSE_REG_P (operands[0]) || (GET_CODE (operands[0]) == SUBREG - && SSE_REG_P (operands[0])))" + && SSE_REG_P (SUBREG_REG (operands[0]))))" [(set (match_dup 0) (float:MODEF (match_dup 1)))]) (define_split @@ -5116,7 +5116,7 @@ && reload_completed && (SSE_REG_P (operands[0]) || (GET_CODE (operands[0]) == SUBREG - && SSE_REG_P (operands[0])))" + && SSE_REG_P (SUBREG_REG (operands[0]))))" [(set (match_dup 2) (match_dup 1)) (set (match_dup 0) (float:MODEF (match_dup 2)))]) @@ -5207,7 +5207,7 @@ && reload_completed && (SSE_REG_P (operands[0]) || (GET_CODE (operands[0]) == SUBREG - && SSE_REG_P (operands[0])))" + && SSE_REG_P (SUBREG_REG (operands[0]))))" [(const_int 0)] { rtx op1 = operands[1]; @@ -5248,7 +5248,7 @@ && reload_completed && (SSE_REG_P (operands[0]) || (GET_CODE (operands[0]) == SUBREG - && SSE_REG_P (operands[0])))" + && SSE_REG_P (SUBREG_REG (operands[0]))))" [(const_int 0)] { operands[3] = simplify_gen_subreg (mode, operands[0], @@ -5270,7 +5270,7 @@ && reload_completed && (SSE_REG_P (operands[0]) || (GET_CODE (operands[0]) == SUBREG - && SSE_REG_P (operands[0])))" + && SSE_REG_P (SUBREG_REG (operands[0]))))" [(const_int 0)] { rtx op1 = operands[1]; @@ -5314,7 +5314,7 @@ && reload_completed && (SSE_REG_P (operands[0]) || (GET_CODE (operands[0]) == SUBREG - && SSE_REG_P (operands[0])))" + && SSE_REG_P (SUBREG_REG (operands[0]))))" [(const_int 0)] { operands[3] = simplify_gen_subreg (mode, operands[0], @@ -5375,7 +5375,7 @@ && reload_completed && (SSE_REG_P (operands[0]) || (GET_CODE (operands[0]) == SUBREG - && SSE_REG_P (operands[0])))" + && SSE_REG_P (SUBREG_REG (operands[0]))))" [(set (match_dup 0) (float:MODEF (match_dup 1)))]) (define_insn "*float2_sse_nointerunit" @@ -5410,7 +5410,7 @@ && reload_completed && (SSE_REG_P (operands[0]) || (GET_CODE (operands[0]) == SUBREG - && SSE_REG_P (operands[0])))" + && SSE_REG_P (SUBREG_REG (operands[0]))))" [(set (match_dup 2) (match_dup 1)) (set (match_dup 0) (float:MODEF (match_dup 2)))]) @@ -5423,7 +5423,7 @@ && reload_completed && (SSE_REG_P (operands[0]) || (GET_CODE (operands[0]) == SUBREG - && SSE_REG_P (operands[0])))" + && SSE_REG_P (SUBREG_REG (operands[0]))))" [(set (match_dup 0) (float:MODEF (match_dup 1)))]) (define_insn "*float2_i387_with_temp" -- cgit v1.2.3 From 4af61a106206de183d5c4084d707a039abea8071 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Wed, 2 Nov 2011 00:18:04 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@180755 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 7fff5588466..45f404307d2 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111101 +20111102 -- cgit v1.2.3 From 7a9bbb3fe08f472fd2b95a7dafc62c4109b9d39e Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Wed, 2 Nov 2011 10:47:44 +0000 Subject: gcc/ * cfgcleanup.c (try_head_merge_bb): If get_condition returns NULL for a jump that is a cc0 insn, pick the previous insn for move_before. gcc/testsuite/ * gcc.c-torture/compile/20110907.c: New file. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@180766 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/cfgcleanup.c | 18 ++++++++++++++-- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.c-torture/compile/20110913-1.c | 26 ++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.c-torture/compile/20110913-1.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9d13db9862e..2afead1bcd7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-11-02 Bernd Schmidt + + * cfgcleanup.c (try_head_merge_bb): If get_condition returns + NULL for a jump that is a cc0 insn, pick the previous insn for + move_before. + 2011-11-01 Uros Bizjak * config/i386/i386.md (splitters for int-float conversion): Use diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index aaa0ea5d232..0a644980032 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -1969,7 +1969,14 @@ try_head_merge_bb (basic_block bb) cond = get_condition (jump, &move_before, true, false); if (cond == NULL_RTX) - move_before = jump; + { +#ifdef HAVE_cc0 + if (reg_mentioned_p (cc0_rtx, jump)) + move_before = prev_nonnote_nondebug_insn (jump); + else +#endif + move_before = jump; + } for (ix = 0; ix < nedges; ix++) if (EDGE_SUCC (bb, ix)->dest == EXIT_BLOCK_PTR) @@ -2131,7 +2138,14 @@ try_head_merge_bb (basic_block bb) jump = BB_END (final_dest_bb); cond = get_condition (jump, &move_before, true, false); if (cond == NULL_RTX) - move_before = jump; + { +#ifdef HAVE_cc0 + if (reg_mentioned_p (cc0_rtx, jump)) + move_before = prev_nonnote_nondebug_insn (jump); + else +#endif + move_before = jump; + } } do diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2f6d6576a74..89409d20856 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2011-11-02 Bernd Schmidt + + * gcc.c-torture/compile/20110907.c: New file. + 2011-10-29 Paolo Carlini PR c++/50901 diff --git a/gcc/testsuite/gcc.c-torture/compile/20110913-1.c b/gcc/testsuite/gcc.c-torture/compile/20110913-1.c new file mode 100644 index 00000000000..e435a14b2ce --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20110913-1.c @@ -0,0 +1,26 @@ +struct ieee754_double { + double d; +}; +extern const float __exp_deltatable[178]; +float __ieee754_expf (float x) +{ + static const float himark = 88.72283935546875; + static const float lomark = -103.972084045410; + if (__builtin_isless(x, himark) && __builtin_isgreater(x, lomark)) + { + int tval; + double x22, t, result, dx; + float delta; + struct ieee754_double ex2_u; + dx -= t; + tval = (int) (t * 512.0); + if (t >= 0) + delta = - __exp_deltatable[tval]; + else + delta = __exp_deltatable[-tval]; + x22 = (0.5000000496709180453 * dx + 1.0000001192102037084) * dx + delta; + result = x22 * ex2_u.d + ex2_u.d; + return (float) result; + } + return x; +} -- cgit v1.2.3 From d79bf0553ba01ec15fccafec6a577eec403a9491 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Wed, 2 Nov 2011 20:07:26 +0000 Subject: PR target/50945 * config/sparc/sparc.md (movsf_insn): Reindent constraints. (movsf_insn_no_fpu): Likewise. (movdf_insn_sp32): Likewise. (movdf_insn_sp32_no_fpu): Likewise. (movdf_insn_sp32_v9): Likewise. Remove redundant GY constraint. (movdf_insn_sp32_v9_no_fpu): Likewise. (movdf_insn_sp64): Likewise. (movdf_insn_sp64_no_fpu): Likewise. (movtf_insn_sp32): Likewise. (movtf_insn_sp32_no_fpu): Likewise. (movtf_insn_sp64): Likewise. (movtf_insn_sp64_hq): Likewise. (movtf_insn_sp64_no_fpu): Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@180792 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 17 ++++++++++++++++ gcc/config/sparc/sparc.md | 52 +++++++++++++++++++++++------------------------ 2 files changed, 43 insertions(+), 26 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2afead1bcd7..b76c10320ef 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,20 @@ +2011-11-02 Eric Botcazou + + PR target/50945 + * config/sparc/sparc.md (movsf_insn): Reindent constraints. + (movsf_insn_no_fpu): Likewise. + (movdf_insn_sp32): Likewise. + (movdf_insn_sp32_no_fpu): Likewise. + (movdf_insn_sp32_v9): Likewise. Remove redundant GY constraint. + (movdf_insn_sp32_v9_no_fpu): Likewise. + (movdf_insn_sp64): Likewise. + (movdf_insn_sp64_no_fpu): Likewise. + (movtf_insn_sp32): Likewise. + (movtf_insn_sp32_no_fpu): Likewise. + (movtf_insn_sp64): Likewise. + (movtf_insn_sp64_hq): Likewise. + (movtf_insn_sp64_no_fpu): Likewise. + 2011-11-02 Bernd Schmidt * cfgcleanup.c (try_head_merge_bb): If get_condition returns diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md index 6926f9eb464..bf37c37f60c 100644 --- a/gcc/config/sparc/sparc.md +++ b/gcc/config/sparc/sparc.md @@ -1813,8 +1813,8 @@ }) (define_insn "*movsf_insn" - [(set (match_operand:V32 0 "nonimmediate_operand" "=d,f,*r,*r,*r,f,*r,m,m") - (match_operand:V32 1 "input_operand" "GY,f,*rRY,Q,S,m,m,f,*rGY"))] + [(set (match_operand:V32 0 "nonimmediate_operand" "=d,f, *r,*r,*r,f,*r,m, m") + (match_operand:V32 1 "input_operand" "GY,f,*rRY, Q, S,m, m,f,*rGY"))] "TARGET_FPU && (register_operand (operands[0], mode) || register_or_zero_operand (operands[1], mode))" @@ -1861,8 +1861,8 @@ ;; when -mno-fpu. (define_insn "*movsf_insn_no_fpu" - [(set (match_operand:SF 0 "nonimmediate_operand" "=r,r,r,r,m") - (match_operand:SF 1 "input_operand" "rR,Q,S,m,rG"))] + [(set (match_operand:SF 0 "nonimmediate_operand" "=r,r,r,r, m") + (match_operand:SF 1 "input_operand" "rR,Q,S,m,rG"))] "! TARGET_FPU && (register_operand (operands[0], SFmode) || register_or_zero_operand (operands[1], SFmode))" @@ -1948,8 +1948,8 @@ ;; Be careful, fmovd does not exist when !v9. (define_insn "*movdf_insn_sp32" - [(set (match_operand:DF 0 "nonimmediate_operand" "=e,W,U,T,o,e,*r,o,e,o") - (match_operand:DF 1 "input_operand" "W#F,e,T,U,G,e,*rFo,*r,o#F,e"))] + [(set (match_operand:DF 0 "nonimmediate_operand" "= e,W,U,T,o,e, *r, o, e,o") + (match_operand:DF 1 "input_operand" "W#F,e,T,U,G,e,*rFo,*r,o#F,e"))] "TARGET_FPU && ! TARGET_V9 && (register_operand (operands[0], DFmode) @@ -1969,8 +1969,8 @@ (set_attr "length" "*,*,*,*,2,2,2,2,2,2")]) (define_insn "*movdf_insn_sp32_no_fpu" - [(set (match_operand:DF 0 "nonimmediate_operand" "=U,T,o,r,o") - (match_operand:DF 1 "input_operand" "T,U,G,ro,r"))] + [(set (match_operand:DF 0 "nonimmediate_operand" "=U,T,o, r,o") + (match_operand:DF 1 "input_operand" " T,U,G,ro,r"))] "! TARGET_FPU && ! TARGET_V9 && (register_operand (operands[0], DFmode) @@ -1986,8 +1986,8 @@ ;; We have available v9 double floats but not 64-bit integer registers. (define_insn "*movdf_insn_sp32_v9" - [(set (match_operand:V64 0 "nonimmediate_operand" "=b,e,e,T,W,U,T,f,*r,o") - (match_operand:V64 1 "input_operand" "GY,e,W#F,GY,e,T,U,o#F,*roGYDF,*rGYf"))] + [(set (match_operand:V64 0 "nonimmediate_operand" "=b,e, e, T,W,U,T, f, *r, o") + (match_operand:V64 1 "input_operand" "GY,e,W#F,GY,e,T,U,o#F,*roFD,*rGYf"))] "TARGET_FPU && TARGET_V9 && ! TARGET_ARCH64 @@ -2009,8 +2009,8 @@ (set_attr "fptype" "double,double,*,*,*,*,*,*,*,*")]) (define_insn "*movdf_insn_sp32_v9_no_fpu" - [(set (match_operand:DF 0 "nonimmediate_operand" "=U,T,T,r,o") - (match_operand:DF 1 "input_operand" "T,U,G,ro,rG"))] + [(set (match_operand:DF 0 "nonimmediate_operand" "=U,T,T, r, o") + (match_operand:DF 1 "input_operand" " T,U,G,ro,rG"))] "! TARGET_FPU && TARGET_V9 && ! TARGET_ARCH64 @@ -2027,8 +2027,8 @@ ;; We have available both v9 double floats and 64-bit integer registers. (define_insn "*movdf_insn_sp64" - [(set (match_operand:V64 0 "nonimmediate_operand" "=b,e,e,W,*r,*r,m,*r") - (match_operand:V64 1 "input_operand" "GY,e,W#F,e,*rGY,m,*rGY,DF"))] + [(set (match_operand:V64 0 "nonimmediate_operand" "=b,e, e,W, *r,*r, m,*r") + (match_operand:V64 1 "input_operand" "GY,e,W#F,e,*rGY, m,*rGY,FD"))] "TARGET_FPU && TARGET_ARCH64 && (register_operand (operands[0], mode) @@ -2047,8 +2047,8 @@ (set_attr "fptype" "double,double,*,*,*,*,*,*")]) (define_insn "*movdf_insn_sp64_no_fpu" - [(set (match_operand:DF 0 "nonimmediate_operand" "=r,r,m") - (match_operand:DF 1 "input_operand" "r,m,rG"))] + [(set (match_operand:DF 0 "nonimmediate_operand" "=r,r, m") + (match_operand:DF 1 "input_operand" "r,m,rG"))] "! TARGET_FPU && TARGET_ARCH64 && (register_operand (operands[0], DFmode) @@ -2288,8 +2288,8 @@ }) (define_insn "*movtf_insn_sp32" - [(set (match_operand:TF 0 "nonimmediate_operand" "=b,e,o,U,r") - (match_operand:TF 1 "input_operand" "G,oe,GeUr,o,roG"))] + [(set (match_operand:TF 0 "nonimmediate_operand" "=b, e, o,U, r") + (match_operand:TF 1 "input_operand" " G,oe,GeUr,o,roG"))] "TARGET_FPU && ! TARGET_ARCH64 && (register_operand (operands[0], TFmode) @@ -2302,8 +2302,8 @@ ;; when -mno-fpu. (define_insn "*movtf_insn_sp32_no_fpu" - [(set (match_operand:TF 0 "nonimmediate_operand" "=o,U,o,r,o") - (match_operand:TF 1 "input_operand" "G,o,U,roG,r"))] + [(set (match_operand:TF 0 "nonimmediate_operand" "=o,U,o, r,o") + (match_operand:TF 1 "input_operand" " G,o,U,roG,r"))] "! TARGET_FPU && ! TARGET_ARCH64 && (register_operand (operands[0], TFmode) @@ -2312,8 +2312,8 @@ [(set_attr "length" "4")]) (define_insn "*movtf_insn_sp64" - [(set (match_operand:TF 0 "nonimmediate_operand" "=b,e,o,r") - (match_operand:TF 1 "input_operand" "G,oe,Ger,roG"))] + [(set (match_operand:TF 0 "nonimmediate_operand" "=b, e, o, r") + (match_operand:TF 1 "input_operand" "G,oe,Ger,roG"))] "TARGET_FPU && TARGET_ARCH64 && ! TARGET_HARD_QUAD @@ -2323,8 +2323,8 @@ [(set_attr "length" "2")]) (define_insn "*movtf_insn_sp64_hq" - [(set (match_operand:TF 0 "nonimmediate_operand" "=b,e,e,m,o,r") - (match_operand:TF 1 "input_operand" "G,e,m,e,rG,roG"))] + [(set (match_operand:TF 0 "nonimmediate_operand" "=b,e,e,m, o, r") + (match_operand:TF 1 "input_operand" "G,e,m,e,rG,roG"))] "TARGET_FPU && TARGET_ARCH64 && TARGET_HARD_QUAD @@ -2341,8 +2341,8 @@ (set_attr "length" "2,*,*,*,2,2")]) (define_insn "*movtf_insn_sp64_no_fpu" - [(set (match_operand:TF 0 "nonimmediate_operand" "=r,o") - (match_operand:TF 1 "input_operand" "orG,rG"))] + [(set (match_operand:TF 0 "nonimmediate_operand" "= r, o") + (match_operand:TF 1 "input_operand" "orG,rG"))] "! TARGET_FPU && TARGET_ARCH64 && (register_operand (operands[0], TFmode) -- cgit v1.2.3 From ae089bd3a0b9aeedec96eebd19a7b590de0c5afd Mon Sep 17 00:00:00 2001 From: "Richard B. Kreckel" Date: Wed, 2 Nov 2011 21:54:24 +0000 Subject: 2011-11-02 Richard B. Kreckel Paolo Carlini PR libstdc++/50880 * include/std/complex (__complex_acosh): Fix in a better way, use Kahan's formula. * include/tr1/complex (__complex_acosh): Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@180804 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 17 +++++++ libstdc++-v3/include/std/complex | 11 ++--- libstdc++-v3/include/tr1/complex | 9 ++-- .../testsuite/26_numerics/complex/50880.cc | 53 ++++++++++++++++++++++ .../tr1/8_c_compatibility/complex/50880.cc | 51 +++++++++++++++++++++ 5 files changed, 128 insertions(+), 13 deletions(-) create mode 100644 libstdc++-v3/testsuite/26_numerics/complex/50880.cc create mode 100644 libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/50880.cc diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index a2b34f57687..99bde20a629 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,20 @@ +2011-11-02 Richard B. Kreckel + Paolo Carlini + + PR libstdc++/50880 + * include/std/complex (__complex_acosh): Fix in a better way, + use Kahan's formula. + * include/tr1/complex (__complex_acosh): Likewise. + +2011-11-02 Richard B. Kreckel + Paolo Carlini + + PR libstdc++/50880 + * include/std/complex (__complex_acosh): Fix for __z.real() < 0. + * include/tr1/complex (__complex_acosh): Likewise. + * testsuite/26_numerics/complex/50880.cc: New. + * testsuite/tr1/8_c_compatibility/complex/50880.cc: Likewise. + 2011-10-26 Release Manager * GCC 4.6.2 released. diff --git a/libstdc++-v3/include/std/complex b/libstdc++-v3/include/std/complex index aa6e81d2486..da3c469f829 100644 --- a/libstdc++-v3/include/std/complex +++ b/libstdc++-v3/include/std/complex @@ -1,7 +1,7 @@ // The template and inlines for the -*- C++ -*- complex number classes. // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -// 2006, 2007, 2008, 2009, 2010 +// 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -1695,12 +1695,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION std::complex<_Tp> __complex_acosh(const std::complex<_Tp>& __z) { - std::complex<_Tp> __t((__z.real() - __z.imag()) - * (__z.real() + __z.imag()) - _Tp(1.0), - _Tp(2.0) * __z.real() * __z.imag()); - __t = std::sqrt(__t); - - return std::log(__t + __z); + // Kahan's formula. + return _Tp(2.0) * std::log(std::sqrt(_Tp(0.5) * (__z + _Tp(1.0))) + + std::sqrt(_Tp(0.5) * (__z - _Tp(1.0)))); } #if _GLIBCXX_USE_C99_COMPLEX_TR1 diff --git a/libstdc++-v3/include/tr1/complex b/libstdc++-v3/include/tr1/complex index fc213b8f1d5..689ea167ba2 100644 --- a/libstdc++-v3/include/tr1/complex +++ b/libstdc++-v3/include/tr1/complex @@ -185,12 +185,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION std::complex<_Tp> __complex_acosh(const std::complex<_Tp>& __z) { - std::complex<_Tp> __t((__z.real() - __z.imag()) - * (__z.real() + __z.imag()) - _Tp(1.0), - _Tp(2.0) * __z.real() * __z.imag()); - __t = std::sqrt(__t); - - return std::log(__t + __z); + // Kahan's formula. + return _Tp(2.0) * std::log(std::sqrt(_Tp(0.5) * (__z + _Tp(1.0))) + + std::sqrt(_Tp(0.5) * (__z - _Tp(1.0)))); } #if _GLIBCXX_USE_C99_COMPLEX_TR1 diff --git a/libstdc++-v3/testsuite/26_numerics/complex/50880.cc b/libstdc++-v3/testsuite/26_numerics/complex/50880.cc new file mode 100644 index 00000000000..2b70a99ddca --- /dev/null +++ b/libstdc++-v3/testsuite/26_numerics/complex/50880.cc @@ -0,0 +1,53 @@ +// { dg-options "-std=gnu++0x" } +// +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +#include +#include + +template + void test01_do() + { + bool test __attribute__((unused)) = true; + + const std::complex ca(T(-2), T(2)); + const std::complex cb(T(-2), T(0)); + const std::complex cc(T(-2), T(-2)); + + std::complex cra = std::acosh(ca); + std::complex crb = std::acosh(cb); + std::complex crc = std::acosh(cc); + + VERIFY( cra.real() > T(0) ); + VERIFY( crb.real() > T(0) ); + VERIFY( crc.real() > T(0) ); + } + +// libstdc++/50880 +void test01() +{ + test01_do(); + test01_do(); + test01_do(); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/50880.cc b/libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/50880.cc new file mode 100644 index 00000000000..eaa2f3d81f4 --- /dev/null +++ b/libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/50880.cc @@ -0,0 +1,51 @@ +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +#include +#include + +template + void test01_do() + { + bool test __attribute__((unused)) = true; + + const std::complex ca(T(-2), T(2)); + const std::complex cb(T(-2), T(0)); + const std::complex cc(T(-2), T(-2)); + + std::complex cra = std::tr1::acosh(ca); + std::complex crb = std::tr1::acosh(cb); + std::complex crc = std::tr1::acosh(cc); + + VERIFY( cra.real() > T(0) ); + VERIFY( crb.real() > T(0) ); + VERIFY( crc.real() > T(0) ); + } + +// libstdc++/50880 +void test01() +{ + test01_do(); + test01_do(); + test01_do(); +} + +int main() +{ + test01(); + return 0; +} -- cgit v1.2.3 From 7fa38b0c5ef2ae9a4f6b339025033f1ca571e90b Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 3 Nov 2011 00:17:45 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@180809 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 45f404307d2..9914fe59225 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111102 +20111103 -- cgit v1.2.3 From a613394629550ae05f94fec21b134552f4e241a2 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Thu, 3 Nov 2011 20:05:09 +0000 Subject: * config/i386/i386.md (lround2, rint2, floor2, lfloor2, btrunc2, lwp_lwpval3): Use operands[N] instead of operandN. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@180841 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/i386.md | 28 ++++++++++++++-------------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b76c10320ef..a046cffa19a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-11-03 Uros Bizjak + + * config/i386/i386.md (lround2, + rint2, floor2, lfloor2, + btrunc2, lwp_lwpval3): Use operands[N] instead of operandN. + 2011-11-02 Eric Botcazou PR target/50945 diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index cfacea4d93d..f25a97b3ff8 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -14625,7 +14625,7 @@ emit_insn (gen_sse4_1_round2 (operands[0], operands[1], GEN_INT (0x04))); else - ix86_expand_rint (operand0, operand1); + ix86_expand_rint (operands[0], operands[1]); } else { @@ -14649,9 +14649,9 @@ if (optimize_insn_for_size_p ()) FAIL; if (TARGET_64BIT || (mode != DFmode)) - ix86_expand_round (operand0, operand1); + ix86_expand_round (operands[0], operands[1]); else - ix86_expand_rounddf_32 (operand0, operand1); + ix86_expand_rounddf_32 (operands[0], operands[1]); DONE; }) @@ -14796,7 +14796,7 @@ { if (optimize_insn_for_size_p ()) FAIL; - ix86_expand_lround (operand0, operand1); + ix86_expand_lround (operands[0], operands[1]); DONE; }) @@ -14871,9 +14871,9 @@ emit_insn (gen_sse4_1_round2 (operands[0], operands[1], GEN_INT (0x01))); else if (TARGET_64BIT || (mode != DFmode)) - ix86_expand_floorceil (operand0, operand1, true); + ix86_expand_floorceil (operands[0], operands[1], true); else - ix86_expand_floorceildf_32 (operand0, operand1, true); + ix86_expand_floorceildf_32 (operands[0], operands[1], true); } else { @@ -15053,7 +15053,7 @@ { if (TARGET_64BIT && optimize_insn_for_size_p ()) FAIL; - ix86_expand_lfloorceil (operand0, operand1, true); + ix86_expand_lfloorceil (operands[0], operands[1], true); DONE; }) @@ -15128,9 +15128,9 @@ else if (optimize_insn_for_size_p ()) FAIL; else if (TARGET_64BIT || (mode != DFmode)) - ix86_expand_floorceil (operand0, operand1, false); + ix86_expand_floorceil (operands[0], operands[1], false); else - ix86_expand_floorceildf_32 (operand0, operand1, false); + ix86_expand_floorceildf_32 (operands[0], operands[1], false); } else { @@ -15308,7 +15308,7 @@ "SSE_FLOAT_MODE_P (mode) && TARGET_SSE_MATH && !flag_trapping_math" { - ix86_expand_lfloorceil (operand0, operand1, false); + ix86_expand_lfloorceil (operands[0], operands[1], false); DONE; }) @@ -15383,9 +15383,9 @@ else if (optimize_insn_for_size_p ()) FAIL; else if (TARGET_64BIT || (mode != DFmode)) - ix86_expand_trunc (operand0, operand1); + ix86_expand_trunc (operands[0], operands[1]); else - ix86_expand_truncdf_32 (operand0, operand1); + ix86_expand_truncdf_32 (operands[0], operands[1]); } else { @@ -18285,8 +18285,8 @@ (match_operand:SI 3 "const_int_operand" "i")] UNSPECV_LWPVAL_INTRINSIC)] "TARGET_LWP" - "/* Avoid unused variable warning. */ - (void) operand0;") + ;; Avoid unused variable warning. + "(void) operands[0];") (define_insn "*lwp_lwpval3_1" [(unspec_volatile [(match_operand:SWI48 0 "register_operand" "r") -- cgit v1.2.3 From 864db568959ae8d2a400ae83e16affb41a892362 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Fri, 4 Nov 2011 00:18:00 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@180915 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 9914fe59225..1f9e62d3266 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111103 +20111104 -- cgit v1.2.3 From a34721036b8cd0245c4838e72fe58cae8e349011 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Fri, 4 Nov 2011 17:38:29 +0000 Subject: PR target/50979 * config/sparc/sparc.h (ASM_CPU_SPEC): Pass -Av8 if -mcpu=v8. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@180968 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/config/sparc/sparc.h | 1 + 2 files changed, 6 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a046cffa19a..eb01d915dc0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-11-04 Eric Botcazou + + PR target/50979 + * config/sparc/sparc.h (ASM_CPU_SPEC): Pass -Av8 if -mcpu=v8. + 2011-11-03 Uros Bizjak * config/i386/i386.md (lround2, diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index 297844fc0ba..24e0a2e1980 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -408,6 +408,7 @@ extern enum cmodel sparc_cmodel; %{mcpu=sparclite:-Asparclite} \ %{mcpu=sparclite86x:-Asparclite} \ %{mcpu=f930:-Asparclite} %{mcpu=f934:-Asparclite} \ +%{mcpu=v8:-Av8} \ %{mv8plus:-Av8plus} \ %{mcpu=v9:-Av9} \ %{mcpu=ultrasparc:%{!mv8plus:-Av9a}} \ -- cgit v1.2.3 From 889d9c2affcd5ec59467345c0197b49e7f10a3be Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Fri, 4 Nov 2011 21:49:49 +0000 Subject: 2011-11-04 Eric Botcazou MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR c++/50608 * c-parser.c (c_parser_postfix_expression) : Adjust call to fold_offsetof. * c-typeck.c (build_unary_op) : Call fold_offsetof_1. c-family/ * c-common.c (c_fully_fold_internal) : Call fold_offsetof_1. (fold_offsetof_1): Make global.  Remove STOP_REF argument and adjust. : Return the argument. : Remove special code for negative offset. Call fold_build_pointer_plus instead of size_binop. (fold_offsetof): Remove STOP_REF argument and adjust. * c-common.h (fold_offsetof_1): Declare. (fold_offsetof): Remove STOP_REF argument. cp/ * semantics.c (finish_offsetof): Adjust call to fold_offsetof. * typeck.c (cp_build_addr_expr_1): Call fold_offsetof_1. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@180988 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++ gcc/c-family/ChangeLog | 12 ++++++++ gcc/c-family/c-common.c | 54 +++++++++++++--------------------- gcc/c-family/c-common.h | 3 +- gcc/c-parser.c | 2 +- gcc/c-typeck.c | 6 +--- gcc/cp/ChangeLog | 6 ++++ gcc/cp/semantics.c | 2 +- gcc/cp/typeck.c | 4 +-- gcc/testsuite/ChangeLog | 4 +++ gcc/testsuite/g++.dg/other/offsetof7.C | 17 +++++++++++ 11 files changed, 72 insertions(+), 45 deletions(-) create mode 100644 gcc/testsuite/g++.dg/other/offsetof7.C diff --git a/gcc/ChangeLog b/gcc/ChangeLog index eb01d915dc0..4e6dd87b55e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2011-11-04 Eric Botcazou + + PR c++/50608 + * c-parser.c (c_parser_postfix_expression) : Adjust call + to fold_offsetof. + * c-typeck.c (build_unary_op) : Call fold_offsetof_1. + 2011-11-04 Eric Botcazou PR target/50979 diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index c4c7558115b..cb1d017caed 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,15 @@ +2011-11-04 Eric Botcazou + + PR c++/50608 + * c-common.c (c_fully_fold_internal) : Call fold_offsetof_1. + (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust. + : Return the argument. + : Remove special code for negative offset. + Call fold_build_pointer_plus instead of size_binop. + (fold_offsetof): Remove STOP_REF argument and adjust. + * c-common.h (fold_offsetof_1): Declare. + (fold_offsetof): Remove STOP_REF argument. + 2011-10-26 Release Manager * GCC 4.6.2 released. diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index 04664a5745f..eaf129340e6 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -1236,13 +1236,7 @@ c_fully_fold_internal (tree expr, bool in_init, bool *maybe_const_operands, && (op1 = get_base_address (op0)) != NULL_TREE && TREE_CODE (op1) == INDIRECT_REF && TREE_CONSTANT (TREE_OPERAND (op1, 0))) - { - tree offset = fold_offsetof (op0, op1); - op1 - = fold_convert_loc (loc, TREE_TYPE (expr), TREE_OPERAND (op1, 0)); - ret = fold_build2_loc (loc, POINTER_PLUS_EXPR, TREE_TYPE (expr), op1, - offset); - } + ret = fold_convert_loc (loc, TREE_TYPE (expr), fold_offsetof_1 (op0)); else if (op0 != orig_op0 || in_init) ret = in_init ? fold_build1_initializer_loc (loc, code, TREE_TYPE (expr), op0) @@ -8459,20 +8453,15 @@ c_common_to_target_charset (HOST_WIDE_INT c) return uc; } -/* Build the result of __builtin_offsetof. EXPR is a nested sequence of - component references, with STOP_REF, or alternatively an INDIRECT_REF of - NULL, at the bottom; much like the traditional rendering of offsetof as a - macro. Returns the folded and properly cast result. */ +/* Fold an offsetof-like expression. EXPR is a nested sequence of component + references with an INDIRECT_REF of a constant at the bottom; much like the + traditional rendering of offsetof as a macro. Return the folded result. */ -static tree -fold_offsetof_1 (tree expr, tree stop_ref) +tree +fold_offsetof_1 (tree expr) { - enum tree_code code = PLUS_EXPR; tree base, off, t; - if (expr == stop_ref && TREE_CODE (expr) != ERROR_MARK) - return size_zero_node; - switch (TREE_CODE (expr)) { case ERROR_MARK: @@ -8489,15 +8478,15 @@ fold_offsetof_1 (tree expr, tree stop_ref) case NOP_EXPR: case INDIRECT_REF: - if (!integer_zerop (TREE_OPERAND (expr, 0))) + if (!TREE_CONSTANT (TREE_OPERAND (expr, 0))) { error ("cannot apply % to a non constant address"); return error_mark_node; } - return size_zero_node; + return TREE_OPERAND (expr, 0); case COMPONENT_REF: - base = fold_offsetof_1 (TREE_OPERAND (expr, 0), stop_ref); + base = fold_offsetof_1 (TREE_OPERAND (expr, 0)); if (base == error_mark_node) return base; @@ -8515,21 +8504,14 @@ fold_offsetof_1 (tree expr, tree stop_ref) break; case ARRAY_REF: - base = fold_offsetof_1 (TREE_OPERAND (expr, 0), stop_ref); + base = fold_offsetof_1 (TREE_OPERAND (expr, 0)); if (base == error_mark_node) return base; t = TREE_OPERAND (expr, 1); - if (TREE_CODE (t) == INTEGER_CST && tree_int_cst_sgn (t) < 0) - { - code = MINUS_EXPR; - t = fold_build1_loc (input_location, NEGATE_EXPR, TREE_TYPE (t), t); - } - t = convert (sizetype, t); - off = size_binop (MULT_EXPR, TYPE_SIZE_UNIT (TREE_TYPE (expr)), t); /* Check if the offset goes beyond the upper bound of the array. */ - if (code == PLUS_EXPR && TREE_CODE (t) == INTEGER_CST) + if (TREE_CODE (t) == INTEGER_CST && tree_int_cst_sgn (t) >= 0) { tree upbound = array_ref_up_bound (expr); if (upbound != NULL_TREE @@ -8569,26 +8551,30 @@ fold_offsetof_1 (tree expr, tree stop_ref) } } } + + t = convert (sizetype, t); + off = size_binop (MULT_EXPR, TYPE_SIZE_UNIT (TREE_TYPE (expr)), t); break; case COMPOUND_EXPR: /* Handle static members of volatile structs. */ t = TREE_OPERAND (expr, 1); gcc_assert (TREE_CODE (t) == VAR_DECL); - return fold_offsetof_1 (t, stop_ref); + return fold_offsetof_1 (t); default: gcc_unreachable (); } - return size_binop (code, base, off); + return fold_build2 (POINTER_PLUS_EXPR, TREE_TYPE (base), base, off); } +/* Likewise, but convert it to the return type of offsetof. */ + tree -fold_offsetof (tree expr, tree stop_ref) +fold_offsetof (tree expr) { - /* Convert back from the internal sizetype to size_t. */ - return convert (size_type_node, fold_offsetof_1 (expr, stop_ref)); + return convert (size_type_node, fold_offsetof_1 (expr)); } /* Warn for A ?: C expressions (with B omitted) where A is a boolean diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h index 406def96e16..456c7e58262 100644 --- a/gcc/c-family/c-common.h +++ b/gcc/c-family/c-common.h @@ -916,7 +916,8 @@ extern bool c_dump_tree (void *, tree); extern void verify_sequence_points (tree); -extern tree fold_offsetof (tree, tree); +extern tree fold_offsetof_1 (tree); +extern tree fold_offsetof (tree); /* Places where an lvalue, or modifiable lvalue, may be required. Used to select diagnostic messages in lvalue_error and diff --git a/gcc/c-parser.c b/gcc/c-parser.c index 69ce2e50bef..083a29f6373 100644 --- a/gcc/c-parser.c +++ b/gcc/c-parser.c @@ -6294,7 +6294,7 @@ c_parser_postfix_expression (c_parser *parser) c_parser_error (parser, "expected identifier"); c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, "expected %<)%>"); - expr.value = fold_offsetof (offsetof_ref, NULL_TREE); + expr.value = fold_offsetof (offsetof_ref); } break; case RID_CHOOSE_EXPR: diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index aa524326545..cd68a05a6cf 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -3802,11 +3802,7 @@ build_unary_op (location_t location, if (val && TREE_CODE (val) == INDIRECT_REF && TREE_CONSTANT (TREE_OPERAND (val, 0))) { - tree op0 = fold_convert_loc (location, sizetype, - fold_offsetof (arg, val)), op1; - - op1 = fold_convert_loc (location, argtype, TREE_OPERAND (val, 0)); - ret = fold_build2_loc (location, POINTER_PLUS_EXPR, argtype, op1, op0); + ret = fold_convert_loc (location, argtype, fold_offsetof_1 (arg)); goto return_build_unary_op; } diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 6262513c448..729462609d2 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2011-11-04 Eric Botcazou + + PR c++/50608 + * semantics.c (finish_offsetof): Adjust call to fold_offsetof. + * typeck.c (cp_build_addr_expr_1): Call fold_offsetof_1. + 2011-10-29 Paolo Carlini PR c++/50901 diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index ee9d85df0d2..e02bd53af1c 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -3348,7 +3348,7 @@ finish_offsetof (tree expr) } if (TREE_CODE (expr) == INDIRECT_REF && REFERENCE_REF_P (expr)) expr = TREE_OPERAND (expr, 0); - return fold_offsetof (expr, NULL_TREE); + return fold_offsetof (expr); } /* Replace the AGGR_INIT_EXPR at *TP with an equivalent CALL_EXPR. This diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index f6ce635cf17..73d57e9fc1f 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -4835,9 +4835,7 @@ cp_build_addr_expr_1 (tree arg, bool strict_lvalue, tsubst_flags_t complain) && TREE_CONSTANT (TREE_OPERAND (val, 0))) { tree type = build_pointer_type (argtype); - tree op0 = fold_convert (type, TREE_OPERAND (val, 0)); - tree op1 = fold_convert (sizetype, fold_offsetof (arg, val)); - return fold_build2 (POINTER_PLUS_EXPR, type, op0, op1); + return fold_convert (type, fold_offsetof_1 (arg)); } /* Handle complex lvalues (when permitted) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 89409d20856..ac5c6231b35 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2011-11-04 Eric Botcazou + + * g++.dg/other/offsetof7.C: New test. + 2011-11-02 Bernd Schmidt * gcc.c-torture/compile/20110907.c: New file. diff --git a/gcc/testsuite/g++.dg/other/offsetof7.C b/gcc/testsuite/g++.dg/other/offsetof7.C new file mode 100644 index 00000000000..0ce2ee02aa8 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/offsetof7.C @@ -0,0 +1,17 @@ +// PR c++/50608 +// Testcase by +// { dg-do compile } + +struct A { + int offset; +}; + +struct B: public A { +}; + +struct C { + A a; + B b; +}; + +int fails = __builtin_offsetof (C, b.offset); -- cgit v1.2.3 From cbc8e9d50798a7e5879af6f9de6e2a7c7a6d0870 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sat, 5 Nov 2011 00:18:14 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@180995 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 1f9e62d3266..b896127d9b6 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111104 +20111105 -- cgit v1.2.3 From d7f71803906097eaab379b1c36ea43ee3db5e551 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sun, 6 Nov 2011 00:18:02 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181020 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index b896127d9b6..0f7ef12fc9e 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111105 +20111106 -- cgit v1.2.3 From b0170f92ddbd3039f8e225534a1fa0923d02bd29 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Mon, 7 Nov 2011 00:17:57 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181052 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 0f7ef12fc9e..95d26156ac4 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111106 +20111107 -- cgit v1.2.3 From 20a5d148d8f594edbc0bce61f3655fc7d3d93e28 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 7 Nov 2011 01:15:08 +0000 Subject: PR target/30282 * config/rs6000/rs6000.c (rs6000_emit_stack_reset): Always emit blockage for ABI_V4. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181057 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 10 ++++++++-- gcc/config/rs6000/rs6000.c | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4e6dd87b55e..d9f944b5b0b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-11-07 Alan Modra + + PR target/30282 + * config/rs6000/rs6000.c (rs6000_emit_stack_reset): Always emit + blockage for ABI_V4. + 2011-11-04 Eric Botcazou PR c++/50608 @@ -214,8 +220,8 @@ 2011-10-07 Bernd Schmidt - PR target/49049 - * config/arm/arm.md (arm_subsi3_insn): Lose the last alternative. + PR target/49049 + * config/arm/arm.md (arm_subsi3_insn): Lose the last alternative. 2011-10-06 Jakub Jelinek diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index ea66f80fe81..58054c64c20 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -20227,7 +20227,7 @@ rs6000_emit_stack_reset (rs6000_stack_t *info, { /* This blockage is needed so that sched doesn't decide to move the sp change before the register restores. */ - if (frame_reg_rtx != sp_reg_rtx + if (DEFAULT_ABI == ABI_V4 || (TARGET_SPE_ABI && info->spe_64bit_regs_used != 0 && info->first_gp_reg_save != 32)) -- cgit v1.2.3 From fec6fa3f30fd1b10543a48786170fc4789c2d2e3 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Tue, 8 Nov 2011 00:18:22 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181137 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 95d26156ac4..d5858ff62fc 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111107 +20111108 -- cgit v1.2.3 From 8931bff065a778a7e3dd9362370603652261aa04 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 8 Nov 2011 00:46:06 +0000 Subject: PR c++/50870 * pt.c (tsubst_copy): Handle NAMESPACE_DECL. (tsubst_copy_and_build) [COMPONENT_REF]: Handle a still-dependent object. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181140 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 7 +++++++ gcc/cp/pt.c | 7 ++++++- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/decltype35.C | 15 +++++++++++++++ 4 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/g++.dg/cpp0x/decltype35.C diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 729462609d2..58a51fd1e49 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2011-11-07 Jason Merrill + + PR c++/50870 + * pt.c (tsubst_copy): Handle NAMESPACE_DECL. + (tsubst_copy_and_build) [COMPONENT_REF]: Handle a still-dependent + object. + 2011-11-04 Eric Botcazou PR c++/50608 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index bfe598001ab..9577bd8f6c6 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -11439,6 +11439,9 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl) mark_used (t); return t; + case NAMESPACE_DECL: + return t; + case OVERLOAD: /* An OVERLOAD will always be a non-dependent overload set; an overload set from function scope will just be represented with an @@ -13179,7 +13182,9 @@ tsubst_copy_and_build (tree t, if (member == error_mark_node) return error_mark_node; - if (object_type && !CLASS_TYPE_P (object_type)) + if (type_dependent_expression_p (object)) + /* We can't do much here. */; + else if (!CLASS_TYPE_P (object_type)) { if (SCALAR_TYPE_P (object_type)) { diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ac5c6231b35..3951c6633eb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-11-07 Jason Merrill + + PR c++/50870 + * g++.dg/cpp0x/decltype35.C: New. + 2011-11-04 Eric Botcazou * g++.dg/other/offsetof7.C: New test. diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype35.C b/gcc/testsuite/g++.dg/cpp0x/decltype35.C new file mode 100644 index 00000000000..d1fd47638a9 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/decltype35.C @@ -0,0 +1,15 @@ +// PR c++/50870 +// { dg-options -std=c++0x } + +template + struct impl + { + template static T create(); + }; + +template ::template create() + -> impl::template create())> +struct tester { }; + +tester*, int, float> ti; -- cgit v1.2.3 From 000be90af81cf8be339f7d1a6bbfed53bcd0f4e3 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Wed, 9 Nov 2011 00:18:01 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181186 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index d5858ff62fc..353490df82a 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111108 +20111109 -- cgit v1.2.3 From a5dd6044f20d37f29c60c16660991192074bd0ba Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 10 Nov 2011 00:18:31 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181244 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 353490df82a..855afb9bbc4 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111109 +20111110 -- cgit v1.2.3 From 951267c7e7bebb5ac4ae1464d6e1835d8cfdd9a8 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 10 Nov 2011 19:04:01 +0000 Subject: PR middle-end/51077 * tree-object-size.c (addr_object_size): Check TREE_CODE of MEM_REF's operand rather than code of the MEM_REF itself. * gcc.c-torture/compile/pr51077.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181264 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.c-torture/compile/pr51077.c | 15 +++++++++++++++ gcc/tree-object-size.c | 2 +- 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr51077.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d9f944b5b0b..cca412504d3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-11-10 Jakub Jelinek + + PR middle-end/51077 + * tree-object-size.c (addr_object_size): Check TREE_CODE of + MEM_REF's operand rather than code of the MEM_REF itself. + 2011-11-07 Alan Modra PR target/30282 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3951c6633eb..dd7356c9704 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-11-10 Jakub Jelinek + + PR middle-end/51077 + * gcc.c-torture/compile/pr51077.c: New test. + 2011-11-07 Jason Merrill PR c++/50870 diff --git a/gcc/testsuite/gcc.c-torture/compile/pr51077.c b/gcc/testsuite/gcc.c-torture/compile/pr51077.c new file mode 100644 index 00000000000..de2b97e58e9 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr51077.c @@ -0,0 +1,15 @@ +/* PR middle-end/51077 */ + +struct S { unsigned char s, t[256]; }; + +void +foo (const struct S *x, struct S *y, int z) +{ + int i; + for (i = 0; i < 8; i++) + { + const struct S *a = &x[i]; + __builtin___memcpy_chk (y->t, a->t, z, __builtin_object_size (y->t, 0)); + y = (struct S *) &y->t[z]; + } +} diff --git a/gcc/tree-object-size.c b/gcc/tree-object-size.c index a236281e1c4..118f6d56ab5 100644 --- a/gcc/tree-object-size.c +++ b/gcc/tree-object-size.c @@ -175,7 +175,7 @@ addr_object_size (struct object_size_info *osi, const_tree ptr, unsigned HOST_WIDE_INT sz; if (!osi || (object_size_type & 1) != 0 - || TREE_CODE (pt_var) != SSA_NAME) + || TREE_CODE (TREE_OPERAND (pt_var, 0)) != SSA_NAME) { sz = compute_builtin_object_size (TREE_OPERAND (pt_var, 0), object_size_type & ~1); -- cgit v1.2.3 From 93cee5f2904e2e044be705aeca95f9e22ca7d091 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Fri, 11 Nov 2011 00:18:16 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181277 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 855afb9bbc4..1f70f98539f 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111110 +20111111 -- cgit v1.2.3 From fed92c38d20444830330c8f20d867296a0b8ec0f Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sat, 12 Nov 2011 00:17:39 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181305 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 1f70f98539f..1bde7ac64ee 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111111 +20111112 -- cgit v1.2.3 From 16e6f0ecca8547ebf347c7939991c1951bb6aa7b Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sat, 12 Nov 2011 13:57:55 +0000 Subject: gcc/objc: * objc-next-runtime-abi-01.c (objc_eh_personality): Use gcc personality for Objective-C m32. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181313 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/objc/ChangeLog | 5 +++++ gcc/objc/objc-next-runtime-abi-01.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog index ce576947e60..3c2516746b6 100644 --- a/gcc/objc/ChangeLog +++ b/gcc/objc/ChangeLog @@ -1,3 +1,8 @@ +2011-11-12 Iain Sandoe + + * objc-next-runtime-abi-01.c (objc_eh_personality): Use gcc personality + for Objective-C m32. + 2011-10-26 Release Manager * GCC 4.6.2 released. diff --git a/gcc/objc/objc-next-runtime-abi-01.c b/gcc/objc/objc-next-runtime-abi-01.c index 3bab0a92d5e..84626b3bc58 100644 --- a/gcc/objc/objc-next-runtime-abi-01.c +++ b/gcc/objc/objc-next-runtime-abi-01.c @@ -2871,12 +2871,15 @@ make_err_class: return eh_id; } +/* For NeXT ABI 0 and 1, the personality routines are just those of the + underlying language. */ + static tree objc_eh_personality (void) { if (!objc_eh_personality_decl) #ifndef OBJCPLUS - objc_eh_personality_decl = build_personality_function ("objc"); + objc_eh_personality_decl = build_personality_function ("gcc"); #else objc_eh_personality_decl = build_personality_function ("gxx"); #endif -- cgit v1.2.3 From 6bd59446c4c0d7a278defd40ae676881f333f17d Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sat, 12 Nov 2011 14:04:58 +0000 Subject: gcc/objc: Backport from mainline 2011-10-29 Iain Sandoe PR target/47997 * objc-act.c (objc_build_string_object): Remove redundant second call to fix_string_type (). Add a checking assert that we are, indeed, passed a STRING_CST. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181314 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/objc/ChangeLog | 10 ++++++++++ gcc/objc/objc-act.c | 5 ++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog index 3c2516746b6..5b6783e94b9 100644 --- a/gcc/objc/ChangeLog +++ b/gcc/objc/ChangeLog @@ -1,3 +1,13 @@ +2011-11-12 Iain Sandoe + + Backport from mainline + 2011-10-29 Iain Sandoe + + PR target/47997 + * objc-act.c (objc_build_string_object): Remove redundant second + call to fix_string_type (). Add a checking assert that we are, + indeed, passed a STRING_CST. + 2011-11-12 Iain Sandoe * objc-next-runtime-abi-01.c (objc_eh_personality): Use gcc personality diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 451143531a4..cca60a07198 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -3136,9 +3136,8 @@ objc_build_string_object (tree string) struct string_descriptor *desc, key; void **loc; - /* Prep the string argument. */ - string = fix_string_type (string); - TREE_SET_CODE (string, STRING_CST); + /* We should be passed a STRING_CST. */ + gcc_checking_assert (TREE_CODE (string) == STRING_CST); length = TREE_STRING_LENGTH (string) - 1; /* The target may have different ideas on how to construct an ObjC string -- cgit v1.2.3 From 0744467079e29301e23ec45a5c94e1073b05a110 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sat, 12 Nov 2011 14:14:43 +0000 Subject: gcc: PR target/45233 * config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Only expand a symbol ref. into an access when the entity is defined in the TU. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181316 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/config/rs6000/rs6000.c | 1 + 2 files changed, 8 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cca412504d3..11f9734a96b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2011-11-12 Iain Sandoe + + PR target/45233 + * config/rs6000/rs6000.c (rs6000_legitimize_reload_address): + Only expand a symbol ref. into an access when the entity is defined + in the TU. + 2011-11-10 Jakub Jelinek PR middle-end/51077 diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 58054c64c20..0511c0cce76 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -6824,6 +6824,7 @@ rs6000_legitimize_reload_address (rtx x, enum machine_mode mode, #if TARGET_MACHO && DEFAULT_ABI == ABI_DARWIN && (flag_pic || MACHO_DYNAMIC_NO_PIC_P) + && machopic_symbol_defined_p (x) #else && DEFAULT_ABI == ABI_V4 && !flag_pic -- cgit v1.2.3 From 1f8273bd85c43308d4c43e0fd3e43f3f2a3d2d60 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sun, 13 Nov 2011 00:18:10 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181330 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 1bde7ac64ee..765e753c817 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111112 +20111113 -- cgit v1.2.3 From 126dfb6897af83a00343a45ca73ea617ece12c33 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sun, 13 Nov 2011 13:58:43 +0000 Subject: gcc: PR target/48108 Backport from mainline r180523 * config/darwin.c (top level): Amend comments concerning LTO output. (lto_section_num): New variable. (darwin_lto_section_e): New GTY. (LTO_SECTS_SECTION, LTO_INDEX_SECTION): New. (LTO_NAMES_SECTION): Rename. (darwin_asm_named_section): Record LTO section counts and switches in a vec of darwin_lto_section_e. (darwin_file_start): Remove unused code. (darwin_file_end): Put an LTO section termination label. Handle output of the wrapped LTO sections, index and names table. libiberty: PR target/48108 Backport from mainline r180523 * simple-object-mach-o.c (GNU_WRAPPER_SECTS, GNU_WRAPPER_INDEX, GNU_WRAPPER_NAMES): New macros. (simple_object_mach_o_segment): Handle wrapper scheme. (simple_object_mach_o_write_section_header): Allow the segment name to be supplied. (simple_object_mach_o_write_segment): Handle wrapper scheme. Ensure that the top-level segment name in the load command is empty. (simple_object_mach_o_write_to_file): Determine the number of sections during segment output, use that in writing the header. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181336 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 14 ++ gcc/config/darwin.c | 167 +++++++++---- libiberty/ChangeLog | 14 ++ libiberty/simple-object-mach-o.c | 515 +++++++++++++++++++++++++++++++++------ 4 files changed, 578 insertions(+), 132 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 11f9734a96b..43a5a72cf66 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,17 @@ +2011-11-13 Iain Sandoe + + PR target/48108 + Backport from mainline r180523 + * config/darwin.c (top level): Amend comments concerning LTO output. + (lto_section_num): New variable. (darwin_lto_section_e): New GTY. + (LTO_SECTS_SECTION, LTO_INDEX_SECTION): New. + (LTO_NAMES_SECTION): Rename. + (darwin_asm_named_section): Record LTO section counts and switches + in a vec of darwin_lto_section_e. + (darwin_file_start): Remove unused code. + (darwin_file_end): Put an LTO section termination label. Handle + output of the wrapped LTO sections, index and names table. + 2011-11-12 Iain Sandoe PR target/45233 diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 8eb11649001..3b065e5b9f2 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -1753,19 +1753,51 @@ darwin_label_is_anonymous_local_objc_name (const char *name) return (!strncmp ((const char *)p, "_OBJC_", 6)); } -/* LTO support for Mach-O. */ +/* LTO support for Mach-O. -/* Section names for LTO sections. */ -static unsigned int lto_section_names_offset = 0; + This version uses three mach-o sections to encapsulate the (unlimited + number of) lto sections. -/* This is the obstack which we use to allocate the many strings. */ -static struct obstack lto_section_names_obstack; + __GNU_LTO, __lto_sections contains the concatented GNU LTO section data. + __GNU_LTO, __section_names contains the GNU LTO section names. + __GNU_LTO, __section_index contains an array of values that index these. -/* Segment name for LTO sections. */ + Indexed thus: +
, +
+ . + + At present, for both m32 and m64 mach-o files each of these fields is + represented by a uint32_t. This is because, AFAICT, a mach-o object + cannot exceed 4Gb because the section_64 offset field (see below) is 32bits. + + uint32_t offset; + "offset An integer specifying the offset to this section in the file." */ + +/* Count lto section numbers. */ +static unsigned int lto_section_num = 0; + +/* A vector of information about LTO sections, at present, we only have + the name. TODO: see if we can get the data length somehow. */ +typedef struct GTY (()) darwin_lto_section_e { + const char *sectname; +} darwin_lto_section_e ; +DEF_VEC_O(darwin_lto_section_e); +DEF_VEC_ALLOC_O(darwin_lto_section_e, gc); + +static GTY (()) VEC (darwin_lto_section_e, gc) * lto_section_names; + +/* Segment for LTO data. */ #define LTO_SEGMENT_NAME "__GNU_LTO" -/* Section name for LTO section names section. */ -#define LTO_NAMES_SECTION "__section_names" +/* Section wrapper scheme (used here to wrap the unlimited number of LTO + sections into three Mach-O ones). + NOTE: These names MUST be kept in sync with those in + libiberty/simple-object-mach-o. */ +#define LTO_SECTS_SECTION "__wrapper_sects" +#define LTO_NAMES_SECTION "__wrapper_names" +#define LTO_INDEX_SECTION "__wrapper_index" /* File to temporarily store LTO data. This is appended to asm_out_file in darwin_end_file. */ @@ -1808,37 +1840,38 @@ darwin_asm_named_section (const char *name, unsigned int flags, tree decl ATTRIBUTE_UNUSED) { - /* LTO sections go in a special segment __GNU_LTO. We want to replace the - section name with something we can use to represent arbitrary-length - names (section names in Mach-O are at most 16 characters long). */ + /* LTO sections go in a special section that encapsulates the (unlimited) + number of GNU LTO sections within a single mach-o one. */ if (strncmp (name, LTO_SECTION_NAME_PREFIX, strlen (LTO_SECTION_NAME_PREFIX)) == 0) { + darwin_lto_section_e e; /* We expect certain flags to be set... */ gcc_assert ((flags & (SECTION_DEBUG | SECTION_NAMED)) == (SECTION_DEBUG | SECTION_NAMED)); - /* Add the section name to the things to output when we end the - current assembler output file. - This is all not very efficient, but that doesn't matter -- this - shouldn't be a hot path in the compiler... */ - obstack_1grow (<o_section_names_obstack, '\t'); - obstack_grow (<o_section_names_obstack, ".ascii ", 7); - obstack_1grow (<o_section_names_obstack, '"'); - obstack_grow (<o_section_names_obstack, name, strlen (name)); - obstack_grow (<o_section_names_obstack, "\\0\"\n", 4); - - /* Output the dummy section name. */ - fprintf (asm_out_file, "\t# %s\n", name); - fprintf (asm_out_file, "\t.section %s,__%08X,regular,debug\n", - LTO_SEGMENT_NAME, lto_section_names_offset); - - /* Update the offset for the next section name. Make sure we stay - within reasonable length. */ - lto_section_names_offset += strlen (name) + 1; - gcc_assert (lto_section_names_offset > 0 - && lto_section_names_offset < ((unsigned) 1 << 31)); - } + /* Switch to our combined section. */ + fprintf (asm_out_file, "\t.section %s,%s,regular,debug\n", + LTO_SEGMENT_NAME, LTO_SECTS_SECTION); + /* Output a label for the start of this sub-section. */ + fprintf (asm_out_file, "L_GNU_LTO%d:\t;# %s\n", + lto_section_num, name); + /* We have to jump through hoops to get the values of the intra-section + offsets... */ + fprintf (asm_out_file, "\t.set L$gnu$lto$offs%d,L_GNU_LTO%d-L_GNU_LTO0\n", + lto_section_num, lto_section_num); + fprintf (asm_out_file, + "\t.set L$gnu$lto$size%d,L_GNU_LTO%d-L_GNU_LTO%d\n", + lto_section_num, lto_section_num+1, lto_section_num); + lto_section_num++; + e.sectname = xstrdup (name); + /* Keep the names, we'll need to make a table later. + TODO: check that we do not revisit sections, that would break + the assumption of how this is done. */ + if (lto_section_names == NULL) + lto_section_names = VEC_alloc (darwin_lto_section_e, gc, 16); + VEC_safe_push (darwin_lto_section_e, gc, lto_section_names, &e); + } else if (strncmp (name, "__DWARF,", 8) == 0) darwin_asm_dwarf_section (name, flags, decl); else @@ -2711,16 +2744,12 @@ darwin_asm_output_dwarf_offset (FILE *file, int size, const char * lab, darwin_asm_output_dwarf_delta (file, size, lab, sname); } -/* Called from the within the TARGET_ASM_FILE_START for each target. - Initialize the stuff we need for LTO long section names support. */ +/* Called from the within the TARGET_ASM_FILE_START for each target. */ void darwin_file_start (void) { - /* We fill this obstack with the complete section text for the lto section - names to write in darwin_file_end. */ - obstack_init (<o_section_names_obstack); - lto_section_names_offset = 0; + /* Nothing to do. */ } /* Called for the TARGET_ASM_FILE_END hook. @@ -2731,8 +2760,6 @@ darwin_file_start (void) void darwin_file_end (void) { - const char *lto_section_names; - machopic_finish (asm_out_file); if (strcmp (lang_hooks.name, "GNU C++") == 0) { @@ -2762,6 +2789,13 @@ darwin_file_end (void) lto_asm_txt = buf = (char *) xmalloc (n + 1); while (fgets (lto_asm_txt, n, lto_asm_out_file)) fputs (lto_asm_txt, asm_out_file); + /* Put a termination label. */ + fprintf (asm_out_file, "\t.section %s,%s,regular,debug\n", + LTO_SEGMENT_NAME, LTO_SECTS_SECTION); + fprintf (asm_out_file, "L_GNU_LTO%d:\t;# end of lto\n", + lto_section_num); + /* Make sure our termination label stays in this section. */ + fputs ("\t.space\t1\n", asm_out_file); } /* Remove the temporary file. */ @@ -2770,21 +2804,50 @@ darwin_file_end (void) free (lto_asm_out_name); } - /* Finish the LTO section names obstack. Don't output anything if - there are no recorded section names. */ - obstack_1grow (<o_section_names_obstack, '\0'); - lto_section_names = XOBFINISH (<o_section_names_obstack, const char *); - if (strlen (lto_section_names) > 0) + /* Output the names and indices. */ + if (lto_section_names && VEC_length (darwin_lto_section_e, lto_section_names)) { - fprintf (asm_out_file, - "\t.section %s,%s,regular,debug\n", + int count; + darwin_lto_section_e *ref; + /* For now, we'll make the offsets 4 bytes and unaligned - we'll fix + the latter up ourselves. */ + const char *op = integer_asm_op (4,0); + + /* Emit the names. */ + fprintf (asm_out_file, "\t.section %s,%s,regular,debug\n", LTO_SEGMENT_NAME, LTO_NAMES_SECTION); - fprintf (asm_out_file, - "\t# Section names in %s are offsets into this table\n", - LTO_SEGMENT_NAME); - fprintf (asm_out_file, "%s\n", lto_section_names); + FOR_EACH_VEC_ELT (darwin_lto_section_e, lto_section_names, count, ref) + { + fprintf (asm_out_file, "L_GNU_LTO_NAME%d:\n", count); + /* We have to jump through hoops to get the values of the intra-section + offsets... */ + fprintf (asm_out_file, + "\t.set L$gnu$lto$noff%d,L_GNU_LTO_NAME%d-L_GNU_LTO_NAME0\n", + count, count); + fprintf (asm_out_file, + "\t.set L$gnu$lto$nsiz%d,L_GNU_LTO_NAME%d-L_GNU_LTO_NAME%d\n", + count, count+1, count); + fprintf (asm_out_file, "\t.asciz\t\"%s\"\n", ref->sectname); + } + fprintf (asm_out_file, "L_GNU_LTO_NAME%d:\t;# end\n", lto_section_num); + /* make sure our termination label stays in this section. */ + fputs ("\t.space\t1\n", asm_out_file); + + /* Emit the Index. */ + fprintf (asm_out_file, "\t.section %s,%s,regular,debug\n", + LTO_SEGMENT_NAME, LTO_INDEX_SECTION); + fputs ("\t.align\t2\n", asm_out_file); + fputs ("# Section offset, Section length, Name offset, Name length\n", + asm_out_file); + FOR_EACH_VEC_ELT (darwin_lto_section_e, lto_section_names, count, ref) + { + fprintf (asm_out_file, "%s L$gnu$lto$offs%d\t;# %s\n", + op, count, ref->sectname); + fprintf (asm_out_file, "%s L$gnu$lto$size%d\n", op, count); + fprintf (asm_out_file, "%s L$gnu$lto$noff%d\n", op, count); + fprintf (asm_out_file, "%s L$gnu$lto$nsiz%d\n", op, count); + } } - obstack_free (<o_section_names_obstack, NULL); /* If we have section anchors, then we must prevent the linker from re-arranging data. */ diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index e89e4e6730b..fb2b7348cb4 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,17 @@ +2011-11-13 Iain Sandoe + + PR target/48108 + Backport from mainline r180523 + * simple-object-mach-o.c (GNU_WRAPPER_SECTS, GNU_WRAPPER_INDEX, + GNU_WRAPPER_NAMES): New macros. + (simple_object_mach_o_segment): Handle wrapper scheme. + (simple_object_mach_o_write_section_header): Allow the segment name + to be supplied. + (simple_object_mach_o_write_segment): Handle wrapper scheme. Ensure + that the top-level segment name in the load command is empty. + (simple_object_mach_o_write_to_file): Determine the number of + sections during segment output, use that in writing the header. + 2011-10-26 Release Manager * GCC 4.6.2 released. diff --git a/libiberty/simple-object-mach-o.c b/libiberty/simple-object-mach-o.c index bbbbd09de58..af5e4f9ca88 100644 --- a/libiberty/simple-object-mach-o.c +++ b/libiberty/simple-object-mach-o.c @@ -1,5 +1,5 @@ /* simple-object-mach-o.c -- routines to manipulate Mach-O object files. - Copyright 2010 Free Software Foundation, Inc. + Copyright 2010, 2011 Free Software Foundation, Inc. Written by Ian Lance Taylor, Google. This program is free software; you can redistribute it and/or modify it @@ -174,6 +174,15 @@ struct mach_o_section_64 #define GNU_SECTION_NAMES "__section_names" +/* A GNU-specific extension to wrap multiple sections using three + mach-o sections within a given segment. The section '__wrapper_sects' + is subdivided according to the index '__wrapper_index' and each sub + sect is named according to the names supplied in '__wrapper_names'. */ + +#define GNU_WRAPPER_SECTS "__wrapper_sects" +#define GNU_WRAPPER_INDEX "__wrapper_index" +#define GNU_WRAPPER_NAMES "__wrapper_names" + /* Private data for an simple_object_read. */ struct simple_object_mach_o_read @@ -214,7 +223,18 @@ struct simple_object_mach_o_attributes unsigned int reserved; }; -/* See if we have a Mach-O file. */ +/* See if we have a Mach-O MH_OBJECT file: + + A standard MH_OBJECT (from as) will have three load commands: + 0 - LC_SEGMENT/LC_SEGMENT64 + 1 - LC_SYMTAB + 2 - LC_DYSYMTAB + + The LC_SEGMENT/LC_SEGMENT64 will introduce a single anonymous segment + containing all the sections. + + Files written by simple-object will have only the segment command + (no symbol tables). */ static void * simple_object_mach_o_match ( @@ -356,8 +376,29 @@ simple_object_mach_o_section_info (int is_big_endian, int is_32, } } -/* Handle a segment in a Mach-O file. Return 1 if we should continue, - 0 if the caller should return. */ +/* Handle a segment in a Mach-O Object file. + + This will callback to the function pfn for each "section found" the meaning + of which depends on gnu extensions to mach-o: + + If we find mach-o sections (with the segment name as specified) which also + contain: a 'sects' wrapper, an index, and a name table, we expand this into + as many sections as are specified in the index. In this case, there will + be a callback for each of these. + + We will also allow an extension that permits long names (more than 16 + characters) to be used with mach-o. In this case, the section name has + a specific format embedding an index into a name table, and the file must + contain such name table. + + Return 1 if we should continue, 0 if the caller should return. */ + +#define SOMO_SECTS_PRESENT 0x01 +#define SOMO_INDEX_PRESENT 0x02 +#define SOMO_NAMES_PRESENT 0x04 +#define SOMO_LONGN_PRESENT 0x08 +#define SOMO_WRAPPING (SOMO_SECTS_PRESENT | SOMO_INDEX_PRESENT \ + | SOMO_NAMES_PRESENT) static int simple_object_mach_o_segment (simple_object_read *sobj, off_t offset, @@ -378,9 +419,20 @@ simple_object_mach_o_segment (simple_object_read *sobj, off_t offset, unsigned int nsects; unsigned char *secdata; unsigned int i; + unsigned int gnu_sections_found; unsigned int strtab_index; + unsigned int index_index; + unsigned int nametab_index; + unsigned int sections_index; char *strtab; + char *nametab; + unsigned char *index; size_t strtab_size; + size_t nametab_size; + size_t index_size; + unsigned int n_wrapped_sects; + size_t wrapper_sect_size; + off_t wrapper_sect_offset; fetch_32 = (omr->is_big_endian ? simple_object_fetch_big_32 @@ -409,6 +461,8 @@ simple_object_mach_o_segment (simple_object_read *sobj, off_t offset, nsects)); } + /* Fetch the section headers from the segment command. */ + secdata = XNEWVEC (unsigned char, nsects * sechdrsize); if (!simple_object_internal_read (sobj->descriptor, offset + seghdrsize, secdata, nsects * sechdrsize, errmsg, err)) @@ -417,9 +471,13 @@ simple_object_mach_o_segment (simple_object_read *sobj, off_t offset, return 0; } - /* Scan for a __section_names section. This is in effect a GNU - extension that permits section names longer than 16 chars. */ + /* Scan for special sections that signal GNU extensions to the format. */ + gnu_sections_found = 0; + index_index = nsects; + sections_index = nsects; + strtab_index = nsects; + nametab_index = nsects; for (i = 0; i < nsects; ++i) { size_t nameoff; @@ -427,18 +485,103 @@ simple_object_mach_o_segment (simple_object_read *sobj, off_t offset, nameoff = i * sechdrsize + segname_offset; if (strcmp ((char *) secdata + nameoff, omr->segment_name) != 0) continue; + nameoff = i * sechdrsize + sectname_offset; - if (strcmp ((char *) secdata + nameoff, GNU_SECTION_NAMES) == 0) - break; + if (strcmp ((char *) secdata + nameoff, GNU_WRAPPER_NAMES) == 0) + { + nametab_index = i; + gnu_sections_found |= SOMO_NAMES_PRESENT; + } + else if (strcmp ((char *) secdata + nameoff, GNU_WRAPPER_INDEX) == 0) + { + index_index = i; + gnu_sections_found |= SOMO_INDEX_PRESENT; + } + else if (strcmp ((char *) secdata + nameoff, GNU_WRAPPER_SECTS) == 0) + { + sections_index = i; + gnu_sections_found |= SOMO_SECTS_PRESENT; + } + else if (strcmp ((char *) secdata + nameoff, GNU_SECTION_NAMES) == 0) + { + strtab_index = i; + gnu_sections_found |= SOMO_LONGN_PRESENT; + } } - strtab_index = i; - if (strtab_index >= nsects) + /* If any of the special wrapper section components is present, then + they all should be. */ + + if ((gnu_sections_found & SOMO_WRAPPING) != 0) { - strtab = NULL; - strtab_size = 0; + off_t nametab_offset; + off_t index_offset; + + if ((gnu_sections_found & SOMO_WRAPPING) != SOMO_WRAPPING) + { + *errmsg = "GNU Mach-o section wrapper: required section missing"; + *err = 0; /* No useful errno. */ + XDELETEVEC (secdata); + return 0; + } + + /* Fetch the name table. */ + + simple_object_mach_o_section_info (omr->is_big_endian, is_32, + secdata + nametab_index * sechdrsize, + &nametab_offset, &nametab_size); + nametab = XNEWVEC (char, nametab_size); + if (!simple_object_internal_read (sobj->descriptor, + sobj->offset + nametab_offset, + (unsigned char *) nametab, nametab_size, + errmsg, err)) + { + XDELETEVEC (nametab); + XDELETEVEC (secdata); + return 0; + } + + /* Fetch the index. */ + + simple_object_mach_o_section_info (omr->is_big_endian, is_32, + secdata + index_index * sechdrsize, + &index_offset, &index_size); + index = XNEWVEC (unsigned char, index_size); + if (!simple_object_internal_read (sobj->descriptor, + sobj->offset + index_offset, + index, index_size, + errmsg, err)) + { + XDELETEVEC (index); + XDELETEVEC (nametab); + XDELETEVEC (secdata); + return 0; + } + + /* The index contains 4 unsigned ints per sub-section: + sub-section offset/length, sub-section name/length. + We fix this for both 32 and 64 bit mach-o for now, since + other fields limit the maximum size of an object to 4G. */ + n_wrapped_sects = index_size / 16; + + /* Get the parameters for the wrapper too. */ + simple_object_mach_o_section_info (omr->is_big_endian, is_32, + secdata + sections_index * sechdrsize, + &wrapper_sect_offset, + &wrapper_sect_size); } else + { + index = NULL; + index_size = 0; + nametab = NULL; + nametab_size = 0; + n_wrapped_sects = 0; + } + + /* If we have a long names section, fetch it. */ + + if ((gnu_sections_found & SOMO_LONGN_PRESENT) != 0) { off_t strtab_offset; @@ -452,52 +595,120 @@ simple_object_mach_o_segment (simple_object_read *sobj, off_t offset, errmsg, err)) { XDELETEVEC (strtab); + XDELETEVEC (index); + XDELETEVEC (nametab); XDELETEVEC (secdata); return 0; } } + else + { + strtab = NULL; + strtab_size = 0; + strtab_index = nsects; + } /* Process the sections. */ for (i = 0; i < nsects; ++i) { const unsigned char *sechdr; - char namebuf[MACH_O_NAME_LEN + 1]; + char namebuf[MACH_O_NAME_LEN * 2 + 2]; char *name; off_t secoffset; size_t secsize; + int l; - if (i == strtab_index) + sechdr = secdata + i * sechdrsize; + + /* We've already processed the long section names. */ + + if ((gnu_sections_found & SOMO_LONGN_PRESENT) != 0 + && i == strtab_index) continue; - sechdr = secdata + i * sechdrsize; + /* We only act on the segment named. */ if (strcmp ((char *) sechdr + segname_offset, omr->segment_name) != 0) continue; - memcpy (namebuf, sechdr + sectname_offset, MACH_O_NAME_LEN); - namebuf[MACH_O_NAME_LEN] = '\0'; + /* Process sections associated with the wrapper. */ - name = &namebuf[0]; - if (strtab != NULL && name[0] == '_' && name[1] == '_') + if ((gnu_sections_found & SOMO_WRAPPING) != 0) { - unsigned long stringoffset; + if (i == nametab_index || i == index_index) + continue; - if (sscanf (name + 2, "%08lX", &stringoffset) == 1) + if (i == sections_index) { - if (stringoffset >= strtab_size) + unsigned int j; + for (j = 0; j < n_wrapped_sects; ++j) { - *errmsg = "section name offset out of range"; - *err = 0; - XDELETEVEC (strtab); - XDELETEVEC (secdata); - return 0; + unsigned int subsect_offset, subsect_length, name_offset; + subsect_offset = (*fetch_32) (index + 16 * j); + subsect_length = (*fetch_32) (index + 16 * j + 4); + name_offset = (*fetch_32) (index + 16 * j + 8); + /* We don't need the name_length yet. */ + + secoffset = wrapper_sect_offset + subsect_offset; + secsize = subsect_length; + name = nametab + name_offset; + + if (!(*pfn) (data, name, secoffset, secsize)) + { + *errmsg = NULL; + *err = 0; + XDELETEVEC (index); + XDELETEVEC (nametab); + XDELETEVEC (strtab); + XDELETEVEC (secdata); + return 0; + } } - - name = strtab + stringoffset; + continue; } } + if ((gnu_sections_found & SOMO_LONGN_PRESENT) != 0) + { + memcpy (namebuf, sechdr + sectname_offset, MACH_O_NAME_LEN); + namebuf[MACH_O_NAME_LEN] = '\0'; + + name = &namebuf[0]; + if (strtab != NULL && name[0] == '_' && name[1] == '_') + { + unsigned long stringoffset; + + if (sscanf (name + 2, "%08lX", &stringoffset) == 1) + { + if (stringoffset >= strtab_size) + { + *errmsg = "section name offset out of range"; + *err = 0; + XDELETEVEC (index); + XDELETEVEC (nametab); + XDELETEVEC (strtab); + XDELETEVEC (secdata); + return 0; + } + + name = strtab + stringoffset; + } + } + } + else + { + /* Otherwise, make a name like __segment,__section as per the + convention in mach-o asm. */ + name = &namebuf[0]; + memset (namebuf, 0, MACH_O_NAME_LEN * 2 + 2); + memcpy (namebuf, (char *) sechdr + segname_offset, MACH_O_NAME_LEN); + l = strlen (namebuf); + namebuf[l] = ','; + memcpy (namebuf + l + 1, (char *) sechdr + sectname_offset, + MACH_O_NAME_LEN); + } + simple_object_mach_o_section_info (omr->is_big_endian, is_32, sechdr, &secoffset, &secsize); @@ -505,12 +716,16 @@ simple_object_mach_o_segment (simple_object_read *sobj, off_t offset, { *errmsg = NULL; *err = 0; + XDELETEVEC (index); + XDELETEVEC (nametab); XDELETEVEC (strtab); XDELETEVEC (secdata); return 0; } } + XDELETEVEC (index); + XDELETEVEC (nametab); XDELETEVEC (strtab); XDELETEVEC (secdata); @@ -724,9 +939,9 @@ static int simple_object_mach_o_write_section_header (simple_object_write *sobj, int descriptor, size_t sechdr_offset, - const char *name, size_t secaddr, - size_t secsize, size_t offset, - unsigned int align, + const char *name, const char *segn, + size_t secaddr, size_t secsize, + size_t offset, unsigned int align, const char **errmsg, int *err) { struct simple_object_mach_o_attributes *attrs = @@ -748,7 +963,7 @@ simple_object_mach_o_write_section_header (simple_object_write *sobj, strncpy ((char *) hdr + offsetof (struct mach_o_section_32, sectname), name, MACH_O_NAME_LEN); strncpy ((char *) hdr + offsetof (struct mach_o_section_32, segname), - sobj->segment_name, MACH_O_NAME_LEN); + segn, MACH_O_NAME_LEN); set_32 (hdr + offsetof (struct mach_o_section_32, addr), secaddr); set_32 (hdr + offsetof (struct mach_o_section_32, size), secsize); set_32 (hdr + offsetof (struct mach_o_section_32, offset), offset); @@ -773,7 +988,7 @@ simple_object_mach_o_write_section_header (simple_object_write *sobj, strncpy ((char *) hdr + offsetof (struct mach_o_section_64, sectname), name, MACH_O_NAME_LEN); strncpy ((char *) hdr + offsetof (struct mach_o_section_64, segname), - sobj->segment_name, MACH_O_NAME_LEN); + segn, MACH_O_NAME_LEN); set_64 (hdr + offsetof (struct mach_o_section_64, addr), secaddr); set_64 (hdr + offsetof (struct mach_o_section_64, size), secsize); set_32 (hdr + offsetof (struct mach_o_section_64, offset), offset); @@ -793,11 +1008,25 @@ simple_object_mach_o_write_section_header (simple_object_write *sobj, sechdrsize, errmsg, err); } -/* Write out the single segment and the sections of a Mach-O file. */ +/* Write out the single (anonymous) segment containing the sections of a Mach-O + Object file. + + As a GNU extension to mach-o, when the caller specifies a segment name in + sobj->segment_name, all the sections passed will be output under a single + mach-o section header. The caller's sections are indexed within this + 'wrapper' section by a table stored in a second mach-o section. Finally, + arbitrary length section names are permitted by the extension and these are + stored in a table in a third mach-o section. + + Note that this is only likely to make any sense for the __GNU_LTO segment + at present. + + If the wrapper extension is not in force, we assume that the section name + is in the form __SEGMENT_NAME,__section_name as per Mach-O asm. */ static int simple_object_mach_o_write_segment (simple_object_write *sobj, int descriptor, - size_t nsects, const char **errmsg, + size_t *nsects, const char **errmsg, int *err) { struct simple_object_mach_o_attributes *attrs = @@ -814,6 +1043,10 @@ simple_object_mach_o_write_segment (simple_object_write *sobj, int descriptor, simple_object_write_section *section; unsigned char hdrbuf[sizeof (struct mach_o_segment_command_64)]; unsigned char *hdr; + size_t nsects_in; + unsigned int *index; + char *snames; + unsigned int sect; set_32 = (attrs->is_big_endian ? simple_object_set_big_32 @@ -834,19 +1067,62 @@ simple_object_mach_o_write_segment (simple_object_write *sobj, int descriptor, sechdrsize = sizeof (struct mach_o_section_64); } + name_offset = 0; + *nsects = nsects_in = 0; + + /* Count the number of sections we start with. */ + + for (section = sobj->sections; section != NULL; section = section->next) + nsects_in++; + + if (sobj->segment_name != NULL) + { + /* We will only write 3 sections: wrapped data, index and names. */ + + *nsects = 3; + + /* The index has four entries per wrapped section: + Section Offset, length, Name offset, length. + Where the offsets are based at the start of the wrapper and name + sections respectively. + The values are stored as 32 bit int for both 32 and 64 bit mach-o + since the size of a mach-o MH_OBJECT cannot exceed 4G owing to + other constraints. */ + + index = XNEWVEC (unsigned int, nsects_in * 4); + + /* We now need to figure out the size of the names section. This just + stores the names as null-terminated c strings, packed without any + alignment padding. */ + + for (section = sobj->sections, sect = 0; section != NULL; + section = section->next, sect++) + { + index[sect*4+2] = name_offset; + index[sect*4+3] = strlen (section->name) + 1; + name_offset += strlen (section->name) + 1; + } + snames = XNEWVEC (char, name_offset); + } + else + { + *nsects = nsects_in; + index = NULL; + snames = NULL; + } + sechdr_offset = hdrsize + seghdrsize; - cmdsize = seghdrsize + nsects * sechdrsize; + cmdsize = seghdrsize + *nsects * sechdrsize; offset = hdrsize + cmdsize; - name_offset = 0; secaddr = 0; - for (section = sobj->sections; section != NULL; section = section->next) + for (section = sobj->sections, sect = 0; + section != NULL; section = section->next, sect++) { size_t mask; size_t new_offset; size_t secsize; struct simple_object_write_section_buffer *buffer; - char namebuf[MACH_O_NAME_LEN + 1]; mask = (1U << section->align) - 1; new_offset = offset + mask; @@ -877,39 +1153,126 @@ simple_object_mach_o_write_segment (simple_object_write *sobj, int descriptor, secsize += buffer->size; } - snprintf (namebuf, sizeof namebuf, "__%08X", name_offset); + if (sobj->segment_name != NULL) + { + index[sect*4+0] = (unsigned int) offset; + index[sect*4+1] = secsize; + /* Stash the section name in our table. */ + memcpy (snames + index[sect * 4 + 2], section->name, + index[sect * 4 + 3]); + } + else + { + char namebuf[MACH_O_NAME_LEN + 1]; + char segnbuf[MACH_O_NAME_LEN + 1]; + char *comma; + + /* Try to extract segment,section from the input name. */ + + memset (namebuf, 0, sizeof namebuf); + memset (segnbuf, 0, sizeof segnbuf); + comma = strchr (section->name, ','); + if (comma != NULL) + { + int len = comma - section->name; + len = len > MACH_O_NAME_LEN ? MACH_O_NAME_LEN : len; + strncpy (namebuf, section->name, len); + strncpy (segnbuf, comma + 1, MACH_O_NAME_LEN); + } + else /* just try to copy the name, leave segment blank. */ + strncpy (namebuf, section->name, MACH_O_NAME_LEN); + + if (!simple_object_mach_o_write_section_header (sobj, descriptor, + sechdr_offset, + namebuf, segnbuf, + secaddr, secsize, + offset, + section->align, + errmsg, err)) + return 0; + sechdr_offset += sechdrsize; + } + + offset += secsize; + secaddr += secsize; + } + + if (sobj->segment_name != NULL) + { + size_t secsize; + unsigned int i; + + /* Write the section header for the wrapper. */ + /* Account for any initial aligment - which becomes the alignment for this + created section. */ + + secsize = (offset - index[0]); if (!simple_object_mach_o_write_section_header (sobj, descriptor, - sechdr_offset, namebuf, - secaddr, secsize, offset, - section->align, + sechdr_offset, + GNU_WRAPPER_SECTS, + sobj->segment_name, + 0 /*secaddr*/, + secsize, index[0], + sobj->sections->align, errmsg, err)) return 0; + /* Subtract the wrapper section start from the begining of each sub + section. */ + + for (i = 1; i < nsects_in; ++i) + index[4 * i] -= index[0]; + index[0] = 0; + sechdr_offset += sechdrsize; - offset += secsize; - name_offset += strlen (section->name) + 1; - secaddr += secsize; - } - /* Write out the section names. */ + /* Write out the section names. + ... the header ... + name_offset contains the length of the section. It is not aligned. */ - if (!simple_object_mach_o_write_section_header (sobj, descriptor, - sechdr_offset, - GNU_SECTION_NAMES, secaddr, - name_offset, offset, 0, - errmsg, err)) - return 0; + if (!simple_object_mach_o_write_section_header (sobj, descriptor, + sechdr_offset, + GNU_WRAPPER_NAMES, + sobj->segment_name, + 0 /*secaddr*/, + name_offset, + offset, + 0, errmsg, err)) + return 0; - for (section = sobj->sections; section != NULL; section = section->next) - { - size_t namelen; + /* ... and the content.. */ + if (!simple_object_internal_write (descriptor, offset, + (const unsigned char *) snames, + name_offset, errmsg, err)) + return 0; + + sechdr_offset += sechdrsize; + secaddr += name_offset; + offset += name_offset; + + /* Now do the index, we'll align this to 4 bytes although the read code + will handle unaligned. */ + + offset += 3; + offset &= ~0x03; + if (!simple_object_mach_o_write_section_header (sobj, descriptor, + sechdr_offset, + GNU_WRAPPER_INDEX, + sobj->segment_name, + 0 /*secaddr*/, + nsects_in * 16, + offset, + 2, errmsg, err)) + return 0; - namelen = strlen (section->name) + 1; + /* ... and the content.. */ if (!simple_object_internal_write (descriptor, offset, - (const unsigned char *) section->name, - namelen, errmsg, err)) + (const unsigned char *) index, + nsects_in*16, errmsg, err)) return 0; - offset += namelen; + + XDELETEVEC (index); + XDELETEVEC (snames); } /* Write out the segment header. */ @@ -923,9 +1286,8 @@ simple_object_mach_o_write_segment (simple_object_write *sobj, int descriptor, MACH_O_LC_SEGMENT); set_32 (hdr + offsetof (struct mach_o_segment_command_32, cmdsize), cmdsize); - strncpy (((char *) hdr - + offsetof (struct mach_o_segment_command_32, segname)), - sobj->segment_name, MACH_O_NAME_LEN); + /* MH_OBJECTS have a single, anonymous, segment - so the segment name + is left empty. */ /* vmaddr left as zero. */ /* vmsize left as zero. */ set_32 (hdr + offsetof (struct mach_o_segment_command_32, fileoff), @@ -935,7 +1297,7 @@ simple_object_mach_o_write_segment (simple_object_write *sobj, int descriptor, /* maxprot left as zero. */ /* initprot left as zero. */ set_32 (hdr + offsetof (struct mach_o_segment_command_32, nsects), - nsects); + *nsects); /* flags left as zero. */ } else @@ -951,9 +1313,8 @@ simple_object_mach_o_write_segment (simple_object_write *sobj, int descriptor, MACH_O_LC_SEGMENT); set_32 (hdr + offsetof (struct mach_o_segment_command_64, cmdsize), cmdsize); - strncpy (((char *) hdr - + offsetof (struct mach_o_segment_command_64, segname)), - sobj->segment_name, MACH_O_NAME_LEN); + /* MH_OBJECTS have a single, anonymous, segment - so the segment name + is left empty. */ /* vmaddr left as zero. */ /* vmsize left as zero. */ set_64 (hdr + offsetof (struct mach_o_segment_command_64, fileoff), @@ -963,7 +1324,7 @@ simple_object_mach_o_write_segment (simple_object_write *sobj, int descriptor, /* maxprot left as zero. */ /* initprot left as zero. */ set_32 (hdr + offsetof (struct mach_o_segment_command_64, nsects), - nsects); + *nsects); /* flags left as zero. */ #endif } @@ -978,23 +1339,17 @@ static const char * simple_object_mach_o_write_to_file (simple_object_write *sobj, int descriptor, int *err) { - size_t nsects; - simple_object_write_section *section; + size_t nsects = 0; const char *errmsg; - /* Start at 1 for symbol_names section. */ - nsects = 1; - for (section = sobj->sections; section != NULL; section = section->next) - ++nsects; + if (!simple_object_mach_o_write_segment (sobj, descriptor, &nsects, + &errmsg, err)) + return errmsg; if (!simple_object_mach_o_write_header (sobj, descriptor, nsects, &errmsg, err)) return errmsg; - if (!simple_object_mach_o_write_segment (sobj, descriptor, nsects, - &errmsg, err)) - return errmsg; - return NULL; } -- cgit v1.2.3 From f72f9db82a8ce31ee5ed798ae44f21e03ed0e556 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sun, 13 Nov 2011 14:25:58 +0000 Subject: ada: Backport from mainline r181319 * gcc-interface/Makefile.in (stamp-gnatlib-$(RTSDIR)): Don't link s-oscons.ads. (OSCONS_CPP, OSCONS_EXTRACT): New. (./bldtools/oscons/xoscons): New Target. ($(RTSDIR)/s-oscons.ads): New Target. (gnatlib): Depend on $(RTSDIR)/s-oscons.ads. * Make-generated.in: Remove machinery to generate xoscons and ada/s-oscons.ads. libada: Backport from mainline r181319 Makefile.in: Change dependency on oscons to depend on the generator tool. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181337 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/ChangeLog | 12 ++++++++++++ gcc/ada/Make-generated.in | 31 ------------------------------- gcc/ada/gcc-interface/Makefile.in | 39 +++++++++++++++++++++++++++++++++++---- libada/ChangeLog | 6 ++++++ libada/Makefile.in | 11 ++++++----- 5 files changed, 59 insertions(+), 40 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 7a6331662bc..97484e5c691 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,15 @@ +2011-11-13 Iain Sandoe + + Backport from mainline r181319 + * gcc-interface/Makefile.in (stamp-gnatlib-$(RTSDIR)): Don't link + s-oscons.ads. + (OSCONS_CPP, OSCONS_EXTRACT): New. + (./bldtools/oscons/xoscons): New Target. + ($(RTSDIR)/s-oscons.ads): New Target. + (gnatlib): Depend on $(RTSDIR)/s-oscons.ads. + * Make-generated.in: Remove machinery to generate xoscons and + ada/s-oscons.ads. + 2011-10-26 Release Manager * GCC 4.6.2 released. diff --git a/gcc/ada/Make-generated.in b/gcc/ada/Make-generated.in index 30ce14e916d..ac52e491eeb 100644 --- a/gcc/ada/Make-generated.in +++ b/gcc/ada/Make-generated.in @@ -64,37 +64,6 @@ $(ADA_GEN_SUBDIR)/nmake.ads : $(ADA_GEN_SUBDIR)/sinfo.ads $(ADA_GEN_SUBDIR)/nma $(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/nmake_s (cd $(ADA_GEN_SUBDIR)/bldtools/nmake_s; gnatmake -q xnmake ; ./xnmake -s ../../nmake.ads ) -ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(subst -, ,$(host)))),) -OSCONS_CPP=../../../$(DECC) -E /comment=as_is -DNATIVE \ - -DTARGET='""$(target)""' s-oscons-tmplt.c - -OSCONS_EXTRACT=../../../$(DECC) -DNATIVE \ - -DTARGET='""$(target)""' s-oscons-tmplt.c ; \ - ld -o s-oscons-tmplt.exe s-oscons-tmplt.obj; \ - ./s-oscons-tmplt.exe > s-oscons-tmplt.s - -else -# GCC_FOR_TARGET has paths relative to the gcc directory, so we need to ajust -# for running it from $(ADA_GEN_SUBDIR)/bldtools/oscons -OSCONS_CC=`echo "$(GCC_FOR_TARGET)" \ - | sed -e 's^\./xgcc^../../../xgcc^' -e 's^-B./^-B../../../^'` -OSCONS_CPP=$(OSCONS_CC) $(GNATLIBCFLAGS) -E -C \ - -DTARGET=\"$(target)\" s-oscons-tmplt.c > s-oscons-tmplt.i -OSCONS_EXTRACT=$(OSCONS_CC) -S s-oscons-tmplt.i -endif - -$(ADA_GEN_SUBDIR)/s-oscons.ads : $(ADA_GEN_SUBDIR)/s-oscons-tmplt.c $(ADA_GEN_SUBDIR)/gsocket.h $(ADA_GEN_SUBDIR)/xoscons.adb $(ADA_GEN_SUBDIR)/xutil.ads $(ADA_GEN_SUBDIR)/xutil.adb - -$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/oscons - $(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/oscons/,$(notdir $^)) - $(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/oscons - (cd $(ADA_GEN_SUBDIR)/bldtools/oscons ; gnatmake -q xoscons ; \ - $(RM) s-oscons-tmplt.i s-oscons-tmplt.s ; \ - $(OSCONS_CPP) ; \ - $(OSCONS_EXTRACT) ; \ - ./xoscons ; \ - $(RM) ../../s-oscons.ads ; \ - $(CP) s-oscons.ads s-oscons.h ../../) - $(ADA_GEN_SUBDIR)/sdefault.adb: $(ADA_GEN_SUBDIR)/stamp-sdefault ; @true $(ADA_GEN_SUBDIR)/stamp-sdefault : $(srcdir)/version.c Makefile $(ECHO) "pragma Style_Checks (Off);" >tmp-sdefault.adb diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in index 5e564c875fd..fa3aec5d193 100644 --- a/gcc/ada/gcc-interface/Makefile.in +++ b/gcc/ada/gcc-interface/Makefile.in @@ -2447,21 +2447,52 @@ install-gnatlib: ../stamp-gnatlib-$(RTSDIR) $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \ $(LN_S) $(fsrcpfx)ada/$(word 2,$(subst <, ,$(PAIR))) \ $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR)));) -# Copy generated target dependent sources - $(RM) $(RTSDIR)/s-oscons.ads - (cd $(RTSDIR); $(LN_S) ../s-oscons.ads s-oscons.ads) +# Copy tsystem.h + $(CP) $(srcdir)/tsystem.h $(RTSDIR) $(RM) ../stamp-gnatlib-$(RTSDIR) touch ../stamp-gnatlib1-$(RTSDIR) # GNULLI End ############################################################# +ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(subst -, ,$(host)))),) +OSCONS_CPP=../../$(DECC) -E /comment=as_is -DNATIVE \ + -DTARGET='""$(target)""' $(fsrcpfx)ada/s-oscons-tmplt.c + +OSCONS_EXTRACT=../../$(DECC) -DNATIVE \ + -DTARGET='""$(target)""' $(fsrcpfx)ada/s-oscons-tmplt.c ; \ + ld -o s-oscons-tmplt.exe s-oscons-tmplt.obj; \ + ./s-oscons-tmplt.exe > s-oscons-tmplt.s + +else +# GCC_FOR_TARGET has paths relative to the gcc directory, so we need to adjust +# for running it from $(RTSDIR) +OSCONS_CC=`echo "$(GCC_FOR_TARGET)" \ + | sed -e 's^\./xgcc^../../xgcc^' -e 's^-B./^-B../../^'` +OSCONS_CPP=$(OSCONS_CC) $(GNATLIBCFLAGS) -E -C \ + -DTARGET=\"$(target)\" $(fsrcpfx)ada/s-oscons-tmplt.c > s-oscons-tmplt.i +OSCONS_EXTRACT=$(OSCONS_CC) -S s-oscons-tmplt.i +endif + +./bldtools/oscons/xoscons: xoscons.adb xutil.ads xutil.adb + -$(MKDIR) ./bldtools/oscons + $(RM) $(addprefix ./bldtools/oscons/,$(notdir $^)) + $(CP) $^ ./bldtools/oscons + (cd ./bldtools/oscons ; gnatmake -q xoscons) + +$(RTSDIR)/s-oscons.ads: ../stamp-gnatlib1-$(RTSDIR) s-oscons-tmplt.c gsocket.h ./bldtools/oscons/xoscons + $(RM) $(RTSDIR)/s-oscons-tmplt.i $(RTSDIR)/s-oscons-tmplt.s + (cd $(RTSDIR) ; \ + $(OSCONS_CPP) ; \ + $(OSCONS_EXTRACT) ; \ + ../bldtools/oscons/xoscons) + # Don't use semicolon separated shell commands that involve list expansions. # The semicolon triggers a call to DCL on VMS and DCL can't handle command # line lengths in excess of 256 characters. # Example: cd $(RTSDIR); ar rc libfoo.a $(LONG_LIST_OF_OBJS) # is guaranteed to overflow the buffer. -gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR) +gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR) $(RTSDIR)/s-oscons.ads $(MAKE) -C $(RTSDIR) \ CC="`echo \"$(GCC_FOR_TARGET)\" \ | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \ diff --git a/libada/ChangeLog b/libada/ChangeLog index bcfcd91a187..ce786fa7ae0 100644 --- a/libada/ChangeLog +++ b/libada/ChangeLog @@ -1,3 +1,9 @@ +2011-11-13 Iain Sandoe + + Backport from mainline r181319 + Makefile.in: Change dependency on oscons to depend on the generator + tool. + 2011-10-26 Release Manager * GCC 4.6.2 released. diff --git a/libada/Makefile.in b/libada/Makefile.in index cd518239b21..2fa1c6a8c8f 100644 --- a/libada/Makefile.in +++ b/libada/Makefile.in @@ -70,6 +70,7 @@ target_noncanonical:=@target_noncanonical@ version := $(shell cat $(srcdir)/../gcc/BASE-VER) libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR) ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR)) +ADA_RTS_SUBDIR=./rts$(subst /,_,$(MULTISUBDIR)) # exeext should not be used because it's the *host* exeext. We're building # a *target* library, aren't we?!? Likewise for CC. Still, provide bogus @@ -96,10 +97,10 @@ LIBADA_FLAGS_TO_PASS = \ "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)" # Rules to build gnatlib. -.PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared oscons +.PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared osconstool gnatlib: @default_gnatlib_target@ -gnatlib-plain: oscons $(GCC_DIR)/ada/Makefile +gnatlib-plain: osconstool $(GCC_DIR)/ada/Makefile test -f stamp-libada || \ $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) gnatlib \ && touch stamp-libada @@ -108,7 +109,7 @@ gnatlib-plain: oscons $(GCC_DIR)/ada/Makefile $(LN_S) $(ADA_RTS_DIR) adainclude $(LN_S) $(ADA_RTS_DIR) adalib -gnatlib-sjlj gnatlib-zcx gnatlib-shared: oscons $(GCC_DIR)/ada/Makefile +gnatlib-sjlj gnatlib-zcx gnatlib-shared: osconstool $(GCC_DIR)/ada/Makefile test -f stamp-libada || \ $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) $@ \ && touch stamp-libada @@ -117,8 +118,8 @@ gnatlib-sjlj gnatlib-zcx gnatlib-shared: oscons $(GCC_DIR)/ada/Makefile $(LN_S) $(ADA_RTS_DIR) adainclude $(LN_S) $(ADA_RTS_DIR) adalib -oscons: - $(MAKE) -C $(GCC_DIR) $(LIBADA_FLAGS_TO_PASS) ada/s-oscons.ads +osconstool: + $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) ./bldtools/oscons/xoscons install-gnatlib: $(GCC_DIR)/ada/Makefile $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) install-gnatlib -- cgit v1.2.3 From 63b9b8aacc336a1d70af60b2ac9e8913a47c80d4 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Mon, 14 Nov 2011 00:18:15 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181344 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 765e753c817..89ee407b8f1 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111113 +20111114 -- cgit v1.2.3 From 2469ab1b92d236afb458098f5a89d8226ed153ee Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Tue, 15 Nov 2011 00:18:13 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181375 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 89ee407b8f1..601844d0a4f 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111114 +20111115 -- cgit v1.2.3 From 7718c10e51a68373419a7b29d9400f6d516f0f18 Mon Sep 17 00:00:00 2001 From: Jason Dick Date: Tue, 15 Nov 2011 10:49:20 +0000 Subject: 2011-11-15 Jason Dick PR libstdc++/51133 * include/tr1/poly_hermite.tcc (__poly_hermite_recursion): Fix wrong sign in recursion relation. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181382 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 6 ++++++ libstdc++-v3/include/tr1/poly_hermite.tcc | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 99bde20a629..1a8b52e5219 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2011-11-15 Jason Dick + + PR libstdc++/51133 + * include/tr1/poly_hermite.tcc (__poly_hermite_recursion): Fix + wrong sign in recursion relation. + 2011-11-02 Richard B. Kreckel Paolo Carlini diff --git a/libstdc++-v3/include/tr1/poly_hermite.tcc b/libstdc++-v3/include/tr1/poly_hermite.tcc index e86b3777c74..95e8079d543 100644 --- a/libstdc++-v3/include/tr1/poly_hermite.tcc +++ b/libstdc++-v3/include/tr1/poly_hermite.tcc @@ -1,6 +1,6 @@ // Special functions -*- C++ -*- -// Copyright (C) 2006, 2007, 2008, 2009, 2010 +// Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -84,7 +84,7 @@ namespace tr1 unsigned int __i; for (__H_nm2 = __H_0, __H_nm1 = __H_1, __i = 2; __i <= __n; ++__i) { - __H_n = 2 * (__x * __H_nm1 + (__i - 1) * __H_nm2); + __H_n = 2 * (__x * __H_nm1 - (__i - 1) * __H_nm2); __H_nm2 = __H_nm1; __H_nm1 = __H_n; } -- cgit v1.2.3 From d2ab67b509d5a08c31019d18518cd670d0830979 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Wed, 16 Nov 2011 00:18:08 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181398 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 601844d0a4f..b4ae540ba34 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111115 +20111116 -- cgit v1.2.3 From 0d7fc9f2a86953ef393e6d570a0fcff2aa173cdb Mon Sep 17 00:00:00 2001 From: Richard Earnshaw Date: Wed, 16 Nov 2011 17:53:28 +0000 Subject: 2011-11-16 Richard Earnshaw Bernd Schmidt Sebastian Huber PR target/49641 * config/arm/arm.c (store_multiple_sequence): Avoid cases where the base reg is stored iff compiling for Thumb1. * gcc.target/arm/pr49641.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181418 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 8 ++++++++ gcc/config/arm/arm.c | 7 ++++++- gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/gcc.target/arm/pr49641.c | 18 ++++++++++++++++++ 4 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.target/arm/pr49641.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 43a5a72cf66..49cc0d2e622 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2011-11-16 Richard Earnshaw + Bernd Schmidt + Sebastian Huber + + PR target/49641 + * config/arm/arm.c (store_multiple_sequence): Avoid cases where + the base reg is stored iff compiling for Thumb1. + 2011-11-13 Iain Sandoe PR target/48108 diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index fcdb8a1814d..75174a323fa 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -9812,6 +9812,9 @@ store_multiple_sequence (rtx *operands, int nops, int nops_total, rtx base_reg_rtx = NULL; int i, stm_case; + /* Write back of base register is currently only supported for Thumb 1. */ + int base_writeback = TARGET_THUMB1; + /* Can only handle up to MAX_LDM_STM_OPS insns at present, though could be easily extended if required. */ gcc_assert (nops >= 2 && nops <= MAX_LDM_STM_OPS); @@ -9869,7 +9872,9 @@ store_multiple_sequence (rtx *operands, int nops, int nops_total, /* If it isn't an integer register, then we can't do this. */ if (unsorted_regs[i] < 0 || (TARGET_THUMB1 && unsorted_regs[i] > LAST_LO_REGNUM) - || (TARGET_THUMB2 && unsorted_regs[i] == base_reg) + /* The effects are unpredictable if the base register is + both updated and stored. */ + || (base_writeback && unsorted_regs[i] == base_reg) || (TARGET_THUMB2 && unsorted_regs[i] == SP_REGNUM) || unsorted_regs[i] > 14) return 0; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index dd7356c9704..17a000e5ae3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2011-11-16 Richard Earnshaw + Bernd Schmidt + Sebastian Huber + + PR target/49641 + * gcc.target/arm/pr49641.c: New test. + 2011-11-10 Jakub Jelinek PR middle-end/51077 diff --git a/gcc/testsuite/gcc.target/arm/pr49641.c b/gcc/testsuite/gcc.target/arm/pr49641.c new file mode 100644 index 00000000000..7f9b3769c1a --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pr49641.c @@ -0,0 +1,18 @@ +/* { dg-do compile } */ +/* { dg-options "-mthumb -O2" } */ +/* { dg-require-effective-target arm_thumb1_ok } */ +/* { dg-final { scan-assembler-not "stmia\[\\t \]*r3!\[^\\n]*r3" } } */ +typedef struct { + void *t1, *t2, *t3; +} z; +extern volatile int y; +static inline void foo(z *x) { + x->t1 = &x->t2; + x->t2 = ((void *)0); + x->t3 = &x->t1; +} +extern z v; +void bar (void) { + y = 0; + foo(&v); +} -- cgit v1.2.3 From b9deaf67c928f5b89497efdc605e74b34acf29ea Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Wed, 16 Nov 2011 23:11:26 +0000 Subject: 2011-11-16 Paolo Carlini PR libstdc++/51142 * include/debug/unordered_map (unordered_map<>::erase(iterator), unordered_multimap<>::erase(iterator)): Add, consistently with LWG 2059. * include/debug/unordered_set (unordered_set<>::erase(iterator), unordered_multiset<>::erase(iterator)): Likewise. * include/debug/map.h (map<>::erase(iterator)): Likewise. * include/debug/multimap.h (multimap<>::erase(iterator)): Likewise. * include/profile/map.h (map<>::erase(iterator)): Likewise. * include/profile/multimap.h (multimap<>::erase(iterator)): Likewise. * include/bits/hashtable.h (_Hashtable<>::erase(iterator)): Likewise. * include/bits/stl_map.h (map<>::erase(iterator)): Likewise. * include/bits/stl_multimap.h (multimap<>::erase(iterator)): Likewise. * include/bits/stl_tree.h (_Rb_tree<>::erase(iterator)): Likewise. * testsuite/23_containers/unordered_map/erase/51142.cc: New. * testsuite/23_containers/multimap/modifiers/erase/51142.cc: Likewise. * testsuite/23_containers/set/modifiers/erase/51142.cc: Likewise. * testsuite/23_containers/unordered_multimap/erase/51142.cc: Likewise. * testsuite/23_containers/unordered_set/erase/51142.cc: Likewise. * testsuite/23_containers/multiset/modifiers/erase/51142.cc: Likewise. * testsuite/23_containers/unordered_multiset/erase/51142.cc: Likewise. * testsuite/23_containers/map/modifiers/erase/51142.cc: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181427 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 25 ++++++++++++++ libstdc++-v3/include/bits/hashtable.h | 5 +++ libstdc++-v3/include/bits/stl_map.h | 5 +++ libstdc++-v3/include/bits/stl_multimap.h | 5 +++ libstdc++-v3/include/bits/stl_tree.h | 10 ++++++ libstdc++-v3/include/debug/map.h | 4 +++ libstdc++-v3/include/debug/multimap.h | 4 +++ libstdc++-v3/include/debug/unordered_map | 8 +++++ libstdc++-v3/include/debug/unordered_set | 8 +++++ libstdc++-v3/include/profile/map.h | 4 +++ libstdc++-v3/include/profile/multimap.h | 4 +++ .../23_containers/map/modifiers/erase/51142.cc | 38 ++++++++++++++++++++++ .../multimap/modifiers/erase/51142.cc | 38 ++++++++++++++++++++++ .../multiset/modifiers/erase/51142.cc | 38 ++++++++++++++++++++++ .../23_containers/set/modifiers/erase/51142.cc | 38 ++++++++++++++++++++++ .../23_containers/unordered_map/erase/51142.cc | 38 ++++++++++++++++++++++ .../unordered_multimap/erase/51142.cc | 38 ++++++++++++++++++++++ .../unordered_multiset/erase/51142.cc | 38 ++++++++++++++++++++++ .../23_containers/unordered_set/erase/51142.cc | 38 ++++++++++++++++++++++ 19 files changed, 386 insertions(+) create mode 100644 libstdc++-v3/testsuite/23_containers/map/modifiers/erase/51142.cc create mode 100644 libstdc++-v3/testsuite/23_containers/multimap/modifiers/erase/51142.cc create mode 100644 libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/51142.cc create mode 100644 libstdc++-v3/testsuite/23_containers/set/modifiers/erase/51142.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_map/erase/51142.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/51142.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/51142.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_set/erase/51142.cc diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 1a8b52e5219..d668b14f0fb 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,28 @@ +2011-11-16 Paolo Carlini + + PR libstdc++/51142 + * include/debug/unordered_map (unordered_map<>::erase(iterator), + unordered_multimap<>::erase(iterator)): Add, consistently with + LWG 2059. + * include/debug/unordered_set (unordered_set<>::erase(iterator), + unordered_multiset<>::erase(iterator)): Likewise. + * include/debug/map.h (map<>::erase(iterator)): Likewise. + * include/debug/multimap.h (multimap<>::erase(iterator)): Likewise. + * include/profile/map.h (map<>::erase(iterator)): Likewise. + * include/profile/multimap.h (multimap<>::erase(iterator)): Likewise. + * include/bits/hashtable.h (_Hashtable<>::erase(iterator)): Likewise. + * include/bits/stl_map.h (map<>::erase(iterator)): Likewise. + * include/bits/stl_multimap.h (multimap<>::erase(iterator)): Likewise. + * include/bits/stl_tree.h (_Rb_tree<>::erase(iterator)): Likewise. + * testsuite/23_containers/unordered_map/erase/51142.cc: New. + * testsuite/23_containers/multimap/modifiers/erase/51142.cc: Likewise. + * testsuite/23_containers/set/modifiers/erase/51142.cc: Likewise. + * testsuite/23_containers/unordered_multimap/erase/51142.cc: Likewise. + * testsuite/23_containers/unordered_set/erase/51142.cc: Likewise. + * testsuite/23_containers/multiset/modifiers/erase/51142.cc: Likewise. + * testsuite/23_containers/unordered_multiset/erase/51142.cc: Likewise. + * testsuite/23_containers/map/modifiers/erase/51142.cc: Likewise. + 2011-11-15 Jason Dick PR libstdc++/51133 diff --git a/libstdc++-v3/include/bits/hashtable.h b/libstdc++-v3/include/bits/hashtable.h index b9e7a6eaf49..8fdcfbfc387 100644 --- a/libstdc++-v3/include/bits/hashtable.h +++ b/libstdc++-v3/include/bits/hashtable.h @@ -440,6 +440,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION iterator erase(const_iterator); + // LWG 2059. + iterator + erase(iterator __it) + { return erase(const_iterator(__it)); } + size_type erase(const key_type&); diff --git a/libstdc++-v3/include/bits/stl_map.h b/libstdc++-v3/include/bits/stl_map.h index a84b4b61dfb..a1bef8b6ade 100644 --- a/libstdc++-v3/include/bits/stl_map.h +++ b/libstdc++-v3/include/bits/stl_map.h @@ -612,6 +612,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER iterator erase(const_iterator __position) { return _M_t.erase(__position); } + + // LWG 2059. + iterator + erase(iterator __position) + { return _M_t.erase(__position); } #else /** * @brief Erases an element from a %map. diff --git a/libstdc++-v3/include/bits/stl_multimap.h b/libstdc++-v3/include/bits/stl_multimap.h index ca37f359e1b..02e8f58e9c9 100644 --- a/libstdc++-v3/include/bits/stl_multimap.h +++ b/libstdc++-v3/include/bits/stl_multimap.h @@ -533,6 +533,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER iterator erase(const_iterator __position) { return _M_t.erase(__position); } + + // LWG 2059. + iterator + erase(iterator __position) + { return _M_t.erase(__position); } #else /** * @brief Erases an element from a %multimap. diff --git a/libstdc++-v3/include/bits/stl_tree.h b/libstdc++-v3/include/bits/stl_tree.h index 85681d2da36..4001bad57f4 100644 --- a/libstdc++-v3/include/bits/stl_tree.h +++ b/libstdc++-v3/include/bits/stl_tree.h @@ -760,6 +760,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_erase_aux(__position); return __result._M_const_cast(); } + + // LWG 2059. + iterator + erase(iterator __position) + { + iterator __result = __position; + ++__result; + _M_erase_aux(__position); + return __result; + } #else void erase(iterator __position) diff --git a/libstdc++-v3/include/debug/map.h b/libstdc++-v3/include/debug/map.h index 31085197f3c..177797d739c 100644 --- a/libstdc++-v3/include/debug/map.h +++ b/libstdc++-v3/include/debug/map.h @@ -273,6 +273,10 @@ namespace __debug this->_M_invalidate_if(_Equal(__position.base())); return iterator(_Base::erase(__position.base()), this); } + + iterator + erase(iterator __position) + { return erase(const_iterator(__position)); } #else void erase(iterator __position) diff --git a/libstdc++-v3/include/debug/multimap.h b/libstdc++-v3/include/debug/multimap.h index 3c22517b287..d2e1976990b 100644 --- a/libstdc++-v3/include/debug/multimap.h +++ b/libstdc++-v3/include/debug/multimap.h @@ -254,6 +254,10 @@ namespace __debug this->_M_invalidate_if(_Equal(__position.base())); return iterator(_Base::erase(__position.base()), this); } + + iterator + erase(iterator __position) + { return erase(const_iterator(__position)); } #else void erase(iterator __position) diff --git a/libstdc++-v3/include/debug/unordered_map b/libstdc++-v3/include/debug/unordered_map index 2d7e100c43e..43b1e9c2900 100644 --- a/libstdc++-v3/include/debug/unordered_map +++ b/libstdc++-v3/include/debug/unordered_map @@ -275,6 +275,10 @@ namespace __debug return iterator(_Base::erase(__it.base()), this); } + iterator + erase(iterator __it) + { return erase(const_iterator(__it)); } + iterator erase(const_iterator __first, const_iterator __last) { @@ -557,6 +561,10 @@ namespace __debug return iterator(_Base::erase(__it.base()), this); } + iterator + erase(iterator __it) + { return erase(const_iterator(__it)); } + iterator erase(const_iterator __first, const_iterator __last) { diff --git a/libstdc++-v3/include/debug/unordered_set b/libstdc++-v3/include/debug/unordered_set index e30f976d3d6..cf21a3c150a 100644 --- a/libstdc++-v3/include/debug/unordered_set +++ b/libstdc++-v3/include/debug/unordered_set @@ -268,6 +268,10 @@ namespace __debug return iterator(_Base::erase(__it.base()), this); } + iterator + erase(iterator __it) + { return erase(const_iterator(__it)); } + iterator erase(const_iterator __first, const_iterator __last) { @@ -538,6 +542,10 @@ namespace __debug return iterator(_Base::erase(__it.base()), this); } + iterator + erase(iterator __it) + { return erase(const_iterator(__it)); } + iterator erase(const_iterator __first, const_iterator __last) { diff --git a/libstdc++-v3/include/profile/map.h b/libstdc++-v3/include/profile/map.h index 1edc16c7879..a58a2b01a9b 100644 --- a/libstdc++-v3/include/profile/map.h +++ b/libstdc++-v3/include/profile/map.h @@ -326,6 +326,10 @@ namespace __profile __profcxx_map_to_unordered_map_erase(this, size(), 1); return __i; } + + iterator + erase(iterator __position) + { return erase(const_iterator(__position)); } #else void erase(iterator __position) diff --git a/libstdc++-v3/include/profile/multimap.h b/libstdc++-v3/include/profile/multimap.h index 76ce805f3d7..3ee169b24db 100644 --- a/libstdc++-v3/include/profile/multimap.h +++ b/libstdc++-v3/include/profile/multimap.h @@ -225,6 +225,10 @@ namespace __profile iterator erase(const_iterator __position) { return iterator(_Base::erase(__position)); } + + iterator + erase(iterator __position) + { return iterator(_Base::erase(__position)); } #else void erase(iterator __position) diff --git a/libstdc++-v3/testsuite/23_containers/map/modifiers/erase/51142.cc b/libstdc++-v3/testsuite/23_containers/map/modifiers/erase/51142.cc new file mode 100644 index 00000000000..f50b7b7e9fd --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/map/modifiers/erase/51142.cc @@ -0,0 +1,38 @@ +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . +// + +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +#include + +struct X +{ + template + X(T&) {} +}; + +bool operator<(const X&, const X&) { return false; } + +// LWG 2059. +void erasor(std::map& s, X x) +{ + std::map::iterator it = s.find(x); + if (it != s.end()) + s.erase(it); +} diff --git a/libstdc++-v3/testsuite/23_containers/multimap/modifiers/erase/51142.cc b/libstdc++-v3/testsuite/23_containers/multimap/modifiers/erase/51142.cc new file mode 100644 index 00000000000..ee687f77cf6 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/multimap/modifiers/erase/51142.cc @@ -0,0 +1,38 @@ +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . +// + +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +#include + +struct X +{ + template + X(T&) {} +}; + +bool operator<(const X&, const X&) { return false; } + +// LWG 2059. +void erasor(std::multimap& s, X x) +{ + std::multimap::iterator it = s.find(x); + if (it != s.end()) + s.erase(it); +} diff --git a/libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/51142.cc b/libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/51142.cc new file mode 100644 index 00000000000..c5beb6a8dd5 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/51142.cc @@ -0,0 +1,38 @@ +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . +// + +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +#include + +struct X +{ + template + X(T&) {} +}; + +bool operator<(const X&, const X&) { return false; } + +// LWG 2059. +void erasor(std::multiset& s, X x) +{ + std::multiset::iterator it = s.find(x); + if (it != s.end()) + s.erase(it); +} diff --git a/libstdc++-v3/testsuite/23_containers/set/modifiers/erase/51142.cc b/libstdc++-v3/testsuite/23_containers/set/modifiers/erase/51142.cc new file mode 100644 index 00000000000..4fb296a95fc --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/set/modifiers/erase/51142.cc @@ -0,0 +1,38 @@ +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . +// + +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +#include + +struct X +{ + template + X(T&) {} +}; + +bool operator<(const X&, const X&) { return false; } + +// LWG 2059. +void erasor(std::set& s, X x) +{ + std::set::iterator it = s.find(x); + if (it != s.end()) + s.erase(it); +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/erase/51142.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/erase/51142.cc new file mode 100644 index 00000000000..eab637df235 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_map/erase/51142.cc @@ -0,0 +1,38 @@ +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . +// + +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +#include + +struct X +{ + template + X(T&) {} +}; + +bool operator==(const X&, const X&) { return false; } + +// LWG 2059. +void erasor(std::unordered_map& s, X x) +{ + std::unordered_map::iterator it = s.find(x); + if (it != s.end()) + s.erase(it); +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/51142.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/51142.cc new file mode 100644 index 00000000000..678aa5dd989 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/51142.cc @@ -0,0 +1,38 @@ +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . +// + +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +#include + +struct X +{ + template + X(T&) {} +}; + +bool operator==(const X&, const X&) { return false; } + +// LWG 2059. +void erasor(std::unordered_multimap& s, X x) +{ + std::unordered_multimap::iterator it = s.find(x); + if (it != s.end()) + s.erase(it); +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/51142.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/51142.cc new file mode 100644 index 00000000000..4db6af0fa25 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/51142.cc @@ -0,0 +1,38 @@ +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . +// + +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +#include + +struct X +{ + template + X(T&) {} +}; + +bool operator==(const X&, const X&) { return false; } + +// LWG 2059. +void erasor(std::unordered_multiset& s, X x) +{ + std::unordered_multiset::iterator it = s.find(x); + if (it != s.end()) + s.erase(it); +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/erase/51142.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/erase/51142.cc new file mode 100644 index 00000000000..14864604289 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/erase/51142.cc @@ -0,0 +1,38 @@ +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . +// + +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +#include + +struct X +{ + template + X(T&) {} +}; + +bool operator==(const X&, const X&) { return false; } + +// LWG 2059. +void erasor(std::unordered_set& s, X x) +{ + std::unordered_set::iterator it = s.find(x); + if (it != s.end()) + s.erase(it); +} -- cgit v1.2.3 From c599b64f333c9fce618821f0c29fbba0d92d79c0 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 17 Nov 2011 00:18:09 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181430 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index b4ae540ba34..ca86218a014 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111116 +20111117 -- cgit v1.2.3 From 5b55df015b47cf25c8970adfeb4fb025d02092b0 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Fri, 18 Nov 2011 00:18:07 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181463 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index ca86218a014..a41febbbc1c 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111117 +20111118 -- cgit v1.2.3 From caa0f65fd1556d01d0393daa525c9ff20cbaecdc Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Fri, 18 Nov 2011 11:45:44 +0000 Subject: toplevel: PR target/49992 * configure.ac: Remove ranlib special-casing for Darwin. * configure: Regenerate. gcc: PR target/49992 * configure.ac: Remove ranlib special-casing for Darwin. * configure: Regenerate. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181471 138bc75d-0d04-0410-961f-82ee72b054a4 --- ChangeLog | 6 ++++++ configure | 4 ---- configure.ac | 4 ---- gcc/ChangeLog | 6 ++++++ gcc/configure | 16 +++------------- gcc/configure.ac | 12 +----------- 6 files changed, 16 insertions(+), 32 deletions(-) diff --git a/ChangeLog b/ChangeLog index 922e8140b2a..23a41910f52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-11-18 Iain Sandoe + + PR target/49992 + * configure.ac: Remove ranlib special-casing for Darwin. + * configure: Regenerate. + 2011-10-26 Release Manager * GCC 4.6.2 released. diff --git a/configure b/configure index b3cc9ad1029..f41f6d9fbbb 100755 --- a/configure +++ b/configure @@ -6944,10 +6944,6 @@ case "${target}" in extra_arflags_for_target=" -X32_64" extra_nmflags_for_target=" -B -X32_64" ;; - *-*-darwin[3-9]*) - # ranlib before Darwin10 requires the -c flag to look at common symbols. - extra_ranlibflags_for_target=" -c" - ;; mips*-*-pe | sh*-*-pe | *arm-wince-pe) target_makefile_frag="config/mt-wince" ;; diff --git a/configure.ac b/configure.ac index c6615bdd047..ba6d84da43b 100644 --- a/configure.ac +++ b/configure.ac @@ -2428,10 +2428,6 @@ case "${target}" in extra_arflags_for_target=" -X32_64" extra_nmflags_for_target=" -B -X32_64" ;; - *-*-darwin[[3-9]]*) - # ranlib before Darwin10 requires the -c flag to look at common symbols. - extra_ranlibflags_for_target=" -c" - ;; mips*-*-pe | sh*-*-pe | *arm-wince-pe) target_makefile_frag="config/mt-wince" ;; diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 49cc0d2e622..33a3e909850 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-11-18 Iain Sandoe + + PR target/49992 + * configure.ac: Remove ranlib special-casing for Darwin. + * configure: Regenerate. + 2011-11-16 Richard Earnshaw Bernd Schmidt Sebastian Huber diff --git a/gcc/configure b/gcc/configure index 63b5e8b19a9..acb46b9f40b 100755 --- a/gcc/configure +++ b/gcc/configure @@ -7442,17 +7442,7 @@ else RANLIB="$ac_cv_prog_RANLIB" fi -case "${host}" in -*-*-darwin*) - # By default, the Darwin ranlib will not treat common symbols as - # definitions when building the archive table of contents. Other - # ranlibs do that; pass an option to the Darwin ranlib that makes - # it behave similarly. - ranlib_flags="-c" - ;; -*) - ranlib_flags="" -esac +ranlib_flags="" # Find a good install program. We prefer a C program (faster), @@ -17505,7 +17495,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 17508 "configure" +#line 17498 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -17611,7 +17601,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 17614 "configure" +#line 17604 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/gcc/configure.ac b/gcc/configure.ac index 258ea6b9671..505a54da6e0 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -807,17 +807,7 @@ esac gcc_AC_PROG_LN_S ACX_PROG_LN($LN_S) AC_PROG_RANLIB -case "${host}" in -*-*-darwin*) - # By default, the Darwin ranlib will not treat common symbols as - # definitions when building the archive table of contents. Other - # ranlibs do that; pass an option to the Darwin ranlib that makes - # it behave similarly. - ranlib_flags="-c" - ;; -*) - ranlib_flags="" -esac +ranlib_flags="" AC_SUBST(ranlib_flags) gcc_AC_PROG_INSTALL -- cgit v1.2.3 From 66e95733aee16f3c7891fc03383321d38b9dd482 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 18 Nov 2011 11:46:58 +0000 Subject: gcc/ada: 2011-11-18 Tristan Gingold Iain Sandoe PR target/49992 * mlib-tgt-specific-darwin.adb (Archive_Indexer_Options): Remove. * gcc-interface/Makefile.in (darwin): Remove ranlib special-casing for Darwin. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181472 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/ChangeLog | 8 ++++++++ gcc/ada/gcc-interface/Makefile.in | 1 - gcc/ada/mlib-tgt-specific-darwin.adb | 12 ------------ 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 97484e5c691..7ae36459dfd 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,11 @@ +2011-11-18 Tristan Gingold + Iain Sandoe + + PR target/49992 + * mlib-tgt-specific-darwin.adb (Archive_Indexer_Options): Remove. + * gcc-interface/Makefile.in (darwin): Remove ranlib special-casing + for Darwin. + 2011-11-13 Iain Sandoe Backport from mainline r181319 diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in index fa3aec5d193..77027dd82a1 100644 --- a/gcc/ada/gcc-interface/Makefile.in +++ b/gcc/ada/gcc-interface/Makefile.in @@ -2189,7 +2189,6 @@ ifeq ($(strip $(filter-out darwin%,$(osys))),) EH_MECHANISM=-gcc GNATLIB_SHARED = gnatlib-shared-darwin - RANLIB = ranlib -c GMEM_LIB = gmemlib LIBRARY_VERSION := $(LIB_VERSION) soext = .dylib diff --git a/gcc/ada/mlib-tgt-specific-darwin.adb b/gcc/ada/mlib-tgt-specific-darwin.adb index 5bab21df797..fc66423864f 100644 --- a/gcc/ada/mlib-tgt-specific-darwin.adb +++ b/gcc/ada/mlib-tgt-specific-darwin.adb @@ -36,8 +36,6 @@ package body MLib.Tgt.Specific is -- Non default subprograms - function Archive_Indexer_Options return String_List_Access; - procedure Build_Dynamic_Library (Ofiles : Argument_List; Options : Argument_List; @@ -67,15 +65,6 @@ package body MLib.Tgt.Specific is (1 => Flat_Namespace'Access, 2 => Shared_Libgcc'Access); - ----------------------------- - -- Archive_Indexer_Options -- - ----------------------------- - - function Archive_Indexer_Options return String_List_Access is - begin - return new String_List'(1 => new String'("-c")); - end Archive_Indexer_Options; - --------------------------- -- Build_Dynamic_Library -- --------------------------- @@ -180,7 +169,6 @@ package body MLib.Tgt.Specific is end Is_Archive_Ext; begin - Archive_Indexer_Options_Ptr := Archive_Indexer_Options'Access; Build_Dynamic_Library_Ptr := Build_Dynamic_Library'Access; DLL_Ext_Ptr := DLL_Ext'Access; Dynamic_Option_Ptr := Dynamic_Option'Access; -- cgit v1.2.3 From 0bb77d63438ea782736f3de0965bd3d6d735dc8c Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Fri, 18 Nov 2011 15:51:41 +0000 Subject: /cp 2011-11-18 Paolo Carlini PR c++/51150 * pt.c (tsubst_copy_and_build): Handle FIX_TRUNC_EXPR. /testsuite 2011-11-18 Paolo Carlini PR c++/51150 * g++.dg/cpp0x/pr51150.C: New. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181479 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/pt.c | 4 ++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/pr51150.C | 20 ++++++++++++++++++++ 4 files changed, 34 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/pr51150.C diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 58a51fd1e49..aee5bec8347 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2011-11-18 Paolo Carlini + + PR c++/51150 + * pt.c (tsubst_copy_and_build): Handle FIX_TRUNC_EXPR. + 2011-11-07 Jason Merrill PR c++/50870 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 9577bd8f6c6..a94b10f347a 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -12707,6 +12707,10 @@ tsubst_copy_and_build (tree t, return build_x_unary_op (TREE_CODE (t), RECUR (TREE_OPERAND (t, 0)), complain); + case FIX_TRUNC_EXPR: + return cp_build_unary_op (FIX_TRUNC_EXPR, RECUR (TREE_OPERAND (t, 0)), + 0, complain); + case ADDR_EXPR: op1 = TREE_OPERAND (t, 0); if (TREE_CODE (op1) == LABEL_DECL) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 17a000e5ae3..8dc9f39a046 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-11-18 Paolo Carlini + + PR c++/51150 + * g++.dg/cpp0x/pr51150.C: New. + 2011-11-16 Richard Earnshaw Bernd Schmidt Sebastian Huber diff --git a/gcc/testsuite/g++.dg/cpp0x/pr51150.C b/gcc/testsuite/g++.dg/cpp0x/pr51150.C new file mode 100644 index 00000000000..37eb166b43e --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/pr51150.C @@ -0,0 +1,20 @@ +// PR c++/51150 +// { dg-options "-std=c++0x" } + +struct Clock { + double Now(); +}; +template void Foo(Clock* clock) { + const int now = clock->Now(); +} + +template void Foo(Clock*); + +template void Boo(int val) { + const int now1 = (double)(val); + const int now2 = const_cast(val); // { dg-error "invalid" } + const int now3 = static_cast(val); + const int now4 = reinterpret_cast(val); // { dg-error "invalid" } +} + +template void Boo(int); -- cgit v1.2.3 From 2a93558f9151945b9f99c3bd88466e6b19940fe1 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 18 Nov 2011 22:28:06 +0000 Subject: * gcc.dg/cpp/assert4.c: Test __linux__, not __gnu_linux__. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181497 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.dg/cpp/assert4.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8dc9f39a046..27b560ebacc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2011-11-18 Joseph Myers + + * gcc.dg/cpp/assert4.c: Test __linux__, not __gnu_linux__. + 2011-11-18 Paolo Carlini PR c++/51150 diff --git a/gcc/testsuite/gcc.dg/cpp/assert4.c b/gcc/testsuite/gcc.dg/cpp/assert4.c index 0bd88ce0681..e6d0b2c5098 100644 --- a/gcc/testsuite/gcc.dg/cpp/assert4.c +++ b/gcc/testsuite/gcc.dg/cpp/assert4.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2006, 2008 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2006, 2008, 2009, 2011 Free Software Foundation, Inc. Test builtin preprocessor assertions. By Kaveh Ghazi . */ @@ -7,7 +7,7 @@ /* Check for #system assertions. */ -#if defined __gnu_linux__ +#if defined __linux__ # if !#system(linux) || !#system(unix) || !#system(posix) # error # endif -- cgit v1.2.3 From a21e832556d36052a4c33c5086e474d91617f13e Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sat, 19 Nov 2011 00:18:16 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181500 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index a41febbbc1c..1254af67282 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111118 +20111119 -- cgit v1.2.3 From 93ebbbf170cd9040ae212a719ba3941d460985cb Mon Sep 17 00:00:00 2001 From: Richard Earnshaw Date: Sat, 19 Nov 2011 16:47:02 +0000 Subject: PR target/50493 * arm.c (neon_disambiguate_copy): Correctly handle partial overlap of src and dest operands. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181510 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/config/arm/arm.c | 45 ++++++++++++++++++++------------------------- 2 files changed, 26 insertions(+), 25 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 33a3e909850..f460255e37a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-11-19 Richard Earnshaw + + PR target/50493 + * arm.c (neon_disambiguate_copy): Correctly handle partial overlap + of src and dest operands. + 2011-11-18 Iain Sandoe PR target/49992 diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 75174a323fa..b79de0892f0 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -19576,39 +19576,34 @@ neon_emit_pair_result_insn (enum machine_mode mode, emit_move_insn (mem, tmp2); } -/* Set up operands for a register copy from src to dest, taking care not to - clobber registers in the process. - FIXME: This has rather high polynomial complexity (O(n^3)?) but shouldn't - be called with a large N, so that should be OK. */ +/* Set up OPERANDS for a register copy from SRC to DEST, taking care + not to early-clobber SRC registers in the process. + We assume that the operands described by SRC and DEST represent a + decomposed copy of OPERANDS[1] into OPERANDS[0]. COUNT is the + number of components into which the copy has been decomposed. */ void neon_disambiguate_copy (rtx *operands, rtx *dest, rtx *src, unsigned int count) { - unsigned int copied = 0, opctr = 0; - unsigned int done = (1 << count) - 1; - unsigned int i, j; + unsigned int i; - while (copied != done) + if (!reg_overlap_mentioned_p (operands[0], operands[1]) + || REGNO (operands[0]) < REGNO (operands[1])) { for (i = 0; i < count; i++) - { - int good = 1; - - for (j = 0; good && j < count; j++) - if (i != j && (copied & (1 << j)) == 0 - && reg_overlap_mentioned_p (src[j], dest[i])) - good = 0; - - if (good) - { - operands[opctr++] = dest[i]; - operands[opctr++] = src[i]; - copied |= 1 << i; - } - } + { + operands[2 * i] = dest[i]; + operands[2 * i + 1] = src[i]; + } + } + else + { + for (i = 0; i < count; i++) + { + operands[2 * i] = dest[count - i - 1]; + operands[2 * i + 1] = src[count - i - 1]; + } } - - gcc_assert (opctr == count * 2); } /* Expand an expression EXP that calls a built-in function, -- cgit v1.2.3 From 754f741a9f8de6073c2b902f7168bd21beeeca91 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Sat, 19 Nov 2011 20:39:10 +0000 Subject: PR rtl-optimization/51187 * reorg.c (relax_delay_slots): Do not consider a jump useless if there is a barrier between the jump and its target label. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181514 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 10 +++- gcc/reorg.c | 4 +- gcc/testsuite/ChangeLog | 4 ++ gcc/testsuite/gcc.dg/delay-slot-2.c | 116 ++++++++++++++++++++++++++++++++++++ 4 files changed, 131 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/delay-slot-2.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f460255e37a..bfe40bfc6bc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,8 +1,14 @@ +2011-11-19 Eric Botcazou + + PR rtl-optimization/51187 + * reorg.c (relax_delay_slots): Do not consider a jump useless if there + is a barrier between the jump and its target label. + 2011-11-19 Richard Earnshaw PR target/50493 - * arm.c (neon_disambiguate_copy): Correctly handle partial overlap - of src and dest operands. + * config/arm/arm.c (neon_disambiguate_copy): Correctly handle partial + overlap of src and dest operands. 2011-11-18 Iain Sandoe diff --git a/gcc/reorg.c b/gcc/reorg.c index 82c7412e2a6..2677b48230b 100644 --- a/gcc/reorg.c +++ b/gcc/reorg.c @@ -3554,9 +3554,11 @@ relax_delay_slots (rtx first) } } + /* See if we have a simple (conditional) jump that is useless. */ if (! INSN_ANNULLED_BRANCH_P (delay_insn) - && prev_active_insn (target_label) == insn && ! condjump_in_parallel_p (delay_insn) + && prev_active_insn (target_label) == insn + && ! BARRIER_P (prev_nonnote_insn (target_label)) #ifdef HAVE_cc0 /* If the last insn in the delay slot sets CC0 for some insn, various code assumes that it is in a delay slot. We could diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 27b560ebacc..4e675960df4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2011-11-19 Eric Botcazou + + * gcc.dg/delay-slot-2.c: New test. + 2011-11-18 Joseph Myers * gcc.dg/cpp/assert4.c: Test __linux__, not __gnu_linux__. diff --git a/gcc/testsuite/gcc.dg/delay-slot-2.c b/gcc/testsuite/gcc.dg/delay-slot-2.c new file mode 100644 index 00000000000..79faf81c798 --- /dev/null +++ b/gcc/testsuite/gcc.dg/delay-slot-2.c @@ -0,0 +1,116 @@ +/* PR rtl-optimization/51187 */ +/* Reported by Jurij Smakov */ + +/* { dg-do compile } */ +/* { dg-options "-g -O2" } */ + +extern int printf (__const char *__restrict __format, ...); +extern void print_c_condition (const char *); + +enum decision_type +{ + DT_num_insns, + DT_mode, DT_code, DT_veclen, + DT_elt_zero_int, DT_elt_one_int, DT_elt_zero_wide, DT_elt_zero_wide_safe, + DT_const_int, + DT_veclen_ge, DT_dup, DT_pred, DT_c_test, + DT_accept_op, DT_accept_insn +}; + +struct decision_test +{ + struct decision_test *next; + enum decision_type type; + + union + { + int num_insns; + + struct + { + const char *name; + } pred; + + const char *c_test; + int veclen; + int dup; + long intval; + int opno; + + struct { + int code_number; + int lineno; + int num_clobbers_to_add; + } insn; + } u; +}; + +enum routine_type { + RECOG, SPLIT, PEEPHOLE2 +}; + +void +write_cond (struct decision_test *p, int depth, + enum routine_type subroutine_type) +{ + switch (p->type) + { + case DT_num_insns: + printf ("peep2_current_count >= %d", p->u.num_insns); + break; + + case DT_code: + printf ("GET_CODE (x%d) == ", depth); + break; + + case DT_veclen: + printf ("XVECLEN (x%d, 0) == %d", depth, p->u.veclen); + break; + + case DT_elt_zero_int: + printf ("XINT (x%d, 0) == %d", depth, (int) p->u.intval); + break; + + case DT_elt_one_int: + printf ("XINT (x%d, 1) == %d", depth, (int) p->u.intval); + break; + + case DT_elt_zero_wide: + case DT_elt_zero_wide_safe: + printf ("XWINT (x%d, 0) == ", depth); + print_host_wide_int (p->u.intval); + break; + + case DT_const_int: + printf ("x%d == const_int_rtx[MAX_SAVED_CONST_INT + (%d)]", + depth, (int) p->u.intval); + break; + + case DT_veclen_ge: + printf ("XVECLEN (x%d, 0) >= %d", depth, p->u.veclen); + break; + + case DT_dup: + printf ("rtx_equal_p (x%d, operands[%d])", depth, p->u.dup); + break; + + case DT_pred: + printf ("%s (x%d)", p->u.pred.name, depth); + break; + + case DT_c_test: + print_c_condition (p->u.c_test); + break; + + case DT_accept_insn: + ((void)(__builtin_expect(!(subroutine_type == RECOG), 0) ? __builtin_unreachable(), 0 : 0)); + ((void)(__builtin_expect(!(p->u.insn.num_clobbers_to_add), 0) ? __builtin_unreachable(), 0 : 0)); + printf ("pnum_clobbers != NULL"); + break; + + default: + __builtin_unreachable(); + } +} + +/* { dg-final { scan-assembler "printf" } } */ -- cgit v1.2.3 From 93317f0feace33caca94859a131ef200f0b5f8cf Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sun, 20 Nov 2011 00:18:02 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181520 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 1254af67282..27878b2f648 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111119 +20111120 -- cgit v1.2.3 From ba59e9074cf3cfae0c816c045d623011683f115f Mon Sep 17 00:00:00 2001 From: Andreas Tobler Date: Sun, 20 Nov 2011 21:24:07 +0000 Subject: 2011-11-20 Andreas Tobler Additional fixes for FreeBSD-10 build: /: * libtool.m4: Additional FreeBSD 10 fixes. boehm-gc/: * configure: Regenerate. gcc/: * configure: Regenerate. libffi/: * configure: Regenerate. libgfortran/: * configure: Regenerate. libgomp/: * configure: Regenerate. libjava/: * configure.ac: Fix some more FreeBSD 10 issues.. * configure: Regenerate. libjava/libltdl/: * acinclude.m4: Additional FreeBSD 10 fixes. * configure: Regenerate. libmudflap/: * configure: Regenerate. libobjc/: * configure: Regenerate. libquadmath/: * configure: Regenerate. libssp/: * configure: Regenerate. libstdc++-v3/: * configure: Regenerate. lto-plugin/: * configure: Regenerate. zlib/: * configure: Regenerate. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181536 138bc75d-0d04-0410-961f-82ee72b054a4 --- ChangeLog | 4 ++++ boehm-gc/ChangeLog | 4 ++++ boehm-gc/configure | 12 ++++++------ gcc/ChangeLog | 4 ++++ gcc/configure | 12 ++++++------ libffi/ChangeLog | 4 ++++ libffi/configure | 6 +++--- libgfortran/ChangeLog | 4 ++++ libgfortran/configure | 12 ++++++------ libgomp/ChangeLog | 4 ++++ libgomp/configure | 12 ++++++------ libjava/ChangeLog | 5 +++++ libjava/configure | 16 ++++++++-------- libjava/configure.ac | 2 +- libjava/libltdl/ChangeLog | 5 +++++ libjava/libltdl/acinclude.m4 | 6 +++--- libjava/libltdl/configure | 4 ++-- libmudflap/ChangeLog | 4 ++++ libmudflap/configure | 6 +++--- libobjc/ChangeLog | 4 ++++ libobjc/configure | 6 +++--- libquadmath/ChangeLog | 4 ++++ libquadmath/configure | 6 +++--- libssp/ChangeLog | 4 ++++ libssp/configure | 6 +++--- libstdc++-v3/ChangeLog | 4 ++++ libstdc++-v3/configure | 12 ++++++------ libtool.m4 | 8 ++++---- lto-plugin/ChangeLog | 4 ++++ lto-plugin/configure | 6 +++--- zlib/ChangeLog | 4 ++++ zlib/configure | 6 +++--- 32 files changed, 131 insertions(+), 69 deletions(-) diff --git a/ChangeLog b/ChangeLog index 23a41910f52..06c3ef63ee8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-11-20 Andreas Tobler + + * libtool.m4: Additional FreeBSD 10 fixes. + 2011-11-18 Iain Sandoe PR target/49992 diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog index c50e10fc90a..f121804166a 100644 --- a/boehm-gc/ChangeLog +++ b/boehm-gc/ChangeLog @@ -1,3 +1,7 @@ +2011-11-20 Andreas Tobler + + * configure: Regenerate. + 2011-10-26 Release Manager * GCC 4.6.2 released. diff --git a/boehm-gc/configure b/boehm-gc/configure index 9e9cd279b94..a6806b8fc92 100755 --- a/boehm-gc/configure +++ b/boehm-gc/configure @@ -9604,7 +9604,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -10520,7 +10520,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -10538,7 +10538,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) @@ -12428,7 +12428,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi esac ;; - freebsd[12]*) + freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no @@ -14203,7 +14203,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -14221,7 +14221,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bfe40bfc6bc..cb8cb357b1f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2011-11-20 Andreas Tobler + + * configure: Regenerate. + 2011-11-19 Eric Botcazou PR rtl-optimization/51187 diff --git a/gcc/configure b/gcc/configure index acb46b9f40b..1960d5a845a 100755 --- a/gcc/configure +++ b/gcc/configure @@ -15730,7 +15730,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -16643,7 +16643,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -16661,7 +16661,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) @@ -18527,7 +18527,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi esac ;; - freebsd[12]*) + freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no @@ -20302,7 +20302,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -20320,7 +20320,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) diff --git a/libffi/ChangeLog b/libffi/ChangeLog index 1fa5b279f61..24c256cc771 100644 --- a/libffi/ChangeLog +++ b/libffi/ChangeLog @@ -1,3 +1,7 @@ +2011-11-20 Andreas Tobler + + * configure: Regenerate. + 2011-10-26 Release Manager * GCC 4.6.2 released. diff --git a/libffi/configure b/libffi/configure index 64787470333..8f3b068f09f 100755 --- a/libffi/configure +++ b/libffi/configure @@ -9001,7 +9001,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -9914,7 +9914,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -9932,7 +9932,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index e5057beef37..a3bfb5374ad 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,7 @@ +2011-11-20 Andreas Tobler + + * configure: Regenerate. + 2011-10-26 Release Manager * GCC 4.6.2 released. diff --git a/libgfortran/configure b/libgfortran/configure index ef4712ae2bc..1e61aeb4910 100755 --- a/libgfortran/configure +++ b/libgfortran/configure @@ -10326,7 +10326,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -11242,7 +11242,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -11260,7 +11260,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) @@ -14162,7 +14162,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_FC=yes hardcode_minus_L_FC=yes @@ -14870,7 +14870,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -14888,7 +14888,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 95b247f5341..f614c41ba77 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,7 @@ +2011-11-20 Andreas Tobler + + * configure: Regenerate. + 2011-10-26 Release Manager * GCC 4.6.2 released. diff --git a/libgomp/configure b/libgomp/configure index 50dc29a6201..6f25c6f5eb9 100755 --- a/libgomp/configure +++ b/libgomp/configure @@ -9317,7 +9317,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -10230,7 +10230,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -10248,7 +10248,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) @@ -13164,7 +13164,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_FC=yes hardcode_minus_L_FC=yes @@ -13869,7 +13869,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -13887,7 +13887,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index cdea1a1868f..9e28f1bd22c 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2011-11-20 Andreas Tobler + + * configure.ac: Fix FreeBSD 10 detection. + * configure: Regenerate. + 2011-10-26 Release Manager * GCC 4.6.2 released. diff --git a/libjava/configure b/libjava/configure index 3008b0a15e2..73ebd03fd1e 100755 --- a/libjava/configure +++ b/libjava/configure @@ -11560,7 +11560,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -12476,7 +12476,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -12494,7 +12494,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) @@ -14384,7 +14384,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi esac ;; - freebsd[12]*) + freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no @@ -16159,7 +16159,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -16177,7 +16177,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) @@ -18520,7 +18520,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes @@ -20715,7 +20715,7 @@ case "$THREADS" in *-*-cygwin*) # Don't set THREADLIBS here. Cygwin doesn't have -lpthread. ;; - *-*-freebsd[1234]*) + *-*-freebsd[34].*) # Before FreeBSD 5, it didn't have -lpthread (or any library which # merely adds pthread_* functions) but it does have a -pthread switch # which is required at link-time to select -lc_r *instead* of -lc. diff --git a/libjava/configure.ac b/libjava/configure.ac index 805c519e204..b8f299dca6e 100644 --- a/libjava/configure.ac +++ b/libjava/configure.ac @@ -1060,7 +1060,7 @@ case "$THREADS" in *-*-cygwin*) # Don't set THREADLIBS here. Cygwin doesn't have -lpthread. ;; - *-*-freebsd[[1234]]*) + *-*-freebsd[[34]].*) # Before FreeBSD 5, it didn't have -lpthread (or any library which # merely adds pthread_* functions) but it does have a -pthread switch # which is required at link-time to select -lc_r *instead* of -lc. diff --git a/libjava/libltdl/ChangeLog b/libjava/libltdl/ChangeLog index 3f3b107eaab..f2a91dbbaf1 100644 --- a/libjava/libltdl/ChangeLog +++ b/libjava/libltdl/ChangeLog @@ -1,3 +1,8 @@ +2011-11-20 Andreas Tobler + + * acinclude.m4: Additional FreeBSD 10 fixes. + * configure: Regenerate. + 2011-10-26 Release Manager * GCC 4.6.2 released. diff --git a/libjava/libltdl/acinclude.m4 b/libjava/libltdl/acinclude.m4 index 55beab162e7..d77a1a3990d 100644 --- a/libjava/libltdl/acinclude.m4 +++ b/libjava/libltdl/acinclude.m4 @@ -1377,7 +1377,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) @@ -3035,7 +3035,7 @@ case $host_os in ;; esac ;; - freebsd[[12]]*) + freebsd2.*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; @@ -5669,7 +5669,7 @@ EOF ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes diff --git a/libjava/libltdl/configure b/libjava/libltdl/configure index f47d95f7369..35b89dc5551 100755 --- a/libjava/libltdl/configure +++ b/libjava/libltdl/configure @@ -7355,7 +7355,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -7968,7 +7968,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) diff --git a/libmudflap/ChangeLog b/libmudflap/ChangeLog index 6c21fce4b65..dbd2e54ce60 100644 --- a/libmudflap/ChangeLog +++ b/libmudflap/ChangeLog @@ -1,3 +1,7 @@ +2011-11-20 Andreas Tobler + + * configure: Regenerate. + 2011-10-26 Release Manager * GCC 4.6.2 released. diff --git a/libmudflap/configure b/libmudflap/configure index 11bcca18439..441299f6552 100755 --- a/libmudflap/configure +++ b/libmudflap/configure @@ -8818,7 +8818,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -9731,7 +9731,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -9749,7 +9749,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) diff --git a/libobjc/ChangeLog b/libobjc/ChangeLog index 3c7a761c4ad..381b97cc0c4 100644 --- a/libobjc/ChangeLog +++ b/libobjc/ChangeLog @@ -1,3 +1,7 @@ +2011-11-20 Andreas Tobler + + * configure: Regenerate. + 2011-10-26 Release Manager * GCC 4.6.2 released. diff --git a/libobjc/configure b/libobjc/configure index 8f670e132e5..e6f0afdfa3b 100755 --- a/libobjc/configure +++ b/libobjc/configure @@ -8797,7 +8797,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -9713,7 +9713,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -9731,7 +9731,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) diff --git a/libquadmath/ChangeLog b/libquadmath/ChangeLog index f64ee1355fe..0a38e90ab6f 100644 --- a/libquadmath/ChangeLog +++ b/libquadmath/ChangeLog @@ -1,3 +1,7 @@ +2011-11-20 Andreas Tobler + + * configure: Regenerate. + 2011-10-26 Release Manager * GCC 4.6.2 released. diff --git a/libquadmath/configure b/libquadmath/configure index 7f78ea15868..9d979337d18 100755 --- a/libquadmath/configure +++ b/libquadmath/configure @@ -8727,7 +8727,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -9643,7 +9643,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -9661,7 +9661,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) diff --git a/libssp/ChangeLog b/libssp/ChangeLog index 9566d94c0b8..a49e2c95186 100644 --- a/libssp/ChangeLog +++ b/libssp/ChangeLog @@ -1,3 +1,7 @@ +2011-11-20 Andreas Tobler + + * configure: Regenerate. + 2011-10-26 Release Manager * GCC 4.6.2 released. diff --git a/libssp/configure b/libssp/configure index b1edcb4295b..bd3f5662c4b 100755 --- a/libssp/configure +++ b/libssp/configure @@ -8864,7 +8864,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -9780,7 +9780,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -9798,7 +9798,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index d668b14f0fb..1c4cbfa9f0f 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,7 @@ +2011-11-20 Andreas Tobler + + * configure: Regenerate. + 2011-11-16 Paolo Carlini PR libstdc++/51142 diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 21fde5cd185..c6a03362551 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -9698,7 +9698,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -10614,7 +10614,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -10632,7 +10632,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) @@ -12522,7 +12522,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi esac ;; - freebsd[12]*) + freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no @@ -14297,7 +14297,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -14315,7 +14315,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) diff --git a/libtool.m4 b/libtool.m4 index 71bcee83c87..67321a7d070 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -2273,7 +2273,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[[123]]*) objformat=aout ;; + freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -2291,7 +2291,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) @@ -4804,7 +4804,7 @@ _LT_EOF ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes @@ -5751,7 +5751,7 @@ if test "$_lt_caught_CXX_error" != yes; then esac ;; - freebsd[[12]]*) + freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no diff --git a/lto-plugin/ChangeLog b/lto-plugin/ChangeLog index 3fc931f9f15..af01a777e86 100644 --- a/lto-plugin/ChangeLog +++ b/lto-plugin/ChangeLog @@ -1,3 +1,7 @@ +2011-11-20 Andreas Tobler + + * configure: Regenerate. + 2011-10-26 Release Manager * GCC 4.6.2 released. diff --git a/lto-plugin/configure b/lto-plugin/configure index c9c84a10511..2cc7e015f79 100755 --- a/lto-plugin/configure +++ b/lto-plugin/configure @@ -8733,7 +8733,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -9646,7 +9646,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -9664,7 +9664,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) diff --git a/zlib/ChangeLog b/zlib/ChangeLog index e4602622212..dd62cbfe630 100644 --- a/zlib/ChangeLog +++ b/zlib/ChangeLog @@ -1,3 +1,7 @@ +2011-11-20 Andreas Tobler + + * configure: Regenerate. + 2011-10-26 Release Manager * GCC 4.6.2 released. diff --git a/zlib/configure b/zlib/configure index 8be4e40c82c..f7fe2b7bd51 100755 --- a/zlib/configure +++ b/zlib/configure @@ -8600,7 +8600,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -9516,7 +9516,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -9534,7 +9534,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) -- cgit v1.2.3 From 6df7ca62f7b481b85adb34cfa3cd447491c2f024 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Mon, 21 Nov 2011 00:18:13 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181542 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 27878b2f648..a2efe8dd37d 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111120 +20111121 -- cgit v1.2.3 From 88d5daaea897d55c0abbe779f66ea55e1f3cf79a Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Mon, 21 Nov 2011 09:04:08 +0000 Subject: gcc/ada: Backport from mainline r181474 PR target/50678 * init.c (__gnat_error_handler) [Darwin]: Move work-around to the bug filed as radar #10302855 from __gnat_error_handler ... ... to (__gnat_adjust_context_for_raise) [Darwin]: New. (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE) [Darwin]: Define. (__gnat_error_handler) [Darwin]: Use __gnat_adjust_context_for_raise. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181553 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/ChangeLog | 10 ++++++++++ gcc/ada/init.c | 23 ++++++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 7ae36459dfd..ef96695b7c8 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,13 @@ +2011-11-13 Iain Sandoe + + Backport from mainline r181474 + PR target/50678 + * init.c (__gnat_error_handler) [Darwin]: Move work-around to the + bug filed as radar #10302855 from __gnat_error_handler ... + ... to (__gnat_adjust_context_for_raise) [Darwin]: New. + (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE) [Darwin]: Define. + (__gnat_error_handler) [Darwin]: Use __gnat_adjust_context_for_raise. + 2011-11-18 Tristan Gingold Iain Sandoe diff --git a/gcc/ada/init.c b/gcc/ada/init.c index 9b6370e1a57..f6c1a5b4ed2 100644 --- a/gcc/ada/init.c +++ b/gcc/ada/init.c @@ -2216,12 +2216,33 @@ __gnat_is_stack_guard (mach_vm_address_t addr) return 0; } +#define HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE + +void +__gnat_adjust_context_for_raise (int signo ATTRIBUTE_UNUSED, + void *ucontext ATTRIBUTE_UNUSED) +{ +#if defined (__x86_64__) + /* Work around radar #10302855/pr50678, where the unwinders (libunwind or + libgcc_s depending on the system revision) and the DWARF unwind data for + the sigtramp have different ideas about register numbering (causing rbx + and rdx to be transposed).. */ + ucontext_t *uc = (ucontext_t *)ucontext ; + unsigned long t = uc->uc_mcontext->__ss.__rbx; + + uc->uc_mcontext->__ss.__rbx = uc->uc_mcontext->__ss.__rdx; + uc->uc_mcontext->__ss.__rdx = t; +#endif +} + static void -__gnat_error_handler (int sig, siginfo_t *si, void *ucontext ATTRIBUTE_UNUSED) +__gnat_error_handler (int sig, siginfo_t *si, void *ucontext) { struct Exception_Data *exception; const char *msg; + __gnat_adjust_context_for_raise (sig, ucontext); + switch (sig) { case SIGSEGV: -- cgit v1.2.3 From 76bfa7dee8de806f7b9812e97bac8a99f352864f Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Tue, 22 Nov 2011 00:18:22 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181605 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index a2efe8dd37d..3a44afcf488 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111121 +20111122 -- cgit v1.2.3 From 9506264fd4d4cd07affa3d24e2e26dd7f277e91e Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Tue, 22 Nov 2011 21:37:24 +0000 Subject: /cp 2011-11-22 Paolo Carlini PR c++/51265 * semantics.c (finish_decltype_type): Handle PTRMEM_CST. /testsuite 2011-11-22 Paolo Carlini PR c++/51265 * g++.dg/cpp0x/decltype36.C: New. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181641 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/semantics.c | 3 ++- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/decltype36.C | 21 +++++++++++++++++++++ 4 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/g++.dg/cpp0x/decltype36.C diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index aee5bec8347..ecacea34c89 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2011-11-22 Paolo Carlini + + PR c++/51265 + * semantics.c (finish_decltype_type): Handle PTRMEM_CST. + 2011-11-18 Paolo Carlini PR c++/51150 diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index e02bd53af1c..db2b3db052d 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -4927,8 +4927,9 @@ finish_decltype_type (tree expr, bool id_expression_or_member_access_p, gcc_unreachable (); case INTEGER_CST: + case PTRMEM_CST: /* We can get here when the id-expression refers to an - enumerator. */ + enumerator or non-type template parameter. */ type = TREE_TYPE (expr); break; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4e675960df4..7a5c0d3888f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-11-22 Paolo Carlini + + PR c++/51265 + * g++.dg/cpp0x/decltype36.C: New. + 2011-11-19 Eric Botcazou * gcc.dg/delay-slot-2.c: New test. diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype36.C b/gcc/testsuite/g++.dg/cpp0x/decltype36.C new file mode 100644 index 00000000000..f3dfed992cf --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/decltype36.C @@ -0,0 +1,21 @@ +// PR c++/51265 +// { dg-options -std=c++0x } + +struct Funny +{ + int print(int); +}; + +template +void c(); + +template +void xx() +{ + c(); +} + +int main() +{ + xx(); +} -- cgit v1.2.3 From 0b13f0ec1e5cb0947ed2c7d82a4e6038f0ce7e38 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Wed, 23 Nov 2011 00:17:26 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181647 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 3a44afcf488..8f4af720c8f 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111122 +20111123 -- cgit v1.2.3 From 55b6cbdff6cbcfba8661000b02e0deb1c910db35 Mon Sep 17 00:00:00 2001 From: Gerald Pfeifer Date: Wed, 23 Nov 2011 21:24:48 +0000 Subject: * update_web_docs_svn: Make $DOCSDIR group writable after creating it. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181678 138bc75d-0d04-0410-961f-82ee72b054a4 --- maintainer-scripts/ChangeLog | 5 +++++ maintainer-scripts/update_web_docs_svn | 1 + 2 files changed, 6 insertions(+) diff --git a/maintainer-scripts/ChangeLog b/maintainer-scripts/ChangeLog index 55f491678ca..f570ceaae30 100644 --- a/maintainer-scripts/ChangeLog +++ b/maintainer-scripts/ChangeLog @@ -1,3 +1,8 @@ +2011-11-23 Gerald Pfeifer + + * update_web_docs_svn: Make $DOCSDIR group writable after + creating it. + 2011-10-26 Release Manager * GCC 4.6.2 released. diff --git a/maintainer-scripts/update_web_docs_svn b/maintainer-scripts/update_web_docs_svn index a0551615d7d..cfc33c42bf5 100755 --- a/maintainer-scripts/update_web_docs_svn +++ b/maintainer-scripts/update_web_docs_svn @@ -93,6 +93,7 @@ fi if [ ! -d $DOCSDIR ]; then mkdir $DOCSDIR + chmod g+w $DOCSDIR fi if [ -z "$RELEASE" ]; then -- cgit v1.2.3 From 599e25a74156bbcb4fc6f92ca42ca5baa2c379c3 Mon Sep 17 00:00:00 2001 From: Gerald Pfeifer Date: Wed, 23 Nov 2011 22:15:54 +0000 Subject: * config.host (*-*-freebsd[12], *-*-freebsd[12].*, *-*-freebsd*aout*): Remove. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181679 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgcc/ChangeLog | 5 +++++ libgcc/config.host | 9 --------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index bb974646a63..71a75bbd0bf 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2011-11-23 Gerald Pfeifer + + * config.host (*-*-freebsd[12], *-*-freebsd[12].*, + *-*-freebsd*aout*): Remove. + 2011-10-26 Release Manager * GCC 4.6.2 released. diff --git a/libgcc/config.host b/libgcc/config.host index d3f64d687fc..25e949e0fe3 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -145,15 +145,6 @@ case ${host} in asm_hidden_op=.private_extern tmake_file="t-darwin ${cpu_type}/t-darwin t-slibgcc-darwin" ;; -*-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*) - # This is the place-holder for the generic a.out configuration - # of FreeBSD. No actual configuration resides here since - # there was only ever a bare-bones ix86 configuration for - # a.out and it exists solely in the machine-specific section. - # This place-holder must exist to avoid dropping into - # the generic ELF configuration of FreeBSD (i.e. it must be - # ordered before that section). - ;; *-*-freebsd*) # This is the generic ELF configuration of FreeBSD. Later # machine-specific sections may refine and add to this -- cgit v1.2.3 From 5dfdcd1da454b7f457b4bbfd957ad1a222c32020 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 24 Nov 2011 00:17:58 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181682 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 8f4af720c8f..3264360dc31 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111123 +20111124 -- cgit v1.2.3 From 88e3bb5e4bf9a47b7e2fee315981756429f96e71 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 24 Nov 2011 07:21:39 +0000 Subject: PR bootstrap/50888 * prims.cc: Don't include ctype.h. (c_isspace): Define. (next_property_key, next_property_value): Use it instead of isspace. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181686 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/ChangeLog | 8 ++++++++ libjava/prims.cc | 13 +++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 9e28f1bd22c..b27b55beaed 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,11 @@ +2011-11-24 Jakub Jelinek + + PR bootstrap/50888 + * prims.cc: Don't include ctype.h. + (c_isspace): Define. + (next_property_key, next_property_value): Use it instead + of isspace. + 2011-11-20 Andreas Tobler * configure.ac: Fix FreeBSD 10 detection. diff --git a/libjava/prims.cc b/libjava/prims.cc index 90f8dc5ca23..652cf5b4aa5 100644 --- a/libjava/prims.cc +++ b/libjava/prims.cc @@ -38,7 +38,6 @@ details. */ #endif #ifndef DISABLE_GETENV_PROPERTIES -#include #include #define PROCESS_GCJ_PROPERTIES process_gcj_properties() #else @@ -985,6 +984,8 @@ static java::lang::Thread *main_thread; #ifndef DISABLE_GETENV_PROPERTIES +#define c_isspace(c) (memchr (" \t\n\r\v\f", c, 6) != NULL) + static char * next_property_key (char *s, size_t *length) { @@ -993,7 +994,7 @@ next_property_key (char *s, size_t *length) JvAssert (s); // Skip over whitespace - while (isspace (*s)) + while (c_isspace (*s)) s++; // If we've reached the end, return NULL. Also return NULL if for @@ -1005,7 +1006,7 @@ next_property_key (char *s, size_t *length) // Determine the length of the property key. while (s[l] != 0 - && ! isspace (s[l]) + && ! c_isspace (s[l]) && s[l] != ':' && s[l] != '=') { @@ -1027,19 +1028,19 @@ next_property_value (char *s, size_t *length) JvAssert (s); - while (isspace (*s)) + while (c_isspace (*s)) s++; if (*s == ':' || *s == '=') s++; - while (isspace (*s)) + while (c_isspace (*s)) s++; // Determine the length of the property value. while (s[l] != 0 - && ! isspace (s[l]) + && ! c_isspace (s[l]) && s[l] != ':' && s[l] != '=') { -- cgit v1.2.3 From 559cd70d8add54f73d253730e63e15280c13c37c Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Thu, 24 Nov 2011 20:44:28 +0000 Subject: 2011-11-24 Tobias Burnus PR fortran/51218 * resolve.c (pure_subroutine): If called subroutine is impure, unset implicit_pure. (resolve_function): Move impure check to simplify code. 2011-11-24 Tobias Burnus PR fortran/51218 * gfortran.dg/implicit_pure_1.f90: New. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181699 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 5 +++ gcc/fortran/resolve.c | 9 +++-- gcc/testsuite/ChangeLog | 7 ++++ gcc/testsuite/gfortran.dg/implicit_pure_1.f90 | 53 +++++++++++++++++++++++++++ 4 files changed, 71 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/implicit_pure_1.f90 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 956a2a85359..84c5d7ed492 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2011-11-24 Tobias Burnus + + PR fortran/51218 + * gfortran.dg/implicit_pure_1.f90: New. + 2011-10-26 Release Manager * GCC 4.6.2 released. diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 4229c8b7182..aed4625980e 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -3132,10 +3132,10 @@ resolve_function (gfc_expr *expr) "procedure within a PURE procedure", name, &expr->where); t = FAILURE; } - } - if (!pure_function (expr, &name) && name && gfc_implicit_pure (NULL)) - gfc_current_ns->proc_name->attr.implicit_pure = 0; + if (gfc_implicit_pure (NULL)) + gfc_current_ns->proc_name->attr.implicit_pure = 0; + } /* Functions without the RECURSIVE attribution are not allowed to * call themselves. */ @@ -3195,6 +3195,9 @@ pure_subroutine (gfc_code *c, gfc_symbol *sym) else if (gfc_pure (NULL)) gfc_error ("Subroutine call to '%s' at %L is not PURE", sym->name, &c->loc); + + if (gfc_implicit_pure (NULL)) + gfc_current_ns->proc_name->attr.implicit_pure = 0; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7a5c0d3888f..28fb3a7e5fb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2011-11-24 Tobias Burnus + + PR fortran/51218 + * resolve.c (pure_subroutine): If called subroutine is + impure, unset implicit_pure. + (resolve_function): Move impure check to simplify code. + 2011-11-22 Paolo Carlini PR c++/51265 diff --git a/gcc/testsuite/gfortran.dg/implicit_pure_1.f90 b/gcc/testsuite/gfortran.dg/implicit_pure_1.f90 new file mode 100644 index 00000000000..d4a5a364e59 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/implicit_pure_1.f90 @@ -0,0 +1,53 @@ +! { dg-do run } +! +! PR fortran/51218 +! +! Contributed by Harald Anlauf +! + +module a + implicit none + integer :: neval = 0 +contains + subroutine inc_eval + neval = neval + 1 + end subroutine inc_eval +end module a + +module b + use a + implicit none +contains + function f(x) ! Should be implicit pure + real :: f + real, intent(in) :: x + f = x + end function f + + function g(x) ! Should NOT be implicit pure + real :: g + real, intent(in) :: x + call inc_eval + g = x + end function g +end module b + +program gfcbug114a + use a + use b + implicit none + real :: x = 1, y = 1, t, u, v, w + if (neval /= 0) call abort () + t = f(x)*f(y) + if (neval /= 0) call abort () + u = f(x)*f(y) + f(x)*f(y) + if (neval /= 0) call abort () + v = g(x)*g(y) + if (neval /= 2) call abort () + w = g(x)*g(y) + g(x)*g(y) + if (neval /= 6) call abort () + if (t /= 1.0 .or. u /= 2.0 .or. v /= 1.0 .or. w /= 2) call abort () +end program gfcbug114a + +! { dg-final { scan-module "b" "IMPLICIT_PURE" } } +! { dg-final { cleanup-modules "b" } } -- cgit v1.2.3 From 506c9085d9f99fb4b0b65e3c142be4a6b36b3773 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Fri, 25 Nov 2011 00:18:30 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181705 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 3264360dc31..c8b387dca73 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111124 +20111125 -- cgit v1.2.3 From 9eda141b37fa6b2d6473a93f4e8760e353390b13 Mon Sep 17 00:00:00 2001 From: Enkovich Ilya Date: Fri, 25 Nov 2011 10:29:42 +0000 Subject: 2011-11-24 Enkovich Ilya PR target/51287 * i386.c (distance_non_agu_define): Fix insn attr check. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181714 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/config/i386/i386.c | 9 ++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cb8cb357b1f..95d8a0b0a4a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-11-24 Enkovich Ilya + + PR target/51287 + * i386.c (distance_non_agu_define): Fix insn attr check. + 2011-11-20 Andreas Tobler * configure: Regenerate. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 382fabffa02..6aa029709c9 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -16329,7 +16329,6 @@ distance_non_agu_define (unsigned int regno1, unsigned int regno2, basic_block bb = BLOCK_FOR_INSN (insn); int distance = 0; df_ref *def_rec; - enum attr_type insn_type; if (insn != BB_HEAD (bb)) { @@ -16345,8 +16344,8 @@ distance_non_agu_define (unsigned int regno1, unsigned int regno2, && (regno1 == DF_REF_REGNO (*def_rec) || regno2 == DF_REF_REGNO (*def_rec))) { - insn_type = get_attr_type (prev); - if (insn_type != TYPE_LEA) + if (recog_memoized (prev) < 0 + || get_attr_type (prev) != TYPE_LEA) goto done; } } @@ -16385,8 +16384,8 @@ distance_non_agu_define (unsigned int regno1, unsigned int regno2, && (regno1 == DF_REF_REGNO (*def_rec) || regno2 == DF_REF_REGNO (*def_rec))) { - insn_type = get_attr_type (prev); - if (insn_type != TYPE_LEA) + if (recog_memoized (prev) < 0 + || get_attr_type (prev) != TYPE_LEA) goto done; } } -- cgit v1.2.3 From fbfd0745bafdb15a105caf1fa5e3c1ecff00dfe5 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Fri, 25 Nov 2011 10:41:17 +0000 Subject: gcc/ Backport from mainline: 2011-03-29 Richard Sandiford PR debug/48190 * dwarf2out.c (dw_loc_list_node): Add resolved_addr and replaced. (cached_dw_loc_list_def): New structure. (cached_dw_loc_list): New typedef. (cached_dw_loc_list_table): New variable. (cached_dw_loc_list_table_hash): New function. (cached_dw_loc_list_table_eq): Likewise. (add_location_or_const_value_attribute): Take a bool cache_p. Cache the list when the parameter is true. (gen_formal_parameter_die): Update caller. (gen_variable_die): Likewise. (dwarf2out_finish): Likewise. (dwarf2out_abstract_function): Nullify cached_dw_loc_list_table while generating debug info for the decl. (dwarf2out_function_decl): Clear cached_dw_loc_list_table. (dwarf2out_init): Initialize cached_dw_loc_list_table. (resolve_addr): Cache the result of resolving a chain of location lists. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181716 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 25 ++++++++++ gcc/dwarf2out.c | 140 ++++++++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 146 insertions(+), 19 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 95d8a0b0a4a..240f7ca3a37 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,28 @@ +2011-11-25 Richard Sandiford + + Backport from mainline: + + 2011-03-29 Richard Sandiford + + PR debug/48190 + * dwarf2out.c (dw_loc_list_node): Add resolved_addr and replaced. + (cached_dw_loc_list_def): New structure. + (cached_dw_loc_list): New typedef. + (cached_dw_loc_list_table): New variable. + (cached_dw_loc_list_table_hash): New function. + (cached_dw_loc_list_table_eq): Likewise. + (add_location_or_const_value_attribute): Take a bool cache_p. + Cache the list when the parameter is true. + (gen_formal_parameter_die): Update caller. + (gen_variable_die): Likewise. + (dwarf2out_finish): Likewise. + (dwarf2out_abstract_function): Nullify cached_dw_loc_list_table + while generating debug info for the decl. + (dwarf2out_function_decl): Clear cached_dw_loc_list_table. + (dwarf2out_init): Initialize cached_dw_loc_list_table. + (resolve_addr): Cache the result of resolving a chain of + location lists. + 2011-11-24 Enkovich Ilya PR target/51287 diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index f0330ba6180..155b650738a 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -4431,6 +4431,11 @@ typedef struct GTY(()) dw_loc_list_struct { const char *section; /* Section this loclist is relative to */ dw_loc_descr_ref expr; hashval_t hash; + /* True if all addresses in this and subsequent lists are known to be + resolved. */ + bool resolved_addr; + /* True if this list has been replaced by dw_loc_next. */ + bool replaced; bool emitted; } dw_loc_list_node; @@ -6091,6 +6096,19 @@ typedef struct var_loc_list_def var_loc_list; /* Table of decl location linked lists. */ static GTY ((param_is (var_loc_list))) htab_t decl_loc_table; +/* A cached location list. */ +struct GTY (()) cached_dw_loc_list_def { + /* The DECL_UID of the decl that this entry describes. */ + unsigned int decl_id; + + /* The cached location list. */ + dw_loc_list_ref loc_list; +}; +typedef struct cached_dw_loc_list_def cached_dw_loc_list; + +/* Table of cached location lists. */ +static GTY ((param_is (cached_dw_loc_list))) htab_t cached_dw_loc_list_table; + /* A pointer to the base of a list of references to DIE's that are uniquely identified by their tag, presence/absence of children DIE's, and list of attribute/value pairs. */ @@ -6439,7 +6457,7 @@ static void insert_int (HOST_WIDE_INT, unsigned, unsigned char *); static void insert_double (double_int, unsigned char *); static void insert_float (const_rtx, unsigned char *); static rtx rtl_for_decl_location (tree); -static bool add_location_or_const_value_attribute (dw_die_ref, tree, +static bool add_location_or_const_value_attribute (dw_die_ref, tree, bool, enum dwarf_attribute); static bool tree_add_const_value_attribute (dw_die_ref, tree); static bool tree_add_const_value_attribute_for_decl (dw_die_ref, tree); @@ -8173,6 +8191,24 @@ lookup_decl_loc (const_tree decl) htab_find_with_hash (decl_loc_table, decl, DECL_UID (decl)); } +/* Returns a hash value for X (which really is a cached_dw_loc_list_list). */ + +static hashval_t +cached_dw_loc_list_table_hash (const void *x) +{ + return (hashval_t) ((const cached_dw_loc_list *) x)->decl_id; +} + +/* Return nonzero if decl_id of cached_dw_loc_list X is the same as + UID of decl *Y. */ + +static int +cached_dw_loc_list_table_eq (const void *x, const void *y) +{ + return (((const cached_dw_loc_list *) x)->decl_id + == DECL_UID ((const_tree) y)); +} + /* Equate a DIE to a particular declaration. */ static void @@ -16995,15 +17031,22 @@ fortran_common (tree decl, HOST_WIDE_INT *value) these things can crop up in other ways also.) Note that one type of constant value which can be passed into an inlined function is a constant pointer. This can happen for example if an actual argument in an inlined - function call evaluates to a compile-time constant address. */ + function call evaluates to a compile-time constant address. + + CACHE_P is true if it is worth caching the location list for DECL, + so that future calls can reuse it rather than regenerate it from scratch. + This is true for BLOCK_NONLOCALIZED_VARS in inlined subroutines, + since we will need to refer to them each time the function is inlined. */ static bool -add_location_or_const_value_attribute (dw_die_ref die, tree decl, +add_location_or_const_value_attribute (dw_die_ref die, tree decl, bool cache_p, enum dwarf_attribute attr) { rtx rtl; dw_loc_list_ref list; var_loc_list *loc_list; + cached_dw_loc_list *cache; + void **slot; if (TREE_CODE (decl) == ERROR_MARK) return false; @@ -17040,7 +17083,33 @@ add_location_or_const_value_attribute (dw_die_ref die, tree decl, && add_const_value_attribute (die, rtl)) return true; } - list = loc_list_from_tree (decl, decl_by_reference_p (decl) ? 0 : 2); + /* If this decl is from BLOCK_NONLOCALIZED_VARS, we might need its + list several times. See if we've already cached the contents. */ + list = NULL; + if (loc_list == NULL || cached_dw_loc_list_table == NULL) + cache_p = false; + if (cache_p) + { + cache = (cached_dw_loc_list *) + htab_find_with_hash (cached_dw_loc_list_table, decl, DECL_UID (decl)); + if (cache) + list = cache->loc_list; + } + if (list == NULL) + { + list = loc_list_from_tree (decl, decl_by_reference_p (decl) ? 0 : 2); + /* It is usually worth caching this result if the decl is from + BLOCK_NONLOCALIZED_VARS and if the list has at least two elements. */ + if (cache_p && list && list->dw_loc_next) + { + slot = htab_find_slot_with_hash (cached_dw_loc_list_table, decl, + DECL_UID (decl), INSERT); + cache = ggc_alloc_cleared_cached_dw_loc_list (); + cache->decl_id = DECL_UID (decl); + cache->loc_list = list; + *slot = cache; + } + } if (list) { add_AT_location_description (die, attr, list); @@ -18738,7 +18807,7 @@ gen_formal_parameter_die (tree node, tree origin, bool emit_name_p, equate_decl_number_to_die (node, parm_die); if (! DECL_ABSTRACT (node_or_origin)) add_location_or_const_value_attribute (parm_die, node_or_origin, - DW_AT_location); + node == NULL, DW_AT_location); break; @@ -18923,6 +18992,7 @@ dwarf2out_abstract_function (tree decl) tree context; int was_abstract; htab_t old_decl_loc_table; + htab_t old_cached_dw_loc_list_table; /* Make sure we have the actual abstract inline, not a clone. */ decl = DECL_ORIGIN (decl); @@ -18937,6 +19007,8 @@ dwarf2out_abstract_function (tree decl) get locations in abstract instantces. */ old_decl_loc_table = decl_loc_table; decl_loc_table = NULL; + old_cached_dw_loc_list_table = cached_dw_loc_list_table; + cached_dw_loc_list_table = NULL; /* Be sure we've emitted the in-class declaration DIE (if any) first, so we don't get confused by DECL_ABSTRACT. */ @@ -18961,6 +19033,7 @@ dwarf2out_abstract_function (tree decl) current_function_decl = save_fn; decl_loc_table = old_decl_loc_table; + cached_dw_loc_list_table = old_cached_dw_loc_list_table; pop_cfun (); } @@ -19745,9 +19818,8 @@ gen_variable_die (tree decl, tree origin, dw_die_ref context_die) && !TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl_or_origin))) defer_location (decl_or_origin, var_die); else - add_location_or_const_value_attribute (var_die, - decl_or_origin, - DW_AT_location); + add_location_or_const_value_attribute (var_die, decl_or_origin, + decl == NULL, DW_AT_location); add_pubname (decl_or_origin, var_die); } else @@ -21534,6 +21606,7 @@ dwarf2out_function_decl (tree decl) dwarf2out_decl (decl); htab_empty (decl_loc_table); + htab_empty (cached_dw_loc_list_table); } /* Output a marker (i.e. a label) for the beginning of the generated code for @@ -22267,6 +22340,11 @@ dwarf2out_init (const char *filename ATTRIBUTE_UNUSED) decl_loc_table = htab_create_ggc (10, decl_loc_table_hash, decl_loc_table_eq, NULL); + /* Allocate the cached_dw_loc_list_table. */ + cached_dw_loc_list_table + = htab_create_ggc (10, cached_dw_loc_list_table_hash, + cached_dw_loc_list_table_eq, NULL); + /* Allocate the initial hunk of the decl_scope_table. */ decl_scope_table = VEC_alloc (tree, gc, 256); @@ -22907,30 +22985,53 @@ resolve_addr (dw_die_ref die) { dw_die_ref c; dw_attr_ref a; - dw_loc_list_ref *curr; + dw_loc_list_ref *curr, *start, loc; unsigned ix; FOR_EACH_VEC_ELT (dw_attr_node, die->die_attr, ix, a) switch (AT_class (a)) { case dw_val_class_loc_list: - curr = AT_loc_list_ptr (a); - while (*curr) + start = curr = AT_loc_list_ptr (a); + loc = *curr; + gcc_assert (loc); + /* The same list can be referenced more than once. See if we have + already recorded the result from a previous pass. */ + if (loc->replaced) + *curr = loc->dw_loc_next; + else if (!loc->resolved_addr) { - if (!resolve_addr_in_expr ((*curr)->expr)) + /* As things stand, we do not expect or allow one die to + reference a suffix of another die's location list chain. + References must be identical or completely separate. + There is therefore no need to cache the result of this + pass on any list other than the first; doing so + would lead to unnecessary writes. */ + while (*curr) { - dw_loc_list_ref next = (*curr)->dw_loc_next; - if (next && (*curr)->ll_symbol) + gcc_assert (!(*curr)->replaced && !(*curr)->resolved_addr); + if (!resolve_addr_in_expr ((*curr)->expr)) { - gcc_assert (!next->ll_symbol); - next->ll_symbol = (*curr)->ll_symbol; + dw_loc_list_ref next = (*curr)->dw_loc_next; + if (next && (*curr)->ll_symbol) + { + gcc_assert (!next->ll_symbol); + next->ll_symbol = (*curr)->ll_symbol; + } + *curr = next; } - *curr = next; + else + curr = &(*curr)->dw_loc_next; } + if (loc == *start) + loc->resolved_addr = 1; else - curr = &(*curr)->dw_loc_next; + { + loc->replaced = 1; + loc->dw_loc_next = *start; + } } - if (!AT_loc_list (a)) + if (!*start) { remove_AT (die, a->dw_attr); ix--; @@ -23359,6 +23460,7 @@ dwarf2out_finish (const char *filename) add_location_or_const_value_attribute ( VEC_index (deferred_locations, deferred_locations_list, i)->die, VEC_index (deferred_locations, deferred_locations_list, i)->variable, + false, DW_AT_location); } -- cgit v1.2.3 From 95982403dfcd700019e214629a1d9720d51fe88f Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Fri, 25 Nov 2011 17:18:05 +0000 Subject: 2011-11-25 Tobias Burnus PR fortran/50408 * trans-decl.c (gfc_get_module_backend_decl): Also copy ts.u.derived from the gsym if the ts.type is BT_CLASS. (gfc_get_extern_function_decl): Copy also the backend_decl for the symbol's ts.u.{derived,cl} from the gsym. * trans-types.c (gfc_copy_dt_decls_ifequal): Directly return if "from" and "to" are the same. 2011-11-25 Tobias Burnus PR fortran/50408 * gfortran.dg/whole_file_35.f90: New. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181726 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 10 ++++++++++ gcc/fortran/trans-decl.c | 7 ++++++- gcc/fortran/trans-types.c | 3 +++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/whole_file_35.f90 | 28 ++++++++++++++++++++++++++++ 5 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gfortran.dg/whole_file_35.f90 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 84c5d7ed492..17fa939e2f5 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,13 @@ +2011-11-25 Tobias Burnus + + PR fortran/50408 + * trans-decl.c (gfc_get_module_backend_decl): Also copy + ts.u.derived from the gsym if the ts.type is BT_CLASS. + (gfc_get_extern_function_decl): Copy also the backend_decl + for the symbol's ts.u.{derived,cl} from the gsym. + * trans-types.c (gfc_copy_dt_decls_ifequal): Directly + return if "from" and "to" are the same. + 2011-11-24 Tobias Burnus PR fortran/51218 diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 2d987f0b1dc..25703f0c52b 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -677,7 +677,7 @@ gfc_get_module_backend_decl (gfc_symbol *sym) } else if (s->backend_decl) { - if (sym->ts.type == BT_DERIVED) + if (sym->ts.type == BT_DERIVED || sym->ts.type == BT_CLASS) gfc_copy_dt_decls_ifequal (s->ts.u.derived, sym->ts.u.derived, true); else if (sym->ts.type == BT_CHARACTER) @@ -1602,6 +1602,11 @@ gfc_get_extern_function_decl (gfc_symbol * sym) gfc_find_symbol (sym->name, gsym->ns, 0, &s); if (s && s->backend_decl) { + if (sym->ts.type == BT_DERIVED || sym->ts.type == BT_CLASS) + gfc_copy_dt_decls_ifequal (s->ts.u.derived, sym->ts.u.derived, + true); + else if (sym->ts.type == BT_CHARACTER) + sym->ts.u.cl->backend_decl = s->ts.u.cl->backend_decl; sym->backend_decl = s->backend_decl; return sym->backend_decl; } diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c index 24840bff7fa..ca078963234 100644 --- a/gcc/fortran/trans-types.c +++ b/gcc/fortran/trans-types.c @@ -2092,6 +2092,9 @@ gfc_copy_dt_decls_ifequal (gfc_symbol *from, gfc_symbol *to, gfc_component *to_cm; gfc_component *from_cm; + if (from == to) + return 1; + if (from->backend_decl == NULL || !gfc_compare_derived_types (from, to)) return 0; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 28fb3a7e5fb..c3edf9be696 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-11-25 Tobias Burnus + + PR fortran/50408 + * gfortran.dg/whole_file_35.f90: New. + 2011-11-24 Tobias Burnus PR fortran/51218 diff --git a/gcc/testsuite/gfortran.dg/whole_file_35.f90 b/gcc/testsuite/gfortran.dg/whole_file_35.f90 new file mode 100644 index 00000000000..46a88655145 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/whole_file_35.f90 @@ -0,0 +1,28 @@ +! { dg-do compile } +! +! PR fortran/50408 +! +! Contributed by Vittorio Zecca +! + module m + type int + integer :: val + end type int + interface ichar + module procedure uch + end interface + contains + function uch (c) + character (len=1), intent (in) :: c + type (int) :: uch + intrinsic ichar + uch%val = 127 - ichar (c) + end function uch + end module m + + program p + use m + print *,ichar('~') ! must print "1" + end program p + +! { dg-final { cleanup-modules "m" } } -- cgit v1.2.3 From 82942f4ec8baa501f4603f7103947092bd2558e9 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sat, 26 Nov 2011 00:17:49 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181734 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index c8b387dca73..3d3b1492683 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111125 +20111126 -- cgit v1.2.3 From 14137db684e061042510fffc63e07b2edb8970ef Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sun, 27 Nov 2011 00:18:08 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181753 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 3d3b1492683..fa5fefa33c5 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111126 +20111127 -- cgit v1.2.3 From 480fcecfe86e1588ed48c2c6c0ec0d0cad8207c5 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Mon, 28 Nov 2011 00:18:50 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181769 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index fa5fefa33c5..24a16bebbcf 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111127 +20111128 -- cgit v1.2.3 From 91a10e70b8b91901fb5c8a37e15286fe40cd2a1d Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Tue, 29 Nov 2011 00:18:26 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181792 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 24a16bebbcf..cadd9400452 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111128 +20111129 -- cgit v1.2.3 From 46e7bc11b14e3bc2a07ae6a431ce7b6f8396f0f6 Mon Sep 17 00:00:00 2001 From: Andreas Tobler Date: Tue, 29 Nov 2011 20:13:15 +0000 Subject: 2011-11-29 Andreas Tobler * config.rpath (ld_shlibs): Fix detection of FreeBSD-10 and up. (libname_spec): Likewise. * configure: Regenerate with autoconf -I ../../. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181817 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/classpath/ChangeLog.gcj | 6 ++++++ libjava/classpath/config.rpath | 4 ++-- libjava/classpath/configure | 12 ++++++------ 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/libjava/classpath/ChangeLog.gcj b/libjava/classpath/ChangeLog.gcj index 9eb70ac14e5..0f537912e8c 100644 --- a/libjava/classpath/ChangeLog.gcj +++ b/libjava/classpath/ChangeLog.gcj @@ -1,3 +1,9 @@ +2011-11-29 Andreas Tobler + + * config.rpath (ld_shlibs): Fix detection of FreeBSD-10 and up. + (libname_spec): Likewise. + * configure: Regenerate with autoconf -I ../../. + 2011-02-13 Ralf Wildenhues * config.rpath, ltcf-c.sh, ltcf-gcj.sh, ltconfig: Remove diff --git a/libjava/classpath/config.rpath b/libjava/classpath/config.rpath index def43dcc5e7..b7f75cde451 100755 --- a/libjava/classpath/config.rpath +++ b/libjava/classpath/config.rpath @@ -361,7 +361,7 @@ else hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; - freebsd2*) + freebsd2.*) hardcode_direct=yes hardcode_minus_L=yes ;; @@ -533,7 +533,7 @@ case "$host_os" in ;; freebsd* | dragonfly*) case "$host_os" in - freebsd[123]*) + freebsd[23].*) library_names_spec='$libname$shrext$versuffix' ;; *) library_names_spec='$libname$shrext' ;; diff --git a/libjava/classpath/configure b/libjava/classpath/configure index 2274f648cf9..a25f5f75a47 100755 --- a/libjava/classpath/configure +++ b/libjava/classpath/configure @@ -10025,7 +10025,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -10941,7 +10941,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -10959,7 +10959,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) @@ -14225,7 +14225,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi esac ;; - freebsd[12]*) + freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no @@ -16000,7 +16000,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -16018,7 +16018,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) -- cgit v1.2.3 From 3136a2f934d3510114f841eb63a0eaa86f0c6682 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Wed, 30 Nov 2011 00:18:45 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181828 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index cadd9400452..74e1c6efb71 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111129 +20111130 -- cgit v1.2.3 From 12eed295802475e0ffd7ccb961bb5973fd9ea517 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Dec 2011 00:18:32 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181866 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 74e1c6efb71..1678f2f93ab 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111130 +20111201 -- cgit v1.2.3 From 00fb3e48da2e88fccc9c913159eaa6365aa51323 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Fri, 2 Dec 2011 00:18:07 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181900 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 1678f2f93ab..c30346e372a 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111201 +20111202 -- cgit v1.2.3 From 219b112fae5c9bface93f32e1aaf5cd2d9d08f4c Mon Sep 17 00:00:00 2001 From: Georg-Johann Lay Date: Fri, 2 Dec 2011 19:14:15 +0000 Subject: PR target/51002 PR target/51345 * config/avr/libgcc.S (__prologue_saves__, __epilogue_restores__): Enclose parts using __SP_H__ in !defined (__AVR_HAVE_8BIT_SP__). Add FIXME comments. * config/avr/avr.md (movhi_sp_r_irq_off, movhi_sp_r_irq_on): Set insn condition to !AVR_HAVE_8BIT_SP. * config/avr/avr.c (output_movhi): "clr%B0" instead of "in %B0,__SP_H__" if AVR_HAVE_8BIT_SP. (avr_file_start): Only print "__SP_H__ = 0x3e" if !AVR_HAVE_8BIT_SP. * config/avr/avr-devices.c (avr_mcu_types): ATtiny4313 and AT86RF401 have a 16-bit SP (their manual is bogus). git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181936 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 15 +++++++++++++++ gcc/config/avr/avr-devices.c | 4 ++-- gcc/config/avr/avr.c | 17 ++++++++++------- gcc/config/avr/avr.md | 4 ++-- gcc/config/avr/libgcc.S | 20 ++++++++++++++++++++ 5 files changed, 49 insertions(+), 11 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 240f7ca3a37..fdb61d09633 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,18 @@ +2011-12-02 Georg-Johann Lay + + PR target/51002 + PR target/51345 + * config/avr/libgcc.S (__prologue_saves__, __epilogue_restores__): + Enclose parts using __SP_H__ in !defined (__AVR_HAVE_8BIT_SP__). + Add FIXME comments. + * config/avr/avr.md (movhi_sp_r_irq_off, movhi_sp_r_irq_on): Set + insn condition to !AVR_HAVE_8BIT_SP. + * config/avr/avr.c (output_movhi): "clr%B0" instead of "in + %B0,__SP_H__" if AVR_HAVE_8BIT_SP. + (avr_file_start): Only print "__SP_H__ = 0x3e" if !AVR_HAVE_8BIT_SP. + * config/avr/avr-devices.c (avr_mcu_types): ATtiny4313 and + AT86RF401 have a 16-bit SP (their manual is bogus). + 2011-11-25 Richard Sandiford Backport from mainline: diff --git a/gcc/config/avr/avr-devices.c b/gcc/config/avr/avr-devices.c index b50d6f94e4b..b565a603ae9 100755 --- a/gcc/config/avr/avr-devices.c +++ b/gcc/config/avr/avr-devices.c @@ -70,7 +70,7 @@ const struct mcu_type_s avr_mcu_types[] = { { "attiny2313a", ARCH_AVR25, "__AVR_ATtiny2313A__", 1, 0x0060, "tn2313a" }, { "attiny24", ARCH_AVR25, "__AVR_ATtiny24__", 1, 0x0060, "tn24" }, { "attiny24a", ARCH_AVR25, "__AVR_ATtiny24A__", 1, 0x0060, "tn24a" }, - { "attiny4313", ARCH_AVR25, "__AVR_ATtiny4313__", 1, 0x0060, "tn4313" }, + { "attiny4313", ARCH_AVR25, "__AVR_ATtiny4313__", 0, 0x0060, "tn4313" }, { "attiny44", ARCH_AVR25, "__AVR_ATtiny44__", 0, 0x0060, "tn44" }, { "attiny44a", ARCH_AVR25, "__AVR_ATtiny44A__", 0, 0x0060, "tn44a" }, { "attiny84", ARCH_AVR25, "__AVR_ATtiny84__", 0, 0x0060, "tn84" }, @@ -88,7 +88,7 @@ const struct mcu_type_s avr_mcu_types[] = { { "attiny87", ARCH_AVR25, "__AVR_ATtiny87__", 0, 0x0100, "tn87" }, { "attiny48", ARCH_AVR25, "__AVR_ATtiny48__", 0, 0x0100, "tn48" }, { "attiny88", ARCH_AVR25, "__AVR_ATtiny88__", 0, 0x0100, "tn88" }, - { "at86rf401", ARCH_AVR25, "__AVR_AT86RF401__", 1, 0x0060, "86401" }, + { "at86rf401", ARCH_AVR25, "__AVR_AT86RF401__", 0, 0x0060, "86401" }, /* Classic, > 8K, <= 64K. */ { "avr3", ARCH_AVR3, NULL, 0, 0x0060, "43355" }, { "at43usb355", ARCH_AVR3, "__AVR_AT43USB355__", 0, 0x0060, "43355" }, diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index a2fc2c72d83..b5a61a36450 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -1879,9 +1879,12 @@ output_movhi (rtx insn, rtx operands[], int *l) } else if (test_hard_reg_class (STACK_REG, src)) { - *l = 2; - return (AS2 (in,%A0,__SP_L__) CR_TAB - AS2 (in,%B0,__SP_H__)); + *l = 2; + return AVR_HAVE_8BIT_SP + ? (AS2 (in,%A0,__SP_L__) CR_TAB + AS1 (clr,%B0)) + : (AS2 (in,%A0,__SP_L__) CR_TAB + AS2 (in,%B0,__SP_H__)); } if (AVR_HAVE_MOVW) @@ -5173,10 +5176,10 @@ avr_file_start (void) default_file_start (); -/* fprintf (asm_out_file, "\t.arch %s\n", avr_mcu_name);*/ - fputs ("__SREG__ = 0x3f\n" - "__SP_H__ = 0x3e\n" - "__SP_L__ = 0x3d\n", asm_out_file); + fputs ("__SREG__ = 0x3f\n", asm_out_file); + if (!AVR_HAVE_8BIT_SP) + fputs ("__SP_H__ = 0x3e\n", asm_out_file); + fputs ("__SP_L__ = 0x3d\n", asm_out_file); fputs ("__tmp_reg__ = 0\n" "__zero_reg__ = 1\n", asm_out_file); diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md index 1fc6fee57d5..bff4f6eb2fa 100644 --- a/gcc/config/avr/avr.md +++ b/gcc/config/avr/avr.md @@ -299,7 +299,7 @@ [(set (match_operand:HI 0 "stack_register_operand" "=q") (unspec_volatile:HI [(match_operand:HI 1 "register_operand" "r")] UNSPECV_WRITE_SP_IRQ_OFF))] - "" + "!AVR_HAVE_8BIT_SP" "out __SP_H__, %B1 out __SP_L__, %A1" [(set_attr "length" "2") @@ -309,7 +309,7 @@ [(set (match_operand:HI 0 "stack_register_operand" "=q") (unspec_volatile:HI [(match_operand:HI 1 "register_operand" "r")] UNSPECV_WRITE_SP_IRQ_ON))] - "" + "!AVR_HAVE_8BIT_SP" "cli out __SP_H__, %B1 sei diff --git a/gcc/config/avr/libgcc.S b/gcc/config/avr/libgcc.S index ac8e5cd94da..89bd378cf24 100644 --- a/gcc/config/avr/libgcc.S +++ b/gcc/config/avr/libgcc.S @@ -582,6 +582,15 @@ __prologue_saves__: push r17 push r28 push r29 +#if defined (__AVR_HAVE_8BIT_SP__) +;; FIXME: __AVR_HAVE_8BIT_SP__ is set on device level, not on core level +;; so this lines are dead code. To make it work, devices without +;; SP_H must get their own multilib(s), see PR51345. + in r28,__SP_L__ + sub r28,r26 + clr r29 + out __SP_L__,r28 +#else in r28,__SP_L__ in r29,__SP_H__ sub r28,r26 @@ -591,6 +600,7 @@ __prologue_saves__: out __SP_H__,r29 out __SREG__,__tmp_reg__ out __SP_L__,r28 +#endif #if defined (__AVR_HAVE_EIJMP_EICALL__) eijmp #else @@ -625,6 +635,15 @@ __epilogue_restores__: ldd r16,Y+4 ldd r17,Y+3 ldd r26,Y+2 +#if defined (__AVR_HAVE_8BIT_SP__) +;; FIXME: __AVR_HAVE_8BIT_SP__ is set on device level, not on core level +;; so this lines are dead code. To make it work, devices without +;; SP_H must get their own multilib(s). + ldd r29,Y+1 + add r28,r30 + out __SP_L__,r28 + mov r28, r26 +#else ldd r27,Y+1 add r28,r30 adc r29,__zero_reg__ @@ -635,6 +654,7 @@ __epilogue_restores__: out __SP_L__,r28 mov_l r28, r26 mov_h r29, r27 +#endif ret .endfunc #endif /* defined (L_epilogue) */ -- cgit v1.2.3 From 229eb3c35f44b0053ec75a7b01cb376903562aa0 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sat, 3 Dec 2011 00:18:07 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181958 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index c30346e372a..f5070be5a80 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111202 +20111203 -- cgit v1.2.3 From 94af2f0601157c1f7cfb45b197aaca42a8b82643 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Sat, 3 Dec 2011 12:57:38 +0000 Subject: 2011-12-03 Tobias Burnus PR fortran/50684 * check.c (variable_check): Fix intent(in) check. 2011-12-03 Tobias Burnus PR fortran/50684 * gfortran.dg/move_alloc_8.f90: New. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181969 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 5 ++ gcc/fortran/check.c | 29 ++++++-- gcc/testsuite/ChangeLog | 5 ++ gcc/testsuite/gfortran.dg/move_alloc_8.f90 | 106 +++++++++++++++++++++++++++++ 4 files changed, 141 insertions(+), 4 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/move_alloc_8.f90 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 17fa939e2f5..fe99b578a0d 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2011-12-03 Tobias Burnus + + PR fortran/50684 + * check.c (variable_check): Fix intent(in) check. + 2011-11-25 Tobias Burnus PR fortran/50408 diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index a5d528d0d3f..d8274440096 100644 --- a/gcc/fortran/check.c +++ b/gcc/fortran/check.c @@ -485,10 +485,31 @@ variable_check (gfc_expr *e, int n, bool allow_proc) && (gfc_current_intrinsic_arg[n]->intent == INTENT_OUT || gfc_current_intrinsic_arg[n]->intent == INTENT_INOUT)) { - gfc_error ("'%s' argument of '%s' intrinsic at %L cannot be INTENT(IN)", - gfc_current_intrinsic_arg[n]->name, gfc_current_intrinsic, - &e->where); - return FAILURE; + gfc_ref *ref; + bool pointer = e->symtree->n.sym->ts.type == BT_CLASS + && CLASS_DATA (e->symtree->n.sym) + ? CLASS_DATA (e->symtree->n.sym)->attr.class_pointer + : e->symtree->n.sym->attr.pointer; + + for (ref = e->ref; ref; ref = ref->next) + { + if (pointer && ref->type == REF_COMPONENT) + break; + if (ref->type == REF_COMPONENT + && ((ref->u.c.component->ts.type == BT_CLASS + && CLASS_DATA (ref->u.c.component)->attr.class_pointer) + || (ref->u.c.component->ts.type != BT_CLASS + && ref->u.c.component->attr.pointer))) + break; + } + + if (!ref) + { + gfc_error ("'%s' argument of '%s' intrinsic at %L cannot be " + "INTENT(IN)", gfc_current_intrinsic_arg[n]->name, + gfc_current_intrinsic, &e->where); + return FAILURE; + } } if (e->expr_type == EXPR_VARIABLE diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c3edf9be696..f10b88d409b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-12-03 Tobias Burnus + + PR fortran/50684 + * gfortran.dg/move_alloc_8.f90: New. + 2011-11-25 Tobias Burnus PR fortran/50408 diff --git a/gcc/testsuite/gfortran.dg/move_alloc_8.f90 b/gcc/testsuite/gfortran.dg/move_alloc_8.f90 new file mode 100644 index 00000000000..2fa53066600 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/move_alloc_8.f90 @@ -0,0 +1,106 @@ +! { dg-do compile } +! +! PR fortran/50684 +! +! Module "bug" contributed by Martin Steghöfer. +! + +MODULE BUG + TYPE MY_TYPE + INTEGER, ALLOCATABLE :: VALUE + END TYPE +CONTAINS + SUBROUTINE POINTER_INTENT_IN_BUG_WORKING(POINTER_INTENT_IN_VARIABLE) + TYPE(MY_TYPE), POINTER, INTENT(IN) :: POINTER_INTENT_IN_VARIABLE + TYPE(MY_TYPE), POINTER :: POINTER_VARIABLE_LOCAL + INTEGER, ALLOCATABLE :: LOCAL_VALUE + + POINTER_VARIABLE_LOCAL=>POINTER_INTENT_IN_VARIABLE + CALL MOVE_ALLOC(POINTER_VARIABLE_LOCAL%VALUE, LOCAL_VALUE) + + RETURN + END SUBROUTINE POINTER_INTENT_IN_BUG_WORKING + + SUBROUTINE POINTER_INTENT_IN_BUG_FAILING(POINTER_INTENT_IN_VARIABLE) + TYPE(MY_TYPE), POINTER, INTENT(IN) :: POINTER_INTENT_IN_VARIABLE + INTEGER, ALLOCATABLE :: LOCAL_VALUE + + CALL MOVE_ALLOC(POINTER_INTENT_IN_VARIABLE%VALUE, LOCAL_VALUE) + + RETURN + END SUBROUTINE POINTER_INTENT_IN_BUG_FAILING +end module bug + +subroutine test1() + TYPE MY_TYPE + INTEGER, ALLOCATABLE :: VALUE + END TYPE +CONTAINS + SUBROUTINE sub (dt) + type(MY_TYPE), intent(in) :: dt + INTEGER, ALLOCATABLE :: lv + call move_alloc(dt%VALUE, lv) ! { dg-error "cannot be INTENT.IN." } + END SUBROUTINE +end subroutine test1 + +subroutine test2 (x, px) + implicit none + type t + integer, allocatable :: a + end type t + + type t2 + type(t), pointer :: ptr + integer, allocatable :: a + end type t2 + + type(t2), intent(in) :: x + type(t2), pointer, intent(in) :: px + + integer, allocatable :: a + type(t2), pointer :: ta + + call move_alloc (px, ta) ! { dg-error "cannot be INTENT.IN." } + call move_alloc (x%a, a) ! { dg-error "cannot be INTENT.IN." } + call move_alloc (x%ptr%a, a) ! OK (3) + call move_alloc (px%a, a) ! OK (4) + call move_alloc (px%ptr%a, a) ! OK (5) +end subroutine test2 + +subroutine test3 (x, px) + implicit none + type t + integer, allocatable :: a + end type t + + type t2 + class(t), pointer :: ptr + integer, allocatable :: a + end type t2 + + type(t2), intent(in) :: x + class(t2), pointer, intent(in) :: px + + integer, allocatable :: a + class(t2), pointer :: ta + + call move_alloc (px, ta) ! { dg-error "cannot be INTENT.IN." } + call move_alloc (x%a, a) ! { dg-error "cannot be INTENT.IN." } + call move_alloc (x%ptr%a, a) ! OK (6) + call move_alloc (px%a, a) ! OK (7) + call move_alloc (px%ptr%a, a) ! OK (8) +end subroutine test3 + +subroutine test4() + TYPE MY_TYPE + INTEGER, ALLOCATABLE :: VALUE + END TYPE +CONTAINS + SUBROUTINE sub (dt) + CLASS(MY_TYPE), intent(in) :: dt + INTEGER, ALLOCATABLE :: lv + call move_alloc(dt%VALUE, lv) ! { dg-error "cannot be INTENT.IN." } + END SUBROUTINE +end subroutine test4 + +! { dg-final { cleanup-modules "bug" } } -- cgit v1.2.3 From 07f4c6f689419a59cf1e2aaba6a171cf6817bc47 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sun, 4 Dec 2011 00:17:50 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181978 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index f5070be5a80..f0b04209630 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111203 +20111204 -- cgit v1.2.3 From 408694428d20d18ea63c057bfda808317eead8fb Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Sun, 4 Dec 2011 13:23:48 +0000 Subject: PR target/51393 * config/i386/avxintrin.h (_mm256_insert_epi64): Declare second parameter as long long. testsuite/ChangeLog: PR target/51393 * gcc.target/i386/pr51393.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181988 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 8 +++++++- gcc/config/i386/avxintrin.h | 2 +- gcc/testsuite/ChangeLog | 12 +++++++++--- gcc/testsuite/gcc.target/i386/pr51393.c | 22 ++++++++++++++++++++++ 4 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr51393.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fdb61d09633..770c4487f02 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-12-04 Jérémie Detrey + + PR target/51393 + * config/i386/avxintrin.h (_mm256_insert_epi64): Declare second + parameter as long long. + 2011-12-02 Georg-Johann Lay PR target/51002 @@ -430,7 +436,7 @@ * config/rs6000/rs6000.md (probe_stack): Use explicit operand. * config/rs6000/rs6000.c (output_probe_stack_range): Likewise. -2011-09-14 Diego Novillo +2011-09-14 Diego Novillo * tree-vect-stmts.c (vect_transform_stmt): Remove unused local variable ORIG_SCALAR_STMT. diff --git a/gcc/config/i386/avxintrin.h b/gcc/config/i386/avxintrin.h index 8055cc60722..6d4213dc8bd 100644 --- a/gcc/config/i386/avxintrin.h +++ b/gcc/config/i386/avxintrin.h @@ -759,7 +759,7 @@ _mm256_insert_epi8 (__m256i __X, int __D, int const __N) #ifdef __x86_64__ extern __inline __m256i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm256_insert_epi64 (__m256i __X, int __D, int const __N) +_mm256_insert_epi64 (__m256i __X, long long __D, int const __N) { __m128i __Y = _mm256_extractf128_si256 (__X, __N >> 1); __Y = _mm_insert_epi64 (__Y, __D, __N % 2); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f10b88d409b..c06d1a90744 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2011-12-04 Uros Bizjak + Jérémie Detrey + + PR target/51393 + * gcc.target/i386/pr51393.c: New test. + 2011-12-03 Tobias Burnus PR fortran/50684 @@ -80,9 +86,9 @@ 2011-10-20 Uros Bizjak - * gcc.dg/ipa/ipa-sra-2.c: Add dg-require-effective-target - non_strict_align. - * gcc.dg/ipa/ipa-sra-6.c: Ditto. + * gcc.dg/ipa/ipa-sra-2.c: Add dg-require-effective-target + non_strict_align. + * gcc.dg/ipa/ipa-sra-6.c: Ditto. 2011-10-19 Jason Merrill diff --git a/gcc/testsuite/gcc.target/i386/pr51393.c b/gcc/testsuite/gcc.target/i386/pr51393.c new file mode 100644 index 00000000000..ac167396ee7 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr51393.c @@ -0,0 +1,22 @@ +/* { dg-do run } */ +/* { dg-require-effective-target avx } */ +/* { dg-require-effective-target lp64 } */ +/* { dg-options "-O -mavx" } */ + +#include "avx-check.h" +#include + +static void +__attribute__((noinline)) +avx_test (void) +{ + long long in = 0x800000000ll; + long long out; + + __m256i zero = _mm256_setzero_si256(); + __m256i tmp = _mm256_insert_epi64 (zero, in, 0); + out = _mm256_extract_epi64(tmp, 0); + + if (in != out) + abort (); +} -- cgit v1.2.3 From da8468a0ec13f0ab4bcfa70cf9209eff2324004a Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Mon, 5 Dec 2011 00:18:30 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@181998 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index f0b04209630..2912fb17f64 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111204 +20111205 -- cgit v1.2.3 From 9dce3cea1ea93bfc2fe3cf47e8b6b1c37b788093 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Tue, 6 Dec 2011 00:18:14 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182036 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 2912fb17f64..2f49ecc2bf7 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111205 +20111206 -- cgit v1.2.3 From 524e8a6bbdb4dbcf0f60ffe1c85e38017961303f Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 6 Dec 2011 03:47:37 +0000 Subject: PR target/50906 * config/rs6000/rs6000.c (rs6000_emit_prologue ): Do not mark r11 setup as frame-related. Pass correct offset to rs6000_emit_savres_rtx. Correct out-of-line rs6000_frame_related arguments. Correct sp_offset. Remove "offset" fudge from in-line rs6000_frame_related call. Rename misleading variable. Fix comments and whitespace. Tidy some expressions. (rs6000_emit_epilogue ): Always set frame_reg_rtx to r11 in out-of-line case. Correct sp_offset. Pass correct offset to rs6000_emit_savres_rtx. Rename misleading variable. Fix comments and whitespace. Tidy some expressions. (rs6000_emit_epilogue ): Add sp_offset adjustment when !saving_GPRs_inline. Correct register mode used in address calcs. (rs6000_emit_epilogue ): Similarly when !restoring_GPRs_inline. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182040 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 19 ++++++ gcc/config/rs6000/rs6000.c | 151 ++++++++++++++++++++++----------------------- 2 files changed, 92 insertions(+), 78 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 770c4487f02..aa57048763a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,22 @@ +2011-12-06 Alan Modra + + PR target/50906 + * config/rs6000/rs6000.c (rs6000_emit_prologue ): + Do not mark r11 setup as frame-related. Pass correct offset to + rs6000_emit_savres_rtx. Correct out-of-line rs6000_frame_related + arguments. Correct sp_offset. Remove "offset" fudge from + in-line rs6000_frame_related call. Rename misleading variable. + Fix comments and whitespace. Tidy some expressions. + (rs6000_emit_epilogue ): Always set frame_reg_rtx + to r11 in out-of-line case. Correct sp_offset. Pass correct + offset to rs6000_emit_savres_rtx. Rename misleading variable. + Fix comments and whitespace. Tidy some expressions. + (rs6000_emit_epilogue ): Add sp_offset + adjustment when !saving_GPRs_inline. Correct register mode + used in address calcs. + (rs6000_emit_epilogue ): Similarly when + !restoring_GPRs_inline. + 2011-12-04 Jérémie Detrey PR target/51393 diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 0511c0cce76..294f041d7e8 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -20645,56 +20645,52 @@ rs6000_emit_prologue (void) { int i; rtx spe_save_area_ptr; - + int save_ptr_to_sp; + int ool_adjust = 0; + /* Determine whether we can address all of the registers that need - to be saved with an offset from the stack pointer that fits in + to be saved with an offset from frame_reg_rtx that fits in the small const field for SPE memory instructions. */ - int spe_regs_addressable_via_sp - = (SPE_CONST_OFFSET_OK(info->spe_gp_save_offset + sp_offset - + (32 - info->first_gp_reg_save - 1) * reg_size) + int spe_regs_addressable + = (SPE_CONST_OFFSET_OK (info->spe_gp_save_offset + sp_offset + + reg_size * (32 - info->first_gp_reg_save - 1)) && saving_GPRs_inline); int spe_offset; - - if (spe_regs_addressable_via_sp) + + if (spe_regs_addressable) { spe_save_area_ptr = frame_reg_rtx; + save_ptr_to_sp = info->total_size - sp_offset; spe_offset = info->spe_gp_save_offset + sp_offset; } else { /* Make r11 point to the start of the SPE save area. We need to be careful here if r11 is holding the static chain. If - it is, then temporarily save it in r0. We would use r0 as - our base register here, but using r0 as a base register in - loads and stores means something different from what we - would like. */ - int ool_adjust = (saving_GPRs_inline - ? 0 - : (info->first_gp_reg_save - - (FIRST_SAVRES_REGISTER+1))*8); - HOST_WIDE_INT offset = (info->spe_gp_save_offset - + sp_offset - ool_adjust); + it is, then temporarily save it in r0. */ + int offset; + + if (!saving_GPRs_inline) + ool_adjust = 8 * (info->first_gp_reg_save + - (FIRST_SAVRES_REGISTER + 1)); + offset = info->spe_gp_save_offset + sp_offset - ool_adjust; + spe_save_area_ptr = gen_rtx_REG (Pmode, 11); + save_ptr_to_sp = info->total_size - sp_offset + offset; + spe_offset = 0; if (using_static_chain_p) { rtx r0 = gen_rtx_REG (Pmode, 0); gcc_assert (info->first_gp_reg_save > 11); - - emit_move_insn (r0, gen_rtx_REG (Pmode, 11)); + + emit_move_insn (r0, spe_save_area_ptr); } - - spe_save_area_ptr = gen_rtx_REG (Pmode, 11); - insn = emit_insn (gen_addsi3 (spe_save_area_ptr, - frame_reg_rtx, - GEN_INT (offset))); - /* We need to make sure the move to r11 gets noted for - properly outputting unwind information. */ - if (!saving_GPRs_inline) - rs6000_frame_related (insn, frame_reg_rtx, offset, - NULL_RTX, NULL_RTX); - spe_offset = 0; + emit_insn (gen_addsi3 (spe_save_area_ptr, + frame_reg_rtx, GEN_INT (offset))); + if (REGNO (frame_reg_rtx) == 11) + sp_offset = -info->spe_gp_save_offset + ool_adjust; } - + if (saving_GPRs_inline) { for (i = 0; i < 32 - info->first_gp_reg_save; i++) @@ -20706,36 +20702,34 @@ rs6000_emit_prologue (void) /* We're doing all this to ensure that the offset fits into the immediate offset of 'evstdd'. */ gcc_assert (SPE_CONST_OFFSET_OK (reg_size * i + spe_offset)); - + offset = GEN_INT (reg_size * i + spe_offset); addr = gen_rtx_PLUS (Pmode, spe_save_area_ptr, offset); mem = gen_rtx_MEM (V2SImode, addr); - + insn = emit_move_insn (mem, reg); - - rs6000_frame_related (insn, spe_save_area_ptr, - info->spe_gp_save_offset - + sp_offset + reg_size * i, - offset, const0_rtx); + + rs6000_frame_related (insn, + spe_save_area_ptr, save_ptr_to_sp, + NULL_RTX, NULL_RTX); } } else { rtx par; - par = rs6000_make_savres_rtx (info, gen_rtx_REG (Pmode, 11), - 0, reg_mode, + par = rs6000_make_savres_rtx (info, spe_save_area_ptr, + ool_adjust, reg_mode, /*savep=*/true, /*gpr=*/true, /*lr=*/false); insn = emit_insn (par); - rs6000_frame_related (insn, frame_ptr_rtx, info->total_size, + rs6000_frame_related (insn, spe_save_area_ptr, save_ptr_to_sp, NULL_RTX, NULL_RTX); } - - + /* Move the static chain pointer back. */ - if (using_static_chain_p && !spe_regs_addressable_via_sp) - emit_move_insn (gen_rtx_REG (Pmode, 11), gen_rtx_REG (Pmode, 0)); + if (using_static_chain_p && !spe_regs_addressable) + emit_move_insn (spe_save_area_ptr, gen_rtx_REG (Pmode, 0)); } else if (!WORLD_SAVE_P (info) && !saving_GPRs_inline) { @@ -20744,10 +20738,12 @@ rs6000_emit_prologue (void) /* Need to adjust r11 (r12) if we saved any FPRs. */ if (info->first_fp_reg_save != 64) { - rtx dest_reg = gen_rtx_REG (reg_mode, DEFAULT_ABI == ABI_AIX - ? 12 : 11); - rtx offset = GEN_INT (sp_offset - + (-8 * (64-info->first_fp_reg_save))); + rtx dest_reg = gen_rtx_REG (Pmode, DEFAULT_ABI == ABI_AIX ? 12 : 11); + int save_off = 8 * (64 - info->first_fp_reg_save); + rtx offset = GEN_INT (sp_offset - save_off); + + if (REGNO (dest_reg) == REGNO (frame_reg_rtx)) + sp_offset = save_off; emit_insn (gen_add3_insn (dest_reg, frame_reg_rtx, offset)); } @@ -21623,40 +21619,39 @@ rs6000_emit_epilogue (int sibcall) && info->first_gp_reg_save != 32) { /* Determine whether we can address all of the registers that need - to be saved with an offset from the stack pointer that fits in - the small const field for SPE memory instructions. */ - int spe_regs_addressable_via_sp - = (SPE_CONST_OFFSET_OK(info->spe_gp_save_offset + sp_offset - + (32 - info->first_gp_reg_save - 1) * reg_size) + to be saved with an offset from frame_reg_rtx that fits in + the small const field for SPE memory instructions. */ + int spe_regs_addressable + = (SPE_CONST_OFFSET_OK (info->spe_gp_save_offset + sp_offset + + reg_size * (32 - info->first_gp_reg_save - 1)) && restoring_GPRs_inline); int spe_offset; + int ool_adjust = 0; - if (spe_regs_addressable_via_sp) + if (spe_regs_addressable) spe_offset = info->spe_gp_save_offset + sp_offset; else - { + { rtx old_frame_reg_rtx = frame_reg_rtx; - /* Make r11 point to the start of the SPE save area. We worried about - not clobbering it when we were saving registers in the prologue. - There's no need to worry here because the static chain is passed - anew to every function. */ - int ool_adjust = (restoring_GPRs_inline - ? 0 - : (info->first_gp_reg_save - - (FIRST_SAVRES_REGISTER+1))*8); - - if (frame_reg_rtx == sp_reg_rtx) - frame_reg_rtx = gen_rtx_REG (Pmode, 11); - emit_insn (gen_addsi3 (frame_reg_rtx, old_frame_reg_rtx, + /* Make r11 point to the start of the SPE save area. We worried about + not clobbering it when we were saving registers in the prologue. + There's no need to worry here because the static chain is passed + anew to every function. */ + + if (!restoring_GPRs_inline) + ool_adjust = 8 * (info->first_gp_reg_save + - (FIRST_SAVRES_REGISTER + 1)); + frame_reg_rtx = gen_rtx_REG (Pmode, 11); + emit_insn (gen_addsi3 (frame_reg_rtx, old_frame_reg_rtx, GEN_INT (info->spe_gp_save_offset + sp_offset - ool_adjust))); /* Keep the invariant that frame_reg_rtx + sp_offset points at the top of the stack frame. */ - sp_offset = -info->spe_gp_save_offset; + sp_offset = -info->spe_gp_save_offset + ool_adjust; - spe_offset = 0; - } + spe_offset = 0; + } if (restoring_GPRs_inline) { @@ -21696,8 +21691,8 @@ rs6000_emit_epilogue (int sibcall) { rtx par; - par = rs6000_make_savres_rtx (info, gen_rtx_REG (Pmode, 11), - 0, reg_mode, + par = rs6000_make_savres_rtx (info, frame_reg_rtx, + ool_adjust, reg_mode, /*savep=*/false, /*gpr=*/true, /*lr=*/true); emit_jump_insn (par); @@ -21718,12 +21713,12 @@ rs6000_emit_epilogue (int sibcall) sp_offset, can_use_exit); else { - emit_insn (gen_add3_insn (gen_rtx_REG (Pmode, DEFAULT_ABI == ABI_AIX - ? 12 : 11), - frame_reg_rtx, + rtx src_reg = gen_rtx_REG (Pmode, DEFAULT_ABI == ABI_AIX ? 12 : 11); + + emit_insn (gen_add3_insn (src_reg, frame_reg_rtx, GEN_INT (sp_offset - info->fp_size))); - if (REGNO (frame_reg_rtx) == 11) - sp_offset += info->fp_size; + if (REGNO (frame_reg_rtx) == REGNO (src_reg)) + sp_offset = info->fp_size; } par = rs6000_make_savres_rtx (info, frame_reg_rtx, -- cgit v1.2.3 From d52a2ee8ddb9e5ce514e961bce9d8d4f654a8bb6 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Tue, 6 Dec 2011 12:25:51 +0000 Subject: gcc: * config/rs6000/rs6000.c (darwin_rs6000_override_options): Initialize rs6000_current_abi. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182046 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/config/rs6000/rs6000.c | 1 + 2 files changed, 6 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index aa57048763a..b0871b93679 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-12-06 Iain Sandoe + + * config/rs6000/rs6000.c (darwin_rs6000_override_options): Initialize + rs6000_current_abi. + 2011-12-06 Alan Modra PR target/50906 diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 294f041d7e8..2bc90ca17a3 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -2612,6 +2612,7 @@ darwin_rs6000_override_options (void) off. */ rs6000_altivec_abi = 1; TARGET_ALTIVEC_VRSAVE = 1; + rs6000_current_abi = ABI_DARWIN; if (DEFAULT_ABI == ABI_DARWIN && TARGET_64BIT) -- cgit v1.2.3 From 59429ea16172742eed06b527ee74f533d6056da6 Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Tue, 6 Dec 2011 17:16:19 +0000 Subject: 2011-12-06 Martin Jambor PR tree-optimization/50622 * tree-sra.c (load_assign_lhs_subreplacements): Force gimple operand if both lacc and racc are grp_partial_lhs. * testsuite/g++.dg/tree-ssa/pr50622.C: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182057 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 10 ++++++++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/tree-ssa/pr50622.C | 30 ++++++++++++++++++++++++++++++ gcc/tree-sra.c | 4 ++++ 4 files changed, 49 insertions(+) create mode 100644 gcc/testsuite/g++.dg/tree-ssa/pr50622.C diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b0871b93679..050e3cdf61c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2011-12-06 Martin Jambor + + Backport from mainline: + + 2011-12-02 Martin Jambor + + PR tree-optimization/50622 + * tree-sra.c (load_assign_lhs_subreplacements): Force gimple operand + if both lacc and racc are grp_partial_lhs. + 2011-12-06 Iain Sandoe * config/rs6000/rs6000.c (darwin_rs6000_override_options): Initialize diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c06d1a90744..ca623c703d0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-12-06 Martin Jambor + + PR tree-optimization/50622 + * g++.dg/tree-ssa/pr50622.C: New test. + 2011-12-04 Uros Bizjak Jérémie Detrey diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr50622.C b/gcc/testsuite/g++.dg/tree-ssa/pr50622.C new file mode 100644 index 00000000000..d7f4fa74b95 --- /dev/null +++ b/gcc/testsuite/g++.dg/tree-ssa/pr50622.C @@ -0,0 +1,30 @@ +// { dg-do compile } +// { dg-options "-O2" } + +typedef __complex__ double Value; +struct LorentzVector +{ + LorentzVector & operator+=(const LorentzVector & a) { + theX += a.theX; + theY += a.theY; + theZ += a.theZ; + theT += a.theT; + return *this; + } + + Value theX; + Value theY; + Value theZ; + Value theT; +}; + +inline LorentzVector +operator+(LorentzVector a, const LorentzVector & b) { + return a += b; +} + +Value ex, et; +LorentzVector sum() { + LorentzVector v1; v1.theX =ex; v1.theY =ex+et; v1.theZ =ex-et; v1.theT =et; + return v1+v1; +} diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index 1195af90e81..fafe820cdb2 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -2594,6 +2594,10 @@ load_assign_lhs_subreplacements (struct access *lacc, struct access *top_racc, rhs = get_access_replacement (racc); if (!useless_type_conversion_p (lacc->type, racc->type)) rhs = fold_build1_loc (loc, VIEW_CONVERT_EXPR, lacc->type, rhs); + + if (racc->grp_partial_lhs && lacc->grp_partial_lhs) + rhs = force_gimple_operand_gsi (old_gsi, rhs, true, NULL_TREE, + true, GSI_SAME_STMT); } else { -- cgit v1.2.3 From 36c637d9a3cbb6b8f8fab224817c0f0c66425b99 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Tue, 6 Dec 2011 19:26:44 +0000 Subject: 2011-12-06 Tobias Burnus PR fortran/51435 * expr.c (gfc_has_default_initializer): Fix handling of DT with initialized pointer components. 2011-12-06 Tobias Burnus PR fortran/51435 * gfortran.dg/default_initialization_5.f90: New. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182062 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 6 ++ gcc/fortran/expr.c | 3 + gcc/testsuite/ChangeLog | 5 ++ .../gfortran.dg/default_initialization_5.f90 | 66 ++++++++++++++++++++++ 4 files changed, 80 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/default_initialization_5.f90 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index fe99b578a0d..0309cbc1202 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2011-12-06 Tobias Burnus + + PR fortran/51435 + * expr.c (gfc_has_default_initializer): Fix handling of + DT with initialized pointer components. + 2011-12-03 Tobias Burnus PR fortran/50684 diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index ed51ae5f393..96aea8d6b83 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -3679,6 +3679,8 @@ gfc_has_default_initializer (gfc_symbol *der) if (!c->attr.pointer && gfc_has_default_initializer (c->ts.u.derived)) return true; + if (c->attr.pointer && c->initializer) + return true; } else { @@ -3689,6 +3691,7 @@ gfc_has_default_initializer (gfc_symbol *der) return false; } + /* Get an expression for a default initializer. */ gfc_expr * diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ca623c703d0..6987613ed22 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-12-06 Tobias Burnus + + PR fortran/51435 + * gfortran.dg/default_initialization_5.f90: New. + 2011-12-06 Martin Jambor PR tree-optimization/50622 diff --git a/gcc/testsuite/gfortran.dg/default_initialization_5.f90 b/gcc/testsuite/gfortran.dg/default_initialization_5.f90 new file mode 100644 index 00000000000..11927619db4 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/default_initialization_5.f90 @@ -0,0 +1,66 @@ +! { dg-do run } +! { dg-options "-fdump-tree-original" } +! +! PR fortran/51435 +! +! Contributed by darmar.xxl@gmail.com +! +module arr_m + type arr_t + real(8), dimension(:), allocatable :: rsk + end type + type arr_t2 + integer :: a = 77 + end type +end module arr_m +!********************* +module list_m + use arr_m + implicit none + + type(arr_t2), target :: tgt + + type my_list + type(arr_t), pointer :: head => null() + end type my_list + type my_list2 + type(arr_t2), pointer :: head => tgt + end type my_list2 +end module list_m +!*********************** +module worker_mod + use list_m + implicit none + + type data_all_t + type(my_list) :: my_data + end type data_all_t + type data_all_t2 + type(my_list2) :: my_data + end type data_all_t2 +contains + subroutine do_job() + type(data_all_t) :: dum + type(data_all_t2) :: dum2 + + if (associated(dum%my_data%head)) then + call abort() + else + print *, 'OK: do_job my_data%head is NOT associated' + end if + + if (dum2%my_data%head%a /= 77) & + call abort() + end subroutine +end module +!*************** +program hello + use worker_mod + implicit none + call do_job() +end program + +! { dg-final { scan-tree-dump-times "my_data.head = 0B" 1 "original" } } +! { dg-final { scan-tree-dump-times "my_data.head = &tgt" 1 "original" } } +! { dg-final { cleanup-tree-dump "original" } } +! { dg-final { cleanup-modules "arr_m list_m worker_mod" } } -- cgit v1.2.3 From f7dc67369b746960424300c98bf086fdd288db00 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Wed, 7 Dec 2011 00:17:58 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182071 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 2f49ecc2bf7..7386653f34f 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111206 +20111207 -- cgit v1.2.3 From 64e3ae1fc8cc6878d19ed8999f25c8d2467a87c6 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 8 Dec 2011 00:18:31 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182095 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 7386653f34f..2aad9b1e849 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111207 +20111208 -- cgit v1.2.3 From 602985c4f11ebb530012037ca8405aadb0cee75f Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Thu, 8 Dec 2011 09:12:12 +0000 Subject: PR tree-optimization/51315 * tree-sra.c (tree_non_mode_aligned_mem_p): Rename to... (tree_non_aligned_mem_p): ...this. Add ALIGN parameter. Look into MEM_REFs and use get_object_or_type_alignment for them. (build_accesses_from_assign): Adjust for above change. (access_precludes_ipa_sra_p): Likewise. ada/ Backport from mainline 2011-09-25 Eric Botcazou * gcc-interface/decl.c (gnat_to_gnu_entity) : Do not promote the alignment if this doesn't prevent BLKmode access to the object. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182103 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 9 +++ gcc/ada/ChangeLog | 9 +++ gcc/ada/gcc-interface/decl.c | 24 ++++-- gcc/testsuite/ChangeLog | 11 +++ gcc/testsuite/gcc.c-torture/execute/20111208-1.c | 94 ++++++++++++++++++++++++ gcc/testsuite/gnat.dg/frame_overflow.adb | 25 ++----- gcc/testsuite/gnat.dg/frame_overflow.ads | 17 +++++ gcc/testsuite/gnat.dg/specs/addr1.ads | 2 +- gcc/tree-sra.c | 39 ++++++---- 9 files changed, 193 insertions(+), 37 deletions(-) create mode 100644 gcc/testsuite/gcc.c-torture/execute/20111208-1.c create mode 100644 gcc/testsuite/gnat.dg/frame_overflow.ads diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 050e3cdf61c..afb12fdf5b9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2011-12-08 Eric Botcazou + + PR tree-optimization/51315 + * tree-sra.c (tree_non_mode_aligned_mem_p): Rename to... + (tree_non_aligned_mem_p): ...this. Add ALIGN parameter. Look into + MEM_REFs and use get_object_or_type_alignment for them. + (build_accesses_from_assign): Adjust for above change. + (access_precludes_ipa_sra_p): Likewise. + 2011-12-06 Martin Jambor Backport from mainline: diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index ef96695b7c8..b2c355d81fb 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,12 @@ +2011-12-07 Eric Botcazou + + PR tree-optimization/51315 + Backport from mainline + 2011-09-25 Eric Botcazou + + * gcc-interface/decl.c (gnat_to_gnu_entity) : Do not promote + the alignment if this doesn't prevent BLKmode access to the object. + 2011-11-13 Iain Sandoe Backport from mainline r181474 diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index 848dbf61115..58459d4ab42 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -808,16 +808,30 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) && No (Address_Clause (gnat_entity)))) && TREE_CODE (TYPE_SIZE (gnu_type)) == INTEGER_CST) { - /* No point in jumping through all the hoops needed in order + unsigned int size_cap, align_cap; + + /* No point in promoting the alignment if this doesn't prevent + BLKmode access to the object, in particular block copy, as + this will for example disable the NRV optimization for it. + No point in jumping through all the hoops needed in order to support BIGGEST_ALIGNMENT if we don't really have to. So we cap to the smallest alignment that corresponds to a known efficient memory access pattern of the target. */ - unsigned int align_cap = Is_Atomic (gnat_entity) - ? BIGGEST_ALIGNMENT - : get_mode_alignment (ptr_mode); + if (Is_Atomic (gnat_entity)) + { + size_cap = UINT_MAX; + align_cap = BIGGEST_ALIGNMENT; + } + else + { + size_cap = MAX_FIXED_MODE_SIZE; + align_cap = get_mode_alignment (ptr_mode); + } if (!host_integerp (TYPE_SIZE (gnu_type), 1) - || compare_tree_int (TYPE_SIZE (gnu_type), align_cap) >= 0) + || compare_tree_int (TYPE_SIZE (gnu_type), size_cap) > 0) + align = 0; + else if (compare_tree_int (TYPE_SIZE (gnu_type), align_cap) > 0) align = align_cap; else align = ceil_alignment (tree_low_cst (TYPE_SIZE (gnu_type), 1)); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6987613ed22..1e536692bd9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2011-12-08 Eric Botcazou + + * gcc.c-torture/execute/20111208-1.c: New test. + + Backport from mainline + 2011-09-25 Eric Botcazou + + * gnat.dg/frame_overflow.ads: New. + * gnat.dg/frame_overflow.adb: Adjust. + * gnat.dg/specs/addr1.ads: Likewise. + 2011-12-06 Tobias Burnus PR fortran/51435 diff --git a/gcc/testsuite/gcc.c-torture/execute/20111208-1.c b/gcc/testsuite/gcc.c-torture/execute/20111208-1.c new file mode 100644 index 00000000000..8bcb10accb5 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20111208-1.c @@ -0,0 +1,94 @@ +/* PR tree-optimization/51315 */ +/* Reported by Jurij Smakov */ + +typedef unsigned int size_t; + +extern void *memcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + +extern size_t strlen (__const char *__s) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + +typedef short int int16_t; +typedef int int32_t; + +extern void abort (void); + +int a; + +static void __attribute__ ((noinline,noclone)) +do_something (int item) +{ + a = item; +} + +int +pack_unpack (char *s, char *p) +{ + char *send, *pend; + char type; + int integer_size; + + send = s + strlen (s); + pend = p + strlen (p); + + while (p < pend) + { + type = *p++; + + switch (type) + { + case 's': + integer_size = 2; + goto unpack_integer; + + case 'l': + integer_size = 4; + goto unpack_integer; + + unpack_integer: + switch (integer_size) + { + case 2: + { + union + { + int16_t i; + char a[sizeof (int16_t)]; + } + v; + memcpy (v.a, s, sizeof (int16_t)); + s += sizeof (int16_t); + do_something (v.i); + } + break; + + case 4: + { + union + { + int32_t i; + char a[sizeof (int32_t)]; + } + v; + memcpy (v.a, s, sizeof (int32_t)); + s += sizeof (int32_t); + do_something (v.i); + } + break; + } + break; + } + } + return (int) *s; +} + +int +main (void) +{ + int n = pack_unpack ("\200\001\377\376\035\300", "sl"); + if (n != 0) + abort (); + return 0; +} diff --git a/gcc/testsuite/gnat.dg/frame_overflow.adb b/gcc/testsuite/gnat.dg/frame_overflow.adb index e1ff4d36533..1e7405fa525 100644 --- a/gcc/testsuite/gnat.dg/frame_overflow.adb +++ b/gcc/testsuite/gnat.dg/frame_overflow.adb @@ -1,27 +1,20 @@ -- { dg-do compile } -with System; +package body Frame_Overflow is -procedure frame_overflow is - - type Bitpos_Range_T is range 1..2**(System.Word_Size-1)-1; - type Bitmap_Array_T is array (Bitpos_Range_T) of Boolean; - - type Bitmap_T is record - Bits : Bitmap_Array_T := (others => False); - end record; - - function + function -- { dg-error "too large" } Set_In (Bitmap : Bitmap_T; Bitpos : Bitpos_Range_T) return Bitmap_T is - Result: Bitmap_T := Bitmap; -- { dg-error "Storage_Error" } + Result: Bitmap_T := Bitmap; begin Result.Bits (Bitpos) := True; return Result; end; - function Negate (Bitmap : Bitmap_T) return Bitmap_T is - Result: Bitmap_T; -- { dg-error "Storage_Error" } + function -- { dg-error "too large" } + Negate (Bitmap : Bitmap_T) return Bitmap_T + is + Result: Bitmap_T; begin for E in Bitpos_Range_T loop Result.Bits (E) := not Bitmap.Bits (E); @@ -29,6 +22,4 @@ procedure frame_overflow is return Result; end; -begin - null; -end; +end Frame_Overflow; diff --git a/gcc/testsuite/gnat.dg/frame_overflow.ads b/gcc/testsuite/gnat.dg/frame_overflow.ads new file mode 100644 index 00000000000..898e37a67d1 --- /dev/null +++ b/gcc/testsuite/gnat.dg/frame_overflow.ads @@ -0,0 +1,17 @@ +with System; + +package Frame_Overflow is + + type Bitpos_Range_T is range 1..2**(System.Word_Size-1)-1; + type Bitmap_Array_T is array (Bitpos_Range_T) of Boolean; + + type Bitmap_T is record + Bits : Bitmap_Array_T := (others => False); + end record; + + function + Set_In (Bitmap : Bitmap_T; Bitpos : Bitpos_Range_T) return Bitmap_T; + + function Negate (Bitmap : Bitmap_T) return Bitmap_T; + +end Frame_Overflow; diff --git a/gcc/testsuite/gnat.dg/specs/addr1.ads b/gcc/testsuite/gnat.dg/specs/addr1.ads index 83d432cff58..ed048f68ef3 100644 --- a/gcc/testsuite/gnat.dg/specs/addr1.ads +++ b/gcc/testsuite/gnat.dg/specs/addr1.ads @@ -15,7 +15,7 @@ package Addr1 is end record; for Rec2'Size use 64; - A: Arr (1 .. 12); + A: Arr (1 .. 4); Obj1: Rec1; for Obj1'Address use A'Address; -- { dg-bogus "alignment" } diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index fafe820cdb2..c5e990e15da 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -1020,26 +1020,28 @@ disqualify_ops_if_throwing_stmt (gimple stmt, tree lhs, tree rhs) return false; } -/* Return true iff type of EXP is not sufficiently aligned. */ +/* Return true if EXP is a memory reference less aligned than ALIGN. This is + invoked only on strict-alignment targets. */ static bool -tree_non_mode_aligned_mem_p (tree exp) +tree_non_aligned_mem_p (tree exp, unsigned int align) { - enum machine_mode mode = TYPE_MODE (TREE_TYPE (exp)); - unsigned int align; + unsigned int exp_align; if (TREE_CODE (exp) == VIEW_CONVERT_EXPR) exp = TREE_OPERAND (exp, 0); - if (TREE_CODE (exp) == SSA_NAME - || TREE_CODE (exp) == MEM_REF - || mode == BLKmode - || is_gimple_min_invariant (exp) - || !STRICT_ALIGNMENT) + if (TREE_CODE (exp) == SSA_NAME || is_gimple_min_invariant (exp)) return false; - align = get_object_alignment (exp, BIGGEST_ALIGNMENT); - if (GET_MODE_ALIGNMENT (mode) > align) + /* get_object_alignment will fall back to BITS_PER_UNIT if it cannot + compute an explicit alignment. Pretend that dereferenced pointers + are always aligned on strict-alignment targets. */ + exp_align = get_object_alignment (exp, BIGGEST_ALIGNMENT); + if (TREE_CODE (exp) == MEM_REF || TREE_CODE (exp) == TARGET_MEM_REF) + exp_align = MAX (TYPE_ALIGN (TREE_TYPE (exp)), exp_align); + + if (exp_align < align) return true; return false; @@ -1071,7 +1073,11 @@ build_accesses_from_assign (gimple stmt) if (lacc) { lacc->grp_assignment_write = 1; - lacc->grp_unscalarizable_region |= tree_non_mode_aligned_mem_p (rhs); + if (STRICT_ALIGNMENT + && tree_non_aligned_mem_p (rhs, + get_object_alignment (lhs, + BIGGEST_ALIGNMENT))) + lacc->grp_unscalarizable_region = 1; } if (racc) @@ -1080,7 +1086,11 @@ build_accesses_from_assign (gimple stmt) if (should_scalarize_away_bitmap && !gimple_has_volatile_ops (stmt) && !is_gimple_reg_type (racc->type)) bitmap_set_bit (should_scalarize_away_bitmap, DECL_UID (racc->base)); - racc->grp_unscalarizable_region |= tree_non_mode_aligned_mem_p (lhs); + if (STRICT_ALIGNMENT + && tree_non_aligned_mem_p (lhs, + get_object_alignment (rhs, + BIGGEST_ALIGNMENT))) + racc->grp_unscalarizable_region = 1; } if (lacc && racc @@ -3608,7 +3618,8 @@ access_precludes_ipa_sra_p (struct access *access) || gimple_code (access->stmt) == GIMPLE_ASM)) return true; - if (tree_non_mode_aligned_mem_p (access->expr)) + if (STRICT_ALIGNMENT + && tree_non_aligned_mem_p (access->expr, TYPE_ALIGN (access->type))) return true; return false; -- cgit v1.2.3 From 813ef5d94677e03b9b429b0006d96c9f373931da Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Thu, 8 Dec 2011 09:13:04 +0000 Subject: Fix date git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182104 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index b2c355d81fb..3ac1620d637 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,4 +1,4 @@ -2011-12-07 Eric Botcazou +2011-12-08 Eric Botcazou PR tree-optimization/51315 Backport from mainline -- cgit v1.2.3 From 01afe8412665798ca697d977755082555c7fbb9e Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 8 Dec 2011 13:33:58 +0000 Subject: Backport from mainline 2011-11-30 Jakub Jelinek PR rtl-optimization/48721 * sched-deps.c (sched_analyze_insn): For SIBLING_CALL_P set reg_pending_barrier to TRUE_BARRIER. * gcc.target/i386/pr48721.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182111 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 9 ++++++ gcc/sched-deps.c | 6 +++- gcc/testsuite/ChangeLog | 8 ++++++ gcc/testsuite/gcc.target/i386/pr48721.c | 51 +++++++++++++++++++++++++++++++++ 4 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr48721.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index afb12fdf5b9..8b4ef2f4d8e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2011-12-08 Jakub Jelinek + + Backport from mainline + 2011-11-30 Jakub Jelinek + + PR rtl-optimization/48721 + * sched-deps.c (sched_analyze_insn): For SIBLING_CALL_P set + reg_pending_barrier to TRUE_BARRIER. + 2011-12-08 Eric Botcazou PR tree-optimization/51315 diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c index 7293fc3c972..50494cfc23f 100644 --- a/gcc/sched-deps.c +++ b/gcc/sched-deps.c @@ -2687,7 +2687,11 @@ sched_analyze_insn (struct deps_desc *deps, rtx x, rtx insn) else sched_analyze_2 (deps, XEXP (link, 0), insn); } - if (find_reg_note (insn, REG_SETJMP, NULL)) + /* Don't schedule anything after a tail call, tail call needs + to use at least all call-saved registers. */ + if (SIBLING_CALL_P (insn)) + reg_pending_barrier = TRUE_BARRIER; + else if (find_reg_note (insn, REG_SETJMP, NULL)) reg_pending_barrier = MOVE_BARRIER; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1e536692bd9..99fd99921f4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2011-12-08 Jakub Jelinek + + Backport from mainline + 2011-11-30 Jakub Jelinek + + PR rtl-optimization/48721 + * gcc.target/i386/pr48721.c: New test. + 2011-12-08 Eric Botcazou * gcc.c-torture/execute/20111208-1.c: New test. diff --git a/gcc/testsuite/gcc.target/i386/pr48721.c b/gcc/testsuite/gcc.target/i386/pr48721.c new file mode 100644 index 00000000000..f37a16949ae --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr48721.c @@ -0,0 +1,51 @@ +/* PR rtl-optimization/48721 */ +/* { dg-do compile } */ +/* { dg-options "-O -foptimize-sibling-calls -fsched2-use-superblocks -fschedule-insns2 -mtune=core2" } */ + +extern unsigned char a[]; +extern int b[], d[], e[], f[], g[], *h[], m[], *n[], o[]; +extern char c[]; + +struct S +{ + unsigned char s1; + int s2, s3, s4, s5, s6, s7, s8; +}; + +__attribute__((noinline, noclone)) int +foo (int x) +{ + return 0; +} + +int +bar (int x, struct S *y) +{ + int z; + switch (x) + { + case 1: + case 2: + { + int t2, t4, t5, t6, t7, t8; + z = o[y->s8 * 6]; + t8 = *n[m[x] * 5]; + t4 = *h[y->s7]; + t7 = z; + z = g[f[x] + y->s6]; + t6 = e[y->s5]; + t5 = d[c[x] + y->s3 * 17]; + if (z) + t2 = b[z]; + if (a[z] != y->s1) + return foo (x); + y->s8 = t8; + y->s4 = t4; + y->s7 = t7; + y->s6 = t6; + y->s5 = t5; + y->s2 = t2; + } + } + return 0; +} -- cgit v1.2.3 From 0b06c1018d94cd671ada003abe0e08440c077060 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 8 Dec 2011 13:36:40 +0000 Subject: Backport from mainline 2011-12-05 Jakub Jelinek Eric Botcazou PR middle-end/51323 PR middle-end/50074 * calls.c (internal_arg_pointer_exp_state): New variable. (internal_arg_pointer_based_exp_1, internal_arg_pointer_exp_scan): New functions. (internal_arg_pointer_based_exp): New function. (mem_overlaps_already_clobbered_arg_p): Use it. (expand_call): Free internal_arg_pointer_exp_state.cache vector and clear internal_arg_pointer_exp_state.scan_start. 2011-11-26 Joern Rennecke PR middle-end/50074 * calls.c (mem_overlaps_already_clobbered_arg_p): Return false if no outgoing arguments have been stored so far. 2011-12-05 Jakub Jelinek Eric Botcazou PR middle-end/51323 PR middle-end/50074 * gcc.c-torture/execute/pr51323.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182112 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 19 ++++ gcc/calls.c | 144 ++++++++++++++++++++++++-- gcc/testsuite/ChangeLog | 7 ++ gcc/testsuite/gcc.c-torture/execute/pr51323.c | 35 +++++++ 4 files changed, 194 insertions(+), 11 deletions(-) create mode 100644 gcc/testsuite/gcc.c-torture/execute/pr51323.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8b4ef2f4d8e..daa090218f0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,12 +1,31 @@ 2011-12-08 Jakub Jelinek Backport from mainline + 2011-12-05 Jakub Jelinek + Eric Botcazou + + PR middle-end/51323 + PR middle-end/50074 + * calls.c (internal_arg_pointer_exp_state): New variable. + (internal_arg_pointer_based_exp_1, + internal_arg_pointer_exp_scan): New functions. + (internal_arg_pointer_based_exp): New function. + (mem_overlaps_already_clobbered_arg_p): Use it. + (expand_call): Free internal_arg_pointer_exp_state.cache vector + and clear internal_arg_pointer_exp_state.scan_start. + 2011-11-30 Jakub Jelinek PR rtl-optimization/48721 * sched-deps.c (sched_analyze_insn): For SIBLING_CALL_P set reg_pending_barrier to TRUE_BARRIER. + 2011-11-26 Joern Rennecke + + PR middle-end/50074 + * calls.c (mem_overlaps_already_clobbered_arg_p): + Return false if no outgoing arguments have been stored so far. + 2011-12-08 Eric Botcazou PR tree-optimization/51315 diff --git a/gcc/calls.c b/gcc/calls.c index 1c161bf3330..d5779f38d4c 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -1548,6 +1548,129 @@ rtx_for_function_call (tree fndecl, tree addr) return funexp; } +/* Internal state for internal_arg_pointer_based_exp and its helpers. */ +static struct +{ + /* Last insn that has been scanned by internal_arg_pointer_based_exp_scan, + or NULL_RTX if none has been scanned yet. */ + rtx scan_start; + /* Vector indexed by REGNO - FIRST_PSEUDO_REGISTER, recording if a pseudo is + based on crtl->args.internal_arg_pointer. The element is NULL_RTX if the + pseudo isn't based on it, a CONST_INT offset if the pseudo is based on it + with fixed offset, or PC if this is with variable or unknown offset. */ + VEC(rtx, heap) *cache; +} internal_arg_pointer_exp_state; + +static rtx internal_arg_pointer_based_exp (rtx, bool); + +/* Helper function for internal_arg_pointer_based_exp. Scan insns in + the tail call sequence, starting with first insn that hasn't been + scanned yet, and note for each pseudo on the LHS whether it is based + on crtl->args.internal_arg_pointer or not, and what offset from that + that pointer it has. */ + +static void +internal_arg_pointer_based_exp_scan (void) +{ + rtx insn, scan_start = internal_arg_pointer_exp_state.scan_start; + + if (scan_start == NULL_RTX) + insn = get_insns (); + else + insn = NEXT_INSN (scan_start); + + while (insn) + { + rtx set = single_set (insn); + if (set && REG_P (SET_DEST (set)) && !HARD_REGISTER_P (SET_DEST (set))) + { + rtx val = NULL_RTX; + unsigned int idx = REGNO (SET_DEST (set)) - FIRST_PSEUDO_REGISTER; + /* Punt on pseudos set multiple times. */ + if (idx < VEC_length (rtx, internal_arg_pointer_exp_state.cache) + && (VEC_index (rtx, internal_arg_pointer_exp_state.cache, idx) + != NULL_RTX)) + val = pc_rtx; + else + val = internal_arg_pointer_based_exp (SET_SRC (set), false); + if (val != NULL_RTX) + { + VEC_safe_grow_cleared (rtx, heap, + internal_arg_pointer_exp_state.cache, + idx + 1); + VEC_replace (rtx, internal_arg_pointer_exp_state.cache, + idx, val); + } + } + if (NEXT_INSN (insn) == NULL_RTX) + scan_start = insn; + insn = NEXT_INSN (insn); + } + + internal_arg_pointer_exp_state.scan_start = scan_start; +} + +/* Helper function for internal_arg_pointer_based_exp, called through + for_each_rtx. Return 1 if *LOC is a register based on + crtl->args.internal_arg_pointer. Return -1 if *LOC is not based on it + and the subexpressions need not be examined. Otherwise return 0. */ + +static int +internal_arg_pointer_based_exp_1 (rtx *loc, void *data ATTRIBUTE_UNUSED) +{ + if (REG_P (*loc) && internal_arg_pointer_based_exp (*loc, false) != NULL_RTX) + return 1; + if (MEM_P (*loc)) + return -1; + return 0; +} + +/* Compute whether RTL is based on crtl->args.internal_arg_pointer. Return + NULL_RTX if RTL isn't based on it, a CONST_INT offset if RTL is based on + it with fixed offset, or PC if this is with variable or unknown offset. + TOPLEVEL is true if the function is invoked at the topmost level. */ + +static rtx +internal_arg_pointer_based_exp (rtx rtl, bool toplevel) +{ + if (CONSTANT_P (rtl)) + return NULL_RTX; + + if (rtl == crtl->args.internal_arg_pointer) + return const0_rtx; + + if (REG_P (rtl) && HARD_REGISTER_P (rtl)) + return NULL_RTX; + + if (GET_CODE (rtl) == PLUS && CONST_INT_P (XEXP (rtl, 1))) + { + rtx val = internal_arg_pointer_based_exp (XEXP (rtl, 0), toplevel); + if (val == NULL_RTX || val == pc_rtx) + return val; + return plus_constant (val, INTVAL (XEXP (rtl, 1))); + } + + /* When called at the topmost level, scan pseudo assignments in between the + last scanned instruction in the tail call sequence and the latest insn + in that sequence. */ + if (toplevel) + internal_arg_pointer_based_exp_scan (); + + if (REG_P (rtl)) + { + unsigned int idx = REGNO (rtl) - FIRST_PSEUDO_REGISTER; + if (idx < VEC_length (rtx, internal_arg_pointer_exp_state.cache)) + return VEC_index (rtx, internal_arg_pointer_exp_state.cache, idx); + + return NULL_RTX; + } + + if (for_each_rtx (&rtl, internal_arg_pointer_based_exp_1, NULL)) + return pc_rtx; + + return NULL_RTX; +} + /* Return true if and only if SIZE storage units (usually bytes) starting from address ADDR overlap with already clobbered argument area. This function is used to determine if we should give up a @@ -1557,20 +1680,17 @@ static bool mem_overlaps_already_clobbered_arg_p (rtx addr, unsigned HOST_WIDE_INT size) { HOST_WIDE_INT i; + rtx val; - if (addr == crtl->args.internal_arg_pointer) - i = 0; - else if (GET_CODE (addr) == PLUS - && XEXP (addr, 0) == crtl->args.internal_arg_pointer - && CONST_INT_P (XEXP (addr, 1))) - i = INTVAL (XEXP (addr, 1)); - /* Return true for arg pointer based indexed addressing. */ - else if (GET_CODE (addr) == PLUS - && (XEXP (addr, 0) == crtl->args.internal_arg_pointer - || XEXP (addr, 1) == crtl->args.internal_arg_pointer)) + if (sbitmap_empty_p (stored_args_map)) + return false; + val = internal_arg_pointer_based_exp (addr, true); + if (val == NULL_RTX) + return false; + else if (val == pc_rtx) return true; else - return false; + i = INTVAL (val); #ifdef ARGS_GROW_DOWNWARD i = -i - size; @@ -3175,6 +3295,8 @@ expand_call (tree exp, rtx target, int ignore) } sbitmap_free (stored_args_map); + internal_arg_pointer_exp_state.scan_start = NULL_RTX; + VEC_free (rtx, heap, internal_arg_pointer_exp_state.cache); } else { diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 99fd99921f4..c19a761e2e1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,6 +1,13 @@ 2011-12-08 Jakub Jelinek Backport from mainline + 2011-12-05 Jakub Jelinek + Eric Botcazou + + PR middle-end/51323 + PR middle-end/50074 + * gcc.c-torture/execute/pr51323.c: New test. + 2011-11-30 Jakub Jelinek PR rtl-optimization/48721 diff --git a/gcc/testsuite/gcc.c-torture/execute/pr51323.c b/gcc/testsuite/gcc.c-torture/execute/pr51323.c new file mode 100644 index 00000000000..92957998326 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr51323.c @@ -0,0 +1,35 @@ +/* PR middle-end/51323 */ + +extern void abort (void); +struct S { int a, b, c; }; +int v; + +__attribute__((noinline, noclone)) void +foo (int x, int y, int z) +{ + if (x != v || y != 0 || z != 9) + abort (); +} + +static inline int +baz (const struct S *p) +{ + return p->b; +} + +__attribute__((noinline, noclone)) void +bar (int x, struct S y) +{ + foo (baz (&y), 0, x); +} + +int +main () +{ + struct S s; + v = 3; s.a = v - 1; s.b = v; s.c = v + 1; + bar (9, s); + v = 17; s.a = v - 1; s.b = v; s.c = v + 1; + bar (9, s); + return 0; +} -- cgit v1.2.3 From 0a6d3e3c362b90d07d9f2b6604a6f02869efef67 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 8 Dec 2011 13:37:44 +0000 Subject: Backport from mainline 2011-12-05 Jakub Jelinek PR c/51339 * c-decl.c (c_finish_incomplete_decl, finish_decl): Call relayout_decl instead of layout_decl. * gcc.dg/gomp/pr51339.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182113 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/c-decl.c | 4 ++-- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/gomp/pr51339.c | 15 +++++++++++++++ 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/gomp/pr51339.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index daa090218f0..898e61f1a0e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,12 @@ 2011-12-08 Jakub Jelinek Backport from mainline + 2011-12-05 Jakub Jelinek + + PR c/51339 + * c-decl.c (c_finish_incomplete_decl, finish_decl): Call + relayout_decl instead of layout_decl. + 2011-12-05 Jakub Jelinek Eric Botcazou diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 001330cda63..f0becb9889c 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -721,7 +721,7 @@ c_finish_incomplete_decl (tree decl) complete_array_type (&TREE_TYPE (decl), NULL_TREE, true); - layout_decl (decl, 0); + relayout_decl (decl); } } } @@ -4261,7 +4261,7 @@ finish_decl (tree decl, location_t init_loc, tree init, if (DECL_INITIAL (decl)) TREE_TYPE (DECL_INITIAL (decl)) = type; - layout_decl (decl, 0); + relayout_decl (decl); } if (TREE_CODE (decl) == VAR_DECL) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c19a761e2e1..81c29861e48 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,6 +1,11 @@ 2011-12-08 Jakub Jelinek Backport from mainline + 2011-12-05 Jakub Jelinek + + PR c/51339 + * gcc.dg/gomp/pr51339.c: New test. + 2011-12-05 Jakub Jelinek Eric Botcazou diff --git a/gcc/testsuite/gcc.dg/gomp/pr51339.c b/gcc/testsuite/gcc.dg/gomp/pr51339.c new file mode 100644 index 00000000000..198e4c13e03 --- /dev/null +++ b/gcc/testsuite/gcc.dg/gomp/pr51339.c @@ -0,0 +1,15 @@ +/* PR c/51339 */ +/* { dg-do compile } */ +/* { dg-options "-fopenmp" } */ + +char g[] = "g"; + +void +foo (void) +{ +#pragma omp parallel sections firstprivate (g) lastprivate (g) + { + #pragma omp section + g[0] = 'h'; + } +} -- cgit v1.2.3 From f4080187fa9c327b17ad6408ed7dd295817ce66b Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 8 Dec 2011 13:39:34 +0000 Subject: Backport from mainline 2011-12-05 Jakub Jelinek PR debug/51410 * c-decl.c (pop_scope): Don't add DECL_EXTERNAL decls for debug info if scope is file_scope. * gcc.dg/debug/dwarf2/pr51410.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182114 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 4 ++++ gcc/c-decl.c | 2 +- gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/gcc.dg/debug/dwarf2/pr51410.c | 13 +++++++++++++ 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.dg/debug/dwarf2/pr51410.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 898e61f1a0e..fdb878f9c5f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -3,6 +3,10 @@ Backport from mainline 2011-12-05 Jakub Jelinek + PR debug/51410 + * c-decl.c (pop_scope): Don't add DECL_EXTERNAL decls + for debug info if scope is file_scope. + PR c/51339 * c-decl.c (c_finish_incomplete_decl, finish_decl): Call relayout_decl instead of layout_decl. diff --git a/gcc/c-decl.c b/gcc/c-decl.c index f0becb9889c..0335cda5598 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -1200,7 +1200,7 @@ pop_scope (void) DECL_CHAIN (p) = BLOCK_VARS (block); BLOCK_VARS (block) = p; } - else if (VAR_OR_FUNCTION_DECL_P (p)) + else if (VAR_OR_FUNCTION_DECL_P (p) && scope != file_scope) { /* For block local externs add a special DECL_EXTERNAL decl for debug info generation. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 81c29861e48..6d21fb1c4f9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -3,6 +3,9 @@ Backport from mainline 2011-12-05 Jakub Jelinek + PR debug/51410 + * gcc.dg/debug/dwarf2/pr51410.c: New test. + PR c/51339 * gcc.dg/gomp/pr51339.c: New test. diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr51410.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr51410.c new file mode 100644 index 00000000000..957c152b4a0 --- /dev/null +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr51410.c @@ -0,0 +1,13 @@ +/* PR debug/51410 */ +/* { dg-do compile } */ +/* { dg-options "-O0 -gdwarf-2 -dA -fno-merge-debug-strings" } */ + +int x; + +int +foo (void) +{ + return x; +} + +/* { dg-final { scan-assembler-times "\\(DIE\[^\\r\\n\]*DW_TAG_variable\\)" 1 } } */ -- cgit v1.2.3 From 052eec1f720d16189077e36a98611ebfbd5190fa Mon Sep 17 00:00:00 2001 From: Teresa Johnson Date: Thu, 8 Dec 2011 15:44:14 +0000 Subject: Backport from mainline: 2011-08-05 Uros Bizjak * config/i386/i386.md (*movdi_internal_rex64): Use "!o" constraint instead of "!m" for operand 0, alternative 4. (*movdf_internal_rex64): Ditto for operand 0, alernative 6. * gcc.target/i386/movdi-rex64.c: New. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182120 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 10 ++++++++++ gcc/config/i386/i386.md | 4 ++-- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.target/i386/movdi-rex64.c | 12 ++++++++++++ 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.target/i386/movdi-rex64.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fdb878f9c5f..f5ebe75f1b4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2011-12-08 Teresa Johnson + + Backport from mainline: + + 2011-08-05 Uros Bizjak + + * config/i386/i386.md (*movdi_internal_rex64): Use "!o" constraint + instead of "!m" for operand 0, alternative 4. + (*movdf_internal_rex64): Ditto for operand 0, alernative 6. + 2011-12-08 Jakub Jelinek Backport from mainline diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index f25a97b3ff8..b1d7e5eba43 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -1960,7 +1960,7 @@ (define_insn "*movdi_internal_rex64" [(set (match_operand:DI 0 "nonimmediate_operand" - "=r,r ,r,m ,!m,*y,*y,?r ,m ,?*Ym,?*y,*x,*x,?r ,m,?*Yi,*x,?*x,?*Ym") + "=r,r ,r,m ,!o,*y,*y,?r ,m ,?*Ym,?*y,*x,*x,?r ,m,?*Yi,*x,?*x,?*Ym") (match_operand:DI 1 "general_operand" "Z ,rem,i,re,n ,C ,*y,*Ym,*y,r ,m ,C ,*x,*Yi,*x,r ,m ,*Ym,*x"))] "TARGET_64BIT && !(MEM_P (operands[0]) && MEM_P (operands[1]))" @@ -2905,7 +2905,7 @@ (define_insn "*movdf_internal_rex64" [(set (match_operand:DF 0 "nonimmediate_operand" - "=f,m,f,r ,m,!r,!m,Y2*x,Y2*x,Y2*x,m ,Yi,r ") + "=f,m,f,r ,m,!r,!o,Y2*x,Y2*x,Y2*x,m ,Yi,r ") (match_operand:DF 1 "general_operand" "fm,f,G,rm,r,F ,F ,C ,Y2*x,m ,Y2*x,r ,Yi"))] "TARGET_64BIT && !(MEM_P (operands[0]) && MEM_P (operands[1])) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6d21fb1c4f9..9f4e1250f2d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2011-12-08 Teresa Johnson + + * gcc.target/i386/movdi-rex64.c: New. + 2011-12-08 Jakub Jelinek Backport from mainline diff --git a/gcc/testsuite/gcc.target/i386/movdi-rex64.c b/gcc/testsuite/gcc.target/i386/movdi-rex64.c new file mode 100644 index 00000000000..36208ff6139 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/movdi-rex64.c @@ -0,0 +1,12 @@ +/* { dg-do compile { target *-*-linux* } } */ +/* { dg-options "-fPIE -Wwrite-strings" } */ + +char *strcpy (char *dest, const char *src); + +static __thread char buffer[25]; +const char * error_message (void) +{ +oops: + strcpy (buffer, "Unknown code "); + return 0; +} -- cgit v1.2.3 From 48d7de96fd265970d178e9e45b74ec07ab038c92 Mon Sep 17 00:00:00 2001 From: Teresa Johnson Date: Thu, 8 Dec 2011 16:45:58 +0000 Subject: * gcc.target/i386/movdi-rex64.c: Remove unnecessary -Wwrite-strings option. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182122 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/i386/movdi-rex64.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9f4e1250f2d..ce0e4b1a5db 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-12-08 Teresa Johnson + + * gcc.target/i386/movdi-rex64.c: Remove unnecessary + -Wwrite-strings option. + 2011-12-08 Teresa Johnson * gcc.target/i386/movdi-rex64.c: New. diff --git a/gcc/testsuite/gcc.target/i386/movdi-rex64.c b/gcc/testsuite/gcc.target/i386/movdi-rex64.c index 36208ff6139..4bea6f5f74c 100644 --- a/gcc/testsuite/gcc.target/i386/movdi-rex64.c +++ b/gcc/testsuite/gcc.target/i386/movdi-rex64.c @@ -1,5 +1,5 @@ /* { dg-do compile { target *-*-linux* } } */ -/* { dg-options "-fPIE -Wwrite-strings" } */ +/* { dg-options "-fPIE" } */ char *strcpy (char *dest, const char *src); -- cgit v1.2.3 From fdf3f51a0490b2584eb3fa5aec0a843f3221a35c Mon Sep 17 00:00:00 2001 From: Teresa Johnson Date: Thu, 8 Dec 2011 17:01:49 +0000 Subject: * gcc.target/i386/movdi-rex64.c: Remove unnecessary unused label. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182124 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/i386/movdi-rex64.c | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ce0e4b1a5db..d389970df6c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-12-08 Teresa Johnson + + * gcc.target/i386/movdi-rex64.c: Remove unnecessary + unused label. + 2011-12-08 Teresa Johnson * gcc.target/i386/movdi-rex64.c: Remove unnecessary diff --git a/gcc/testsuite/gcc.target/i386/movdi-rex64.c b/gcc/testsuite/gcc.target/i386/movdi-rex64.c index 4bea6f5f74c..c9102028af6 100644 --- a/gcc/testsuite/gcc.target/i386/movdi-rex64.c +++ b/gcc/testsuite/gcc.target/i386/movdi-rex64.c @@ -6,7 +6,6 @@ char *strcpy (char *dest, const char *src); static __thread char buffer[25]; const char * error_message (void) { -oops: strcpy (buffer, "Unknown code "); return 0; } -- cgit v1.2.3 From c0164316d0e2f60555232c2ac9d926b9e6e6a052 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Thu, 8 Dec 2011 20:54:57 +0000 Subject: 2011-12-08 Tobias Burnus PR fortran/51448 * fortran/trans-array.c (get_std_lbound): Fix handling of conversion functions. 2011-12-08 Tobias Burnus PR fortran/51448 * gfortran.dg/realloc_on_assign_8.f90: New. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182137 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/trans-array.c | 20 ++++++++++---------- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/realloc_on_assign_8.f90 | 17 +++++++++++++++++ 4 files changed, 38 insertions(+), 10 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/realloc_on_assign_8.f90 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 0309cbc1202..943f885cdab 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2011-12-08 Tobias Burnus + + PR fortran/51448 + * fortran/trans-array.c (get_std_lbound): Fix handling of + conversion functions. + 2011-12-06 Tobias Burnus PR fortran/51435 diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 1eef3599622..a4be6e7b165 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -6772,7 +6772,16 @@ get_std_lbound (gfc_expr *expr, tree desc, int dim, bool assumed_size) gfc_array_index_type, cond, lbound, gfc_index_one_node); } - else if (expr->expr_type == EXPR_VARIABLE) + + if (expr->expr_type == EXPR_FUNCTION) + { + /* A conversion function, so use the argument. */ + gcc_assert (expr->value.function.isym + && expr->value.function.isym->conversion); + expr = expr->value.function.actual->expr; + } + + if (expr->expr_type == EXPR_VARIABLE) { tmp = TREE_TYPE (expr->symtree->n.sym->backend_decl); for (ref = expr->ref; ref; ref = ref->next) @@ -6785,15 +6794,6 @@ get_std_lbound (gfc_expr *expr, tree desc, int dim, bool assumed_size) } return GFC_TYPE_ARRAY_LBOUND(tmp, dim); } - else if (expr->expr_type == EXPR_FUNCTION) - { - /* A conversion function, so use the argument. */ - expr = expr->value.function.actual->expr; - if (expr->expr_type != EXPR_VARIABLE) - return gfc_index_one_node; - desc = TREE_TYPE (expr->symtree->n.sym->backend_decl); - return get_std_lbound (expr, desc, dim, assumed_size); - } return gfc_index_one_node; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d389970df6c..1d94277b834 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-12-08 Tobias Burnus + + PR fortran/51448 + * gfortran.dg/realloc_on_assign_8.f90: New. + 2011-12-08 Teresa Johnson * gcc.target/i386/movdi-rex64.c: Remove unnecessary diff --git a/gcc/testsuite/gfortran.dg/realloc_on_assign_8.f90 b/gcc/testsuite/gfortran.dg/realloc_on_assign_8.f90 new file mode 100644 index 00000000000..4f7d28895b5 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/realloc_on_assign_8.f90 @@ -0,0 +1,17 @@ +! { dg-do compile } +! +! PR fortran/51448 +! +! Contribued by François Willot +! + PROGRAM MAIN + IMPLICIT NONE + TYPE mytype + REAL b(2) + END TYPE mytype + TYPE(mytype) a + DOUBLE PRECISION, ALLOCATABLE :: x(:) + ALLOCATE(x(2)) + a%b=0.0E0 + x=a%b + END -- cgit v1.2.3 From 508d464dc2e81a6fb7aee093f5cf5bc459efb6c0 Mon Sep 17 00:00:00 2001 From: Toon Moene Date: Thu, 8 Dec 2011 20:58:23 +0000 Subject: 2011-12-08 Toon Moene PR fortran/51310 * invoke.texi: Itemize the cases for which -finit-= doesn't work. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182138 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/invoke.texi | 16 ++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 943f885cdab..ea5608c2473 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2011-12-08 Toon Moene + + PR fortran/51310 + * invoke.texi: Itemize the cases for which + -finit-= doesn't work. + 2011-12-08 Tobias Burnus PR fortran/51448 diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi index 14c720d8e7c..f9d0eb3e5ca 100644 --- a/gcc/fortran/invoke.texi +++ b/gcc/fortran/invoke.texi @@ -1438,10 +1438,18 @@ initialization options are provided by the the real and imaginary parts of local @code{COMPLEX} variables), @option{-finit-logical=@var{}}, and @option{-finit-character=@var{n}} (where @var{n} is an ASCII character -value) options. These options do not initialize components of derived -type variables, nor do they initialize variables that appear in an -@code{EQUIVALENCE} statement. (This limitation may be removed in -future releases). +value) options. These options do not initialize +@itemize @bullet +@item +automatic arrays +@item +allocatable arrays +@item +components of derived type variables +@item +variables that appear in an @code{EQUIVALENCE} statement. +@end itemize +(These limitations may be removed in future releases). Note that the @option{-finit-real=nan} option initializes @code{REAL} and @code{COMPLEX} variables with a quiet NaN. For a signalling NaN -- cgit v1.2.3 From a1ead14f751eda8246bf0a72fc985fbb84b3534e Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Fri, 9 Dec 2011 00:18:03 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182147 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 2aad9b1e849..dd7bf84ca91 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111208 +20111209 -- cgit v1.2.3 From 503f7b117addfad899b86f543702714f147dfecd Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 9 Dec 2011 01:27:01 +0000 Subject: gcc/ Backport from mainline: 2011-12-05 Kazu Hirata PR target/51408 * config/arm/arm.md (*minmax_arithsi): Always require the else clause in the MINUS case. testsuite/ Backport from mainline: 2011-12-05 Kazu Hirata PR target/51408 * gcc.dg/pr51408.c: New. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182149 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 10 ++++++++++ gcc/config/arm/arm.md | 2 +- gcc/testsuite/ChangeLog | 9 +++++++++ gcc/testsuite/gcc.dg/pr51408.c | 22 ++++++++++++++++++++++ 4 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.dg/pr51408.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f5ebe75f1b4..fd2e56e815a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2011-12-09 Kazu Hirata + + Backport from mainline: + + 2011-12-05 Kazu Hirata + + PR target/51408 + * config/arm/arm.md (*minmax_arithsi): Always require the else + clause in the MINUS case. + 2011-12-08 Teresa Johnson Backport from mainline: diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index cc6d34be2c6..794b865438c 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -3272,7 +3272,7 @@ bool need_else; if (which_alternative != 0 || operands[3] != const0_rtx - || (code != PLUS && code != MINUS && code != IOR && code != XOR)) + || (code != PLUS && code != IOR && code != XOR)) need_else = true; else need_else = false; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1d94277b834..0db1d35719b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2011-12-09 Kazu Hirata + + Backport from mainline: + + 2011-12-05 Kazu Hirata + + PR target/51408 + * gcc.dg/pr51408.c: New. + 2011-12-08 Tobias Burnus PR fortran/51448 diff --git a/gcc/testsuite/gcc.dg/pr51408.c b/gcc/testsuite/gcc.dg/pr51408.c new file mode 100644 index 00000000000..2cc5cf967b6 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr51408.c @@ -0,0 +1,22 @@ +/* This testcase used to fail because of a bug in + arm.md:*minmax_arithsi. */ + +/* { dg-do run } */ +/* { dg-options "-O1" } */ + +extern void abort (void); + +int __attribute__((noinline)) +foo (int a, int b) +{ + int max = (b > 0) ? b : 0; + return max - a; +} + +int +main (void) +{ + if (foo (3, -1) != -3) + abort (); + return 0; +} -- cgit v1.2.3 From df5f95dfd94b28080f977d2cf2ce9eddba549e5f Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 9 Dec 2011 11:32:35 +0000 Subject: Backport from mainline 2011-12-08 Jakub Jelinek PR tree-optimization/51466 * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Also copy TREE_SIDE_EFFECTS. * gcc.c-torture/execute/pr51466.c: New test. 2011-11-28 Jakub Jelinek PR tree-optimization/50078 * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Copy over TREE_THIS_VOLATILE also from the old to new lhs resp. rhs. * gcc.dg/pr50078.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182157 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 15 ++++++++++ gcc/testsuite/ChangeLog | 13 ++++++++ gcc/testsuite/gcc.c-torture/execute/pr51466.c | 43 +++++++++++++++++++++++++++ gcc/testsuite/gcc.dg/pr50078.c | 14 +++++++++ gcc/tree-ssa-forwprop.c | 18 +++++++---- 5 files changed, 97 insertions(+), 6 deletions(-) create mode 100644 gcc/testsuite/gcc.c-torture/execute/pr51466.c create mode 100644 gcc/testsuite/gcc.dg/pr50078.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fd2e56e815a..21a68e4e7d2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,18 @@ +2011-12-09 Jakub Jelinek + + Backport from mainline + 2011-12-08 Jakub Jelinek + + PR tree-optimization/51466 + * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Also copy + TREE_SIDE_EFFECTS. + + 2011-11-28 Jakub Jelinek + + PR tree-optimization/50078 + * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Copy over + TREE_THIS_VOLATILE also from the old to new lhs resp. rhs. + 2011-12-09 Kazu Hirata Backport from mainline: diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0db1d35719b..d430d3cc54b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,16 @@ +2011-12-09 Jakub Jelinek + + Backport from mainline + 2011-12-08 Jakub Jelinek + + PR tree-optimization/51466 + * gcc.c-torture/execute/pr51466.c: New test. + + 2011-11-28 Jakub Jelinek + + PR tree-optimization/50078 + * gcc.dg/pr50078.c: New test. + 2011-12-09 Kazu Hirata Backport from mainline: diff --git a/gcc/testsuite/gcc.c-torture/execute/pr51466.c b/gcc/testsuite/gcc.c-torture/execute/pr51466.c new file mode 100644 index 00000000000..aa0b7fd4fb9 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr51466.c @@ -0,0 +1,43 @@ +/* PR tree-optimization/51466 */ + +extern void abort (void); + +__attribute__((noinline, noclone)) int +foo (int i) +{ + volatile int v[4]; + int *p; + v[i] = 6; + p = (int *) &v[i]; + return *p; +} + +__attribute__((noinline, noclone)) int +bar (int i) +{ + volatile int v[4]; + int *p; + v[i] = 6; + p = (int *) &v[i]; + *p = 8; + return v[i]; +} + +__attribute__((noinline, noclone)) int +baz (int i) +{ + volatile int v[4]; + int *p; + v[i] = 6; + p = (int *) &v[0]; + *p = 8; + return v[i]; +} + +int +main () +{ + if (foo (3) != 6 || bar (2) != 8 || baz (0) != 8 || baz (1) != 6) + abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/pr50078.c b/gcc/testsuite/gcc.dg/pr50078.c new file mode 100644 index 00000000000..a8aee43fb6a --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr50078.c @@ -0,0 +1,14 @@ +/* PR tree-optimization/50078 */ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +unsigned nonvolvar[2]; + +void +test (int arg) +{ + unsigned v = *(volatile unsigned *) (&nonvolvar[arg]); + *(volatile unsigned *) (&nonvolvar[arg]) = v; +} + +/* { dg-final { scan-assembler-times "movl\[^\n\r\]*nonvolvar" 2 { target { { i?86-*-* x86_64-*-* } && nonpic } } } } */ diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index 16f09a8dce9..7e1e7c02c35 100644 --- a/gcc/tree-ssa-forwprop.c +++ b/gcc/tree-ssa-forwprop.c @@ -872,7 +872,7 @@ forward_propagate_addr_expr_1 (tree name, tree def_rhs, TREE_TYPE (gimple_assign_rhs1 (use_stmt)))) { tree *def_rhs_basep = &TREE_OPERAND (def_rhs, 0); - tree new_offset, new_base, saved; + tree new_offset, new_base, saved, new_lhs; while (handled_component_p (*def_rhs_basep)) def_rhs_basep = &TREE_OPERAND (*def_rhs_basep, 0); saved = *def_rhs_basep; @@ -891,9 +891,12 @@ forward_propagate_addr_expr_1 (tree name, tree def_rhs, *def_rhs_basep = build2 (MEM_REF, TREE_TYPE (*def_rhs_basep), new_base, new_offset); TREE_THIS_VOLATILE (*def_rhs_basep) = TREE_THIS_VOLATILE (lhs); + TREE_SIDE_EFFECTS (*def_rhs_basep) = TREE_SIDE_EFFECTS (lhs); TREE_THIS_NOTRAP (*def_rhs_basep) = TREE_THIS_NOTRAP (lhs); - gimple_assign_set_lhs (use_stmt, - unshare_expr (TREE_OPERAND (def_rhs, 0))); + new_lhs = unshare_expr (TREE_OPERAND (def_rhs, 0)); + gimple_assign_set_lhs (use_stmt, new_lhs); + TREE_THIS_VOLATILE (new_lhs) = TREE_THIS_VOLATILE (lhs); + TREE_SIDE_EFFECTS (new_lhs) = TREE_SIDE_EFFECTS (lhs); *def_rhs_basep = saved; tidy_after_forward_propagate_addr (use_stmt); /* Continue propagating into the RHS if this was not the @@ -953,7 +956,7 @@ forward_propagate_addr_expr_1 (tree name, tree def_rhs, TREE_TYPE (TREE_OPERAND (def_rhs, 0)))) { tree *def_rhs_basep = &TREE_OPERAND (def_rhs, 0); - tree new_offset, new_base, saved; + tree new_offset, new_base, saved, new_rhs; while (handled_component_p (*def_rhs_basep)) def_rhs_basep = &TREE_OPERAND (*def_rhs_basep, 0); saved = *def_rhs_basep; @@ -972,9 +975,12 @@ forward_propagate_addr_expr_1 (tree name, tree def_rhs, *def_rhs_basep = build2 (MEM_REF, TREE_TYPE (*def_rhs_basep), new_base, new_offset); TREE_THIS_VOLATILE (*def_rhs_basep) = TREE_THIS_VOLATILE (rhs); + TREE_SIDE_EFFECTS (*def_rhs_basep) = TREE_SIDE_EFFECTS (rhs); TREE_THIS_NOTRAP (*def_rhs_basep) = TREE_THIS_NOTRAP (rhs); - gimple_assign_set_rhs1 (use_stmt, - unshare_expr (TREE_OPERAND (def_rhs, 0))); + new_rhs = unshare_expr (TREE_OPERAND (def_rhs, 0)); + gimple_assign_set_rhs1 (use_stmt, new_rhs); + TREE_THIS_VOLATILE (new_rhs) = TREE_THIS_VOLATILE (rhs); + TREE_SIDE_EFFECTS (new_rhs) = TREE_SIDE_EFFECTS (rhs); *def_rhs_basep = saved; fold_stmt_inplace (use_stmt); tidy_after_forward_propagate_addr (use_stmt); -- cgit v1.2.3 From c33af5049340f51fa182e92868d7b050dcc71fa7 Mon Sep 17 00:00:00 2001 From: Michael Meissner Date: Fri, 9 Dec 2011 19:11:01 +0000 Subject: Backport 51469 git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182172 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 9 +++++++++ gcc/varasm.c | 13 ++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 21a68e4e7d2..af1feae0e58 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2011-12-09 Michael Meissner + + Backport from mainline + 2011-12-09 Michael Meissner + + PR rtl-optimization/51469 + * varasm.c (default_binds_local_p_1): If the symbol is a gnu + indirect function, mark the symbol as non-local. + 2011-12-09 Jakub Jelinek Backport from mainline diff --git a/gcc/varasm.c b/gcc/varasm.c index 654c27ad374..053404302a2 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -6751,11 +6751,14 @@ default_binds_local_p_1 (const_tree exp, int shlib) /* A non-decl is an entry in the constant pool. */ if (!DECL_P (exp)) local_p = true; - /* Weakrefs may not bind locally, even though the weakref itself is - always static and therefore local. - FIXME: We can resolve this more curefuly by looking at the weakref - alias. */ - else if (lookup_attribute ("weakref", DECL_ATTRIBUTES (exp))) + /* Weakrefs may not bind locally, even though the weakref itself is always + static and therefore local. Similarly, the resolver for ifunc functions + might resolve to a non-local function. + FIXME: We can resolve the weakref case more curefuly by looking at the + weakref alias. */ + else if (lookup_attribute ("weakref", DECL_ATTRIBUTES (exp)) + || (TREE_CODE (exp) == FUNCTION_DECL + && lookup_attribute ("ifunc", DECL_ATTRIBUTES (exp)))) local_p = false; /* Static variables are always local. */ else if (! TREE_PUBLIC (exp)) -- cgit v1.2.3 From 3f3baea38423c0c2f0ffd42829df48c3ff4c7ad4 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sat, 10 Dec 2011 00:18:13 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182182 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index dd7bf84ca91..8aa09a3a58c 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111209 +20111210 -- cgit v1.2.3 From 38329a2b9d2e7a4d3404823b3fdff193c741ec3c Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sun, 11 Dec 2011 00:18:19 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182197 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 8aa09a3a58c..b8bfd744170 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111210 +20111211 -- cgit v1.2.3 From c7e673ff8367795d7b908c2dcf25a1e3421ccc8d Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Sun, 11 Dec 2011 20:03:43 +0000 Subject: 2011-12-11 Thomas Koenig PR fortran/51338 Backport from trunk * dependency.c (are_identical_variables): Handle case where end fields of substring references are NULL. 2011-12-11 Thomas Koenig PR fortran/51338 Backport from trunk * gfortran.dg/assumed_charlen_substring_1.f90: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182209 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 7 +++++++ gcc/fortran/dependency.c | 14 ++++++++++++-- gcc/testsuite/ChangeLog | 6 ++++++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index ea5608c2473..be149aa1e31 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2011-12-11 Thomas Koenig + + PR fortran/51338 + Backport from trunk + * dependency.c (are_identical_variables): Handle case where + end fields of substring references are NULL. + 2011-12-08 Toon Moene PR fortran/51310 diff --git a/gcc/fortran/dependency.c b/gcc/fortran/dependency.c index 58cfb65bce1..49e47fb48a5 100644 --- a/gcc/fortran/dependency.c +++ b/gcc/fortran/dependency.c @@ -163,9 +163,19 @@ gfc_are_identical_variables (gfc_expr *e1, gfc_expr *e2) break; case REF_SUBSTRING: - if (gfc_dep_compare_expr (r1->u.ss.start, r2->u.ss.start) != 0 - || gfc_dep_compare_expr (r1->u.ss.end, r2->u.ss.end) != 0) + if (gfc_dep_compare_expr (r1->u.ss.start, r2->u.ss.start) != 0) return false; + + /* If both are NULL, the end length compares equal, because we + are looking at the same variable. This can only happen for + assumed- or deferred-length character arguments. */ + + if (r1->u.ss.end == NULL && r2->u.ss.end == NULL) + break; + + if (gfc_dep_compare_expr (r1->u.ss.end, r2->u.ss.end) != 0) + return false; + break; default: diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d430d3cc54b..1ee6b0dbb62 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2011-12-11 Thomas Koenig + + PR fortran/51338 + Backport from trunk + * gfortran.dg/assumed_charlen_substring_1.f90: New test. + 2011-12-09 Jakub Jelinek Backport from mainline -- cgit v1.2.3 From 1bb9fdb36ccdb8f810db26e66e76c61cab3a4d03 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Sun, 11 Dec 2011 21:37:55 +0000 Subject: 2011-12-11 Tobias Burnus PR fortran/50923 * trans-decl.c (generate_local_decl): Set TREE_NO_WARNING only if the front end has printed a warning. (gfc_generate_function_code): Fix unset-result warning. 2011-12-11 Tobias Burnus PR fortran/50923 * gfortran.dg/warn_function_without_result_2.f90: New. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182213 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 7 +++++++ gcc/fortran/trans-decl.c | 19 ++++++++++--------- gcc/testsuite/ChangeLog | 5 +++++ .../gfortran.dg/warn_function_without_result_2.f90 | 19 +++++++++++++++++++ 4 files changed, 41 insertions(+), 9 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/warn_function_without_result_2.f90 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index be149aa1e31..313336c4899 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2011-12-11 Tobias Burnus + + PR fortran/50923 + * trans-decl.c (generate_local_decl): Set TREE_NO_WARNING only + if the front end has printed a warning. + (gfc_generate_function_code): Fix unset-result warning. + 2011-12-11 Thomas Koenig PR fortran/51338 diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 25703f0c52b..50f137287eb 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -4184,10 +4184,16 @@ generate_local_decl (gfc_symbol * sym) "declared INTENT(OUT) but was not set and " "does not have a default initializer", sym->name, &sym->declared_at); + if (sym->backend_decl != NULL_TREE) + TREE_NO_WARNING(sym->backend_decl) = 1; } else if (gfc_option.warn_unused_dummy_argument) - gfc_warning ("Unused dummy argument '%s' at %L", sym->name, + { + gfc_warning ("Unused dummy argument '%s' at %L", sym->name, &sym->declared_at); + if (sym->backend_decl != NULL_TREE) + TREE_NO_WARNING(sym->backend_decl) = 1; + } } /* Warn for unused variables, but not if they're inside a common @@ -4232,11 +4238,6 @@ generate_local_decl (gfc_symbol * sym) mark the symbol now, as well as in traverse_ns, to prevent getting stuck in a circular dependency. */ sym->mark = 1; - - /* We do not want the middle-end to warn about unused parameters - as this was already done above. */ - if (sym->attr.dummy && sym->backend_decl != NULL_TREE) - TREE_NO_WARNING(sym->backend_decl) = 1; } else if (sym->attr.flavor == FL_PARAMETER) { @@ -4851,11 +4852,11 @@ gfc_generate_function_code (gfc_namespace * ns) if (result == NULL_TREE) { /* TODO: move to the appropriate place in resolve.c. */ - if (warn_return_type && !sym->attr.referenced && sym == sym->result) + if (warn_return_type && sym == sym->result) gfc_warning ("Return value of function '%s' at %L not set", sym->name, &sym->declared_at); - - TREE_NO_WARNING(sym->backend_decl) = 1; + if (warn_return_type) + TREE_NO_WARNING(sym->backend_decl) = 1; } else gfc_add_expr_to_block (&body, gfc_generate_return ()); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1ee6b0dbb62..eb5578e42ae 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-12-11 Tobias Burnus + + PR fortran/50923 + * gfortran.dg/warn_function_without_result_2.f90: New. + 2011-12-11 Thomas Koenig PR fortran/51338 diff --git a/gcc/testsuite/gfortran.dg/warn_function_without_result_2.f90 b/gcc/testsuite/gfortran.dg/warn_function_without_result_2.f90 new file mode 100644 index 00000000000..25fd0b73a75 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/warn_function_without_result_2.f90 @@ -0,0 +1,19 @@ +! { dg-do compile } +! { dg-options "-Wall" } +! +! PR fortran/50923 +! +module m +contains + integer pure function f() ! { dg-warning "Return value of function 'f' at .1. not set" } + end function f + integer pure function g() result(h) ! { dg-warning "Return value 'h' of function 'g' declared at .1. not set" } + end function g + integer pure function i() + i = 7 + end function i + integer pure function j() result(k) + k = 8 + end function j +end module m +! { dg-final { cleanup-modules "mod" } } -- cgit v1.2.3 From af431165317d93e7d3815f78649dd1983da642bd Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Mon, 12 Dec 2011 00:17:41 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182216 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index b8bfd744170..312898706e9 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111211 +20111212 -- cgit v1.2.3 From 5818fe1349dfbe0220a26aa0ce6131b3f0962a47 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Mon, 12 Dec 2011 18:24:31 +0000 Subject: PR tree-optimization/50569 * tree-sra.c (build_ref_for_model): Replicate a chain of COMPONENT_REFs in the expression of MODEL instead of just the last one. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182253 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 +++ gcc/testsuite/ChangeLog | 4 ++ gcc/testsuite/gcc.c-torture/execute/20111212-1.c | 34 ++++++++++++++ gcc/tree-sra.c | 58 ++++++++++++++++++------ 4 files changed, 89 insertions(+), 13 deletions(-) create mode 100644 gcc/testsuite/gcc.c-torture/execute/20111212-1.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index af1feae0e58..0c1f9975aea 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-12-12 Eric Botcazou + + PR tree-optimization/50569 + * tree-sra.c (build_ref_for_model): Replicate a chain of COMPONENT_REFs + in the expression of MODEL instead of just the last one. + 2011-12-09 Michael Meissner Backport from mainline diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index eb5578e42ae..bdca336eb47 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2011-12-12 Eric Botcazou + + * gcc.c-torture/execute/20111212-1.c: New test. + 2011-12-11 Tobias Burnus PR fortran/50923 diff --git a/gcc/testsuite/gcc.c-torture/execute/20111212-1.c b/gcc/testsuite/gcc.c-torture/execute/20111212-1.c new file mode 100644 index 00000000000..c46e6e94636 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20111212-1.c @@ -0,0 +1,34 @@ +/* PR tree-optimization/50569 */ +/* Reported by Paul Koning */ +/* Reduced testcase by Mikael Pettersson */ + +struct event { + struct { + unsigned int sec; + } sent __attribute__((packed)); +}; + +void __attribute__((noinline,noclone)) frob_entry(char *buf) +{ + struct event event; + + __builtin_memcpy(&event, buf, sizeof(event)); + if (event.sent.sec < 64) { + event.sent.sec = -1U; + __builtin_memcpy(buf, &event, sizeof(event)); + } +} + +int main(void) +{ + union { + char buf[1 + sizeof(struct event)]; + int align; + } u; + + __builtin_memset(&u, 0, sizeof u); + + frob_entry(&u.buf[1]); + + return 0; +} diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index c5e990e15da..cb91dc4129a 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -1445,29 +1445,61 @@ build_ref_for_offset (location_t loc, tree base, HOST_WIDE_INT offset, return fold_build2_loc (loc, MEM_REF, exp_type, base, off); } +DEF_VEC_ALLOC_P_STACK (tree); +#define VEC_tree_stack_alloc(alloc) VEC_stack_alloc (tree, alloc) + /* Construct a memory reference to a part of an aggregate BASE at the given - OFFSET and of the same type as MODEL. In case this is a reference to a - component, the function will replicate the last COMPONENT_REF of model's - expr to access it. GSI and INSERT_AFTER have the same meaning as in - build_ref_for_offset. */ + OFFSET and of the type of MODEL. In case this is a chain of references + to component, the function will replicate the chain of COMPONENT_REFs of + the expression of MODEL to access it. GSI and INSERT_AFTER have the same + meaning as in build_ref_for_offset. */ static tree build_ref_for_model (location_t loc, tree base, HOST_WIDE_INT offset, struct access *model, gimple_stmt_iterator *gsi, bool insert_after) { + tree type = model->type, t; + VEC(tree,stack) *cr_stack = NULL; + if (TREE_CODE (model->expr) == COMPONENT_REF) { - tree t, exp_type, fld = TREE_OPERAND (model->expr, 1); - offset -= int_bit_position (fld); - exp_type = TREE_TYPE (TREE_OPERAND (model->expr, 0)); - t = build_ref_for_offset (loc, base, offset, exp_type, gsi, insert_after); - return fold_build3_loc (loc, COMPONENT_REF, TREE_TYPE (fld), t, fld, - NULL_TREE); + tree expr = model->expr; + + /* Create a stack of the COMPONENT_REFs so later we can walk them in + order from inner to outer. */ + cr_stack = VEC_alloc (tree, stack, 6); + + do { + tree field = TREE_OPERAND (expr, 1); + offset -= int_bit_position (field); + + VEC_safe_push (tree, stack, cr_stack, expr); + + expr = TREE_OPERAND (expr, 0); + type = TREE_TYPE (expr); + } while (TREE_CODE (expr) == COMPONENT_REF); } - else - return build_ref_for_offset (loc, base, offset, model->type, - gsi, insert_after); + + t = build_ref_for_offset (loc, base, offset, type, gsi, insert_after); + + if (TREE_CODE (model->expr) == COMPONENT_REF) + { + unsigned i; + tree expr; + + /* Now replicate the chain of COMPONENT_REFs from inner to outer. */ + FOR_EACH_VEC_ELT_REVERSE (tree, cr_stack, i, expr) + { + tree field = TREE_OPERAND (expr, 1); + t = fold_build3_loc (loc, COMPONENT_REF, TREE_TYPE (field), t, field, + NULL_TREE); + } + + VEC_free (tree, stack, cr_stack); + } + + return t; } /* Construct a memory reference consisting of component_refs and array_refs to -- cgit v1.2.3 From 483dc9aa31d22f0217d7c10bd91e4548157df03c Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 12 Dec 2011 19:43:06 +0000 Subject: Backported from mainline 2011-12-11 Jakub Jelinek PR tree-optimization/51485 * tree-vect-data-refs.c (vect_analyze_data_refs): Give up on DRs in call stmts. * g++.dg/vect/pr51485.cc: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182259 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 9 +++++++++ gcc/testsuite/ChangeLog | 8 ++++++++ gcc/testsuite/g++.dg/vect/pr51485.cc | 14 ++++++++++++++ gcc/tree-vect-data-refs.c | 10 ++++++++++ 4 files changed, 41 insertions(+) create mode 100644 gcc/testsuite/g++.dg/vect/pr51485.cc diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0c1f9975aea..b1b83aca5d2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2011-12-12 Jakub Jelinek + + Backported from mainline + 2011-12-11 Jakub Jelinek + + PR tree-optimization/51485 + * tree-vect-data-refs.c (vect_analyze_data_refs): Give up on + DRs in call stmts. + 2011-12-12 Eric Botcazou PR tree-optimization/50569 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bdca336eb47..869c3cd3122 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2011-12-12 Jakub Jelinek + + Backported from mainline + 2011-12-11 Jakub Jelinek + + PR tree-optimization/51485 + * g++.dg/vect/pr51485.cc: New test. + 2011-12-12 Eric Botcazou * gcc.c-torture/execute/20111212-1.c: New test. diff --git a/gcc/testsuite/g++.dg/vect/pr51485.cc b/gcc/testsuite/g++.dg/vect/pr51485.cc new file mode 100644 index 00000000000..d57d7596d0e --- /dev/null +++ b/gcc/testsuite/g++.dg/vect/pr51485.cc @@ -0,0 +1,14 @@ +/* { dg-do compile } */ + +struct A { A (); unsigned int a; }; +double bar (A a) throw () __attribute__((pure)); + +void +foo (unsigned int x, double *y, A *z) +{ + unsigned int i; + for (i = 0; i < x; i++) + y[i] = bar (z[i]); +} + +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index a45ad40fe2a..d49393f1e43 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -2631,6 +2631,16 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo, return false; } + if (is_gimple_call (stmt)) + { + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOCATIONS)) + { + fprintf (vect_dump, "not vectorized: dr in a call "); + print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM); + } + return false; + } + /* Update DR field in stmt_vec_info struct. */ /* If the dataref is in an inner-loop of the loop that is considered for -- cgit v1.2.3 From 5a86e02b72c4ada8c4e3ca827fcd5ce4c5b506a6 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 12 Dec 2011 19:43:49 +0000 Subject: PR middle-end/51510 * calls.c (internal_arg_pointer_based_exp_scan): Don't use VEC_safe_grow_cleared if idx is smaller than VEC_length. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182260 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 4 ++++ gcc/calls.c | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b1b83aca5d2..1a1a038fe68 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2011-12-12 Jakub Jelinek + PR middle-end/51510 + * calls.c (internal_arg_pointer_based_exp_scan): Don't use + VEC_safe_grow_cleared if idx is smaller than VEC_length. + Backported from mainline 2011-12-11 Jakub Jelinek diff --git a/gcc/calls.c b/gcc/calls.c index d5779f38d4c..c978e613768 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -1595,9 +1595,11 @@ internal_arg_pointer_based_exp_scan (void) val = internal_arg_pointer_based_exp (SET_SRC (set), false); if (val != NULL_RTX) { - VEC_safe_grow_cleared (rtx, heap, - internal_arg_pointer_exp_state.cache, - idx + 1); + if (idx + >= VEC_length (rtx, internal_arg_pointer_exp_state.cache)) + VEC_safe_grow_cleared (rtx, heap, + internal_arg_pointer_exp_state.cache, + idx + 1); VEC_replace (rtx, internal_arg_pointer_exp_state.cache, idx, val); } -- cgit v1.2.3 From 3ccef7960b883081a867bb126f24ad61adc498db Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 12 Dec 2011 19:44:22 +0000 Subject: PR testsuite/51511 * gcc.dg/pr45819.c: Add -w to dg-options. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182261 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/gcc.dg/pr45819.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 869c3cd3122..2af4c9539ac 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2011-12-12 Jakub Jelinek + PR testsuite/51511 + * gcc.dg/pr45819.c: Add -w to dg-options. + Backported from mainline 2011-12-11 Jakub Jelinek diff --git a/gcc/testsuite/gcc.dg/pr45819.c b/gcc/testsuite/gcc.dg/pr45819.c index de968003ef2..4979fd328ca 100644 --- a/gcc/testsuite/gcc.dg/pr45819.c +++ b/gcc/testsuite/gcc.dg/pr45819.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-optimized" } */ +/* { dg-options "-O2 -fdump-tree-optimized -w" } */ struct ehci_regs { char x; -- cgit v1.2.3 From 1dce84bc8eeb33225d4c1d5c0ac18d66a47794a2 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Tue, 13 Dec 2011 00:18:18 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182269 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 312898706e9..471862fcc33 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111212 +20111213 -- cgit v1.2.3 From 463f05e904d86321adef41919c717905638b8b1a Mon Sep 17 00:00:00 2001 From: Andreas Krebbel Date: Tue, 13 Dec 2011 20:19:34 +0000 Subject: 2011-12-13 Andreas Krebbel * regmove.c (fixup_match_2): Only access call_used_regs with hard regs. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182305 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/regmove.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1a1a038fe68..32f31498e0e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-12-13 Andreas Krebbel + + * regmove.c (fixup_match_2): Only access call_used_regs with hard + regs. + 2011-12-12 Jakub Jelinek PR middle-end/51510 diff --git a/gcc/regmove.c b/gcc/regmove.c index 48a583fa215..9968599083c 100644 --- a/gcc/regmove.c +++ b/gcc/regmove.c @@ -860,7 +860,7 @@ fixup_match_2 (rtx insn, rtx dst, rtx src, rtx offset) if (REG_N_CALLS_CROSSED (REGNO (src)) == 0) break; - if (call_used_regs [REGNO (dst)] + if ((HARD_REGISTER_P (dst) && call_used_regs [REGNO (dst)]) || find_reg_fusage (p, CLOBBER, dst)) break; } -- cgit v1.2.3 From 0d23789ea4097d2490b2f550ab97595a10899463 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Tue, 13 Dec 2011 22:03:05 +0000 Subject: * lto-streamer-out.c (write_symbol): Use proper 64-bit host type. * lto-cgraph.c (input_cgraph_opt_section): Use 'int' for offsets. * lto-streamer-in.c (lto_read_body): Likewise. (lto_input_toplevel_asms): Likewise. * lto-section-in.c (lto_create_simple_input_block): Likewise. * lto-opts.c (lto_read_file_options): Likewise. * ipa-prop.c (ipa_prop_read_section): Likewise. * df.h (DF_NOTE): Fix typo in comment. lto/ * lto.h (lto_parse_hex): Delete. * lto.c (lto_read_decls): Use 'int' for offsets. (lto_parse_hex): Make static and return proper 64-bit host type. (lto_resolution_read): Use proper 64-bit host type. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182311 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 12 ++++++++++++ gcc/df.h | 2 +- gcc/ipa-prop.c | 6 +++--- gcc/lto-cgraph.c | 6 +++--- gcc/lto-opts.c | 6 +++--- gcc/lto-section-in.c | 2 +- gcc/lto-streamer-in.c | 6 +++--- gcc/lto-streamer-out.c | 15 +++++---------- gcc/lto/ChangeLog | 7 +++++++ gcc/lto/lto.c | 24 ++++++++++++++---------- gcc/lto/lto.h | 2 -- 11 files changed, 52 insertions(+), 36 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 32f31498e0e..d3757c50dbb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2011-12-13 Eric Botcazou + + * lto-streamer-out.c (write_symbol): Use proper 64-bit host type. + * lto-cgraph.c (input_cgraph_opt_section): Use 'int' for offsets. + * lto-streamer-in.c (lto_read_body): Likewise. + (lto_input_toplevel_asms): Likewise. + * lto-section-in.c (lto_create_simple_input_block): Likewise. + * lto-opts.c (lto_read_file_options): Likewise. + * ipa-prop.c (ipa_prop_read_section): Likewise. + + * df.h (DF_NOTE): Fix typo in comment. + 2011-12-13 Andreas Krebbel * regmove.c (fixup_match_2): Only access call_used_regs with hard diff --git a/gcc/df.h b/gcc/df.h index 684b06db069..f59b52582c1 100644 --- a/gcc/df.h +++ b/gcc/df.h @@ -53,7 +53,7 @@ union df_ref_d; #define DF_RD 3 /* Reaching Defs. */ #define DF_CHAIN 4 /* Def-Use and/or Use-Def Chains. */ #define DF_WORD_LR 5 /* Subreg tracking lr. */ -#define DF_NOTE 6 /* REG_DEF and REG_UNUSED notes. */ +#define DF_NOTE 6 /* REG_DEAD and REG_UNUSED notes. */ #define DF_MD 7 /* Multiple Definitions. */ #define DF_LAST_PROBLEM_PLUS1 (DF_MD + 1) diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index bb32ad8e88f..f2a5759b0b5 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -2868,9 +2868,9 @@ ipa_prop_read_section (struct lto_file_decl_data *file_data, const char *data, { const struct lto_function_header *header = (const struct lto_function_header *) data; - const int32_t cfg_offset = sizeof (struct lto_function_header); - const int32_t main_offset = cfg_offset + header->cfg_size; - const int32_t string_offset = main_offset + header->main_size; + const int cfg_offset = sizeof (struct lto_function_header); + const int main_offset = cfg_offset + header->cfg_size; + const int string_offset = main_offset + header->main_size; struct data_in *data_in; struct lto_input_block ib_main; unsigned int i; diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c index a7f31fee913..cc126169c68 100644 --- a/gcc/lto-cgraph.c +++ b/gcc/lto-cgraph.c @@ -1792,9 +1792,9 @@ input_cgraph_opt_section (struct lto_file_decl_data *file_data, { const struct lto_function_header *header = (const struct lto_function_header *) data; - const int32_t cfg_offset = sizeof (struct lto_function_header); - const int32_t main_offset = cfg_offset + header->cfg_size; - const int32_t string_offset = main_offset + header->main_size; + const int cfg_offset = sizeof (struct lto_function_header); + const int main_offset = cfg_offset + header->cfg_size; + const int string_offset = main_offset + header->main_size; struct data_in *data_in; struct lto_input_block ib_main; unsigned int i; diff --git a/gcc/lto-opts.c b/gcc/lto-opts.c index 3f80e91b5b1..71a7067ce22 100644 --- a/gcc/lto-opts.c +++ b/gcc/lto-opts.c @@ -358,7 +358,7 @@ lto_read_file_options (struct lto_file_decl_data *file_data) size_t len, l, skip; const char *data, *p; const struct lto_simple_header *header; - int32_t opts_offset; + int opts_offset; struct lto_input_block ib; data = lto_get_section_data (file_data, LTO_section_opts, NULL, &len); @@ -379,10 +379,10 @@ lto_read_file_options (struct lto_file_decl_data *file_data) lto_check_version (header->lto_header.major_version, header->lto_header.minor_version); - + LTO_INIT_INPUT_BLOCK (ib, p + opts_offset, 0, header->main_size); input_options (&ib); - + skip = header->main_size + opts_offset; l -= skip; p += skip; diff --git a/gcc/lto-section-in.c b/gcc/lto-section-in.c index bfa9c37b68b..12ae4f1842b 100644 --- a/gcc/lto-section-in.c +++ b/gcc/lto-section-in.c @@ -296,7 +296,7 @@ lto_create_simple_input_block (struct lto_file_decl_data *file_data, = (const struct lto_simple_header *) data; struct lto_input_block* ib_main; - int32_t main_offset = sizeof (struct lto_simple_header); + int main_offset = sizeof (struct lto_simple_header); if (!data) return NULL; diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c index 47837177bad..5ef06abfb54 100644 --- a/gcc/lto-streamer-in.c +++ b/gcc/lto-streamer-in.c @@ -1366,9 +1366,9 @@ lto_read_body (struct lto_file_decl_data *file_data, tree fn_decl, { const struct lto_function_header *header; struct data_in *data_in; - int32_t cfg_offset; - int32_t main_offset; - int32_t string_offset; + int cfg_offset; + int main_offset; + int string_offset; struct lto_input_block ib_cfg; struct lto_input_block ib_main; diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index 3b90fdd68b5..4f5247afbf8 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -2408,7 +2408,7 @@ write_symbol (struct lto_streamer_cache_d *cache, enum gcc_plugin_symbol_kind kind; enum gcc_plugin_symbol_visibility visibility; int slot_num; - uint64_t size; + unsigned HOST_WIDEST_INT size; const char *comdat; unsigned char c; @@ -2466,7 +2466,7 @@ write_symbol (struct lto_streamer_cache_d *cache, when symbol has attribute (visibility("hidden")) specified. targetm.binds_local_p check DECL_VISIBILITY_SPECIFIED and gets this right. */ - + if (DECL_EXTERNAL (t) && !targetm.binds_local_p (t)) visibility = GCCPV_DEFAULT; @@ -2488,14 +2488,9 @@ write_symbol (struct lto_streamer_cache_d *cache, } if (kind == GCCPK_COMMON - && DECL_SIZE (t) - && TREE_CODE (DECL_SIZE (t)) == INTEGER_CST) - { - size = (HOST_BITS_PER_WIDE_INT >= 64) - ? (uint64_t) int_size_in_bytes (TREE_TYPE (t)) - : (((uint64_t) TREE_INT_CST_HIGH (DECL_SIZE_UNIT (t))) << 32) - | TREE_INT_CST_LOW (DECL_SIZE_UNIT (t)); - } + && DECL_SIZE_UNIT (t) + && TREE_CODE (DECL_SIZE_UNIT (t)) == INTEGER_CST) + size = TREE_INT_CST_LOW (DECL_SIZE_UNIT (t)); else size = 0; diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 7bb5b112973..4f50139c87e 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,10 @@ +2011-12-13 Eric Botcazou + + * lto.h (lto_parse_hex): Delete. + * lto.c (lto_read_decls): Use 'int' for offsets. + (lto_parse_hex): Make static and return proper 64-bit host type. + (lto_resolution_read): Use proper 64-bit host type. + 2011-10-26 Release Manager * GCC 4.6.2 released. diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index 4c832fb8a20..3d699c4f84b 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -198,7 +198,7 @@ lto_read_in_decl_state (struct data_in *data_in, const uint32_t *data, uint32_t ix; tree decl; uint32_t i, j; - + ix = *data++; decl = lto_streamer_cache_get (data_in->reader_cache, (int) ix); if (TREE_CODE (decl) != FUNCTION_DECL) @@ -241,9 +241,9 @@ lto_read_decls (struct lto_file_decl_data *decl_data, const void *data, VEC(ld_plugin_symbol_resolution_t,heap) *resolutions) { const struct lto_decl_header *header = (const struct lto_decl_header *) data; - const int32_t decl_offset = sizeof (struct lto_decl_header); - const int32_t main_offset = decl_offset + header->decl_state_size; - const int32_t string_offset = main_offset + header->main_size; + const int decl_offset = sizeof (struct lto_decl_header); + const int main_offset = decl_offset + header->decl_state_size; + const int string_offset = main_offset + header->main_size; struct lto_input_block ib_main; struct data_in *data_in; unsigned int i; @@ -291,17 +291,20 @@ lto_read_decls (struct lto_file_decl_data *decl_data, const void *data, if (data_ptr != data_end) internal_error ("bytecode stream: garbage at the end of symbols section"); - + /* Set the current decl state to be the global state. */ decl_data->current_decl_state = decl_data->global_decl_state; lto_data_in_delete (data_in); } -/* strtoll is not portable. */ -int64_t -lto_parse_hex (const char *p) { - uint64_t ret = 0; +/* Custom version of strtoll, which is not portable. */ + +static HOST_WIDEST_INT +lto_parse_hex (const char *p) +{ + HOST_WIDEST_INT ret = 0; + for (; *p != '\0'; ++p) { char c = *p; @@ -317,6 +320,7 @@ lto_parse_hex (const char *p) { internal_error ("could not parse hex number"); ret |= part; } + return ret; } @@ -352,7 +356,7 @@ lto_resolution_read (splay_tree file_ids, FILE *resolution, lto_file *file) { int t; char offset_p[17]; - int64_t offset; + HOST_WIDEST_INT offset; t = fscanf (resolution, "@0x%16s", offset_p); if (t != 1) internal_error ("could not parse file offset"); diff --git a/gcc/lto/lto.h b/gcc/lto/lto.h index 8110ace2749..e7236b6cbef 100644 --- a/gcc/lto/lto.h +++ b/gcc/lto/lto.h @@ -60,6 +60,4 @@ struct lto_section_slot size_t len; }; -int64_t lto_parse_hex (const char *p); - #endif /* LTO_H */ -- cgit v1.2.3 From 57b8785bd18bd672c72757f3b9e035add7cf5b1f Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Wed, 14 Dec 2011 00:18:41 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182318 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 471862fcc33..ad661d663d1 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111213 +20111214 -- cgit v1.2.3 From 0fdb804c3c6a1d64021e375e010d41393aad7ece Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 14 Dec 2011 16:03:07 +0000 Subject: PR c++/51406 PR c++/51161 * typeck.c (build_static_cast_1): Fix cast of lvalue to base rvalue reference. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182339 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 7 +++++++ gcc/cp/typeck.c | 14 ++++++++++++-- gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/g++.dg/cpp0x/rv-cast3.C | 17 +++++++++++++++++ gcc/testsuite/g++.dg/cpp0x/rv-cast4.C | 13 +++++++++++++ 5 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/g++.dg/cpp0x/rv-cast3.C create mode 100644 gcc/testsuite/g++.dg/cpp0x/rv-cast4.C diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ecacea34c89..eaac7029592 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2011-12-13 Jason Merrill + + PR c++/51406 + PR c++/51161 + * typeck.c (build_static_cast_1): Fix cast of lvalue to + base rvalue reference. + 2011-11-22 Paolo Carlini PR c++/51265 diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 73d57e9fc1f..1c099a2c80c 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -5770,8 +5770,18 @@ build_static_cast_1 (tree type, tree expr, bool c_cast_p, && reference_related_p (TREE_TYPE (type), intype) && (c_cast_p || at_least_as_qualified_p (TREE_TYPE (type), intype))) { - expr = build_typed_address (expr, type); - return convert_from_reference (expr); + /* Handle the lvalue case here by casting to lvalue reference and + then changing it to an rvalue reference. Casting an xvalue to + rvalue reference will be handled by the main code path. */ + tree lref = cp_build_reference_type (TREE_TYPE (type), false); + result = (perform_direct_initialization_if_possible + (lref, expr, c_cast_p, complain)); + result = cp_fold_convert (type, result); + /* Make sure we don't fold back down to a named rvalue reference, + because that would be an lvalue. */ + if (DECL_P (result)) + result = build1 (NON_LVALUE_EXPR, type, result); + return convert_from_reference (result); } /* Resolve overloaded address here rather than once in diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2af4c9539ac..6350a25a352 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2011-12-13 Jason Merrill + + PR c++/51406 + PR c++/51161 + * g++.dg/cpp0x/rv-cast3.C: New. + * g++.dg/cpp0x/rv-cast4.C: New. + 2011-12-12 Jakub Jelinek PR testsuite/51511 diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-cast3.C b/gcc/testsuite/g++.dg/cpp0x/rv-cast3.C new file mode 100644 index 00000000000..6c70324aa81 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/rv-cast3.C @@ -0,0 +1,17 @@ +// PR c++/51406 +// { dg-do run { target c++11 } } + +extern "C" int printf(const char *,...); +extern "C" void abort(); + +struct A { int a; A() : a(1) {} }; +struct B { int b; B() : b(2) {} }; +struct X : A, B {}; + +int main() { + X x; + int a=static_cast(x).a; + int b=static_cast(x).b; + // printf ("%d %d\n", a, b); + if (a!=1 || b!=2) abort(); +} diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-cast4.C b/gcc/testsuite/g++.dg/cpp0x/rv-cast4.C new file mode 100644 index 00000000000..13f369d6108 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/rv-cast4.C @@ -0,0 +1,13 @@ +// PR c++/51161 +// { dg-do compile { target c++11 } } + +struct A{}; +struct B : A{}; +struct C : A{}; +struct D : B, C{}; + +int main() +{ + D d; + static_cast(d); // { dg-error "ambiguous" } +} -- cgit v1.2.3 From a72c6cc743f842cb55974f704e542de11aea8d10 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 14 Dec 2011 22:33:39 +0000 Subject: PR c++/51248 * decl.c (copy_type_enum): Also update variants. (finish_enum): Allow variants of complete enums. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182348 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/decl.c | 29 ++++++++++++++++++----------- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/other/enum2.C | 3 +++ 4 files changed, 32 insertions(+), 11 deletions(-) create mode 100644 gcc/testsuite/g++.dg/other/enum2.C diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index eaac7029592..a2fa74895b1 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2011-12-14 Jason Merrill + + PR c++/51248 + * decl.c (copy_type_enum): Also update variants. + (finish_enum): Allow variants of complete enums. + 2011-12-13 Jason Merrill PR c++/51406 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 82fe81c0a54..fdf3ca155ed 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -11540,15 +11540,19 @@ xref_basetypes (tree ref, tree base_list) static void copy_type_enum (tree dst, tree src) { - TYPE_MIN_VALUE (dst) = TYPE_MIN_VALUE (src); - TYPE_MAX_VALUE (dst) = TYPE_MAX_VALUE (src); - TYPE_SIZE (dst) = TYPE_SIZE (src); - TYPE_SIZE_UNIT (dst) = TYPE_SIZE_UNIT (src); - SET_TYPE_MODE (dst, TYPE_MODE (src)); - TYPE_PRECISION (dst) = TYPE_PRECISION (src); - TYPE_ALIGN (dst) = TYPE_ALIGN (src); - TYPE_USER_ALIGN (dst) = TYPE_USER_ALIGN (src); - TYPE_UNSIGNED (dst) = TYPE_UNSIGNED (src); + tree t; + for (t = dst; t; t = TYPE_NEXT_VARIANT (t)) + { + TYPE_MIN_VALUE (t) = TYPE_MIN_VALUE (src); + TYPE_MAX_VALUE (t) = TYPE_MAX_VALUE (src); + TYPE_SIZE (t) = TYPE_SIZE (src); + TYPE_SIZE_UNIT (t) = TYPE_SIZE_UNIT (src); + SET_TYPE_MODE (dst, TYPE_MODE (src)); + TYPE_PRECISION (t) = TYPE_PRECISION (src); + TYPE_ALIGN (t) = TYPE_ALIGN (src); + TYPE_USER_ALIGN (t) = TYPE_USER_ALIGN (src); + TYPE_UNSIGNED (t) = TYPE_UNSIGNED (src); + } } /* Begin compiling the definition of an enumeration type. @@ -11903,9 +11907,12 @@ finish_enum (tree enumtype) return; } - /* Here there should not be any variants of this type. */ + /* If this is a forward declaration, there should not be any variants, + though we can get a variant in the middle of an enum-specifier with + wacky code like 'enum E { e = sizeof(const E*) };' */ gcc_assert (enumtype == TYPE_MAIN_VARIANT (enumtype) - && !TYPE_NEXT_VARIANT (enumtype)); + && (TYPE_VALUES (enumtype) + || !TYPE_NEXT_VARIANT (enumtype))); } /* Build and install a CONST_DECL for an enumeration constant of the diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6350a25a352..50d720ecefd 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-12-14 Jason Merrill + + PR c++/51248 + * g++.dg/other/enum2.C: New. + 2011-12-13 Jason Merrill PR c++/51406 diff --git a/gcc/testsuite/g++.dg/other/enum2.C b/gcc/testsuite/g++.dg/other/enum2.C new file mode 100644 index 00000000000..3a28f2532c6 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/enum2.C @@ -0,0 +1,3 @@ +// PR c++/51248 + +enum E { e = sizeof(const E*) }; -- cgit v1.2.3 From ff7c753973870b958bb12b873de4e5e6a3eea69a Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 15 Dec 2011 00:18:10 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182351 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index ad661d663d1..f4e81535168 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111214 +20111215 -- cgit v1.2.3 From ee9d2bf7112925c67e9fffa726c3c68673e11bca Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Thu, 15 Dec 2011 15:25:32 +0000 Subject: 2011-12-15 Tobias Burnus PR fortran/51550 PR fortran/47545 PR fortran/49050 PR fortran/51075 * resolve.c (resolve_fl_derived0): Print not-implemented error for deferred-length character components. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182373 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 9 +++++++++ gcc/fortran/resolve.c | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 313336c4899..c054e70b9e4 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,12 @@ +2011-12-15 Tobias Burnus + + PR fortran/51550 + PR fortran/47545 + PR fortran/49050 + PR fortran/51075 + * resolve.c (resolve_fl_derived0): Print not-implemented error + for deferred-length character components. + 2011-12-11 Tobias Burnus PR fortran/50923 diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index aed4625980e..7414db0c5d5 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -11397,6 +11397,14 @@ resolve_fl_derived0 (gfc_symbol *sym) for (c = sym->components; c != NULL; c = c->next) { + /* See PRs 51550, 47545, 48654, 49050, 51075 - and 45170. */ + if (c->ts.type == BT_CHARACTER && c->ts.deferred) + { + gfc_error ("Deferred-length character component '%s' at %L is not " + "yet supported", c->name, &c->loc); + return FAILURE; + } + /* F2008, C442. */ if (c->attr.codimension /* FIXME: c->as check due to PR 43412. */ && (!c->attr.allocatable || (c->as && c->as->type != AS_DEFERRED))) -- cgit v1.2.3 From 7aa8dce05a8c266a595a230bef4306255456bf2b Mon Sep 17 00:00:00 2001 From: Andreas Tobler Date: Thu, 15 Dec 2011 17:55:59 +0000 Subject: 2011-12-15 Andreas Tobler Backport from mainline. 2011-12-15 Andreas Tobler * config/i386/freebsd.h (TARGET_ASM_FILE_END): Define. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182383 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/config/i386/freebsd.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d3757c50dbb..eb00324cc19 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2011-12-15 Andreas Tobler + + Backport from mainline. + 2011-12-15 Andreas Tobler + + * config/i386/freebsd.h (TARGET_ASM_FILE_END): Define. + 2011-12-13 Eric Botcazou * lto-streamer-out.c (write_symbol): Use proper 64-bit host type. diff --git a/gcc/config/i386/freebsd.h b/gcc/config/i386/freebsd.h index 61592d46bb3..6d2c559e792 100644 --- a/gcc/config/i386/freebsd.h +++ b/gcc/config/i386/freebsd.h @@ -147,3 +147,6 @@ along with GCC; see the file COPYING3. If not see #if FBSD_MAJOR >= 6 #define SUBTARGET32_DEFAULT_CPU "i486" #endif + +#define TARGET_ASM_FILE_END file_end_indicate_exec_stack + -- cgit v1.2.3 From 05fc07bed0d7df52805a2de8e1f1f40223906a24 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 15 Dec 2011 22:20:41 +0000 Subject: Check __GLIBC__ when using __SIGRTMIN 2011-12-15 H.J. Lu Backport from mainline 2011-12-14 H.J. Lu * generic-morestack.c (__generic_morestack_set_initial_sp): Check __GLIBC__ instead of __linux__ when using __SIGRTMIN. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182393 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgcc/ChangeLog | 8 ++++++++ libgcc/generic-morestack.c | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 71a75bbd0bf..c5b1d1cd651 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,11 @@ +2011-12-15 H.J. Lu + + Backport from mainline + 2011-12-14 H.J. Lu + + * generic-morestack.c (__generic_morestack_set_initial_sp): Check + __GLIBC__ instead of __linux__ when using __SIGRTMIN. + 2011-11-23 Gerald Pfeifer * config.host (*-*-freebsd[12], *-*-freebsd[12].*, diff --git a/libgcc/generic-morestack.c b/libgcc/generic-morestack.c index 7e29bbcf748..77344a92533 100644 --- a/libgcc/generic-morestack.c +++ b/libgcc/generic-morestack.c @@ -459,8 +459,8 @@ __generic_morestack_set_initial_sp (void *sp, size_t len) sigemptyset (&__morestack_initial_sp.mask); sigfillset (&__morestack_fullmask); -#ifdef __linux__ - /* On Linux, the first two real time signals are used by the NPTL +#ifdef __GLIBC__ + /* In glibc, the first two real time signals are used by the NPTL threading library. By taking them out of the set of signals, we avoiding copying the signal mask in pthread_sigmask. More importantly, pthread_sigmask uses less stack space on x86_64. */ -- cgit v1.2.3 From a03e9c33627df50529f088f72ce150d395b5870d Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 15 Dec 2011 23:50:32 +0000 Subject: Detect infinite recursion condition gcc/ 2011-12-15 H.J. Lu Backport from mainline. 2011-10-28 Chung-Lin Tang PR rtl-optimization/49720 * simplify-rtx.c (simplify_relational_operation_1): Detect infinite recursion condition in "(eq/ne (plus x cst1) cst2) simplifies to (eq/ne x (cst2 - cst1))" case. gcc/testsuite/ 2011-12-15 H.J. Lu Backport from mainline. 2011-10-28 Chung-Lin Tang PR rtl-optimization/49720 * g++.dg/torture/pr49720.C: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182394 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 10 ++++++++++ gcc/simplify-rtx.c | 16 +++++++++++++--- gcc/testsuite/ChangeLog | 8 ++++++++ gcc/testsuite/g++.dg/torture/pr49720.C | 8 ++++++++ 4 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/g++.dg/torture/pr49720.C diff --git a/gcc/ChangeLog b/gcc/ChangeLog index eb00324cc19..ea113da104e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2011-12-15 H.J. Lu + + Backport from mainline. + 2011-10-28 Chung-Lin Tang + + PR rtl-optimization/49720 + * simplify-rtx.c (simplify_relational_operation_1): Detect + infinite recursion condition in "(eq/ne (plus x cst1) cst2) + simplifies to (eq/ne x (cst2 - cst1))" case. + 2011-12-15 Andreas Tobler Backport from mainline. diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index eb747ad3c86..ed401962201 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -4177,10 +4177,20 @@ simplify_relational_operation_1 (enum rtx_code code, enum machine_mode mode, { rtx x = XEXP (op0, 0); rtx c = XEXP (op0, 1); + enum rtx_code invcode = op0code == PLUS ? MINUS : PLUS; + rtx tem = simplify_gen_binary (invcode, cmp_mode, op1, c); + + /* Detect an infinite recursive condition, where we oscillate at this + simplification case between: + A + B == C <---> C - B == A, + where A, B, and C are all constants with non-simplifiable expressions, + usually SYMBOL_REFs. */ + if (GET_CODE (tem) == invcode + && CONSTANT_P (x) + && rtx_equal_p (c, XEXP (tem, 1))) + return NULL_RTX; - c = simplify_gen_binary (op0code == PLUS ? MINUS : PLUS, - cmp_mode, op1, c); - return simplify_gen_relational (code, mode, cmp_mode, x, c); + return simplify_gen_relational (code, mode, cmp_mode, x, tem); } /* (ne:SI (zero_extract:SI FOO (const_int 1) BAR) (const_int 0))) is diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 50d720ecefd..0e3d1f662fc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2011-12-15 H.J. Lu + + Backport from mainline. + 2011-10-28 Chung-Lin Tang + + PR rtl-optimization/49720 + * g++.dg/torture/pr49720.C: New test. + 2011-12-14 Jason Merrill PR c++/51248 diff --git a/gcc/testsuite/g++.dg/torture/pr49720.C b/gcc/testsuite/g++.dg/torture/pr49720.C new file mode 100644 index 00000000000..c5da7ba670f --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/pr49720.C @@ -0,0 +1,8 @@ +/* { dg-do compile } */ + +extern char t_start[], t_end[], t_size[]; +bool foo (void) +{ + long size = reinterpret_cast(t_size); + return (size == t_end - t_start); +} -- cgit v1.2.3 From 5e3c8d0f975a0ccb3d13391d1b4231bb617fe2d8 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Fri, 16 Dec 2011 00:18:30 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182397 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index f4e81535168..cd68068431d 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111215 +20111216 -- cgit v1.2.3 From f3c828e5f4ed528955b2f8ae4333f222c73e1e7d Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Fri, 16 Dec 2011 22:59:27 +0000 Subject: PR c++/51331 * class.c (convert_to_base_statically): Just call build_simple_base_path. (build_simple_base_path): Check field offset. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182418 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 7 +++++++ gcc/cp/class.c | 13 ++++++++++++- gcc/cp/init.c | 4 +++- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/init/value10.C | 27 +++++++++++++++++++++++++++ 5 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/g++.dg/init/value10.C diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a2fa74895b1..6260496830c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2011-12-16 Jason Merrill + + PR c++/51331 + * class.c (convert_to_base_statically): Just call + build_simple_base_path. + (build_simple_base_path): Check field offset. + 2011-12-14 Jason Merrill PR c++/51248 diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 1c9a17b746a..f14dd7804dc 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -464,7 +464,14 @@ build_simple_base_path (tree expr, tree binfo) /* Is this the base field created by build_base_field? */ if (TREE_CODE (field) == FIELD_DECL && DECL_FIELD_IS_BASE (field) - && TREE_TYPE (field) == type) + && TREE_TYPE (field) == type + /* If we're looking for a field in the most-derived class, + also check the field offset; we can have two base fields + of the same type if one is an indirect virtual base and one + is a direct non-virtual base. */ + && (BINFO_INHERITANCE_CHAIN (d_binfo) + || tree_int_cst_equal (byte_position (field), + BINFO_OFFSET (binfo)))) { /* We don't use build_class_member_access_expr here, as that has unnecessary checks, and more importantly results in @@ -541,6 +548,10 @@ convert_to_base_statically (tree expr, tree base) { tree pointer_type; + /* If this is a non-empty base, use a COMPONENT_REF. */ + if (!is_empty_class (BINFO_TYPE (base))) + return build_simple_base_path (expr, base); + pointer_type = build_pointer_type (expr_type); /* We use fold_build2 and fold_convert below to simplify the trees diff --git a/gcc/cp/init.c b/gcc/cp/init.c index f85a30b01fb..14766b648fb 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -141,7 +141,9 @@ initialize_vtbl_ptrs (tree addr) zero-initialization does not simply mean filling the storage with zero bytes. FIELD_SIZE, if non-NULL, is the bit size of the field, subfields with bit positions at or above that bit size shouldn't - be added. */ + be added. Note that this only works when the result is assigned + to a base COMPONENT_REF; if we only have a pointer to the base subobject, + expand_assignment will end up clearing the full size of TYPE. */ static tree build_zero_init_1 (tree type, tree nelts, bool static_storage_p, diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0e3d1f662fc..3bfeedb5a73 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-12-16 Jason Merrill + + PR c++/51331 + * g++.dg/init/value10.C: New. + 2011-12-15 H.J. Lu Backport from mainline. diff --git a/gcc/testsuite/g++.dg/init/value10.C b/gcc/testsuite/g++.dg/init/value10.C new file mode 100644 index 00000000000..2066410a01d --- /dev/null +++ b/gcc/testsuite/g++.dg/init/value10.C @@ -0,0 +1,27 @@ +// PR c++/51331 +// { dg-do run } + +struct A { + A(): x(10) {} + virtual ~A() {} + + int x; +}; + +struct B: public virtual A { +}; + +struct C: public virtual A { +}; + +struct D: public B, virtual public C { + D(): B(), C() {} // note an explicit call to C() which is auto-generated +}; + +int main() { + D* d = new D(); + + // Crashes here with the following message: + // *** glibc detected *** ./test: free(): invalid next size (fast) + delete d; +} -- cgit v1.2.3 From 52301e3d1c4a6814f89b3f8809fcdf1fd4bd8c03 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Fri, 16 Dec 2011 23:38:34 +0000 Subject: * config/sparc/sparc.md (UNSPEC_FRAME_BLOCKAGE): New constant. (frame_blockage): New expander. (frame_blockage): New instruction. * config/sparc/sparc.c (sparc_expand_prologue): When the sequence of instructions establishing the frame isn't atomic, emit frame blockage. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182421 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 8 ++++++++ gcc/config/sparc/sparc.c | 13 ++++++++++++- gcc/config/sparc/sparc.md | 20 ++++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ea113da104e..4539e4edf34 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2011-12-16 Eric Botcazou + + * config/sparc/sparc.md (UNSPEC_FRAME_BLOCKAGE): New constant. + (frame_blockage): New expander. + (frame_blockage): New instruction. + * config/sparc/sparc.c (sparc_expand_prologue): When the sequence of + instructions establishing the frame isn't atomic, emit frame blockage. + 2011-12-15 H.J. Lu Backport from mainline. diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 1c2ba937f0b..c93c25bbd0a 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -4569,8 +4569,9 @@ sparc_expand_prologue (void) else if (actual_fsize <= 8192) { insn = emit_insn (gen_stack_pointer_inc (GEN_INT (-4096))); - /* %sp is still the CFA register. */ RTX_FRAME_RELATED_P (insn) = 1; + + /* %sp is still the CFA register. */ insn = emit_insn (gen_stack_pointer_inc (GEN_INT (4096-actual_fsize))); } @@ -4592,8 +4593,18 @@ sparc_expand_prologue (void) else if (actual_fsize <= 8192) { insn = emit_insn (gen_save_register_window (GEN_INT (-4096))); + /* %sp is not the CFA register anymore. */ emit_insn (gen_stack_pointer_inc (GEN_INT (4096-actual_fsize))); + + /* Make sure no %fp-based store is issued until after the frame is + established. The offset between the frame pointer and the stack + pointer is calculated relative to the value of the stack pointer + at the end of the function prologue, and moving instructions that + access the stack via the frame pointer between the instructions + that decrement the stack pointer could result in accessing the + register window save area, which is volatile. */ + emit_insn (gen_frame_blockage ()); } else { diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md index bf37c37f60c..37e3585ecb9 100644 --- a/gcc/config/sparc/sparc.md +++ b/gcc/config/sparc/sparc.md @@ -28,6 +28,7 @@ [(UNSPEC_MOVE_PIC 0) (UNSPEC_UPDATE_RETURN 1) (UNSPEC_LOAD_PCREL_SYM 2) + (UNSPEC_FRAME_BLOCKAGE 3) (UNSPEC_MOVE_PIC_LABEL 5) (UNSPEC_SETH44 6) (UNSPEC_SETM44 7) @@ -6338,6 +6339,25 @@ "" [(set_attr "length" "0")]) +;; Do not schedule instructions accessing memory before this point. + +(define_expand "frame_blockage" + [(set (match_dup 0) + (unspec:BLK [(match_dup 1)] UNSPEC_FRAME_BLOCKAGE))] + "" +{ + operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode)); + MEM_VOLATILE_P (operands[0]) = 1; + operands[1] = stack_pointer_rtx; +}) + +(define_insn "*frame_blockage" + [(set (match_operand:BLK 0 "" "") + (unspec:BLK [(match_operand:P 1 "" "")] UNSPEC_FRAME_BLOCKAGE))] + "" + "" + [(set_attr "length" "0")]) + (define_expand "probe_stack" [(set (match_operand 0 "memory_operand" "") (const_int 0))] "" -- cgit v1.2.3 From 08a260dec7d177e7d676bd2d2d6f0f59186c139c Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sat, 17 Dec 2011 00:18:37 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182427 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index cd68068431d..353192cbc7b 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111216 +20111217 -- cgit v1.2.3 From e0e7f099f6cd9ca27f86b5c4b6bef3edd6ba4cb6 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Sat, 17 Dec 2011 13:52:02 +0000 Subject: PR c++/51416 * init.c (build_value_init_noctor): Check for incomplete type. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182436 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/init.c | 6 ++++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/auto31.C | 12 ++++++++++++ gcc/testsuite/g++.dg/cpp0x/variadic103.C | 2 +- 5 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/g++.dg/cpp0x/auto31.C diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 6260496830c..24d2b924a93 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2011-12-16 Jason Merrill + + PR c++/51416 + * init.c (build_value_init_noctor): Check for incomplete type. + 2011-12-16 Jason Merrill PR c++/51331 diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 14766b648fb..091ac73ae1e 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -370,6 +370,12 @@ build_value_init (tree type, tsubst_flags_t complain) tree build_value_init_noctor (tree type, tsubst_flags_t complain) { + if (!COMPLETE_TYPE_P (type)) + { + if (complain & tf_error) + error ("value-initialization of incomplete type %qT", type); + return error_mark_node; + } if (CLASS_TYPE_P (type)) { gcc_assert (!TYPE_NEEDS_CONSTRUCTING (type)); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3bfeedb5a73..2d37cba75c9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-12-16 Jason Merrill + + PR c++/51416 + * g++.dg/cpp0x/auto31.C: New. + 2011-12-16 Jason Merrill PR c++/51331 diff --git a/gcc/testsuite/g++.dg/cpp0x/auto31.C b/gcc/testsuite/g++.dg/cpp0x/auto31.C new file mode 100644 index 00000000000..2c74b72df4a --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/auto31.C @@ -0,0 +1,12 @@ +// PR c++/51416 +// { dg-options "-std=c++0x" } + +template void foo(T, U... u) +{ + auto foo(u...); // { dg-error "auto" } +} + +void bar() +{ + foo(0); +} diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic103.C b/gcc/testsuite/g++.dg/cpp0x/variadic103.C index 6d12331d000..9d6b5ea20b8 100644 --- a/gcc/testsuite/g++.dg/cpp0x/variadic103.C +++ b/gcc/testsuite/g++.dg/cpp0x/variadic103.C @@ -5,7 +5,7 @@ T&& create(); template void test() { - T t(create()...); // { dg-error "unknown bound" } + T t(create()...); // { dg-error "incomplete" } (void) t; } -- cgit v1.2.3 From e41e29e6a11aad2f2c220a561a03d369265a8d31 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Sat, 17 Dec 2011 13:52:10 +0000 Subject: fix rv-cast[34].C git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182437 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/g++.dg/cpp0x/rv-cast3.C | 3 ++- gcc/testsuite/g++.dg/cpp0x/rv-cast4.C | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-cast3.C b/gcc/testsuite/g++.dg/cpp0x/rv-cast3.C index 6c70324aa81..e7d5b6d3419 100644 --- a/gcc/testsuite/g++.dg/cpp0x/rv-cast3.C +++ b/gcc/testsuite/g++.dg/cpp0x/rv-cast3.C @@ -1,5 +1,6 @@ // PR c++/51406 -// { dg-do run { target c++11 } } +// { dg-do run } +// { dg-options "-std=c++0x" } extern "C" int printf(const char *,...); extern "C" void abort(); diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-cast4.C b/gcc/testsuite/g++.dg/cpp0x/rv-cast4.C index 13f369d6108..8f4a56bf976 100644 --- a/gcc/testsuite/g++.dg/cpp0x/rv-cast4.C +++ b/gcc/testsuite/g++.dg/cpp0x/rv-cast4.C @@ -1,5 +1,5 @@ // PR c++/51161 -// { dg-do compile { target c++11 } } +// { dg-options "-std=c++0x" } struct A{}; struct B : A{}; -- cgit v1.2.3 From b065c4ef317bdf664515253cbac1ec28b126e951 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sun, 18 Dec 2011 00:18:09 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182450 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 353192cbc7b..042f06204cd 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111217 +20111218 -- cgit v1.2.3 From 53029dbfac321e8dc6b0a398f14222fb7dbea905 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Sun, 18 Dec 2011 10:03:44 +0000 Subject: * configure: Regenerate. config/ * acx.m4 (Test for GNAT): Update comment and add quotes in final test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182458 138bc75d-0d04-0410-961f-82ee72b054a4 --- ChangeLog | 4 ++++ config/ChangeLog | 4 ++++ config/acx.m4 | 8 ++++---- configure | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 06c3ef63ee8..39c8731ea3f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-12-18 Eric Botcazou + + * configure: Regenerate. + 2011-11-20 Andreas Tobler * libtool.m4: Additional FreeBSD 10 fixes. diff --git a/config/ChangeLog b/config/ChangeLog index c05876f6b9a..3c92ff460a3 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,7 @@ +2011-12-18 Eric Botcazou + + * acx.m4 (Test for GNAT): Update comment and add quotes in final test. + 2011-10-26 Release Manager * GCC 4.6.2 released. diff --git a/config/acx.m4 b/config/acx.m4 index b559c03ebdf..9ff31eb85f3 100644 --- a/config/acx.m4 +++ b/config/acx.m4 @@ -356,9 +356,9 @@ m4_define([AC_CHECK_HEADER],m4_defn([_AC_CHECK_HEADER_OLD])) ac_c_preproc_warn_flag=yes])# AC_PROG_CPP_WERROR # Test for GNAT. -# We require the gnatbind program, and a compiler driver that -# understands Ada. We use the user's CC setting, already found, -# and possibly add $1 to the command-line parameters. +# We require the gnatbind & gnatmake programs, as well as a compiler driver +# that understands Ada. We use the user's CC setting, already found, and +# possibly add $1 to the command-line parameters. # # Sets the shell variable have_gnat to yes or no as appropriate, and # substitutes GNATBIND and GNATMAKE. @@ -387,7 +387,7 @@ if test x"$errors" = x && test -f conftest.$ac_objext; then fi rm -f conftest.*]) -if test x$GNATBIND != xno && test x$GNATMAKE != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then +if test "x$GNATBIND" != xno && test "x$GNATMAKE" != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then have_gnat=yes else have_gnat=no diff --git a/configure b/configure index f41f6d9fbbb..6be5e9d2b60 100755 --- a/configure +++ b/configure @@ -5117,7 +5117,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_cc_gcc_supports_ada" >&5 $as_echo "$acx_cv_cc_gcc_supports_ada" >&6; } -if test x$GNATBIND != xno && test x$GNATMAKE != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then +if test "x$GNATBIND" != xno && test "x$GNATMAKE" != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then have_gnat=yes else have_gnat=no -- cgit v1.2.3 From e12efe1f0cfbc006b781e838d9b719ec5049c57c Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Sun, 18 Dec 2011 22:33:15 +0000 Subject: PR libstdc++/51540 * include/bits/stl_numeric.h (partial_sum): Adjust doxygen comments. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182461 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 5 +++++ libstdc++-v3/include/bits/stl_numeric.h | 13 +++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 1c4cbfa9f0f..62a2d4c18e9 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2011-12-18 Jonathan Wakely + + PR libstdc++/51540 + * include/bits/stl_numeric.h (partial_sum): Adjust doxygen comments. + 2011-11-20 Andreas Tobler * configure: Regenerate. diff --git a/libstdc++-v3/include/bits/stl_numeric.h b/libstdc++-v3/include/bits/stl_numeric.h index 1b6998d9735..6cbc6d2fe08 100644 --- a/libstdc++-v3/include/bits/stl_numeric.h +++ b/libstdc++-v3/include/bits/stl_numeric.h @@ -222,10 +222,10 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO /** * @brief Return list of partial sums * - * Accumulates the values in the range [first,last) using operator+(). + * Accumulates the values in the range [first,last) using the @c + operator. * As each successive input value is added into the total, that partial sum - * is written to @a result. Therefore, the first value in result is the - * first value of the input, the second value in result is the sum of the + * is written to @p result. Therefore, the first value in @p result is the + * first value of the input, the second value in @p result is the sum of the * first and second input values, and so on. * * @param first Start of input range. @@ -261,15 +261,16 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO /** * @brief Return list of partial sums * - * Accumulates the values in the range [first,last) using operator+(). + * Accumulates the values in the range [first,last) using @p binary_op. * As each successive input value is added into the total, that partial sum - * is written to @a result. Therefore, the first value in result is the - * first value of the input, the second value in result is the sum of the + * is written to @a result. Therefore, the first value in @p result is the + * first value of the input, the second value in @p result is the sum of the * first and second input values, and so on. * * @param first Start of input range. * @param last End of input range. * @param result Output to write sums to. + * @param binary_op Function object. * @return Iterator pointing just beyond the values written to result. */ template Date: Mon, 19 Dec 2011 00:18:06 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182465 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 042f06204cd..59998ba84f3 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111218 +20111219 -- cgit v1.2.3 From 1ef4675cdb5d0c6eb82f30e541f5917c36b828b3 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 19 Dec 2011 00:34:29 +0000 Subject: PR libstdc++/50862 * include/std/condition_variable (condition_variable_any::wait): Fix deadlock and ensure _Lock::lock() is called on exit. * testsuite/30_threads/condition_variable_any/50862.cc: New. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182467 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 7 ++ libstdc++-v3/include/std/condition_variable | 23 +++++-- .../30_threads/condition_variable_any/50862.cc | 80 ++++++++++++++++++++++ 3 files changed, 106 insertions(+), 4 deletions(-) create mode 100644 libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 62a2d4c18e9..5978d7b7a06 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2011-12-19 Jonathan Wakely + + PR libstdc++/50862 + * include/std/condition_variable (condition_variable_any::wait): Fix + deadlock and ensure _Lock::lock() is called on exit. + * testsuite/30_threads/condition_variable_any/50862.cc: New. + 2011-12-18 Jonathan Wakely PR libstdc++/51540 diff --git a/libstdc++-v3/include/std/condition_variable b/libstdc++-v3/include/std/condition_variable index a0a3c08794a..ff65dc49ce4 100644 --- a/libstdc++-v3/include/std/condition_variable +++ b/libstdc++-v3/include/std/condition_variable @@ -198,10 +198,25 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION void wait(_Lock& __lock) { - unique_lock __my_lock(_M_mutex); - __lock.unlock(); - _M_cond.wait(__my_lock); - __lock.lock(); + // scoped unlock - unlocks in ctor, re-locks in dtor + struct _Unlock { + explicit _Unlock(_Lock& __lk) : _M_lock(__lk) { __lk.unlock(); } + ~_Unlock() noexcept(false) + { + if (uncaught_exception()) + __try { _M_lock.lock(); } __catch(...) { } + else + _M_lock.lock(); + } + _Lock& _M_lock; + }; + + unique_lock __my_lock(_M_mutex); + _Unlock __unlock(__lock); + // _M_mutex must be unlocked before re-locking __lock so move + // ownership of _M_mutex lock to an object with shorter lifetime. + unique_lock __my_lock2(std::move(__my_lock)); + _M_cond.wait(__my_lock2); } diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc b/libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc new file mode 100644 index 00000000000..b85a5e13626 --- /dev/null +++ b/libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc @@ -0,0 +1,80 @@ +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } } +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } } +// { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } +// { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } +// { dg-require-cstdint "" } +// { dg-require-gthreads "" } +// { dg-require-sched-yield "" } + +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +#include +#include +#include +#include +#include + +struct scoped_thread +{ + ~scoped_thread() { if (t.joinable()) t.join(); } + std::thread t; +}; + +int main() +{ + typedef std::unique_lock Lock; + + std::mutex m; + std::condition_variable_any cond; + unsigned int product = 0; + const unsigned int count = 10; + + // writing to stream causes timing changes which makes deadlock easier + // to reproduce - do not remove + std::ostringstream out; + + // create consumers + std::array threads; + for (std::size_t i = 0; i < threads.size(); ++i) + threads[i].t + = std::thread( [&] + { + for (unsigned int i = 0; i < count; ++i) + { + std::this_thread::yield(); + Lock lock(m); + while(product == 0) + cond.wait(lock); + out << "got product " + << std::this_thread::get_id() + << ' ' << product << std::endl; + --product; + } + } ); + + // single producer + for (std::size_t i = 0; i < threads.size() * count; ++i) + { + std::this_thread::yield(); + Lock lock(m); + ++product; + out << "setting product " << std::this_thread::get_id() + << ' ' << product << std::endl; + cond.notify_one(); + } +} -- cgit v1.2.3 From 01ef08bc0809842f6e6d8e2a3c4c5d8e94e5c2b8 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 19 Dec 2011 01:49:08 +0000 Subject: Backport from mainline 2011-11-13 Paolo Carlini * include/c_global/cmath (atan2, pow): Simplify constraining on the return type. Backport from mainline 2011-11-12 Jonathan Wakely PR libstdc++/51083 * include/ext/type_traits.h (__promote): Only define __type member for integral and floating point types, to prevent math functions participating in overload resolution for other types. (__promote_2, __promote_3, __promote_4): Use __promote in default template argument values, so deduction only succeeds for integral and floating point types. * testsuite/26_numerics/cmath/51083.cc: New. * testsuite/26_numerics/complex/51083.cc: New. * testsuite/tr1/8_c_compatibility/cmath/51083.cc: New. * testsuite/tr1/8_c_compatibility/complex/51083.cc: New. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182468 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 23 ++++++++ libstdc++-v3/include/c_global/cmath | 10 +--- libstdc++-v3/include/ext/type_traits.h | 56 ++++++++++--------- libstdc++-v3/testsuite/26_numerics/cmath/51083.cc | 62 ++++++++++++++++++++++ .../testsuite/26_numerics/complex/51083.cc | 54 +++++++++++++++++++ .../testsuite/tr1/8_c_compatibility/cmath/51083.cc | 62 ++++++++++++++++++++++ .../tr1/8_c_compatibility/complex/51083.cc | 54 +++++++++++++++++++ 7 files changed, 288 insertions(+), 33 deletions(-) create mode 100644 libstdc++-v3/testsuite/26_numerics/cmath/51083.cc create mode 100644 libstdc++-v3/testsuite/26_numerics/complex/51083.cc create mode 100644 libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/51083.cc create mode 100644 libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/51083.cc diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 5978d7b7a06..153a5cebb18 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,26 @@ +2011-12-19 Jonathan Wakely + + Backport from mainline + 2011-11-13 Paolo Carlini + + * include/c_global/cmath (atan2, pow): Simplify constraining on the + return type. + + Backport from mainline + 2011-11-12 Jonathan Wakely + + PR libstdc++/51083 + * include/ext/type_traits.h (__promote): Only define __type member + for integral and floating point types, to prevent math functions + participating in overload resolution for other types. + (__promote_2, __promote_3, __promote_4): Use __promote in default + template argument values, so deduction only succeeds for integral and + floating point types. + * testsuite/26_numerics/cmath/51083.cc: New. + * testsuite/26_numerics/complex/51083.cc: New. + * testsuite/tr1/8_c_compatibility/cmath/51083.cc: New. + * testsuite/tr1/8_c_compatibility/complex/51083.cc: New. + 2011-12-19 Jonathan Wakely PR libstdc++/50862 diff --git a/libstdc++-v3/include/c_global/cmath b/libstdc++-v3/include/c_global/cmath index a333eb583c0..764f342d9d3 100644 --- a/libstdc++-v3/include/c_global/cmath +++ b/libstdc++-v3/include/c_global/cmath @@ -156,10 +156,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template inline - typename __gnu_cxx::__promote_2< - typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value - && __is_arithmetic<_Up>::__value, - _Tp>::__type, _Up>::__type + typename __gnu_cxx::__promote_2<_Tp, _Up>::__type atan2(_Tp __y, _Up __x) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; @@ -374,10 +371,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template inline - typename __gnu_cxx::__promote_2< - typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value - && __is_arithmetic<_Up>::__value, - _Tp>::__type, _Up>::__type + typename __gnu_cxx::__promote_2<_Tp, _Up>::__type pow(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; diff --git a/libstdc++-v3/include/ext/type_traits.h b/libstdc++-v3/include/ext/type_traits.h index 92747268a06..b0fa36bcec8 100644 --- a/libstdc++-v3/include/ext/type_traits.h +++ b/libstdc++-v3/include/ext/type_traits.h @@ -161,44 +161,50 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __promote { typedef double __type; }; + // No nested __type member for non-integer non-floating point types, + // allows this type to be used for SFINAE to constrain overloads in + // and to only the intended types. template struct __promote<_Tp, false> - { typedef _Tp __type; }; + { }; + + template<> + struct __promote + { typedef long double __type; }; + + template<> + struct __promote + { typedef double __type; }; + + template<> + struct __promote + { typedef float __type; }; - template + template::__type, + typename _Up2 = typename __promote<_Up>::__type> struct __promote_2 { - private: - typedef typename __promote<_Tp>::__type __type1; - typedef typename __promote<_Up>::__type __type2; - - public: - typedef __typeof__(__type1() + __type2()) __type; + typedef __typeof__(_Tp2() + _Up2()) __type; }; - template + template::__type, + typename _Up2 = typename __promote<_Up>::__type, + typename _Vp2 = typename __promote<_Vp>::__type> struct __promote_3 { - private: - typedef typename __promote<_Tp>::__type __type1; - typedef typename __promote<_Up>::__type __type2; - typedef typename __promote<_Vp>::__type __type3; - - public: - typedef __typeof__(__type1() + __type2() + __type3()) __type; + typedef __typeof__(_Tp2() + _Up2() + _Vp2()) __type; }; - template + template::__type, + typename _Up2 = typename __promote<_Up>::__type, + typename _Vp2 = typename __promote<_Vp>::__type, + typename _Wp2 = typename __promote<_Wp>::__type> struct __promote_4 { - private: - typedef typename __promote<_Tp>::__type __type1; - typedef typename __promote<_Up>::__type __type2; - typedef typename __promote<_Vp>::__type __type3; - typedef typename __promote<_Wp>::__type __type4; - - public: - typedef __typeof__(__type1() + __type2() + __type3() + __type4()) __type; + typedef __typeof__(_Tp2() + _Up2() + _Vp2() + _Wp2()) __type; }; _GLIBCXX_END_NAMESPACE_VERSION diff --git a/libstdc++-v3/testsuite/26_numerics/cmath/51083.cc b/libstdc++-v3/testsuite/26_numerics/cmath/51083.cc new file mode 100644 index 00000000000..8ba9b10e5d8 --- /dev/null +++ b/libstdc++-v3/testsuite/26_numerics/cmath/51083.cc @@ -0,0 +1,62 @@ +// { dg-options "-std=gnu++0x" } +// +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +#include + +namespace a +{ + template class Mat { }; + + template struct Mat2 : Mat { }; + + template + int fdim(Mat) { return 1; } + + template + int floor(Mat, U) { return 1; } + template + int floor(T, Mat) { return 1; } + + template + int fma(Mat, U, V) { return 1; } + template + int fma(T, Mat, V) { return 1; } + template + int fma(T, U, Mat) { return 1; } +} + +int main() +{ + int __attribute__((unused)) i; + + using namespace std; + + a::Mat2 c; + i = fdim(c); + i = floor(c, 0.); + i = floor(0., c); + i = floor(c, 1); + i = floor(1, c); + i = fma(c, 0., 1.); + i = fma(0., c, 1.); + i = fma(0., 1., c); + i = fma(c, 0., 1); + i = fma(0., c, 1); + i = fma(0., 1, c); +} diff --git a/libstdc++-v3/testsuite/26_numerics/complex/51083.cc b/libstdc++-v3/testsuite/26_numerics/complex/51083.cc new file mode 100644 index 00000000000..54e781ba1a0 --- /dev/null +++ b/libstdc++-v3/testsuite/26_numerics/complex/51083.cc @@ -0,0 +1,54 @@ +// { dg-options "-std=gnu++0x" } +// +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +#include + +namespace a +{ + template class Mat { }; + + template struct Mat2 : Mat { }; + + template int arg(Mat) { return 1; } + template int conj(Mat) { return 1; } + template int imag(Mat) { return 1; } + template int norm(Mat) { return 1; } + template int proj(Mat) { return 1; } + template int real(Mat) { return 1; } + + template int pow(Mat, U) { return 1; } + template int pow(T, Mat) { return 1; } +} + +int main() +{ + int __attribute__((unused)) i; + + using namespace std; + + a::Mat2< std::complex > c; + i = arg(c); + i = conj(c); + i = imag(c); + i = norm(c); + i = proj(c); + i = real(c); + i = pow(std::complex(), c); + i = pow(c, std::complex()); +} diff --git a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/51083.cc b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/51083.cc new file mode 100644 index 00000000000..504305a3043 --- /dev/null +++ b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/51083.cc @@ -0,0 +1,62 @@ +// { dg-options "-std=gnu++0x" } +// +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +#include + +namespace a +{ + template class Mat { }; + + template struct Mat2 : Mat { }; + + template + int fdim(Mat) { return 1; } + + template + int floor(Mat, U) { return 1; } + template + int floor(T, Mat) { return 1; } + + template + int fma(Mat, U, V) { return 1; } + template + int fma(T, Mat, V) { return 1; } + template + int fma(T, U, Mat) { return 1; } +} + +int main() +{ + int __attribute__((unused)) i; + + using namespace std::tr1; + + a::Mat2 c; + i = fdim(c); + i = floor(c, 0.); + i = floor(0., c); + i = floor(c, 1); + i = floor(1, c); + i = fma(c, 0., 1.); + i = fma(0., c, 1.); + i = fma(0., 1., c); + i = fma(c, 0., 1); + i = fma(0., c, 1); + i = fma(0., 1, c); +} diff --git a/libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/51083.cc b/libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/51083.cc new file mode 100644 index 00000000000..f41914ee91e --- /dev/null +++ b/libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/51083.cc @@ -0,0 +1,54 @@ +// { dg-options "-std=gnu++0x" } +// +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +#include + +namespace a +{ + template class Mat { }; + + template struct Mat2 : Mat { }; + + template int arg(Mat) { return 1; } + template int conj(Mat) { return 1; } + template int imag(Mat) { return 1; } + template int norm(Mat) { return 1; } + template int proj(Mat) { return 1; } + template int real(Mat) { return 1; } + + template int pow(Mat, U) { return 1; } + template int pow(T, Mat) { return 1; } +} + +int main() +{ + int __attribute__((unused)) i; + + using namespace std::tr1; + + a::Mat2< std::complex > c; + i = arg(c); + i = conj(c); + i = imag(c); + i = norm(c); + i = proj(c); + i = real(c); + i = pow(std::complex(), c); + i = pow(c, std::complex()); +} -- cgit v1.2.3 From 3a730cb30d2aa2ce309557699a711a9bd4233625 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 19 Dec 2011 01:57:20 +0000 Subject: * include/c_global/cmath: Update copyright years. * include/ext/type_traits.h: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182469 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 5 +++++ libstdc++-v3/include/c_global/cmath | 2 +- libstdc++-v3/include/ext/type_traits.h | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 153a5cebb18..7410a872f3e 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2011-12-19 Jonathan Wakely + + * include/c_global/cmath: Update copyright years. + * include/ext/type_traits.h: Likewise. + 2011-12-19 Jonathan Wakely Backport from mainline diff --git a/libstdc++-v3/include/c_global/cmath b/libstdc++-v3/include/c_global/cmath index 764f342d9d3..3d9c2d62348 100644 --- a/libstdc++-v3/include/c_global/cmath +++ b/libstdc++-v3/include/c_global/cmath @@ -1,7 +1,7 @@ // -*- C++ -*- C forwarding header. // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -// 2006, 2007, 2008, 2009, 2010 +// 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free diff --git a/libstdc++-v3/include/ext/type_traits.h b/libstdc++-v3/include/ext/type_traits.h index b0fa36bcec8..51db03ec73d 100644 --- a/libstdc++-v3/include/ext/type_traits.h +++ b/libstdc++-v3/include/ext/type_traits.h @@ -1,6 +1,7 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007, 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 -- cgit v1.2.3 From 0985f548f3129a84654dee86fa3c447a4fb1c554 Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Mon, 19 Dec 2011 16:47:28 +0000 Subject: 2011-12-19 Martin Jambor PR tree-optimization/51583 * tree-sra.c (load_assign_lhs_subreplacements): Call force_gimple_operand_gsi when necessary also in case of no corresponding replacement on the RHS. * testsuite/gcc.dg/tree-ssa/pr51583.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182488 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/tree-ssa/pr51583.c | 34 +++++++++++++++++++++++++++++++++ gcc/tree-sra.c | 3 +++ 4 files changed, 49 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr51583.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4539e4edf34..40403b9fed7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2011-12-19 Martin Jambor + + PR tree-optimization/51583 + * tree-sra.c (load_assign_lhs_subreplacements): Call + force_gimple_operand_gsi when necessary also in case of no + corresponding replacement on the RHS. + 2011-12-16 Eric Botcazou * config/sparc/sparc.md (UNSPEC_FRAME_BLOCKAGE): New constant. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2d37cba75c9..6071d1f609b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-12-19 Martin Jambor + + PR tree-optimization/51583 + * gcc.dg/tree-ssa/pr51583.c: New test. + 2011-12-16 Jason Merrill PR c++/51416 diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr51583.c b/gcc/testsuite/gcc.dg/tree-ssa/pr51583.c new file mode 100644 index 00000000000..2c4ec4723c4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr51583.c @@ -0,0 +1,34 @@ +/* { dg-do compile } */ +/* { dg-options "-O1" } */ + +typedef __complex__ double Value; + +union U +{ + Value v; + char c[sizeof(Value)]; +}; + +struct S +{ + union U u; + int i,j; +}; + +Value gv; +int gi, gj; + +Value foo (void) +{ + struct S s,t; + + t.i = gi; + t.j = gj; + t.u.v = gv; + t.u.c[0] = 0; + + s = t; + __imag__ s.u.v += s.i; + + return s.u.v; +} diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index cb91dc4129a..756fe74bd52 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -2655,6 +2655,9 @@ load_assign_lhs_subreplacements (struct access *lacc, struct access *top_racc, else rhs = build_ref_for_model (loc, top_racc->base, offset, lacc, new_gsi, true); + if (lacc->grp_partial_lhs) + rhs = force_gimple_operand_gsi (new_gsi, rhs, true, NULL_TREE, + false, GSI_NEW_STMT); } stmt = gimple_build_assign (get_access_replacement (lacc), rhs); -- cgit v1.2.3 From e5361933f15bbd1ab6f457cea57eb62b7598c412 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 19 Dec 2011 22:24:24 +0000 Subject: * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Adjust dg-error line numbers. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Likewise. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Likewise. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182507 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 8 ++++++++ .../testsuite/ext/type_traits/add_unsigned_floating_neg.cc | 2 +- .../testsuite/ext/type_traits/add_unsigned_integer_neg.cc | 2 +- .../testsuite/ext/type_traits/remove_unsigned_floating_neg.cc | 2 +- .../testsuite/ext/type_traits/remove_unsigned_integer_neg.cc | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 7410a872f3e..4da64988d4c 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,11 @@ +2011-12-19 Jonathan Wakely + + * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Adjust + dg-error line numbers. + * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Likewise. + * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Likewise. + * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Likewise. + 2011-12-19 Jonathan Wakely * include/c_global/cmath: Update copyright years. diff --git a/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_floating_neg.cc b/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_floating_neg.cc index 98202bdb867..3e46b8538a5 100644 --- a/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_floating_neg.cc +++ b/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_floating_neg.cc @@ -35,4 +35,4 @@ int main() } // { dg-error "instantiated from" "" { target *-*-* } 28 } -// { dg-error "no type" "" { target *-*-* } 69 } +// { dg-error "no type" "" { target *-*-* } 70 } diff --git a/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_integer_neg.cc b/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_integer_neg.cc index f08c879e5a8..59bc1015305 100644 --- a/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_integer_neg.cc +++ b/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_integer_neg.cc @@ -36,4 +36,4 @@ int main() } // { dg-error "invalid use of incomplete" "" { target *-*-* } 28 } -// { dg-error "declaration of" "" { target *-*-* } 63 } +// { dg-error "declaration of" "" { target *-*-* } 64 } diff --git a/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_floating_neg.cc b/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_floating_neg.cc index 486baad93b7..291ef7554dd 100644 --- a/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_floating_neg.cc +++ b/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_floating_neg.cc @@ -35,4 +35,4 @@ int main() } // { dg-error "instantiated from" "" { target *-*-* } 28 } -// { dg-error "no type" "" { target *-*-* } 112 } +// { dg-error "no type" "" { target *-*-* } 113 } diff --git a/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_integer_neg.cc b/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_integer_neg.cc index 1ad1d93bfb9..0f79877f72d 100644 --- a/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_integer_neg.cc +++ b/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_integer_neg.cc @@ -36,4 +36,4 @@ int main() } // { dg-error "invalid use of incomplete" "" { target *-*-* } 28 } -// { dg-error "declaration of" "" { target *-*-* } 106 } +// { dg-error "declaration of" "" { target *-*-* } 107 } -- cgit v1.2.3 From 5ca0182bb8e8be007558391aa081084b487a5a72 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Tue, 20 Dec 2011 00:18:24 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182515 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 59998ba84f3..5aaced66418 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111219 +20111220 -- cgit v1.2.3 From 6f642cfc0525fc545157a46a8d5b5734de140307 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Wed, 21 Dec 2011 00:18:40 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182559 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 5aaced66418..cffd6cde015 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111220 +20111221 -- cgit v1.2.3 From 72d66c321ec3ee2e66fee4f2c447dfacd5ab60a3 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Wed, 21 Dec 2011 12:22:48 +0000 Subject: * config/alpha/linux-unwind.h: Update copyright years. (MD_FROB_UPDATE_CONTEXT): New define. (alpha_frob_update_context): New function. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182579 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/config/alpha/linux-unwind.h | 31 +++++++++++++++++++++++++------ 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 40403b9fed7..f463bc9fe48 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-12-21 Uros Bizjak + + * config/alpha/linux-unwind.h: Update copyright years. + (MD_FROB_UPDATE_CONTEXT): New define. + (alpha_frob_update_context): New function. + 2011-12-19 Martin Jambor PR tree-optimization/51583 diff --git a/gcc/config/alpha/linux-unwind.h b/gcc/config/alpha/linux-unwind.h index 629d557c46c..4c811dca4bf 100644 --- a/gcc/config/alpha/linux-unwind.h +++ b/gcc/config/alpha/linux-unwind.h @@ -1,5 +1,5 @@ /* DWARF2 EH unwinding support for Alpha Linux. - Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2009, 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -36,16 +36,17 @@ alpha_fallback_frame_state (struct _Unwind_Context *context, { unsigned int *pc = context->ra; struct sigcontext *sc; - long new_cfa, i; + long new_cfa; + int i; if (pc[0] != 0x47fe0410 /* mov $30,$16 */ - || pc[2] != 0x00000083 /* callsys */) + || pc[2] != 0x00000083) /* callsys */ return _URC_END_OF_STACK; if (context->cfa == 0) return _URC_END_OF_STACK; if (pc[1] == 0x201f0067) /* lda $0,NR_sigreturn */ sc = context->cfa; - else if (pc[1] == 0x201f015f) /* lda $0,NR_rt_sigreturn */ + else if (pc[1] == 0x201f015f) /* lda $0,NR_rt_sigreturn */ { struct rt_sigframe { struct siginfo info; @@ -55,6 +56,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context, } else return _URC_END_OF_STACK; + new_cfa = sc->sc_regs[30]; fs->regs.cfa_how = CFA_REG_OFFSET; fs->regs.cfa_reg = 30; @@ -63,13 +65,13 @@ alpha_fallback_frame_state (struct _Unwind_Context *context, { fs->regs.reg[i].how = REG_SAVED_OFFSET; fs->regs.reg[i].loc.offset - = (long)&sc->sc_regs[i] - new_cfa; + = (long) &sc->sc_regs[i] - new_cfa; } for (i = 0; i < 31; ++i) { fs->regs.reg[i+32].how = REG_SAVED_OFFSET; fs->regs.reg[i+32].loc.offset - = (long)&sc->sc_fpregs[i] - new_cfa; + = (long) &sc->sc_fpregs[i] - new_cfa; } fs->regs.reg[64].how = REG_SAVED_OFFSET; fs->regs.reg[64].loc.offset = (long)&sc->sc_pc - new_cfa; @@ -78,3 +80,20 @@ alpha_fallback_frame_state (struct _Unwind_Context *context, return _URC_NO_REASON; } + +#define MD_FROB_UPDATE_CONTEXT alpha_frob_update_context + +/* Fix up for signal handlers that don't have S flag set. */ + +static void +alpha_frob_update_context (struct _Unwind_Context *context, + _Unwind_FrameState *fs ATTRIBUTE_UNUSED) +{ + unsigned int *pc = context->ra; + + if (pc[0] == 0x47fe0410 /* mov $30,$16 */ + && pc[2] == 0x00000083 /* callsys */ + && (pc[1] == 0x201f0067 /* lda $0,NR_sigreturn */ + || pc[1] == 0x201f015f)) /* lda $0,NR_rt_sigreturn */ + _Unwind_SetSignalFrame (context, 1); +} -- cgit v1.2.3 From 2b2d22d3020a0e2c2f5f8f24c81210cbb250d5b7 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Wed, 21 Dec 2011 12:26:04 +0000 Subject: Backport from mainline 2011-12-21 Richard Guenther PR lto/41159 * tree-outof-ssa.c (insert_value_copy_on_edge): Use the mode of the pseudo as destination mode. Only assert that is equal to the promoted mode of the decl if it is a REG. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182580 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 10 ++++++++++ gcc/tree-outof-ssa.c | 5 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f463bc9fe48..a11ac8a7779 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2011-12-21 Uros Bizjak + + Backport from mainline + 2011-12-21 Richard Guenther + + PR lto/41159 + * tree-outof-ssa.c (insert_value_copy_on_edge): Use the + mode of the pseudo as destination mode. Only assert that + is equal to the promoted mode of the decl if it is a REG. + 2011-12-21 Uros Bizjak * config/alpha/linux-unwind.h: Update copyright years. diff --git a/gcc/tree-outof-ssa.c b/gcc/tree-outof-ssa.c index 4de45001e67..e912d458330 100644 --- a/gcc/tree-outof-ssa.c +++ b/gcc/tree-outof-ssa.c @@ -237,9 +237,10 @@ insert_value_copy_on_edge (edge e, int dest, tree src, source_location locus) var = SSA_NAME_VAR (partition_to_var (SA.map, dest)); src_mode = TYPE_MODE (TREE_TYPE (src)); - dest_mode = promote_decl_mode (var, &unsignedp); + dest_mode = GET_MODE (SA.partition_to_pseudo[dest]); gcc_assert (src_mode == TYPE_MODE (TREE_TYPE (var))); - gcc_assert (dest_mode == GET_MODE (SA.partition_to_pseudo[dest])); + gcc_assert (!REG_P (SA.partition_to_pseudo[dest]) + || dest_mode == promote_decl_mode (var, &unsignedp)); if (src_mode != dest_mode) { -- cgit v1.2.3 From 8035f794661c1a89edf8296f14da5d20d6daa7f9 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Wed, 21 Dec 2011 18:35:40 +0000 Subject: PR libstdc++/51626 * include/bits/stl_uninitialized.h (_Construct_default_a_impl): Define overloaded functions to conditionally use allocator::construct. (_Construct_default_a): Define to dispatch to appropriate _Construct_default_a_impl overload. (__uninitialized_default_a, __uninitialized_default_n_a): Use _Construct_default_a. * testsuite/20_util/allocator/51626.cc: New. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182600 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 11 ++++ libstdc++-v3/include/bits/stl_uninitialized.h | 21 ++++++-- libstdc++-v3/testsuite/20_util/allocator/51626.cc | 66 +++++++++++++++++++++++ 3 files changed, 95 insertions(+), 3 deletions(-) create mode 100644 libstdc++-v3/testsuite/20_util/allocator/51626.cc diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 4da64988d4c..7c3255590be 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,14 @@ +2011-12-19 Jonathan Wakely + + PR libstdc++/51626 + * include/bits/stl_uninitialized.h (_Construct_default_a_impl): Define + overloaded functions to conditionally use allocator::construct. + (_Construct_default_a): Define to dispatch to appropriate + _Construct_default_a_impl overload. + (__uninitialized_default_a, __uninitialized_default_n_a): Use + _Construct_default_a. + * testsuite/20_util/allocator/51626.cc: New. + 2011-12-19 Jonathan Wakely * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Adjust diff --git a/libstdc++-v3/include/bits/stl_uninitialized.h b/libstdc++-v3/include/bits/stl_uninitialized.h index f15be3aee3b..70ce545b86e 100644 --- a/libstdc++-v3/include/bits/stl_uninitialized.h +++ b/libstdc++-v3/include/bits/stl_uninitialized.h @@ -1,7 +1,7 @@ // Raw memory manipulators -*- C++ -*- // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -// 2009, 2010 +// 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -530,6 +530,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __uninit_default_n(__first, __n); } + template + inline auto + _Construct_default_a_impl(_Tp* __ptr, _Allocator& __alloc, void*) + -> decltype(__alloc.construct(__ptr)) + { return __alloc.construct(__ptr); } + + template + inline void + _Construct_default_a_impl(_Tp* __ptr, _Allocator& __alloc, ...) + { _Construct(__ptr); } + + template + inline void + _Construct_default_a(_Tp* __ptr, _Allocator& __alloc) + { _Construct_default_a_impl(__ptr, __alloc, nullptr); } // __uninitialized_default_a // Fills [first, last) with std::distance(first, last) default @@ -544,7 +559,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __try { for (; __cur != __last; ++__cur) - __alloc.construct(std::__addressof(*__cur)); + _Construct_default_a(std::__addressof(*__cur), __alloc); } __catch(...) { @@ -573,7 +588,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __try { for (; __n > 0; --__n, ++__cur) - __alloc.construct(std::__addressof(*__cur)); + _Construct_default_a(std::__addressof(*__cur), __alloc); } __catch(...) { diff --git a/libstdc++-v3/testsuite/20_util/allocator/51626.cc b/libstdc++-v3/testsuite/20_util/allocator/51626.cc new file mode 100644 index 00000000000..951aa18fef4 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/allocator/51626.cc @@ -0,0 +1,66 @@ +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// { dg-options "-std=gnu++0x" } + +#include +#include +#include + +int count = 0; + +template + struct allocator98 : std::allocator + { + template struct rebind { typedef allocator98 other; }; + + allocator98() { } + + template allocator98(const allocator98&) { }; + + void construct(T* p, const T& val) + { + ++count; + std::allocator::construct(p, val); + } + }; + +template + struct allocator11 : std::allocator + { + template struct rebind { typedef allocator11 other; }; + + allocator11() { } + + template allocator11(const allocator11&) { }; + + template + void construct(T* p, Args&&... args) + { + ++count; + std::allocator::construct(p, std::forward(args)...); + } + }; + +int main() +{ + std::vector< int, allocator98 > v98(1); + VERIFY( count == 0 ); + + std::vector< int, allocator11 > v11(1); + VERIFY( count == 1 ); +} -- cgit v1.2.3 From f01eb0b42e7effbbcebdedc477e524ca2f69b7d8 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 22 Dec 2011 00:18:33 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182612 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index cffd6cde015..1ae60785839 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111221 +20111222 -- cgit v1.2.3 From 698c6d4d346836667f1168cb1a9ea60da6a8c56b Mon Sep 17 00:00:00 2001 From: Richard Earnshaw Date: Thu, 22 Dec 2011 14:28:39 +0000 Subject: PR target/51643 * arm.c (arm_function_ok_for_sibcall): Don't try to tailcall a weak function on bare-metal EABI targets. * gcc.target/arm/sibcall-2.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182622 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/config/arm/arm.c | 8 ++++++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/arm/sibcall-2.c | 12 ++++++++++++ 4 files changed, 31 insertions(+) create mode 100644 gcc/testsuite/gcc.target/arm/sibcall-2.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a11ac8a7779..cd22ed46617 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-12-21 Richard Earnshaw + + PR target/51643 + * arm.c (arm_function_ok_for_sibcall): Don't try to tailcall a + weak function on bare-metal EABI targets. + 2011-12-21 Uros Bizjak Backport from mainline diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index b79de0892f0..f271320c80e 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -5077,6 +5077,14 @@ arm_function_ok_for_sibcall (tree decl, tree exp) if (IS_STACKALIGN (func_type)) return false; + /* The AAPCS says that, on bare-metal, calls to unresolved weak + references should become a NOP. Don't convert such calls into + sibling calls. */ + if (TARGET_AAPCS_BASED + && arm_abi == ARM_ABI_AAPCS + && lookup_attribute ("weak", DECL_ATTRIBUTES (decl))) + return false; + /* Everything else is ok. */ return true; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6071d1f609b..86ca26fccf4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-12-21 Richard Earnshaw + + PR target/51643 + * gcc.target/arm/sibcall-2.c: New test. + 2011-12-19 Martin Jambor PR tree-optimization/51583 diff --git a/gcc/testsuite/gcc.target/arm/sibcall-2.c b/gcc/testsuite/gcc.target/arm/sibcall-2.c new file mode 100644 index 00000000000..921c0f30284 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/sibcall-2.c @@ -0,0 +1,12 @@ +/* { dg-require-effective-target arm_eabi } */ +/* { dg-do compile } */ +/* { dg-options "-O2 -mabi=aapcs" } */ + + +extern void __attribute__((weak)) wfunc(void); +void main(void) +{ + wfunc(); /* Must not tail-call. */ +} + +/* { dg-final { scan-assembler-not "b\[\\t \]+wfunc" } } */ -- cgit v1.2.3 From 6aa5ef042d71035aa8c316141483b5985f30fef1 Mon Sep 17 00:00:00 2001 From: Richard Earnshaw Date: Thu, 22 Dec 2011 17:32:58 +0000 Subject: PR target/51643 * arm.c (arm_function_ok_for_sibcall): Use DECL_WEAK in previous change. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182629 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/config/arm/arm.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cd22ed46617..9135dcfeea6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-12-21 Richard Earnshaw + + PR target/51643 + * arm.c (arm_function_ok_for_sibcall): Use DECL_WEAK in previous + change. + 2011-12-21 Richard Earnshaw PR target/51643 diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index f271320c80e..0683fc63419 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -5082,7 +5082,7 @@ arm_function_ok_for_sibcall (tree decl, tree exp) sibling calls. */ if (TARGET_AAPCS_BASED && arm_abi == ARM_ABI_AAPCS - && lookup_attribute ("weak", DECL_ATTRIBUTES (decl))) + && DECL_WEAK (decl)) return false; /* Everything else is ok. */ -- cgit v1.2.3 From c1802939762f950f98a5efa978f43794d75e9014 Mon Sep 17 00:00:00 2001 From: Toon Moene Date: Thu, 22 Dec 2011 19:23:26 +0000 Subject: 2011-12-22 Toon Moene PR fortran/51310 * resolve.c (build_default_init_expr): Allow non-allocatable, non-compile-time-constant-shape arrays to have a default initializer. * invoke.texi: Delete the restriction on automatic arrays not being initialized by -finit-=. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182634 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 9 +++++++++ gcc/fortran/invoke.texi | 2 -- gcc/fortran/resolve.c | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index c054e70b9e4..503c9bb9ad2 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,12 @@ +2011-12-22 Toon Moene + + PR fortran/51310 + * resolve.c (build_default_init_expr): Allow non-allocatable, + non-compile-time-constant-shape arrays to have a default + initializer. + * invoke.texi: Delete the restriction on automatic arrays not + being initialized by -finit-=. + 2011-12-15 Tobias Burnus PR fortran/51550 diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi index f9d0eb3e5ca..9b53962346e 100644 --- a/gcc/fortran/invoke.texi +++ b/gcc/fortran/invoke.texi @@ -1441,8 +1441,6 @@ the real and imaginary parts of local @code{COMPLEX} variables), value) options. These options do not initialize @itemize @bullet @item -automatic arrays -@item allocatable arrays @item components of derived type variables diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 7414db0c5d5..8d1ef0f1af8 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -9690,7 +9690,7 @@ build_default_init_expr (gfc_symbol *sym) int i; /* These symbols should never have a default initialization. */ - if ((sym->attr.dimension && !gfc_is_compile_time_shape (sym->as)) + if (sym->attr.allocatable || sym->attr.external || sym->attr.dummy || sym->attr.pointer -- cgit v1.2.3 From 96c3f7b77017ed5a0645ff91b8955459210027c6 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Thu, 22 Dec 2011 19:36:46 +0000 Subject: 2011-12-22 Doug Kwan Backport from mainline 2011-03-23 Julian Brown * expr.c (expand_expr_real_1): Only use BLKmode for volatile accesses which are not naturally aligned. 2011-11-20 Joey Ye * expr.c (expand_expr_real_1): Correctly handle strict volatile bitfield loads smaller than mode size. 2011-12-22 Doug Kwan Backport from mainline 2011-11-20 Joey Ye * gcc.dg/volatile-bitfields-1.c: New. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182635 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 13 +++++++++++++ gcc/expr.c | 12 ++++++++++-- gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/gcc.dg/volatile-bitfields-1.c | 23 +++++++++++++++++++++++ 4 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/volatile-bitfields-1.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9135dcfeea6..02d2aa5916a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2011-12-22 Doug Kwan + + Backport from mainline + 2011-03-23 Julian Brown + + * expr.c (expand_expr_real_1): Only use BLKmode for volatile + accesses which are not naturally aligned. + + 2011-11-20 Joey Ye + + * expr.c (expand_expr_real_1): Correctly handle strict volatile + bitfield loads smaller than mode size. + 2011-12-21 Richard Earnshaw PR target/51643 diff --git a/gcc/expr.c b/gcc/expr.c index c4a00aa3f78..6bf9f2489da 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -9189,8 +9189,16 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, && modifier != EXPAND_CONST_ADDRESS && modifier != EXPAND_INITIALIZER) /* If the field is volatile, we always want an aligned - access. */ - || (volatilep && flag_strict_volatile_bitfields > 0) + access. Do this in following two situations: + 1. the access is not already naturally + aligned, otherwise "normal" (non-bitfield) volatile fields + become non-addressable. + 2. the bitsize is narrower than the access size. Need + to extract bitfields from the access. */ + || (volatilep && flag_strict_volatile_bitfields > 0 + && (bitpos % GET_MODE_ALIGNMENT (mode) != 0 + || (mode1 != BLKmode + && bitsize < GET_MODE_SIZE (mode1) * BITS_PER_UNIT))) /* If the field isn't aligned enough to fetch as a memref, fetch it as a bit field. */ || (mode1 != BLKmode diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 86ca26fccf4..24bdfd04928 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2011-12-22 Doug Kwan + + Backport from mainline + 2011-11-20 Joey Ye + + * gcc.dg/volatile-bitfields-1.c: New. + 2011-12-21 Richard Earnshaw PR target/51643 diff --git a/gcc/testsuite/gcc.dg/volatile-bitfields-1.c b/gcc/testsuite/gcc.dg/volatile-bitfields-1.c new file mode 100644 index 00000000000..6adda27fea4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/volatile-bitfields-1.c @@ -0,0 +1,23 @@ +/* { dg-options "-fstrict-volatile-bitfields" } */ +/* { dg-do run } */ + +extern int puts(const char *); +extern void abort(void) __attribute__((noreturn)); + +typedef struct { + volatile unsigned short a:8, b:8; +} BitStruct; + +BitStruct bits = {1, 2}; + +void check(int i, int j) +{ + if (i != 1 || j != 2) puts("FAIL"), abort(); +} + +int main () +{ + check(bits.a, bits.b); + + return 0; +} -- cgit v1.2.3 From c1d8d2a3ffe0add6a18ec2739534a1a79071f272 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Fri, 23 Dec 2011 00:18:14 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182643 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 1ae60785839..c90a05167c1 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111222 +20111223 -- cgit v1.2.3 From 7eb948e95dc6b943b09f3435dbef62e37f6e1485 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Fri, 23 Dec 2011 09:16:08 +0000 Subject: 2011-12-23 Richard Guenther PR rtl-optimization/50396 * simplify-rtx.c (simplify_binary_operation_1): Properly guard code that only works for integers. * gcc.dg/torture/pr50396.c: New testcase. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182654 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/simplify-rtx.c | 2 +- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/torture/pr50396.c | 21 +++++++++++++++++++++ 4 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.dg/torture/pr50396.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 02d2aa5916a..bb71f57f66b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-12-23 Richard Guenther + + PR rtl-optimization/50396 + * simplify-rtx.c (simplify_binary_operation_1): Properly + guard code that only works for integers. + 2011-12-22 Doug Kwan Backport from mainline diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index ed401962201..42b1be60b15 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -2777,7 +2777,7 @@ simplify_binary_operation_1 (enum rtx_code code, enum machine_mode mode, } } } - else + else if (SCALAR_INT_MODE_P (mode)) { /* 0/x is 0 (or x&0 if x has side-effects). */ if (trueop0 == CONST0_RTX (mode) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 24bdfd04928..c923c3f10b9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-12-23 Richard Guenther + + PR rtl-optimization/50396 + * gcc.dg/torture/pr50396.c: New testcase. + 2011-12-22 Doug Kwan Backport from mainline diff --git a/gcc/testsuite/gcc.dg/torture/pr50396.c b/gcc/testsuite/gcc.dg/torture/pr50396.c new file mode 100644 index 00000000000..8e5d008ca01 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr50396.c @@ -0,0 +1,21 @@ +/* { dg-do run } */ + +extern void abort (void); +typedef float vf128 __attribute__((vector_size(16))); +typedef float vf64 __attribute__((vector_size(8))); +int main() +{ +#if !__FINITE_MATH_ONLY__ +#if __FLT_HAS_QUIET_NAN__ + vf128 v = (vf128){ 0.f, 0.f, 0.f, 0.f }; + vf64 u = (vf64){ 0.f, 0.f }; + v = v / (vf128){ 0.f, 0.f, 0.f, 0.f }; + if (v[0] == v[0]) + abort (); + u = u / (vf64){ 0.f, 0.f }; + if (u[0] == u[0]) + abort (); +#endif +#endif + return 0; +} -- cgit v1.2.3 From f06b910b4c79b29aeff09f2cde8ede55bfa888ec Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sat, 24 Dec 2011 00:18:28 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182672 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index c90a05167c1..6ba97abf1ba 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111223 +20111224 -- cgit v1.2.3 From 87670fe766545c4e7c97c0f18a2b8dea178b874c Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sun, 25 Dec 2011 00:18:05 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182679 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 6ba97abf1ba..8aabc36e099 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111224 +20111225 -- cgit v1.2.3 From d2841f8c93643e1267a702b551e40bcace0618ad Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Mon, 26 Dec 2011 00:18:23 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182683 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 8aabc36e099..3b6ab17c5ce 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111225 +20111226 -- cgit v1.2.3 From 919b337d9939d56fc69a9bafdc328ad761060676 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Tue, 27 Dec 2011 00:18:13 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182689 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 3b6ab17c5ce..462920a4e2d 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111226 +20111227 -- cgit v1.2.3 From fb7644ba76abdbac828c35199cd545fa32bfbb96 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Wed, 28 Dec 2011 00:18:33 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182701 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 462920a4e2d..d8a6e0d6016 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111227 +20111228 -- cgit v1.2.3 From 40df7f1b08348e941d8220168186815d9fbfeb95 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Wed, 28 Dec 2011 09:30:16 +0000 Subject: * gcc.dg/torture/pr50396.c: Use dg-add-options ieee. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182707 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.dg/torture/pr50396.c | 1 + 2 files changed, 5 insertions(+) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c923c3f10b9..a33c9977368 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2011-12-28 Uros Bizjak + + * gcc.dg/torture/pr50396.c: Use dg-add-options ieee. + 2011-12-23 Richard Guenther PR rtl-optimization/50396 diff --git a/gcc/testsuite/gcc.dg/torture/pr50396.c b/gcc/testsuite/gcc.dg/torture/pr50396.c index 8e5d008ca01..aa17ebdaa84 100644 --- a/gcc/testsuite/gcc.dg/torture/pr50396.c +++ b/gcc/testsuite/gcc.dg/torture/pr50396.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-add-options ieee } */ extern void abort (void); typedef float vf128 __attribute__((vector_size(16))); -- cgit v1.2.3 From e015bf089e8dc677f3cd4d7be5dbc819955c94cf Mon Sep 17 00:00:00 2001 From: Michael Meissner Date: Wed, 28 Dec 2011 20:53:30 +0000 Subject: Backport PR 51623 change git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182712 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 10 +++ gcc/config/rs6000/rs6000.c | 2 +- gcc/testsuite/ChangeLog | 8 ++ gcc/testsuite/gcc.target/powerpc/pr51623.c | 123 +++++++++++++++++++++++++++++ 4 files changed, 142 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.target/powerpc/pr51623.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bb71f57f66b..679b0b928c9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2011-12-28 Michael Meissner + + Backport from mainline + 2011-12-28 Michael Meissner + + PR target/51623 + * config/rs6000/rs6000.c (rs6000_assemble_integer): Don't call + unlikely_text_section_p. Instead check for being in a code + section. + 2011-12-23 Richard Guenther PR rtl-optimization/50396 diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 2bc90ca17a3..c069629327e 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -16615,7 +16615,7 @@ rs6000_assemble_integer (rtx x, unsigned int size, int aligned_p) if (TARGET_RELOCATABLE && in_section != toc_section && in_section != text_section - && !unlikely_text_section_p (in_section) + && (in_section && (in_section->common.flags & SECTION_CODE)) == 0 && !recurse && GET_CODE (x) != CONST_INT && GET_CODE (x) != CONST_DOUBLE diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a33c9977368..3bef6a78fc1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2011-12-28 Michael Meissner + + Backport from mainline + 2011-12-28 Michael Meissner + + PR target/51623 + * gcc.target/powerpc/pr51623.c: New file. + 2011-12-28 Uros Bizjak * gcc.dg/torture/pr50396.c: Use dg-add-options ieee. diff --git a/gcc/testsuite/gcc.target/powerpc/pr51623.c b/gcc/testsuite/gcc.target/powerpc/pr51623.c new file mode 100644 index 00000000000..37b7d6557a4 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr51623.c @@ -0,0 +1,123 @@ +/* PR target/51623 */ +/* { dg-do compile { target { { powerpc*-*-linux* && ilp32 } || { powerpc-*-eabi* } } } } */ +/* { dg-options "-mrelocatable -ffreestanding" } */ + +/* This generated an error, since the compiler was calling + unlikely_text_section_p in a context where it wasn't valid. */ + +typedef long long loff_t; +typedef unsigned size_t; + + +struct mtd_info { + unsigned writesize; + unsigned oobsize; + const char *name; +}; + +extern int strcmp(const char *,const char *); +extern char * strchr(const char *,int); + +struct cmd_tbl_s { + char *name; +}; + + +int printf(const char *fmt, ...) __attribute__ ((format (__printf__, 1, 2))); +void* malloc(size_t); +void free(void*); + + +extern int nand_curr_device; +extern struct mtd_info nand_info[]; + +static int nand_dump(struct mtd_info *nand, unsigned long off, int only_oob) +{ + int i; + unsigned char *datbuf, *oobbuf, *p; + + datbuf = malloc(nand->writesize + nand->oobsize); + oobbuf = malloc(nand->oobsize); + off &= ~(nand->writesize - 1); + + printf("Page %08lx dump:\n", off); + i = nand->writesize >> 4; + p = datbuf; + + while (i--) { + if (!only_oob) + printf("\t%02x %02x %02x %02x %02x %02x %02x %02x" + " %02x %02x %02x %02x %02x %02x %02x %02x\n", + p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7], + p[8], p[9], p[10], p[11], p[12], p[13], p[14], + p[15]); + p += 16; + } + + i = nand->oobsize >> 3; + free(datbuf); + free(oobbuf); + + return 0; +} + +int do_nand(struct cmd_tbl_s * cmdtp, int flag, int argc, char *argv[]) +{ + int dev; + unsigned long off; + char *cmd, *s; + struct mtd_info *nand; + + if (argc < 2) + goto usage; + + cmd = argv[1]; + + if (strcmp(cmd, "info") == 0) { + putc('\n'); + return 0; + } + + if (strcmp(cmd, "device") == 0) { + if (argc < 3) { + putc('\n'); + } + dev = (int)simple_strtoul(argv[2], ((void *)0), 10); + nand_curr_device = dev; + return 0; + } + + if (strcmp(cmd, "bad") != 0 && strcmp(cmd, "erase") != 0 ) + goto usage; + + if (nand_curr_device < 0 ) { + return 1; + } + nand = &nand_info[nand_curr_device]; + + if (strcmp(cmd, "erase") == 0 || strcmp(cmd, "scrub") == 0) { + int clean = argc > 2 && !strcmp("clean", argv[2]); + int scrub = !strcmp(cmd, "scrub"); + return 0; + } + + if (strncmp(cmd, "dump", 4) == 0) { + if (argc < 3) + goto usage; + + s = strchr(cmd, '.'); + off = (int)simple_strtoul(argv[2], ((void *)0), 16); + + if (s != ((void *)0) && strcmp(s, ".oob") == 0) + nand_dump(nand, off, 1); + else + nand_dump(nand, off, 0); + + return 0; + } +usage: + cmd_usage(cmdtp); + return 1; +} + +void *ptr = do_nand; -- cgit v1.2.3 From 3fd0e92db31e4a810c489c87a19c5a2ee6974c6f Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 29 Dec 2011 00:18:19 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182718 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index d8a6e0d6016..f834f73907e 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111228 +20111229 -- cgit v1.2.3 From 0cd6d9e07399651f41b56d8dc27c3c4fcd337238 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Fri, 30 Dec 2011 00:18:10 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182737 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index f834f73907e..2618a45c07e 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111229 +20111230 -- cgit v1.2.3 From f9f932e2b154caaaf943b42f60f3685045212124 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Fri, 30 Dec 2011 11:40:48 +0000 Subject: 2011-12-30 Paolo Carlini PR libstdc++/51711 * include/bits/regex.h (regex_replace): Fix thinko. * testsuite/28_regex/algorithms/regex_replace/char/51711.cc: New. * testsuite/28_regex/algorithms/regex_replace/wchar_t/51711.cc: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182741 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 8 ++++++ libstdc++-v3/include/bits/regex.h | 2 +- .../algorithms/regex_replace/char/51711.cc | 31 ++++++++++++++++++++++ .../algorithms/regex_replace/wchar_t/51711.cc | 31 ++++++++++++++++++++++ 4 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 libstdc++-v3/testsuite/28_regex/algorithms/regex_replace/char/51711.cc create mode 100644 libstdc++-v3/testsuite/28_regex/algorithms/regex_replace/wchar_t/51711.cc diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 7c3255590be..2eb57a52db4 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,11 @@ +2011-12-30 Paolo Carlini + + PR libstdc++/51711 + * include/bits/regex.h (regex_replace): Fix thinko. + * testsuite/28_regex/algorithms/regex_replace/char/51711.cc: New. + * testsuite/28_regex/algorithms/regex_replace/wchar_t/51711.cc: + Likewise. + 2011-12-19 Jonathan Wakely PR libstdc++/51626 diff --git a/libstdc++-v3/include/bits/regex.h b/libstdc++-v3/include/bits/regex.h index f29ee913918..2bea0c3b7a6 100644 --- a/libstdc++-v3/include/bits/regex.h +++ b/libstdc++-v3/include/bits/regex.h @@ -2219,7 +2219,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION regex_constants::match_flag_type __flags = regex_constants::match_default) { - std::string __result; + basic_string<_Ch_type> __result; regex_replace(std::back_inserter(__result), __s.begin(), __s.end(), __e, __fmt, __flags); return __result; diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_replace/char/51711.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_replace/char/51711.cc new file mode 100644 index 00000000000..5532713cea7 --- /dev/null +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_replace/char/51711.cc @@ -0,0 +1,31 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do compile } + +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . +// + +#include +#include + +// libstdc++/51711 +void test01() +{ + std::string toProcess("Bug\r\n"); + std::string result __attribute__((unused)) + = std::regex_replace(toProcess, std::regex("\\r"), std::string("\\r")); +} diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_replace/wchar_t/51711.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_replace/wchar_t/51711.cc new file mode 100644 index 00000000000..66b74e45867 --- /dev/null +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_replace/wchar_t/51711.cc @@ -0,0 +1,31 @@ +// { dg-options "-std=gnu++0x" } +// { dg-do compile } + +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . +// + +#include +#include + +// libstdc++/51711 +void test01() +{ + std::wstring toProcess(L"Bug\r\n"); + std::wstring result __attribute__((unused)) + = std::regex_replace(toProcess, std::wregex(L"\\r"), std::wstring(L"\\r")); +} -- cgit v1.2.3 From f109d64b131e5bfa8db13576e25956fd9b40dbb6 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sat, 31 Dec 2011 00:18:02 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182750 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 2618a45c07e..4212c2a573d 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111230 +20111231 -- cgit v1.2.3 From 59f1d0dacc566088d662da6b27dfc99b6bcdc039 Mon Sep 17 00:00:00 2001 From: Michael Meissner Date: Sat, 31 Dec 2011 00:29:44 +0000 Subject: Fix thinko in setting target options git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182752 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 8 ++++++++ gcc/config/rs6000/rs6000.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 679b0b928c9..3352bdfc827 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2011-12-30 Michael Meissner + + Backport from the mainline + 2011-12-30 Michael Meissner + + * config/rs6000/rs6000.c (rs6000_inner_target_options): Fix thinko + in setting options via target #pragma or attribute. + 2011-12-28 Michael Meissner Backport from mainline diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index c069629327e..ae0cc17f573 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -27760,7 +27760,7 @@ rs6000_inner_target_options (tree args, bool attr_p) if (strcmp (r, rs6000_opt_vars[i].name) == 0) { size_t j = rs6000_opt_vars[i].global_offset; - ((int *) &global_options)[j] = !invert; + *((int *) ((char *)&global_options + j)) = !invert; error_p = false; break; } -- cgit v1.2.3 From 85713970420ce5558ef7453f124071aa6c023d01 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sun, 1 Jan 2012 00:17:58 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182764 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 4212c2a573d..c51ae0e9cdf 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20111231 +20120101 -- cgit v1.2.3 From eb8480708a7cd82be01530ba3a06f0bc77dda030 Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Sun, 1 Jan 2012 16:12:39 +0000 Subject: =?UTF-8?q?2012-01-01=20=20Thomas=20K=C3=B6nig=20=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport from trunk PR fortran/51502 * expr.c (gfc_check_vardef_context): When determining implicit pure status, also check for variable definition context. Walk up namespaces until a procedure is found to reset the implict pure attribute. * resolve.c (gfc_implicit_pure): Walk up namespaces until a procedure is found. 2012-01-01 Thomas König Backport from trunk PR fortran/51502 * lib/gcc-dg.exp (scan-module-absence): New function. * gfortran.dg/implicit_pure_2.f90: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182770 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 11 ++++++++++ gcc/fortran/expr.c | 19 ++++++++++++++++-- gcc/fortran/resolve.c | 29 ++++++++++++++------------- gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/gfortran.dg/implicit_pure_2.f90 | 17 ++++++++++++++++ gcc/testsuite/lib/gcc-dg.exp | 18 +++++++++++++++++ 6 files changed, 85 insertions(+), 16 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/implicit_pure_2.f90 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 503c9bb9ad2..9a2d3fcda5a 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,14 @@ +2012-01-01 Thomas König + + Backport from trunk + PR fortran/51502 + * expr.c (gfc_check_vardef_context): When determining + implicit pure status, also check for variable definition + context. Walk up namespaces until a procedure is + found to reset the implict pure attribute. + * resolve.c (gfc_implicit_pure): Walk up namespaces + until a procedure is found. + 2011-12-22 Toon Moene PR fortran/51310 diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 96aea8d6b83..d5784c5d395 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -4523,9 +4523,24 @@ gfc_check_vardef_context (gfc_expr* e, bool pointer, const char* context) return FAILURE; } - if (!pointer && gfc_implicit_pure (NULL) && gfc_impure_variable (sym)) - gfc_current_ns->proc_name->attr.implicit_pure = 0; + if (!pointer && context && gfc_implicit_pure (NULL) + && gfc_impure_variable (sym)) + { + gfc_namespace *ns; + gfc_symbol *sym; + for (ns = gfc_current_ns; ns; ns = ns->parent) + { + sym = ns->proc_name; + if (sym == NULL) + break; + if (sym->attr.flavor == FL_PROCEDURE) + { + sym->attr.implicit_pure = 0; + break; + } + } + } /* Check variable definition context for associate-names. */ if (!pointer && sym->assoc) { diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 8d1ef0f1af8..84753b24297 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -12936,24 +12936,25 @@ gfc_pure (gfc_symbol *sym) int gfc_implicit_pure (gfc_symbol *sym) { - symbol_attribute attr; + gfc_namespace *ns; if (sym == NULL) { - /* Check if the current namespace is implicit_pure. */ - sym = gfc_current_ns->proc_name; - if (sym == NULL) - return 0; - attr = sym->attr; - if (attr.flavor == FL_PROCEDURE - && attr.implicit_pure && !attr.pure) - return 1; - return 0; + /* Check if the current procedure is implicit_pure. Walk up + the procedure list until we find a procedure. */ + for (ns = gfc_current_ns; ns; ns = ns->parent) + { + sym = ns->proc_name; + if (sym == NULL) + return 0; + + if (sym->attr.flavor == FL_PROCEDURE) + break; + } } - - attr = sym->attr; - - return attr.flavor == FL_PROCEDURE && attr.implicit_pure && !attr.pure; + + return sym->attr.flavor == FL_PROCEDURE && sym->attr.implicit_pure + && !sym->attr.pure; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3bef6a78fc1..2ce065e8003 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2012-01-01 Thomas König + + Backport from trunk + PR fortran/51502 + * lib/gcc-dg.exp (scan-module-absence): New function. + * gfortran.dg/implicit_pure_2.f90: New test. + 2011-12-28 Michael Meissner Backport from mainline diff --git a/gcc/testsuite/gfortran.dg/implicit_pure_2.f90 b/gcc/testsuite/gfortran.dg/implicit_pure_2.f90 new file mode 100644 index 00000000000..496e856e04a --- /dev/null +++ b/gcc/testsuite/gfortran.dg/implicit_pure_2.f90 @@ -0,0 +1,17 @@ +! { dg-do compile } +! PR 51502 - this was wrongly detected to be implicit pure. +module m + integer :: i +contains + subroutine foo(x) + integer, intent(inout) :: x + outer: block + block + i = 5 + end block + end block outer + end subroutine foo +end module m + +! { dg-final { scan-module-absence "m" "IMPLICIT_PURE" } } +! { dg-final { cleanup-modules "m" } } diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index 4cdfa3e0251..450f27804ea 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -565,6 +565,24 @@ proc scan-module { args } { } } +# Scan Fortran modules for absence of a given regexp. +# +# Argument 0 is the module name +# Argument 1 is the regexp to match +proc scan-module-absence { args } { + set modfilename [string tolower [lindex $args 0]].mod + set fd [open $modfilename r] + set text [read $fd] + close $fd + + upvar 2 name testcase + if [regexp -- [lindex $args 1] $text] { + fail "$testcase scan-module [lindex $args 1]" + } else { + pass "$testcase scan-module [lindex $args 1]" + } +} + # Verify that the compiler output file exists, invoked via dg-final. proc output-exists { args } { # Process an optional target or xfail list. -- cgit v1.2.3 From 3864d85141abbc5bb5b6209e7adfaa1d65d964c7 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Mon, 2 Jan 2012 00:18:04 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182779 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index c51ae0e9cdf..cc2ffadf540 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120101 +20120102 -- cgit v1.2.3 From 47cd4f212292fd870f79e96b133a9266a014b959 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Mon, 2 Jan 2012 10:32:36 +0000 Subject: * gnatvsn.ads (Current_Year): Bump to 2011. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182784 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/ChangeLog | 4 ++++ gcc/ada/gnatvsn.ads | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 3ac1620d637..6b52cbfab08 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +2012-01-02 Eric Botcazou + + * gnatvsn.ads (Current_Year): Bump to 2011. + 2011-12-08 Eric Botcazou PR tree-optimization/51315 diff --git a/gcc/ada/gnatvsn.ads b/gcc/ada/gnatvsn.ads index c73824e5fe6..1224b3b5cdf 100644 --- a/gcc/ada/gnatvsn.ads +++ b/gcc/ada/gnatvsn.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2010, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2011, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -92,7 +92,7 @@ package Gnatvsn is Verbose_Library_Version : constant String := "GNAT Lib v" & Library_Version; -- Version string stored in e.g. ALI files - Current_Year : constant String := "2010"; + Current_Year : constant String := "2011"; -- Used in printing copyright messages end Gnatvsn; -- cgit v1.2.3 From 16ecb5c6981523052baa55f771cae81a8dbd5bae Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Mon, 2 Jan 2012 11:02:10 +0000 Subject: 2012-01-02 Richard Guenther PR bootstrap/51686 * Makefile.def (install-strip-gcc): Depend on install-strip-lto-plugin. * Makefile.in: Regenerate. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182790 138bc75d-0d04-0410-961f-82ee72b054a4 --- ChangeLog | 6 ++++++ Makefile.def | 1 + Makefile.in | 1 + 3 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 39c8731ea3f..249743aadfc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-01-02 Richard Guenther + + PR bootstrap/51686 + * Makefile.def (install-strip-gcc): Depend on install-strip-lto-plugin. + * Makefile.in: Regenerate. + 2011-12-18 Eric Botcazou * configure: Regenerate. diff --git a/Makefile.def b/Makefile.def index cadb7093992..95c77ab179c 100644 --- a/Makefile.def +++ b/Makefile.def @@ -353,6 +353,7 @@ dependencies = { module=html-gcc; on=all-build-libiberty; }; dependencies = { module=install-gcc ; on=install-fixincludes; }; dependencies = { module=install-gcc ; on=install-lto-plugin; }; dependencies = { module=install-strip-gcc ; on=install-strip-fixincludes; }; +dependencies = { module=install-strip-gcc ; on=install-strip-lto-plugin; }; dependencies = { module=configure-libcpp; on=configure-libiberty; hard=true; }; dependencies = { module=configure-libcpp; on=configure-intl; }; diff --git a/Makefile.in b/Makefile.in index 132f9dfac1c..51edbdf0268 100644 --- a/Makefile.in +++ b/Makefile.in @@ -60017,6 +60017,7 @@ html-stagefeedback-gcc: maybe-all-build-libiberty install-gcc: maybe-install-fixincludes install-gcc: maybe-install-lto-plugin install-strip-gcc: maybe-install-strip-fixincludes +install-strip-gcc: maybe-install-strip-lto-plugin configure-libcpp: configure-libiberty configure-stage1-libcpp: configure-stage1-libiberty -- cgit v1.2.3 From e6fe0da748766144d44998b2a4dcf591cc745121 Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Mon, 2 Jan 2012 17:08:45 +0000 Subject: PR debug/49951 - jumpy stepping at end of scope in C++ gcc/cp/ PR debug/49951 * decl.c (cxx_maybe_build_cleanup): Don't set location of the call to the destructor. gcc/testsuite/ PR debug/49951 * g++.dg/gcov/gcov-2.C: Adjust. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182807 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/decl.c | 9 +++++++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/gcov/gcov-2.C | 2 +- 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 24d2b924a93..9bb03662552 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2011-12-20 Dodji Seketeli + + PR debug/49951 + * decl.c (cxx_maybe_build_cleanup): Don't set location of the call + to the destructor. + 2011-12-16 Jason Merrill PR c++/51416 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index fdf3ca155ed..a2e52613fce 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -13363,8 +13363,17 @@ cxx_maybe_build_cleanup (tree decl) cleanup = call; } + /* build_delete sets the location of the destructor call to the + current location, even though the destructor is going to be + called later, at the end of the current scope. This can lead to + a "jumpy" behaviour for users of debuggers when they step around + the end of the block. So let's unset the location of the + destructor call instead. */ + if (cleanup != NULL && EXPR_P (cleanup)) + SET_EXPR_LOCATION (cleanup, UNKNOWN_LOCATION); return cleanup; } + /* When a stmt has been parsed, this function is called. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2ce065e8003..d2b3eb91a55 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-12-20 Dodji Seketeli + + PR debug/49951 + * g++.dg/gcov/gcov-2.C: Adjust. + 2012-01-01 Thomas König Backport from trunk diff --git a/gcc/testsuite/g++.dg/gcov/gcov-2.C b/gcc/testsuite/g++.dg/gcov/gcov-2.C index 6d002f5d2cd..66d8af39bce 100644 --- a/gcc/testsuite/g++.dg/gcov/gcov-2.C +++ b/gcc/testsuite/g++.dg/gcov/gcov-2.C @@ -20,7 +20,7 @@ private: void foo() { - C c; /* count(2) */ + C c; /* count(1) */ c.seti (1); /* count(1) */ } -- cgit v1.2.3 From caad49aff74b623976461067916d9d3a2de7eb88 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Tue, 3 Jan 2012 00:18:02 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182824 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index cc2ffadf540..1ea3f1998dc 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120102 +20120103 -- cgit v1.2.3 From 8525878f0427f42087117b5683495f753886767e Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Tue, 3 Jan 2012 12:11:41 +0000 Subject: 2012-01-03 Richard Guenther PR tree-optimization/51070 * tree-loop-distribution.c (generate_builtin): Do not replace the loop with a builtin if the partition contains statements which results are used outside of the loop. (stmt_has_scalar_dependences_outside_loop): Properly handle calls. * gcc.dg/torture/pr51070.c: New testcase. * gcc.dg/torture/pr51070-2.c: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182840 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 8 +++ gcc/testsuite/ChangeLog | 6 ++ gcc/testsuite/gcc.dg/torture/pr51070-2.c | 35 +++++++++++ gcc/testsuite/gcc.dg/torture/pr51070.c | 34 ++++++++++ gcc/tree-loop-distribution.c | 103 +++++++++++++++++-------------- 5 files changed, 140 insertions(+), 46 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/torture/pr51070-2.c create mode 100644 gcc/testsuite/gcc.dg/torture/pr51070.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3352bdfc827..6e4fe5c2c0f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2012-01-03 Richard Guenther + + PR tree-optimization/51070 + * tree-loop-distribution.c (generate_builtin): Do not replace + the loop with a builtin if the partition contains statements which + results are used outside of the loop. + (stmt_has_scalar_dependences_outside_loop): Properly handle calls. + 2011-12-30 Michael Meissner Backport from the mainline diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d2b3eb91a55..b6ec7b7b1b0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2012-01-03 Richard Guenther + + PR tree-optimization/51070 + * gcc.dg/torture/pr51070.c: New testcase. + * gcc.dg/torture/pr51070-2.c: Likewise. + 2011-12-20 Dodji Seketeli PR debug/49951 diff --git a/gcc/testsuite/gcc.dg/torture/pr51070-2.c b/gcc/testsuite/gcc.dg/torture/pr51070-2.c new file mode 100644 index 00000000000..f21eb3acbd7 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr51070-2.c @@ -0,0 +1,35 @@ +/* { dg-do compile } */ +/* { dg-options "-fno-inline" } */ + +int +func_4 (int si1, int si2) +{ + return si1; +} + +int +func_14 (int left, int right) +{ + return 1; +} + +int +func_37 (int left, int right) +{ + return left; +} + +int g_92[1024]; +int g_95[1024]; +int g_224; +int g_352[1024]; +int +func_9 () +{ + for (; g_224; g_224 += 1) + { + g_95[0] = func_4 (func_37 (g_92[g_224], 0), 0); + g_92[g_224] = 0, g_352[g_224] = func_14 (0, 0); + } + return 0; +} diff --git a/gcc/testsuite/gcc.dg/torture/pr51070.c b/gcc/testsuite/gcc.dg/torture/pr51070.c new file mode 100644 index 00000000000..cc06a90c843 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr51070.c @@ -0,0 +1,34 @@ +/* { dg-do compile } */ + +int +func_4 (int si1, int si2) +{ + return si1; +} + +int +func_14 (int left, int right) +{ + return 1; +} + +int +func_37 (int left, int right) +{ + return left; +} + +int g_92[1024]; +int g_95[1024]; +int g_224; +int g_352[1024]; +int +func_9 () +{ + for (; g_224; g_224 += 1) + { + g_95[0] = func_4 (func_37 (g_92[g_224], 0), 0); + g_92[g_224] = 0, g_352[g_224] = func_14 (0, 0); + } + return 0; +} diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c index 1d6944eef96..6b9b98d6b11 100644 --- a/gcc/tree-loop-distribution.c +++ b/gcc/tree-loop-distribution.c @@ -63,6 +63,51 @@ static bitmap remaining_stmts; predecessor a node that writes to memory. */ static bitmap upstream_mem_writes; +/* Returns true when DEF is an SSA_NAME defined in LOOP and used after + the LOOP. */ + +static bool +ssa_name_has_uses_outside_loop_p (tree def, loop_p loop) +{ + imm_use_iterator imm_iter; + use_operand_p use_p; + + FOR_EACH_IMM_USE_FAST (use_p, imm_iter, def) + if (loop != loop_containing_stmt (USE_STMT (use_p))) + return true; + + return false; +} + +/* Returns true when STMT defines a scalar variable used after the + loop. */ + +static bool +stmt_has_scalar_dependences_outside_loop (gimple stmt) +{ + tree name; + + switch (gimple_code (stmt)) + { + case GIMPLE_CALL: + case GIMPLE_ASSIGN: + name = gimple_get_lhs (stmt); + break; + + case GIMPLE_PHI: + name = gimple_phi_result (stmt); + break; + + default: + return false; + } + + return (name + && TREE_CODE (name) == SSA_NAME + && ssa_name_has_uses_outside_loop_p (name, + loop_containing_stmt (stmt))); +} + /* Update the PHI nodes of NEW_LOOP. NEW_LOOP is a duplicate of ORIG_LOOP. */ @@ -332,10 +377,18 @@ generate_builtin (struct loop *loop, bitmap partition, bool copy_p) { gimple stmt = gsi_stmt (bsi); - if (gimple_code (stmt) != GIMPLE_LABEL - && !is_gimple_debug (stmt) - && bitmap_bit_p (partition, x++) - && is_gimple_assign (stmt) + if (gimple_code (stmt) == GIMPLE_LABEL + || is_gimple_debug (stmt)) + continue; + + if (!bitmap_bit_p (partition, x++)) + continue; + + /* If the stmt has uses outside of the loop fail. */ + if (stmt_has_scalar_dependences_outside_loop (stmt)) + goto end; + + if (is_gimple_assign (stmt) && !is_gimple_reg (gimple_assign_lhs (stmt))) { /* Don't generate the builtins when there are more than @@ -826,48 +879,6 @@ fuse_partitions_with_similar_memory_accesses (struct graph *rdg, } } -/* Returns true when DEF is an SSA_NAME defined in LOOP and used after - the LOOP. */ - -static bool -ssa_name_has_uses_outside_loop_p (tree def, loop_p loop) -{ - imm_use_iterator imm_iter; - use_operand_p use_p; - - FOR_EACH_IMM_USE_FAST (use_p, imm_iter, def) - if (loop != loop_containing_stmt (USE_STMT (use_p))) - return true; - - return false; -} - -/* Returns true when STMT defines a scalar variable used after the - loop. */ - -static bool -stmt_has_scalar_dependences_outside_loop (gimple stmt) -{ - tree name; - - switch (gimple_code (stmt)) - { - case GIMPLE_ASSIGN: - name = gimple_assign_lhs (stmt); - break; - - case GIMPLE_PHI: - name = gimple_phi_result (stmt); - break; - - default: - return false; - } - - return TREE_CODE (name) == SSA_NAME - && ssa_name_has_uses_outside_loop_p (name, loop_containing_stmt (stmt)); -} - /* Returns true when STMT will be code generated in a partition of RDG different than PART and that will not be code generated as a builtin. */ -- cgit v1.2.3 From c89f7a2cf2a9aaf4ef9a812e924d41fcb3c2367d Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Tue, 3 Jan 2012 13:15:21 +0000 Subject: 2012-01-03 Richard Guenther Backport from mainline 2011-08-10 Richard Guenther PR bootstrap/49907 lto-plugin/ * configure.ac: Use ACX_PROG_CC_WARNING_OPTS to detect -Wall presence. * Makefile.am (AM_CFLAGS): Adjust. Do not build with -Werror. * configure: Regenerate. * Makefile.in: Likewise. * aclocal.m4: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182842 138bc75d-0d04-0410-961f-82ee72b054a4 --- lto-plugin/ChangeLog | 13 +++++++++++++ lto-plugin/Makefile.am | 2 +- lto-plugin/Makefile.in | 4 +++- lto-plugin/aclocal.m4 | 1 + lto-plugin/configure | 44 ++++++++++++++++++++++++++++++++++++++++++-- lto-plugin/configure.ac | 1 + 6 files changed, 61 insertions(+), 4 deletions(-) diff --git a/lto-plugin/ChangeLog b/lto-plugin/ChangeLog index af01a777e86..b19f0837e0c 100644 --- a/lto-plugin/ChangeLog +++ b/lto-plugin/ChangeLog @@ -1,3 +1,16 @@ +2012-01-03 Richard Guenther + + Backport from mainline + 2011-08-10 Richard Guenther + + PR bootstrap/49907 + lto-plugin/ + * configure.ac: Use ACX_PROG_CC_WARNING_OPTS to detect -Wall presence. + * Makefile.am (AM_CFLAGS): Adjust. Do not build with -Werror. + * configure: Regenerate. + * Makefile.in: Likewise. + * aclocal.m4: Likewise. + 2011-11-20 Andreas Tobler * configure: Regenerate. diff --git a/lto-plugin/Makefile.am b/lto-plugin/Makefile.am index 4067c43150a..b24015e137b 100644 --- a/lto-plugin/Makefile.am +++ b/lto-plugin/Makefile.am @@ -8,7 +8,7 @@ target_noncanonical := @target_noncanonical@ libexecsubdir := $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version) AM_CPPFLAGS = -I$(top_srcdir)/../include $(DEFS) -AM_CFLAGS = -Wall -Werror +AM_CFLAGS = @ac_lto_plugin_warn_cflags@ AM_LIBTOOLFLAGS = --tag=disable-static libexecsub_LTLIBRARIES = liblto_plugin.la diff --git a/lto-plugin/Makefile.in b/lto-plugin/Makefile.in index 86edb99bfa7..0c8d89fc7e2 100644 --- a/lto-plugin/Makefile.in +++ b/lto-plugin/Makefile.in @@ -47,6 +47,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ $(top_srcdir)/../config/lead-dot.m4 \ $(top_srcdir)/../config/lthostflags.m4 \ $(top_srcdir)/../config/override.m4 \ + $(top_srcdir)/../config/warnings.m4 \ $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac @@ -167,6 +168,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_lto_plugin_warn_cflags = @ac_lto_plugin_warn_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -227,7 +229,7 @@ AUTOMAKE_OPTIONS = no-dependencies gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) libexecsubdir := $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version) AM_CPPFLAGS = -I$(top_srcdir)/../include $(DEFS) -AM_CFLAGS = -Wall -Werror +AM_CFLAGS = @ac_lto_plugin_warn_cflags@ AM_LIBTOOLFLAGS = --tag=disable-static libexecsub_LTLIBRARIES = liblto_plugin.la gcc_build_dir = ../$(host_subdir)/gcc diff --git a/lto-plugin/aclocal.m4 b/lto-plugin/aclocal.m4 index 7c370a7d01b..ce9a5c2e428 100644 --- a/lto-plugin/aclocal.m4 +++ b/lto-plugin/aclocal.m4 @@ -973,6 +973,7 @@ m4_include([../config/depstand.m4]) m4_include([../config/lead-dot.m4]) m4_include([../config/lthostflags.m4]) m4_include([../config/override.m4]) +m4_include([../config/warnings.m4]) m4_include([../libtool.m4]) m4_include([../ltoptions.m4]) m4_include([../ltsugar.m4]) diff --git a/lto-plugin/configure b/lto-plugin/configure index 2cc7e015f79..48b414e99f7 100755 --- a/lto-plugin/configure +++ b/lto-plugin/configure @@ -622,6 +622,7 @@ EGREP GREP SED LIBTOOL +ac_lto_plugin_warn_cflags am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE @@ -4040,6 +4041,45 @@ rm -rf conftest* fi fi +ac_lto_plugin_warn_cflags= +save_CFLAGS="$CFLAGS" +for option in -Wall; do + as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5 +$as_echo_n "checking whether $CC supports $option... " >&6; } +if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + CFLAGS="$option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_acx_Woption=yes" +else + eval "$as_acx_Woption=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +eval ac_res=\$$as_acx_Woption + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then : + ac_lto_plugin_warn_cflags="$ac_lto_plugin_warn_cflags${ac_lto_plugin_warn_cflags:+ }$option" +fi + done +CFLAGS="$save_CFLAGS" + case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 @@ -10498,7 +10538,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10501 "configure" +#line 10541 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10604,7 +10644,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10607 "configure" +#line 10647 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/lto-plugin/configure.ac b/lto-plugin/configure.ac index 1aba69713f7..9a418d231fe 100644 --- a/lto-plugin/configure.ac +++ b/lto-plugin/configure.ac @@ -6,6 +6,7 @@ AM_INIT_AUTOMAKE([foreign no-dist]) AM_MAINTAINER_MODE AC_PROG_CC AC_SYS_LARGEFILE +ACX_PROG_CC_WARNING_OPTS([-Wall], [ac_lto_plugin_warn_cflags]) AM_PROG_LIBTOOL ACX_LT_HOST_FLAGS AC_SUBST(target_noncanonical) -- cgit v1.2.3 From 0bc67bf01c72cb9dd2c0802e5bd5def03d808100 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Tue, 3 Jan 2012 14:46:03 +0000 Subject: 2012-01-03 Richard Guenther Backport from mainline 2011-11-10 Richard Guenther PR tree-optimization/51042 * tree-ssa-pre.c (phi_translate_1): Avoid recursing on self-referential expressions. Refactor code to avoid duplication. * gcc.dg/torture/pr51042.c: New testcase. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182848 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 9 +++ gcc/testsuite/ChangeLog | 8 +++ gcc/testsuite/gcc.dg/torture/pr51042.c | 22 +++++++ gcc/tree-ssa-pre.c | 113 ++++++++++++++------------------- 4 files changed, 87 insertions(+), 65 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/torture/pr51042.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6e4fe5c2c0f..7ad80f14c12 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2012-01-03 Richard Guenther + + Backport from mainline + 2011-11-10 Richard Guenther + + PR tree-optimization/51042 + * tree-ssa-pre.c (phi_translate_1): Avoid recursing on + self-referential expressions. Refactor code to avoid duplication. + 2012-01-03 Richard Guenther PR tree-optimization/51070 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b6ec7b7b1b0..b024311c51c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2012-01-03 Richard Guenther + + Backport from mainline + 2011-11-10 Richard Guenther + + PR tree-optimization/51042 + * gcc.dg/torture/pr51042.c: New testcase. + 2012-01-03 Richard Guenther PR tree-optimization/51070 diff --git a/gcc/testsuite/gcc.dg/torture/pr51042.c b/gcc/testsuite/gcc.dg/torture/pr51042.c new file mode 100644 index 00000000000..05961c4acf5 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr51042.c @@ -0,0 +1,22 @@ +/* { dg-do compile } */ + +int a, b; + +void +foo (int x) +{ + int e[2]; + int d; + while (x) + { + for (d = 0; d <= 1; d = 1) + if (e[a]) + break; + for (b = 0; b <= 0; b = 1) + { + e[a] = a; + if (a) + break; + } + } +} diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index e2a8dc2ec54..2753fd7ada3 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -1545,7 +1545,7 @@ phi_translate_1 (pre_expr expr, bitmap_set_t set1, bitmap_set_t set2, tree newvuse = vuse; VEC (vn_reference_op_s, heap) *newoperands = NULL; bool changed = false, same_valid = true; - unsigned int i, j; + unsigned int i, j, n; vn_reference_op_t operand; vn_reference_t newref; @@ -1554,100 +1554,83 @@ phi_translate_1 (pre_expr expr, bitmap_set_t set1, bitmap_set_t set2, { pre_expr opresult; pre_expr leader; - tree oldop0 = operand->op0; - tree oldop1 = operand->op1; - tree oldop2 = operand->op2; - tree op0 = oldop0; - tree op1 = oldop1; - tree op2 = oldop2; + tree op[3]; tree type = operand->type; vn_reference_op_s newop = *operand; - - if (op0 && TREE_CODE (op0) == SSA_NAME) + op[0] = operand->op0; + op[1] = operand->op1; + op[2] = operand->op2; + for (n = 0; n < 3; ++n) { - unsigned int op_val_id = VN_INFO (op0)->value_id; - leader = find_leader_in_sets (op_val_id, set1, set2); - opresult = phi_translate (leader, set1, set2, pred, phiblock); - if (opresult && opresult != leader) + unsigned int op_val_id; + if (!op[n]) + continue; + if (TREE_CODE (op[n]) != SSA_NAME) { - tree name = get_representative_for (opresult); - if (!name) + /* We can't possibly insert these. */ + if (n != 0 + && !is_gimple_min_invariant (op[n])) break; - op0 = name; + continue; } - else if (!opresult) - break; - } - changed |= op0 != oldop0; - - if (op1 && TREE_CODE (op1) == SSA_NAME) - { - unsigned int op_val_id = VN_INFO (op1)->value_id; + op_val_id = VN_INFO (op[n])->value_id; leader = find_leader_in_sets (op_val_id, set1, set2); - opresult = phi_translate (leader, set1, set2, pred, phiblock); - if (opresult && opresult != leader) + if (!leader) + break; + /* Make sure we do not recursively translate ourselves + like for translating a[n_1] with the leader for + n_1 being a[n_1]. */ + if (get_expression_id (leader) != get_expression_id (expr)) { - tree name = get_representative_for (opresult); - if (!name) + opresult = phi_translate (leader, set1, set2, + pred, phiblock); + if (!opresult) break; - op1 = name; + if (opresult != leader) + { + tree name = get_representative_for (opresult); + if (!name) + break; + changed |= name != op[n]; + op[n] = name; + } } - else if (!opresult) - break; } - /* We can't possibly insert these. */ - else if (op1 && !is_gimple_min_invariant (op1)) - break; - changed |= op1 != oldop1; - if (op2 && TREE_CODE (op2) == SSA_NAME) + if (n != 3) { - unsigned int op_val_id = VN_INFO (op2)->value_id; - leader = find_leader_in_sets (op_val_id, set1, set2); - opresult = phi_translate (leader, set1, set2, pred, phiblock); - if (opresult && opresult != leader) - { - tree name = get_representative_for (opresult); - if (!name) - break; - op2 = name; - } - else if (!opresult) - break; + if (newoperands) + VEC_free (vn_reference_op_s, heap, newoperands); + return NULL; } - /* We can't possibly insert these. */ - else if (op2 && !is_gimple_min_invariant (op2)) - break; - changed |= op2 != oldop2; - if (!newoperands) newoperands = VEC_copy (vn_reference_op_s, heap, operands); /* We may have changed from an SSA_NAME to a constant */ - if (newop.opcode == SSA_NAME && TREE_CODE (op0) != SSA_NAME) - newop.opcode = TREE_CODE (op0); + if (newop.opcode == SSA_NAME && TREE_CODE (op[0]) != SSA_NAME) + newop.opcode = TREE_CODE (op[0]); newop.type = type; - newop.op0 = op0; - newop.op1 = op1; - newop.op2 = op2; + newop.op0 = op[0]; + newop.op1 = op[1]; + newop.op2 = op[2]; /* If it transforms a non-constant ARRAY_REF into a constant one, adjust the constant offset. */ if (newop.opcode == ARRAY_REF && newop.off == -1 - && TREE_CODE (op0) == INTEGER_CST - && TREE_CODE (op1) == INTEGER_CST - && TREE_CODE (op2) == INTEGER_CST) + && TREE_CODE (op[0]) == INTEGER_CST + && TREE_CODE (op[1]) == INTEGER_CST + && TREE_CODE (op[2]) == INTEGER_CST) { - double_int off = tree_to_double_int (op0); + double_int off = tree_to_double_int (op[0]); off = double_int_add (off, double_int_neg - (tree_to_double_int (op1))); - off = double_int_mul (off, tree_to_double_int (op2)); + (tree_to_double_int (op[1]))); + off = double_int_mul (off, tree_to_double_int (op[2])); if (double_int_fits_in_shwi_p (off)) newop.off = off.low; } VEC_replace (vn_reference_op_s, newoperands, j, &newop); /* If it transforms from an SSA_NAME to an address, fold with a preceding indirect reference. */ - if (j > 0 && op0 && TREE_CODE (op0) == ADDR_EXPR + if (j > 0 && op[0] && TREE_CODE (op[0]) == ADDR_EXPR && VEC_index (vn_reference_op_s, newoperands, j - 1)->opcode == MEM_REF) vn_reference_fold_indirect (&newoperands, &j); -- cgit v1.2.3 From 43195c27c97335cd1c46e93b836fa2c7d950caed Mon Sep 17 00:00:00 2001 From: Sandra Loosemore Date: Tue, 3 Jan 2012 16:43:38 +0000 Subject: 2012-01-03 Sandra Loosemore gcc/ Backport from mainline: 2012-01-02 Sandra Loosemore * doc/invoke.texi (-flto and related options): Copy-edit. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182853 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++ gcc/doc/invoke.texi | 159 +++++++++++++++++++++++++--------------------------- 2 files changed, 83 insertions(+), 83 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7ad80f14c12..29866bb523e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2012-01-03 Sandra Loosemore + + Backport from mainline: + 2012-01-02 Sandra Loosemore + + * doc/invoke.texi (-flto and related options): Copy-edit. + 2012-01-03 Richard Guenther Backport from mainline diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index a918e60ebe0..4ed31b6656e 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -7527,8 +7527,8 @@ file. When the object files are linked together, all the function bodies are read from these ELF sections and instantiated as if they had been part of the same translation unit. -To use the link-timer optimizer, @option{-flto} needs to be specified at -compile time and during the final link. For example, +To use the link-time optimizer, @option{-flto} needs to be specified at +compile time and during the final link. For example: @smallexample gcc -c -O2 -flto foo.c @@ -7536,25 +7536,25 @@ gcc -c -O2 -flto bar.c gcc -o myprog -flto -O2 foo.o bar.o @end smallexample -The first two invocations to GCC will save a bytecode representation +The first two invocations to GCC save a bytecode representation of GIMPLE into special ELF sections inside @file{foo.o} and -@file{bar.o}. The final invocation will read the GIMPLE bytecode from -@file{foo.o} and @file{bar.o}, merge the two files into a single -internal image, and compile the result as usual. Since both +@file{bar.o}. The final invocation reads the GIMPLE bytecode from +@file{foo.o} and @file{bar.o}, merges the two files into a single +internal image, and compiles the result as usual. Since both @file{foo.o} and @file{bar.o} are merged into a single image, this -causes all the inter-procedural analyses and optimizations in GCC to +causes all the interprocedural analyses and optimizations in GCC to work across the two files as if they were a single one. This means, -for example, that the inliner will be able to inline functions in +for example, that the inliner is able to inline functions in @file{bar.o} into functions in @file{foo.o} and vice-versa. -Another (simpler) way to enable link-time optimization is, +Another (simpler) way to enable link-time optimization is: @smallexample gcc -o myprog -flto -O2 foo.c bar.c @end smallexample -The above will generate bytecode for @file{foo.c} and @file{bar.c}, -merge them together into a single GIMPLE representation and optimize +The above generates bytecode for @file{foo.c} and @file{bar.c}, +merges them together into a single GIMPLE representation and optimizes them as usual to produce @file{myprog}. The only important thing to keep in mind is that to enable link-time @@ -7564,30 +7564,22 @@ compile and the link commands. To make whole program optimization effective, it is necessary to make certain whole program assumptions. The compiler needs to know what functions and variables can be accessed by libraries and runtime -outside of the link time optimized unit. When supported by the linker, -the linker plugin (see @option{-fuse-linker-plugin}) passes to the -compiler information about used and externally visible symbols. When +outside of the link-time optimized unit. When supported by the linker, +the linker plugin (see @option{-fuse-linker-plugin}) passes information +to the compiler about used and externally visible symbols. When the linker plugin is not available, @option{-fwhole-program} should be -used to allow the compiler to make these assumptions, which will lead +used to allow the compiler to make these assumptions, which leads to more aggressive optimization decisions. Note that when a file is compiled with @option{-flto}, the generated -object file will be larger than a regular object file because it will -contain GIMPLE bytecodes and the usual final code. This means that -object files with LTO information can be linked as a normal object -file. So, in the previous example, if the final link is done with - -@smallexample -gcc -o myprog foo.o bar.o -@end smallexample - -The only difference will be that no inter-procedural optimizations -will be applied to produce @file{myprog}. The two object files -@file{foo.o} and @file{bar.o} will be simply sent to the regular -linker. +object file is larger than a regular object file because it +contains GIMPLE bytecodes and the usual final code. This means that +object files with LTO information can be linked as normal object +files; if @option{-flto} is not passed to the linker, no +interprocedural optimizations are applied. Additionally, the optimization flags used to compile individual files -are not necessarily related to those used at link-time. For instance, +are not necessarily related to those used at link time. For instance, @smallexample gcc -c -O0 -flto foo.c @@ -7595,37 +7587,42 @@ gcc -c -O0 -flto bar.c gcc -o myprog -flto -O3 foo.o bar.o @end smallexample -This will produce individual object files with unoptimized assembler -code, but the resulting binary @file{myprog} will be optimized at -@option{-O3}. Now, if the final binary is generated without -@option{-flto}, then @file{myprog} will not be optimized. +This produces individual object files with unoptimized assembler +code, but the resulting binary @file{myprog} is optimized at +@option{-O3}. If, instead, the final binary is generated without +@option{-flto}, then @file{myprog} is not optimized. -When producing the final binary with @option{-flto}, GCC will only -apply link-time optimizations to those files that contain bytecode. +When producing the final binary with @option{-flto}, GCC only +applies link-time optimizations to those files that contain bytecode. Therefore, you can mix and match object files and libraries with -GIMPLE bytecodes and final object code. GCC will automatically select +GIMPLE bytecodes and final object code. GCC automatically selects which files to optimize in LTO mode and which files to link without further processing. -There are some code generation flags that GCC will preserve when +There are some code generation flags that GCC preserves when generating bytecodes, as they need to be used during the final link stage. Currently, the following options are saved into the GIMPLE bytecode files: @option{-fPIC}, @option{-fcommon} and all the @option{-m} target flags. -At link time, these options are read-in and reapplied. Note that the -current implementation makes no attempt at recognizing conflicting -values for these options. If two or more files have a conflicting -value (e.g., one file is compiled with @option{-fPIC} and another -isn't), the compiler will simply use the last value read from the -bytecode files. It is recommended, then, that all the files -participating in the same link be compiled with the same options. +At link time, these options are read in and reapplied. Note that the +current implementation makes no attempt to recognize conflicting +values for these options. If different files have conflicting option +values (e.g., one file is compiled with @option{-fPIC} and another +isn't), the compiler simply uses the last value read from the +bytecode files. It is recommended, then, that you compile all the files +participating in the same link with the same options. + +If LTO encounters objects with C linkage declared with incompatible +types in separate translation units to be linked together (undefined +behavior according to ISO C99 6.2.7), a non-fatal diagnostic may be +issued. The behavior is still undefined at runtime. Another feature of LTO is that it is possible to apply interprocedural optimizations on files written in different languages. This requires -some support in the language front end. Currently, the C, C++ and +support in the language front end. Currently, the C, C++ and Fortran front ends are capable of emitting GIMPLE bytecodes, so -something like this should work +something like this should work: @smallexample gcc -c -flto foo.c @@ -7637,49 +7634,43 @@ g++ -o myprog -flto -O3 foo.o bar.o baz.o -lgfortran Notice that the final link is done with @command{g++} to get the C++ runtime libraries and @option{-lgfortran} is added to get the Fortran runtime libraries. In general, when mixing languages in LTO mode, you -should use the same link command used when mixing languages in a -regular (non-LTO) compilation. This means that if your build process -was mixing languages before, all you need to add is @option{-flto} to +should use the same link command options as when mixing languages in a +regular (non-LTO) compilation; all you need to add is @option{-flto} to all the compile and link commands. -If LTO encounters objects with C linkage declared with incompatible -types in separate translation units to be linked together (undefined -behavior according to ISO C99 6.2.7), a non-fatal diagnostic may be -issued. The behavior is still undefined at runtime. - If object files containing GIMPLE bytecode are stored in a library archive, say @file{libfoo.a}, it is possible to extract and use them in an LTO link if you -are using a linker with linker plugin support. To enable this feature, use -the flag @option{-fuse-linker-plugin} at link-time: +are using a linker with plugin support. To enable this feature, use +the flag @option{-fuse-linker-plugin} at link time: @smallexample gcc -o myprog -O2 -flto -fuse-linker-plugin a.o b.o -lfoo @end smallexample -With the linker plugin enabled, the linker will extract the needed -GIMPLE files from @file{libfoo.a} and pass them on to the running GCC +With the linker plugin enabled, the linker extracts the needed +GIMPLE files from @file{libfoo.a} and passes them on to the running GCC to make them part of the aggregated GIMPLE image to be optimized. -If you are not using a linker with linker plugin support and/or do not -enable linker plugin then the objects inside @file{libfoo.a} -will be extracted and linked as usual, but they will not participate +If you are not using a linker with plugin support and/or do not +enable the linker plugin, then the objects inside @file{libfoo.a} +are extracted and linked as usual, but they do not participate in the LTO optimization process. -Link time optimizations do not require the presence of the whole program to +Link-time optimizations do not require the presence of the whole program to operate. If the program does not require any symbols to be exported, it is -possible to combine @option{-flto} and with @option{-fwhole-program} to allow +possible to combine @option{-flto} and @option{-fwhole-program} to allow the interprocedural optimizers to use more aggressive assumptions which may lead to improved optimization opportunities. Use of @option{-fwhole-program} is not needed when linker plugin is active (see @option{-fuse-linker-plugin}). -Regarding portability: the current implementation of LTO makes no -attempt at generating bytecode that can be ported between different +The current implementation of LTO makes no +attempt to generate bytecode that is portable between different types of hosts. The bytecode files are versioned and there is a strict version check, so bytecode files generated in one version of GCC will not work with an older/newer version of GCC. -Link time optimization does not play well with generating debugging +Link-time optimization does not work well with generation of debugging information. Combining @option{-flto} with @option{-g} is currently experimental and expected to produce wrong results. @@ -7693,15 +7684,15 @@ used. The default value for @var{n} is 1. You can also specify @option{-flto=jobserver} to use GNU make's job server mode to determine the number of parallel jobs. This is useful when the Makefile calling GCC is already executing in parallel. -The parent Makefile will need a @samp{+} prepended to the command recipe -for this to work. This will likely only work if @env{MAKE} is +You must prepend a @samp{+} to the command recipe in the parent Makefile +for this to work. This option likely only works if @env{MAKE} is GNU make. This option is disabled by default. @item -flto-partition=@var{alg} @opindex flto-partition -Specify the partitioning algorithm used by the link time optimizer. +Specify the partitioning algorithm used by the link-time optimizer. The value is either @code{1to1} to specify a partitioning mirroring the original source files or @code{balanced} to specify partitioning into equally sized chunks (whenever possible). Specifying @code{none} @@ -7718,27 +7709,29 @@ given, a default balanced compression setting is used. @item -flto-report Prints a report with internal details on the workings of the link-time -optimizer. The contents of this report vary from version to version, -it is meant to be useful to GCC developers when processing object +optimizer. The contents of this report vary from version to version. +It is meant to be useful to GCC developers when processing object files in LTO mode (via @option{-flto}). Disabled by default. @item -fuse-linker-plugin -Enables the use of linker plugin during link time optimization. This option -relies on the linker plugin support in linker that is available in gold +Enables the use of a linker plugin during link-time optimization. This +option relies on the linker plugin support in linker that is available in gold or in GNU ld 2.21 or newer. -This option enables the extraction of object files with GIMPLE bytecode out of -library archives. This improves the quality of optimization by exposing more -code the the link time optimizer. This information specify what symbols -can be accessed externally (by non-LTO object or during dynamic linking). -Resulting code quality improvements on binaries (and shared libraries that do -use hidden visibility) is similar to @code{-fwhole-program}. See -@option{-flto} for a description on the effect of this flag and how to use it. - -Enabled by default when LTO support in GCC is enabled and GCC was compiled -with a linker supporting plugins (GNU ld 2.21 or newer or gold). +This option enables the extraction of object files with GIMPLE bytecode out +of library archives. This improves the quality of optimization by exposing +more code to the link-time optimizer. This information specifies what +symbols can be accessed externally (by non-LTO object or during dynamic +linking). Resulting code quality improvements on binaries (and shared +libraries that use hidden visibility) are similar to @code{-fwhole-program}. +See @option{-flto} for a description of the effect of this flag and how to +use it. + +This option is enabled by default when LTO support in GCC is enabled +and GCC was configured for use with +a linker supporting plugins (GNU ld 2.21 or newer or gold). @item -fcompare-elim @opindex fcompare-elim -- cgit v1.2.3 From 84b0177e96a14f7978c23b7dd9261982e092b9df Mon Sep 17 00:00:00 2001 From: Chase Douglas Date: Tue, 3 Jan 2012 21:37:41 +0000 Subject: 2012-01-03 Chase Douglas Jonathan Wakely * include/bits/shared_ptr.h: Default copy ctor and assignment. * include/bits/shared_ptr_base.h: Likewise. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Adjust dg-error line numbers. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182859 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 9 +++++++++ libstdc++-v3/include/bits/shared_ptr.h | 4 ++++ libstdc++-v3/include/bits/shared_ptr_base.h | 3 ++- libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc | 2 +- libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc | 4 ++-- 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 2eb57a52db4..7036b53c489 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,12 @@ +2012-01-03 Chase Douglas + Jonathan Wakely + + * include/bits/shared_ptr.h: Default copy ctor and assignment. + * include/bits/shared_ptr_base.h: Likewise. + * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Adjust dg-error + line numbers. + * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Likewise. + 2011-12-30 Paolo Carlini PR libstdc++/51711 diff --git a/libstdc++-v3/include/bits/shared_ptr.h b/libstdc++-v3/include/bits/shared_ptr.h index 8d323315fd1..15c554948a8 100644 --- a/libstdc++-v3/include/bits/shared_ptr.h +++ b/libstdc++-v3/include/bits/shared_ptr.h @@ -100,6 +100,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION constexpr shared_ptr() : __shared_ptr<_Tp>() { } + shared_ptr(const shared_ptr&) = default; // never throws + /** * @brief Construct a %shared_ptr that owns the pointer @a __p. * @param __p A pointer that is convertible to element_type*. @@ -264,6 +266,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION constexpr shared_ptr(nullptr_t __p) : __shared_ptr<_Tp>(__p) { } + shared_ptr& operator=(const shared_ptr&) = default; + template shared_ptr& operator=(const shared_ptr<_Tp1>& __r) // never throws diff --git a/libstdc++-v3/include/bits/shared_ptr_base.h b/libstdc++-v3/include/bits/shared_ptr_base.h index 156f7d2979f..bc34aff1482 100644 --- a/libstdc++-v3/include/bits/shared_ptr_base.h +++ b/libstdc++-v3/include/bits/shared_ptr_base.h @@ -799,7 +799,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : _M_ptr(__p), _M_refcount(__r._M_refcount) // never throws { } - // generated copy constructor, assignment, destructor are fine. + __shared_ptr(const __shared_ptr&) = default; // never throws + __shared_ptr& operator=(const __shared_ptr&) = default; // never throws template::value>::type> diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc index 36cf7f9c29d..f5899d399f4 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc @@ -35,6 +35,6 @@ void test01() // { dg-error "incomplete" "" { target *-*-* } 766 } std::shared_ptr p9(ap()); // { dg-error "here" } - // { dg-error "incomplete" "" { target *-*-* } 858 } + // { dg-error "incomplete" "" { target *-*-* } 859 } } diff --git a/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc b/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc index a210d043270..046fd3c6c67 100644 --- a/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc +++ b/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc @@ -42,8 +42,8 @@ main() return 0; } -// { dg-warning "note" "" { target *-*-* } 354 } -// { dg-warning "note" "" { target *-*-* } 1085 } +// { dg-warning "note" "" { target *-*-* } 358 } +// { dg-warning "note" "" { target *-*-* } 1086 } // { dg-warning "note" "" { target *-*-* } 468 } // { dg-warning "note" "" { target *-*-* } 586 } // { dg-warning "note" "" { target *-*-* } 1049 } -- cgit v1.2.3 From b69f6802a1d495ce97b7640ec500184ec79559e0 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Wed, 4 Jan 2012 00:18:27 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182863 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 1ea3f1998dc..06922f344d0 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120103 +20120104 -- cgit v1.2.3 From 0ff04b6abfe05cc5cbfd5d4124185b812a13b670 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Wed, 4 Jan 2012 09:50:13 +0000 Subject: 2012-01-04 Richard Guenther PR tree-optimization/49651 * tree-ssa-structalias.c (type_can_have_subvars): New function. (var_can_have_subvars): Use it. (get_constraint_for_1): Only consider subfields if there can be any. * gcc.dg/tree-ssa/pta-ptrarith-1.c: Adjust. * gcc.dg/tree-ssa/pta-ptrarith-2.c: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182866 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 8 ++++++++ gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-1.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-2.c | 2 +- gcc/tree-ssa-structalias.c | 19 +++++++++++++------ 5 files changed, 29 insertions(+), 8 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 29866bb523e..0b7afad9efd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2012-01-04 Richard Guenther + + PR tree-optimization/49651 + * tree-ssa-structalias.c (type_can_have_subvars): New function. + (var_can_have_subvars): Use it. + (get_constraint_for_1): Only consider subfields if there + can be any. + 2012-01-03 Sandra Loosemore Backport from mainline: diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b024311c51c..e9ffe531c49 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2012-01-04 Richard Guenther + + PR tree-optimization/49651 + * gcc.dg/tree-ssa/pta-ptrarith-1.c: Adjust. + * gcc.dg/tree-ssa/pta-ptrarith-2.c: Likewise. + 2012-01-03 Richard Guenther Backport from mainline diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-1.c index 6db9ba0d871..2a60e1daa23 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fno-tree-ccp -fdump-tree-ealias" } */ +/* { dg-options "-O2 -fno-tree-forwprop -fno-tree-ccp -fdump-tree-ealias" } */ extern void abort (void); struct X { diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-2.c index 85b96b190e2..ddf934bf813 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-2.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fno-tree-ccp -fdump-tree-ealias" } */ +/* { dg-options "-O2 -fno-tree-forwprop -fno-tree-ccp -fdump-tree-ealias" } */ extern void abort (void); struct X { diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 9c4f5ad0735..4e1b680cddc 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -308,6 +308,7 @@ static varinfo_t first_vi_for_offset (varinfo_t, unsigned HOST_WIDE_INT); static varinfo_t first_or_preceding_vi_for_offset (varinfo_t, unsigned HOST_WIDE_INT); static varinfo_t lookup_vi_for_tree (tree); +static inline bool type_can_have_subvars (const_tree); /* Pool of variable info structures. */ static alloc_pool variable_info_pool; @@ -3353,7 +3354,8 @@ get_constraint_for_1 (tree t, VEC (ce_s, heap) **results, bool address_p, return; cs = *VEC_last (ce_s, *results); - if (cs.type == DEREF) + if (cs.type == DEREF + && type_can_have_subvars (TREE_TYPE (t))) { /* For dereferences this means we have to defer it to solving time. */ @@ -4981,6 +4983,15 @@ sort_fieldstack (VEC(fieldoff_s,heap) *fieldstack) VEC_qsort (fieldoff_s, fieldstack, fieldoff_compare); } +/* Return true if T is a type that can have subvars. */ + +static inline bool +type_can_have_subvars (const_tree t) +{ + /* Aggregates without overlapping fields can have subvars. */ + return TREE_CODE (t) == RECORD_TYPE; +} + /* Return true if V is a tree that we can have subvars for. Normally, this is any aggregate type. Also complex types which are not gimple registers can have subvars. */ @@ -4996,11 +5007,7 @@ var_can_have_subvars (const_tree v) if (!DECL_P (v)) return false; - /* Aggregates without overlapping fields can have subvars. */ - if (TREE_CODE (TREE_TYPE (v)) == RECORD_TYPE) - return true; - - return false; + return type_can_have_subvars (TREE_TYPE (v)); } /* Return true if T is a type that does contain pointers. */ -- cgit v1.2.3 From 2f44d82a16d7ba46c5b2bc77eba6d0931256031e Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Wed, 4 Jan 2012 21:37:11 +0000 Subject: PR tree-optimization/51624 * tree-sra.c (build_ref_for_model): When replicating a chain of COMPONENT_REFs, stop as soon as the offset would become negative. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182890 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/tree-sra.c | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0b7afad9efd..c9a2654764b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-01-04 Eric Botcazou + + PR tree-optimization/51624 + * tree-sra.c (build_ref_for_model): When replicating a chain of + COMPONENT_REFs, stop as soon as the offset would become negative. + 2012-01-04 Richard Guenther PR tree-optimization/49651 diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index 756fe74bd52..016c0387d77 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -1472,8 +1472,14 @@ build_ref_for_model (location_t loc, tree base, HOST_WIDE_INT offset, do { tree field = TREE_OPERAND (expr, 1); - offset -= int_bit_position (field); + HOST_WIDE_INT bit_pos = int_bit_position (field); + /* We can be called with a model different from the one associated + with BASE so we need to avoid going up the chain too far. */ + if (offset - bit_pos < 0) + break; + + offset -= bit_pos; VEC_safe_push (tree, stack, cr_stack, expr); expr = TREE_OPERAND (expr, 0); -- cgit v1.2.3 From 8f1cfd8584bae3bd3485c541d3efe12662a805d1 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 5 Jan 2012 00:18:13 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182894 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 06922f344d0..e2fec2caccc 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120104 +20120105 -- cgit v1.2.3 From a2865c4c58fa95c9e9a451c68cf51f933d5db343 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Thu, 5 Jan 2012 22:24:45 +0000 Subject: PR tree-optimization/51315 * tree-sra.c (tree_non_aligned_mem_for_access_p): New predicate. (build_accesses_from_assign): Use it instead of tree_non_aligned_mem_p. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182933 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 +++++ gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.c-torture/execute/20120105-1.c | 24 ++++++++++++++++++++ gcc/tree-sra.c | 29 +++++++++++++++++------- 4 files changed, 55 insertions(+), 8 deletions(-) create mode 100644 gcc/testsuite/gcc.c-torture/execute/20120105-1.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c9a2654764b..c020ffd20e0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-01-05 Eric Botcazou + + PR tree-optimization/51315 + * tree-sra.c (tree_non_aligned_mem_for_access_p): New predicate. + (build_accesses_from_assign): Use it instead of tree_non_aligned_mem_p. + 2012-01-04 Eric Botcazou PR tree-optimization/51624 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e9ffe531c49..6b8a0c4e3a3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2012-01-05 Eric Botcazou + + * gcc.c-torture/execute/20120104-1.c: New test. + 2012-01-04 Richard Guenther PR tree-optimization/49651 diff --git a/gcc/testsuite/gcc.c-torture/execute/20120105-1.c b/gcc/testsuite/gcc.c-torture/execute/20120105-1.c new file mode 100644 index 00000000000..115ba1509d4 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20120105-1.c @@ -0,0 +1,24 @@ +struct __attribute__((packed)) S +{ + int a, b, c; +}; + +static int __attribute__ ((noinline,noclone)) +extract(const char *p) +{ + struct S s; + __builtin_memcpy (&s, p, sizeof(struct S)); + return s.a; +} + +volatile int i; + +int main (void) +{ + char p[sizeof(struct S) + 1]; + + __builtin_memset (p, 0, sizeof(struct S) + 1); + i = extract (p + 1); + + return 0; +} diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index 016c0387d77..63eec95e126 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -1047,6 +1047,25 @@ tree_non_aligned_mem_p (tree exp, unsigned int align) return false; } +/* Return true if EXP is a memory reference less aligned than what the access + ACC would require. This is invoked only on strict-alignment targets. */ + +static bool +tree_non_aligned_mem_for_access_p (tree exp, struct access *acc) +{ + unsigned int acc_align; + + /* The alignment of the access is that of its expression. However, it may + have been artificially increased, e.g. by a local alignment promotion, + so we cap it to the alignment of the type of the base, on the grounds + that valid sub-accesses cannot be more aligned than that. */ + acc_align = get_object_alignment (acc->expr, BIGGEST_ALIGNMENT); + if (acc->base && acc_align > TYPE_ALIGN (TREE_TYPE (acc->base))) + acc_align = TYPE_ALIGN (TREE_TYPE (acc->base)); + + return tree_non_aligned_mem_p (exp, acc_align); +} + /* Scan expressions occuring in STMT, create access structures for all accesses to candidates for scalarization and remove those candidates which occur in statements or expressions that prevent them from being split apart. Return @@ -1073,10 +1092,7 @@ build_accesses_from_assign (gimple stmt) if (lacc) { lacc->grp_assignment_write = 1; - if (STRICT_ALIGNMENT - && tree_non_aligned_mem_p (rhs, - get_object_alignment (lhs, - BIGGEST_ALIGNMENT))) + if (STRICT_ALIGNMENT && tree_non_aligned_mem_for_access_p (rhs, lacc)) lacc->grp_unscalarizable_region = 1; } @@ -1086,10 +1102,7 @@ build_accesses_from_assign (gimple stmt) if (should_scalarize_away_bitmap && !gimple_has_volatile_ops (stmt) && !is_gimple_reg_type (racc->type)) bitmap_set_bit (should_scalarize_away_bitmap, DECL_UID (racc->base)); - if (STRICT_ALIGNMENT - && tree_non_aligned_mem_p (lhs, - get_object_alignment (rhs, - BIGGEST_ALIGNMENT))) + if (STRICT_ALIGNMENT && tree_non_aligned_mem_for_access_p (lhs, racc)) racc->grp_unscalarizable_region = 1; } -- cgit v1.2.3 From 029aca210deaadb922a5fda2999cbd5c55e761d4 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Fri, 6 Jan 2012 00:18:40 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182941 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index e2fec2caccc..16c7269ca96 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120105 +20120106 -- cgit v1.2.3 From 1395f66023c239074520705e9f95a7d8ecc83776 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Fri, 6 Jan 2012 10:50:38 +0000 Subject: * ada/acats/overflow.lst: Add cb20004. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182948 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/ada/acats/overflow.lst | 1 + 2 files changed, 5 insertions(+) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6b8a0c4e3a3..228cbef1086 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2012-01-06 Eric Botcazou + + * ada/acats/overflow.lst: Add cb20004. + 2012-01-05 Eric Botcazou * gcc.c-torture/execute/20120104-1.c: New test. diff --git a/gcc/testsuite/ada/acats/overflow.lst b/gcc/testsuite/ada/acats/overflow.lst index 3685a4d809f..fb76ef17705 100644 --- a/gcc/testsuite/ada/acats/overflow.lst +++ b/gcc/testsuite/ada/acats/overflow.lst @@ -14,3 +14,4 @@ c46014a c460008 c460011 c4a012b +cb20004 -- cgit v1.2.3 From 3f6c1dc8bff492e32b646ec1e078b12ee9485c4b Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Fri, 6 Jan 2012 14:56:46 +0000 Subject: gcc/ PR middle-end/48660 * expr.h (copy_blkmode_to_reg): Declare. * expr.c (copy_blkmode_to_reg): New function. (expand_assignment): Don't expand register RESULT_DECLs before the lhs. Use copy_blkmode_to_reg to copy BLKmode values into a RESULT_DECL register. (expand_expr_real_1): Handle BLKmode decls when looking for promotion. gcc/testsuite/ PR middle-end/48660 * g++.dg/pr48660.C: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182955 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 10 ++++ gcc/expr.c | 129 ++++++++++++++++++++++++++++++++++++++--- gcc/expr.h | 2 + gcc/testsuite/ChangeLog | 5 ++ gcc/testsuite/g++.dg/pr48660.C | 22 +++++++ 5 files changed, 161 insertions(+), 7 deletions(-) create mode 100644 gcc/testsuite/g++.dg/pr48660.C diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c020ffd20e0..77ac9fe034f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2012-01-06 Richard Sandiford + + PR middle-end/48660 + * expr.h (copy_blkmode_to_reg): Declare. + * expr.c (copy_blkmode_to_reg): New function. + (expand_assignment): Don't expand register RESULT_DECLs before + the lhs. Use copy_blkmode_to_reg to copy BLKmode values into a + RESULT_DECL register. + (expand_expr_real_1): Handle BLKmode decls when looking for promotion. + 2012-01-05 Eric Botcazou PR tree-optimization/51315 diff --git a/gcc/expr.c b/gcc/expr.c index 6bf9f2489da..f20d745ea43 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -2180,6 +2180,111 @@ copy_blkmode_from_reg (rtx tgtblk, rtx srcreg, tree type) return tgtblk; } +/* Copy BLKmode value SRC into a register of mode MODE. Return the + register if it contains any data, otherwise return null. + + This is used on targets that return BLKmode values in registers. */ + +rtx +copy_blkmode_to_reg (enum machine_mode mode, tree src) +{ + int i, n_regs; + unsigned HOST_WIDE_INT bitpos, xbitpos, padding_correction = 0, bytes; + unsigned int bitsize; + rtx *dst_words, dst, x, src_word = NULL_RTX, dst_word = NULL_RTX; + enum machine_mode dst_mode; + + gcc_assert (TYPE_MODE (TREE_TYPE (src)) == BLKmode); + + x = expand_normal (src); + + bytes = int_size_in_bytes (TREE_TYPE (src)); + if (bytes == 0) + return NULL_RTX; + + /* If the structure doesn't take up a whole number of words, see + whether the register value should be padded on the left or on + the right. Set PADDING_CORRECTION to the number of padding + bits needed on the left side. + + In most ABIs, the structure will be returned at the least end of + the register, which translates to right padding on little-endian + targets and left padding on big-endian targets. The opposite + holds if the structure is returned at the most significant + end of the register. */ + if (bytes % UNITS_PER_WORD != 0 + && (targetm.calls.return_in_msb (TREE_TYPE (src)) + ? !BYTES_BIG_ENDIAN + : BYTES_BIG_ENDIAN)) + padding_correction = (BITS_PER_WORD - ((bytes % UNITS_PER_WORD) + * BITS_PER_UNIT)); + + n_regs = (bytes + UNITS_PER_WORD - 1) / UNITS_PER_WORD; + dst_words = XALLOCAVEC (rtx, n_regs); + bitsize = MIN (TYPE_ALIGN (TREE_TYPE (src)), BITS_PER_WORD); + + /* Copy the structure BITSIZE bits at a time. */ + for (bitpos = 0, xbitpos = padding_correction; + bitpos < bytes * BITS_PER_UNIT; + bitpos += bitsize, xbitpos += bitsize) + { + /* We need a new destination pseudo each time xbitpos is + on a word boundary and when xbitpos == padding_correction + (the first time through). */ + if (xbitpos % BITS_PER_WORD == 0 + || xbitpos == padding_correction) + { + /* Generate an appropriate register. */ + dst_word = gen_reg_rtx (word_mode); + dst_words[xbitpos / BITS_PER_WORD] = dst_word; + + /* Clear the destination before we move anything into it. */ + emit_move_insn (dst_word, CONST0_RTX (word_mode)); + } + + /* We need a new source operand each time bitpos is on a word + boundary. */ + if (bitpos % BITS_PER_WORD == 0) + src_word = operand_subword_force (x, bitpos / BITS_PER_WORD, BLKmode); + + /* Use bitpos for the source extraction (left justified) and + xbitpos for the destination store (right justified). */ + store_bit_field (dst_word, bitsize, xbitpos % BITS_PER_WORD, word_mode, + extract_bit_field (src_word, bitsize, + bitpos % BITS_PER_WORD, 1, false, + NULL_RTX, word_mode, word_mode)); + } + + if (mode == BLKmode) + { + /* Find the smallest integer mode large enough to hold the + entire structure. */ + for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT); + mode != VOIDmode; + mode = GET_MODE_WIDER_MODE (mode)) + /* Have we found a large enough mode? */ + if (GET_MODE_SIZE (mode) >= bytes) + break; + + /* A suitable mode should have been found. */ + gcc_assert (mode != VOIDmode); + } + + if (GET_MODE_SIZE (mode) < GET_MODE_SIZE (word_mode)) + dst_mode = word_mode; + else + dst_mode = mode; + dst = gen_reg_rtx (dst_mode); + + for (i = 0; i < n_regs; i++) + emit_move_insn (operand_subword (dst, i, 0, dst_mode), dst_words[i]); + + if (mode != dst_mode) + dst = gen_lowpart (mode, dst); + + return dst; +} + /* Add a USE expression for REG to the (possibly empty) list pointed to by CALL_FUSAGE. REG must denote a hard register. */ @@ -4382,7 +4487,9 @@ expand_assignment (tree to, tree from, bool nontemporal) if (TREE_CODE (from) == CALL_EXPR && ! aggregate_value_p (from, from) && COMPLETE_TYPE_P (TREE_TYPE (from)) && TREE_CODE (TYPE_SIZE (TREE_TYPE (from))) == INTEGER_CST - && ! (((TREE_CODE (to) == VAR_DECL || TREE_CODE (to) == PARM_DECL) + && ! (((TREE_CODE (to) == VAR_DECL + || TREE_CODE (to) == PARM_DECL + || TREE_CODE (to) == RESULT_DECL) && REG_P (DECL_RTL (to))) || TREE_CODE (to) == SSA_NAME)) { @@ -4428,12 +4535,15 @@ expand_assignment (tree to, tree from, bool nontemporal) rtx temp; push_temp_slots (); - temp = expand_expr (from, NULL_RTX, GET_MODE (to_rtx), EXPAND_NORMAL); + if (REG_P (to_rtx) && TYPE_MODE (TREE_TYPE (from)) == BLKmode) + temp = copy_blkmode_to_reg (GET_MODE (to_rtx), from); + else + temp = expand_expr (from, NULL_RTX, GET_MODE (to_rtx), EXPAND_NORMAL); if (GET_CODE (to_rtx) == PARALLEL) emit_group_load (to_rtx, temp, TREE_TYPE (from), int_size_in_bytes (TREE_TYPE (from))); - else + else if (temp) emit_move_insn (to_rtx, temp); preserve_temp_slots (to_rtx); @@ -8533,10 +8643,15 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, return temp; } - /* If the mode of DECL_RTL does not match that of the decl, it - must be a promoted value. We return a SUBREG of the wanted mode, - but mark it so that we know that it was already extended. */ - if (REG_P (decl_rtl) && GET_MODE (decl_rtl) != DECL_MODE (exp)) + /* If the mode of DECL_RTL does not match that of the decl, + there are two cases: we are dealing with a BLKmode value + that is returned in a register, or we are dealing with + a promoted value. In the latter case, return a SUBREG + of the wanted mode, but mark it so that we know that it + was already extended. */ + if (REG_P (decl_rtl) + && DECL_MODE (exp) != BLKmode + && GET_MODE (decl_rtl) != DECL_MODE (exp)) { enum machine_mode pmode; diff --git a/gcc/expr.h b/gcc/expr.h index b6e6e6b0cab..eff6db2b4e4 100644 --- a/gcc/expr.h +++ b/gcc/expr.h @@ -324,6 +324,8 @@ extern void emit_group_store (rtx, rtx, tree, int); /* Copy BLKmode object from a set of registers. */ extern rtx copy_blkmode_from_reg (rtx, rtx, tree); +extern rtx copy_blkmode_to_reg (enum machine_mode, tree); + /* Mark REG as holding a parameter for the next CALL_INSN. */ extern void use_reg (rtx *, rtx); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 228cbef1086..8a597258c50 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-01-06 Richard Sandiford + + PR middle-end/48660 + * g++.dg/pr48660.C: New test. + 2012-01-06 Eric Botcazou * ada/acats/overflow.lst: Add cb20004. diff --git a/gcc/testsuite/g++.dg/pr48660.C b/gcc/testsuite/g++.dg/pr48660.C new file mode 100644 index 00000000000..37b61741ada --- /dev/null +++ b/gcc/testsuite/g++.dg/pr48660.C @@ -0,0 +1,22 @@ +template struct val { char a[N]; }; + +class Base +{ +public: + virtual val<1> get1() const = 0; + virtual val<2> get2() const = 0; + virtual val<3> get3() const = 0; + virtual val<4> get4() const = 0; +}; + +class Derived : public virtual Base +{ +public: + virtual val<1> get1() const { return foo->get1(); } + virtual val<2> get2() const { return foo->get2(); } + virtual val<3> get3() const { return foo->get3(); } + virtual val<4> get4() const { return foo->get4(); } + Base *foo; +}; + +Base* make() { return new Derived; } -- cgit v1.2.3 From 67635c57ddac95ab6966e577ace27680437cf05d Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Fri, 6 Jan 2012 18:03:30 +0000 Subject: Backport from mainline 2012-01-06 Arnaud Charlet * c-decl.c (ext_block): Moved up. (collect_all_refs, for_each_global_decl): Take ext_block into account. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182960 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 8 ++++++++ gcc/c-decl.c | 11 ++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 77ac9fe034f..3437317c72f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2012-01-06 Eric Botcazou + + Backport from mainline + 2012-01-06 Arnaud Charlet + + * c-decl.c (ext_block): Moved up. + (collect_all_refs, for_each_global_decl): Take ext_block into account. + 2012-01-06 Richard Sandiford PR middle-end/48660 diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 0335cda5598..b148f5e22f7 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -9782,6 +9782,9 @@ collect_source_ref_cb (tree decl) collect_source_ref (LOCATION_FILE (decl_sloc (decl, false))); } +/* Preserve the external declarations scope across a garbage collect. */ +static GTY(()) tree ext_block; + /* Collect all references relevant to SOURCE_FILE. */ static void @@ -9792,6 +9795,8 @@ collect_all_refs (const char *source_file) FOR_EACH_VEC_ELT (tree, all_translation_units, i, t) collect_ada_nodes (BLOCK_VARS (DECL_INITIAL (t)), source_file); + + collect_ada_nodes (BLOCK_VARS (ext_block), source_file); } /* Iterate over all global declarations and call CALLBACK. */ @@ -9810,10 +9815,10 @@ for_each_global_decl (void (*callback) (tree decl)) for (decl = BLOCK_VARS (decls); decl; decl = TREE_CHAIN (decl)) callback (decl); } -} -/* Preserve the external declarations scope across a garbage collect. */ -static GTY(()) tree ext_block; + for (decl = BLOCK_VARS (ext_block); decl; decl = TREE_CHAIN (decl)) + callback (decl); +} void c_write_global_declarations (void) -- cgit v1.2.3 From 067b083ac7f760535d8a0b8d24e585e1b6e6571a Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sat, 7 Jan 2012 00:18:43 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182978 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 16c7269ca96..4e5182ad75f 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120106 +20120107 -- cgit v1.2.3 From 4410130f76033f4d7c743950f0a02cd8b12beab0 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sun, 8 Jan 2012 00:19:04 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182987 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 4e5182ad75f..20d377523b5 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120107 +20120108 -- cgit v1.2.3 From 2f4c8a75827cc25957f5f28675227525cfafed1e Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Mon, 9 Jan 2012 00:18:32 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182998 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 20d377523b5..adfab7b9730 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120108 +20120109 -- cgit v1.2.3 From 9d5bd1cc2aa69c090a08c99c1448cf01ab088484 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Mon, 9 Jan 2012 09:50:42 +0000 Subject: PR ada/41929 * config/sparc/sol2-unwind.h (sparc64_is_sighandler): Remove SAVPC and add CFA. Revert back to old code for Solaris 8+ multi-threaded. (sparc_is_sighandler): Likewise. (MD_FALLBACK_FRAME_STATE_FOR): Adjust call to IS_SIGHANDLER. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183006 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 8 +++ gcc/config/sparc/sol2-unwind.h | 129 ++++++++++++++++++++++++++++------------- 2 files changed, 96 insertions(+), 41 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3437317c72f..e4cb8ccded1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2012-01-09 Eric Botcazou + + PR ada/41929 + * config/sparc/sol2-unwind.h (sparc64_is_sighandler): Remove SAVPC and + add CFA. Revert back to old code for Solaris 8+ multi-threaded. + (sparc_is_sighandler): Likewise. + (MD_FALLBACK_FRAME_STATE_FOR): Adjust call to IS_SIGHANDLER. + 2012-01-06 Eric Botcazou Backport from mainline diff --git a/gcc/config/sparc/sol2-unwind.h b/gcc/config/sparc/sol2-unwind.h index f8b99027247..ae7a5717269 100644 --- a/gcc/config/sparc/sol2-unwind.h +++ b/gcc/config/sparc/sol2-unwind.h @@ -1,5 +1,5 @@ /* DWARF2 EH unwinding support for SPARC Solaris. - Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. + Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This file is part of GCC. @@ -34,7 +34,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define IS_SIGHANDLER sparc64_is_sighandler static int -sparc64_is_sighandler (unsigned int *pc, unsigned int *savpc, int *nframes) +sparc64_is_sighandler (unsigned int *pc, void *cfa, int *nframes) { if (/* Solaris 8 - single-threaded ---------------------------- @@ -110,38 +110,59 @@ sparc64_is_sighandler (unsigned int *pc, unsigned int *savpc, int *nframes) && pc[ 0] == 0x81c7e008 && pc[ 1] == 0x81e80000) { - if (/* Solaris 8 /usr/lib/sparcv9/libthread.so.1 - ------------------------------------------ - Before patch 108827-08: - : st %g4, [ %i1 + 0x1c ] - - Since patch 108827-08: - : st %l0, [ %i4 + 0x10 ] */ - savpc[-1] == 0xc826601c - || savpc[-1] == 0xe0272010) + /* We have observed different calling frames among different + versions of the operating system, so that we need to + discriminate using the upper frame. We look for the return + address of the caller frame (there is an offset of 15 double + words between the frame address and the place where this return + address is stored) in order to do some more pattern matching. */ + unsigned int cuh_pattern + = *(unsigned int *)(*(unsigned long *)(cfa + 15*8) - 4); + + if (cuh_pattern == 0xd25fa7ef) { - /* We need to move up three frames: + /* This matches the call_user_handler pattern for Solaris 10. + There are 2 cases so we look for the return address of the + caller's caller frame in order to do more pattern matching. */ + unsigned int sah_pattern + = *(unsigned int *)(*(unsigned long *)(cfa + 176 + 15*8) - 4); + + if (sah_pattern == 0x92100019) + /* This is the same setup as for Solaris 9, see below. */ + *nframes = 3; + else + /* The sigacthandler frame isn't present in the chain. + We need to move up two frames: <-- context->cfa __sighndlr - sigacthandler + call_user_handler frame - */ - *nframes = 2; + */ + *nframes = 2; } - else /* Solaris 8 /usr/lib/lwp/sparcv9/libthread.so.1, Solaris 9+ - ---------------------------------------------------------- */ - { - /* We need to move up three frames: + else if (cuh_pattern == 0x9410001a || cuh_pattern == 0x94100013) + /* This matches the call_user_handler pattern for Solaris 9 and + for Solaris 8 running inside Solaris Containers respectively + We need to move up three frames: <-- context->cfa __sighndlr call_user_handler sigacthandler - */ - *nframes = 3; - } + */ + *nframes = 3; + else + /* This is the default Solaris 8 case. + We need to move up two frames: + + <-- context->cfa + __sighndlr + sigacthandler + + */ + *nframes = 2; return 1; } @@ -172,7 +193,7 @@ sparc64_frob_update_context (struct _Unwind_Context *context, #define IS_SIGHANDLER sparc_is_sighandler static int -sparc_is_sighandler (unsigned int *pc, unsigned int * savpc, int *nframes) +sparc_is_sighandler (unsigned int *pc, void *cfa, int *nframes) { if (/* Solaris 8, 9 - single-threaded ------------------------------- @@ -200,7 +221,7 @@ sparc_is_sighandler (unsigned int *pc, unsigned int * savpc, int *nframes) && pc[-1] == 0x9410001a && pc[ 0] == 0x80a62008) { - /* Need to move up one frame: + /* We need to move up one frame: <-- context->cfa sigacthandler @@ -231,7 +252,7 @@ sparc_is_sighandler (unsigned int *pc, unsigned int * savpc, int *nframes) && pc[ 1] == 0x81e80000 && pc[ 2] == 0x80a26000) { - /* Need to move up one frame: + /* We need to move up one frame: <-- context->cfa __libthread_segvhdlr @@ -258,33 +279,59 @@ sparc_is_sighandler (unsigned int *pc, unsigned int * savpc, int *nframes) && pc[ 0] == 0x81c7e008 && pc[ 1] == 0x81e80000) { - if (/* Solaris 8 /usr/lib/libthread.so.1 - ---------------------------------- - : mov %i0, %o0 */ - savpc[-1] == 0x90100018) + /* We have observed different calling frames among different + versions of the operating system, so that we need to + discriminate using the upper frame. We look for the return + address of the caller frame (there is an offset of 15 words + between the frame address and the place where this return + address is stored) in order to do some more pattern matching. */ + unsigned int cuh_pattern + = *(unsigned int *)(*(unsigned int *)(cfa + 15*4) - 4); + + if (cuh_pattern == 0xd407a04c) { - /* We need to move up two frames: + /* This matches the call_user_handler pattern for Solaris 10. + There are 2 cases so we look for the return address of the + caller's caller frame in order to do more pattern matching. */ + unsigned int sah_pattern + = *(unsigned int *)(*(unsigned int *)(cfa + 96 + 15*4) - 4); + + if (sah_pattern == 0x92100019) + /* This is the same setup as for Solaris 9, see below. */ + *nframes = 3; + else + /* The sigacthandler frame isn't present in the chain. + We need to move up two frames: <-- context->cfa __sighndlr - sigacthandler + call_user_handler frame - */ - *nframes = 2; + */ + *nframes = 2; } - else /* Solaris 8 /usr/lib/lwp/libthread.so.1, Solaris 9+ - -------------------------------------------------- */ - { - /* We need to move up three frames: + else if (cuh_pattern == 0x9410001a || cuh_pattern == 0x9410001b) + /* This matches the call_user_handler pattern for Solaris 9 and + for Solaris 8 running inside Solaris Containers respectively. + We need to move up three frames: <-- context->cfa __sighndlr call_user_handler sigacthandler - */ - *nframes = 3; - } + */ + *nframes = 3; + else + /* This is the default Solaris 8 case. + We need to move up two frames: + + <-- context->cfa + __sighndlr + sigacthandler + + */ + *nframes = 2; return 1; } @@ -322,7 +369,7 @@ MD_FALLBACK_FRAME_STATE_FOR (struct _Unwind_Context *context, return _URC_NO_REASON; } - if (IS_SIGHANDLER (pc, (unsigned int *)fp->fr_savpc, &nframes)) + if (IS_SIGHANDLER (pc, this_cfa, &nframes)) { struct handler_args { struct frame frwin; -- cgit v1.2.3 From f08ef609bd32a16a0e72dbd91977ab73f8813f8e Mon Sep 17 00:00:00 2001 From: Andrew Stubbs Date: Mon, 9 Jan 2012 11:44:22 +0000 Subject: 2012-01-09 Andrew Stubbs Backport from mainline: 2012-01-06 Andrew Stubbs * gcc.target/arm/headmerge-2.c: Adjust scan pattern. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183009 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 8 ++++++++ gcc/testsuite/gcc.target/arm/headmerge-2.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8a597258c50..531c585ab68 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2012-01-09 Andrew Stubbs + + Backport from mainline: + + 2012-01-06 Andrew Stubbs + + * gcc.target/arm/headmerge-2.c: Adjust scan pattern. + 2012-01-06 Richard Sandiford PR middle-end/48660 diff --git a/gcc/testsuite/gcc.target/arm/headmerge-2.c b/gcc/testsuite/gcc.target/arm/headmerge-2.c index 36637a64eb3..17d8e9365c5 100644 --- a/gcc/testsuite/gcc.target/arm/headmerge-2.c +++ b/gcc/testsuite/gcc.target/arm/headmerge-2.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2" } */ -/* { dg-final { scan-assembler-times "120" 1 } } */ +/* { dg-final { scan-assembler-times "120\n" 1 } } */ extern void foo1 (int); extern void foo2 (int); -- cgit v1.2.3 From 988186b034b41cd5e0b9192ef601a0e6f70e96b7 Mon Sep 17 00:00:00 2001 From: Ramana Radhakrishnan Date: Mon, 9 Jan 2012 16:55:16 +0000 Subject: 2012-01-09 Ramana Radhakrishnan Backport from mainline 2011-11-04 Jiangning Liu PR rtl-optimization/38644 * config/arm/arm.c (thumb1_expand_epilogue): Add memory barrier for epilogue having stack adjustment. 2012-01-09 Ramana Radhakrishnan Backport from mainline: 2011-11-04 Jiangning Liu PR rtl-optimization/38644 * gcc.target/arm/stack-red-zone.c: New. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183019 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 9 +++++++++ gcc/config/arm/arm.c | 2 ++ gcc/testsuite/ChangeLog | 8 ++++++++ gcc/testsuite/gcc.target/arm/stack-red-zone.c | 12 ++++++++++++ 4 files changed, 31 insertions(+) create mode 100644 gcc/testsuite/gcc.target/arm/stack-red-zone.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e4cb8ccded1..ca61c0ba976 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2012-01-09 Ramana Radhakrishnan + + Backport from mainline + 2011-11-04 Jiangning Liu + + PR rtl-optimization/38644 + * config/arm/arm.c (thumb1_expand_epilogue): Add memory barrier + for epilogue having stack adjustment. + 2012-01-09 Eric Botcazou PR ada/41929 diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 0683fc63419..d7316524d9e 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -20867,6 +20867,8 @@ thumb1_expand_epilogue (void) gcc_assert (amount >= 0); if (amount) { + emit_insn (gen_blockage ()); + if (amount < 512) emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, GEN_INT (amount))); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 531c585ab68..84faeb2155e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2012-01-09 Ramana Radhakrishnan + + Backport from mainline: + 2011-11-04 Jiangning Liu + + PR rtl-optimization/38644 + * gcc.target/arm/stack-red-zone.c: New. + 2012-01-09 Andrew Stubbs Backport from mainline: diff --git a/gcc/testsuite/gcc.target/arm/stack-red-zone.c b/gcc/testsuite/gcc.target/arm/stack-red-zone.c new file mode 100644 index 00000000000..b9f0f99371e --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/stack-red-zone.c @@ -0,0 +1,12 @@ +/* No stack red zone. PR38644. */ +/* { dg-options "-mthumb -O2" } */ +/* { dg-final { scan-assembler "ldrb\[^\n\]*\\n\[\t \]*add\[\t \]*sp" } } */ + +extern int doStreamReadBlock (int *, char *, int size, int); + +char readStream (int *s) +{ + char c = 0; + doStreamReadBlock (s, &c, 1, *s); + return c; +} -- cgit v1.2.3 From cd9286f2e7768a7a2f5fff12515cf54df765faa7 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Mon, 9 Jan 2012 18:21:52 +0000 Subject: * config/sparc/sol2-unwind.h (sparc64_is_sighandler): Check that the purported sigacthandler address isn't null before dereferencing it. (sparc_is_sighandler): Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183021 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/config/sparc/sol2-unwind.h | 10 ++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ca61c0ba976..fd296121e94 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-01-09 Eric Botcazou + + * config/sparc/sol2-unwind.h (sparc64_is_sighandler): Check that the + purported sigacthandler address isn't null before dereferencing it. + (sparc_is_sighandler): Likewise. + 2012-01-09 Ramana Radhakrishnan Backport from mainline diff --git a/gcc/config/sparc/sol2-unwind.h b/gcc/config/sparc/sol2-unwind.h index ae7a5717269..db108074250 100644 --- a/gcc/config/sparc/sol2-unwind.h +++ b/gcc/config/sparc/sol2-unwind.h @@ -124,10 +124,9 @@ sparc64_is_sighandler (unsigned int *pc, void *cfa, int *nframes) /* This matches the call_user_handler pattern for Solaris 10. There are 2 cases so we look for the return address of the caller's caller frame in order to do more pattern matching. */ - unsigned int sah_pattern - = *(unsigned int *)(*(unsigned long *)(cfa + 176 + 15*8) - 4); + unsigned long sah_address = *(unsigned long *)(cfa + 176 + 15*8); - if (sah_pattern == 0x92100019) + if (sah_address && *(unsigned int *)(sah_address - 4) == 0x92100019) /* This is the same setup as for Solaris 9, see below. */ *nframes = 3; else @@ -293,10 +292,9 @@ sparc_is_sighandler (unsigned int *pc, void *cfa, int *nframes) /* This matches the call_user_handler pattern for Solaris 10. There are 2 cases so we look for the return address of the caller's caller frame in order to do more pattern matching. */ - unsigned int sah_pattern - = *(unsigned int *)(*(unsigned int *)(cfa + 96 + 15*4) - 4); + unsigned int sah_address = *(unsigned int *)(cfa + 96 + 15*4); - if (sah_pattern == 0x92100019) + if (sah_address && *(unsigned int *)(sah_address - 4) == 0x92100019) /* This is the same setup as for Solaris 9, see below. */ *nframes = 3; else -- cgit v1.2.3 From 7a31fb84c51b186b96ea0b95e5362a4b56cd64f5 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Mon, 9 Jan 2012 19:31:14 +0000 Subject: * gcc-interface/trans.c (addressable_p) : Fix thinko. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183026 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/ChangeLog | 4 ++++ gcc/ada/gcc-interface/trans.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 6b52cbfab08..fa04c33ac47 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +2012-01-09 Eric Botcazou + + * gcc-interface/trans.c (addressable_p) : Fix thinko. + 2012-01-02 Eric Botcazou * gnatvsn.ads (Current_Year): Bump to 2011. diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 29253958d37..e84ff3652cc 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -6,7 +6,7 @@ * * * C Implementation File * * * - * Copyright (C) 1992-2011, Free Software Foundation, Inc. * + * Copyright (C) 1992-2012, Free Software Foundation, Inc. * * * * GNAT is free software; you can redistribute it and/or modify it under * * terms of the GNU General Public License as published by the Free Soft- * @@ -7409,7 +7409,7 @@ addressable_p (tree gnu_expr, tree gnu_type) || DECL_ALIGN (TREE_OPERAND (gnu_expr, 1)) >= TYPE_ALIGN (TREE_TYPE (gnu_expr)))) /* The field of a padding record is always addressable. */ - || TYPE_PADDING_P (TREE_TYPE (TREE_OPERAND (gnu_expr, 0)))) + || TYPE_IS_PADDING_P (TREE_TYPE (TREE_OPERAND (gnu_expr, 0)))) && addressable_p (TREE_OPERAND (gnu_expr, 0), NULL_TREE)); case ARRAY_REF: case ARRAY_RANGE_REF: -- cgit v1.2.3 From e1d515cfb33be5083b73299d462392aff795bd70 Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Mon, 9 Jan 2012 20:03:08 +0000 Subject: 2012-01-09 Martin Jambor PR tree-optimization/51759 * g++.dg/ipa/pr51759.C: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183031 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/ipa/pr51759.C | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 gcc/testsuite/g++.dg/ipa/pr51759.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 84faeb2155e..bb3db623c9f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-01-09 Martin Jambor + + PR tree-optimization/51759 + * g++.dg/ipa/pr51759.C: New test. + 2012-01-09 Ramana Radhakrishnan Backport from mainline: diff --git a/gcc/testsuite/g++.dg/ipa/pr51759.C b/gcc/testsuite/g++.dg/ipa/pr51759.C new file mode 100644 index 00000000000..accfaf2dcc2 --- /dev/null +++ b/gcc/testsuite/g++.dg/ipa/pr51759.C @@ -0,0 +1,26 @@ +/* { dg-do run } */ +/* { dg-options "-O2" } */ + +extern "C" void abort (void); +struct S +{ + void __attribute__((noinline)) set(unsigned val) + { + data = val; + if (data != val) + abort (); + } + int pad0; + unsigned pad1 : 8; + unsigned data : 24; + int pad2; +}; +int main() +{ + S s; + s.pad2 = -1; + s.set(0); + if (s.pad2 != -1) + abort (); +} + -- cgit v1.2.3 From 9ea1c7d18404651415d6a86f9fda429e99eee87a Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Mon, 9 Jan 2012 22:09:53 +0000 Subject: gcc/ * config/mips/mips.md (loadgp_newabi_): Add missing earlyclobber. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183035 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/config/mips/mips.md | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fd296121e94..feb3646527d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-01-09 Richard Sandiford + + * config/mips/mips.md (loadgp_newabi_): Add missing + earlyclobber. + 2012-01-09 Eric Botcazou * config/sparc/sol2-unwind.h (sparc64_is_sighandler): Check that the diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md index bb871036327..e629db7a768 100644 --- a/gcc/config/mips/mips.md +++ b/gcc/config/mips/mips.md @@ -4707,7 +4707,7 @@ ;; of _gp from the start of this function. Operand 1 is the incoming ;; function address. (define_insn_and_split "loadgp_newabi_" - [(set (match_operand:P 0 "register_operand" "=d") + [(set (match_operand:P 0 "register_operand" "=&d") (unspec:P [(match_operand:P 1) (match_operand:P 2 "register_operand" "d")] UNSPEC_LOADGP))] -- cgit v1.2.3 From 8cc2dac0ad3666465a6471dcb1ec65d6f78a1583 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Tue, 10 Jan 2012 00:18:24 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183046 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index adfab7b9730..32973fad52b 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120109 +20120110 -- cgit v1.2.3 From 6832afc924d12874c01e39564d4e326f427eea40 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 10 Jan 2012 16:55:40 +0000 Subject: Revert: 2008-09-18 Andrew Pinski PR rtl-opt/37451 * loop-doloop.c (doloop_modify): New argument zero_extend_p and zero extend count after the correction to it is done. (doloop_optimize): Update call to doloop_modify, don't zero extend count before call. 2008-11-03 Andrew Pinski PR rtl-opt/37782 * loop-doloop.c (doloop_modify): Add from_mode argument that says what mode count is in. (doloop_optimize): Update call to doloop_modify. testsuite: * gcc.c-torture/execute/doloop-1.c, gcc.c-torture/execute/doloop-2.c: New tests. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183071 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 19 +++++++++++++++++++ gcc/loop-doloop.c | 20 ++++++-------------- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.c-torture/execute/doloop-1.c | 18 ++++++++++++++++++ gcc/testsuite/gcc.c-torture/execute/doloop-2.c | 18 ++++++++++++++++++ 5 files changed, 66 insertions(+), 14 deletions(-) create mode 100644 gcc/testsuite/gcc.c-torture/execute/doloop-1.c create mode 100644 gcc/testsuite/gcc.c-torture/execute/doloop-2.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index feb3646527d..a7fcb1769d7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,22 @@ +2012-01-10 Joseph Myers + + Revert: + + 2008-09-18 Andrew Pinski + + PR rtl-opt/37451 + * loop-doloop.c (doloop_modify): New argument zero_extend_p and + zero extend count after the correction to it is done. + (doloop_optimize): Update call to doloop_modify, don't zero extend + count before call. + + 2008-11-03 Andrew Pinski + + PR rtl-opt/37782 + * loop-doloop.c (doloop_modify): Add from_mode argument that says what + mode count is in. + (doloop_optimize): Update call to doloop_modify. + 2012-01-09 Richard Sandiford * config/mips/mips.md (loadgp_newabi_): Add missing diff --git a/gcc/loop-doloop.c b/gcc/loop-doloop.c index 1833954595f..dcc20b191ad 100644 --- a/gcc/loop-doloop.c +++ b/gcc/loop-doloop.c @@ -334,14 +334,11 @@ add_test (rtx cond, edge *e, basic_block dest) describes the loop, DESC describes the number of iterations of the loop, and DOLOOP_INSN is the low-overhead looping insn to emit at the end of the loop. CONDITION is the condition separated from the - DOLOOP_SEQ. COUNT is the number of iterations of the LOOP. - ZERO_EXTEND_P says to zero extend COUNT after the increment of it to - word_mode from FROM_MODE. */ + DOLOOP_SEQ. COUNT is the number of iterations of the LOOP. */ static void doloop_modify (struct loop *loop, struct niter_desc *desc, - rtx doloop_seq, rtx condition, rtx count, - bool zero_extend_p, enum machine_mode from_mode) + rtx doloop_seq, rtx condition, rtx count) { rtx counter_reg; rtx tmp, noloop = NULL_RTX; @@ -415,11 +412,7 @@ doloop_modify (struct loop *loop, struct niter_desc *desc, } if (increment_count) - count = simplify_gen_binary (PLUS, from_mode, count, const1_rtx); - - if (zero_extend_p) - count = simplify_gen_unary (ZERO_EXTEND, word_mode, - count, from_mode); + count = simplify_gen_binary (PLUS, mode, count, const1_rtx); /* Insert initialization of the count register into the loop header. */ start_sequence (); @@ -555,7 +548,6 @@ doloop_optimize (struct loop *loop) struct niter_desc *desc; unsigned word_mode_size; unsigned HOST_WIDE_INT word_mode_max; - bool zero_extend_p = false; if (dump_file) fprintf (dump_file, "Doloop: Processing loop %d.\n", loop->num); @@ -630,7 +622,8 @@ doloop_optimize (struct loop *loop) { if (word_mode_size > GET_MODE_BITSIZE (mode)) { - zero_extend_p = true; + count = simplify_gen_unary (ZERO_EXTEND, word_mode, + count, mode); iterations = simplify_gen_unary (ZERO_EXTEND, word_mode, iterations, mode); iterations_max = simplify_gen_unary (ZERO_EXTEND, word_mode, @@ -674,8 +667,7 @@ doloop_optimize (struct loop *loop) return false; } - doloop_modify (loop, desc, doloop_seq, condition, count, - zero_extend_p, mode); + doloop_modify (loop, desc, doloop_seq, condition, count); return true; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bb3db623c9f..ef596d40b78 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-01-10 Joseph Myers + + * gcc.c-torture/execute/doloop-1.c, + gcc.c-torture/execute/doloop-2.c: New tests. + 2012-01-09 Martin Jambor PR tree-optimization/51759 diff --git a/gcc/testsuite/gcc.c-torture/execute/doloop-1.c b/gcc/testsuite/gcc.c-torture/execute/doloop-1.c new file mode 100644 index 00000000000..d2394a62ec2 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/doloop-1.c @@ -0,0 +1,18 @@ +#include + +extern void exit (int); +extern void abort (void); + +volatile unsigned int i; + +int +main (void) +{ + unsigned char z = 0; + + do ++i; + while (--z > 0); + if (i != UCHAR_MAX + 1U) + abort (); + exit (0); +} diff --git a/gcc/testsuite/gcc.c-torture/execute/doloop-2.c b/gcc/testsuite/gcc.c-torture/execute/doloop-2.c new file mode 100644 index 00000000000..f9811800269 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/doloop-2.c @@ -0,0 +1,18 @@ +#include + +extern void exit (int); +extern void abort (void); + +volatile unsigned int i; + +int +main (void) +{ + unsigned short z = 0; + + do ++i; + while (--z > 0); + if (i != USHRT_MAX + 1U) + abort (); + exit (0); +} -- cgit v1.2.3 From 2af1c4184692657f40722fb9ded1b32ff48cf09f Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Wed, 11 Jan 2012 00:18:13 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183084 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 32973fad52b..f620a75d289 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120110 +20120111 -- cgit v1.2.3 From baed584e4fdeb6505490079a651906f1c01da0d3 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 12 Jan 2012 00:17:43 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183116 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index f620a75d289..c1e4f87b996 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120111 +20120112 -- cgit v1.2.3 From f670fdb2a3ede74c4122d6e4042cf6dbc6c5654f Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Thu, 12 Jan 2012 10:33:42 +0000 Subject: * config/i386/i386.md (*zero_extendsidi2_rex64): Correct movl template. (x86_shift_adj_1): Remove operand constraint from operand 3. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183125 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 11 +++++++---- gcc/config/i386/i386.md | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a7fcb1769d7..d18fb9dfb6c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-01-12 Uros Bizjak + + * config/i386/i386.md (*zero_extendsidi2_rex64): Correct movl template. + (x86_shift_adj_1): Remove operand constraint from operand 3. + 2012-01-10 Joseph Myers Revert: @@ -19,8 +24,7 @@ 2012-01-09 Richard Sandiford - * config/mips/mips.md (loadgp_newabi_): Add missing - earlyclobber. + * config/mips/mips.md (loadgp_newabi_): Add missing earlyclobber. 2012-01-09 Eric Botcazou @@ -80,8 +84,7 @@ PR tree-optimization/49651 * tree-ssa-structalias.c (type_can_have_subvars): New function. (var_can_have_subvars): Use it. - (get_constraint_for_1): Only consider subfields if there - can be any. + (get_constraint_for_1): Only consider subfields if there can be any. 2012-01-03 Sandra Loosemore diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index b1d7e5eba43..2067674f59f 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -3647,7 +3647,7 @@ (match_operand:SI 1 "nonimmediate_operand" "rm,0,r ,m ,r ,m")))] "TARGET_64BIT" "@ - mov\t{%k1, %k0|%k0, %k1} + mov{l}\t{%1, %k0|%k0, %1} # movd\t{%1, %0|%0, %1} movd\t{%1, %0|%0, %1} @@ -9222,7 +9222,7 @@ (match_dup 0))) (set (match_dup 1) (if_then_else:SWI48 (ne (reg:CCZ FLAGS_REG) (const_int 0)) - (match_operand:SWI48 3 "register_operand" "r") + (match_operand:SWI48 3 "register_operand" "") (match_dup 1)))] "TARGET_CMOVE" "operands[4] = GEN_INT (GET_MODE_BITSIZE (mode));") -- cgit v1.2.3 From 4dd9e764852820c93a47d14192020fc5bd99c941 Mon Sep 17 00:00:00 2001 From: Matthew Gretton-Dann Date: Thu, 12 Jan 2012 14:45:00 +0000 Subject: Backport from mainline 2012-01-11 Matthew Gretton-Dann * gcc/config/arm/arm.md (mov_notscc): Use MVN for false condition. * gcc/testsuite/testsuite/gcc.c-torture/execute/20120110-1.c: New testcase. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183127 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/config/arm/arm.md | 2 +- gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/gcc.c-torture/execute/20120111-1.c | 18 ++++++++++++++++++ 4 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.c-torture/execute/20120111-1.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d18fb9dfb6c..f31e6753ef3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2012-01-12 Matthew Gretton-Dann + + Backport from mainline + 2012-01-11 Matthew Gretton-Dann + + * config/arm/arm.md (mov_notscc): Use MVN for false condition. + 2012-01-12 Uros Bizjak * config/i386/i386.md (*zero_extendsidi2_rex64): Correct movl template. diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index 794b865438c..ddc7d12b89b 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -7346,7 +7346,7 @@ (not:SI (match_operator:SI 1 "arm_comparison_operator" [(match_operand 2 "cc_register" "") (const_int 0)])))] "TARGET_ARM" - "mov%D1\\t%0, #0\;mvn%d1\\t%0, #1" + "mvn%D1\\t%0, #0\;mvn%d1\\t%0, #1" [(set_attr "conds" "use") (set_attr "insn" "mov") (set_attr "length" "8")] diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ef596d40b78..ad17dc25c5d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2012-01-12 Matthew Gretton-Dann + + Backport from mainline: + 2012-01-11 Matthew Gretton-Dann + + * testsuite/gcc.c-torture/execute/20120110-1.c: New testcase. + 2012-01-10 Joseph Myers * gcc.c-torture/execute/doloop-1.c, diff --git a/gcc/testsuite/gcc.c-torture/execute/20120111-1.c b/gcc/testsuite/gcc.c-torture/execute/20120111-1.c new file mode 100644 index 00000000000..eac086e3b51 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20120111-1.c @@ -0,0 +1,18 @@ +#include +#include + +uint32_t f0a (uint64_t arg2) __attribute__((noinline)); + +uint32_t +f0a (uint64_t arg) +{ + return ~(arg > -3); +} + +int main() { + uint32_t r1; + r1 = f0a (12094370573988097329ULL); + if (r1 != ~0U) + abort (); + return 0; +} -- cgit v1.2.3 From c5be90e7da50444bcc48547b9a49e8b49e536deb Mon Sep 17 00:00:00 2001 From: Georg-Johann Lay Date: Thu, 12 Jan 2012 17:23:32 +0000 Subject: Backport from mainline r183129 PR target/51756 * config/avr/avr.c (avr_encode_section_info): Test for absence of DECL_EXTERNAL when checking for initializers of progmem variables. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183131 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 9 ++++++++- gcc/config/avr/avr.c | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f31e6753ef3..46fcde45418 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,4 +1,11 @@ -2012-01-12 Matthew Gretton-Dann +2012-01-12 Georg-Johann Lay + + Backport from mainline r183129 + PR target/51756 + * config/avr/avr.c (avr_encode_section_info): Test for absence of + DECL_EXTERNAL when checking for initializers of progmem variables. + +22012-01-12 Matthew Gretton-Dann Backport from mainline 2012-01-11 Matthew Gretton-Dann diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index b5a61a36450..6c4b517ee30 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -5154,6 +5154,7 @@ avr_encode_section_info (tree decl, rtx rtl, int new_decl_p) if (new_decl_p && decl && DECL_P (decl) && NULL_TREE == DECL_INITIAL (decl) + && !DECL_EXTERNAL (decl) && avr_progmem_p (decl, DECL_ATTRIBUTES (decl))) { warning (OPT_Wuninitialized, -- cgit v1.2.3 From 0b29406556b0b21f804cab554591e4aee5db60fd Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Fri, 13 Jan 2012 00:18:33 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183147 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index c1e4f87b996..8e487866c84 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120112 +20120113 -- cgit v1.2.3 From 0e56000af1d4804db3ca4116f4c38854ab2a18e2 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sat, 14 Jan 2012 00:18:26 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183176 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 8e487866c84..947b2333009 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120113 +20120114 -- cgit v1.2.3 From 0bac194f5c5f01470ad238d17ba0b5e28e66f995 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Sat, 14 Jan 2012 13:28:05 +0000 Subject: 2012-01-14 Tobias Burnus PR fortran/51800 * resolve.c (build_default_init_expr): Also initialize nonconstant-length strings with -finit-character=. 2012-01-14 Tobias Burnus PR fortran/51800 * gfortran.dg/init_flag_8.f90: New. * gfortran.dg/init_flag_9.f90: New. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183181 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 9 +++++++++ gcc/fortran/resolve.c | 28 +++++++++++++++++++++++++--- gcc/testsuite/ChangeLog | 11 ++++++++++- gcc/testsuite/gfortran.dg/init_flag_8.f90 | 18 ++++++++++++++++++ gcc/testsuite/gfortran.dg/init_flag_9.f90 | 15 +++++++++++++++ 5 files changed, 77 insertions(+), 4 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/init_flag_8.f90 create mode 100644 gcc/testsuite/gfortran.dg/init_flag_9.f90 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 9a2d3fcda5a..504b5cde1ff 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,12 @@ +2012-01-14 Tobias Burnus + + Backported from mainline + 2012-01-14 Tobias Burnus + + PR fortran/51800 + * resolve.c (build_default_init_expr): Also initialize + nonconstant-length strings with -finit-character=. + 2012-01-01 Thomas König Backport from trunk diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 84753b24297..71615ab63f9 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -9814,6 +9814,26 @@ build_default_init_expr (gfc_symbol *sym) gfc_free_expr (init_expr); init_expr = NULL; } + if (!init_expr && gfc_option.flag_init_character == GFC_INIT_CHARACTER_ON + && sym->ts.u.cl->length) + { + gfc_actual_arglist *arg; + init_expr = gfc_get_expr (); + init_expr->where = sym->declared_at; + init_expr->ts = sym->ts; + init_expr->expr_type = EXPR_FUNCTION; + init_expr->value.function.isym = + gfc_intrinsic_function_by_id (GFC_ISYM_REPEAT); + init_expr->value.function.name = "repeat"; + arg = gfc_get_actual_arglist (); + arg->expr = gfc_get_character_expr (sym->ts.kind, &sym->declared_at, + NULL, 1); + arg->expr->value.character.string[0] + = gfc_option.flag_init_character_value; + arg->next = gfc_get_actual_arglist (); + arg->next->expr = gfc_copy_expr (sym->ts.u.cl->length); + init_expr->value.function.actual = arg; + } break; default: @@ -9840,10 +9860,12 @@ apply_default_init_local (gfc_symbol *sym) if (init == NULL) return; - /* For saved variables, we don't want to add an initializer at - function entry, so we just add a static initializer. */ + /* For saved variables, we don't want to add an initializer at function + entry, so we just add a static initializer. Note that automatic variables + are stack allocated even with -fno-automatic. */ if (sym->attr.save || sym->ns->save_all - || gfc_option.flag_max_stack_var_size == 0) + || (gfc_option.flag_max_stack_var_size == 0 + && (!sym->attr.dimension || !is_non_constant_shape_array (sym)))) { /* Don't clobber an existing initializer! */ gcc_assert (sym->value == NULL); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ad17dc25c5d..9cd2815d78d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2012-01-14 Tobias Burnus + + Backported from mainline + 2012-01-14 Tobias Burnus + + PR fortran/51800 + * gfortran.dg/init_flag_8.f90: New. + * gfortran.dg/init_flag_9.f90: New. + 2012-01-12 Matthew Gretton-Dann Backport from mainline: @@ -12,7 +21,7 @@ 2012-01-09 Martin Jambor - PR tree-optimization/51759 + PR tree-optimization/51759 * g++.dg/ipa/pr51759.C: New test. 2012-01-09 Ramana Radhakrishnan diff --git a/gcc/testsuite/gfortran.dg/init_flag_8.f90 b/gcc/testsuite/gfortran.dg/init_flag_8.f90 new file mode 100644 index 00000000000..b3ccc03989d --- /dev/null +++ b/gcc/testsuite/gfortran.dg/init_flag_8.f90 @@ -0,0 +1,18 @@ +! { dg-do compile } +! { dg-options "-fno-automatic -finit-local-zero" } +! +! PR fortran/51800 +! +! Contributed by Mario Baumann +! + SUBROUTINE FOO( N, A ) + IMPLICIT NONE + INTEGER :: N + INTEGER :: A(1:N) + INTEGER :: J + INTEGER :: DUMMY(1:N) + DO J=1,N + DUMMY(J) = 0 + A(J) = DUMMY(J) + END DO + END SUBROUTINE FOO diff --git a/gcc/testsuite/gfortran.dg/init_flag_9.f90 b/gcc/testsuite/gfortran.dg/init_flag_9.f90 new file mode 100644 index 00000000000..512396455bd --- /dev/null +++ b/gcc/testsuite/gfortran.dg/init_flag_9.f90 @@ -0,0 +1,15 @@ +! { dg-do run } +! { dg-options "-finit-character=89" } +! +! PR fortran/51800 +! + +subroutine foo(n) + character(len=n) :: str +! print *, str + if (str /= repeat ('Y', n)) call abort() +end subroutine foo + +call foo(3) +call foo(10) +end -- cgit v1.2.3 From e1bbc74092720390c7c83ed9f14ae12f7485d168 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sun, 15 Jan 2012 00:18:26 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183189 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 947b2333009..b15d73f3090 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120114 +20120115 -- cgit v1.2.3 From 7cd3af0d82758204fc8df4b56134c4fe9aa41246 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Sun, 15 Jan 2012 19:35:15 +0000 Subject: PR rtl-optimization/51821 * recog.c (peep2_find_free_register): Determine clobbered registers from insn pattern. testsuite/ChangeLog: PR rtl-optimization/51821 * gcc.dg/pr51821.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183198 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 9 +++++++-- gcc/recog.c | 11 +++++++---- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/pr51821.c | 24 ++++++++++++++++++++++++ 4 files changed, 43 insertions(+), 6 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/pr51821.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 46fcde45418..50e90c41636 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-01-15 Uros Bizjak + + PR rtl-optimization/51821 + * recog.c (peep2_find_free_register): Determine clobbered registers + from insn pattern. + 2012-01-12 Georg-Johann Lay Backport from mainline r183129 @@ -139,8 +145,7 @@ PR target/51623 * config/rs6000/rs6000.c (rs6000_assemble_integer): Don't call - unlikely_text_section_p. Instead check for being in a code - section. + unlikely_text_section_p. Instead check for being in a code section. 2011-12-23 Richard Guenther diff --git a/gcc/recog.c b/gcc/recog.c index 8fb96a0ed83..7faa0f08e76 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -3023,6 +3023,7 @@ peep2_find_free_register (int from, int to, const char *class_str, static int search_ofs; enum reg_class cl; HARD_REG_SET live; + df_ref *def_rec; int i; gcc_assert (from < MAX_INSNS_PER_PEEP2 + 1); @@ -3036,12 +3037,14 @@ peep2_find_free_register (int from, int to, const char *class_str, while (from != to) { - HARD_REG_SET this_live; + gcc_assert (peep2_insn_data[from].insn != NULL_RTX); + + /* Don't use registers set or clobbered by the insn. */ + for (def_rec = DF_INSN_DEFS (peep2_insn_data[from].insn); + *def_rec; def_rec++) + SET_HARD_REG_BIT (live, DF_REF_REGNO (*def_rec)); from = peep2_buf_position (from + 1); - gcc_assert (peep2_insn_data[from].insn != NULL_RTX); - REG_SET_TO_HARD_REG_SET (this_live, peep2_insn_data[from].live_before); - IOR_HARD_REG_SET (live, this_live); } cl = (class_str[0] == 'r' ? GENERAL_REGS diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9cd2815d78d..ec2fc42f69d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-01-15 Uros Bizjak + + PR rtl-optimization/51821 + * gcc.dg/pr51821.c: New test. + 2012-01-14 Tobias Burnus Backported from mainline diff --git a/gcc/testsuite/gcc.dg/pr51821.c b/gcc/testsuite/gcc.dg/pr51821.c new file mode 100644 index 00000000000..e7ba409fb70 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr51821.c @@ -0,0 +1,24 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -msse" { target { i?86-*-* x86_64-*-* } } } */ +/* { dg-require-effective-target sse_runtime { target { i?86-*-* x86_64-*-* } } } */ + +extern void abort (void); + +unsigned int __attribute__((noinline)) +test (int shift_size) +{ + unsigned long long res = ~0; + + return res << shift_size; +} + +int +main () +{ + int dst = 32; + + if (test (dst) != 0) + abort (); + + return 0; +} -- cgit v1.2.3 From c25bd9bb6faf398aeda50da7efbf12ee456bfc55 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Mon, 16 Jan 2012 00:18:56 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183203 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index b15d73f3090..8e2414be3f9 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120115 +20120116 -- cgit v1.2.3 From 1c09c449a943332e3ab09bb34fc8d7b6daa9fb0f Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Mon, 16 Jan 2012 21:34:26 +0000 Subject: PR c++/51868 * typeck.c (build_static_cast_1): Handle bit-fields properly. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183223 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/typeck.c | 36 +++++++++++++++++++------------ gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/g++.dg/cpp0x/rv-bitfield.C | 12 +++++++++++ gcc/testsuite/g++.dg/cpp0x/rv-bitfield2.C | 17 +++++++++++++++ 5 files changed, 62 insertions(+), 14 deletions(-) create mode 100644 gcc/testsuite/g++.dg/cpp0x/rv-bitfield.C create mode 100644 gcc/testsuite/g++.dg/cpp0x/rv-bitfield2.C diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9bb03662552..f302fc3b353 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2012-01-16 Jason Merrill + + PR c++/51868 + * typeck.c (build_static_cast_1): Handle bit-fields properly. + 2011-12-20 Dodji Seketeli PR debug/49951 diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 1c099a2c80c..deb895111b6 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -5696,11 +5696,12 @@ build_static_cast_1 (tree type, tree expr, bool c_cast_p, { tree intype; tree result; + cp_lvalue_kind clk; /* Assume the cast is valid. */ *valid_p = true; - intype = TREE_TYPE (expr); + intype = unlowered_expr_type (expr); /* Save casted types in the function's used types hash table. */ used_types_insert (type); @@ -5766,22 +5767,29 @@ build_static_cast_1 (tree type, tree expr, bool c_cast_p, cv2 T2 if cv2 T2 is reference-compatible with cv1 T1 (8.5.3)." */ if (TREE_CODE (type) == REFERENCE_TYPE && TYPE_REF_IS_RVALUE (type) - && real_lvalue_p (expr) + && (clk = real_lvalue_p (expr)) && reference_related_p (TREE_TYPE (type), intype) && (c_cast_p || at_least_as_qualified_p (TREE_TYPE (type), intype))) { - /* Handle the lvalue case here by casting to lvalue reference and - then changing it to an rvalue reference. Casting an xvalue to - rvalue reference will be handled by the main code path. */ - tree lref = cp_build_reference_type (TREE_TYPE (type), false); - result = (perform_direct_initialization_if_possible - (lref, expr, c_cast_p, complain)); - result = cp_fold_convert (type, result); - /* Make sure we don't fold back down to a named rvalue reference, - because that would be an lvalue. */ - if (DECL_P (result)) - result = build1 (NON_LVALUE_EXPR, type, result); - return convert_from_reference (result); + if (clk == clk_ordinary) + { + /* Handle the (non-bit-field) lvalue case here by casting to + lvalue reference and then changing it to an rvalue reference. + Casting an xvalue to rvalue reference will be handled by the + main code path. */ + tree lref = cp_build_reference_type (TREE_TYPE (type), false); + result = (perform_direct_initialization_if_possible + (lref, expr, c_cast_p, complain)); + result = cp_fold_convert (type, result); + /* Make sure we don't fold back down to a named rvalue reference, + because that would be an lvalue. */ + if (DECL_P (result)) + result = build1 (NON_LVALUE_EXPR, type, result); + return convert_from_reference (result); + } + else + /* For a bit-field or packed field, bind to a temporary. */ + expr = rvalue (expr); } /* Resolve overloaded address here rather than once in diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ec2fc42f69d..5c13ce27f02 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2012-01-16 Jason Merrill + + PR c++/51868 + * g++.dg/cpp0x/rv-bitfield.C: New. + * g++.dg/cpp0x/rv-bitfield2.C: New. + 2012-01-15 Uros Bizjak PR rtl-optimization/51821 diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-bitfield.C b/gcc/testsuite/g++.dg/cpp0x/rv-bitfield.C new file mode 100644 index 00000000000..ed866f9e1f3 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/rv-bitfield.C @@ -0,0 +1,12 @@ +// { dg-options -std=c++0x } + +struct A +{ + int i : 1; +}; + +int main() +{ + A a; + static_cast(a.i); +} diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-bitfield2.C b/gcc/testsuite/g++.dg/cpp0x/rv-bitfield2.C new file mode 100644 index 00000000000..e054151b056 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/rv-bitfield2.C @@ -0,0 +1,17 @@ +// PR c++/51868 +// { dg-options -std=c++0x } + +struct A { + A() {} + A(const A&) {} + A(A&&) {} +}; + +struct B { + A a; + int f : 1; +}; + +B func() { + return B(); +} -- cgit v1.2.3 From 29771012e083ca757b184bebc9d3c7cc297c69bd Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 16 Jan 2012 21:49:58 +0000 Subject: PR c++/51854 * mangle.c (write_template_arg_literal): Sorry instead of aborting. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183224 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/mangle.c | 3 ++- gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/g++.dg/abi/mangle60.C | 21 +++++++++++++++++++++ 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/g++.dg/abi/mangle60.C diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f302fc3b353..473571de0ce 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2012-01-16 Jakub Jelinek + + PR c++/51854 + * mangle.c (write_template_arg_literal): Sorry instead of aborting. + 2012-01-16 Jason Merrill PR c++/51868 diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c index 4f5185d740a..37412968f2c 100644 --- a/gcc/cp/mangle.c +++ b/gcc/cp/mangle.c @@ -2770,7 +2770,8 @@ write_template_arg_literal (const tree value) break; default: - gcc_unreachable (); + sorry ("mangling %C", TREE_CODE (value)); + break; } write_char ('E'); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5c13ce27f02..40f207d9276 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2012-01-16 Jason Merrill + PR c++/51854 + * g++.dg/abi/mangle60.C: New. + PR c++/51868 * g++.dg/cpp0x/rv-bitfield.C: New. * g++.dg/cpp0x/rv-bitfield2.C: New. diff --git a/gcc/testsuite/g++.dg/abi/mangle60.C b/gcc/testsuite/g++.dg/abi/mangle60.C new file mode 100644 index 00000000000..982ca4587e9 --- /dev/null +++ b/gcc/testsuite/g++.dg/abi/mangle60.C @@ -0,0 +1,21 @@ +// PR c++/51854 +// { dg-options "" } +// { dg-excess-errors "" { xfail *-*-* } } + +template struct A; + +template +char foo(U, V); + +// { dg-final { scan-assembler "_Z3barIiEvP1AIXszcl3foocvT__ELCi0_42EEEE" } } +template +void bar(A *); + +// { dg-final { scan-assembler "_Z3bazIiEvP1AIXszcl3foocvT__ELCf00000000_00000000EEEE" } } +template +void baz(A *); + +int main() { + bar(0); + baz(0); +} -- cgit v1.2.3 From 508466b7336893babae8faf1b916e1ca8f161b17 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Tue, 17 Jan 2012 00:18:28 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183227 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 8e2414be3f9..0e557f97fc1 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120116 +20120117 -- cgit v1.2.3 From 7a348300a787f9ff039ce382237dfe0317d87a1f Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Tue, 17 Jan 2012 07:31:18 +0000 Subject: * gcc.dg/pr51821.c (dg-options): Add -std=c99. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183234 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/gcc.dg/pr51821.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.dg/pr51821.c b/gcc/testsuite/gcc.dg/pr51821.c index e7ba409fb70..158172ff4bd 100644 --- a/gcc/testsuite/gcc.dg/pr51821.c +++ b/gcc/testsuite/gcc.dg/pr51821.c @@ -1,5 +1,6 @@ /* { dg-do run } */ -/* { dg-options "-O2 -msse" { target { i?86-*-* x86_64-*-* } } } */ +/* { dg-options "-std=c99 -O2" } */ +/* { dg-options "-std=c99 -O2 -msse" { target { i?86-*-* x86_64-*-* } } } */ /* { dg-require-effective-target sse_runtime { target { i?86-*-* x86_64-*-* } } } */ extern void abort (void); -- cgit v1.2.3 From 1d47c4ef20123ba9cd8ffb55b4c8065e47455879 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Wed, 18 Jan 2012 00:18:24 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183267 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 0e557f97fc1..1dff77b4fc2 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120117 +20120118 -- cgit v1.2.3 From e7c50ff25cb97375e99002b82850b4b13ed203fa Mon Sep 17 00:00:00 2001 From: David Edelsohn Date: Wed, 18 Jan 2012 19:14:48 +0000 Subject: * config/rs6000/rs6000.md (call_value_indirect_aix32): Fix typo in mode of operand[4]. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183282 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/config/rs6000/rs6000.md | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 50e90c41636..b82ded52144 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-01-18 David Edelsohn + + * config/rs6000/rs6000.md (call_value_indirect_aix32): Fix typo + in mode of operand[4]. + 2012-01-15 Uros Bizjak PR rtl-optimization/51821 diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index b750b2bf0f7..16be86c27a4 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -12241,8 +12241,8 @@ " { operands[3] = gen_reg_rtx (SImode); - operands[4] = gen_rtx_MEM (DImode, - gen_rtx_PLUS (DImode, stack_pointer_rtx, + operands[4] = gen_rtx_MEM (SImode, + gen_rtx_PLUS (SImode, stack_pointer_rtx, GEN_INT (20))); operands[5] = gen_rtx_MEM (SImode, -- cgit v1.2.3 From f66f8bb3a2875389d517e6ecb2fb0d8dedb86e94 Mon Sep 17 00:00:00 2001 From: Bill Schmidt Date: Wed, 18 Jan 2012 19:28:19 +0000 Subject: gcc: 2012-01-11 Bill Schmidt PR tree-optimization/49642 * ipa-split.c (forbidden_dominators): New variable. (check_forbidden_calls): New function. (dominated_by_forbidden): Likewise. (consider_split): Check for forbidden dominators. (execute_split_functions): Initialize and free forbidden dominators info; call check_forbidden_calls. gcc/testsuite: 2012-01-11 Bill Schmidt PR tree-optimization/49642 * gcc.dg/tree-ssa/pr49642.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183284 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 10 ++++ gcc/ipa-split.c | 99 +++++++++++++++++++++++++++++++++ gcc/testsuite/ChangeLog | 5 ++ gcc/testsuite/gcc.dg/tree-ssa/pr49642.c | 49 ++++++++++++++++ 4 files changed, 163 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr49642.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b82ded52144..40de99b0775 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2012-01-18 Bill Schmidt + + PR tree-optimization/49642 + * ipa-split.c (forbidden_dominators): New variable. + (check_forbidden_calls): New function. + (dominated_by_forbidden): Likewise. + (consider_split): Check for forbidden dominators. + (execute_split_functions): Initialize and free forbidden + dominators info; call check_forbidden_calls. + 2012-01-18 David Edelsohn * config/rs6000/rs6000.md (call_value_indirect_aix32): Fix typo diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c index ab3632c528b..c71954db09e 100644 --- a/gcc/ipa-split.c +++ b/gcc/ipa-split.c @@ -130,6 +130,10 @@ struct split_point struct split_point best_split_point; +/* Set of basic blocks that are not allowed to dominate a split point. */ + +static bitmap forbidden_dominators; + static tree find_retval (basic_block return_bb); /* Callback for walk_stmt_load_store_addr_ops. If T is non-SSA automatic @@ -270,6 +274,83 @@ done: return ok; } +/* If STMT is a call, check the callee against a list of forbidden + predicate functions. If a match is found, look for uses of the + call result in condition statements that compare against zero. + For each such use, find the block targeted by the condition + statement for the nonzero result, and set the bit for this block + in the forbidden dominators bitmap. The purpose of this is to avoid + selecting a split point where we are likely to lose the chance + to optimize away an unused function call. */ + +static void +check_forbidden_calls (gimple stmt) +{ + imm_use_iterator use_iter; + use_operand_p use_p; + tree lhs; + + /* At the moment, __builtin_constant_p is the only forbidden + predicate function call (see PR49642). */ + if (!gimple_call_builtin_p (stmt, BUILT_IN_CONSTANT_P)) + return; + + lhs = gimple_call_lhs (stmt); + + if (!lhs || TREE_CODE (lhs) != SSA_NAME) + return; + + FOR_EACH_IMM_USE_FAST (use_p, use_iter, lhs) + { + tree op1; + basic_block use_bb, forbidden_bb; + enum tree_code code; + edge true_edge, false_edge; + gimple use_stmt = USE_STMT (use_p); + + if (gimple_code (use_stmt) != GIMPLE_COND) + continue; + + /* Assuming canonical form for GIMPLE_COND here, with constant + in second position. */ + op1 = gimple_cond_rhs (use_stmt); + code = gimple_cond_code (use_stmt); + use_bb = gimple_bb (use_stmt); + + extract_true_false_edges_from_block (use_bb, &true_edge, &false_edge); + + /* We're only interested in comparisons that distinguish + unambiguously from zero. */ + if (!integer_zerop (op1) || code == LE_EXPR || code == GE_EXPR) + continue; + + if (code == EQ_EXPR) + forbidden_bb = false_edge->dest; + else + forbidden_bb = true_edge->dest; + + bitmap_set_bit (forbidden_dominators, forbidden_bb->index); + } +} + +/* If BB is dominated by any block in the forbidden dominators set, + return TRUE; else FALSE. */ + +static bool +dominated_by_forbidden (basic_block bb) +{ + unsigned dom_bb; + bitmap_iterator bi; + + EXECUTE_IF_SET_IN_BITMAP (forbidden_dominators, 1, dom_bb, bi) + { + if (dominated_by_p (CDI_DOMINATORS, bb, BASIC_BLOCK (dom_bb))) + return true; + } + + return false; +} + /* We found an split_point CURRENT. NON_SSA_VARS is bitmap of all non ssa variables used and RETURN_BB is return basic block. See if we can split function here. */ @@ -411,6 +492,18 @@ consider_split (struct split_point *current, bitmap non_ssa_vars, " Refused: split part has non-ssa uses\n"); return; } + + /* If the split point is dominated by a forbidden block, reject + the split. */ + if (!bitmap_empty_p (forbidden_dominators) + && dominated_by_forbidden (current->entry_bb)) + { + if (dump_file && (dump_flags & TDF_DETAILS)) + fprintf (dump_file, + " Refused: split point dominated by forbidden block\n"); + return; + } + /* See if retval used by return bb is computed by header or split part. When it is computed by split part, we need to produce return statement in the split part and add code to header to pass it around. @@ -1329,6 +1422,10 @@ execute_split_functions (void) return 0; } + /* Initialize bitmap to track forbidden calls. */ + forbidden_dominators = BITMAP_ALLOC (NULL); + calculate_dominance_info (CDI_DOMINATORS); + /* Compute local info about basic blocks and determine function size/time. */ VEC_safe_grow_cleared (bb_info, heap, bb_info_vec, last_basic_block + 1); memset (&best_split_point, 0, sizeof (best_split_point)); @@ -1350,6 +1447,7 @@ execute_split_functions (void) this_time = estimate_num_insns (stmt, &eni_time_weights) * freq; size += this_size; time += this_time; + check_forbidden_calls (stmt); if (dump_file && (dump_flags & TDF_DETAILS)) { @@ -1371,6 +1469,7 @@ execute_split_functions (void) BITMAP_FREE (best_split_point.split_bbs); todo = TODO_update_ssa | TODO_cleanup_cfg; } + BITMAP_FREE (forbidden_dominators); VEC_free (bb_info, heap, bb_info_vec); bb_info_vec = NULL; return todo; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 40f207d9276..55a861c7a25 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-01-18 Bill Schmidt + + PR tree-optimization/49642 + * gcc.dg/tree-ssa/pr49642.c: New test. + 2012-01-16 Jason Merrill PR c++/51854 diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr49642.c b/gcc/testsuite/gcc.dg/tree-ssa/pr49642.c new file mode 100644 index 00000000000..65a0b128a94 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr49642.c @@ -0,0 +1,49 @@ +/* Verify that ipa-split is disabled following __builtin_constant_p. */ + +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-optimized" } */ + +typedef unsigned int u32; +typedef unsigned long long u64; + +static inline __attribute__((always_inline)) __attribute__((const)) +int __ilog2_u32(u32 n) +{ + int bit; + asm ("cntlzw %0,%1" : "=r" (bit) : "r" (n)); + return 31 - bit; +} + + +static inline __attribute__((always_inline)) __attribute__((const)) +int __ilog2_u64(u64 n) +{ + int bit; + asm ("cntlzd %0,%1" : "=r" (bit) : "r" (n)); + return 63 - bit; +} + + + +static u64 ehca_map_vaddr(void *caddr); + +struct ehca_shca { + u32 hca_cap_mr_pgsize; +}; + +static u64 ehca_get_max_hwpage_size(struct ehca_shca *shca) +{ + return 1UL << ( __builtin_constant_p(shca->hca_cap_mr_pgsize) ? ( (shca->hca_cap_mr_pgsize) < 1 ? ____ilog2_NaN() : (shca->hca_cap_mr_pgsize) & (1ULL << 63) ? 63 : (shca->hca_cap_mr_pgsize) & (1ULL << 62) ? 62 : (shca->hca_cap_mr_pgsize) & (1ULL << 61) ? 61 : (shca->hca_cap_mr_pgsize) & (1ULL << 60) ? 60 : (shca->hca_cap_mr_pgsize) & (1ULL << 59) ? 59 : (shca->hca_cap_mr_pgsize) & (1ULL << 58) ? 58 : (shca->hca_cap_mr_pgsize) & (1ULL << 57) ? 57 : (shca->hca_cap_mr_pgsize) & (1ULL << 56) ? 56 : (shca->hca_cap_mr_pgsize) & (1ULL << 55) ? 55 : (shca->hca_cap_mr_pgsize) & (1ULL << 54) ? 54 : (shca->hca_cap_mr_pgsize) & (1ULL << 53) ? 53 : (shca->hca_cap_mr_pgsize) & (1ULL << 52) ? 52 : (shca->hca_cap_mr_pgsize) & (1ULL << 51) ? 51 : (shca->hca_cap_mr_pgsize) & (1ULL << 50) ? 50 : (shca->hca_cap_mr_pgsize) & (1ULL << 49) ? 49 : (shca->hca_cap_mr_pgsize) & (1ULL << 48) ? 48 : (shca->hca_cap_mr_pgsize) & (1ULL << 47) ? 47 : (shca->hca_cap_mr_pgsize) & (1ULL << 46) ? 46 : (shca->hca_cap_mr_pgsize) & (1ULL << 45) ? 45 : (shca->hca_cap_mr_pgsize) & (1ULL << 44) ? 44 : (shca->hca_cap_mr_pgsize) & (1ULL << 43) ? 43 : (shca->hca_cap_mr_pgsize) & (1ULL << 42) ? 42 : (shca->hca_cap_mr_pgsize) & (1ULL << 41) ? 41 : (shca->hca_cap_mr_pgsize) & (1ULL << 40) ? 40 : (shca->hca_cap_mr_pgsize) & (1ULL << 39) ? 39 : (shca->hca_cap_mr_pgsize) & (1ULL << 38) ? 38 : (shca->hca_cap_mr_pgsize) & (1ULL << 37) ? 37 : (shca->hca_cap_mr_pgsize) & (1ULL << 36) ? 36 : (shca->hca_cap_mr_pgsize) & (1ULL << 35) ? 35 : (shca->hca_cap_mr_pgsize) & (1ULL << 34) ? 34 : (shca->hca_cap_mr_pgsize) & (1ULL << 33) ? 33 : (shca->hca_cap_mr_pgsize) & (1ULL << 32) ? 32 : (shca->hca_cap_mr_pgsize) & (1ULL << 31) ? 31 : (shca->hca_cap_mr_pgsize) & (1ULL << 30) ? 30 : (shca->hca_cap_mr_pgsize) & (1ULL << 29) ? 29 : (shca->hca_cap_mr_pgsize) & (1ULL << 28) ? 28 : (shca->hca_cap_mr_pgsize) & (1ULL << 27) ? 27 : (shca->hca_cap_mr_pgsize) & (1ULL << 26) ? 26 : (shca->hca_cap_mr_pgsize) & (1ULL << 25) ? 25 : (shca->hca_cap_mr_pgsize) & (1ULL << 24) ? 24 : (shca->hca_cap_mr_pgsize) & (1ULL << 23) ? 23 : (shca->hca_cap_mr_pgsize) & (1ULL << 22) ? 22 : (shca->hca_cap_mr_pgsize) & (1ULL << 21) ? 21 : (shca->hca_cap_mr_pgsize) & (1ULL << 20) ? 20 : (shca->hca_cap_mr_pgsize) & (1ULL << 19) ? 19 : (shca->hca_cap_mr_pgsize) & (1ULL << 18) ? 18 : (shca->hca_cap_mr_pgsize) & (1ULL << 17) ? 17 : (shca->hca_cap_mr_pgsize) & (1ULL << 16) ? 16 : (shca->hca_cap_mr_pgsize) & (1ULL << 15) ? 15 : (shca->hca_cap_mr_pgsize) & (1ULL << 14) ? 14 : (shca->hca_cap_mr_pgsize) & (1ULL << 13) ? 13 : (shca->hca_cap_mr_pgsize) & (1ULL << 12) ? 12 : (shca->hca_cap_mr_pgsize) & (1ULL << 11) ? 11 : (shca->hca_cap_mr_pgsize) & (1ULL << 10) ? 10 : (shca->hca_cap_mr_pgsize) & (1ULL << 9) ? 9 : (shca->hca_cap_mr_pgsize) & (1ULL << 8) ? 8 : (shca->hca_cap_mr_pgsize) & (1ULL << 7) ? 7 : (shca->hca_cap_mr_pgsize) & (1ULL << 6) ? 6 : (shca->hca_cap_mr_pgsize) & (1ULL << 5) ? 5 : (shca->hca_cap_mr_pgsize) & (1ULL << 4) ? 4 : (shca->hca_cap_mr_pgsize) & (1ULL << 3) ? 3 : (shca->hca_cap_mr_pgsize) & (1ULL << 2) ? 2 : (shca->hca_cap_mr_pgsize) & (1ULL << 1) ? 1 : (shca->hca_cap_mr_pgsize) & (1ULL << 0) ? 0 : ____ilog2_NaN() ) : (sizeof(shca->hca_cap_mr_pgsize) <= 4) ? __ilog2_u32(shca->hca_cap_mr_pgsize) : __ilog2_u64(shca->hca_cap_mr_pgsize) ); +} + +int x(struct ehca_shca *shca) { + return ehca_get_max_hwpage_size(shca); +} + +int y(struct ehca_shca *shca) +{ + return ehca_get_max_hwpage_size(shca); +} + +/* { dg-final { scan-tree-dump-times "____ilog2_NaN" 0 "optimized" } } */ +/* { dg-final { cleanup-tree-dump "optimized" } } */ -- cgit v1.2.3 From 85ced0d352279c5f23c7dce2e6b60d433e524b47 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 19 Jan 2012 00:18:45 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183294 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 1dff77b4fc2..baceed6ad97 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120118 +20120119 -- cgit v1.2.3 From 8ce35bdb5a4341d2ea687dad9b2a67229aa94c1b Mon Sep 17 00:00:00 2001 From: Quentin Neill Date: Thu, 19 Jan 2012 20:15:29 +0000 Subject: 2012-01-19 Quentin Neill PR target/48743 * config/i386/driver-i386.c (host_detect_local_cpu): Also check family to distinguish PROCESSOR_ATHLON. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183309 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/driver-i386.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 40de99b0775..1619611f845 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-01-19 Quentin Neill + + PR target/48743 + * config/i386/driver-i386.c (host_detect_local_cpu): Also check + family to distinguish PROCESSOR_ATHLON. + 2012-01-18 Bill Schmidt PR tree-optimization/49642 diff --git a/gcc/config/i386/driver-i386.c b/gcc/config/i386/driver-i386.c index 985a6ff5606..0b5fd99d4d0 100644 --- a/gcc/config/i386/driver-i386.c +++ b/gcc/config/i386/driver-i386.c @@ -507,7 +507,7 @@ const char *host_detect_local_cpu (int argc, const char **argv) processor = PROCESSOR_AMDFAM10; else if (has_sse2 || has_longmode) processor = PROCESSOR_K8; - else if (has_3dnowp) + else if (has_3dnowp && family == 6) processor = PROCESSOR_ATHLON; else if (has_mmx) processor = PROCESSOR_K6; -- cgit v1.2.3 From a9c985825397f0b7995d3a4b0efe68a8a3ae4891 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Thu, 19 Jan 2012 22:21:43 +0000 Subject: 2012-01-19 Tobias Burnus PR fortran/51904 *expr.c (gfc_build_intrinsic_call): Also set the symtree. 2012-01-19 Tobias Burnus PR fortran/51904 * gfortran.dg/intrinsic_size_2.f90: New. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183314 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 5 +++++ gcc/fortran/expr.c | 5 +++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/intrinsic_size_2.f90 | 17 +++++++++++++++++ 4 files changed, 32 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/intrinsic_size_2.f90 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 504b5cde1ff..ac998ee9c57 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2012-01-19 Tobias Burnus + + PR fortran/51904 + *expr.c (gfc_build_intrinsic_call): Also set the symtree. + 2012-01-14 Tobias Burnus Backported from mainline diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index d5784c5d395..a4da37c20dc 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -4363,6 +4363,11 @@ gfc_build_intrinsic_call (const char* name, locus where, unsigned numarg, ...) result->value.function.name = name; result->value.function.isym = isym; + result->symtree = gfc_find_symtree (gfc_current_ns->sym_root, name); + gcc_assert (result->symtree + && (result->symtree->n.sym->attr.flavor == FL_PROCEDURE + || result->symtree->n.sym->attr.flavor == FL_UNKNOWN)); + va_start (ap, numarg); atail = NULL; for (i = 0; i < numarg; ++i) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 55a861c7a25..ed5d163766e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-01-19 Tobias Burnus + + PR fortran/51904 + * gfortran.dg/intrinsic_size_2.f90: New. + 2012-01-18 Bill Schmidt PR tree-optimization/49642 diff --git a/gcc/testsuite/gfortran.dg/intrinsic_size_2.f90 b/gcc/testsuite/gfortran.dg/intrinsic_size_2.f90 new file mode 100644 index 00000000000..6070bc21b7d --- /dev/null +++ b/gcc/testsuite/gfortran.dg/intrinsic_size_2.f90 @@ -0,0 +1,17 @@ +! { dg-do compile } +! +! PR fortran/51904 +! +! Contributed by David Sagan. +! + +call qp_draw_polyline_basic([1.0,2.0]) +contains +subroutine qp_draw_polyline_basic (x) + implicit none + real :: x(:), f + integer :: i + f = 0 + print *, size(f*x) +end subroutine +end -- cgit v1.2.3 From 9dfbefd14b373579d02270ff2c1c75e183b2b2cc Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Thu, 19 Jan 2012 22:34:29 +0000 Subject: Backport from trunk PR c++/51344 * decl2.c (save_template_attributes): Use merge_attributes instead of chaining up via TREE_CHAIN. * g++.dg/torture/pr51344.C: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183315 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/decl2.c | 4 ++-- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/g++.dg/torture/pr51344.C | 9 +++++++++ 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/g++.dg/torture/pr51344.C diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 473571de0ce..e1e00f5db4f 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2012-01-19 Kai Tietz + + PR c++/51344 + * decl2.c (save_template_attributes): Use merge_attributes + instead of chaining up via TREE_CHAIN. + 2012-01-16 Jakub Jelinek PR c++/51854 diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 91036020822..51f23f47c66 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -1185,9 +1185,9 @@ save_template_attributes (tree *attr_p, tree *decl_p) old_attrs = *q; - /* Place the late attributes at the beginning of the attribute + /* Merge the late attributes at the beginning with the attribute list. */ - TREE_CHAIN (tree_last (late_attrs)) = *q; + late_attrs = merge_attributes (late_attrs, *q); *q = late_attrs; if (!DECL_P (*decl_p) && *decl_p == TYPE_MAIN_VARIANT (*decl_p)) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ed5d163766e..f084c8c74c8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2012-01-19 Kai Tietz + + * g++.dg/torture/pr51344.C: New test. + 2012-01-19 Tobias Burnus PR fortran/51904 diff --git a/gcc/testsuite/g++.dg/torture/pr51344.C b/gcc/testsuite/g++.dg/torture/pr51344.C new file mode 100644 index 00000000000..482c0fae065 --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/pr51344.C @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +template +class B +{ + friend __attribute__((cdecl)) A& operator >>(A& a, B& b) + { + return a; + } +}; -- cgit v1.2.3 -- cgit v1.2.3 From 1fb1d5687ec73c357143030267be6839d693fbbc Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Fri, 20 Jan 2012 00:18:36 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183323 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index baceed6ad97..2be57aa702b 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120119 +20120120 -- cgit v1.2.3 From 2323e63fbab5d489592afe7d5f85e6944d656844 Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Fri, 20 Jan 2012 10:35:04 +0000 Subject: * g++.dg/torture/pr51344.C: Fix typo. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183331 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/g++.dg/torture/pr51344.C | 2 ++ 2 files changed, 6 insertions(+) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f084c8c74c8..d5e84e84ac8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2012-01-20 Kai Tietz + + * g++.dg/torture/pr51344.C: Fix typo. + 2012-01-19 Kai Tietz * g++.dg/torture/pr51344.C: New test. diff --git a/gcc/testsuite/g++.dg/torture/pr51344.C b/gcc/testsuite/g++.dg/torture/pr51344.C index 482c0fae065..49018325e42 100644 --- a/gcc/testsuite/g++.dg/torture/pr51344.C +++ b/gcc/testsuite/g++.dg/torture/pr51344.C @@ -1,4 +1,6 @@ /* { dg-do compile } */ +class A; + template class B { -- cgit v1.2.3 From 9c9a566addb7919b0a57c0a7bc8a42b7e557334d Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Fri, 20 Jan 2012 21:36:14 +0000 Subject: * cfgrtl.c (rtl_dump_bb): Do not dump insns for {ENTRY|EXIT}_BLOCK. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183353 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 4 ++++ gcc/cfgrtl.c | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1619611f845..2c3ff92db7d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2012-01-20 Eric Botcazou + + * cfgrtl.c (rtl_dump_bb): Do not dump insns for {ENTRY|EXIT}_BLOCK. + 2012-01-19 Quentin Neill PR target/48743 diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index 5d64f3af019..dd3d37efe08 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -1642,9 +1642,10 @@ rtl_dump_bb (basic_block bb, FILE *outf, int indent, int flags ATTRIBUTE_UNUSED) putc ('\n', outf); } - for (insn = BB_HEAD (bb), last = NEXT_INSN (BB_END (bb)); insn != last; - insn = NEXT_INSN (insn)) - print_rtl_single (outf, insn); + if (bb->index != ENTRY_BLOCK && bb->index != EXIT_BLOCK) + for (insn = BB_HEAD (bb), last = NEXT_INSN (BB_END (bb)); insn != last; + insn = NEXT_INSN (insn)) + print_rtl_single (outf, insn); if (df) { -- cgit v1.2.3 From 189bee254de3987a44845266059998c1c31a15ce Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sat, 21 Jan 2012 00:18:01 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183362 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 2be57aa702b..ea5e445a9cb 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120120 +20120121 -- cgit v1.2.3 From 97d39e01689a0c4496d52729f012a5c6dae822e2 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Sat, 21 Jan 2012 15:01:48 +0000 Subject: PR ada/46192 * gcc-interface/decl.c (gnat_to_gnu_entity) : In the case of a renaming, preserve the volatileness through the indirection, if any. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183366 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/ChangeLog | 6 ++++++ gcc/ada/gcc-interface/decl.c | 8 ++++++++ gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gnat.dg/renaming5.adb | 30 ++++++++++++++++++++++++++++++ gcc/testsuite/gnat.dg/renaming5.ads | 5 +++++ 5 files changed, 53 insertions(+) create mode 100644 gcc/testsuite/gnat.dg/renaming5.adb create mode 100644 gcc/testsuite/gnat.dg/renaming5.ads diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index fa04c33ac47..ebdc61ddaf8 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2012-01-21 Eric Botcazou + + PR ada/46192 + * gcc-interface/decl.c (gnat_to_gnu_entity) : In the case of a + renaming, preserve the volatileness through the indirection, if any. + 2012-01-09 Eric Botcazou * gcc-interface/trans.c (addressable_p) : Fix thinko. diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index 58459d4ab42..9c6831013f8 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -1023,6 +1023,14 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) entity is always accessed indirectly through it. */ else { + /* We need to preserve the volatileness of the renamed + object through the indirection. */ + if (TREE_THIS_VOLATILE (gnu_expr) + && !TYPE_VOLATILE (gnu_type)) + gnu_type + = build_qualified_type (gnu_type, + (TYPE_QUALS (gnu_type) + | TYPE_QUAL_VOLATILE)); gnu_type = build_reference_type (gnu_type); inner_const_flag = TREE_READONLY (gnu_expr); const_flag = true; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d5e84e84ac8..7964bf4a925 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2012-01-21 Eric Botcazou + + * gnat.dg/renaming5.ad[sb]: New test. + 2012-01-20 Kai Tietz * g++.dg/torture/pr51344.C: Fix typo. diff --git a/gcc/testsuite/gnat.dg/renaming5.adb b/gcc/testsuite/gnat.dg/renaming5.adb new file mode 100644 index 00000000000..25374fe895c --- /dev/null +++ b/gcc/testsuite/gnat.dg/renaming5.adb @@ -0,0 +1,30 @@ +-- PR ada/46192 +-- Testcase by Rolf Ebert + +-- { dg-do compile } +-- { dg-options "-O2 -fdump-tree-optimized" } + +with System; use System; + +package body Renaming5 is + + type Bits_In_Byte is array (0 .. 7) of Boolean; + pragma Pack (Bits_In_Byte); + + A : Bits_In_Byte; + for A'Address use System'To_Address(16#c0#); + pragma Volatile (A); + + B : Bits_In_Byte renames A; + + procedure Proc is + begin + while B (0) = False loop + null; + end loop; + end; + +end Renaming5; + +-- { dg-final { scan-tree-dump-times "goto" 2 "optimized" } } +-- { dg-final { cleanup-tree-dump "optimized" } } diff --git a/gcc/testsuite/gnat.dg/renaming5.ads b/gcc/testsuite/gnat.dg/renaming5.ads new file mode 100644 index 00000000000..2b39663ad42 --- /dev/null +++ b/gcc/testsuite/gnat.dg/renaming5.ads @@ -0,0 +1,5 @@ +package Renaming5 is + + procedure Proc; + +end Renaming5; -- cgit v1.2.3 From 1ac286b6f5a34e15f2880c32c214aa1557006524 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Sat, 21 Jan 2012 16:11:47 +0000 Subject: 2012-01-21 Tobias Burnus PR fortran/51913 * interface.c (compare_parameter): Fix CLASS comparison. 2012-01-21 Tobias Burnus PR fortran/51913 * gfortran.dg/class_47.f90: New. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183369 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 5 +++++ gcc/fortran/interface.c | 6 ++--- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/class_47.f90 | 40 ++++++++++++++++++++++++++++++++++ 4 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/class_47.f90 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index ac998ee9c57..952b289aae9 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2012-01-21 Tobias Burnus + + PR fortran/51913 + * interface.c (compare_parameter): Fix CLASS comparison. + 2012-01-19 Tobias Burnus PR fortran/51904 diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index eece7f45d82..cc7eef75d9f 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -1535,7 +1535,7 @@ compare_parameter (gfc_symbol *formal, gfc_expr *actual, return 0; } - /* F2003, 12.5.2.5. */ + /* F2008, 12.5.2.5. */ if (formal->ts.type == BT_CLASS && (CLASS_DATA (formal)->attr.class_pointer || CLASS_DATA (formal)->attr.allocatable)) @@ -1547,8 +1547,8 @@ compare_parameter (gfc_symbol *formal, gfc_expr *actual, formal->name, &actual->where); return 0; } - if (CLASS_DATA (actual)->ts.u.derived - != CLASS_DATA (formal)->ts.u.derived) + if (!gfc_compare_derived_types (CLASS_DATA (actual)->ts.u.derived, + CLASS_DATA (formal)->ts.u.derived)) { if (where) gfc_error ("Actual argument to '%s' at %L must have the same " diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7964bf4a925..3e29ef59bb5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-01-21 Tobias Burnus + + PR fortran/51913 + * gfortran.dg/class_47.f90: New. + 2012-01-21 Eric Botcazou * gnat.dg/renaming5.ad[sb]: New test. diff --git a/gcc/testsuite/gfortran.dg/class_47.f90 b/gcc/testsuite/gfortran.dg/class_47.f90 new file mode 100644 index 00000000000..90a7560bc5e --- /dev/null +++ b/gcc/testsuite/gfortran.dg/class_47.f90 @@ -0,0 +1,40 @@ +! { dg-do compile } +! +! PR fortran/51913 +! +! Contributed by Alexander Tismer +! +MODULE m_sparseMatrix + + implicit none + + type :: sparseMatrix_t + + end type sparseMatrix_t +END MODULE m_sparseMatrix + +!=============================================================================== +module m_subroutine +! USE m_sparseMatrix !< when uncommenting this line program works fine + + implicit none + + contains + subroutine test(matrix) + use m_sparseMatrix + class(sparseMatrix_t), pointer :: matrix + end subroutine +end module + +!=============================================================================== +PROGRAM main + use m_subroutine + USE m_sparseMatrix + implicit none + + CLASS(sparseMatrix_t), pointer :: sparseMatrix + + call test(sparseMatrix) +END PROGRAM + +! { dg-final { cleanup-modules "m_sparsematrix m_subroutine" } } -- cgit v1.2.3 From 5e092440bef5e56afb8480567bb53c0642b3c91e Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sun, 22 Jan 2012 00:18:32 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183384 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index ea5e445a9cb..534163c449c 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120121 +20120122 -- cgit v1.2.3 From e4ba4b2d760e63ac766be6c55beb7dd406448412 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Mon, 23 Jan 2012 00:18:06 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183401 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 534163c449c..1b42ff52f23 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120122 +20120123 -- cgit v1.2.3 From 360376a0d881ebc41413c2048703b50e2d910c4c Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 23 Jan 2012 11:12:01 +0000 Subject: * lang.c (java_init_options_struct): Set frontend_set_flag_trapping_math. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183426 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/ChangeLog | 5 +++++ gcc/java/lang.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index a730fa6fbc5..75423a947fb 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,8 @@ +2012-01-23 Andreas Schwab + + * lang.c (java_init_options_struct): Set + frontend_set_flag_trapping_math. + 2011-10-26 Release Manager * GCC 4.6.2 released. diff --git a/gcc/java/lang.c b/gcc/java/lang.c index d26f1551afe..982474cc833 100644 --- a/gcc/java/lang.c +++ b/gcc/java/lang.c @@ -1,6 +1,6 @@ /* Java(TM) language-specific utility routines. Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008, 2010 Free Software Foundation, Inc. + 2005, 2006, 2007, 2008, 2010, 2012 Free Software Foundation, Inc. This file is part of GCC. @@ -550,6 +550,7 @@ java_init_options_struct (struct gcc_options *opts) /* In Java floating point operations never trap. */ opts->x_flag_trapping_math = 0; + opts->frontend_set_flag_trapping_math = true; /* In Java arithmetic overflow always wraps around. */ opts->x_flag_wrapv = 1; -- cgit v1.2.3 From cef8754cb96f483adecdb28f4bd0bc557674d0b8 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Tue, 24 Jan 2012 00:18:01 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183461 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 1b42ff52f23..4029c2dee89 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120123 +20120124 -- cgit v1.2.3 From 1329b1782bb520dd391fec778d06d62ca096b4f8 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Tue, 24 Jan 2012 08:35:10 +0000 Subject: 2012-01-24 Tobias Burnus PR fortran/51948 * check.c (variable_check): Fix checking for result variables and deeply nested BLOCKs. 2012-01-24 Tobias Burnus PR fortran/51948 * gfortran.dg/move_alloc_12.f90: New. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183469 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/check.c | 17 +++++++++------ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/move_alloc_12.f90 | 33 +++++++++++++++++++++++++++++ 4 files changed, 54 insertions(+), 7 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/move_alloc_12.f90 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 952b289aae9..264e86beafc 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2012-01-24 Tobias Burnus + + PR fortran/51948 + * check.c (variable_check): Fix checking for + result variables and deeply nested BLOCKs. + 2012-01-21 Tobias Burnus PR fortran/51913 diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index d8274440096..4d71e52aef9 100644 --- a/gcc/fortran/check.c +++ b/gcc/fortran/check.c @@ -514,15 +514,18 @@ variable_check (gfc_expr *e, int n, bool allow_proc) if (e->expr_type == EXPR_VARIABLE && e->symtree->n.sym->attr.flavor != FL_PARAMETER - && (allow_proc - || !e->symtree->n.sym->attr.function - || (e->symtree->n.sym == e->symtree->n.sym->result - && (e->symtree->n.sym == gfc_current_ns->proc_name - || (gfc_current_ns->parent - && e->symtree->n.sym - == gfc_current_ns->parent->proc_name))))) + && (allow_proc || !e->symtree->n.sym->attr.function)) return SUCCESS; + if (e->expr_type == EXPR_VARIABLE && e->symtree->n.sym->attr.function + && e->symtree->n.sym == e->symtree->n.sym->result) + { + gfc_namespace *ns; + for (ns = gfc_current_ns; ns; ns = ns->parent) + if (ns->proc_name == e->symtree->n.sym) + return SUCCESS; + } + gfc_error ("'%s' argument of '%s' intrinsic at %L must be a variable", gfc_current_intrinsic_arg[n]->name, gfc_current_intrinsic, &e->where); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3e29ef59bb5..f932e753a1e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-01-24 Tobias Burnus + + PR fortran/51948 + * gfortran.dg/move_alloc_12.f90: New. + 2012-01-21 Tobias Burnus PR fortran/51913 diff --git a/gcc/testsuite/gfortran.dg/move_alloc_12.f90 b/gcc/testsuite/gfortran.dg/move_alloc_12.f90 new file mode 100644 index 00000000000..880b302d5c0 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/move_alloc_12.f90 @@ -0,0 +1,33 @@ +! { dg-do compile } +! +! PR fortran/51948 +! + type :: t + end type t +contains + function func(x, y) + class(t) :: y + type(t), allocatable :: func + type(t), allocatable :: x + + select type (y) + type is(t) + call move_alloc (x, func) + end select + end function + + function func2(x, y) + class(t) :: y + class(t), allocatable :: func2 + class(t), allocatable :: x + + block + block + select type (y) + type is(t) + call move_alloc (x, func2) + end select + end block + end block + end function +end -- cgit v1.2.3 From f736415b21afaa82edd149aa66bf50050a444b9d Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Tue, 24 Jan 2012 10:23:14 +0000 Subject: 2012-01-24 Richard Guenther Forward-port to branch 2010-09-21 Jakub Jelinek PR middle-end/45678 * expr.c (expand_expr_real_1) : If op0 isn't sufficiently aligned and there is movmisalignM insn for mode, use it to load op0 into a temporary register. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183471 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 10 ++++++++++ gcc/expr.c | 22 ++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2c3ff92db7d..c63ae26518b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2012-01-24 Richard Guenther + + Forward-port to branch + 2010-09-21 Jakub Jelinek + + PR middle-end/45678 + * expr.c (expand_expr_real_1) : If + op0 isn't sufficiently aligned and there is movmisalignM + insn for mode, use it to load op0 into a temporary register. + 2012-01-20 Eric Botcazou * cfgrtl.c (rtl_dump_bb): Do not dump insns for {ENTRY|EXIT}_BLOCK. diff --git a/gcc/expr.c b/gcc/expr.c index f20d745ea43..d813e21ea05 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -9609,10 +9609,32 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, results. */ if (MEM_P (op0)) { + enum insn_code icode; + op0 = copy_rtx (op0); if (TYPE_ALIGN_OK (type)) set_mem_align (op0, MAX (MEM_ALIGN (op0), TYPE_ALIGN (type))); + else if (mode != BLKmode + && MEM_ALIGN (op0) < GET_MODE_ALIGNMENT (mode) + /* If the target does have special handling for unaligned + loads of mode then use them. */ + && ((icode = optab_handler (movmisalign_optab, mode)) + != CODE_FOR_nothing)) + { + rtx reg, insn; + + op0 = adjust_address (op0, mode, 0); + /* We've already validated the memory, and we're creating a + new pseudo destination. The predicates really can't + fail. */ + reg = gen_reg_rtx (mode); + + /* Nor can the insn generator. */ + insn = GEN_FCN (icode) (reg, op0); + emit_insn (insn); + return reg; + } else if (STRICT_ALIGNMENT && mode != BLKmode && MEM_ALIGN (op0) < GET_MODE_ALIGNMENT (mode)) -- cgit v1.2.3 From d1c17f772c206b19d359796c95c2b169fa39658a Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Wed, 25 Jan 2012 00:18:42 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183506 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 4029c2dee89..34bad8c0fe3 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120124 +20120125 -- cgit v1.2.3 From afacb48f8cc153e863d1e8810333a8de2b1f5f04 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Wed, 25 Jan 2012 08:11:56 +0000 Subject: 2012-01-25 Tobias Burnus PR fortran/51966 * resolve.c (resolve_structure_cons): Only create an array constructors for nonscalars. 2012-01-25 Tobias Burnus PR fortran/51966 * gfortran.dg/derived_constructor_char_3.f90: New. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183511 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 6 +++++ gcc/fortran/resolve.c | 1 + gcc/testsuite/ChangeLog | 5 ++++ .../gfortran.dg/derived_constructor_char_3.f90 | 30 ++++++++++++++++++++++ 4 files changed, 42 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/derived_constructor_char_3.f90 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 264e86beafc..ebdcbc08d9c 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2012-01-25 Tobias Burnus + + PR fortran/51966 + * resolve.c (resolve_structure_cons): Only create an + array constructors for nonscalars. + 2012-01-24 Tobias Burnus PR fortran/51948 diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 71615ab63f9..0ecfa0da46b 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -1053,6 +1053,7 @@ resolve_structure_cons (gfc_expr *expr, int init) && comp->ts.u.cl->length->expr_type == EXPR_CONSTANT && cons->expr->ts.u.cl && cons->expr->ts.u.cl->length && cons->expr->ts.u.cl->length->expr_type == EXPR_CONSTANT + && cons->expr->rank != 0 && mpz_cmp (cons->expr->ts.u.cl->length->value.integer, comp->ts.u.cl->length->value.integer) != 0) { diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f932e753a1e..23017801c29 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-01-25 Tobias Burnus + + PR fortran/51966 + * gfortran.dg/derived_constructor_char_3.f90: New. + 2012-01-24 Tobias Burnus PR fortran/51948 diff --git a/gcc/testsuite/gfortran.dg/derived_constructor_char_3.f90 b/gcc/testsuite/gfortran.dg/derived_constructor_char_3.f90 new file mode 100644 index 00000000000..e23878541bb --- /dev/null +++ b/gcc/testsuite/gfortran.dg/derived_constructor_char_3.f90 @@ -0,0 +1,30 @@ +! { dg-do compile } +! +! PR fortran/51966 +! +! Contributed by Peter Wind +! + + type :: Deriv + character(len=10) :: name + end type + character(len=8), dimension(2), parameter :: & + DEF_ECOSYSTEMS = (/ "Gridxxxx", "StringYY" /) + + type(Deriv), save :: DepEcoSystem = Deriv(DEF_ECOSYSTEMS(1)) + + if (DepEcoSystem%name /= "Gridxxxx" & + .or. DepEcoSystem%name(9:9) /= ' ' & + .or. DepEcoSystem%name(10:10) /= ' ') call abort() + DepEcoSystem%name = 'ABCDEFGHIJ' + call Init_EcoSystems() + if (DepEcoSystem%name /= "StringYY" & + .or. DepEcoSystem%name(9:9) /= ' ' & + .or. DepEcoSystem%name(10:10) /= ' ') call abort() + +contains + subroutine Init_EcoSystems() + integer :: i =2 + DepEcoSystem = Deriv(DEF_ECOSYSTEMS(i)) + end subroutine Init_EcoSystems +end -- cgit v1.2.3 From eac397428ef8b636f39b41057965a8b4b6f52a74 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Wed, 25 Jan 2012 15:37:33 +0000 Subject: 2012-01-25 Richard Guenther * tree-ssa-sccvn.c (vn_reference_eq): Also compare if both bases are dereferenced. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183523 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/tree-ssa-sccvn.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c63ae26518b..2e80e0af9fb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-01-25 Richard Guenther + + * tree-ssa-sccvn.c (vn_reference_eq): Also compare if both + bases are dereferenced. + 2012-01-24 Richard Guenther Forward-port to branch diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index eb8896907e9..6ed076d15b4 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -546,6 +546,7 @@ vn_reference_eq (const void *p1, const void *p2) tem1.type = TREE_TYPE (tem1.op0); tem1.opcode = TREE_CODE (tem1.op0); vro1 = &tem1; + deref1 = false; } if (deref2 && vro2->opcode == ADDR_EXPR) { @@ -554,7 +555,10 @@ vn_reference_eq (const void *p1, const void *p2) tem2.type = TREE_TYPE (tem2.op0); tem2.opcode = TREE_CODE (tem2.op0); vro2 = &tem2; + deref2 = false; } + if (deref1 != deref2) + return false; if (!vn_reference_op_eq (vro1, vro2)) return false; ++j; -- cgit v1.2.3 From a1384460a9ae37fb410f773c222bec61bbc09b81 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 25 Jan 2012 16:33:50 +0000 Subject: PR target/51934 * g++.dg/torture/pr51344.C: Limit to x86. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183526 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/torture/pr51344.C | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 23017801c29..97e7d779ce3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-01-25 Jason Merrill + + PR target/51934 + * g++.dg/torture/pr51344.C: Limit to x86. + 2012-01-25 Tobias Burnus PR fortran/51966 diff --git a/gcc/testsuite/g++.dg/torture/pr51344.C b/gcc/testsuite/g++.dg/torture/pr51344.C index 49018325e42..07be919c3cb 100644 --- a/gcc/testsuite/g++.dg/torture/pr51344.C +++ b/gcc/testsuite/g++.dg/torture/pr51344.C @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do compile { target { i?86-*-* && ilp32 } } } */ class A; template -- cgit v1.2.3 From 2e799156512810971698c34881f29db8cf23980c Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 26 Jan 2012 00:18:28 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183546 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 34bad8c0fe3..9267838aef0 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120125 +20120126 -- cgit v1.2.3 From 979eeb603b7ab8a3ded8e1126ffc914bc9794906 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Fri, 27 Jan 2012 00:18:24 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183597 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 9267838aef0..a3fd9687870 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120126 +20120127 -- cgit v1.2.3 From 46c66fe7e63ce64d90336f2aadf3e3498dcbf342 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sat, 28 Jan 2012 00:18:28 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183659 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index a3fd9687870..af5ce3ec52d 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120127 +20120128 -- cgit v1.2.3 From d92a3751a9e988300b7731e7512e965cdd1f8283 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Sat, 28 Jan 2012 10:00:13 +0000 Subject: 2012-01-28 Tobias Burnus PR fortran/52022 * trans-expr.c (gfc_conv_procedure_call): Fix passing of functions, which return allocatables. 2012-01-28 Tobias Burnus PR fortran/52022 * gfortran.dg/dummy_procedure_7.f90: New. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183665 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 6 +++ gcc/fortran/trans-expr.c | 3 +- gcc/testsuite/ChangeLog | 5 ++ gcc/testsuite/gfortran.dg/dummy_procedure_7.f90 | 65 +++++++++++++++++++++++++ 4 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gfortran.dg/dummy_procedure_7.f90 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index ebdcbc08d9c..54bc970688b 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2012-01-28 Tobias Burnus + + PR fortran/52022 + * trans-expr.c (gfc_conv_procedure_call): Fix passing + of functions, which return allocatables. + 2012-01-25 Tobias Burnus PR fortran/51966 diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 773b2c62db7..0eec9cee92d 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -3064,7 +3064,8 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, || (fsym->attr.proc_pointer && e->expr_type == EXPR_VARIABLE && gfc_is_proc_ptr_comp (e, NULL)) - || fsym->attr.allocatable)) + || (fsym->attr.allocatable + && fsym->attr.flavor != FL_PROCEDURE))) { /* Scalar pointer dummy args require an extra level of indirection. The null pointer already contains diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 97e7d779ce3..82c0a6bd110 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-01-28 Tobias Burnus + + PR fortran/52022 + * gfortran.dg/dummy_procedure_7.f90: New. + 2012-01-25 Jason Merrill PR target/51934 diff --git a/gcc/testsuite/gfortran.dg/dummy_procedure_7.f90 b/gcc/testsuite/gfortran.dg/dummy_procedure_7.f90 new file mode 100644 index 00000000000..32cd65ae8b6 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/dummy_procedure_7.f90 @@ -0,0 +1,65 @@ +! { dg-do run } +! +! PR fortran/52022 +! + +module check + integer, save :: icheck = 0 +end module check + +module t +implicit none + contains +subroutine sol(cost) + use check + interface + function cost(p) result(y) + double precision,dimension(:) :: p + double precision,dimension(:),allocatable :: y + end function cost + end interface + + if (any (cost([1d0,2d0]) /= [2.d0, 4.d0])) call abort () + icheck = icheck + 1 +end subroutine + +end module t + +module tt + procedure(cost1),pointer :: pcost +contains + subroutine init() + pcost=>cost1 + end subroutine + + function cost1(x) result(y) + double precision,dimension(:) :: x + double precision,dimension(:),allocatable :: y + allocate(y(2)) + y=2d0*x + end function cost1 + + + + function cost(x) result(y) + double precision,dimension(:) :: x + double precision,dimension(:),allocatable :: y + allocate(y(2)) + y=pcost(x) + end function cost +end module + +program test + use tt + use t + use check + implicit none + + call init() + if (any (cost([3.d0,7.d0]) /= [6.d0, 14.d0])) call abort () + if (icheck /= 0) call abort () + call sol(cost) + if (icheck /= 1) call abort () +end program test + +! { dg-final { cleanup-modules "t tt check" } } -- cgit v1.2.3 From 1c55a31811d94f950a347ea68c63c60c86a2b3c9 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sun, 29 Jan 2012 00:18:01 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183673 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index af5ce3ec52d..f7c6c2d6123 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120128 +20120129 -- cgit v1.2.3 From e198667f867abaa133715038311f002590bc8842 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Mon, 30 Jan 2012 00:18:06 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183691 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index f7c6c2d6123..36c22fd1a7c 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120129 +20120130 -- cgit v1.2.3 From c689f3546557347083b0bc65300d46f93fafb282 Mon Sep 17 00:00:00 2001 From: Ramana Radhakrishnan Date: Mon, 30 Jan 2012 14:35:05 +0000 Subject: Fix PR target/50313 2012-01-30 Ramana Radhakrishnan Backport from mainline. 2012-01-20 Ramana Radhakrishnan PR target/50313 * config/arm/arm.c (arm_load_pic_register): Use gen_pic_load_addr_unified. Delete calls to gen_pic_load_addr_32bit , gen_pic_add_dot_plus_eight and gen_pic_add_dot_plus_four. (arm_pic_static_addr): Likewise. (arm_rtx_costs_1): Adjust cost for UNSPEC_PIC_UNIFIED. (arm_note_pic_base): Handle UNSPEC_PIC_UNIFIED. * config/arm/arm.md (UNSPEC_PIC_UNIFIED): Define. (pic_load_addr_unified): New. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183727 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 15 +++++++++++++++ gcc/config/arm/arm.c | 39 ++++++++++++++++----------------------- gcc/config/arm/arm.md | 25 +++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 23 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2e80e0af9fb..f0dafc3b3dd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,18 @@ +2012-01-30 Ramana Radhakrishnan + + Backport from mainline. + 2012-01-20 Ramana Radhakrishnan + + PR target/50313 + * config/arm/arm.c (arm_load_pic_register): Use + gen_pic_load_addr_unified. Delete calls to gen_pic_load_addr_32bit + , gen_pic_add_dot_plus_eight and gen_pic_add_dot_plus_four. + (arm_pic_static_addr): Likewise. + (arm_rtx_costs_1): Adjust cost for UNSPEC_PIC_UNIFIED. + (arm_note_pic_base): Handle UNSPEC_PIC_UNIFIED. + * config/arm/arm.md (UNSPEC_PIC_UNIFIED): Define. + (pic_load_addr_unified): New. + 2012-01-25 Richard Guenther * tree-ssa-sccvn.c (vn_reference_eq): Also compare if both diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index d7316524d9e..9058c31de44 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -5387,11 +5387,7 @@ arm_load_pic_register (unsigned long saved_regs ATTRIBUTE_UNUSED) if (TARGET_32BIT) { - emit_insn (gen_pic_load_addr_32bit (pic_reg, pic_rtx)); - if (TARGET_ARM) - emit_insn (gen_pic_add_dot_plus_eight (pic_reg, pic_reg, labelno)); - else - emit_insn (gen_pic_add_dot_plus_four (pic_reg, pic_reg, labelno)); + emit_insn (gen_pic_load_addr_unified (pic_reg, pic_rtx, labelno)); } else /* TARGET_THUMB1 */ { @@ -5404,10 +5400,10 @@ arm_load_pic_register (unsigned long saved_regs ATTRIBUTE_UNUSED) thumb_find_work_register (saved_regs)); emit_insn (gen_pic_load_addr_thumb1 (pic_tmp, pic_rtx)); emit_insn (gen_movsi (pic_offset_table_rtx, pic_tmp)); + emit_insn (gen_pic_add_dot_plus_four (pic_reg, pic_reg, labelno)); } else - emit_insn (gen_pic_load_addr_thumb1 (pic_reg, pic_rtx)); - emit_insn (gen_pic_add_dot_plus_four (pic_reg, pic_reg, labelno)); + emit_insn (gen_pic_load_addr_unified (pic_reg, pic_rtx, labelno)); } } @@ -5437,20 +5433,7 @@ arm_pic_static_addr (rtx orig, rtx reg) UNSPEC_SYMBOL_OFFSET); offset_rtx = gen_rtx_CONST (Pmode, offset_rtx); - if (TARGET_32BIT) - { - emit_insn (gen_pic_load_addr_32bit (reg, offset_rtx)); - if (TARGET_ARM) - insn = emit_insn (gen_pic_add_dot_plus_eight (reg, reg, labelno)); - else - insn = emit_insn (gen_pic_add_dot_plus_four (reg, reg, labelno)); - } - else /* TARGET_THUMB1 */ - { - emit_insn (gen_pic_load_addr_thumb1 (reg, offset_rtx)); - insn = emit_insn (gen_pic_add_dot_plus_four (reg, reg, labelno)); - } - + insn = emit_insn (gen_pic_load_addr_unified (reg, offset_rtx, labelno)); return insn; } @@ -5493,7 +5476,7 @@ static bool will_be_in_index_register (const_rtx x) { /* arm.md: calculate_pic_address will split this into a register. */ - return GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_PIC_SYM; + return GET_CODE (x) == UNSPEC && (XINT (x, 1) == UNSPEC_PIC_SYM); } /* Return nonzero if X is a valid ARM state address operand. */ @@ -7241,6 +7224,15 @@ arm_rtx_costs_1 (rtx x, enum rtx_code outer, int* total, bool speed) *total = COSTS_N_INSNS (4); return true; + case UNSPEC: + /* We cost this as high as our memory costs to allow this to + be hoisted from loops. */ + if (XINT (x, 1) == UNSPEC_PIC_UNIFIED) + { + *total = COSTS_N_INSNS (2 + ARM_NUM_REGS (mode)); + } + return true; + default: *total = COSTS_N_INSNS (4); return false; @@ -9434,7 +9426,8 @@ static int arm_note_pic_base (rtx *x, void *date ATTRIBUTE_UNUSED) { if (GET_CODE (*x) == UNSPEC - && XINT (*x, 1) == UNSPEC_PIC_BASE) + && (XINT (*x, 1) == UNSPEC_PIC_BASE + || XINT (*x, 1) == UNSPEC_PIC_UNIFIED)) return 1; return 0; } diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index ddc7d12b89b..6fc8d606182 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -104,6 +104,7 @@ (UNSPEC_SYMBOL_OFFSET 27) ; The offset of the start of the symbol from ; another symbolic address. (UNSPEC_MEMORY_BARRIER 28) ; Represent a memory barrier. + (UNSPEC_PIC_UNIFIED 29) ; Create a common pic addressing form. ] ) @@ -5257,6 +5258,30 @@ "operands[3] = can_create_pseudo_p () ? gen_reg_rtx (SImode) : operands[0];" ) +;; operand1 is the memory address to go into +;; pic_load_addr_32bit. +;; operand2 is the PIC label to be emitted +;; from pic_add_dot_plus_eight. +;; We do this to allow hoisting of the entire insn. +(define_insn_and_split "pic_load_addr_unified" + [(set (match_operand:SI 0 "s_register_operand" "=r,r,l") + (unspec:SI [(match_operand:SI 1 "" "mX,mX,mX") + (match_operand:SI 2 "" "")] + UNSPEC_PIC_UNIFIED))] + "flag_pic" + "#" + "&& reload_completed" + [(set (match_dup 0) (unspec:SI [(match_dup 1)] UNSPEC_PIC_SYM)) + (set (match_dup 0) (unspec:SI [(match_dup 0) (match_dup 3) + (match_dup 2)] UNSPEC_PIC_BASE))] + "operands[3] = TARGET_THUMB ? GEN_INT (4) : GEN_INT (8);" + [(set_attr "type" "load1,load1,load1") + (set_attr "pool_range" "4096,4096,1024") + (set_attr "neg_pool_range" "4084,0,0") + (set_attr "arch" "a,t2,t1") + (set_attr "length" "8,6,4")] +) + ;; The rather odd constraints on the following are to force reload to leave ;; the insn alone, and to force the minipool generation pass to then move ;; the GOT symbol to memory. -- cgit v1.2.3 From 8de426f952a22abb46f82a882065404728ca0f84 Mon Sep 17 00:00:00 2001 From: Bin Cheng Date: Mon, 30 Jan 2012 17:22:04 +0000 Subject: 2012-01-30 Bin Cheng PR target/51835 * config/arm/arm.c (arm_libcall_uses_aapcs_base): Use correct ABI for __aeabi_d2iz/__aeabi_d2uiz with hard-float. testcases: PR target/51835 * gcc.target/arm/pr51835.c: New testcase. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183734 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 9 +++++++++ gcc/config/arm/arm.c | 4 ++++ gcc/testsuite/ChangeLog | 8 ++++++++ gcc/testsuite/gcc.target/arm/pr51835.c | 14 ++++++++++++++ 4 files changed, 35 insertions(+) create mode 100644 gcc/testsuite/gcc.target/arm/pr51835.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f0dafc3b3dd..08602c58d8c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2012-01-30 Bin Cheng + + Backport from mainline. + 2012-01-30 Bin Cheng + + PR target/51835 + * config/arm/arm.c (arm_libcall_uses_aapcs_base): Use correct ABI + for __aeabi_d2iz/__aeabi_d2uiz with hard-float. + 2012-01-30 Ramana Radhakrishnan Backport from mainline. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 9058c31de44..54b7603f3fc 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -3569,6 +3569,10 @@ arm_libcall_uses_aapcs_base (const_rtx libcall) convert_optab_libfunc (sext_optab, SFmode, HFmode)); add_libcall (libcall_htab, convert_optab_libfunc (trunc_optab, HFmode, SFmode)); + add_libcall (libcall_htab, + convert_optab_libfunc (sfix_optab, SImode, DFmode)); + add_libcall (libcall_htab, + convert_optab_libfunc (ufix_optab, SImode, DFmode)); add_libcall (libcall_htab, convert_optab_libfunc (sfix_optab, DImode, DFmode)); add_libcall (libcall_htab, diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 82c0a6bd110..ae16f720eb7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2012-01-30 Bin Cheng + + Backport from mainline. + 2012-01-30 Bin Cheng + + PR target/51835 + * gcc.target/arm/pr51835.c: New testcase. + 2012-01-28 Tobias Burnus PR fortran/52022 diff --git a/gcc/testsuite/gcc.target/arm/pr51835.c b/gcc/testsuite/gcc.target/arm/pr51835.c new file mode 100644 index 00000000000..858b72f8ad8 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pr51835.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mfloat-abi=hard -mfpu=fpv4-sp-d16" } */ +/* { dg-require-effective-target arm_thumb2_ok } */ + +int func1 (double d) +{ + return (int)d; +} +unsigned int func2 (double d) +{ + return (unsigned int)d; +} + +/* { dg-final { scan-assembler-times "fmrrd\[\\t \]+r0,\[\\t \]*r1,\[\\t \]*d0" 2 } } */ -- cgit v1.2.3 From 6dad0bc3c1f32227d6b2d93f68678899d4590b51 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Tue, 31 Jan 2012 00:18:32 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183748 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 36c22fd1a7c..eab5dc0f244 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120130 +20120131 -- cgit v1.2.3 From 3464092ddd38cb4ad6d5f2b8bc2c8081ad7f7aa9 Mon Sep 17 00:00:00 2001 From: Andreas Krebbel Date: Tue, 31 Jan 2012 15:09:01 +0000 Subject: 2012-01-31 Andreas Krebbel * config/s390/s390.md ("*ashr3_and"): Add missing z196 flag to srak instruction. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183760 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/config/s390/s390.md | 1 + 2 files changed, 6 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 08602c58d8c..0630f8aa39e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-01-31 Andreas Krebbel + + * config/s390/s390.md ("*ashr3_and"): Add missing z196 flag + to srak instruction. + 2012-01-30 Bin Cheng Backport from mainline. diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index e40a1bb1648..99a8d6631a3 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -7644,6 +7644,7 @@ sra\t%0,%1,%Y2" [(set_attr "op_type" "RS,RSY") (set_attr "atype" "reg,reg") + (set_attr "cpu_facility" "*,z196") (set_attr "z10prop" "z10_super_E1,*")]) -- cgit v1.2.3 From 5b418c14cfd396bf0766a7578caea179a110fb41 Mon Sep 17 00:00:00 2001 From: Matthew Gretton-Dann Date: Tue, 31 Jan 2012 16:00:10 +0000 Subject: Backport from mainline. 2011-01-31 Matthew Gretton-Dann config/arm/thumb2.md (thumb2_mov_notscc): Use MVN for true condition. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183761 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 8 ++++++++ gcc/config/arm/thumb2.md | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0630f8aa39e..02e2c74f547 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2012-01-31 Matthew Gretton-Dann + + Backport from mainline. + 2011-01-31 Matthew Gretton-Dann + + config/arm/thumb2.md (thumb2_mov_notscc): Use MVN for true + condition. + 2012-01-31 Andreas Krebbel * config/s390/s390.md ("*ashr3_and"): Add missing z196 flag diff --git a/gcc/config/arm/thumb2.md b/gcc/config/arm/thumb2.md index 11caa612070..6416d187f0b 100644 --- a/gcc/config/arm/thumb2.md +++ b/gcc/config/arm/thumb2.md @@ -257,7 +257,7 @@ (not:SI (match_operator:SI 1 "arm_comparison_operator" [(match_operand 2 "cc_register" "") (const_int 0)])))] "TARGET_THUMB2" - "ite\\t%D1\;mov%D1\\t%0, #0\;mvn%d1\\t%0, #1" + "ite\\t%D1\;mvn%D1\\t%0, #0\;mvn%d1\\t%0, #1" [(set_attr "conds" "use") (set_attr "length" "10")] ) -- cgit v1.2.3 From 2fe1071d74ac45ee4517fe2c0d73cd9e1bd48a85 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Wed, 1 Feb 2012 00:18:34 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183786 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index eab5dc0f244..e53fecc2b97 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120131 +20120201 -- cgit v1.2.3 From 1f30111aca406ae76643048faadb177b6da8aff4 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Wed, 1 Feb 2012 11:10:30 +0000 Subject: 2012-02-01 Paolo Carlini PR libstdc++/51795 * include/bits/random.h (linear_congruential_generator): Add static_assert preventing instantiation for values of 'a' and 'm' currently handled incorrectly but _Mod::__calc. * include/bits/random.tcc (seed_seq::generate): Avoid unsafe uses of _Mod::__calc. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183795 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 9 +++++++++ libstdc++-v3/include/bits/random.h | 7 ++++++- libstdc++-v3/include/bits/random.tcc | 12 +++++++----- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 7036b53c489..5dc5c06444a 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,12 @@ +2012-02-01 Paolo Carlini + + PR libstdc++/51795 + * include/bits/random.h (linear_congruential_generator): Add + static_assert preventing instantiation for values of 'a' and 'm' + currently handled incorrectly by _Mod::__calc. + * include/bits/random.tcc (seed_seq::generate): Avoid unsafe + uses of _Mod::__calc. + 2012-01-03 Chase Douglas Jonathan Wakely diff --git a/libstdc++-v3/include/bits/random.h b/libstdc++-v3/include/bits/random.h index 988ee61cab2..79e8e35c37d 100644 --- a/libstdc++-v3/include/bits/random.h +++ b/libstdc++-v3/include/bits/random.h @@ -1,6 +1,6 @@ // random number generation -*- C++ -*- -// Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. +// Copyright (C) 2009, 2010, 2011, 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 @@ -174,6 +174,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static_assert(__m == 0u || (__a < __m && __c < __m), "template argument substituting __m out of bounds"); + // XXX FIXME: + // _Mod::__calc should handle correctly __m % __a >= __m / __a too. + static_assert(__m % __a < __m / __a, + "sorry, not implemented yet: try a smaller 'a' constant"); + public: /** The type of the generated random value. */ typedef _UIntType result_type; diff --git a/libstdc++-v3/include/bits/random.tcc b/libstdc++-v3/include/bits/random.tcc index b9f6af65362..89885741d57 100644 --- a/libstdc++-v3/include/bits/random.tcc +++ b/libstdc++-v3/include/bits/random.tcc @@ -1,6 +1,6 @@ // random number generation (out of line) -*- C++ -*- -// Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. +// Copyright (C) 2009, 2010, 2011, 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 @@ -49,6 +49,8 @@ namespace std _GLIBCXX_VISIBILITY(default) // // Preconditions: a > 0, m > 0. // + // XXX FIXME: as-is, only works correctly for __m % __a < __m / __a. + // template struct _Mod { @@ -2769,8 +2771,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ^ __begin[(__k + __p) % __n] ^ __begin[(__k - 1) % __n]); _Type __r1 = __arg ^ (__arg >> 27); - __r1 = __detail::__mod<_Type, __detail::_Shift<_Type, 32>::__value, - 1664525u, 0u>(__r1); + __r1 = __detail::__mod<_Type, + __detail::_Shift<_Type, 32>::__value>(1664525u * __r1); _Type __r2 = __r1; if (__k == 0) __r2 += __s; @@ -2791,8 +2793,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION + __begin[(__k + __p) % __n] + __begin[(__k - 1) % __n]); _Type __r3 = __arg ^ (__arg >> 27); - __r3 = __detail::__mod<_Type, __detail::_Shift<_Type, 32>::__value, - 1566083941u, 0u>(__r3); + __r3 = __detail::__mod<_Type, + __detail::_Shift<_Type, 32>::__value>(1566083941u * __r3); _Type __r4 = __r3 - __k % __n; __r4 = __detail::__mod<_Type, __detail::_Shift<_Type, 32>::__value>(__r4); -- cgit v1.2.3 From 25ee4ef815501e1d53f3656ea9d0fb6811066286 Mon Sep 17 00:00:00 2001 From: Georg-Johann Lay Date: Wed, 1 Feb 2012 12:40:23 +0000 Subject: gcc/ Backport from mainline r183796 PR rtl-optimization/51374 * combine.c (can_combine_p): Don't allow volatile_refs_p insns to cross other volatile_refs_p insns. gcc/testsuite/ Backport from mainline r183796 PR rtl-optimization/51374 * testsuite/gcc.target/avr/torture/pr51374-1.c: New. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183797 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/combine.c | 13 ++++++++++--- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.target/avr/torture/pr51374-1.c | 15 +++++++++++++++ 4 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/gcc.target/avr/torture/pr51374-1.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 02e2c74f547..f2816c4caaa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2012-01-12 Georg-Johann Lay + + Backport from mainline r183796 + PR rtl-optimization/51374 + * combine.c (can_combine_p): Don't allow volatile_refs_p insns + to cross other volatile_refs_p insns. + 2012-01-31 Matthew Gretton-Dann Backport from mainline. diff --git a/gcc/combine.c b/gcc/combine.c index 0ffd284ca99..5980fcbbb03 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -1666,6 +1666,7 @@ can_combine_p (rtx insn, rtx i3, rtx pred ATTRIBUTE_UNUSED, rtx link; #endif bool all_adjacent = true; + int (*is_volatile_p) (const_rtx); if (succ) { @@ -1914,11 +1915,17 @@ can_combine_p (rtx insn, rtx i3, rtx pred ATTRIBUTE_UNUSED, && REG_P (dest) && REGNO (dest) < FIRST_PSEUDO_REGISTER) return 0; - /* If there are any volatile insns between INSN and I3, reject, because - they might affect machine state. */ + /* If INSN contains volatile references (specifically volatile MEMs), + we cannot combine across any other volatile references. + Even if INSN doesn't contain volatile references, any intervening + volatile insn might affect machine state. */ + is_volatile_p = volatile_refs_p (PATTERN (insn)) + ? volatile_refs_p + : volatile_insn_p; + for (p = NEXT_INSN (insn); p != i3; p = NEXT_INSN (p)) - if (INSN_P (p) && p != succ && p != succ2 && volatile_insn_p (PATTERN (p))) + if (INSN_P (p) && p != succ && p != succ2 && is_volatile_p (PATTERN (p))) return 0; /* If INSN contains an autoincrement or autodecrement, make sure that diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ae16f720eb7..1d2e1651618 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2012-01-12 Georg-Johann Lay + + Backport from mainline r183796 + PR rtl-optimization/51374 + * testsuite/gcc.target/avr/torture/pr51374-1.c: New. + 2012-01-30 Bin Cheng Backport from mainline. diff --git a/gcc/testsuite/gcc.target/avr/torture/pr51374-1.c b/gcc/testsuite/gcc.target/avr/torture/pr51374-1.c new file mode 100644 index 00000000000..9c98ea5f8e0 --- /dev/null +++ b/gcc/testsuite/gcc.target/avr/torture/pr51374-1.c @@ -0,0 +1,15 @@ +/* PR rtl-optimization/51374 */ +/* { dg-do compile } */ + +void vector_18 (void) +{ + extern char slot; + unsigned char status = (*(volatile unsigned char*) 0x2B); + unsigned char data = (*(volatile unsigned char*) 0x2C); + + if (status & 0x10) + slot = 0; +} + +/* { dg-final { scan-assembler-not "\tsbic " } } */ +/* { dg-final { scan-assembler-not "\tsbis " } } */ -- cgit v1.2.3 From 1f3160d95d0de3702ca01760e16f6a6ce09c3efe Mon Sep 17 00:00:00 2001 From: Georg-Johann Lay Date: Wed, 1 Feb 2012 12:49:34 +0000 Subject: Fix file naming convention from r183797. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183799 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1d2e1651618..cdf77553506 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -2,7 +2,7 @@ Backport from mainline r183796 PR rtl-optimization/51374 - * testsuite/gcc.target/avr/torture/pr51374-1.c: New. + * gcc.target/avr/torture/pr51374-1.c: New. 2012-01-30 Bin Cheng -- cgit v1.2.3 From 666acc7a6c89aed72b3c0ccd0852865bf9df1687 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 2 Feb 2012 00:17:57 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183820 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index e53fecc2b97..394ef67e59d 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120201 +20120202 -- cgit v1.2.3 From 1829f6662dcd10d13ae1f8fb65ea095c87291a22 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Fri, 3 Feb 2012 00:17:56 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183858 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 394ef67e59d..065f6a51371 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120202 +20120203 -- cgit v1.2.3 From b8be2e5ad7f7fc1b3cf504845683a77363f7eaa7 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Fri, 3 Feb 2012 07:29:31 +0000 Subject: Backport from mainline: 2011-11-18 Uros Bizjak PR tree-optimization/51118 * fold-const.c (fold_checksum_tree): Check for TS_TYPED structure before using TREE_TYPE accessor on expr. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183864 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 11 ++++++++++- gcc/fold-const.c | 3 ++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f2816c4caaa..2ff3b717ac0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2012-02-02 Uros Bizjak + + Backport from mainline: + 2011-11-18 Uros Bizjak + + PR tree-optimization/51118 + * fold-const.c (fold_checksum_tree): Check for TS_TYPED structure + before using TREE_TYPE accessor on expr. + 2012-01-12 Georg-Johann Lay Backport from mainline r183796 @@ -30,7 +39,7 @@ 2012-01-30 Ramana Radhakrishnan Backport from mainline. - 2012-01-20 Ramana Radhakrishnan + 2012-01-20 Ramana Radhakrishnan PR target/50313 * config/arm/arm.c (arm_load_pic_register): Use diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 51be79dfd0b..c6b5f5d8d0a 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -13784,7 +13784,8 @@ recursive_label: } } md5_process_bytes (expr, tree_size (expr), ctx); - fold_checksum_tree (TREE_TYPE (expr), ctx, ht); + if (CODE_CONTAINS_STRUCT (code, TS_TYPED)) + fold_checksum_tree (TREE_TYPE (expr), ctx, ht); if (TREE_CODE_CLASS (code) != tcc_type && TREE_CODE_CLASS (code) != tcc_declaration && code != TREE_LIST -- cgit v1.2.3 From 1e8593e969ea6770f1c832c924c4419e7dede5c2 Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Fri, 3 Feb 2012 10:35:06 +0000 Subject: PR libjava/48512 * configure.ac (THREADSTARTFILESPEC): Don't add crtmet.o file for w64 windows targets. * configure: Regenerated. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183868 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/ChangeLog | 7 +++++++ libjava/configure | 9 +++++++-- libjava/configure.ac | 9 +++++++-- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index b27b55beaed..3a08d210ae5 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,10 @@ +2012-02-03 Kai Tietz + + PR libjava/48512 + * configure.ac (THREADSTARTFILESPEC): Don't add crtmet.o file for + w64 windows targets. + * configure: Regenerated. + 2011-11-24 Jakub Jelinek PR bootstrap/50888 diff --git a/libjava/configure b/libjava/configure index 73ebd03fd1e..3a722c772ca 100755 --- a/libjava/configure +++ b/libjava/configure @@ -20796,9 +20796,14 @@ $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h # FIXME: In Java we are able to detect thread death at the end of # Thread.run() so we should be able to clean up the exception handling # contexts ourselves. - THREADSTARTFILESPEC='crtmt%O%s' + case "$host" in + *-w64-mingw*) + ;; + *) + THREADSTARTFILESPEC='crtmt%O%s' + ;; + esac ;; - none) THREADH=no-threads.h ;; diff --git a/libjava/configure.ac b/libjava/configure.ac index b8f299dca6e..276b36fd983 100644 --- a/libjava/configure.ac +++ b/libjava/configure.ac @@ -1135,9 +1135,14 @@ case "$THREADS" in # FIXME: In Java we are able to detect thread death at the end of # Thread.run() so we should be able to clean up the exception handling # contexts ourselves. - THREADSTARTFILESPEC='crtmt%O%s' + case "$host" in + *-w64-mingw*) + ;; + *) + THREADSTARTFILESPEC='crtmt%O%s' + ;; + esac ;; - none) THREADH=no-threads.h ;; -- cgit v1.2.3 From f9b10982ba2274481f8c3b56717858fba8aa56d2 Mon Sep 17 00:00:00 2001 From: Paul Thomas Date: Fri, 3 Feb 2012 18:33:58 +0000 Subject: 2012-02-03 Paul Thomas PR fortran/52012 * trans-expr.c (fcncall_realloc_result): Correct calculation of result offset. If variable shape is correct, retain the bounds, whatever they are. 2012-02-03 Paul Thomas PR fortran/52012 * gfortran.dg/realloc_on_assign_10.f90: New test. * gfortran.dg/realloc_on_assign_11.f90: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183874 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 7 ++ gcc/fortran/trans-expr.c | 90 ++++++++++++++++------ gcc/testsuite/ChangeLog | 6 ++ gcc/testsuite/gfortran.dg/realloc_on_assign_10.f90 | 18 +++++ gcc/testsuite/gfortran.dg/realloc_on_assign_11.f90 | 36 +++++++++ 5 files changed, 132 insertions(+), 25 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/realloc_on_assign_10.f90 create mode 100644 gcc/testsuite/gfortran.dg/realloc_on_assign_11.f90 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 54bc970688b..f06158d9bd3 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2012-02-03 Paul Thomas + + PR fortran/52012 + * trans-expr.c (fcncall_realloc_result): Correct calculation of + result offset. If variable shape is correct, retain the bounds, + whatever they are. + 2012-01-28 Tobias Burnus PR fortran/52022 diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 0eec9cee92d..c0c4c6fe921 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -1,6 +1,6 @@ /* Expression translation Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, - 2011 + 2011, 2012 Free Software Foundation, Inc. Contributed by Paul Brook and Steven Bosscher @@ -5536,7 +5536,7 @@ realloc_lhs_loop_for_fcn_call (gfc_se *se, locus *where, gfc_ss **ss) } -/* For Assignment to a reallocatable lhs from intrinsic functions, +/* For assignment to a reallocatable lhs from intrinsic functions, replace the se.expr (ie. the result) with a temporary descriptor. Null the data field so that the library allocates space for the result. Free the data of the original descriptor after the function, @@ -5550,55 +5550,95 @@ fcncall_realloc_result (gfc_se *se, int rank) tree res_desc; tree tmp; tree offset; + tree zero_cond; int n; /* Use the allocation done by the library. Substitute the lhs descriptor with a copy, whose data field is nulled.*/ desc = build_fold_indirect_ref_loc (input_location, se->expr); + /* Unallocated, the descriptor does not have a dtype. */ tmp = gfc_conv_descriptor_dtype (desc); gfc_add_modify (&se->pre, tmp, gfc_get_dtype (TREE_TYPE (desc))); + res_desc = gfc_evaluate_now (desc, &se->pre); gfc_conv_descriptor_data_set (&se->pre, res_desc, null_pointer_node); se->expr = gfc_build_addr_expr (TREE_TYPE (se->expr), res_desc); - /* Free the lhs after the function call and copy the result to + /* Free the lhs after the function call and copy the result data to the lhs descriptor. */ tmp = gfc_conv_descriptor_data_get (desc); + zero_cond = fold_build2_loc (input_location, EQ_EXPR, + boolean_type_node, tmp, + build_int_cst (TREE_TYPE (tmp), 0)); + zero_cond = gfc_evaluate_now (zero_cond, &se->post); tmp = gfc_call_free (fold_convert (pvoid_type_node, tmp)); gfc_add_expr_to_block (&se->post, tmp); - gfc_add_modify (&se->post, desc, res_desc); + tmp = gfc_conv_descriptor_data_get (res_desc); + gfc_conv_descriptor_data_set (&se->post, desc, tmp); + + /* Check that the shapes are the same between lhs and expression. */ + for (n = 0 ; n < rank; n++) + { + tree tmp1; + tmp = gfc_conv_descriptor_lbound_get (desc, gfc_rank_cst[n]); + tmp1 = gfc_conv_descriptor_lbound_get (res_desc, gfc_rank_cst[n]); + tmp = fold_build2_loc (input_location, MINUS_EXPR, + gfc_array_index_type, tmp, tmp1); + tmp1 = gfc_conv_descriptor_ubound_get (desc, gfc_rank_cst[n]); + tmp = fold_build2_loc (input_location, MINUS_EXPR, + gfc_array_index_type, tmp, tmp1); + tmp1 = gfc_conv_descriptor_ubound_get (res_desc, gfc_rank_cst[n]); + tmp = fold_build2_loc (input_location, PLUS_EXPR, + gfc_array_index_type, tmp, tmp1); + tmp = fold_build2_loc (input_location, NE_EXPR, + boolean_type_node, tmp, + gfc_index_zero_node); + tmp = gfc_evaluate_now (tmp, &se->post); + zero_cond = fold_build2_loc (input_location, TRUTH_OR_EXPR, + boolean_type_node, tmp, + zero_cond); + } + + /* 'zero_cond' being true is equal to lhs not being allocated or the + shapes being different. */ + zero_cond = gfc_evaluate_now (zero_cond, &se->post); + + /* Now reset the bounds returned from the function call to bounds based + on the lhs lbounds, except where the lhs is not allocated or the shapes + of 'variable and 'expr' are different. Set the offset accordingly. */ offset = gfc_index_zero_node; - tmp = gfc_index_one_node; - /* Now reset the bounds from zero based to unity based. */ for (n = 0 ; n < rank; n++) { - /* Accumulate the offset. */ - offset = fold_build2_loc (input_location, MINUS_EXPR, - gfc_array_index_type, - offset, tmp); - /* Now do the bounds. */ - gfc_conv_descriptor_offset_set (&se->post, desc, tmp); - tmp = gfc_conv_descriptor_ubound_get (desc, gfc_rank_cst[n]); + tree lbound; + + lbound = gfc_conv_descriptor_lbound_get (desc, gfc_rank_cst[n]); + lbound = fold_build3_loc (input_location, COND_EXPR, + gfc_array_index_type, zero_cond, + gfc_index_one_node, lbound); + lbound = gfc_evaluate_now (lbound, &se->post); + + tmp = gfc_conv_descriptor_ubound_get (res_desc, gfc_rank_cst[n]); tmp = fold_build2_loc (input_location, PLUS_EXPR, - gfc_array_index_type, - tmp, gfc_index_one_node); + gfc_array_index_type, tmp, lbound); gfc_conv_descriptor_lbound_set (&se->post, desc, - gfc_rank_cst[n], - gfc_index_one_node); + gfc_rank_cst[n], lbound); gfc_conv_descriptor_ubound_set (&se->post, desc, gfc_rank_cst[n], tmp); - /* The extent for the next contribution to offset. */ - tmp = fold_build2_loc (input_location, MINUS_EXPR, - gfc_array_index_type, - gfc_conv_descriptor_ubound_get (desc, gfc_rank_cst[n]), - gfc_conv_descriptor_lbound_get (desc, gfc_rank_cst[n])); - tmp = fold_build2_loc (input_location, PLUS_EXPR, - gfc_array_index_type, - tmp, gfc_index_one_node); + /* Accumulate the offset. */ + tmp = gfc_conv_descriptor_stride_get (desc, gfc_rank_cst[n]); + tmp = fold_build2_loc (input_location, MULT_EXPR, + gfc_array_index_type, + lbound, tmp); + offset = fold_build2_loc (input_location, MINUS_EXPR, + gfc_array_index_type, + offset, tmp); + offset = gfc_evaluate_now (offset, &se->post); + } + gfc_conv_descriptor_offset_set (&se->post, desc, offset); } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index cdf77553506..517b3d5c76b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2012-02-03 Paul Thomas + + PR fortran/52012 + * gfortran.dg/realloc_on_assign_10.f90: New test. + * gfortran.dg/realloc_on_assign_11.f90: New test. + 2012-01-12 Georg-Johann Lay Backport from mainline r183796 diff --git a/gcc/testsuite/gfortran.dg/realloc_on_assign_10.f90 b/gcc/testsuite/gfortran.dg/realloc_on_assign_10.f90 new file mode 100644 index 00000000000..787a56ae9e9 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/realloc_on_assign_10.f90 @@ -0,0 +1,18 @@ +! { dg-do run } +! PR52012 - with realloc_lhs active(ie. default condition) the +! offset was wrongly calculated for a, after assignment. +! +! Reported by Reinhold Bader and Tobias Burnus +! +program gf + implicit none + real, allocatable :: a(:,:,:) + real, parameter :: zero = 0.0, one = 1.0 + real :: b(3,4,5) = zero + b(1,2,3) = one + allocate (a(size (b, 3), size (b, 2), size (b, 1))) + a = reshape (b, shape (a), order = [3, 2, 1]) + if (any (a(:, 2, 1) .ne. [zero, zero, one, zero, zero])) call abort + if (a(3, 2, 1) /= one) call abort() + if (sum (abs (a)) /= one) call abort() +end program diff --git a/gcc/testsuite/gfortran.dg/realloc_on_assign_11.f90 b/gcc/testsuite/gfortran.dg/realloc_on_assign_11.f90 new file mode 100644 index 00000000000..ab96bb9deaf --- /dev/null +++ b/gcc/testsuite/gfortran.dg/realloc_on_assign_11.f90 @@ -0,0 +1,36 @@ +! { dg-do run } +! PR52012 - tests of automatic reallocation on assignment for variable = array_intrinsic +! +! Contributed by Tobias Burnus and Dominique Dhumieres +! + integer, allocatable :: a(:), b(:), e(:,:) + integer :: c(1:5,1:5), d(1:5,1:5) + allocate(b(3)) + b = [1,2,3] + +! Shape conforms so bounds follow allocation. + allocate (a(7:9)) + a = reshape( b, shape=[size(b)]) + if (any ([lbound(a), ubound(a), size(a), shape (a)] .ne. [7,9,3,3])) call abort + + deallocate (a) +! 'a' not allocated so lbound defaults to 1. + a = reshape( b, shape=[size(b)]) + if (any ([lbound(a), ubound(a), size(a), shape (a)] .ne. [1,3,3,3])) call abort + + deallocate (a) +! Shape conforms so bounds follow allocation. + allocate (a(0:0)) + a(0) = 1 + if (any ([lbound(a), ubound(a), size(a), shape (a)] .ne. [0,0,1,1])) call abort + +! 'a' not allocated so lbound defaults to 1. + e = matmul (c(2:5,:), d(:, 3:4)) + if (any ([lbound(e), ubound(e), size(e), shape (e)] .ne. [1,1,4,2,8,4,2])) call abort + deallocate (e) + +! Shape conforms so bounds follow allocation. + allocate (e(4:7, 11:12)) + e = matmul (c(2:5,:), d(:, 3:4)) + if (any ([lbound(e), ubound(e), size(e), shape (e)] .ne. [4,11,7,12,8,4,2])) call abort +end -- cgit v1.2.3 From 0e2b285ef255a1709d6040c1d212d68d109e6520 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Fri, 3 Feb 2012 20:37:36 +0000 Subject: 2012-02-03 Tobias Burnus PR fortran/52093 * simplify.c (gfc_simplify_size): Handle INTRINSIC_PARENTHESES. 2012-02-03 Tobias Burnus PR fortran/52093 * gfortran.dg/shape_7.f90: New. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183877 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 5 +++++ gcc/fortran/simplify.c | 1 + gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/shape_7.f90 | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 43 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/shape_7.f90 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index f06158d9bd3..dca2c133495 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2012-02-03 Tobias Burnus + + PR fortran/52093 + * simplify.c (gfc_simplify_size): Handle INTRINSIC_PARENTHESES. + 2012-02-03 Paul Thomas PR fortran/52012 diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c index bb8b575ded8..0780a778e0f 100644 --- a/gcc/fortran/simplify.c +++ b/gcc/fortran/simplify.c @@ -5583,6 +5583,7 @@ gfc_simplify_size (gfc_expr *array, gfc_expr *dim, gfc_expr *kind) case INTRINSIC_NOT: case INTRINSIC_UPLUS: case INTRINSIC_UMINUS: + case INTRINSIC_PARENTHESES: replacement = array->value.op.op1; break; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 517b3d5c76b..fe4f9c6eab0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-02-03 Tobias Burnus + + PR fortran/52093 + * gfortran.dg/shape_7.f90: New. + 2012-02-03 Paul Thomas PR fortran/52012 diff --git a/gcc/testsuite/gfortran.dg/shape_7.f90 b/gcc/testsuite/gfortran.dg/shape_7.f90 new file mode 100644 index 00000000000..3c471f4d4a0 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/shape_7.f90 @@ -0,0 +1,32 @@ +! { dg-do compile } +! { dg-options "-fdump-tree-original" } +! +! PR fortran/52093 +! +! Contributed by Mohammad Rahmani +! + +Program Main + Implicit None + Integer:: X(2,2) + Integer:: X2(7:11,8:9) + + if (size((X)) /= 4) call abort () + if (any (Shape((X)) /= [2,2])) call abort () + if (any (lbound((X)) /= [1,1])) call abort () + if (any (ubound((X)) /= [2,2])) call abort () + + if (size(X2) /= 10) call abort () + if (any (Shape(X2) /= [5,2])) call abort () + if (any (lbound(X2) /= [7,8])) call abort () + if (any (ubound(X2) /= [11,9])) call abort () + + if (size((X2)) /= 10) call abort () + if (any (Shape((X2)) /= [5,2])) call abort () + if (any (lbound((X2)) /= [1,1])) call abort () + if (any (ubound((X2)) /= [5,2])) call abort () +End Program Main + +! { dg-final { scan-tree-dump-times "abort" 0 "original" } } +! { dg-final { cleanup-tree-dump "original" } } + -- cgit v1.2.3 From 99dc214da279507b3d828b1f2932f4fcefb14187 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sat, 4 Feb 2012 00:18:11 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183886 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 065f6a51371..53bbc7ae55d 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120203 +20120204 -- cgit v1.2.3 From 18ad158f5ea44de35cfef79a6db4f43c5be87319 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sun, 5 Feb 2012 00:18:08 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183899 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 53bbc7ae55d..1b73ccca20c 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120204 +20120205 -- cgit v1.2.3 From b3e286bb36f93f55517cb54df057d7a9322c9af0 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Mon, 6 Feb 2012 00:17:35 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183924 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 1b73ccca20c..ed18f29438f 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120205 +20120206 -- cgit v1.2.3 From b248e3f8dac16374ecc44bdf2c486fa6c920ec43 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 6 Feb 2012 23:41:45 +0000 Subject: PR target/52107 * config/rs6000/rs6000.c (rs6000_emit_move): Don't create DImode subregs of TFmode. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183947 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/config/rs6000/rs6000.c | 19 ++++++++----------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2ff3b717ac0..28f57011da6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-02-07 Alan Modra + + PR target/52107 + * config/rs6000/rs6000.c (rs6000_emit_move): Don't create DImode + subregs of TFmode. + 2012-02-02 Uros Bizjak Backport from mainline: diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index ae0cc17f573..a9cd835577e 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -7590,17 +7590,14 @@ rs6000_emit_move (rtx dest, rtx source, enum machine_mode mode) if (!TARGET_IEEEQUAD && TARGET_LONG_DOUBLE_128 && mode == TFmode && GET_CODE (operands[1]) == CONST_DOUBLE) { - /* DImode is used, not DFmode, because simplify_gen_subreg doesn't - know how to get a DFmode SUBREG of a TFmode. */ - enum machine_mode imode = (TARGET_E500_DOUBLE ? DFmode : DImode); - rs6000_emit_move (simplify_gen_subreg (imode, operands[0], mode, 0), - simplify_gen_subreg (imode, operands[1], mode, 0), - imode); - rs6000_emit_move (simplify_gen_subreg (imode, operands[0], mode, - GET_MODE_SIZE (imode)), - simplify_gen_subreg (imode, operands[1], mode, - GET_MODE_SIZE (imode)), - imode); + rs6000_emit_move (simplify_gen_subreg (DFmode, operands[0], mode, 0), + simplify_gen_subreg (DFmode, operands[1], mode, 0), + DFmode); + rs6000_emit_move (simplify_gen_subreg (DFmode, operands[0], mode, + GET_MODE_SIZE (DFmode)), + simplify_gen_subreg (DFmode, operands[1], mode, + GET_MODE_SIZE (DFmode)), + DFmode); return; } -- cgit v1.2.3 From 9bceb93e2757697b484674bad296417f78f95869 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Tue, 7 Feb 2012 00:18:20 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183950 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index ed18f29438f..be9a3e6c4b6 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120206 +20120207 -- cgit v1.2.3 From 46121b4e5a78999f23a3ff23d9026323daffee46 Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Tue, 7 Feb 2012 10:49:14 +0000 Subject: 2012-02-07 Kai Tietz Dave Korn PR target/40068 * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Take care that typinfo gets dllexport-attribute. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183963 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/config/i386/winnt-cxx.c | 14 ++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 28f57011da6..f59780b1b5a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2012-02-07 Kai Tietz + Dave Korn + + PR target/40068 + * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): + Take care that typinfo gets dllexport-attribute. + 2012-02-07 Alan Modra PR target/52107 diff --git a/gcc/config/i386/winnt-cxx.c b/gcc/config/i386/winnt-cxx.c index 9c552300699..0c47e3a8b58 100644 --- a/gcc/config/i386/winnt-cxx.c +++ b/gcc/config/i386/winnt-cxx.c @@ -97,6 +97,20 @@ i386_pe_adjust_class_at_definition (tree t) if (lookup_attribute ("dllexport", TYPE_ATTRIBUTES (t)) != NULL_TREE) { + tree tmv = TYPE_MAIN_VARIANT (t); + + /* Make sure that we set dllexport attribute to typeinfo's + base declaration, as otherwise it would fail to be exported as + it isn't a class-member. */ + if (tmv != NULL_TREE + && CLASSTYPE_TYPEINFO_VAR (tmv) != NULL_TREE) + { + tree na, ti_decl = CLASSTYPE_TYPEINFO_VAR (tmv); + na = tree_cons (get_identifier ("dllexport"), NULL_TREE, + NULL_TREE); + decl_attributes (&ti_decl, na, 0); + } + /* Check static VAR_DECL's. */ for (member = TYPE_FIELDS (t); member; member = DECL_CHAIN (member)) if (TREE_CODE (member) == VAR_DECL) -- cgit v1.2.3 From 03312b25fb35a685daa8423a8d232097bebc13d7 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Tue, 7 Feb 2012 17:24:27 +0000 Subject: PR middle-end/51994 * expr.c (get_inner_reference): If there is an offset, add a negative bit position to it (if any). git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183975 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/expr.c | 18 ++++++++++++++++ gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.c-torture/execute/20120207-1.c | 27 ++++++++++++++++++++++++ 4 files changed, 55 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/execute/20120207-1.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f59780b1b5a..fd9ed1013f1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-02-07 Eric Botcazou + + PR middle-end/51994 + * expr.c (get_inner_reference): If there is an offset, add a negative + bit position to it (if any). + 2012-02-07 Kai Tietz Dave Korn diff --git a/gcc/expr.c b/gcc/expr.c index d813e21ea05..818ae161fcc 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -6296,6 +6296,24 @@ get_inner_reference (tree exp, HOST_WIDE_INT *pbitsize, /* Otherwise, split it up. */ if (offset) { + /* Avoid returning a negative bitpos as this may wreak havoc later. */ + if (double_int_negative_p (bit_offset)) + { + double_int mask + = double_int_mask (BITS_PER_UNIT == 8 + ? 3 : exact_log2 (BITS_PER_UNIT)); + double_int tem = double_int_and_not (bit_offset, mask); + /* TEM is the bitpos rounded to BITS_PER_UNIT towards -Inf. + Subtract it to BIT_OFFSET and add it (scaled) to OFFSET. */ + bit_offset = double_int_sub (bit_offset, tem); + tem = double_int_rshift (tem, + BITS_PER_UNIT == 8 + ? 3 : exact_log2 (BITS_PER_UNIT), + HOST_BITS_PER_DOUBLE_INT, true); + offset = size_binop (PLUS_EXPR, offset, + double_int_to_tree (sizetype, tem)); + } + *pbitpos = double_int_to_shwi (bit_offset); *poffset = offset; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fe4f9c6eab0..d181cd8d7e4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2012-02-07 Eric Botcazou + + * gcc.c-torture/execute/20120207-1.c: New test. + 2012-02-03 Tobias Burnus PR fortran/52093 diff --git a/gcc/testsuite/gcc.c-torture/execute/20120207-1.c b/gcc/testsuite/gcc.c-torture/execute/20120207-1.c new file mode 100644 index 00000000000..c4716aecad8 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20120207-1.c @@ -0,0 +1,27 @@ +/* PR middle-end/51994 */ +/* Testcase by Uros Bizjak */ + +extern char *strcpy (char *, const char *); +extern void abort (void); + +char __attribute__((noinline)) +test (int a) +{ + char buf[16]; + char *output = buf; + + strcpy (&buf[0], "0123456789"); + + output += a; + output -= 1; + + return output[0]; +} + +int main () +{ + if (test (2) != '1') + abort (); + + return 0; +} -- cgit v1.2.3 From df6b3830985cb9ef1c57ed1f28418c58dde9b950 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Wed, 8 Feb 2012 00:18:21 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183990 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index be9a3e6c4b6..3838c4f2111 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120207 +20120208 -- cgit v1.2.3 From ac271944f1135d31ae569b46e3492b1ea7af3178 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Wed, 8 Feb 2012 21:29:45 +0000 Subject: 2012-02-08 Tobias Burnus PR fortran/52151 * trans-expr.c (fcncall_realloc_result): Set also the stride. 2012-02-08 Tobias Burnus PR fortran/52151 * gfortran.dg/realloc_on_assign_12.f90: New. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184020 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 5 ++ gcc/fortran/trans-expr.c | 13 ++- gcc/testsuite/ChangeLog | 5 ++ gcc/testsuite/gfortran.dg/realloc_on_assign_12.f90 | 96 ++++++++++++++++++++++ 4 files changed, 112 insertions(+), 7 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/realloc_on_assign_12.f90 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index dca2c133495..8c18aecbe21 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2012-02-08 Tobias Burnus + + PR fortran/52151 + * trans-expr.c (fcncall_realloc_result): Set also the stride. + 2012-02-03 Tobias Burnus PR fortran/52093 diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index c0c4c6fe921..3db1244bf25 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -5627,16 +5627,15 @@ fcncall_realloc_result (gfc_se *se, int rank) gfc_conv_descriptor_ubound_set (&se->post, desc, gfc_rank_cst[n], tmp); - /* Accumulate the offset. */ - tmp = gfc_conv_descriptor_stride_get (desc, gfc_rank_cst[n]); + /* Set stride and accumulate the offset. */ + tmp = gfc_conv_descriptor_stride_get (res_desc, gfc_rank_cst[n]); + gfc_conv_descriptor_stride_set (&se->post, desc, + gfc_rank_cst[n], tmp); tmp = fold_build2_loc (input_location, MULT_EXPR, - gfc_array_index_type, - lbound, tmp); + gfc_array_index_type, lbound, tmp); offset = fold_build2_loc (input_location, MINUS_EXPR, - gfc_array_index_type, - offset, tmp); + gfc_array_index_type, offset, tmp); offset = gfc_evaluate_now (offset, &se->post); - } gfc_conv_descriptor_offset_set (&se->post, desc, offset); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d181cd8d7e4..bbfd905a27b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-02-08 Tobias Burnus + + PR fortran/52151 + * gfortran.dg/realloc_on_assign_12.f90: New. + 2012-02-07 Eric Botcazou * gcc.c-torture/execute/20120207-1.c: New test. diff --git a/gcc/testsuite/gfortran.dg/realloc_on_assign_12.f90 b/gcc/testsuite/gfortran.dg/realloc_on_assign_12.f90 new file mode 100644 index 00000000000..3e0ceb1e3d1 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/realloc_on_assign_12.f90 @@ -0,0 +1,96 @@ +! { dg-do run } +! +! PR fortran/52151 +! +! Check that the bounds/shape/strides are correctly set +! for (re)alloc on assignment, if the LHS is either not +! allocated or has the wrong shape. This test is for +! code which is only invoked for libgfortran intrinsic +! such as RESHAPE. +! +! Based on the example of PR 52117 by Steven Hirshman +! + PROGRAM RESHAPEIT + call unalloc () + call wrong_shape () + contains + subroutine unalloc () + INTEGER, PARAMETER :: n1=2, n2=2, n3=2 + INTEGER :: m1, m2, m3, lc + REAL, ALLOCATABLE :: A(:,:), B(:,:,:) + REAL :: val + + ALLOCATE (A(n1,n2*n3)) +! << B is not allocated + + val = 0 + lc = 0 + DO m3=1,n3 + DO m2=1,n2 + lc = lc+1 + DO m1=1,n1 + val = val+1 + A(m1, lc) = val + END DO + END DO + END DO + + B = RESHAPE(A, [n1,n2,n3]) + + if (any (shape (B) /= [n1,n2,n3])) call abort () + if (any (ubound (B) /= [n1,n2,n3])) call abort () + if (any (lbound (B) /= [1,1,1])) call abort () + + lc = 0 + DO m3=1,n3 + DO m2=1,n2 + lc = lc+1 + DO m1=1,n1 +! PRINT *,'A(',m1,',',lc,') = ',A(m1,lc),' B = ',B(m1,m2,m3) + if (A(m1,lc) /= B(m1,m2,m3)) call abort () + END DO + END DO + END DO + DEALLOCATE(A, B) + end subroutine unalloc + + subroutine wrong_shape () + INTEGER, PARAMETER :: n1=2, n2=2, n3=2 + INTEGER :: m1, m2, m3, lc + REAL, ALLOCATABLE :: A(:,:), B(:,:,:) + REAL :: val + + ALLOCATE (A(n1,n2*n3)) + ALLOCATE (B(1,1,1)) ! << shape differs from RHS + + val = 0 + lc = 0 + DO m3=1,n3 + DO m2=1,n2 + lc = lc+1 + DO m1=1,n1 + val = val+1 + A(m1, lc) = val + END DO + END DO + END DO + + B = RESHAPE(A, [n1,n2,n3]) + + if (any (shape (B) /= [n1,n2,n3])) call abort () + if (any (ubound (B) /= [n1,n2,n3])) call abort () + if (any (lbound (B) /= [1,1,1])) call abort () + + lc = 0 + DO m3=1,n3 + DO m2=1,n2 + lc = lc+1 + DO m1=1,n1 +! PRINT *,'A(',m1,',',lc,') = ',A(m1,lc),' B = ',B(m1,m2,m3) + if (A(m1,lc) /= B(m1,m2,m3)) call abort () + END DO + END DO + END DO + DEALLOCATE(A, B) + end subroutine wrong_shape + END PROGRAM RESHAPEIT -- cgit v1.2.3 From 9bb74926ec05df3228e7d459d0b2dc60183caac8 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 9 Feb 2012 00:17:58 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184031 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 3838c4f2111..65b588f1261 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120208 +20120209 -- cgit v1.2.3 From 2a20ed3582d7e997a60731d6d9a49000b48d7a26 Mon Sep 17 00:00:00 2001 From: Andrey Belevantsev Date: Thu, 9 Feb 2012 10:10:36 +0000 Subject: 2012-02-09 Andrey Belevantsev Backport from mainline 2012-01-20 Andrey Belevantsev PR target/51106 * function.c (instantiate_virtual_regs_in_insn): Use delete_insn_and_edges when removing a wrong asm insn. Backport from mainline 2012-01-20 Jakub Jelinek PR target/51106 * gcc.dg/torture/pr51106-1.c: New test. * gcc.dg/torture/pr51106-2.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184038 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 9 +++++++++ gcc/function.c | 4 ++-- gcc/testsuite/ChangeLog | 9 +++++++++ gcc/testsuite/gcc.dg/torture/pr51106-1.c | 14 ++++++++++++++ gcc/testsuite/gcc.dg/torture/pr51106-2.c | 14 ++++++++++++++ 5 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/torture/pr51106-1.c create mode 100644 gcc/testsuite/gcc.dg/torture/pr51106-2.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fd9ed1013f1..119534e69fa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2012-02-09 Andrey Belevantsev + + Backport from mainline + 2012-01-20 Andrey Belevantsev + + PR target/51106 + * function.c (instantiate_virtual_regs_in_insn): Use + delete_insn_and_edges when removing a wrong asm insn. + 2012-02-07 Eric Botcazou PR middle-end/51994 diff --git a/gcc/function.c b/gcc/function.c index 1f7722c62a2..d728384699f 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -1,7 +1,7 @@ /* Expands front end tree to back end RTL for GCC. Copyright (C) 1987, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, - 2010, 2011 Free Software Foundation, Inc. + 2010, 2011, 2012 Free Software Foundation, Inc. This file is part of GCC. @@ -1747,7 +1747,7 @@ instantiate_virtual_regs_in_insn (rtx insn) if (!check_asm_operands (PATTERN (insn))) { error_for_asm (insn, "impossible constraint in %"); - delete_insn (insn); + delete_insn_and_edges (insn); } } else diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bbfd905a27b..48b2aaf5b82 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2012-02-09 Andrey Belevantsev + + Backport from mainline + 2012-01-20 Jakub Jelinek + + PR target/51106 + * gcc.dg/torture/pr51106-1.c: New test. + * gcc.dg/torture/pr51106-2.c: New test. + 2012-02-08 Tobias Burnus PR fortran/52151 diff --git a/gcc/testsuite/gcc.dg/torture/pr51106-1.c b/gcc/testsuite/gcc.dg/torture/pr51106-1.c new file mode 100644 index 00000000000..10b3b682b98 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr51106-1.c @@ -0,0 +1,14 @@ +/* PR target/51106 */ +/* { dg-do "compile" } */ +/* { dg-skip-if "RTL error" { "*-*-*" } { "-fno-fat-lto-objects" } { "" } } */ + +int +foo (int x) +{ + asm goto ("" : : "i" (x) : : lab); /* { dg-error "impossible constraint" } */ + return 1; +lab: + return 0; +} + +/* { dg-warning "probably doesn.t match constraints" "" { target *-*-* } 8 } */ diff --git a/gcc/testsuite/gcc.dg/torture/pr51106-2.c b/gcc/testsuite/gcc.dg/torture/pr51106-2.c new file mode 100644 index 00000000000..e69bf1b01ab --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr51106-2.c @@ -0,0 +1,14 @@ +/* PR target/51106 */ +/* { dg-do "compile" } */ +/* { dg-skip-if "RTL error" { "*-*-*" } { "-fno-fat-lto-objects" } { "" } } */ + +int +bar (int x) +{ + asm goto ("" : : "i" (x) : : lab); /* { dg-error "impossible constraint" } */ + __builtin_unreachable (); +lab: + return 0; +} + +/* { dg-warning "probably doesn.t match constraints" "" { target *-*-* } 8 } */ -- cgit v1.2.3 From d040bedb9fa32bc77f770b014cce3078c01903c5 Mon Sep 17 00:00:00 2001 From: Peter Bergner Date: Thu, 9 Feb 2012 14:55:57 +0000 Subject: Backport from mainline 2012-02-09 Peter Bergner gcc/ PR middle-end/52140 * dojump.c (do_compare_rtx_and_jump): Use SCALAR_FLOAT_MODE_P. gcc/testsuite/ PR middle-end/52140 * gcc.dg/dfp/pr52140.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184046 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 8 ++++++++ gcc/dojump.c | 4 ++-- gcc/testsuite/ChangeLog | 8 ++++++++ gcc/testsuite/gcc.dg/dfp/pr52140.c | 10 ++++++++++ 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/dfp/pr52140.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 119534e69fa..7fe19d29d83 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2012-02-09 Peter Bergner + + Backport from mainline + 2012-02-09 Peter Bergner + + PR middle-end/52140 + * dojump.c (do_compare_rtx_and_jump): Use SCALAR_FLOAT_MODE_P. + 2012-02-09 Andrey Belevantsev Backport from mainline diff --git a/gcc/dojump.c b/gcc/dojump.c index 0ebf932cfc5..801436b1118 100644 --- a/gcc/dojump.c +++ b/gcc/dojump.c @@ -1023,7 +1023,7 @@ do_compare_rtx_and_jump (rtx op0, rtx op1, enum rtx_code code, int unsignedp, } else { - if (GET_MODE_CLASS (mode) == MODE_FLOAT + if (SCALAR_FLOAT_MODE_P (mode) && ! can_compare_p (code, mode, ccp_jump) && can_compare_p (swap_condition (code), mode, ccp_jump)) { @@ -1034,7 +1034,7 @@ do_compare_rtx_and_jump (rtx op0, rtx op1, enum rtx_code code, int unsignedp, op1 = tmp; } - else if (GET_MODE_CLASS (mode) == MODE_FLOAT + else if (SCALAR_FLOAT_MODE_P (mode) && ! can_compare_p (code, mode, ccp_jump) /* Never split ORDERED and UNORDERED. These must be implemented. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 48b2aaf5b82..ebc3533510e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2012-02-09 Peter Bergner + + Backport from mainline + 2012-02-09 Peter Bergner + + PR middle-end/52140 + * gcc.dg/dfp/pr52140.c: New test. + 2012-02-09 Andrey Belevantsev Backport from mainline diff --git a/gcc/testsuite/gcc.dg/dfp/pr52140.c b/gcc/testsuite/gcc.dg/dfp/pr52140.c new file mode 100644 index 00000000000..ca878f2d87d --- /dev/null +++ b/gcc/testsuite/gcc.dg/dfp/pr52140.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-options "-O1" } */ + +/* This used to result in an ICE. */ + +int +foo (_Decimal64 x, _Decimal64 y) +{ + return (x < y) || (x > y); +} -- cgit v1.2.3 From f4c79115dc25ccacecc530f02dba15bd1bfb0451 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 9 Feb 2012 17:13:50 +0000 Subject: Backported from mainline 2011-12-15 Jakub Jelinek PR debug/51517 * tree-ssa-coalesce.c (coalesce_ssa_name): For !optimize, test !DECL_IGNORED_P instead of !DECL_ARTIFICIAL. * trans-decl.c (gfc_get_symbol_decl): Don't set DECL_INITAL on span. (gfc_trans_deferred_vars): Instead add its runtime initialization here. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184048 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 9 +++++++++ gcc/fortran/ChangeLog | 10 ++++++++++ gcc/fortran/trans-decl.c | 12 +++++++++++- gcc/tree-ssa-coalesce.c | 2 +- 4 files changed, 31 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7fe19d29d83..fdd0daa557d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2012-02-09 Jakub Jelinek + + Backported from mainline + 2011-12-15 Jakub Jelinek + + PR debug/51517 + * tree-ssa-coalesce.c (coalesce_ssa_name): For !optimize, test + !DECL_IGNORED_P instead of !DECL_ARTIFICIAL. + 2012-02-09 Peter Bergner Backport from mainline diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 8c18aecbe21..91be73403b3 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,13 @@ +2012-02-09 Jakub Jelinek + + Backported from mainline + 2011-12-15 Jakub Jelinek + + PR debug/51517 + * trans-decl.c (gfc_get_symbol_decl): Don't set DECL_INITAL on span. + (gfc_trans_deferred_vars): Instead add its runtime initialization + here. + 2012-02-08 Tobias Burnus PR fortran/52151 diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 50f137287eb..5b5e7881c4d 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -1352,7 +1352,6 @@ gfc_get_symbol_decl (gfc_symbol * sym) gfc_finish_var_decl (span, sym); TREE_STATIC (span) = TREE_STATIC (decl); DECL_ARTIFICIAL (span) = 1; - DECL_INITIAL (span) = build_int_cst (gfc_array_index_type, 0); GFC_DECL_SPAN (decl) = span; GFC_TYPE_ARRAY_SPAN (TREE_TYPE (decl)) = span; @@ -3394,6 +3393,17 @@ gfc_trans_deferred_vars (gfc_symbol * proc_sym, gfc_wrapped_block * block) if (sym->assoc) continue; + if (sym->attr.subref_array_pointer + && GFC_DECL_SPAN (sym->backend_decl) + && !TREE_STATIC (GFC_DECL_SPAN (sym->backend_decl))) + { + gfc_init_block (&tmpblock); + gfc_add_modify (&tmpblock, GFC_DECL_SPAN (sym->backend_decl), + build_int_cst (gfc_array_index_type, 0)); + gfc_add_init_cleanup (block, gfc_finish_block (&tmpblock), + NULL_TREE); + } + if (sym->attr.dimension) { /* Assumed-size Cray pointees need to be treated as AS_EXPLICIT. */ diff --git a/gcc/tree-ssa-coalesce.c b/gcc/tree-ssa-coalesce.c index e7490e6813c..40514b4b8de 100644 --- a/gcc/tree-ssa-coalesce.c +++ b/gcc/tree-ssa-coalesce.c @@ -1373,7 +1373,7 @@ coalesce_ssa_name (void) if (a && SSA_NAME_VAR (a) - && !DECL_ARTIFICIAL (SSA_NAME_VAR (a)) + && !DECL_IGNORED_P (SSA_NAME_VAR (a)) && (!has_zero_uses (a) || !SSA_NAME_IS_DEFAULT_DEF (a))) { tree *slot = (tree *) htab_find_slot (ssa_name_hash, a, INSERT); -- cgit v1.2.3 From 84f6ee0203585a8e468828d6350a436039704ec3 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 9 Feb 2012 17:15:29 +0000 Subject: Backported from mainline 2011-12-15 Jakub Jelinek PR c/51360 * c-parser.c (c_parser_omp_clause_num_threads, c_parser_omp_clause_schedule): Call mark_exp_read. * semantics.c (finish_omp_clauses): For OMP_CLAUSE_NUM_THREADS_EXPR and OMP_CLAUSE_SCHEDULE_CHUNK_EXPR call mark_rvalue_use. * gcc.dg/gomp/pr51360.c: New test. * g++.dg/gomp/pr51360.C: New test. * g++.dg/gomp/pr51360-2.C: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184049 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 4 ++++ gcc/c-parser.c | 2 ++ gcc/cp/ChangeLog | 9 +++++++++ gcc/cp/semantics.c | 4 ++++ gcc/testsuite/ChangeLog | 10 ++++++++++ gcc/testsuite/g++.dg/gomp/pr51360-2.C | 21 +++++++++++++++++++++ gcc/testsuite/g++.dg/gomp/pr51360.C | 28 ++++++++++++++++++++++++++++ gcc/testsuite/gcc.dg/gomp/pr51360.c | 21 +++++++++++++++++++++ 8 files changed, 99 insertions(+) create mode 100644 gcc/testsuite/g++.dg/gomp/pr51360-2.C create mode 100644 gcc/testsuite/g++.dg/gomp/pr51360.C create mode 100644 gcc/testsuite/gcc.dg/gomp/pr51360.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fdd0daa557d..ee858180e85 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -3,6 +3,10 @@ Backported from mainline 2011-12-15 Jakub Jelinek + PR c/51360 + * c-parser.c (c_parser_omp_clause_num_threads, + c_parser_omp_clause_schedule): Call mark_exp_read. + PR debug/51517 * tree-ssa-coalesce.c (coalesce_ssa_name): For !optimize, test !DECL_IGNORED_P instead of !DECL_ARTIFICIAL. diff --git a/gcc/c-parser.c b/gcc/c-parser.c index 083a29f6373..499a230ecf1 100644 --- a/gcc/c-parser.c +++ b/gcc/c-parser.c @@ -8629,6 +8629,7 @@ c_parser_omp_clause_num_threads (c_parser *parser, tree list) { location_t expr_loc = c_parser_peek_token (parser)->location; tree c, t = c_parser_expression (parser).value; + mark_exp_read (t); t = c_fully_fold (t, false, NULL); c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, "expected %<)%>"); @@ -8815,6 +8816,7 @@ c_parser_omp_clause_schedule (c_parser *parser, tree list) here = c_parser_peek_token (parser)->location; t = c_parser_expr_no_commas (parser, NULL).value; + mark_exp_read (t); t = c_fully_fold (t, false, NULL); if (OMP_CLAUSE_SCHEDULE_KIND (c) == OMP_CLAUSE_SCHEDULE_RUNTIME) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e1e00f5db4f..cd1881a95a8 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,12 @@ +2012-02-09 Jakub Jelinek + + Backported from mainline + 2011-12-15 Jakub Jelinek + + PR c/51360 + * semantics.c (finish_omp_clauses): For OMP_CLAUSE_NUM_THREADS_EXPR + and OMP_CLAUSE_SCHEDULE_CHUNK_EXPR call mark_rvalue_use. + 2012-01-19 Kai Tietz PR c++/51344 diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index db2b3db052d..3af9bb9ceac 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -3817,6 +3817,8 @@ finish_omp_clauses (tree clauses) error ("num_threads expression must be integral"); remove = true; } + else + OMP_CLAUSE_NUM_THREADS_EXPR (c) = mark_rvalue_use (t); break; case OMP_CLAUSE_SCHEDULE: @@ -3831,6 +3833,8 @@ finish_omp_clauses (tree clauses) error ("schedule chunk size expression must be integral"); remove = true; } + else + OMP_CLAUSE_SCHEDULE_CHUNK_EXPR (c) = mark_rvalue_use (t); break; case OMP_CLAUSE_NOWAIT: diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ebc3533510e..1c5a1b7071e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2012-02-09 Jakub Jelinek + + Backported from mainline + 2011-12-15 Jakub Jelinek + + PR c/51360 + * gcc.dg/gomp/pr51360.c: New test. + * g++.dg/gomp/pr51360.C: New test. + * g++.dg/gomp/pr51360-2.C: New test. + 2012-02-09 Peter Bergner Backport from mainline diff --git a/gcc/testsuite/g++.dg/gomp/pr51360-2.C b/gcc/testsuite/g++.dg/gomp/pr51360-2.C new file mode 100644 index 00000000000..cc03849a188 --- /dev/null +++ b/gcc/testsuite/g++.dg/gomp/pr51360-2.C @@ -0,0 +1,21 @@ +/* PR c/51360 */ +/* { dg-do compile } */ +/* { dg-options "-Wunused -W -fopenmp" } */ + +void +foo (int a, int b, int c) +{ + int m, n, o, i; + m = 6; + n = 1; + o = 5; + a = 6; + b = 1; + c = 5; + #pragma omp parallel for num_threads (m) if (n) schedule (static, o) + for (i = 0; i < 10; i++) + ; + #pragma omp parallel for num_threads (a) if (b) schedule (static, c) + for (i = 0; i < 10; i++) + ; +} diff --git a/gcc/testsuite/g++.dg/gomp/pr51360.C b/gcc/testsuite/g++.dg/gomp/pr51360.C new file mode 100644 index 00000000000..06c64873c70 --- /dev/null +++ b/gcc/testsuite/g++.dg/gomp/pr51360.C @@ -0,0 +1,28 @@ +// PR c/51360 +// { dg-do compile } +// { dg-options "-Wunused -W -fopenmp" } + +template +void +foo (T a, T b, T c) +{ + T m, n, o, i; + m = 6; + n = 1; + o = 5; + a = 6; + b = 1; + c = 5; + #pragma omp parallel for num_threads (m) if (n) schedule (static, o) + for (i = 0; i < 10; i++) + ; + #pragma omp parallel for num_threads (a) if (b) schedule (static, c) + for (i = 0; i < 10; i++) + ; +} + +void +bar () +{ + foo (0, 0, 0); +} diff --git a/gcc/testsuite/gcc.dg/gomp/pr51360.c b/gcc/testsuite/gcc.dg/gomp/pr51360.c new file mode 100644 index 00000000000..cc03849a188 --- /dev/null +++ b/gcc/testsuite/gcc.dg/gomp/pr51360.c @@ -0,0 +1,21 @@ +/* PR c/51360 */ +/* { dg-do compile } */ +/* { dg-options "-Wunused -W -fopenmp" } */ + +void +foo (int a, int b, int c) +{ + int m, n, o, i; + m = 6; + n = 1; + o = 5; + a = 6; + b = 1; + c = 5; + #pragma omp parallel for num_threads (m) if (n) schedule (static, o) + for (i = 0; i < 10; i++) + ; + #pragma omp parallel for num_threads (a) if (b) schedule (static, c) + for (i = 0; i < 10; i++) + ; +} -- cgit v1.2.3 From 65e37d6fe2298ddd5df68ca7e523afa80f6aac93 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 9 Feb 2012 17:16:19 +0000 Subject: Backported from mainline 2012-01-26 Jakub Jelinek * make-relative-prefix.c (make_relative_prefix_1): Avoid warning about using preprocessor directives inside of macro arguments. 2012-01-02 Jakub Jelinek * make-relative-prefix.c (make_relative_prefix_1): Avoid stack overflow if PATH contains just a single entry and HOST_EXECUTABLE_SUFFIX needs to be used. PR driver/48306 * make-relative-prefix.c: Include sys/stat.h. (make_relative_prefix_1): If access succeeds, check also stat if nstore is a regular file. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184050 138bc75d-0d04-0410-961f-82ee72b054a4 --- libiberty/ChangeLog | 19 +++++++++++++++++++ libiberty/make-relative-prefix.c | 22 ++++++++++++++++++---- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index fb2b7348cb4..f797ce9471f 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,22 @@ +2012-02-09 Jakub Jelinek + + Backported from mainline + 2012-01-26 Jakub Jelinek + + * make-relative-prefix.c (make_relative_prefix_1): Avoid warning + about using preprocessor directives inside of macro arguments. + + 2012-01-02 Jakub Jelinek + + * make-relative-prefix.c (make_relative_prefix_1): Avoid + stack overflow if PATH contains just a single entry and + HOST_EXECUTABLE_SUFFIX needs to be used. + + PR driver/48306 + * make-relative-prefix.c: Include sys/stat.h. + (make_relative_prefix_1): If access succeeds, check also stat + if nstore is a regular file. + 2011-11-13 Iain Sandoe PR target/48108 diff --git a/libiberty/make-relative-prefix.c b/libiberty/make-relative-prefix.c index 4553a7109d8..897ac51294e 100644 --- a/libiberty/make-relative-prefix.c +++ b/libiberty/make-relative-prefix.c @@ -58,6 +58,9 @@ relative prefix can be found, return @code{NULL}. #ifdef HAVE_UNISTD_H #include #endif +#ifdef HAVE_SYS_STAT_H +#include +#endif #include @@ -245,10 +248,15 @@ make_relative_prefix_1 (const char *progname, const char *bin_prefix, { char *startp, *endp, *nstore; size_t prefixlen = strlen (temp) + 1; + size_t len; if (prefixlen < 2) prefixlen = 2; - nstore = (char *) alloca (prefixlen + strlen (progname) + 1); + len = prefixlen + strlen (progname) + 1; +#ifdef HAVE_HOST_EXECUTABLE_SUFFIX + len += strlen (HOST_EXECUTABLE_SUFFIX); +#endif + nstore = (char *) alloca (len); startp = endp = temp; while (1) @@ -263,7 +271,7 @@ make_relative_prefix_1 (const char *progname, const char *bin_prefix, } else { - strncpy (nstore, startp, endp - startp); + memcpy (nstore, startp, endp - startp); if (! IS_DIR_SEPARATOR (endp[-1])) { nstore[endp - startp] = DIR_SEPARATOR; @@ -279,8 +287,14 @@ make_relative_prefix_1 (const char *progname, const char *bin_prefix, #endif ) { - progname = nstore; - break; +#if defined (HAVE_SYS_STAT_H) && defined (S_ISREG) + struct stat st; + if (stat (nstore, &st) >= 0 && S_ISREG (st.st_mode)) +#endif + { + progname = nstore; + break; + } } if (*endp == 0) -- cgit v1.2.3 From 7e16a37956c1c2b838d5a3dc94ccb677b6ae9293 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 9 Feb 2012 17:17:36 +0000 Subject: Backported from mainline 2012-01-03 Jakub Jelinek PR c++/51669 * semantics.c (finish_omp_clauses): Call fold_build_cleanup_point_expr on OMP_CLAUSE_{IF,NUM_THREADS,SCHEDULE_CHUNK}_EXPR. * g++.dg/gomp/pr51669.C: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184051 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/semantics.c | 16 ++++++++++++++-- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/gomp/pr51669.C | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/g++.dg/gomp/pr51669.C diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index cd1881a95a8..15e93a5ed80 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,6 +1,12 @@ 2012-02-09 Jakub Jelinek Backported from mainline + 2012-01-03 Jakub Jelinek + + PR c++/51669 + * semantics.c (finish_omp_clauses): Call fold_build_cleanup_point_expr + on OMP_CLAUSE_{IF,NUM_THREADS,SCHEDULE_CHUNK}_EXPR. + 2011-12-15 Jakub Jelinek PR c/51360 diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 3af9bb9ceac..cf4f5c88390 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -3804,6 +3804,8 @@ finish_omp_clauses (tree clauses) t = maybe_convert_cond (t); if (t == error_mark_node) remove = true; + else if (!processing_template_decl) + t = fold_build_cleanup_point_expr (TREE_TYPE (t), t); OMP_CLAUSE_IF_EXPR (c) = t; break; @@ -3818,7 +3820,12 @@ finish_omp_clauses (tree clauses) remove = true; } else - OMP_CLAUSE_NUM_THREADS_EXPR (c) = mark_rvalue_use (t); + { + t = mark_rvalue_use (t); + if (!processing_template_decl) + t = fold_build_cleanup_point_expr (TREE_TYPE (t), t); + OMP_CLAUSE_NUM_THREADS_EXPR (c) = t; + } break; case OMP_CLAUSE_SCHEDULE: @@ -3834,7 +3841,12 @@ finish_omp_clauses (tree clauses) remove = true; } else - OMP_CLAUSE_SCHEDULE_CHUNK_EXPR (c) = mark_rvalue_use (t); + { + t = mark_rvalue_use (t); + if (!processing_template_decl) + t = fold_build_cleanup_point_expr (TREE_TYPE (t), t); + OMP_CLAUSE_SCHEDULE_CHUNK_EXPR (c) = t; + } break; case OMP_CLAUSE_NOWAIT: diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1c5a1b7071e..26d0900dad1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,6 +1,11 @@ 2012-02-09 Jakub Jelinek Backported from mainline + 2012-01-03 Jakub Jelinek + + PR c++/51669 + * g++.dg/gomp/pr51669.C: New test. + 2011-12-15 Jakub Jelinek PR c/51360 diff --git a/gcc/testsuite/g++.dg/gomp/pr51669.C b/gcc/testsuite/g++.dg/gomp/pr51669.C new file mode 100644 index 00000000000..ab99d93e907 --- /dev/null +++ b/gcc/testsuite/g++.dg/gomp/pr51669.C @@ -0,0 +1,32 @@ +// PR c++/51669 +// { dg-do compile } +// { dg-options "-fopenmp" } + +template const T & min (const T &, const T &); + +void +f1 () +{ +#pragma omp parallel num_threads (min (4, 5)) + ; +} + +struct A { A (); ~A (); }; +int foo (const A &); + +void +f2 () +{ + int i; +#pragma omp parallel if (foo (A ())) num_threads (foo (A ())) + ; +#pragma omp task if (foo (A ())) + ; +#pragma omp for schedule (static, foo (A ())) + for (i = 0; i < 10; i++) + ; +#pragma omp parallel for schedule (static, foo (A ())) \ + if (foo (A ())) num_threads (foo (A ())) + for (i = 0; i < 10; i++) + ; +} -- cgit v1.2.3 From d86f5507d8d28daafe2a00c4a06d84c21e326a96 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 9 Feb 2012 17:18:42 +0000 Subject: Backported from mainline 2012-01-04 Jakub Jelinek PR debug/51695 * dwarf2out.c (output_loc_list): For now drop >= 64KB expressions in .debug_loc on the floor. * gcc.dg/pr51695.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184052 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 +++++ gcc/dwarf2out.c | 8 ++++++- gcc/testsuite/ChangeLog | 5 ++++ gcc/testsuite/gcc.dg/pr51695.c | 52 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.dg/pr51695.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ee858180e85..c78e0f96c1e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,12 @@ 2012-02-09 Jakub Jelinek Backported from mainline + 2012-01-04 Jakub Jelinek + + PR debug/51695 + * dwarf2out.c (output_loc_list): For now drop >= 64KB expressions + in .debug_loc on the floor. + 2011-12-15 Jakub Jelinek PR c/51360 diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 155b650738a..1860af92f48 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -11164,6 +11164,13 @@ output_loc_list (dw_loc_list_ref list_head) /* Don't output an entry that starts and ends at the same address. */ if (strcmp (curr->begin, curr->end) == 0) continue; + size = size_of_locs (curr->expr); + /* If the expression is too large, drop it on the floor. We could + perhaps put it into DW_TAG_dwarf_procedure and refer to that + in the expression, but >= 64KB expressions for a single value + in a single range are unlikely very useful. */ + if (size > 0xffff) + continue; if (!have_multiple_function_sections) { dw2_asm_output_delta (DWARF2_ADDR_SIZE, curr->begin, curr->section, @@ -11182,7 +11189,6 @@ output_loc_list (dw_loc_list_ref list_head) "Location list end address (%s)", list_head->ll_symbol); } - size = size_of_locs (curr->expr); /* Output the block length for this list of location operations. */ gcc_assert (size <= 0xffff); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 26d0900dad1..6693f5b57f4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,6 +1,11 @@ 2012-02-09 Jakub Jelinek Backported from mainline + 2012-01-04 Jakub Jelinek + + PR debug/51695 + * gcc.dg/pr51695.c: New test. + 2012-01-03 Jakub Jelinek PR c++/51669 diff --git a/gcc/testsuite/gcc.dg/pr51695.c b/gcc/testsuite/gcc.dg/pr51695.c new file mode 100644 index 00000000000..6eb45400b65 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr51695.c @@ -0,0 +1,52 @@ +/* PR debug/51695 */ +/* { dg-do compile { target { int32plus } } } */ +/* { dg-options "-O2 -g" } */ + +typedef struct +{ + struct { unsigned int t1, t2, t3, t4, t5, t6; } t; + int p; + struct { double X, Y, Z; } r; +} T; +typedef struct { T *h; } S; + +static unsigned int v = 0x12345678; + +int +foo (void) +{ + v = (v & 0x80000000) ? ((v << 1) ^ 0xa398655d) : (v << 1); + return 0; +} + +double +bar (void) +{ + unsigned int o; + v = (v & 0x80000000) ? ((v << 1) ^ 0xa398655d) : (v << 1); + o = v & 0xffff; + return (double) o / 32768.0; +} + +int +baz (void) +{ + foo (); + return 0; +} + +void +test (S *x) +{ + T *t = x->h; + t->t.t1 = foo (); + t->t.t2 = foo (); + t->t.t3 = foo (); + t->t.t4 = foo (); + t->t.t5 = foo (); + t->t.t6 = foo (); + t->p = baz (); + t->r.X = bar (); + t->r.Y = bar (); + t->r.Z = bar (); +} -- cgit v1.2.3 From 80281a41bee3a1a7585169abc5000ed548bcea03 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 9 Feb 2012 17:20:09 +0000 Subject: Backported from mainline 2012-01-05 Jakub Jelinek PR middle-end/44777 * profile.c (branch_prob): Split bbs that have exit edge and need a fake entry edge too. * gcc.dg/tree-prof/pr44777.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184053 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 +++++ gcc/profile.c | 35 ++++++++++++++++++++++++++ gcc/testsuite/ChangeLog | 5 ++++ gcc/testsuite/gcc.dg/tree-prof/pr44777.c | 43 ++++++++++++++++++++++++++++++++ 4 files changed, 89 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/tree-prof/pr44777.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c78e0f96c1e..07e79e9e22a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,12 @@ 2012-02-09 Jakub Jelinek Backported from mainline + 2012-01-05 Jakub Jelinek + + PR middle-end/44777 + * profile.c (branch_prob): Split bbs that have exit edge + and need a fake entry edge too. + 2012-01-04 Jakub Jelinek PR debug/51695 diff --git a/gcc/profile.c b/gcc/profile.c index 2334101ba8c..ba713a6c671 100644 --- a/gcc/profile.c +++ b/gcc/profile.c @@ -998,6 +998,41 @@ branch_prob (void) fprintf (dump_file, "Adding fake entry edge to bb %i\n", bb->index); make_edge (ENTRY_BLOCK_PTR, bb, EDGE_FAKE); + /* Avoid bbs that have both fake entry edge and also some + exit edge. One of those edges wouldn't be added to the + spanning tree, but we can't instrument any of them. */ + if (have_exit_edge || need_exit_edge) + { + gimple_stmt_iterator gsi; + gimple first; + tree fndecl; + + gsi = gsi_after_labels (bb); + gcc_checking_assert (!gsi_end_p (gsi)); + first = gsi_stmt (gsi); + if (is_gimple_debug (first)) + { + gsi_next_nondebug (&gsi); + gcc_checking_assert (!gsi_end_p (gsi)); + first = gsi_stmt (gsi); + } + /* Don't split the bbs containing __builtin_setjmp_receiver + or __builtin_setjmp_dispatcher calls. These are very + special and don't expect anything to be inserted before + them. */ + if (!is_gimple_call (first) + || (fndecl = gimple_call_fndecl (first)) == NULL + || DECL_BUILT_IN_CLASS (fndecl) != BUILT_IN_NORMAL + || (DECL_FUNCTION_CODE (fndecl) != BUILT_IN_SETJMP_RECEIVER + && (DECL_FUNCTION_CODE (fndecl) + != BUILT_IN_SETJMP_DISPATCHER))) + { + if (dump_file) + fprintf (dump_file, "Splitting bb %i after labels\n", + bb->index); + split_block_after_labels (bb); + } + } } } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6693f5b57f4..656579ea477 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,6 +1,11 @@ 2012-02-09 Jakub Jelinek Backported from mainline + 2012-01-05 Jakub Jelinek + + PR middle-end/44777 + * gcc.dg/tree-prof/pr44777.c: New test. + 2012-01-04 Jakub Jelinek PR debug/51695 diff --git a/gcc/testsuite/gcc.dg/tree-prof/pr44777.c b/gcc/testsuite/gcc.dg/tree-prof/pr44777.c new file mode 100644 index 00000000000..1c4da7f5f7d --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-prof/pr44777.c @@ -0,0 +1,43 @@ +/* PR middle-end/44777 */ +/* { dg-options "-O0" } */ +/* A variant of gcc.c-torture/execute/comp-goto-2.c. */ + +extern void abort (void); +extern void exit (int); + +#ifdef STACK_SIZE +#define DEPTH ((STACK_SIZE) / 512 + 1) +#else +#define DEPTH 1000 +#endif + +#if ! defined (NO_LABEL_VALUES) && !defined (NO_TRAMPOLINES) +int +x (int a) +{ + __label__ xlab; + void y (int a) + { + void *x = &&llab; + if (a==-1) + goto *x; + if (a==0) + goto xlab; + llab: + y (a-1); + } + y (a); + xlab:; + return a; +} +#endif + +int +main () +{ +#if ! defined (NO_LABEL_VALUES) && !defined (NO_TRAMPOLINES) + if (x (DEPTH) != DEPTH) + abort (); +#endif + exit (0); +} -- cgit v1.2.3 From ce8708300af7299dd9a26575ea7fb6291077c984 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 9 Feb 2012 17:21:15 +0000 Subject: Backported from mainline 2012-01-05 Jakub Jelinek PR middle-end/51768 * stmt.c (check_unique_operand_names): Don't ICE during error reporting if i is from labels chain. * c-c++-common/pr51768.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184054 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 4 ++++ gcc/stmt.c | 11 +++++------ gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/c-c++-common/pr51768.c | 25 +++++++++++++++++++++++++ 4 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 gcc/testsuite/c-c++-common/pr51768.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 07e79e9e22a..6f1469345b0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -3,6 +3,10 @@ Backported from mainline 2012-01-05 Jakub Jelinek + PR middle-end/51768 + * stmt.c (check_unique_operand_names): Don't ICE during error + reporting if i is from labels chain. + PR middle-end/44777 * profile.c (branch_prob): Split bbs that have exit edge and need a fake entry edge too. diff --git a/gcc/stmt.c b/gcc/stmt.c index b65c6db4642..82ce350f8fa 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -1252,11 +1252,11 @@ check_operand_nalternatives (tree outputs, tree inputs) static bool check_unique_operand_names (tree outputs, tree inputs, tree labels) { - tree i, j; + tree i, j, i_name = NULL_TREE; for (i = outputs; i ; i = TREE_CHAIN (i)) { - tree i_name = TREE_PURPOSE (TREE_PURPOSE (i)); + i_name = TREE_PURPOSE (TREE_PURPOSE (i)); if (! i_name) continue; @@ -1267,7 +1267,7 @@ check_unique_operand_names (tree outputs, tree inputs, tree labels) for (i = inputs; i ; i = TREE_CHAIN (i)) { - tree i_name = TREE_PURPOSE (TREE_PURPOSE (i)); + i_name = TREE_PURPOSE (TREE_PURPOSE (i)); if (! i_name) continue; @@ -1281,7 +1281,7 @@ check_unique_operand_names (tree outputs, tree inputs, tree labels) for (i = labels; i ; i = TREE_CHAIN (i)) { - tree i_name = TREE_PURPOSE (i); + i_name = TREE_PURPOSE (i); if (! i_name) continue; @@ -1296,8 +1296,7 @@ check_unique_operand_names (tree outputs, tree inputs, tree labels) return true; failure: - error ("duplicate asm operand name %qs", - TREE_STRING_POINTER (TREE_PURPOSE (TREE_PURPOSE (i)))); + error ("duplicate asm operand name %qs", TREE_STRING_POINTER (i_name)); return false; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 656579ea477..706ee801a13 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -3,6 +3,9 @@ Backported from mainline 2012-01-05 Jakub Jelinek + PR middle-end/51768 + * c-c++-common/pr51768.c: New test. + PR middle-end/44777 * gcc.dg/tree-prof/pr44777.c: New test. diff --git a/gcc/testsuite/c-c++-common/pr51768.c b/gcc/testsuite/c-c++-common/pr51768.c new file mode 100644 index 00000000000..082594ccad7 --- /dev/null +++ b/gcc/testsuite/c-c++-common/pr51768.c @@ -0,0 +1,25 @@ +/* PR middle-end/51768 */ +/* { dg-do compile } */ +/* { dg-options "" } */ + +void +foo (void) +{ + asm goto ("" : : : : lab, lab, lab2, lab); /* { dg-error "duplicate asm operand name" } */ +lab:; +lab2:; +} + +void +bar (void) +{ + asm goto ("" : : [lab] "i" (0) : : lab); /* { dg-error "duplicate asm operand name" } */ +lab:; +} + +void +baz (void) +{ + int x; + asm ("" : [lab] "=r" (x) : [lab] "r" (x)); /* { dg-error "duplicate asm operand name" } */ +} -- cgit v1.2.3 From 661b5b6c8b6763d7498d4d2edcfa2cf845d5a87f Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 9 Feb 2012 17:23:13 +0000 Subject: Backported from mainline 2012-01-05 Jakub Jelinek PR rtl-optimization/51767 * cfgrtl.c (force_nonfallthru_and_redirect): Force addition of jump_block and add an extra edge for degenerated asm gotos. * gcc.c-torture/compile/pr51767.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184055 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 4 +++ gcc/cfgrtl.c | 43 ++++++++++++++++++++++++--- gcc/testsuite/ChangeLog | 3 ++ gcc/testsuite/gcc.c-torture/compile/pr51767.c | 23 ++++++++++++++ 4 files changed, 69 insertions(+), 4 deletions(-) create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr51767.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6f1469345b0..a5f8598b3fc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -3,6 +3,10 @@ Backported from mainline 2012-01-05 Jakub Jelinek + PR rtl-optimization/51767 + * cfgrtl.c (force_nonfallthru_and_redirect): Force addition + of jump_block and add an extra edge for degenerated asm gotos. + PR middle-end/51768 * stmt.c (check_unique_operand_names): Don't ICE during error reporting if i is from labels chain. diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index dd3d37efe08..cb1b5e05536 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -1123,6 +1123,7 @@ force_nonfallthru_and_redirect (edge e, basic_block target) rtx note; edge new_edge; int abnormal_edge_flags = 0; + bool asm_goto_edge = false; int loc; /* In the case the last instruction is conditional jump to the next @@ -1202,8 +1203,28 @@ force_nonfallthru_and_redirect (edge e, basic_block target) } } - if (EDGE_COUNT (e->src->succs) >= 2 || abnormal_edge_flags) + /* If e->src ends with asm goto, see if any of the ASM_OPERANDS_LABELs + don't point to target label. */ + if (JUMP_P (BB_END (e->src)) + && target != EXIT_BLOCK_PTR + && e->dest == target + && (e->flags & EDGE_FALLTHRU) + && (note = extract_asm_operands (PATTERN (BB_END (e->src))))) { + int i, n = ASM_OPERANDS_LABEL_LENGTH (note); + + for (i = 0; i < n; ++i) + if (XEXP (ASM_OPERANDS_LABEL (note, i), 0) == BB_HEAD (target)) + { + asm_goto_edge = true; + break; + } + } + + if (EDGE_COUNT (e->src->succs) >= 2 || abnormal_edge_flags || asm_goto_edge) + { + gcov_type count = e->count; + int probability = e->probability; /* Create the new structures. */ /* If the old block ended with a tablejump, skip its table @@ -1214,7 +1235,7 @@ force_nonfallthru_and_redirect (edge e, basic_block target) note = NEXT_INSN (note); jump_block = create_basic_block (note, NULL, e->src); - jump_block->count = e->count; + jump_block->count = count; jump_block->frequency = EDGE_FREQUENCY (e); jump_block->loop_depth = target->loop_depth; @@ -1230,13 +1251,27 @@ force_nonfallthru_and_redirect (edge e, basic_block target) /* Wire edge in. */ new_edge = make_edge (e->src, jump_block, EDGE_FALLTHRU); - new_edge->probability = e->probability; - new_edge->count = e->count; + new_edge->probability = probability; + new_edge->count = count; /* Redirect old edge. */ redirect_edge_pred (e, jump_block); e->probability = REG_BR_PROB_BASE; + /* If asm goto has any label refs to target's label, + add also edge from asm goto bb to target. */ + if (asm_goto_edge) + { + new_edge->probability /= 2; + new_edge->count /= 2; + jump_block->count /= 2; + jump_block->frequency /= 2; + new_edge = make_edge (new_edge->src, target, + e->flags & ~EDGE_FALLTHRU); + new_edge->probability = probability - probability / 2; + new_edge->count = count - count / 2; + } + new_bb = jump_block; } else diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 706ee801a13..9aaf833adb2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -3,6 +3,9 @@ Backported from mainline 2012-01-05 Jakub Jelinek + PR rtl-optimization/51767 + * gcc.c-torture/compile/pr51767.c: New test. + PR middle-end/51768 * c-c++-common/pr51768.c: New test. diff --git a/gcc/testsuite/gcc.c-torture/compile/pr51767.c b/gcc/testsuite/gcc.c-torture/compile/pr51767.c new file mode 100644 index 00000000000..62a192d660d --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr51767.c @@ -0,0 +1,23 @@ +/* PR rtl-optimization/51767 */ + +extern void fn1 (void), fn2 (void); + +static inline __attribute__((always_inline)) int +foo (int *x, long y) +{ + asm goto ("" : : "r" (x), "r" (y) : "memory" : lab); + return 0; +lab: + return 1; +} + +void +bar (int *x) +{ + if (foo (x, 23)) + fn1 (); + else + fn2 (); + + foo (x, 2); +} -- cgit v1.2.3 From 3bb66aaa289af8384482ed169bd8315bdb41b7a7 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 9 Feb 2012 17:24:47 +0000 Subject: Backported from mainline 2012-01-19 Jakub Jelinek PR libmudflap/40778 * tree-mudflap.c (mf_artificial): New function. (execute_mudflap_function_ops, execute_mudflap_function_decls, mx_register_decls, mudflap_enqueue_decl): Use it. * testsuite/libmudflap.c/fail68-frag.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184056 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/tree-mudflap.c | 19 +++++++++++------ libmudflap/ChangeLog | 8 ++++++++ libmudflap/testsuite/libmudflap.c/fail68-frag.c | 27 +++++++++++++++++++++++++ 4 files changed, 55 insertions(+), 6 deletions(-) create mode 100644 libmudflap/testsuite/libmudflap.c/fail68-frag.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a5f8598b3fc..a53cc30dae0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,13 @@ 2012-02-09 Jakub Jelinek Backported from mainline + 2012-01-19 Jakub Jelinek + + PR libmudflap/40778 + * tree-mudflap.c (mf_artificial): New function. + (execute_mudflap_function_ops, execute_mudflap_function_decls, + mx_register_decls, mudflap_enqueue_decl): Use it. + 2012-01-05 Jakub Jelinek PR rtl-optimization/51767 diff --git a/gcc/tree-mudflap.c b/gcc/tree-mudflap.c index f5ef78b8dc0..01911918239 100644 --- a/gcc/tree-mudflap.c +++ b/gcc/tree-mudflap.c @@ -69,6 +69,13 @@ static tree mx_xfn_xform_decls (gimple_stmt_iterator *, bool *, static gimple_seq mx_register_decls (tree, gimple_seq, location_t); static unsigned int execute_mudflap_function_decls (void); +/* Return true if DECL is artificial stub that shouldn't be instrumented by + mf. We should instrument clones of non-artificial functions. */ +static inline bool +mf_artificial (const_tree decl) +{ + return DECL_ARTIFICIAL (DECL_ORIGIN (decl)); +} /* ------------------------------------------------------------------------ */ /* Some generally helpful functions for mudflap instrumentation. */ @@ -412,8 +419,8 @@ execute_mudflap_function_ops (void) /* Don't instrument functions such as the synthetic constructor built during mudflap_finish_file. */ - if (mf_marked_p (current_function_decl) || - DECL_ARTIFICIAL (current_function_decl)) + if (mf_marked_p (current_function_decl) + || mf_artificial (current_function_decl)) return 0; push_gimplify_context (&gctx); @@ -1014,8 +1021,8 @@ execute_mudflap_function_decls (void) /* Don't instrument functions such as the synthetic constructor built during mudflap_finish_file. */ - if (mf_marked_p (current_function_decl) || - DECL_ARTIFICIAL (current_function_decl)) + if (mf_marked_p (current_function_decl) + || mf_artificial (current_function_decl)) return 0; push_gimplify_context (&gctx); @@ -1097,7 +1104,7 @@ mx_register_decls (tree decl, gimple_seq seq, location_t location) /* Add the __mf_register call at the current appending point. */ if (gsi_end_p (initially_stmts)) { - if (!DECL_ARTIFICIAL (decl)) + if (!mf_artificial (decl)) warning (OPT_Wmudflap, "mudflap cannot track %qE in stub function", DECL_NAME (decl)); @@ -1268,7 +1275,7 @@ mudflap_enqueue_decl (tree obj) during mudflap_finish_file (). That would confuse the user, since the text would refer to variables that don't show up in the user's source code. */ - if (DECL_P (obj) && DECL_EXTERNAL (obj) && DECL_ARTIFICIAL (obj)) + if (DECL_P (obj) && DECL_EXTERNAL (obj) && mf_artificial (obj)) return; VEC_safe_push (tree, gc, deferred_static_decls, obj); diff --git a/libmudflap/ChangeLog b/libmudflap/ChangeLog index dbd2e54ce60..5f1d24df231 100644 --- a/libmudflap/ChangeLog +++ b/libmudflap/ChangeLog @@ -1,3 +1,11 @@ +2012-02-09 Jakub Jelinek + + Backported from mainline + 2012-01-19 Jakub Jelinek + + PR libmudflap/40778 + * testsuite/libmudflap.c/fail68-frag.c: New test. + 2011-11-20 Andreas Tobler * configure: Regenerate. diff --git a/libmudflap/testsuite/libmudflap.c/fail68-frag.c b/libmudflap/testsuite/libmudflap.c/fail68-frag.c new file mode 100644 index 00000000000..7b2f8cf2cb0 --- /dev/null +++ b/libmudflap/testsuite/libmudflap.c/fail68-frag.c @@ -0,0 +1,27 @@ +/* PR libmudflap/40778 */ + +char p[32]; +static int j; + +__attribute__((noinline)) +static void foo (int i) +{ + if (j++ == 0) + p[i + 4] = 12; + else + p[i - 4] = 13; +} + +int +main () +{ + foo (30); + foo (30); + foo (30); + return 0; +} + +/* { dg-output "mudflap violation 1.*" } */ +/* { dg-output "Nearby object 1.*" } */ +/* { dg-output "mudflap object.*name.*p" } */ +/* { dg-do run { xfail *-*-* } } */ -- cgit v1.2.3 From 35462417179407c7e41aca25c5f0f7e86eb5d5d9 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 9 Feb 2012 17:25:47 +0000 Subject: Backported from mainline 2012-01-28 Jakub Jelinek PR target/52006 * config/arm/arm.md (pic_add_dot_plus_eight peephole2): Use arm_general_register_operand predicate for operand 2 instead of register_operand. * gcc.target/arm/pr52006.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184057 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/config/arm/arm.md | 3 ++- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/arm/pr52006.c | 19 +++++++++++++++++++ 4 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.target/arm/pr52006.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a53cc30dae0..a60ceb3456c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,13 @@ 2012-02-09 Jakub Jelinek Backported from mainline + 2012-01-28 Jakub Jelinek + + PR target/52006 + * config/arm/arm.md (pic_add_dot_plus_eight peephole2): Use + arm_general_register_operand predicate for operand 2 instead of + register_operand. + 2012-01-19 Jakub Jelinek PR libmudflap/40778 diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index 6fc8d606182..130053b0bdd 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -5363,7 +5363,8 @@ (const_int 8) (match_operand 1 "" "")] UNSPEC_PIC_BASE)) - (set (match_operand:SI 2 "register_operand" "") (mem:SI (match_dup 0)))] + (set (match_operand:SI 2 "arm_general_register_operand" "") + (mem:SI (match_dup 0)))] "TARGET_ARM && peep2_reg_dead_p (2, operands[0])" [(set (match_dup 2) (mem:SI (unspec:SI [(match_dup 3) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9aaf833adb2..91e5f2210c3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,6 +1,11 @@ 2012-02-09 Jakub Jelinek Backported from mainline + 2012-01-28 Jakub Jelinek + + PR target/52006 + * gcc.target/arm/pr52006.c: New test. + 2012-01-05 Jakub Jelinek PR rtl-optimization/51767 diff --git a/gcc/testsuite/gcc.target/arm/pr52006.c b/gcc/testsuite/gcc.target/arm/pr52006.c new file mode 100644 index 00000000000..249470ad516 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pr52006.c @@ -0,0 +1,19 @@ +/* PR target/52006 */ +/* { dg-do compile } */ +/* { dg-options "-march=armv7-a -mfloat-abi=hard -O2 -fPIC" } */ + +unsigned long a; +static int b; + +void +foo (void) +{ + asm volatile ("" : "=r" (b)); +} + +void +bar (float f) +{ + if (f < b / 100.0) + a = 1; +} -- cgit v1.2.3 From ac25b5747de66eb46456a470b34285e7eedc28b3 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 9 Feb 2012 17:26:29 +0000 Subject: Backported from mainline 2012-02-02 Jakub Jelinek PR middle-end/48071 * diagnostic.c (diagnostic_finish): Remove trailing newlines. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184058 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/diagnostic.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a60ceb3456c..42ce5e4ca16 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,11 @@ 2012-02-09 Jakub Jelinek Backported from mainline + 2012-02-02 Jakub Jelinek + + PR middle-end/48071 + * diagnostic.c (diagnostic_finish): Remove trailing newlines. + 2012-01-28 Jakub Jelinek PR target/52006 diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c index d297cdda0ca..35e7fb9946c 100644 --- a/gcc/diagnostic.c +++ b/gcc/diagnostic.c @@ -133,12 +133,12 @@ diagnostic_finish (diagnostic_context *context) /* -Werror was given. */ if (context->warning_as_error_requested) pp_verbatim (context->printer, - _("%s: all warnings being treated as errors\n"), + _("%s: all warnings being treated as errors"), progname); /* At least one -Werror= was given. */ else pp_verbatim (context->printer, - _("%s: some warnings being treated as errors\n"), + _("%s: some warnings being treated as errors"), progname); pp_flush (context->printer); } -- cgit v1.2.3 From 555d72bef39a61398d9f7bd152eb70590c77970f Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 9 Feb 2012 17:27:25 +0000 Subject: Backported from mainline 2012-02-06 Jakub Jelinek PR target/52129 * calls.c (mem_overlaps_already_clobbered_arg_p): If val is CONST_INT_P, subtract resp. add crtl->args.pretend_args_size to it. * gcc.c-torture/execute/pr52129.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184059 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/calls.c | 5 +++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.c-torture/execute/pr52129.c | 28 +++++++++++++++++++++++++++ 4 files changed, 44 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/execute/pr52129.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 42ce5e4ca16..8c2554be0c2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,12 @@ 2012-02-09 Jakub Jelinek Backported from mainline + 2012-02-06 Jakub Jelinek + + PR target/52129 + * calls.c (mem_overlaps_already_clobbered_arg_p): If val is + CONST_INT_P, subtract resp. add crtl->args.pretend_args_size to it. + 2012-02-02 Jakub Jelinek PR middle-end/48071 diff --git a/gcc/calls.c b/gcc/calls.c index c978e613768..4ad6c3fb0fc 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -1693,6 +1693,11 @@ mem_overlaps_already_clobbered_arg_p (rtx addr, unsigned HOST_WIDE_INT size) return true; else i = INTVAL (val); +#ifdef STACK_GROWS_DOWNWARD + i -= crtl->args.pretend_args_size; +#else + i += crtl->args.pretend_args_size; +#endif #ifdef ARGS_GROW_DOWNWARD i = -i - size; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 91e5f2210c3..1a7c32951ee 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,6 +1,11 @@ 2012-02-09 Jakub Jelinek Backported from mainline + 2012-02-06 Jakub Jelinek + + PR target/52129 + * gcc.c-torture/execute/pr52129.c: New test. + 2012-01-28 Jakub Jelinek PR target/52006 diff --git a/gcc/testsuite/gcc.c-torture/execute/pr52129.c b/gcc/testsuite/gcc.c-torture/execute/pr52129.c new file mode 100644 index 00000000000..a60bfa8bb6a --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr52129.c @@ -0,0 +1,28 @@ +/* PR target/52129 */ + +extern void abort (void); +struct S { void *p; unsigned int q; }; +struct T { char a[64]; char b[64]; } t; + +__attribute__((noinline, noclone)) int +foo (void *x, struct S s, void *y, void *z) +{ + if (x != &t.a[2] || s.p != &t.b[5] || s.q != 27 || y != &t.a[17] || z != &t.b[17]) + abort (); + return 29; +} + +__attribute__((noinline, noclone)) int +bar (void *x, void *y, void *z, struct S s, int t, struct T *u) +{ + return foo (x, s, &u->a[t], &u->b[t]); +} + +int +main () +{ + struct S s = { &t.b[5], 27 }; + if (bar (&t.a[2], (void *) 0, (void *) 0, s, 17, &t) != 29) + abort (); + return 0; +} -- cgit v1.2.3 From 13488040243f0bedd46b9a73cf6b823dfa24e5aa Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 9 Feb 2012 17:28:22 +0000 Subject: Backported from mainline 2012-02-07 Jakub Jelinek PR middle-end/52074 * expr.c (expand_expr_addr_expr_1): For CONSTANT_CLASS_P or CONST_DECL if modifier < EXPAND_SUM call force_operand on the result. * gcc.c-torture/compile/pr52074.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184060 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/expr.c | 13 +++++++++++-- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.c-torture/compile/pr52074.c | 10 ++++++++++ 4 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr52074.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8c2554be0c2..55a63722b40 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,12 @@ 2012-02-09 Jakub Jelinek Backported from mainline + 2012-02-07 Jakub Jelinek + + PR middle-end/52074 + * expr.c (expand_expr_addr_expr_1): For CONSTANT_CLASS_P or CONST_DECL + if modifier < EXPAND_SUM call force_operand on the result. + 2012-02-06 Jakub Jelinek PR target/52129 diff --git a/gcc/expr.c b/gcc/expr.c index 818ae161fcc..0ccdd2e00db 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -7015,7 +7015,12 @@ expand_expr_addr_expr_1 (tree exp, rtx target, enum machine_mode tmode, generating ADDR_EXPR of something that isn't an LVALUE. The only exception here is STRING_CST. */ if (CONSTANT_CLASS_P (exp)) - return XEXP (expand_expr_constant (exp, 0, modifier), 0); + { + result = XEXP (expand_expr_constant (exp, 0, modifier), 0); + if (modifier < EXPAND_SUM) + result = force_operand (result, target); + return result; + } /* Everything must be something allowed by is_gimple_addressable. */ switch (TREE_CODE (exp)) @@ -7036,7 +7041,11 @@ expand_expr_addr_expr_1 (tree exp, rtx target, enum machine_mode tmode, case CONST_DECL: /* Expand the initializer like constants above. */ - return XEXP (expand_expr_constant (DECL_INITIAL (exp), 0, modifier), 0); + result = XEXP (expand_expr_constant (DECL_INITIAL (exp), + 0, modifier), 0); + if (modifier < EXPAND_SUM) + result = force_operand (result, target); + return result; case REALPART_EXPR: /* The real part of the complex number is always first, therefore diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1a7c32951ee..1f3cc37a573 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,6 +1,11 @@ 2012-02-09 Jakub Jelinek Backported from mainline + 2012-02-07 Jakub Jelinek + + PR middle-end/52074 + * gcc.c-torture/compile/pr52074.c: New test. + 2012-02-06 Jakub Jelinek PR target/52129 diff --git a/gcc/testsuite/gcc.c-torture/compile/pr52074.c b/gcc/testsuite/gcc.c-torture/compile/pr52074.c new file mode 100644 index 00000000000..92a2096f055 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr52074.c @@ -0,0 +1,10 @@ +/* PR middle-end/52074 */ + +struct S { const char *d, *e; } __attribute__((packed)); + +void +foo (const char **p, struct S *q) +{ + *p = "abcdef"; + q->d = "ghijk"; +} -- cgit v1.2.3 From ae85567d0bba544eb71933d5be815a424b189a3c Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 9 Feb 2012 17:29:38 +0000 Subject: Backported from mainline 2012-02-07 Jakub Jelinek PR rtl-optimization/52060 * combine.c (try_combine): Add i0src_copy and i0src_copy2 variables, copy i1src to i1src_copy whenever added_sets_2 && i1_feeds_i2_n already before i1dest -> i1src substitution in newpat, copy i0src to i0src_copy and/or i0src_copy2 when needed. * gcc.dg/torture/pr52060.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184061 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++ gcc/combine.c | 25 ++++++++++----- gcc/testsuite/ChangeLog | 3 ++ gcc/testsuite/gcc.dg/torture/pr52060.c | 57 ++++++++++++++++++++++++++++++++++ 4 files changed, 83 insertions(+), 8 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/torture/pr52060.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 55a63722b40..0d363163f6e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -3,6 +3,12 @@ Backported from mainline 2012-02-07 Jakub Jelinek + PR rtl-optimization/52060 + * combine.c (try_combine): Add i0src_copy and i0src_copy2 variables, + copy i1src to i1src_copy whenever added_sets_2 && i1_feeds_i2_n already + before i1dest -> i1src substitution in newpat, copy i0src to i0src_copy + and/or i0src_copy2 when needed. + PR middle-end/52074 * expr.c (expand_expr_addr_expr_1): For CONSTANT_CLASS_P or CONST_DECL if modifier < EXPAND_SUM call force_operand on the result. diff --git a/gcc/combine.c b/gcc/combine.c index 5980fcbbb03..74ec1e123fe 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -2558,8 +2558,8 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx i0, int *new_direct_jump_p, rtx i3dest_killed = 0; /* SET_DEST and SET_SRC of I2, I1 and I0. */ rtx i2dest = 0, i2src = 0, i1dest = 0, i1src = 0, i0dest = 0, i0src = 0; - /* Copy of SET_SRC of I1, if needed. */ - rtx i1src_copy = 0; + /* Copy of SET_SRC of I1 and I0, if needed. */ + rtx i1src_copy = 0, i0src_copy = 0, i0src_copy2 = 0; /* Set if I2DEST was reused as a scratch register. */ bool i2scratch = false; /* The PATTERNs of I0, I1, and I2, or a copy of them in certain cases. */ @@ -3171,6 +3171,11 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx i0, int *new_direct_jump_p, n_occurrences = 0; subst_low_luid = DF_INSN_LUID (i1); + /* If the following substitution will modify I1SRC, make a copy of it + for the case where it is substituted for I1DEST in I2PAT later. */ + if (added_sets_2 && i1_feeds_i2_n) + i1src_copy = copy_rtx (i1src); + /* If I0 feeds into I1 and I0DEST is in I0SRC, we need to make a unique copy of I1SRC each time we substitute it, in order to avoid creating self-referential RTL when we will be substituting I0SRC for I0DEST @@ -3198,10 +3203,14 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx i0, int *new_direct_jump_p, return 0; } - /* If the following substitution will modify I1SRC, make a copy of it - for the case where it is substituted for I1DEST in I2PAT later. */ - if (i0_feeds_i1_n && added_sets_2 && i1_feeds_i2_n) - i1src_copy = copy_rtx (i1src); + /* If the following substitution will modify I0SRC, make a copy of it + for the case where it is substituted for I0DEST in I1PAT later. */ + if (added_sets_1 && i0_feeds_i1_n) + i0src_copy = copy_rtx (i0src); + /* And a copy for I0DEST in I2PAT substitution. */ + if (added_sets_2 && ((i0_feeds_i1_n && i1_feeds_i2_n) + || (i0_feeds_i2_n))) + i0src_copy2 = copy_rtx (i0src); n_occurrences = 0; subst_low_luid = DF_INSN_LUID (i0); @@ -3267,7 +3276,7 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx i0, int *new_direct_jump_p, { rtx t = i1pat; if (i0_feeds_i1_n) - t = subst (t, i0dest, i0src, 0, 0); + t = subst (t, i0dest, i0src_copy ? i0src_copy : i0src, 0, 0); XVECEXP (newpat, 0, --total_sets) = t; } @@ -3278,7 +3287,7 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx i0, int *new_direct_jump_p, t = subst (t, i1dest, i1src_copy ? i1src_copy : i1src, 0, i0_feeds_i1_n && i0dest_in_i0src); if ((i0_feeds_i1_n && i1_feeds_i2_n) || i0_feeds_i2_n) - t = subst (t, i0dest, i0src, 0, 0); + t = subst (t, i0dest, i0src_copy2 ? i0src_copy2 : i0src, 0, 0); XVECEXP (newpat, 0, --total_sets) = t; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1f3cc37a573..2ba0f04397e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -3,6 +3,9 @@ Backported from mainline 2012-02-07 Jakub Jelinek + PR rtl-optimization/52060 + * gcc.dg/torture/pr52060.c: New test. + PR middle-end/52074 * gcc.c-torture/compile/pr52074.c: New test. diff --git a/gcc/testsuite/gcc.dg/torture/pr52060.c b/gcc/testsuite/gcc.dg/torture/pr52060.c new file mode 100644 index 00000000000..44207a503c1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr52060.c @@ -0,0 +1,57 @@ +/* PR rtl-optimization/52060 */ +/* { dg-do run { target int32plus } } */ + +extern void abort (void); +union U { float f; unsigned int i; }; + +static inline __attribute__((always_inline)) unsigned int +foo (float x) +{ + union U u; + unsigned int a, b, c; + int d; + int e; + u.f = x; + d = ((unsigned) u.i >> 23) & 0xFF; + c = d < 126 ? 0 : ~0; + e = 127 + 30 - d; + a = (u.i << 8) | 0x80000000U; + b = a & ((1 << e) - 1); + a = a >> e; + c &= (b | (a & 2)) ? ~0 : ~1; + a = ((a + 1U) >> 1) & c; + return a; +} + +__attribute__((noinline)) unsigned int +bar (float x) +{ + unsigned int a, b, c; + static const unsigned int d[128] = + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 6, 7 + }; + a = foo (1048575.0f * x); + c = d[a >> 13]; + b = (c << 13) | ((a >> (7 - c)) & 0x1fff); + return b; +} + +int +main () +{ + union U u; + u.f = 1048575.0f; + if (sizeof (u.i) == sizeof (u.f) + && u.i == 0x497ffff0U + && bar (1.0f) != 65535) + abort (); + return 0; +} -- cgit v1.2.3 From dc7280f1c4a1d499546d7b54acb58ef064b809ca Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 9 Feb 2012 17:30:39 +0000 Subject: Backported from mainline 2012-02-08 Jakub Jelinek PR rtl-optimization/52139 * cfgrtl.c (cfg_layout_merge_blocks): If BB_END is a BARRIER after emit_insn_after_noloc, move BB_END to the last non-BARRIER insn before it. * gcc.dg/pr52139.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184062 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 ++++++ gcc/cfgrtl.c | 5 +++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/pr52139.c | 49 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 66 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/pr52139.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0d363163f6e..6540af70984 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,13 @@ 2012-02-09 Jakub Jelinek Backported from mainline + 2012-02-08 Jakub Jelinek + + PR rtl-optimization/52139 + * cfgrtl.c (cfg_layout_merge_blocks): If BB_END + is a BARRIER after emit_insn_after_noloc, move BB_END + to the last non-BARRIER insn before it. + 2012-02-07 Jakub Jelinek PR rtl-optimization/52060 diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index cb1b5e05536..f86f0a35c45 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -2790,6 +2790,11 @@ cfg_layout_merge_blocks (basic_block a, basic_block b) rtx first = BB_END (a), last; last = emit_insn_after_noloc (b->il.rtl->header, BB_END (a), a); + /* The above might add a BARRIER as BB_END, but as barriers + aren't valid parts of a bb, remove_insn doesn't update + BB_END if it is a barrier. So adjust BB_END here. */ + while (BB_END (a) != first && BARRIER_P (BB_END (a))) + BB_END (a) = PREV_INSN (BB_END (a)); delete_insn_chain (NEXT_INSN (first), last, false); b->il.rtl->header = NULL; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2ba0f04397e..6e546a003aa 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,6 +1,11 @@ 2012-02-09 Jakub Jelinek Backported from mainline + 2012-02-08 Jakub Jelinek + + PR rtl-optimization/52139 + * gcc.dg/pr52139.c: New test. + 2012-02-07 Jakub Jelinek PR rtl-optimization/52060 diff --git a/gcc/testsuite/gcc.dg/pr52139.c b/gcc/testsuite/gcc.dg/pr52139.c new file mode 100644 index 00000000000..d10adf2b6fb --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr52139.c @@ -0,0 +1,49 @@ +/* PR rtl-optimization/52139 */ +/* { dg-do compile } */ +/* { dg-options "-O -fno-tree-dominator-opts -fno-tree-fre" } */ +/* { dg-options "-O -fno-tree-dominator-opts -fno-tree-fre -fpic" { target fpic } } */ + +void *p; + +void +foo (int a) +{ + switch (a) + { + case 0: + a0: + case 1: + a1: + p = &&a1; + case 2: + a2: + p = &&a2; + case 3: + a3: + p = &&a3; + case 4: + a4: + p = &&a4; + case 5: + a5: + p = &&a5; + case 6: + a6: + p = &&a6; + case 7: + a7: + p = &&a7; + case 8: + a8: + p = &&a8; + case 9: + a9: + p = &&a9; + case 10: + a10: + p = &&a10; + default: + p = &&a0; + } + goto *p; +} -- cgit v1.2.3 From 5ee0fd468497e755c3b9a3684e1d9c654791e117 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 9 Feb 2012 17:52:18 +0000 Subject: disable scan-assembler tests in g++.dg/abi/mangle60.C git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184064 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/g++.dg/abi/mangle60.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/g++.dg/abi/mangle60.C b/gcc/testsuite/g++.dg/abi/mangle60.C index 982ca4587e9..189be859042 100644 --- a/gcc/testsuite/g++.dg/abi/mangle60.C +++ b/gcc/testsuite/g++.dg/abi/mangle60.C @@ -7,11 +7,11 @@ template struct A; template char foo(U, V); -// { dg-final { scan-assembler "_Z3barIiEvP1AIXszcl3foocvT__ELCi0_42EEEE" } } +// { not-dg-final { scan-assembler "_Z3barIiEvP1AIXszcl3foocvT__ELCi0_42EEEE" } } template void bar(A *); -// { dg-final { scan-assembler "_Z3bazIiEvP1AIXszcl3foocvT__ELCf00000000_00000000EEEE" } } +// { not-dg-final { scan-assembler "_Z3bazIiEvP1AIXszcl3foocvT__ELCf00000000_00000000EEEE" } } template void baz(A *); -- cgit v1.2.3 From 6fca44471d54f2803c0df1c0f09fda5ec86dc351 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Fri, 10 Feb 2012 00:17:49 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184078 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 65b588f1261..ef74a132b46 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120209 +20120210 -- cgit v1.2.3 From 008431380c8d9fb9dc3675d18a1f5c1d077bb7bc Mon Sep 17 00:00:00 2001 From: Jack Howarth Date: Fri, 10 Feb 2012 12:34:17 +0000 Subject: Backport the fix for PR tree-optimization/49536 from mainline. Patch by Jack Howarth, approved by Richard Guenther. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184090 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 10 ++++++++++ gcc/tree-vect-stmts.c | 9 +++++++++ 2 files changed, 19 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6540af70984..36afb4283b4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2012-02-09 Jack Howarth + + Backported from mainline + 2011-06-27 Richard Guenther + + PR tree-optimization/49536 + * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): + For non-scalar inner types use a scalar type according to + the scalar inner mode. + 2012-02-09 Jakub Jelinek Backported from mainline diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index ee349294562..b5ecd3f24ee 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -5117,6 +5117,15 @@ get_vectype_for_scalar_type_and_size (tree scalar_type, unsigned size) && GET_MODE_CLASS (inner_mode) != MODE_FLOAT) return NULL_TREE; + /* We shouldn't end up building VECTOR_TYPEs of non-scalar components. + When the component mode passes the above test simply use a type + corresponding to that mode. The theory is that any use that + would cause problems with this will disable vectorization anyway. */ + if (!SCALAR_FLOAT_TYPE_P (scalar_type) + && !INTEGRAL_TYPE_P (scalar_type) + && !POINTER_TYPE_P (scalar_type)) + scalar_type = lang_hooks.types.type_for_mode (inner_mode, 1); + /* If no size was supplied use the mode the target prefers. Otherwise lookup a vector mode of the specified size. */ if (size == 0) -- cgit v1.2.3 From 97adce250142e69d0ed7c70ced68424ec92d5efc Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Fri, 10 Feb 2012 16:32:36 +0000 Subject: PR boehm-gc/48514 * include/gc_config_macros.h (GC_DLL): Define it for mingw-targets only, if we are actual in boehm-gc's build and DLL_EXPORT is defined. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184101 138bc75d-0d04-0410-961f-82ee72b054a4 --- boehm-gc/ChangeLog | 7 +++++++ boehm-gc/include/gc_config_macros.h | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog index f121804166a..2115f1c1ad3 100644 --- a/boehm-gc/ChangeLog +++ b/boehm-gc/ChangeLog @@ -1,3 +1,10 @@ +2012-02-10 Kai Tietz + + PR boehm-gc/48514 + * include/gc_config_macros.h (GC_DLL): Define it for mingw-targets + only, if we are actual in boehm-gc's build and DLL_EXPORT + is defined. + 2011-11-20 Andreas Tobler * configure: Regenerate. diff --git a/boehm-gc/include/gc_config_macros.h b/boehm-gc/include/gc_config_macros.h index 0964784332b..12e91e27f5e 100644 --- a/boehm-gc/include/gc_config_macros.h +++ b/boehm-gc/include/gc_config_macros.h @@ -81,7 +81,9 @@ typedef long ptrdiff_t; /* ptrdiff_t is not defined */ # endif -#if defined(_DLL) && !defined(GC_NOT_DLL) && !defined(GC_DLL) +#if ((defined(_DLL) && !defined (__MINGW32__)) \ + || (defined (DLL_EXPORT) && defined (GC_BUILD))) \ + && !defined(GC_DLL) # define GC_DLL #endif -- cgit v1.2.3 From 74ee65894d31523cd1230cac3470ce2045c39c63 Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Fri, 10 Feb 2012 16:45:53 +0000 Subject: * configure.ac (AM_LTLDFLAGS): Add -no-undefine for x64 windows target. * configure: Regenerated git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184104 138bc75d-0d04-0410-961f-82ee72b054a4 --- libffi/ChangeLog | 6 ++++++ libffi/configure | 9 +++++++++ libffi/configure.ac | 9 +++++++++ 3 files changed, 24 insertions(+) diff --git a/libffi/ChangeLog b/libffi/ChangeLog index 24c256cc771..da3a19793dd 100644 --- a/libffi/ChangeLog +++ b/libffi/ChangeLog @@ -1,3 +1,9 @@ +2012-02-10 Kai Tietz + + * configure.ac (AM_LTLDFLAGS): Add -no-undefine for x64 + windows target. + * configure: Regenerated + 2011-11-20 Andreas Tobler * configure: Regenerate. diff --git a/libffi/configure b/libffi/configure index 8f3b068f09f..6b38089d8c8 100755 --- a/libffi/configure +++ b/libffi/configure @@ -11435,6 +11435,15 @@ case "$host" in x86_64-*-cygwin* | x86_64-*-mingw*) TARGET=X86_WIN64; TARGETDIR=x86 + # All mingw/cygwin/win32 builds require -no-undefined for sharedlib. + # We must also check with_cross_host to decide if this is a native + # or cross-build and select where to install dlls appropriately. + if test -n "$with_cross_host" && + test x"$with_cross_host" != x"no"; then + AM_LTLDFLAGS='-no-undefined -bindir "$(toolexeclibdir)"'; + else + AM_LTLDFLAGS='-no-undefined -bindir "$(bindir)"'; + fi ;; x86_64-*-*) diff --git a/libffi/configure.ac b/libffi/configure.ac index d16155a40fb..c923670c573 100644 --- a/libffi/configure.ac +++ b/libffi/configure.ac @@ -166,6 +166,15 @@ case "$host" in x86_64-*-cygwin* | x86_64-*-mingw*) TARGET=X86_WIN64; TARGETDIR=x86 + # All mingw/cygwin/win32 builds require -no-undefined for sharedlib. + # We must also check with_cross_host to decide if this is a native + # or cross-build and select where to install dlls appropriately. + if test -n "$with_cross_host" && + test x"$with_cross_host" != x"no"; then + AM_LTLDFLAGS='-no-undefined -bindir "$(toolexeclibdir)"'; + else + AM_LTLDFLAGS='-no-undefined -bindir "$(bindir)"'; + fi ;; x86_64-*-*) -- cgit v1.2.3 From 2ea6ce45204fffbdae5b5647f74a37fc25bbdfb3 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sat, 11 Feb 2012 00:18:36 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184120 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index ef74a132b46..c0327f7fb9f 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120210 +20120211 -- cgit v1.2.3 From 62bb6f57972a55330a147397258238d473806d4d Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Sat, 11 Feb 2012 08:12:42 +0000 Subject: * compare-elim.c (find_comparisons_in_bb): Eliminate only compares having the same mode as previous compare. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184125 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 17 +++++++++++------ gcc/compare-elim.c | 5 ++++- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 36afb4283b4..e98c8c2eb1d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-02-11 Uros Bizjak + + * compare-elim.c (find_comparisons_in_bb): Eliminate only compares + having the same mode as previous compare. + 2012-02-09 Jack Howarth Backported from mainline @@ -87,7 +92,7 @@ 2012-02-09 Peter Bergner - Backport from mainline + Backport from mainline 2012-02-09 Peter Bergner PR middle-end/52140 @@ -95,7 +100,7 @@ 2012-02-09 Andrey Belevantsev - Backport from mainline + Backport from mainline 2012-01-20 Andrey Belevantsev PR target/51106 @@ -109,11 +114,11 @@ bit position to it (if any). 2012-02-07 Kai Tietz - Dave Korn + Dave Korn - PR target/40068 - * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): - Take care that typinfo gets dllexport-attribute. + PR target/40068 + * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): + Take care that typinfo gets dllexport-attribute. 2012-02-07 Alan Modra diff --git a/gcc/compare-elim.c b/gcc/compare-elim.c index 62abd9c7d68..41097ff5a21 100644 --- a/gcc/compare-elim.c +++ b/gcc/compare-elim.c @@ -297,8 +297,11 @@ find_comparisons_in_bb (struct dom_walk_data *data ATTRIBUTE_UNUSED, src = conforming_compare (insn); if (src) { + enum machine_mode src_mode = GET_MODE (src); + /* Eliminate a compare that's redundant with the previous. */ if (last_cmp_valid + && src_mode == last_cmp->orig_mode && rtx_equal_p (last_cmp->in_a, XEXP (src, 0)) && rtx_equal_p (last_cmp->in_b, XEXP (src, 1))) { @@ -311,7 +314,7 @@ find_comparisons_in_bb (struct dom_walk_data *data ATTRIBUTE_UNUSED, last_cmp->prev_clobber = last_clobber; last_cmp->in_a = XEXP (src, 0); last_cmp->in_b = XEXP (src, 1); - last_cmp->orig_mode = GET_MODE (SET_DEST (single_set (insn))); + last_cmp->orig_mode = src_mode; VEC_safe_push (comparison_struct_p, heap, all_compares, last_cmp); /* It's unusual, but be prepared for comparison patterns that -- cgit v1.2.3 From 234827da99c853c463baaba1295494531d1a63ba Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sun, 12 Feb 2012 00:17:47 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184133 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index c0327f7fb9f..01dcb670168 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120211 +20120212 -- cgit v1.2.3 From f274073642e59792686ecba3e441fd58ac357b15 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Mon, 13 Feb 2012 00:18:31 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184149 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 01dcb670168..dd798170f2c 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120212 +20120213 -- cgit v1.2.3 From dcbaabdb47bd7ec89106816b0b16b3bf6f2a6bc4 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Tue, 14 Feb 2012 00:17:59 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184184 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index dd798170f2c..9584376876a 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120213 +20120214 -- cgit v1.2.3 From 52d831a5377804fe747b8bea7db1261834802a7a Mon Sep 17 00:00:00 2001 From: Julian Brown Date: Tue, 14 Feb 2012 06:57:17 +0000 Subject: Backport from mainline. 2011-06-08 Julian Brown * config/arm/arm.c (arm_libcall_uses_aapcs_base): Use correct ABI for double-precision helper functions in hard-float mode if only single-precision arithmetic is supported in hardware. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184194 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/config/arm/arm.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 54b7603f3fc..49c2a75bdbc 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -3581,6 +3581,28 @@ arm_libcall_uses_aapcs_base (const_rtx libcall) convert_optab_libfunc (sfix_optab, DImode, SFmode)); add_libcall (libcall_htab, convert_optab_libfunc (ufix_optab, DImode, SFmode)); + + /* Values from double-precision helper functions are returned in core + registers if the selected core only supports single-precision + arithmetic, even if we are using the hard-float ABI. The same is + true for single-precision helpers, but we will never be using the + hard-float ABI on a CPU which doesn't support single-precision + operations in hardware. */ + add_libcall (libcall_htab, optab_libfunc (add_optab, DFmode)); + add_libcall (libcall_htab, optab_libfunc (sdiv_optab, DFmode)); + add_libcall (libcall_htab, optab_libfunc (smul_optab, DFmode)); + add_libcall (libcall_htab, optab_libfunc (neg_optab, DFmode)); + add_libcall (libcall_htab, optab_libfunc (sub_optab, DFmode)); + add_libcall (libcall_htab, optab_libfunc (eq_optab, DFmode)); + add_libcall (libcall_htab, optab_libfunc (lt_optab, DFmode)); + add_libcall (libcall_htab, optab_libfunc (le_optab, DFmode)); + add_libcall (libcall_htab, optab_libfunc (ge_optab, DFmode)); + add_libcall (libcall_htab, optab_libfunc (gt_optab, DFmode)); + add_libcall (libcall_htab, optab_libfunc (unord_optab, DFmode)); + add_libcall (libcall_htab, convert_optab_libfunc (sext_optab, DFmode, + SFmode)); + add_libcall (libcall_htab, convert_optab_libfunc (trunc_optab, SFmode, + DFmode)); } return libcall && htab_find (libcall_htab, libcall) != NULL; -- cgit v1.2.3 From e6602551d6d66272890e910132874e49a3ad6e1b Mon Sep 17 00:00:00 2001 From: Bin Cheng Date: Tue, 14 Feb 2012 07:11:06 +0000 Subject: Missing gcc/ChangeLog. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184195 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e98c8c2eb1d..00f9e96db31 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2012-02-14 Bin Cheng + + Backport from mainline. + 2011-06-08 Julian Brown + + * config/arm/arm.c (arm_libcall_uses_aapcs_base): Use correct ABI + for double-precision helper functions in hard-float mode if only + single-precision arithmetic is supported in hardware. + 2012-02-11 Uros Bizjak * compare-elim.c (find_comparisons_in_bb): Eliminate only compares -- cgit v1.2.3 From ed009d7252c63e63ce547325ad6015bd81ec1fb9 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 14 Feb 2012 23:31:42 +0000 Subject: PR bootstrap/51969 Backported from mainline 2011-11-08 Michael Matz * gengtype.c (write_field_root): Avoid out-of-scope access of newv. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184239 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 8 ++++++++ gcc/gengtype.c | 3 +-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 00f9e96db31..698804e460c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2012-02-14 Jakub Jelinek + + PR bootstrap/51969 + Backported from mainline + 2011-11-08 Michael Matz + + * gengtype.c (write_field_root): Avoid out-of-scope access of newv. + 2012-02-14 Bin Cheng Backport from mainline. diff --git a/gcc/gengtype.c b/gcc/gengtype.c index abf17f8e7f2..6c0ca4a0bf1 100644 --- a/gcc/gengtype.c +++ b/gcc/gengtype.c @@ -3594,14 +3594,13 @@ write_field_root (outf_p f, pair_p v, type_p type, const char *name, int has_length, struct fileloc *line, const char *if_marked, bool emit_pch, type_p field_type, const char *field_name) { + struct pair newv; /* If the field reference is relative to V, rather than to some subcomponent of V, we can mark any subarrays with a single stride. We're effectively treating the field as a global variable in its own right. */ if (v && type == v->type) { - struct pair newv; - newv = *v; newv.type = field_type; newv.name = ACONCAT ((v->name, ".", field_name, NULL)); -- cgit v1.2.3 From fe1dcf6aaa84641cc1523b18aab876bac23a1f0e Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 14 Feb 2012 23:32:39 +0000 Subject: Backported from mainline 2012-02-13 Jakub Jelinek PR middle-end/52230 * omp-low.c (expand_omp_for): If a static schedule without chunk size has NULL region->cont, force fd.chunk_size to be integer_zero_node. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184240 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 8 ++++++++ gcc/omp-low.c | 3 +++ 2 files changed, 11 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 698804e460c..1ba4443d3b8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,13 @@ 2012-02-14 Jakub Jelinek + Backported from mainline + 2012-02-13 Jakub Jelinek + + PR middle-end/52230 + * omp-low.c (expand_omp_for): If a static schedule without + chunk size has NULL region->cont, force fd.chunk_size to be + integer_zero_node. + PR bootstrap/51969 Backported from mainline 2011-11-08 Michael Matz diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 364f51e3bfd..bb0017a7671 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -4618,6 +4618,9 @@ expand_omp_for (struct omp_region *region) { int fn_index, start_ix, next_ix; + if (fd.chunk_size == NULL + && fd.sched_kind == OMP_CLAUSE_SCHEDULE_STATIC) + fd.chunk_size = integer_zero_node; gcc_assert (fd.sched_kind != OMP_CLAUSE_SCHEDULE_AUTO); fn_index = (fd.sched_kind == OMP_CLAUSE_SCHEDULE_RUNTIME) ? 3 : fd.sched_kind; -- cgit v1.2.3 From b12ee5aa5e666e5a64db1a4781f7ae0569b941de Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 14 Feb 2012 23:33:23 +0000 Subject: Backported from mainline 2012-02-13 Jakub Jelinek * cselib.c (dump_cselib_val): Don't assume l->setting_insn is non-NULL. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184241 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 3 +++ gcc/cselib.c | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1ba4443d3b8..48feadfadd0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -3,6 +3,9 @@ Backported from mainline 2012-02-13 Jakub Jelinek + * cselib.c (dump_cselib_val): Don't assume l->setting_insn is + non-NULL. + PR middle-end/52230 * omp-low.c (expand_omp_for): If a static schedule without chunk size has NULL region->cont, force fd.chunk_size to be diff --git a/gcc/cselib.c b/gcc/cselib.c index c142d679b7a..a2fdef7dbe3 100644 --- a/gcc/cselib.c +++ b/gcc/cselib.c @@ -2489,8 +2489,11 @@ dump_cselib_val (void **x, void *info) fputs (" locs:", out); do { - fprintf (out, "\n from insn %i ", - INSN_UID (l->setting_insn)); + if (l->setting_insn) + fprintf (out, "\n from insn %i ", + INSN_UID (l->setting_insn)); + else + fprintf (out, "\n "); print_inline_rtx (out, l->loc, 4); } while ((l = l->next)); -- cgit v1.2.3 From 6c2089fbf914748d4f87749f19cd73fc3eae0f0f Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 14 Feb 2012 23:34:34 +0000 Subject: Backported from mainline 2012-02-14 Jakub Jelinek PR c/52181 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN bit from olddecl to newdecl. * decl.c (duplicate_decls): If olddecl has bigger DECL_ALIGN than newdecl, copy DECL_ALIGN to newdecl and or DECL_USER_ALIGN bits. * c-c++-common/pr52181.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184242 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/c-decl.c | 1 + gcc/cp/ChangeLog | 9 +++++++++ gcc/cp/decl.c | 7 ++++++- gcc/testsuite/ChangeLog | 8 ++++++++ gcc/testsuite/c-c++-common/pr52181.c | 13 +++++++++++++ 6 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/c-c++-common/pr52181.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 48feadfadd0..e458e08ac4e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,12 @@ 2012-02-14 Jakub Jelinek Backported from mainline + 2012-02-14 Jakub Jelinek + + PR c/52181 + * c-decl.c (merge_decls): Copy DECL_USER_ALIGN bit from olddecl to + newdecl. + 2012-02-13 Jakub Jelinek * cselib.c (dump_cselib_val): Don't assume l->setting_insn is diff --git a/gcc/c-decl.c b/gcc/c-decl.c index b148f5e22f7..6d633134329 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -2436,6 +2436,7 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype) memcpy ((char *) olddecl + sizeof (struct tree_common), (char *) newdecl + sizeof (struct tree_common), sizeof (struct tree_decl_common) - sizeof (struct tree_common)); + DECL_USER_ALIGN (olddecl) = DECL_USER_ALIGN (newdecl); switch (TREE_CODE (olddecl)) { case FUNCTION_DECL: diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 15e93a5ed80..4eb9ec48954 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,12 @@ +2012-02-14 Jakub Jelinek + + Backported from mainline + 2012-02-14 Jakub Jelinek + + PR c/52181 + * decl.c (duplicate_decls): If olddecl has bigger DECL_ALIGN than + newdecl, copy DECL_ALIGN to newdecl and or DECL_USER_ALIGN bits. + 2012-02-09 Jakub Jelinek Backported from mainline diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index a2e52613fce..6b6f158491e 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -2154,7 +2154,12 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) SET_DECL_INIT_PRIORITY (olddecl, DECL_INIT_PRIORITY (newdecl)); DECL_HAS_INIT_PRIORITY_P (olddecl) = 1; } - /* Likewise for DECL_USER_ALIGN and DECL_PACKED. */ + /* Likewise for DECL_ALIGN, DECL_USER_ALIGN and DECL_PACKED. */ + if (DECL_ALIGN (olddecl) > DECL_ALIGN (newdecl)) + { + DECL_ALIGN (newdecl) = DECL_ALIGN (olddecl); + DECL_USER_ALIGN (newdecl) |= DECL_USER_ALIGN (olddecl); + } DECL_USER_ALIGN (olddecl) = DECL_USER_ALIGN (newdecl); if (TREE_CODE (newdecl) == FIELD_DECL) DECL_PACKED (olddecl) = DECL_PACKED (newdecl); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6e546a003aa..2e19a3d73d5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2012-02-14 Jakub Jelinek + + Backported from mainline + 2012-02-14 Jakub Jelinek + + PR c/52181 + * c-c++-common/pr52181.c: New test. + 2012-02-09 Jakub Jelinek Backported from mainline diff --git a/gcc/testsuite/c-c++-common/pr52181.c b/gcc/testsuite/c-c++-common/pr52181.c new file mode 100644 index 00000000000..e09bc92fc6f --- /dev/null +++ b/gcc/testsuite/c-c++-common/pr52181.c @@ -0,0 +1,13 @@ +/* PR c/52181 */ +/* { dg-do compile } */ + +extern const int v1[]; +const int __attribute__((aligned(16))) v1[] = { 1 }; +extern const int __attribute__((aligned(16))) v2[]; +const int v2[] = { 1 }; +extern const int __attribute__((aligned(16))) v3[]; +const int __attribute__((aligned(16))) v3[] = { 1 }; +const int __attribute__((aligned(16))) v4[] = { 1 }; +int test[(__alignof__ (v4) != __alignof__ (v1) /* { dg-bogus "is negative" } */ + || __alignof__ (v4) != __alignof__ (v2) + || __alignof__ (v4) != __alignof__ (v3)) ? -1 : 0]; -- cgit v1.2.3 From 748614cf1acbb22d135ea7b0c81c4e960f80c9f2 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 14 Feb 2012 23:35:15 +0000 Subject: Backported from mainline 2012-02-14 Jakub Jelinek PR debug/51950 * dwarf2out.c (clone_tree_hash): New function. (copy_decls_walk): Use it instead of clone_tree. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184243 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 4 ++++ gcc/dwarf2out.c | 32 +++++++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e458e08ac4e..b2a34e78e24 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -3,6 +3,10 @@ Backported from mainline 2012-02-14 Jakub Jelinek + PR debug/51950 + * dwarf2out.c (clone_tree_hash): New function. + (copy_decls_walk): Use it instead of clone_tree. + PR c/52181 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN bit from olddecl to newdecl. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 1860af92f48..1ed3d5ad5d9 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -10410,6 +10410,32 @@ copy_ancestor_tree (dw_die_ref unit, dw_die_ref die, htab_t decl_table) return copy; } +/* Like clone_tree, but additionally enter all the children into + the hash table decl_table. */ + +static dw_die_ref +clone_tree_hash (dw_die_ref die, htab_t decl_table) +{ + dw_die_ref c; + dw_die_ref clone = clone_die (die); + struct decl_table_entry *entry; + void **slot = htab_find_slot_with_hash (decl_table, die, + htab_hash_pointer (die), INSERT); + /* Assert that DIE isn't in the hash table yet. If it would be there + before, the ancestors would be necessarily there as well, therefore + clone_tree_hash wouldn't be called. */ + gcc_assert (*slot == HTAB_EMPTY_ENTRY); + entry = XCNEW (struct decl_table_entry); + entry->orig = die; + entry->copy = clone; + *slot = entry; + + FOR_EACH_CHILD (die, c, + add_child_die (clone, clone_tree_hash (c, decl_table))); + + return clone; +} + /* Walk the DIE and its children, looking for references to incomplete or trivial types that are unmarked (i.e., that are not in the current type_unit). */ @@ -10446,7 +10472,11 @@ copy_decls_walk (dw_die_ref unit, dw_die_ref die, htab_t decl_table) else { dw_die_ref parent = unit; - dw_die_ref copy = clone_tree (targ); + dw_die_ref copy = clone_die (targ); + + FOR_EACH_CHILD (targ, c, + add_child_die (copy, + clone_tree_hash (c, decl_table))); /* Make sure the cloned tree is marked as part of the type unit. */ -- cgit v1.2.3 From eb6f2d0a8bda072cd4158bab953356d29d114370 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 14 Feb 2012 23:36:19 +0000 Subject: Backported from mainline 2012-02-14 Jakub Jelinek PR c++/52247 * pt.c (tsubst_copy_asm_operands): For LABEL_DECL values call lookup_label on label's name and set TREE_USED. * g++.dg/template/asmgoto1.C: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184244 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 4 ++++ gcc/cp/pt.c | 13 +++++++++++-- gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/g++.dg/template/asmgoto1.C | 18 ++++++++++++++++++ 4 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/g++.dg/template/asmgoto1.C diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 4eb9ec48954..c87567ef7f8 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -3,6 +3,10 @@ Backported from mainline 2012-02-14 Jakub Jelinek + PR c++/52247 + * pt.c (tsubst_copy_asm_operands): For LABEL_DECL values call + lookup_label on label's name and set TREE_USED. + PR c/52181 * decl.c (duplicate_decls): If olddecl has bigger DECL_ALIGN than newdecl, copy DECL_ALIGN to newdecl and or DECL_USER_ALIGN bits. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index a94b10f347a..0760e9e23ca 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -11886,8 +11886,17 @@ tsubst_copy_asm_operands (tree t, tree args, tsubst_flags_t complain, if (purpose) purpose = RECUR (purpose); value = TREE_VALUE (t); - if (value && TREE_CODE (value) != LABEL_DECL) - value = RECUR (value); + if (value) + { + if (TREE_CODE (value) != LABEL_DECL) + value = RECUR (value); + else + { + value = lookup_label (DECL_NAME (value)); + gcc_assert (TREE_CODE (value) == LABEL_DECL); + TREE_USED (value) = 1; + } + } chain = TREE_CHAIN (t); if (chain && chain != void_type_node) chain = RECUR (chain); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2e19a3d73d5..d87feb9059c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -3,6 +3,9 @@ Backported from mainline 2012-02-14 Jakub Jelinek + PR c++/52247 + * g++.dg/template/asmgoto1.C: New test. + PR c/52181 * c-c++-common/pr52181.c: New test. diff --git a/gcc/testsuite/g++.dg/template/asmgoto1.C b/gcc/testsuite/g++.dg/template/asmgoto1.C new file mode 100644 index 00000000000..6a3cbcef4ee --- /dev/null +++ b/gcc/testsuite/g++.dg/template/asmgoto1.C @@ -0,0 +1,18 @@ +// PR c++/52247 +// { dg-do compile } + +template +bool +bar () +{ + __asm goto ("" : : : : lab); + return true; +lab: + return false; +} + +bool +foo () +{ + return bar<0> (); +} -- cgit v1.2.3 From 34ead98e1db4d5434e05c17027d313af9c4fc7ad Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Wed, 15 Feb 2012 00:18:29 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184249 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 9584376876a..5c95bed2342 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120214 +20120215 -- cgit v1.2.3 From 22a6b9e026cbc4bdaf9fc22a1e71238c320dfa03 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Wed, 15 Feb 2012 08:13:22 +0000 Subject: PR target/51921 PR target/52205 * config/sparc/sol2-unwind.h (sparc64_is_sighandler): Add support for Solaris 11 and slightly reformat. (sparc_is_sighandler): Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184256 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 8 ++++++++ gcc/config/sparc/sol2-unwind.h | 24 ++++++++++++++++++++---- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b2a34e78e24..084bb1135c4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2012-02-15 Eric Botcazou + + PR target/51921 + PR target/52205 + * config/sparc/sol2-unwind.h (sparc64_is_sighandler): Add support for + Solaris 11 and slightly reformat. + (sparc_is_sighandler): Likewise. + 2012-02-14 Jakub Jelinek Backported from mainline diff --git a/gcc/config/sparc/sol2-unwind.h b/gcc/config/sparc/sol2-unwind.h index db108074250..d6c4f6c1fe7 100644 --- a/gcc/config/sparc/sol2-unwind.h +++ b/gcc/config/sparc/sol2-unwind.h @@ -119,7 +119,12 @@ sparc64_is_sighandler (unsigned int *pc, void *cfa, int *nframes) unsigned int cuh_pattern = *(unsigned int *)(*(unsigned long *)(cfa + 15*8) - 4); - if (cuh_pattern == 0xd25fa7ef) + if (cuh_pattern == 0x92100019) + /* This matches the call_user_handler pattern for Solaris 11. + This is the same setup as for Solaris 9, see below. */ + *nframes = 3; + + else if (cuh_pattern == 0xd25fa7ef) { /* This matches the call_user_handler pattern for Solaris 10. There are 2 cases so we look for the return address of the @@ -140,6 +145,7 @@ sparc64_is_sighandler (unsigned int *pc, void *cfa, int *nframes) */ *nframes = 2; } + else if (cuh_pattern == 0x9410001a || cuh_pattern == 0x94100013) /* This matches the call_user_handler pattern for Solaris 9 and for Solaris 8 running inside Solaris Containers respectively @@ -152,7 +158,8 @@ sparc64_is_sighandler (unsigned int *pc, void *cfa, int *nframes) */ *nframes = 3; - else + + else /* cuh_pattern == 0xe0272010 */ /* This is the default Solaris 8 case. We need to move up two frames: @@ -162,6 +169,7 @@ sparc64_is_sighandler (unsigned int *pc, void *cfa, int *nframes) */ *nframes = 2; + return 1; } @@ -287,7 +295,12 @@ sparc_is_sighandler (unsigned int *pc, void *cfa, int *nframes) unsigned int cuh_pattern = *(unsigned int *)(*(unsigned int *)(cfa + 15*4) - 4); - if (cuh_pattern == 0xd407a04c) + if (cuh_pattern == 0x92100019) + /* This matches the call_user_handler pattern for Solaris 11. + This is the same setup as for Solaris 9, see below. */ + *nframes = 3; + + else if (cuh_pattern == 0xd407a04c) { /* This matches the call_user_handler pattern for Solaris 10. There are 2 cases so we look for the return address of the @@ -308,6 +321,7 @@ sparc_is_sighandler (unsigned int *pc, void *cfa, int *nframes) */ *nframes = 2; } + else if (cuh_pattern == 0x9410001a || cuh_pattern == 0x9410001b) /* This matches the call_user_handler pattern for Solaris 9 and for Solaris 8 running inside Solaris Containers respectively. @@ -320,7 +334,8 @@ sparc_is_sighandler (unsigned int *pc, void *cfa, int *nframes) */ *nframes = 3; - else + + else /* cuh_pattern == 0x90100018 */ /* This is the default Solaris 8 case. We need to move up two frames: @@ -330,6 +345,7 @@ sparc_is_sighandler (unsigned int *pc, void *cfa, int *nframes) */ *nframes = 2; + return 1; } -- cgit v1.2.3 From 9b63f6fa35af08899e2cc2f010f0ca5a8d00a3b3 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Wed, 15 Feb 2012 11:05:26 +0000 Subject: 2012-02-15 Richard Guenther Backport from mainline 2012-02-08 Richard Guenther PR tree-optimization/46886 * tree-flow.h (do_while_loop_p): Declare. * tree-ssa-loop-ch.c (do_while_loop_p): Export. * tree-parloops.c (parallelize_loops): Only parallelize do-while loops. * testsuite/libgomp.c/pr46886.c: New testcase. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184263 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 11 +++++++++++ gcc/tree-flow.h | 3 +++ gcc/tree-parloops.c | 5 ++++- gcc/tree-ssa-loop-ch.c | 2 +- libgomp/ChangeLog | 8 ++++++++ libgomp/testsuite/libgomp.c/pr46886.c | 28 ++++++++++++++++++++++++++++ 6 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 libgomp/testsuite/libgomp.c/pr46886.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 084bb1135c4..da9520a4bbe 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2012-02-15 Richard Guenther + + Backport from mainline + 2012-02-08 Richard Guenther + + PR tree-optimization/46886 + * tree-flow.h (do_while_loop_p): Declare. + * tree-ssa-loop-ch.c (do_while_loop_p): Export. + * tree-parloops.c (parallelize_loops): Only parallelize do-while + loops. + 2012-02-15 Eric Botcazou PR target/51921 diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h index 0777aecae72..77948cd179a 100644 --- a/gcc/tree-flow.h +++ b/gcc/tree-flow.h @@ -611,6 +611,9 @@ extern bool may_propagate_copy (tree, tree); extern bool may_propagate_copy_into_stmt (gimple, tree); extern bool may_propagate_copy_into_asm (tree); +/* In tree-ssa-loop-ch.c */ +bool do_while_loop_p (struct loop *); + /* Affine iv. */ typedef struct diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c index 9a11f80d4b0..e9154c37e65 100644 --- a/gcc/tree-parloops.c +++ b/gcc/tree-parloops.c @@ -2132,7 +2132,10 @@ parallelize_loops (void) || loop_has_blocks_with_irreducible_flag (loop) || (loop_preheader_edge (loop)->src->flags & BB_IRREDUCIBLE_LOOP) /* FIXME: the check for vector phi nodes could be removed. */ - || loop_has_vector_phi_nodes (loop)) + || loop_has_vector_phi_nodes (loop) + /* FIXME: transform_to_exit_first_loop does not handle not + header-copied loops correctly - see PR46886. */ + || !do_while_loop_p (loop)) continue; estimated = estimated_loop_iterations_int (loop, false); /* FIXME: Bypass this check as graphite doesn't update the diff --git a/gcc/tree-ssa-loop-ch.c b/gcc/tree-ssa-loop-ch.c index c58cb5f8bba..513745bc2fe 100644 --- a/gcc/tree-ssa-loop-ch.c +++ b/gcc/tree-ssa-loop-ch.c @@ -104,7 +104,7 @@ should_duplicate_loop_header_p (basic_block header, struct loop *loop, /* Checks whether LOOP is a do-while style loop. */ -static bool +bool do_while_loop_p (struct loop *loop) { gimple stmt = last_stmt (loop->latch); diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index f614c41ba77..4e681b7e273 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,11 @@ +2012-02-15 Richard Guenther + + Backport from mainline + 2012-02-08 Richard Guenther + + PR tree-optimization/46886 + * testsuite/libgomp.c/pr46886.c: New testcase. + 2011-11-20 Andreas Tobler * configure: Regenerate. diff --git a/libgomp/testsuite/libgomp.c/pr46886.c b/libgomp/testsuite/libgomp.c/pr46886.c new file mode 100644 index 00000000000..fbdc4e130d3 --- /dev/null +++ b/libgomp/testsuite/libgomp.c/pr46886.c @@ -0,0 +1,28 @@ +/* { dg-do run } */ +/* { dg-options "-O -ftree-parallelize-loops=4 -fno-tree-ch -fno-tree-dominator-opts" } */ + +void abort(void); + +int d[1024], e[1024]; + +int foo (void) +{ + int s = 0; + int i; + for (i = 0; i < 1024; i++) + s += d[i] - e[i]; + return s; +} + +int main () +{ + int i; + for (i = 0; i < 1024; i++) + { + d[i] = i * 2; + e[i] = i; + } + if (foo () != 1023 * 1024 / 2) + abort (); + return 0; +} -- cgit v1.2.3 From f4caea434eb4bb2254ec1ad01b3fba03b51358c5 Mon Sep 17 00:00:00 2001 From: Michael Meissner Date: Wed, 15 Feb 2012 21:17:42 +0000 Subject: [gcc] 2012-02-15 Michael Meissner PR target/52199 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Use force_reg instead of copy_to_reg for better optimization. Force non-register or memory operands into a register. [gcc/testsuite] 2012-02-15 Michael Meissner PR target/52199 * gcc.target/powerpc/pr52199.c: New file. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184285 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 10 ++++++++ gcc/config/rs6000/rs6000.c | 37 ++++++++++++++---------------- gcc/testsuite/ChangeLog | 8 +++++++ gcc/testsuite/gcc.target/powerpc/pr52199.c | 24 +++++++++++++++++++ 4 files changed, 59 insertions(+), 20 deletions(-) create mode 100644 gcc/testsuite/gcc.target/powerpc/pr52199.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index da9520a4bbe..578f1ee1f1d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2012-02-15 Michael Meissner + + Backport from mainline + 2012-02-15 Michael Meissner + + PR target/52199 + * config/rs6000/rs6000.c (rs6000_expand_vector_init): Use + force_reg instead of copy_to_reg for better optimization. Force + non-register or memory operands into a register. + 2012-02-15 Richard Guenther Backport from mainline diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index a9cd835577e..2f2f342e792 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -5324,28 +5324,25 @@ rs6000_expand_vector_init (rtx target, rtx vals) /* Double word values on VSX can use xxpermdi or lxvdsx. */ if (VECTOR_MEM_VSX_P (mode) && (mode == V2DFmode || mode == V2DImode)) { + rtx op0 = XVECEXP (vals, 0, 0); + rtx op1 = XVECEXP (vals, 0, 1); if (all_same) { - rtx element = XVECEXP (vals, 0, 0); + if (!MEM_P (op0) && !REG_P (op0)) + op0 = force_reg (inner_mode, op0); if (mode == V2DFmode) - emit_insn (gen_vsx_splat_v2df (target, element)); + emit_insn (gen_vsx_splat_v2df (target, op0)); else - emit_insn (gen_vsx_splat_v2di (target, element)); + emit_insn (gen_vsx_splat_v2di (target, op0)); } else { + op0 = force_reg (inner_mode, op0); + op1 = force_reg (inner_mode, op1); if (mode == V2DFmode) - { - rtx op0 = copy_to_mode_reg (DFmode, XVECEXP (vals, 0, 0)); - rtx op1 = copy_to_mode_reg (DFmode, XVECEXP (vals, 0, 1)); - emit_insn (gen_vsx_concat_v2df (target, op0, op1)); - } + emit_insn (gen_vsx_concat_v2df (target, op0, op1)); else - { - rtx op0 = copy_to_mode_reg (DImode, XVECEXP (vals, 0, 0)); - rtx op1 = copy_to_mode_reg (DImode, XVECEXP (vals, 0, 1)); - emit_insn (gen_vsx_concat_v2di (target, op0, op1)); - } + emit_insn (gen_vsx_concat_v2di (target, op0, op1)); } return; } @@ -5359,7 +5356,7 @@ rs6000_expand_vector_init (rtx target, rtx vals) if (all_same) { rtx freg = gen_reg_rtx (V4SFmode); - rtx sreg = copy_to_reg (XVECEXP (vals, 0, 0)); + rtx sreg = force_reg (SFmode, XVECEXP (vals, 0, 0)); emit_insn (gen_vsx_xscvdpsp_scalar (freg, sreg)); emit_insn (gen_vsx_xxspltw_v4sf (target, freg, const0_rtx)); @@ -5370,13 +5367,13 @@ rs6000_expand_vector_init (rtx target, rtx vals) rtx dbl_odd = gen_reg_rtx (V2DFmode); rtx flt_even = gen_reg_rtx (V4SFmode); rtx flt_odd = gen_reg_rtx (V4SFmode); + rtx op0 = force_reg (SFmode, XVECEXP (vals, 0, 0)); + rtx op1 = force_reg (SFmode, XVECEXP (vals, 0, 1)); + rtx op2 = force_reg (SFmode, XVECEXP (vals, 0, 2)); + rtx op3 = force_reg (SFmode, XVECEXP (vals, 0, 3)); - emit_insn (gen_vsx_concat_v2sf (dbl_even, - copy_to_reg (XVECEXP (vals, 0, 0)), - copy_to_reg (XVECEXP (vals, 0, 1)))); - emit_insn (gen_vsx_concat_v2sf (dbl_odd, - copy_to_reg (XVECEXP (vals, 0, 2)), - copy_to_reg (XVECEXP (vals, 0, 3)))); + emit_insn (gen_vsx_concat_v2sf (dbl_even, op0, op1)); + emit_insn (gen_vsx_concat_v2sf (dbl_odd, op2, op3)); emit_insn (gen_vsx_xvcvdpsp (flt_even, dbl_even)); emit_insn (gen_vsx_xvcvdpsp (flt_odd, dbl_odd)); emit_insn (gen_vec_extract_evenv4sf (target, flt_even, flt_odd)); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d87feb9059c..3e74b86e396 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2012-02-15 Michael Meissner + + Backport from mainline + 2012-02-15 Michael Meissner + + PR target/52199 + * gcc.target/powerpc/pr52199.c: New file. + 2012-02-14 Jakub Jelinek Backported from mainline diff --git a/gcc/testsuite/gcc.target/powerpc/pr52199.c b/gcc/testsuite/gcc.target/powerpc/pr52199.c new file mode 100644 index 00000000000..e2231938839 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr52199.c @@ -0,0 +1,24 @@ +/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */ +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ +/* { dg-require-effective-target powerpc_vsx_ok } */ +/* { dg-options "-O3 -mcpu=power7 -fmerge-all-constants" } */ + +struct locale_time_t +{ + const char *abday[7]; + const unsigned int *wabday[7]; +}; + +static const unsigned int empty_wstr[1] = { 0 }; + +void +time_read (struct locale_time_t *time) +{ + int cnt; + + for (cnt=0; cnt < 7; cnt++) + { + time->abday[cnt] = ""; + time->wabday[cnt] = empty_wstr; + } +} -- cgit v1.2.3 From 14a32f4a1a7736fcb9fd26e36349ffe8d03cebb8 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 16 Feb 2012 00:21:26 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184296 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 5c95bed2342..7fa6c0b8d87 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120215 +20120216 -- cgit v1.2.3 From 09ac6459d7f8539454af0717b4e2f4f531ee3f6a Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 16 Feb 2012 08:50:02 +0000 Subject: PR debug/52260 * dwarf2out.c (copy_decls_walk): Fill in *slot before traversing children with clone_tree_hash, not after it. * g++.dg/debug/dwarf2/pr52260.C: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184304 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++ gcc/dwarf2out.c | 16 ++-- gcc/testsuite/ChangeLog | 5 ++ gcc/testsuite/g++.dg/debug/dwarf2/pr52260.C | 133 ++++++++++++++++++++++++++++ 4 files changed, 152 insertions(+), 8 deletions(-) create mode 100644 gcc/testsuite/g++.dg/debug/dwarf2/pr52260.C diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 578f1ee1f1d..7ca0177fc06 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-02-16 Jakub Jelinek + + PR debug/52260 + * dwarf2out.c (copy_decls_walk): Fill in *slot before traversing + children with clone_tree_hash, not after it. + 2012-02-15 Michael Meissner Backport from mainline diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 1ed3d5ad5d9..025593cef22 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -10474,14 +10474,6 @@ copy_decls_walk (dw_die_ref unit, dw_die_ref die, htab_t decl_table) dw_die_ref parent = unit; dw_die_ref copy = clone_die (targ); - FOR_EACH_CHILD (targ, c, - add_child_die (copy, - clone_tree_hash (c, decl_table))); - - /* Make sure the cloned tree is marked as part of the - type unit. */ - mark_dies (copy); - /* Record in DECL_TABLE that TARG has been copied. Need to do this now, before the recursive call, because DECL_TABLE may be expanded and SLOT @@ -10491,6 +10483,14 @@ copy_decls_walk (dw_die_ref unit, dw_die_ref die, htab_t decl_table) entry->copy = copy; *slot = entry; + FOR_EACH_CHILD (targ, c, + add_child_die (copy, + clone_tree_hash (c, decl_table))); + + /* Make sure the cloned tree is marked as part of the + type unit. */ + mark_dies (copy); + /* If TARG has surrounding context, copy its ancestor tree into the new type unit. */ if (targ->die_parent != NULL diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3e74b86e396..acc5463c409 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-02-16 Jakub Jelinek + + PR debug/52260 + * g++.dg/debug/dwarf2/pr52260.C: New test. + 2012-02-15 Michael Meissner Backport from mainline diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pr52260.C b/gcc/testsuite/g++.dg/debug/dwarf2/pr52260.C new file mode 100644 index 00000000000..9ab2589ce11 --- /dev/null +++ b/gcc/testsuite/g++.dg/debug/dwarf2/pr52260.C @@ -0,0 +1,133 @@ +// PR debug/52260 +// { dg-do compile } +// { dg-options "-gdwarf-4 -std=c++0x" } + +namespace { typedef decltype (nullptr) T1; } +struct B {}; +namespace A +{ + template + struct C { static constexpr T value = __v; }; + typedef C D; + template + struct E : D {}; + template + struct F : C ::value)> {}; + template + struct G { typedef T t; }; +} +template +struct H {}; +namespace A +{ + template + struct I : H {}; + template struct J; + template struct K; + struct L + { + template + struct M + { + template static bool m2 (T) { return false; } + }; + }; + template struct N; + template + struct N : L::M {}; + template + struct K :J <,>, L + { + typedef T O (B4 ...); + struct P {}; + template K (B2, typename G ::value, P>::t = P ()); + }; + template + template + K ::K (B2 __f, typename G ::value, P>::t) + { + typedef N Q; + Q::m2 (__f); + }; +} +enum R { r1 }; +const R r2 = r1; +namespace A +{ + template + struct S {}; + template > + struct U {}; + template + struct V { T *operator -> (); }; + template + struct W : V + { + W (const W &); + W (T1) {} + W & operator= (W) {} + }; + template struct Z; + struct AA + { + struct AB + { + struct AC { void operator () () {} }; + }; + template using AD = U ; + struct AE + { + typedef AD AZ; + virtual ~AE (); + void o3 (K , bool = false) {} + template struct AY; + struct C1 {}; + template struct AY + { + AZ operator () () { return AZ (); } + Z _M_Z; + }; + template + static AY _s1 (B, Z *); + }; + }; + template <> + struct Z + { + typedef AA::AE AF; + W o4; + void foo (B __p) + { + auto _s1 = AF::_s1 (__p, this); + o4->o3 (_s1); + } + }; + template + struct AG {}; + template > + struct AH : AG + { + void bar (T) { baz (); } + template + void baz (_Args && ...); + }; + template + template + void AH ::baz (_Args && ...) {} + namespace + { + typedef A::K AI; + struct AF + { + int v2; + AI v1; + AF (int, unsigned, AI __t) : v2 (), v1 (__t) {} + }; + struct D3 : A::AH + { + typedef AF AFT; + void v3 (AI __t) { bar (AFT (4, v4, __t)); } + int v4; + }; + } +} -- cgit v1.2.3 From 89646f5c8ef1e05bb625c151ac00d46c0b54a618 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Fri, 17 Feb 2012 00:18:21 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184326 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 7fa6c0b8d87..cb944191e7e 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120216 +20120217 -- cgit v1.2.3 From e2a946ebec2473a94a4591fabb3794005e1fb1a7 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 17 Feb 2012 14:56:14 +0000 Subject: PR testsuite/52296 * g++.dg/debug/dwarf2/pr52260.C: Remove. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184344 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 5 ++ gcc/testsuite/g++.dg/debug/dwarf2/pr52260.C | 133 ---------------------------- 2 files changed, 5 insertions(+), 133 deletions(-) delete mode 100644 gcc/testsuite/g++.dg/debug/dwarf2/pr52260.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index acc5463c409..e4468c8f31b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-02-17 Jakub Jelinek + + PR testsuite/52296 + * g++.dg/debug/dwarf2/pr52260.C: Remove. + 2012-02-16 Jakub Jelinek PR debug/52260 diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pr52260.C b/gcc/testsuite/g++.dg/debug/dwarf2/pr52260.C deleted file mode 100644 index 9ab2589ce11..00000000000 --- a/gcc/testsuite/g++.dg/debug/dwarf2/pr52260.C +++ /dev/null @@ -1,133 +0,0 @@ -// PR debug/52260 -// { dg-do compile } -// { dg-options "-gdwarf-4 -std=c++0x" } - -namespace { typedef decltype (nullptr) T1; } -struct B {}; -namespace A -{ - template - struct C { static constexpr T value = __v; }; - typedef C D; - template - struct E : D {}; - template - struct F : C ::value)> {}; - template - struct G { typedef T t; }; -} -template -struct H {}; -namespace A -{ - template - struct I : H {}; - template struct J; - template struct K; - struct L - { - template - struct M - { - template static bool m2 (T) { return false; } - }; - }; - template struct N; - template - struct N : L::M {}; - template - struct K :J <,>, L - { - typedef T O (B4 ...); - struct P {}; - template K (B2, typename G ::value, P>::t = P ()); - }; - template - template - K ::K (B2 __f, typename G ::value, P>::t) - { - typedef N Q; - Q::m2 (__f); - }; -} -enum R { r1 }; -const R r2 = r1; -namespace A -{ - template - struct S {}; - template > - struct U {}; - template - struct V { T *operator -> (); }; - template - struct W : V - { - W (const W &); - W (T1) {} - W & operator= (W) {} - }; - template struct Z; - struct AA - { - struct AB - { - struct AC { void operator () () {} }; - }; - template using AD = U ; - struct AE - { - typedef AD AZ; - virtual ~AE (); - void o3 (K , bool = false) {} - template struct AY; - struct C1 {}; - template struct AY - { - AZ operator () () { return AZ (); } - Z _M_Z; - }; - template - static AY _s1 (B, Z *); - }; - }; - template <> - struct Z - { - typedef AA::AE AF; - W o4; - void foo (B __p) - { - auto _s1 = AF::_s1 (__p, this); - o4->o3 (_s1); - } - }; - template - struct AG {}; - template > - struct AH : AG - { - void bar (T) { baz (); } - template - void baz (_Args && ...); - }; - template - template - void AH ::baz (_Args && ...) {} - namespace - { - typedef A::K AI; - struct AF - { - int v2; - AI v1; - AF (int, unsigned, AI __t) : v2 (), v1 (__t) {} - }; - struct D3 : A::AH - { - typedef AF AFT; - void v3 (AI __t) { bar (AFT (4, v4, __t)); } - int v4; - }; - } -} -- cgit v1.2.3 From 3f4ff0980e32c306b9426a37531a5a1a6aa62c84 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sat, 18 Feb 2012 00:18:05 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184361 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index cb944191e7e..52cbf447ff0 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120217 +20120218 -- cgit v1.2.3 From 274b20963b60095839efddcf1e79eb5b28be7359 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sun, 19 Feb 2012 00:18:20 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184376 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 52cbf447ff0..6a78e87f585 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120218 +20120219 -- cgit v1.2.3 From 30f5d010b14037a9c239f5247a8fa76039ac6f45 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Mon, 20 Feb 2012 00:18:28 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184384 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 6a78e87f585..2bf1d04f5a3 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120219 +20120220 -- cgit v1.2.3 From 87cda382d8a02291bb0edad01c0edb7dd5fb47e3 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Mon, 20 Feb 2012 11:31:01 +0000 Subject: 2012-02-20 Paolo Carlini 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. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184389 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 7 ++++++ libstdc++-v3/include/bits/hashtable_policy.h | 4 ++-- .../23_containers/unordered_set/operators/52309.cc | 28 ++++++++++++++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_set/operators/52309.cc diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 5dc5c06444a..0d46aa3e1cb 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2012-02-20 Paolo Carlini + + 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-01 Paolo Carlini PR libstdc++/51795 diff --git a/libstdc++-v3/include/bits/hashtable_policy.h b/libstdc++-v3/include/bits/hashtable_policy.h index f6e187616ee..ec3a29c515a 100644 --- a/libstdc++-v3/include/bits/hashtable_policy.h +++ b/libstdc++-v3/include/bits/hashtable_policy.h @@ -887,7 +887,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; @@ -925,7 +925,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/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 +// . + +#include + +// libstdc++/52309 +struct value {}; +struct hash { std::size_t operator()(const value&) const; }; +bool operator==(value const&, value const&); +std::unordered_set set; +bool z = (set == set); -- cgit v1.2.3 From 1b22d94ea56b7574c3a8135506053f22c1d257fb Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Mon, 20 Feb 2012 21:28:36 +0000 Subject: PR libstdc++/52300 * gthr.h (GTHREAD_USE_WEAK): Define as zero for mingw. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184408 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/gthr.h | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7ca0177fc06..f07cf6439a3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-02-20 Kai Tietz + + PR libstdc++/52300 + * gthr.h (GTHREAD_USE_WEAK): Define as zero for mingw. + 2012-02-16 Jakub Jelinek PR debug/52260 diff --git a/gcc/gthr.h b/gcc/gthr.h index 6edfbcd69c3..f4dd96b9e3a 100644 --- a/gcc/gthr.h +++ b/gcc/gthr.h @@ -155,6 +155,14 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see /* Include GTHREAD_FILE if one is defined. */ #elif defined(HAVE_GTHR_DEFAULT) #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 -- cgit v1.2.3 From 56eed4a22192234e2c5428ccfafe9c40ace9feeb Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Mon, 20 Feb 2012 22:09:48 +0000 Subject: PR target/52238 * stor-layout.c (place_field): Handle desired_align for ms-bitfields, too. * gcc.dg/bf-ms-layout-3.c: New testcase. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184410 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 +++++ gcc/stor-layout.c | 12 ++++----- gcc/testsuite/ChangeLog | 4 +++ gcc/testsuite/gcc.dg/bf-ms-layout-3.c | 51 +++++++++++++++++++++++++++++++++++ 4 files changed, 67 insertions(+), 6 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/bf-ms-layout-3.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f07cf6439a3..13f96448a35 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-02-20 Kai Tietz + + PR target/52238 + * stor-layout.c (place_field): Handle desired_align for + ms-bitfields, too. + 2012-02-20 Kai Tietz PR libstdc++/52300 diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index a225dbfbd8b..0396c8cdd3d 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -1177,15 +1177,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 @@ -1207,7 +1206,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 e4468c8f31b..26e64d86dc5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2012-02-20 Kai Tietz + + * gcc.dg/bf-ms-layout-3.c: New testcase. + 2012-02-17 Jakub Jelinek PR testsuite/52296 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..9abb9dc2d06 --- /dev/null +++ b/gcc/testsuite/gcc.dg/bf-ms-layout-3.c @@ -0,0 +1,51 @@ +/* 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 { + char a : 6; + char b __attribute__ ((aligned (16))); +} __attribute__ ((ms_struct)); +struct s3_t s3; + +struct s4_t { + char a : 6; + char b __attribute__ ((aligned (2))); +} __attribute__ ((ms_struct)); +struct s4_t s4; + +struct s5_t { + char a : 6; + char b __attribute__ ((aligned (1))); +} __attribute__ ((ms_struct)); +struct s5_t s5; + +__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; +} + -- cgit v1.2.3 -- cgit v1.2.3 From 55e2842594de557634cca75ae1e4414508e3c7f5 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Tue, 21 Feb 2012 00:18:21 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184420 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 2bf1d04f5a3..26d732e9b48 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120220 +20120221 -- cgit v1.2.3 From 298e16ece14e83cc6503a72ee6438636675262bd Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Tue, 21 Feb 2012 10:56:34 +0000 Subject: 2012-02-21 Paolo Carlini 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. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184431 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 30 ++++++++++++++++++ libstdc++-v3/include/profile/base.h | 37 ++++++++-------------- libstdc++-v3/include/profile/impl/profiler.h | 37 ++++++++-------------- libstdc++-v3/include/profile/impl/profiler_algos.h | 37 ++++++++-------------- .../include/profile/impl/profiler_container_size.h | 37 ++++++++-------------- .../include/profile/impl/profiler_hash_func.h | 37 ++++++++-------------- .../include/profile/impl/profiler_hashtable_size.h | 37 ++++++++-------------- .../include/profile/impl/profiler_list_to_slist.h | 37 ++++++++-------------- .../include/profile/impl/profiler_list_to_vector.h | 37 ++++++++-------------- .../profile/impl/profiler_map_to_unordered_map.h | 37 ++++++++-------------- libstdc++-v3/include/profile/impl/profiler_node.h | 37 ++++++++-------------- libstdc++-v3/include/profile/impl/profiler_state.h | 37 ++++++++-------------- libstdc++-v3/include/profile/impl/profiler_trace.h | 37 ++++++++-------------- .../include/profile/impl/profiler_vector_size.h | 37 ++++++++-------------- .../include/profile/impl/profiler_vector_to_list.h | 37 ++++++++-------------- libstdc++-v3/include/profile/map | 20 +++--------- libstdc++-v3/include/profile/map.h | 20 +++--------- libstdc++-v3/include/profile/set | 20 +++--------- libstdc++-v3/include/profile/unordered_map | 20 +++--------- libstdc++-v3/include/profile/unordered_set | 20 +++--------- libstdc++-v3/include/profile/vector | 20 +++--------- libstdc++-v3/python/Makefile.am | 11 +++---- .../20_util/reference_wrapper/invoke-2.cc | 7 ++-- .../numeric_conversions/char/dr1261.cc | 11 +++---- .../numeric_conversions/wchar_t/dr1261.cc | 11 +++---- 25 files changed, 260 insertions(+), 448 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 0d46aa3e1cb..f4e61b0d978 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,33 @@ +2012-02-21 Paolo Carlini + + 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 PR libstdc++/52309 diff --git a/libstdc++-v3/include/profile/base.h b/libstdc++-v3/include/profile/base.h index ef17443b37e..9998866a5d1 100644 --- a/libstdc++-v3/include/profile/base.h +++ b/libstdc++-v3/include/profile/base.h @@ -3,30 +3,19 @@ // 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. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . /** @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..ea686500781 100644 --- a/libstdc++-v3/include/profile/impl/profiler.h +++ b/libstdc++-v3/include/profile/impl/profiler.h @@ -3,30 +3,19 @@ // 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. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . /** @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..9d92ea47647 100644 --- a/libstdc++-v3/include/profile/impl/profiler_algos.h +++ b/libstdc++-v3/include/profile/impl/profiler_algos.h @@ -3,30 +3,19 @@ // 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. - -// 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. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . /** @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..a79293f847a 100644 --- a/libstdc++-v3/include/profile/impl/profiler_container_size.h +++ b/libstdc++-v3/include/profile/impl/profiler_container_size.h @@ -3,30 +3,19 @@ // 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. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . /** @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..ff70f6c8f20 100644 --- a/libstdc++-v3/include/profile/impl/profiler_hash_func.h +++ b/libstdc++-v3/include/profile/impl/profiler_hash_func.h @@ -3,30 +3,19 @@ // 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. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . /** @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..d2cac85f9db 100644 --- a/libstdc++-v3/include/profile/impl/profiler_hashtable_size.h +++ b/libstdc++-v3/include/profile/impl/profiler_hashtable_size.h @@ -3,30 +3,19 @@ // 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. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . /** @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..dfeacc69855 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,19 @@ // 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. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . /** @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..01b78fcea46 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,19 @@ // 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. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . /** @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..32a1a38f19b 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,19 @@ // 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. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . /** @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 c32b94e2319..3b7f4284dec 100644 --- a/libstdc++-v3/include/profile/impl/profiler_node.h +++ b/libstdc++-v3/include/profile/impl/profiler_node.h @@ -3,30 +3,19 @@ // 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. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . /** @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 111b97e0eca..84a38ec7f4a 100644 --- a/libstdc++-v3/include/profile/impl/profiler_state.h +++ b/libstdc++-v3/include/profile/impl/profiler_state.h @@ -3,30 +3,19 @@ // 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. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . /** @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..8d669101053 100644 --- a/libstdc++-v3/include/profile/impl/profiler_trace.h +++ b/libstdc++-v3/include/profile/impl/profiler_trace.h @@ -3,30 +3,19 @@ // 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. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . /** @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..f2c230c3284 100644 --- a/libstdc++-v3/include/profile/impl/profiler_vector_size.h +++ b/libstdc++-v3/include/profile/impl/profiler_vector_size.h @@ -3,30 +3,19 @@ // 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. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . /** @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..ba5f7af3959 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,19 @@ // 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. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . /** @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..e221814b5e3 100644 --- a/libstdc++-v3/include/profile/map +++ b/libstdc++-v3/include/profile/map @@ -5,27 +5,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. - -// 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 +// . /** @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 a58a2b01a9b..8667fc0e8c9 100644 --- a/libstdc++-v3/include/profile/map.h +++ b/libstdc++-v3/include/profile/map.h @@ -5,27 +5,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. - -// 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 +// . /** @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..affc0b0e086 100644 --- a/libstdc++-v3/include/profile/set +++ b/libstdc++-v3/include/profile/set @@ -5,27 +5,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. - -// 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 +// . /** @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 cc54009e3f4..18497e1ad85 100644 --- a/libstdc++-v3/include/profile/unordered_map +++ b/libstdc++-v3/include/profile/unordered_map @@ -5,27 +5,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. - -// 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 +// . /** @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 547fb764d22..82f24feff7c 100644 --- a/libstdc++-v3/include/profile/unordered_set +++ b/libstdc++-v3/include/profile/unordered_set @@ -5,27 +5,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. - -// 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 +// . /** @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 f8a9622e8ba..8908dbef53c 100644 --- a/libstdc++-v3/include/profile/vector +++ b/libstdc++-v3/include/profile/vector @@ -5,27 +5,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. - -// 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 +// . /** @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 457e45ba46d..b603444adec 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 +## . include $(top_srcdir)/fragment.am 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 bd9aeb2c40b..c1b62932f64 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 +// . // 20.6.4 function object return types [func.ret] #include 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 +// . #include #include 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 +// . #include #include -- cgit v1.2.3 From 26aa21865c8a67a2a0cbf52025f3c93e8a421624 Mon Sep 17 00:00:00 2001 From: Andreas Krebbel Date: Tue, 21 Feb 2012 11:20:57 +0000 Subject: 2012-02-21 Andreas Krebbel * config/s390/s390.md ("fixuns_truncsi2"): Replace TARGET_HARD_FLOAT with TARGET_HARD_DFP. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184432 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/config/s390/s390.md | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 13f96448a35..cb428cef00d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-02-21 Andreas Krebbel + + * config/s390/s390.md ("fixuns_truncsi2"): Replace + TARGET_HARD_FLOAT with TARGET_HARD_DFP. + 2012-02-20 Kai Tietz PR target/52238 diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index 99a8d6631a3..ac5b7a01467 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -4007,7 +4007,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. -- cgit v1.2.3 From 6927d259d86e6c6ad769b0e66772bb633a229d04 Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Tue, 21 Feb 2012 14:13:57 +0000 Subject: * gcc.dg/bf-ms-layout-3.c: Mark char typed bitfield as extension. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184438 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/bf-ms-layout-3.c | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 26e64d86dc5..7789e2542da 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-02-21 Kai Tietz + + * gcc.dg/bf-ms-layout-3.c: Mark char typed bitfield + as extension. + 2012-02-20 Kai Tietz * gcc.dg/bf-ms-layout-3.c: New testcase. diff --git a/gcc/testsuite/gcc.dg/bf-ms-layout-3.c b/gcc/testsuite/gcc.dg/bf-ms-layout-3.c index 9abb9dc2d06..a4e9ab3ff6f 100644 --- a/gcc/testsuite/gcc.dg/bf-ms-layout-3.c +++ b/gcc/testsuite/gcc.dg/bf-ms-layout-3.c @@ -16,24 +16,25 @@ struct s2_t { struct s2_t s2; struct s3_t { - char a : 6; + __extension__ char a : 6; char b __attribute__ ((aligned (16))); } __attribute__ ((ms_struct)); struct s3_t s3; struct s4_t { - char a : 6; + __extension__ char a : 6; char b __attribute__ ((aligned (2))); } __attribute__ ((ms_struct)); struct s4_t s4; struct s5_t { - char a : 6; + __extension__ char a : 6; char b __attribute__ ((aligned (1))); } __attribute__ ((ms_struct)); struct s5_t s5; -__PTRDIFF_TYPE__ offs (const void *a, const void *b) +__extension__ +static __PTRDIFF_TYPE__ offs (const void *a, const void *b) { return (__PTRDIFF_TYPE__) ((const char*)a - (const char*)b); } -- cgit v1.2.3 From f8956dd41d8e41b5bdc193a9e42fe7460b670738 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Tue, 21 Feb 2012 21:30:44 +0000 Subject: 2012-02-21 Paolo Carlini 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. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184449 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 24 ++++++++++++++++++++++ libstdc++-v3/include/profile/base.h | 6 +++++- libstdc++-v3/include/profile/impl/profiler.h | 6 +++++- libstdc++-v3/include/profile/impl/profiler_algos.h | 6 +++++- .../include/profile/impl/profiler_container_size.h | 6 +++++- .../include/profile/impl/profiler_hash_func.h | 6 +++++- .../include/profile/impl/profiler_hashtable_size.h | 6 +++++- .../include/profile/impl/profiler_list_to_slist.h | 6 +++++- .../include/profile/impl/profiler_list_to_vector.h | 6 +++++- .../profile/impl/profiler_map_to_unordered_map.h | 6 +++++- libstdc++-v3/include/profile/impl/profiler_node.h | 6 +++++- libstdc++-v3/include/profile/impl/profiler_state.h | 6 +++++- libstdc++-v3/include/profile/impl/profiler_trace.h | 6 +++++- .../include/profile/impl/profiler_vector_size.h | 6 +++++- .../include/profile/impl/profiler_vector_to_list.h | 6 +++++- libstdc++-v3/include/profile/map | 6 +++++- libstdc++-v3/include/profile/map.h | 6 +++++- libstdc++-v3/include/profile/set | 6 +++++- libstdc++-v3/include/profile/unordered_map | 6 +++++- libstdc++-v3/include/profile/unordered_set | 6 +++++- libstdc++-v3/include/profile/vector | 6 +++++- 21 files changed, 124 insertions(+), 20 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index f4e61b0d978..98af118e45b 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,27 @@ +2012-02-21 Paolo Carlini + + 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 PR libstdc++/52317 diff --git a/libstdc++-v3/include/profile/base.h b/libstdc++-v3/include/profile/base.h index 9998866a5d1..fd3e431df08 100644 --- a/libstdc++-v3/include/profile/base.h +++ b/libstdc++-v3/include/profile/base.h @@ -12,7 +12,11 @@ // 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 // . diff --git a/libstdc++-v3/include/profile/impl/profiler.h b/libstdc++-v3/include/profile/impl/profiler.h index ea686500781..49785bbee8f 100644 --- a/libstdc++-v3/include/profile/impl/profiler.h +++ b/libstdc++-v3/include/profile/impl/profiler.h @@ -12,7 +12,11 @@ // 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 // . diff --git a/libstdc++-v3/include/profile/impl/profiler_algos.h b/libstdc++-v3/include/profile/impl/profiler_algos.h index 9d92ea47647..977afaa800c 100644 --- a/libstdc++-v3/include/profile/impl/profiler_algos.h +++ b/libstdc++-v3/include/profile/impl/profiler_algos.h @@ -12,7 +12,11 @@ // 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 // . diff --git a/libstdc++-v3/include/profile/impl/profiler_container_size.h b/libstdc++-v3/include/profile/impl/profiler_container_size.h index a79293f847a..26b2c72c2e5 100644 --- a/libstdc++-v3/include/profile/impl/profiler_container_size.h +++ b/libstdc++-v3/include/profile/impl/profiler_container_size.h @@ -12,7 +12,11 @@ // 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 // . diff --git a/libstdc++-v3/include/profile/impl/profiler_hash_func.h b/libstdc++-v3/include/profile/impl/profiler_hash_func.h index ff70f6c8f20..7ff11cd03b9 100644 --- a/libstdc++-v3/include/profile/impl/profiler_hash_func.h +++ b/libstdc++-v3/include/profile/impl/profiler_hash_func.h @@ -12,7 +12,11 @@ // 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 // . diff --git a/libstdc++-v3/include/profile/impl/profiler_hashtable_size.h b/libstdc++-v3/include/profile/impl/profiler_hashtable_size.h index d2cac85f9db..8557a607316 100644 --- a/libstdc++-v3/include/profile/impl/profiler_hashtable_size.h +++ b/libstdc++-v3/include/profile/impl/profiler_hashtable_size.h @@ -12,7 +12,11 @@ // 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 // . 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 dfeacc69855..2195ccf90d9 100644 --- a/libstdc++-v3/include/profile/impl/profiler_list_to_slist.h +++ b/libstdc++-v3/include/profile/impl/profiler_list_to_slist.h @@ -12,7 +12,11 @@ // 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 // . 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 01b78fcea46..b3840a747cf 100644 --- a/libstdc++-v3/include/profile/impl/profiler_list_to_vector.h +++ b/libstdc++-v3/include/profile/impl/profiler_list_to_vector.h @@ -12,7 +12,11 @@ // 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 // . 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 32a1a38f19b..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 @@ -12,7 +12,11 @@ // 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 // . diff --git a/libstdc++-v3/include/profile/impl/profiler_node.h b/libstdc++-v3/include/profile/impl/profiler_node.h index 3b7f4284dec..acc0cb5bf90 100644 --- a/libstdc++-v3/include/profile/impl/profiler_node.h +++ b/libstdc++-v3/include/profile/impl/profiler_node.h @@ -12,7 +12,11 @@ // 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 // . diff --git a/libstdc++-v3/include/profile/impl/profiler_state.h b/libstdc++-v3/include/profile/impl/profiler_state.h index 84a38ec7f4a..1f39df54825 100644 --- a/libstdc++-v3/include/profile/impl/profiler_state.h +++ b/libstdc++-v3/include/profile/impl/profiler_state.h @@ -12,7 +12,11 @@ // 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 // . diff --git a/libstdc++-v3/include/profile/impl/profiler_trace.h b/libstdc++-v3/include/profile/impl/profiler_trace.h index 8d669101053..dadc5cac5e7 100644 --- a/libstdc++-v3/include/profile/impl/profiler_trace.h +++ b/libstdc++-v3/include/profile/impl/profiler_trace.h @@ -12,7 +12,11 @@ // 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 // . diff --git a/libstdc++-v3/include/profile/impl/profiler_vector_size.h b/libstdc++-v3/include/profile/impl/profiler_vector_size.h index f2c230c3284..604984577e4 100644 --- a/libstdc++-v3/include/profile/impl/profiler_vector_size.h +++ b/libstdc++-v3/include/profile/impl/profiler_vector_size.h @@ -12,7 +12,11 @@ // 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 // . 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 ba5f7af3959..7387ab6145d 100644 --- a/libstdc++-v3/include/profile/impl/profiler_vector_to_list.h +++ b/libstdc++-v3/include/profile/impl/profiler_vector_to_list.h @@ -12,7 +12,11 @@ // 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 // . diff --git a/libstdc++-v3/include/profile/map b/libstdc++-v3/include/profile/map index e221814b5e3..7806b992b59 100644 --- a/libstdc++-v3/include/profile/map +++ b/libstdc++-v3/include/profile/map @@ -12,7 +12,11 @@ // 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 // . diff --git a/libstdc++-v3/include/profile/map.h b/libstdc++-v3/include/profile/map.h index 8667fc0e8c9..688d8f2f225 100644 --- a/libstdc++-v3/include/profile/map.h +++ b/libstdc++-v3/include/profile/map.h @@ -12,7 +12,11 @@ // 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 // . diff --git a/libstdc++-v3/include/profile/set b/libstdc++-v3/include/profile/set index affc0b0e086..55ffe74dee5 100644 --- a/libstdc++-v3/include/profile/set +++ b/libstdc++-v3/include/profile/set @@ -12,7 +12,11 @@ // 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 // . diff --git a/libstdc++-v3/include/profile/unordered_map b/libstdc++-v3/include/profile/unordered_map index 18497e1ad85..6a275de0302 100644 --- a/libstdc++-v3/include/profile/unordered_map +++ b/libstdc++-v3/include/profile/unordered_map @@ -12,7 +12,11 @@ // 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 // . diff --git a/libstdc++-v3/include/profile/unordered_set b/libstdc++-v3/include/profile/unordered_set index 82f24feff7c..34afeb7762d 100644 --- a/libstdc++-v3/include/profile/unordered_set +++ b/libstdc++-v3/include/profile/unordered_set @@ -12,7 +12,11 @@ // 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 // . diff --git a/libstdc++-v3/include/profile/vector b/libstdc++-v3/include/profile/vector index 8908dbef53c..554d42e7223 100644 --- a/libstdc++-v3/include/profile/vector +++ b/libstdc++-v3/include/profile/vector @@ -12,7 +12,11 @@ // 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 // . -- cgit v1.2.3 From bbe304ac0467714e2f44389f7fae4af91bee05be Mon Sep 17 00:00:00 2001 From: Richard Earnshaw Date: Tue, 21 Feb 2012 23:46:05 +0000 Subject: 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. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184452 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 8 ++++++++ gcc/config/arm/thumb2.md | 7 ++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cb428cef00d..1e4f1591bf2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2012-02-21 Richard Earnshaw + + 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 Andreas Krebbel * config/s390/s390.md ("fixuns_truncsi2"): Replace diff --git a/gcc/config/arm/thumb2.md b/gcc/config/arm/thumb2.md index 6416d187f0b..1b2fb2d44a1 100644 --- a/gcc/config/arm/thumb2.md +++ b/gcc/config/arm/thumb2.md @@ -684,6 +684,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 @@ -696,10 +697,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) -- cgit v1.2.3 From f2d8d730faf606e12e262de704f6738f02cf44f6 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Wed, 22 Feb 2012 00:18:31 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184457 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 26d732e9b48..76109fbd651 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120221 +20120222 -- cgit v1.2.3 From 10fed8077838756bfc5c2114fa7e61995ef33c93 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Wed, 22 Feb 2012 17:38:22 +0000 Subject: * lib/target-supports.exp (check_effective_target_vect_condition): Return true for NEON. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184486 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/lib/target-supports.exp | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7789e2542da..6c2bd8cdba4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-02-22 Ulrich Weigand + + * lib/target-supports.exp (check_effective_target_vect_condition): + Return true for NEON. + 2012-02-21 Kai Tietz * gcc.dg/bf-ms-layout-3.c: Mark char typed bitfield diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 1b64cb6cd9a..788a51205b8 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -3050,7 +3050,8 @@ proc check_effective_target_vect_condition { } { || [istarget ia64-*-*] || [istarget i?86-*-*] || [istarget spu-*-*] - || [istarget x86_64-*-*] } { + || [istarget x86_64-*-*] + || ([istarget arm*-*-*] && [check_effective_target_arm_neon_ok]) } { set et_vect_cond_saved 1 } } -- cgit v1.2.3 From 462f08fc2e43bc5c88b2da90d9ef05194fa6af94 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Wed, 22 Feb 2012 19:17:42 +0000 Subject: PR target/52330 * config/i386/i386.c (ix86_print_operand) : Error out if x is not offsettable memory reference. testsuite/ChangeLog: PR target/52330 * gcc.target/i386/pr52330.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184489 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 9 ++++++++- gcc/config/i386/i386.c | 7 +++++++ gcc/testsuite/ChangeLog | 8 ++++++-- gcc/testsuite/gcc.target/i386/pr52330.c | 7 +++++++ 4 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr52330.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1e4f1591bf2..602ce015621 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-02-22 Uros Bizjak + + PR target/52330 + * config/i386/i386.c (ix86_print_operand) : Error out if x + is not offsettable memory reference. + 2012-02-21 Richard Earnshaw PR target/52294 @@ -3684,7 +3690,8 @@ PR lto/47497 * lto-symtab.c (lto_cgraph_replace_node): Do not set thunk.alias. (lto_symtab_merge_cgraph_nodes_1): Update thunk.alias pointers here. - * cgraph.h (cgraph_same_body_alias, cgraph_add_thunk): Add node pointers. + * cgraph.h (cgraph_same_body_alias, cgraph_add_thunk): Add node + pointers. * cgraph.c (cgraph_same_body_alias_1, cgraph_same_body_alias, cgraph_add_thunk): Add node pointers. * lto-cgraph.c (lto_output_node): Verify that thunks&aliases are diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 6aa029709c9..2ee8df99bde 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -14250,6 +14250,13 @@ ix86_print_operand (FILE *file, rtx x, int code) return; case 'H': + if (!offsettable_memref_p (x)) + { + output_operand_lossage ("operand is not an offsettable memory " + "reference, invalid operand " + "code 'H'"); + return; + } /* It doesn't actually matter what mode we use here, as we're only going to use this for printing. */ x = adjust_address_nv (x, DImode, 8); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6c2bd8cdba4..0771b6ebda3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-02-22 Uros Bizjak + + PR target/52330 + * gcc.target/i386/pr52330.c: New test. + 2012-02-22 Ulrich Weigand * lib/target-supports.exp (check_effective_target_vect_condition): @@ -5,8 +10,7 @@ 2012-02-21 Kai Tietz - * gcc.dg/bf-ms-layout-3.c: Mark char typed bitfield - as extension. + * gcc.dg/bf-ms-layout-3.c: Mark char typed bitfield as extension. 2012-02-20 Kai Tietz diff --git a/gcc/testsuite/gcc.target/i386/pr52330.c b/gcc/testsuite/gcc.target/i386/pr52330.c new file mode 100644 index 00000000000..22ba0b21aed --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr52330.c @@ -0,0 +1,7 @@ +/* { dg-do compile } */ +/* { dg-options "-O0" } */ + +void foo (int a) +{ + asm volatile ("# %H0" : : "r" (a)); /* { dg-error "not an offsettable" } */ +} -- cgit v1.2.3 From d9501b0c636494bb13fbf3e1fdbb39d114d8bbe0 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 23 Feb 2012 00:19:01 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184499 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 76109fbd651..3fb4dd2753c 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120222 +20120223 -- cgit v1.2.3 From f09c1f2a37f38bcbb5fe1048a0959b7e597a97f8 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Thu, 23 Feb 2012 17:38:13 +0000 Subject: PR c/52290 * c-decl.c (start_function): Exit early if decl1 is not FUNTION_DECL. testsuite/ChangeLog: PR c/52290 * gcc.dg/noncompile/pr52290.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184514 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/c-decl.c | 3 ++- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/noncompile/pr52290.c | 3 +++ 4 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.dg/noncompile/pr52290.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 602ce015621..4249303877b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-02-23 Uros Bizjak + + PR c/52290 + * c-decl.c (start_function): Exit early if decl1 is not FUNTION_DECL. + 2012-02-22 Uros Bizjak PR target/52330 diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 6d633134329..44c0ec7728e 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -7594,7 +7594,8 @@ start_function (struct c_declspecs *declspecs, struct c_declarator *declarator, /* If the declarator is not suitable for a function definition, cause a syntax error. */ - if (decl1 == 0) + if (decl1 == 0 + || TREE_CODE (decl1) != FUNCTION_DECL) return 0; loc = DECL_SOURCE_LOCATION (decl1); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0771b6ebda3..300bcc3a957 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-02-23 Uros Bizjak + + PR c/52290 + * gcc.dg/noncompile/pr52290.c: New test. + 2012-02-22 Uros Bizjak PR target/52330 diff --git a/gcc/testsuite/gcc.dg/noncompile/pr52290.c b/gcc/testsuite/gcc.dg/noncompile/pr52290.c new file mode 100644 index 00000000000..275543cfca9 --- /dev/null +++ b/gcc/testsuite/gcc.dg/noncompile/pr52290.c @@ -0,0 +1,3 @@ +/* { dg-error "undeclared here" "" { target *-*-* } 3 } */ +/* { dg-error "expected" "" { target *-*-* } 3 } */ +int f()[j] -- cgit v1.2.3 From dc757ce3de682d0c40cd5f564d4eb45d460ddfc2 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 23 Feb 2012 18:20:19 +0000 Subject: Backported from trunk 2012-02-20 Georg-Johann Lay * gcc.c-torture/execute/pr52286.c: Fix FAIL on 16-bit int platforms. 2012-02-20 Jakub Jelinek 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. * gcc.c-torture/execute/pr52286.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184520 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 10 +++++ gcc/fold-const.c | 58 ++++++++++----------------- gcc/testsuite/ChangeLog | 12 ++++++ gcc/testsuite/gcc.c-torture/execute/pr52286.c | 20 +++++++++ 4 files changed, 63 insertions(+), 37 deletions(-) create mode 100644 gcc/testsuite/gcc.c-torture/execute/pr52286.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4249303877b..07576f3f969 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2012-02-23 Jakub Jelinek + + Backported from trunk + 2012-02-20 Jakub Jelinek + + 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-23 Uros Bizjak PR c/52290 diff --git a/gcc/fold-const.c b/gcc/fold-const.c index c6b5f5d8d0a..97b53f5ebf8 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -10617,66 +10617,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/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 300bcc3a957..e84218e10cf 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,15 @@ +2012-02-23 Jakub Jelinek + + Backported from trunk + 2012-02-20 Georg-Johann Lay + + * gcc.c-torture/execute/pr52286.c: Fix FAIL on 16-bit int platforms. + + 2012-02-20 Jakub Jelinek + + PR tree-optimization/52286 + * gcc.c-torture/execute/pr52286.c: New test. + 2012-02-23 Uros Bizjak PR c/52290 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; +} -- cgit v1.2.3 From cb37eae7925805d0612226cbde6255836d23d73e Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Thu, 23 Feb 2012 22:53:54 +0000 Subject: 2012-02-23 Tobias Burnus PR fortran/52335 * io.c (gfc_match_open): Remove bogus F2003 DELIM= check. 2012-02-23 Tobias Burnus PR fortran/52335 * gfortran.dg/io_constraints_10.f90: New. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184534 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 5 +++++ gcc/fortran/io.c | 4 ---- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/io_constraints_10.f90 | 16 ++++++++++++++++ 4 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/io_constraints_10.f90 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 91be73403b3..fc0237dd51e 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2012-02-23 Tobias Burnus + + PR fortran/52335 + * io.c (gfc_match_open): Remove bogus F2003 DELIM= check. + 2012-02-09 Jakub Jelinek Backported from mainline diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c index 3ce7e816b9a..b0f3ebe4ad7 100644 --- a/gcc/fortran/io.c +++ b/gcc/fortran/io.c @@ -1938,10 +1938,6 @@ gfc_match_open (void) /* Checks on the DELIM specifier. */ if (open->delim) { - if (gfc_notify_std (GFC_STD_F2003, "Fortran 2003: DELIM= at %C " - "not allowed in Fortran 95") == FAILURE) - goto cleanup; - if (open->delim->expr_type == EXPR_CONSTANT) { static const char *delim[] = { "APOSTROPHE", "QUOTE", "NONE", NULL }; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e84218e10cf..80bfd16e477 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-02-23 Tobias Burnus + + PR fortran/52335 + * gfortran.dg/io_constraints_10.f90: New. + 2012-02-23 Jakub Jelinek Backported from trunk diff --git a/gcc/testsuite/gfortran.dg/io_constraints_10.f90 b/gcc/testsuite/gfortran.dg/io_constraints_10.f90 new file mode 100644 index 00000000000..bb756aa2bc8 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/io_constraints_10.f90 @@ -0,0 +1,16 @@ +! { dg-do compile } +! { dg-options "-std=f95" } +! +! PR fortran/52335 +! + +integer :: lun +character(len=20) :: str + +! VALID Fortran 95: +open(unit=lun,file=str,delim='apostrophe',status='old') +inquire(lun, delim=str) + +! Fortran 2003: +write(*,*, delim='apostrophe') 'a' ! { dg-error "Fortran 2003: DELIM= at .1. not allowed in Fortran 95" } +end -- cgit v1.2.3 From 8848ebd5a34a8288771b6fa4049e09647b637b72 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Fri, 24 Feb 2012 00:18:12 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184539 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 3fb4dd2753c..98ba542973c 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120223 +20120224 -- cgit v1.2.3 From ee4691ab2876b9c4857f0acd73d9f70a793eeb05 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sat, 25 Feb 2012 00:17:44 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184567 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 98ba542973c..d540aa43340 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120224 +20120225 -- cgit v1.2.3 From 0bda5a70827cc10abe9de1e194418d788d845400 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sun, 26 Feb 2012 00:18:27 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184580 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index d540aa43340..d51b4996a53 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120225 +20120226 -- cgit v1.2.3 From a82761b1b201224e3835a3b8f7344c9517f36051 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Mon, 27 Feb 2012 00:19:56 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184588 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index d51b4996a53..a8976399847 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120226 +20120227 -- cgit v1.2.3 From 9feeda3340a44251037966bdd6b110f27d83ad85 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Mon, 27 Feb 2012 11:19:03 +0000 Subject: Revert: 2012-02-02 Uros Bizjak Backport from mainline: 2011-11-18 Uros Bizjak PR tree-optimization/51118 * fold-const.c (fold_checksum_tree): Check for TS_TYPED structure before using TREE_TYPE accessor on expr. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184595 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 12 ++++++++++++ gcc/fold-const.c | 3 +-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 07576f3f969..c602117458e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2012-02-27 Uros Bizjak + + Revert: + 2012-02-02 Uros Bizjak + + Backport from mainline: + 2011-11-18 Uros Bizjak + + PR tree-optimization/51118 + * fold-const.c (fold_checksum_tree): Check for TS_TYPED structure + before using TREE_TYPE accessor on expr. + 2012-02-23 Jakub Jelinek Backported from trunk diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 97b53f5ebf8..4bf10de8af8 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -13768,8 +13768,7 @@ recursive_label: } } md5_process_bytes (expr, tree_size (expr), ctx); - if (CODE_CONTAINS_STRUCT (code, TS_TYPED)) - fold_checksum_tree (TREE_TYPE (expr), ctx, ht); + fold_checksum_tree (TREE_TYPE (expr), ctx, ht); if (TREE_CODE_CLASS (code) != tcc_type && TREE_CODE_CLASS (code) != tcc_declaration && code != TREE_LIST -- cgit v1.2.3 From 7332aaca5b4fc0591a4fefd7d96d7d2391031ec7 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Tue, 28 Feb 2012 00:19:09 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184612 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index a8976399847..b208721be37 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120227 +20120228 -- cgit v1.2.3 From 5af623dafd94c7492ec5c6e05c34fddcc84a24f3 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Wed, 29 Feb 2012 00:17:36 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184648 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index b208721be37..ce3c66201a0 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120228 +20120229 -- cgit v1.2.3 From 146bd1822175afbec750d3af3759fb6bebd89df4 Mon Sep 17 00:00:00 2001 From: Paul Thomas Date: Wed, 29 Feb 2012 21:24:05 +0000 Subject: 2012-02-29 Paul Thomas PR fortran/52386 * trans-expr.c (fcncall_realloc_result): Dereference the descriptor if needed. 2012-02-29 Paul Thomas PR fortran/52386 * gfortran.dg/realloc_on_assign_13.f90 : New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184673 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/trans-expr.c | 2 ++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/realloc_on_assign_13.f90 | 20 ++++++++++++++++++++ 4 files changed, 33 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/realloc_on_assign_13.f90 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index fc0237dd51e..0e6d6139d2c 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2012-02-29 Paul Thomas + + PR fortran/52386 + * trans-expr.c (fcncall_realloc_result): Dereference the + descriptor if needed. + 2012-02-23 Tobias Burnus PR fortran/52335 diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 3db1244bf25..d86de0058bb 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -5556,6 +5556,8 @@ fcncall_realloc_result (gfc_se *se, int rank) /* Use the allocation done by the library. Substitute the lhs descriptor with a copy, whose data field is nulled.*/ desc = build_fold_indirect_ref_loc (input_location, se->expr); + if (POINTER_TYPE_P (TREE_TYPE (desc))) + desc = build_fold_indirect_ref_loc (input_location, desc); /* Unallocated, the descriptor does not have a dtype. */ tmp = gfc_conv_descriptor_dtype (desc); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 80bfd16e477..352e7356b01 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-02-29 Paul Thomas + + PR fortran/52386 + * gfortran.dg/realloc_on_assign_13.f90 : New test. + 2012-02-23 Tobias Burnus PR fortran/52335 diff --git a/gcc/testsuite/gfortran.dg/realloc_on_assign_13.f90 b/gcc/testsuite/gfortran.dg/realloc_on_assign_13.f90 new file mode 100644 index 00000000000..9661d724f5b --- /dev/null +++ b/gcc/testsuite/gfortran.dg/realloc_on_assign_13.f90 @@ -0,0 +1,20 @@ +! { dg-do compile } +! Test the fix for PR52386. +! +! Contributed by Juergen Reuter +! +module cascades + implicit none + private +contains + function reduced (array) + integer, dimension(:), allocatable :: reduced + integer, dimension(:), intent(in) :: array + logical, dimension(size(array)) :: mask + mask = .true. + allocate (reduced (count (mask))) + reduced = pack (array, mask) + end function reduced +end module cascades +! { dg-final { cleanup-modules "cascades" } } + -- cgit v1.2.3 From 3481b1d621c1c22f15c8e8a77ae4a8a0ffe774c5 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 00:17:53 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184679 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index ce3c66201a0..a050062ba78 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120229 +20120301 -- cgit v1.2.3 From e9f295556d940899641cd8c43a7b45cdcafd669e Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:52:33 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184693 138bc75d-0d04-0410-961f-82ee72b054a4 --- libada/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libada/ChangeLog b/libada/ChangeLog index ce786fa7ae0..3ac329b20b6 100644 --- a/libada/ChangeLog +++ b/libada/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-11-13 Iain Sandoe Backport from mainline r181319 -- cgit v1.2.3 From 4f188ec0d2c1c2c4a81b147d73d6c4acd16a8339 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:52:38 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184694 138bc75d-0d04-0410-961f-82ee72b054a4 --- config/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/ChangeLog b/config/ChangeLog index 3c92ff460a3..8a9e81d5a83 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-12-18 Eric Botcazou * acx.m4 (Test for GNAT): Update comment and add quotes in final test. -- cgit v1.2.3 From 819dde7d017e649f4b96f1e088e9d4b880b07c30 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:52:42 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184695 138bc75d-0d04-0410-961f-82ee72b054a4 --- intl/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/intl/ChangeLog b/intl/ChangeLog index b0ee1ed822b..27625baa1b5 100644 --- a/intl/ChangeLog +++ b/intl/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-10-26 Release Manager * GCC 4.6.2 released. -- cgit v1.2.3 From cf9441c31117851d9294db4444ea0a874953cd51 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:52:47 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184696 138bc75d-0d04-0410-961f-82ee72b054a4 --- libffi/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libffi/ChangeLog b/libffi/ChangeLog index da3a19793dd..456f7ec6cd4 100644 --- a/libffi/ChangeLog +++ b/libffi/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2012-02-10 Kai Tietz * configure.ac (AM_LTLDFLAGS): Add -no-undefine for x64 -- cgit v1.2.3 From 251824fd105ae5011375d5461e7f93c3e328b62d Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:52:52 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184697 138bc75d-0d04-0410-961f-82ee72b054a4 --- fixincludes/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index e1242194b8f..541c767191d 100644 --- a/fixincludes/ChangeLog +++ b/fixincludes/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-10-26 Release Manager * GCC 4.6.2 released. -- cgit v1.2.3 From 4f4e25966206fc5b307ccad42c32789dc47c963a Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:52:57 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184698 138bc75d-0d04-0410-961f-82ee72b054a4 --- lto-plugin/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lto-plugin/ChangeLog b/lto-plugin/ChangeLog index b19f0837e0c..86e26d88ba8 100644 --- a/lto-plugin/ChangeLog +++ b/lto-plugin/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2012-01-03 Richard Guenther Backport from mainline -- cgit v1.2.3 From e1587a5ddce25edbee5d3f8bb2bde324b0f256b1 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:53:01 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184699 138bc75d-0d04-0410-961f-82ee72b054a4 --- libquadmath/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libquadmath/ChangeLog b/libquadmath/ChangeLog index 0a38e90ab6f..0e47ee53b88 100644 --- a/libquadmath/ChangeLog +++ b/libquadmath/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-11-20 Andreas Tobler * configure: Regenerate. -- cgit v1.2.3 From fc717627ff0478da2b3f3c952fdeede6ec6945d8 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:53:05 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184700 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 3a08d210ae5..8ee19da556f 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2012-02-03 Kai Tietz PR libjava/48512 -- cgit v1.2.3 From 0ef00589a4b00a11363ac8c7634c7dbb70d715be Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:53:10 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184701 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/classpath/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libjava/classpath/ChangeLog b/libjava/classpath/ChangeLog index 7b6d2705556..4b34fc874c9 100644 --- a/libjava/classpath/ChangeLog +++ b/libjava/classpath/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-10-26 Release Manager * GCC 4.6.2 released. -- cgit v1.2.3 From ef9b679f06e591c46ba119c1b7bc75ad1eba5577 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:53:15 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184702 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/libltdl/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libjava/libltdl/ChangeLog b/libjava/libltdl/ChangeLog index f2a91dbbaf1..bbbe2e7b79f 100644 --- a/libjava/libltdl/ChangeLog +++ b/libjava/libltdl/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-11-20 Andreas Tobler * acinclude.m4: Additional FreeBSD 10 fixes. -- cgit v1.2.3 From 31910604a1642fe089dffca30540ab6538197d7f Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:53:21 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184703 138bc75d-0d04-0410-961f-82ee72b054a4 --- zlib/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zlib/ChangeLog b/zlib/ChangeLog index dd62cbfe630..8b3127c31b6 100644 --- a/zlib/ChangeLog +++ b/zlib/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-11-20 Andreas Tobler * configure: Regenerate. -- cgit v1.2.3 From d50ab42fac48534d823d9d43c83607fbc781ecae Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:53:26 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184704 138bc75d-0d04-0410-961f-82ee72b054a4 --- maintainer-scripts/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/maintainer-scripts/ChangeLog b/maintainer-scripts/ChangeLog index f570ceaae30..d65cfb4dc8d 100644 --- a/maintainer-scripts/ChangeLog +++ b/maintainer-scripts/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-11-23 Gerald Pfeifer * update_web_docs_svn: Make $DOCSDIR group writable after -- cgit v1.2.3 From 9f79c5afe0aef94c106ea6ca236fb6f5e4d13903 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:53:31 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184705 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgcc/config/libbid/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libgcc/config/libbid/ChangeLog b/libgcc/config/libbid/ChangeLog index 5c1f7845ec2..ecd0ba24d80 100644 --- a/libgcc/config/libbid/ChangeLog +++ b/libgcc/config/libbid/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-10-26 Release Manager * GCC 4.6.2 released. -- cgit v1.2.3 From 506682a88ae5ea53f1d8cb2e841995b75683cc56 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:53:35 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184706 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgcc/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index c5b1d1cd651..1314669099a 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-12-15 H.J. Lu Backport from mainline -- cgit v1.2.3 From d501dca94410e48c8fe2d542007ab97b6daed748 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:53:40 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184707 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgfortran/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index a3bfb5374ad..31e5895f410 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-11-20 Andreas Tobler * configure: Regenerate. -- cgit v1.2.3 From 4f72b7e917359fb27d62ebcb1438d814533e138b Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:53:44 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184708 138bc75d-0d04-0410-961f-82ee72b054a4 --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ChangeLog b/ChangeLog index 249743aadfc..e8393a7b13a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2012-01-02 Richard Guenther PR bootstrap/51686 -- cgit v1.2.3 From 93c5af53a81162bba0c5234b34ce1768a8c9525e Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:53:49 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184709 138bc75d-0d04-0410-961f-82ee72b054a4 --- libssp/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libssp/ChangeLog b/libssp/ChangeLog index a49e2c95186..b391337ed13 100644 --- a/libssp/ChangeLog +++ b/libssp/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-11-20 Andreas Tobler * configure: Regenerate. -- cgit v1.2.3 From e8983a1a2ad8f8deb814c5aa0a3bd861e2aee21e Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:53:53 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184710 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgomp/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 4e681b7e273..38c08ceffbb 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2012-02-15 Richard Guenther Backport from mainline -- cgit v1.2.3 From e45b1010b88e44533a765df55c9f8a0b6275e3ef Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:53:58 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184711 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 98af118e45b..4c91348bb74 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2012-02-21 Paolo Carlini PR libstdc++/52317 (cont) -- cgit v1.2.3 From dfc9a81c1d10b99604532649aa5e909e0689c42b Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:54:03 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184712 138bc75d-0d04-0410-961f-82ee72b054a4 --- libmudflap/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libmudflap/ChangeLog b/libmudflap/ChangeLog index 5f1d24df231..e15e13dc2ac 100644 --- a/libmudflap/ChangeLog +++ b/libmudflap/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2012-02-09 Jakub Jelinek Backported from mainline -- cgit v1.2.3 From b9f518b641aecb5496b4eb47bc9c22facf6523da Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:54:07 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184713 138bc75d-0d04-0410-961f-82ee72b054a4 --- libcpp/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index eb10d631bfd..be3ff7cc2da 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-10-26 Release Manager * GCC 4.6.2 released. -- cgit v1.2.3 From 3486651a62df4abb86e9aef27ce4972eab2969c5 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:54:11 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184714 138bc75d-0d04-0410-961f-82ee72b054a4 --- libcpp/po/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libcpp/po/ChangeLog b/libcpp/po/ChangeLog index ef4fc5d94b9..2e2d28a2384 100644 --- a/libcpp/po/ChangeLog +++ b/libcpp/po/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-10-26 Release Manager * GCC 4.6.2 released. -- cgit v1.2.3 From 7786920a5bddc7484fea02db0835f1dbbc2d4d27 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:54:16 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184715 138bc75d-0d04-0410-961f-82ee72b054a4 --- libobjc/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libobjc/ChangeLog b/libobjc/ChangeLog index 381b97cc0c4..f1d361da169 100644 --- a/libobjc/ChangeLog +++ b/libobjc/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-11-20 Andreas Tobler * configure: Regenerate. -- cgit v1.2.3 From 57db876c9b599f7315070be42cdb565b753c9d16 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:54:20 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184716 138bc75d-0d04-0410-961f-82ee72b054a4 --- libdecnumber/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libdecnumber/ChangeLog b/libdecnumber/ChangeLog index ca47111449c..4da95c37ed2 100644 --- a/libdecnumber/ChangeLog +++ b/libdecnumber/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-10-26 Release Manager * GCC 4.6.2 released. -- cgit v1.2.3 From 9d7b4046a1a096fe304cca890fc1931975816404 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:54:25 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184717 138bc75d-0d04-0410-961f-82ee72b054a4 --- boehm-gc/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog index 2115f1c1ad3..397f0875d08 100644 --- a/boehm-gc/ChangeLog +++ b/boehm-gc/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2012-02-10 Kai Tietz PR boehm-gc/48514 -- cgit v1.2.3 From 9e9e155592d65db17d60ebdc7a6a4aab3a48a7ae Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:54:30 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184718 138bc75d-0d04-0410-961f-82ee72b054a4 --- libiberty/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index f797ce9471f..ba3983124fc 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2012-02-09 Jakub Jelinek Backported from mainline -- cgit v1.2.3 From d9a329ca9d80d62ea3270f66a22eb5897310c812 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:54:35 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184719 138bc75d-0d04-0410-961f-82ee72b054a4 --- include/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/ChangeLog b/include/ChangeLog index d4ebbb52759..3c1d408c13e 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-10-26 Release Manager * GCC 4.6.2 released. -- cgit v1.2.3 From b7d11b65acecbadb20e683d6e7bf7b4c72dd595e Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:54:40 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184720 138bc75d-0d04-0410-961f-82ee72b054a4 --- gnattools/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gnattools/ChangeLog b/gnattools/ChangeLog index e28b225f13d..4a42d5442a2 100644 --- a/gnattools/ChangeLog +++ b/gnattools/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-10-26 Release Manager * GCC 4.6.2 released. -- cgit v1.2.3 From ffdd91c4fb51c90b39d5257a3c20242a8cab69e5 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:54:44 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184721 138bc75d-0d04-0410-961f-82ee72b054a4 --- contrib/reghunt/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/reghunt/ChangeLog b/contrib/reghunt/ChangeLog index 9e84bfdb2ce..c972516b10e 100644 --- a/contrib/reghunt/ChangeLog +++ b/contrib/reghunt/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-10-26 Release Manager * GCC 4.6.2 released. -- cgit v1.2.3 From b267e033f30017f91db63fa2a02b7c40c2df9592 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:54:49 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184722 138bc75d-0d04-0410-961f-82ee72b054a4 --- contrib/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/ChangeLog b/contrib/ChangeLog index 2e5f30837c2..687461c1ca5 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-10-26 Release Manager * GCC 4.6.2 released. -- cgit v1.2.3 From 53abcb96c38770b82c85184e91f88874b23220ae Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:54:54 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184723 138bc75d-0d04-0410-961f-82ee72b054a4 --- contrib/regression/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/regression/ChangeLog b/contrib/regression/ChangeLog index 47a3b4a7cd6..9fba4926e63 100644 --- a/contrib/regression/ChangeLog +++ b/contrib/regression/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-10-26 Release Manager * GCC 4.6.2 released. -- cgit v1.2.3 From 11305dff6957c60a5755d263016c435c1f9fe806 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:54:58 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184724 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/go/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog index cf71aa1da84..db2416f9020 100644 --- a/gcc/go/ChangeLog +++ b/gcc/go/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-10-26 Release Manager * GCC 4.6.2 released. -- cgit v1.2.3 From 286d8ff1b2f6cb7035e86b7f5d87a07bb4b58243 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:55:03 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184725 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 0e6d6139d2c..cbb253654fb 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2012-02-29 Paul Thomas PR fortran/52386 -- cgit v1.2.3 From 2e071fb79120db9ca9fbb9171fd84163e7fae864 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:55:07 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184726 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c87567ef7f8..a365738c35c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2012-02-14 Jakub Jelinek Backported from mainline -- cgit v1.2.3 From c565c5074bfa584d10fb1177f76dbefdfa0ea204 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:55:12 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184727 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c602117458e..6abfe0144bf 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2012-02-27 Uros Bizjak Revert: -- cgit v1.2.3 From 109beee1f38ca52cf3b63105ac2ee24cfb0266b8 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:55:18 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184728 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 75423a947fb..97e66d8e7e9 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2012-01-23 Andreas Schwab * lang.c (java_init_options_struct): Set -- cgit v1.2.3 From b32edc38a868210f98634c18b20466736d06abc7 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:55:24 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184729 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/lto/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 4f50139c87e..cd87ddfde3d 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-12-13 Eric Botcazou * lto.h (lto_parse_hex): Delete. -- cgit v1.2.3 From 6e1b1f8fff2b5aa125ea2cd06ef21a0c96fe0bc1 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:55:29 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184730 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index ebdc61ddaf8..f3c535fd1ba 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2012-01-21 Eric Botcazou PR ada/46192 -- cgit v1.2.3 From 803b1146364335b7f47db98b898f9c5bc55f8c3b Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:55:35 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184731 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 352e7356b01..db7cd8b3941 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2012-02-29 Paul Thomas PR fortran/52386 -- cgit v1.2.3 From bcc6d59e45439ab38e8dbfa1984364c513cf8b0d Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:55:40 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184732 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog b/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog index c6781e2a6f2..e284d735c5f 100644 --- a/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog +++ b/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-10-26 Release Manager * GCC 4.6.2 released. -- cgit v1.2.3 From b8ae99c991917830be238b4e0da271b643404122 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:55:46 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184733 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/objc/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog index 5b6783e94b9..ebb0d4a3ff3 100644 --- a/gcc/objc/ChangeLog +++ b/gcc/objc/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-11-12 Iain Sandoe Backport from mainline -- cgit v1.2.3 From 52fea4b89eabb680d3ac4b03d8d2bb1ca27e21ad Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:55:51 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184734 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/c-family/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index cb1d017caed..63952c2fe3c 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-11-04 Eric Botcazou PR c++/50608 -- cgit v1.2.3 From ecfb16e69e67d1f6c75b03689db3735ea47ad816 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:55:56 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184735 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/po/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/po/ChangeLog b/gcc/po/ChangeLog index 942cd2e62c2..a2a580c4815 100644 --- a/gcc/po/ChangeLog +++ b/gcc/po/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-10-30 Joseph Myers * ja.po: Update. -- cgit v1.2.3 From 3f71f5651f73a6c15f36af2e567ea5b37bbd5637 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:56:00 +0000 Subject: Mark ChangeLog git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184736 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/objcp/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/objcp/ChangeLog b/gcc/objcp/ChangeLog index ba2225357e6..4075e050760 100644 --- a/gcc/objcp/ChangeLog +++ b/gcc/objcp/ChangeLog @@ -1,3 +1,7 @@ +2012-03-01 Release Manager + + * GCC 4.6.3 released. + 2011-10-26 Release Manager * GCC 4.6.2 released. -- cgit v1.2.3 From fd5f0422c87faea41e83ff4e28d94350e80c4b25 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 1 Mar 2012 11:56:05 +0000 Subject: Mark as release git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184737 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DEV-PHASE | 1 - 1 file changed, 1 deletion(-) diff --git a/gcc/DEV-PHASE b/gcc/DEV-PHASE index 373fbc60bb9..e69de29bb2d 100644 --- a/gcc/DEV-PHASE +++ b/gcc/DEV-PHASE @@ -1 +0,0 @@ -prerelease -- cgit v1.2.3 From 2f08881711f928fd252d5925df6df24829b73b0b Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 1 Mar 2012 14:25:24 +0000 Subject: * BASE-VER: Set to 4.6.4. * DEV-PHASE: Set to prerelease. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184744 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/BASE-VER | 2 +- gcc/ChangeLog | 5 +++++ gcc/DEV-PHASE | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/BASE-VER b/gcc/BASE-VER index 83da99bc618..ef36c9a71d5 100644 --- a/gcc/BASE-VER +++ b/gcc/BASE-VER @@ -1 +1 @@ -4.6.3 +4.6.4 diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6abfe0144bf..4828be18f2f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-03-01 Jakub Jelinek + + * BASE-VER: Set to 4.6.4. + * DEV-PHASE: Set to prerelease. + 2012-03-01 Release Manager * GCC 4.6.3 released. diff --git a/gcc/DEV-PHASE b/gcc/DEV-PHASE index e69de29bb2d..373fbc60bb9 100644 --- a/gcc/DEV-PHASE +++ b/gcc/DEV-PHASE @@ -0,0 +1 @@ +prerelease -- cgit v1.2.3 From d533f32bc267a4d411792bda2df41103e832e4a9 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Fri, 2 Mar 2012 00:18:20 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184769 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index a050062ba78..acf6a518aa4 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120301 +20120302 -- cgit v1.2.3 From 799a03735e2a9b4a1491a0c015874ffd07c29b60 Mon Sep 17 00:00:00 2001 From: Bill Schmidt Date: Fri, 2 Mar 2012 14:51:58 +0000 Subject: 2012-03-02 Bill Schmidt Ira Rosen PR tree-optimization/50031 PR tree-optimization/50969 * targhooks.c (default_builtin_vectorization_cost): Handle vec_promote_demote. * target.h (enum vect_cost_for_stmt): Add vec_promote_demote. * tree-vect-loop.c (vect_get_single_scalar_iteraion_cost): Handle all types of reduction and pattern statements. (vect_estimate_min_profitable_iters): Likewise. * tree-vect-stmts.c (vect_model_promotion_demotion_cost): New function. (vect_model_store_cost): Use vec_perm rather than vector_stmt for statement cost. (vect_model_load_cost): Likewise. (vect_get_load_cost): Likewise; add dump logic for explicit realigns. (vectorizable_type_demotion): Call vect_model_promotion_demotion_cost. (vectorizable_type_promotion): Likewise. * config/spu/spu.c (spu_builtin_vectorization_cost): Handle vec_promote_demote. * config/i386/i386.c (ix86_builtin_vectorization_cost): Likewise. * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Update vec_perm for VSX and handle vec_promote_demote. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184787 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 24 +++++++++++++++++++ gcc/config/i386/i386.c | 3 ++- gcc/config/rs6000/rs6000.c | 13 +++++++++- gcc/config/spu/spu.c | 1 + gcc/target.h | 3 ++- gcc/targhooks.c | 1 + gcc/tree-vect-loop.c | 13 ++++++++-- gcc/tree-vect-stmts.c | 60 +++++++++++++++++++++++++++++++++++++++++----- 8 files changed, 107 insertions(+), 11 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4828be18f2f..22a1359dd96 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,27 @@ +2012-03-02 Bill Schmidt + Ira Rosen + + PR tree-optimization/50031 + PR tree-optimization/50969 + * targhooks.c (default_builtin_vectorization_cost): Handle + vec_promote_demote. + * target.h (enum vect_cost_for_stmt): Add vec_promote_demote. + * tree-vect-loop.c (vect_get_single_scalar_iteraion_cost): Handle + all types of reduction and pattern statements. + (vect_estimate_min_profitable_iters): Likewise. + * tree-vect-stmts.c (vect_model_promotion_demotion_cost): New function. + (vect_model_store_cost): Use vec_perm rather than vector_stmt for + statement cost. + (vect_model_load_cost): Likewise. + (vect_get_load_cost): Likewise; add dump logic for explicit realigns. + (vectorizable_type_demotion): Call vect_model_promotion_demotion_cost. + (vectorizable_type_promotion): Likewise. + * config/spu/spu.c (spu_builtin_vectorization_cost): Handle + vec_promote_demote. + * config/i386/i386.c (ix86_builtin_vectorization_cost): Likewise. + * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Update + vec_perm for VSX and handle vec_promote_demote. + 2012-03-01 Jakub Jelinek * BASE-VER: Set to 4.6.4. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 2ee8df99bde..a58a8cac2a5 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -32823,7 +32823,8 @@ ix86_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost, return ix86_cost->cond_not_taken_branch_cost; case vec_perm: - return 1; + case vec_promote_demote: + return ix86_cost->vec_stmt_cost; default: gcc_unreachable (); diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 2f2f342e792..742ec237aae 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -3695,12 +3695,23 @@ rs6000_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost, case vec_to_scalar: case scalar_to_vec: case cond_branch_not_taken: - case vec_perm: return 1; case cond_branch_taken: return 3; + case vec_perm: + if (TARGET_VSX) + return 4; + else + return 1; + + case vec_promote_demote: + if (TARGET_VSX) + return 5; + else + return 1; + case unaligned_load: if (TARGET_VSX && TARGET_ALLOW_MOVMISALIGN) { diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c index 8901162a341..dffca84b040 100644 --- a/gcc/config/spu/spu.c +++ b/gcc/config/spu/spu.c @@ -6794,6 +6794,7 @@ spu_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost, case scalar_to_vec: case cond_branch_not_taken: case vec_perm: + case vec_promote_demote: return 1; case scalar_store: diff --git a/gcc/target.h b/gcc/target.h index eaf7aadd707..5ccd7fd67a3 100644 --- a/gcc/target.h +++ b/gcc/target.h @@ -128,7 +128,8 @@ enum vect_cost_for_stmt scalar_to_vec, cond_branch_not_taken, cond_branch_taken, - vec_perm + vec_perm, + vec_promote_demote }; /* Sets of optimization levels at which an option may be enabled by diff --git a/gcc/targhooks.c b/gcc/targhooks.c index 225831b9515..c1bd118179c 100644 --- a/gcc/targhooks.c +++ b/gcc/targhooks.c @@ -529,6 +529,7 @@ default_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost, case scalar_to_vec: case cond_branch_not_taken: case vec_perm: + case vec_promote_demote: return 1; case unaligned_load: diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 44c1ecddd1d..dd9aef4174f 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -2104,7 +2104,8 @@ vect_get_single_scalar_iteraion_cost (loop_vec_info loop_vinfo) if (stmt_info && !STMT_VINFO_RELEVANT_P (stmt_info) && (!STMT_VINFO_LIVE_P (stmt_info) - || STMT_VINFO_DEF_TYPE (stmt_info) != vect_reduction_def)) + || !VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_info))) + && !STMT_VINFO_IN_PATTERN_P (stmt_info)) continue; if (STMT_VINFO_DATA_REF (vinfo_for_stmt (stmt))) @@ -2251,11 +2252,19 @@ vect_estimate_min_profitable_iters (loop_vec_info loop_vinfo) { gimple stmt = gsi_stmt (si); stmt_vec_info stmt_info = vinfo_for_stmt (stmt); + + if (STMT_VINFO_IN_PATTERN_P (stmt_info)) + { + stmt = STMT_VINFO_RELATED_STMT (stmt_info); + stmt_info = vinfo_for_stmt (stmt); + } + /* Skip stmts that are not vectorized inside the loop. */ if (!STMT_VINFO_RELEVANT_P (stmt_info) && (!STMT_VINFO_LIVE_P (stmt_info) - || STMT_VINFO_DEF_TYPE (stmt_info) != vect_reduction_def)) + || !VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_info)))) continue; + vec_inside_cost += STMT_VINFO_INSIDE_OF_LOOP_COST (stmt_info) * factor; /* FIXME: for stmts in the inner-loop in outer-loop vectorization, some of the "outside" costs are generated inside the outer-loop. */ diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index b5ecd3f24ee..7a263785e9d 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -623,6 +623,46 @@ vect_model_simple_cost (stmt_vec_info stmt_info, int ncopies, } +/* Model cost for type demotion and promotion operations. PWR is normally + zero for single-step promotions and demotions. It will be one if + two-step promotion/demotion is required, and so on. Each additional + step doubles the number of instructions required. */ + +static void +vect_model_promotion_demotion_cost (stmt_vec_info stmt_info, + enum vect_def_type *dt, int pwr) +{ + int i, tmp; + int inside_cost = 0, outside_cost = 0, single_stmt_cost; + + /* The SLP costs were already calculated during SLP tree build. */ + if (PURE_SLP_STMT (stmt_info)) + return; + + single_stmt_cost = vect_get_stmt_cost (vec_promote_demote); + for (i = 0; i < pwr + 1; i++) + { + tmp = (STMT_VINFO_TYPE (stmt_info) == type_promotion_vec_info_type) ? + (i + 1) : i; + inside_cost += vect_pow2 (tmp) * single_stmt_cost; + } + + /* FORNOW: Assuming maximum 2 args per stmts. */ + for (i = 0; i < 2; i++) + { + if (dt[i] == vect_constant_def || dt[i] == vect_external_def) + outside_cost += vect_get_stmt_cost (vector_stmt); + } + + if (vect_print_dump_info (REPORT_COST)) + fprintf (vect_dump, "vect_model_promotion_demotion_cost: inside_cost = %d, " + "outside_cost = %d .", inside_cost, outside_cost); + + /* Set the costs in STMT_INFO. */ + stmt_vinfo_set_inside_of_loop_cost (stmt_info, NULL, inside_cost); + stmt_vinfo_set_outside_of_loop_cost (stmt_info, NULL, outside_cost); +} + /* Function vect_cost_strided_group_size For strided load or store, return the group_size only if it is the first @@ -691,7 +731,7 @@ vect_model_store_cost (stmt_vec_info stmt_info, int ncopies, { /* Uses a high and low interleave operation for each needed permute. */ inside_cost = ncopies * exact_log2(group_size) * group_size - * vect_get_stmt_cost (vector_stmt); + * vect_get_stmt_cost (vec_perm); if (vect_print_dump_info (REPORT_COST)) fprintf (vect_dump, "vect_model_store_cost: strided group_size = %d .", @@ -795,7 +835,7 @@ vect_model_load_cost (stmt_vec_info stmt_info, int ncopies, slp_tree slp_node) { /* Uses an even and odd extract operations for each needed permute. */ inside_cost = ncopies * exact_log2(group_size) * group_size - * vect_get_stmt_cost (vector_stmt); + * vect_get_stmt_cost (vec_perm); if (vect_print_dump_info (REPORT_COST)) fprintf (vect_dump, "vect_model_load_cost: strided group_size = %d .", @@ -855,7 +895,7 @@ vect_get_load_cost (struct data_reference *dr, int ncopies, case dr_explicit_realign: { *inside_cost += ncopies * (2 * vect_get_stmt_cost (vector_load) - + vect_get_stmt_cost (vector_stmt)); + + vect_get_stmt_cost (vec_perm)); /* FIXME: If the misalignment remains fixed across the iterations of the containing loop, the following cost should be added to the @@ -863,6 +903,9 @@ vect_get_load_cost (struct data_reference *dr, int ncopies, if (targetm.vectorize.builtin_mask_for_load) *inside_cost += vect_get_stmt_cost (vector_stmt); + if (vect_print_dump_info (REPORT_COST)) + fprintf (vect_dump, "vect_model_load_cost: explicit realign"); + break; } case dr_explicit_realign_optimized: @@ -886,7 +929,12 @@ vect_get_load_cost (struct data_reference *dr, int ncopies, } *inside_cost += ncopies * (vect_get_stmt_cost (vector_load) - + vect_get_stmt_cost (vector_stmt)); + + vect_get_stmt_cost (vec_perm)); + + if (vect_print_dump_info (REPORT_COST)) + fprintf (vect_dump, + "vect_model_load_cost: explicit realign optimized"); + break; } @@ -2919,7 +2967,7 @@ vectorizable_type_demotion (gimple stmt, gimple_stmt_iterator *gsi, STMT_VINFO_TYPE (stmt_info) = type_demotion_vec_info_type; if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "=== vectorizable_demotion ==="); - vect_model_simple_cost (stmt_info, ncopies, dt, NULL); + vect_model_promotion_demotion_cost (stmt_info, dt, multi_step_cvt); return true; } @@ -3217,7 +3265,7 @@ vectorizable_type_promotion (gimple stmt, gimple_stmt_iterator *gsi, STMT_VINFO_TYPE (stmt_info) = type_promotion_vec_info_type; if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "=== vectorizable_promotion ==="); - vect_model_simple_cost (stmt_info, 2*ncopies, dt, NULL); + vect_model_promotion_demotion_cost (stmt_info, dt, multi_step_cvt); return true; } -- cgit v1.2.3 From 89adbe97aec2c4a5e2944973d1a343ce0ffb58d1 Mon Sep 17 00:00:00 2001 From: Mike Stump Date: Fri, 2 Mar 2012 18:21:41 +0000 Subject: 2012-03-02 Jack Howarth Backport from mainline 2012-02-23 Patrick Marlier Jack Howarth PR boehm-gc/52179 * include/gc_config.h.in: Undefine HAVE_PTHREAD_GET_STACKADDR_NP. * include/private/gcconfig.h (DARWIN): Define STACKBOTTOM with pthread_get_stackaddr_np when available. * configure.ac (THREADS): Check availability of pthread_get_stackaddr_np. * configure: Regenerate. 2012-03-02 Jack Howarth Backport from mainline 2012-02-23 Patrick Marlier Jack Howarth PR target/49461 * configure.ac (SYSTEMSPEC): No longer pass -no_pie for darwin11. * configure: Regenerate. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184809 138bc75d-0d04-0410-961f-82ee72b054a4 --- boehm-gc/ChangeLog | 14 ++++++++++++++ boehm-gc/configure | 11 +++++++++++ boehm-gc/configure.ac | 1 + boehm-gc/include/gc_config.h.in | 3 +++ boehm-gc/include/private/gcconfig.h | 12 ++++++++++-- libjava/ChangeLog | 10 ++++++++++ libjava/configure | 7 +------ libjava/configure.ac | 7 +------ 8 files changed, 51 insertions(+), 14 deletions(-) diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog index 397f0875d08..219a514171c 100644 --- a/boehm-gc/ChangeLog +++ b/boehm-gc/ChangeLog @@ -1,3 +1,17 @@ +2012-03-02 Jack Howarth + + Backport from mainline + 2012-02-23 Patrick Marlier + Jack Howarth + + PR boehm-gc/52179 + * include/gc_config.h.in: Undefine HAVE_PTHREAD_GET_STACKADDR_NP. + * include/private/gcconfig.h (DARWIN): Define STACKBOTTOM with + pthread_get_stackaddr_np when available. + * configure.ac (THREADS): Check availability of + pthread_get_stackaddr_np. + * configure: Regenerate. + 2012-03-01 Release Manager * GCC 4.6.3 released. diff --git a/boehm-gc/configure b/boehm-gc/configure index a6806b8fc92..019054da22a 100755 --- a/boehm-gc/configure +++ b/boehm-gc/configure @@ -15246,6 +15246,17 @@ _ACEOF fi done +for ac_func in pthread_get_stackaddr_np +do : + ac_fn_c_check_func "$LINENO" "pthread_get_stackaddr_np" "ac_cv_func_pthread_get_stackaddr_np" +if test "x$ac_cv_func_pthread_get_stackaddr_np" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PTHREAD_GET_STACKADDR_NP 1 +_ACEOF + +fi +done + LIBS="$oldLIBS" # Configuration of machine-dependent code diff --git a/boehm-gc/configure.ac b/boehm-gc/configure.ac index 61e12aafe67..412a8f31dca 100644 --- a/boehm-gc/configure.ac +++ b/boehm-gc/configure.ac @@ -392,6 +392,7 @@ esac oldLIBS="$LIBS" LIBS="$LIBS $THREADLIBS" AC_CHECK_FUNCS([pthread_getattr_np]) +AC_CHECK_FUNCS([pthread_get_stackaddr_np]) LIBS="$oldLIBS" # Configuration of machine-dependent code diff --git a/boehm-gc/include/gc_config.h.in b/boehm-gc/include/gc_config.h.in index ea6cb03d22a..6bdd807bcfa 100644 --- a/boehm-gc/include/gc_config.h.in +++ b/boehm-gc/include/gc_config.h.in @@ -87,6 +87,9 @@ /* Define to 1 if you have the `pthread_getattr_np' function. */ #undef HAVE_PTHREAD_GETATTR_NP +/* Define to 1 if you have the `pthread_get_stackaddr_np_np' function. */ +#undef HAVE_PTHREAD_GET_STACKADDR_NP + /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H diff --git a/boehm-gc/include/private/gcconfig.h b/boehm-gc/include/private/gcconfig.h index c729130cb26..f2b5681352b 100644 --- a/boehm-gc/include/private/gcconfig.h +++ b/boehm-gc/include/private/gcconfig.h @@ -1331,7 +1331,11 @@ These aren't used when dyld support is enabled (it is by default) */ # define DATASTART ((ptr_t) get_etext()) # define DATAEND ((ptr_t) get_end()) -# define STACKBOTTOM ((ptr_t) 0xc0000000) +# ifdef HAVE_PTHREAD_GET_STACKADDR_NP +# define STACKBOTTOM (ptr_t)pthread_get_stackaddr_np(pthread_self()) +# else +# define STACKBOTTOM ((ptr_t) 0xc0000000) +# endif # define USE_MMAP # define USE_MMAP_ANON # define USE_ASM_PUSH_REGS @@ -2011,7 +2015,11 @@ These aren't used when dyld support is enabled (it is by default) */ # define DATASTART ((ptr_t) get_etext()) # define DATAEND ((ptr_t) get_end()) -# define STACKBOTTOM ((ptr_t) 0x7fff5fc00000) +# ifdef HAVE_PTHREAD_GET_STACKADDR_NP +# define STACKBOTTOM (ptr_t)pthread_get_stackaddr_np(pthread_self()) +# else +# define STACKBOTTOM ((ptr_t) 0x7fff5fc00000) +# endif # define USE_MMAP # define USE_MMAP_ANON # ifdef GC_DARWIN_THREADS diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 8ee19da556f..8ba79a61409 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,13 @@ +2012-03-02 Jack Howarth + + Backport from mainline + 2012-02-23 Patrick Marlier + Jack Howarth + + PR target/49461 + * configure.ac (SYSTEMSPEC): No longer pass -no_pie for darwin11. + * configure: Regenerate. + 2012-03-01 Release Manager * GCC 4.6.3 released. diff --git a/libjava/configure b/libjava/configure index 3a722c772ca..d660561801d 100755 --- a/libjava/configure +++ b/libjava/configure @@ -19775,14 +19775,9 @@ case "${host}" in SYSTEMSPEC="-lunicows $SYSTEMSPEC" fi ;; - *-*-darwin9*) + *-*-darwin[912]*) SYSTEMSPEC="%{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}" ;; - *-*-darwin[12]*) - # Something is incompatible with pie, would be nice to fix it and - # remove -no_pie. PR49461 - SYSTEMSPEC="-no_pie %{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}" - ;; *) SYSTEMSPEC= ;; diff --git a/libjava/configure.ac b/libjava/configure.ac index 276b36fd983..20dbe96959b 100644 --- a/libjava/configure.ac +++ b/libjava/configure.ac @@ -886,14 +886,9 @@ case "${host}" in SYSTEMSPEC="-lunicows $SYSTEMSPEC" fi ;; - *-*-darwin9*) + *-*-darwin[[912]]*) SYSTEMSPEC="%{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}" ;; - *-*-darwin[[12]]*) - # Something is incompatible with pie, would be nice to fix it and - # remove -no_pie. PR49461 - SYSTEMSPEC="-no_pie %{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}" - ;; *) SYSTEMSPEC= ;; -- cgit v1.2.3 From ee514f0c03b3a138ce8a9abf9c7ef3ae09477cf8 Mon Sep 17 00:00:00 2001 From: Peter Bergner Date: Fri, 2 Mar 2012 22:12:52 +0000 Subject: Backport from mainline 2012-03-02 Peter Bergner gcc/ * config/rs6000/vsx.md (vsx_set_): Reorder operands. gcc/testsuite/ * gcc.target/powerpc/pr52457.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184834 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 ++++++ gcc/config/rs6000/vsx.md | 4 ++-- gcc/testsuite/ChangeLog | 7 ++++++ gcc/testsuite/gcc.target/powerpc/pr52457.c | 34 ++++++++++++++++++++++++++++++ 4 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.target/powerpc/pr52457.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 22a1359dd96..9648450c718 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2012-03-02 Peter Bergner + + Backport from mainline + 2012-03-02 Peter Bergner + + * config/rs6000/vsx.md (vsx_set_): Reorder operands. + 2012-03-02 Bill Schmidt Ira Rosen diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vsx.md index b45f51020f1..05c794e1dfa 100644 --- a/gcc/config/rs6000/vsx.md +++ b/gcc/config/rs6000/vsx.md @@ -1006,9 +1006,9 @@ "VECTOR_MEM_VSX_P (mode)" { if (INTVAL (operands[3]) == 0) - return \"xxpermdi %x0,%x1,%x2,1\"; + return \"xxpermdi %x0,%x2,%x1,1\"; else if (INTVAL (operands[3]) == 1) - return \"xxpermdi %x0,%x2,%x1,0\"; + return \"xxpermdi %x0,%x1,%x2,0\"; else gcc_unreachable (); } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index db7cd8b3941..567a8deaa45 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2012-03-02 Peter Bergner + + Backport from mainline + 2012-03-02 Peter Bergner + + * gcc.target/powerpc/pr52457.c: New test. + 2012-03-01 Release Manager * GCC 4.6.3 released. diff --git a/gcc/testsuite/gcc.target/powerpc/pr52457.c b/gcc/testsuite/gcc.target/powerpc/pr52457.c new file mode 100644 index 00000000000..4470e55023f --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr52457.c @@ -0,0 +1,34 @@ +/* { dg-do run { target { powerpc*-*-linux* } } } */ +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ +/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */ +/* { dg-require-effective-target vsx_hw } */ +/* { dg-options "-O1 -mcpu=power7" } */ + +extern void abort (void); + +typedef long long T; +typedef T vl_t __attribute__((vector_size(2 * sizeof (T)))); + +vl_t +buggy_func (T x) +{ + vl_t w; + T *p = (T *)&w; + p[0] = p[1] = x; + return w; +} + +int +main(void) +{ + vl_t rval; + T *pl; + + pl = (T *) &rval; + rval = buggy_func (2); + + if (pl[0] != 2 || pl[1] != 2) + abort (); + + return 0; +} -- cgit v1.2.3 From b84cad767d1e0b1a7bcfc73d0b1e26c797abcd5f Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sat, 3 Mar 2012 00:18:01 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184847 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index acf6a518aa4..68c89f58db6 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120302 +20120303 -- cgit v1.2.3 From 2d71142b55ece257e0af3a44d0bae56867733a04 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Sat, 3 Mar 2012 13:44:52 +0000 Subject: PR target/52425 Backport from mainline 2011-05-22 Eric Botcazou * config/sparc/sparc.c (sparc_delegitimize_address): Handle UNSPEC_MOVE_PIC pattern. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184855 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 9 +++++++++ gcc/config/sparc/sparc.c | 18 +++++++++++------- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9648450c718..79f1bce53d5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2012-03-03 Eric Botcazou + + PR target/52425 + Backport from mainline + 2011-05-22 Eric Botcazou + + * config/sparc/sparc.c (sparc_delegitimize_address): Handle + UNSPEC_MOVE_PIC pattern. + 2012-03-02 Peter Bergner Backport from mainline diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index c93c25bbd0a..f1c5ecd83e5 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -3658,13 +3658,17 @@ sparc_delegitimize_address (rtx x) { x = delegitimize_mem_from_attrs (x); - if (GET_CODE (x) == LO_SUM - && GET_CODE (XEXP (x, 1)) == UNSPEC - && XINT (XEXP (x, 1), 1) == UNSPEC_TLSLE) - { - x = XVECEXP (XEXP (x, 1), 0, 0); - gcc_assert (GET_CODE (x) == SYMBOL_REF); - } + if (GET_CODE (x) == LO_SUM && GET_CODE (XEXP (x, 1)) == UNSPEC) + switch (XINT (XEXP (x, 1), 1)) + { + case UNSPEC_MOVE_PIC: + case UNSPEC_TLSLE: + x = XVECEXP (XEXP (x, 1), 0, 0); + gcc_assert (GET_CODE (x) == SYMBOL_REF); + break; + default: + break; + } return x; } -- cgit v1.2.3 From d827fc27dcfef1b02637334a1d59a44d4b9284e5 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sun, 4 Mar 2012 00:18:22 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184870 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 68c89f58db6..1c326c2bce3 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120303 +20120304 -- cgit v1.2.3 From 1a8d9aa380aaca45eb1266824f08ed410033e619 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sun, 4 Mar 2012 16:23:26 +0000 Subject: Backport from mainline 2012-03-01 John David Anglin PR target/52408 * config/pa/pa.md (zvdep_imm32): Change type of variable x from int to unsigned HOST_WIDE_INT. (zvdep_imm64): Likewise. (vdepi_ior): Change type of variable x from int to HOST_WIDE_INT. (vdepi_and): Likewise. Likewise for unamed 64-bit patterns. * config/pa/predicates.md (lhs_lshift_cint_operand): Update comment. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184888 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 14 ++++++++++++++ gcc/config/pa/pa.md | 12 ++++++------ gcc/config/pa/predicates.md | 6 +++--- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 79f1bce53d5..d5dcd570618 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,17 @@ +2012-03-04 John David Anglin + + Backport from mainline + 2012-03-01 John David Anglin + + PR target/52408 + * config/pa/pa.md (zvdep_imm32): Change type of variable x from int to + unsigned HOST_WIDE_INT. + (zvdep_imm64): Likewise. + (vdepi_ior): Change type of variable x from int to HOST_WIDE_INT. + (vdepi_and): Likewise. + Likewise for unamed 64-bit patterns. + * config/pa/predicates.md (lhs_lshift_cint_operand): Update comment. + 2012-03-03 Eric Botcazou PR target/52425 diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index 1bd9f0b0ab6..c91e0579b44 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -6348,7 +6348,7 @@ "" "* { - int x = INTVAL (operands[1]); + unsigned HOST_WIDE_INT x = UINTVAL (operands[1]); operands[2] = GEN_INT (4 + exact_log2 ((x >> 4) + 1)); operands[1] = GEN_INT ((x & 0xf) - 0x10); return \"{zvdepi %1,%2,%0|depwi,z %1,%%sar,%2,%0}\"; @@ -6366,7 +6366,7 @@ "exact_log2 (INTVAL (operands[1]) + 1) > 0" "* { - int x = INTVAL (operands[1]); + HOST_WIDE_INT x = INTVAL (operands[1]); operands[2] = GEN_INT (exact_log2 (x + 1)); return \"{vdepi -1,%2,%0|depwi -1,%%sar,%2,%0}\"; }" @@ -6383,7 +6383,7 @@ "INTVAL (operands[1]) == -2" "* { - int x = INTVAL (operands[1]); + HOST_WIDE_INT x = INTVAL (operands[1]); operands[2] = GEN_INT (exact_log2 ((~x) + 1)); return \"{vdepi 0,%2,%0|depwi 0,%%sar,%2,%0}\"; }" @@ -6447,7 +6447,7 @@ "TARGET_64BIT" "* { - int x = INTVAL (operands[1]); + unsigned HOST_WIDE_INT x = UINTVAL (operands[1]); operands[2] = GEN_INT (4 + exact_log2 ((x >> 4) + 1)); operands[1] = GEN_INT ((x & 0x1f) - 0x20); return \"depdi,z %1,%%sar,%2,%0\"; @@ -6465,7 +6465,7 @@ "TARGET_64BIT && exact_log2 (INTVAL (operands[1]) + 1) > 0" "* { - int x = INTVAL (operands[1]); + HOST_WIDE_INT x = INTVAL (operands[1]); operands[2] = GEN_INT (exact_log2 (x + 1)); return \"depdi -1,%%sar,%2,%0\"; }" @@ -6482,7 +6482,7 @@ "TARGET_64BIT && INTVAL (operands[1]) == -2" "* { - int x = INTVAL (operands[1]); + HOST_WIDE_INT x = INTVAL (operands[1]); operands[2] = GEN_INT (exact_log2 ((~x) + 1)); return \"depdi 0,%%sar,%2,%0\"; }" diff --git a/gcc/config/pa/predicates.md b/gcc/config/pa/predicates.md index ea4116902b7..ff5dc1784fc 100644 --- a/gcc/config/pa/predicates.md +++ b/gcc/config/pa/predicates.md @@ -421,9 +421,9 @@ (ior (match_operand 0 "register_operand") (match_operand 0 "cint_ior_operand"))) -;; True iff OP is a CONST_INT of the forms 0...0xxxx or -;; 0...01...1xxxx. Such values can be the left hand side x in (x << -;; r), using the zvdepi instruction. +;; True iff OP is a CONST_INT of the forms 0...0xxxx, 0...01...1xxxx, +;; or 1...1xxxx. Such values can be the left hand side x in (x << r), +;; using the zvdepi instruction. (define_predicate "lhs_lshift_cint_operand" (match_code "const_int") -- cgit v1.2.3 From 9a86df5671ce6f638fa6d3ea9de174709e7814a2 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Mon, 5 Mar 2012 00:17:51 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184908 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 1c326c2bce3..e9136e9deb9 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120304 +20120305 -- cgit v1.2.3 From 9f42cdc275f5d9cd7c263a9b1bbabee332854bef Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Tue, 6 Mar 2012 00:18:30 +0000 Subject: Daily bump. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184969 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index e9136e9deb9..7f7f8cfb396 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20120305 +20120306 -- cgit v1.2.3