Merge lp:~ams-codesourcery/gcc-linaro/merge-from-fsf-20110811-4.5 into lp:gcc-linaro/4.5

Proposed by Andrew Stubbs
Status: Merged
Approved by: Ulrich Weigand
Approved revision: no longer in the source branch.
Merged at revision: 99535
Proposed branch: lp:~ams-codesourcery/gcc-linaro/merge-from-fsf-20110811-4.5
Merge into: lp:gcc-linaro/4.5
Diff against target: 2830 lines (+1397/-163)
80 files modified
ChangeLog.linaro (+4/-0)
boehm-gc/ChangeLog (+9/-0)
boehm-gc/configure (+3/-1)
boehm-gc/configure.ac (+3/-1)
gcc/ChangeLog (+210/-1)
gcc/DATESTAMP (+1/-1)
gcc/ada/ChangeLog (+5/-0)
gcc/ada/s-taprop-hpux-dce.adb (+1/-2)
gcc/c-common.c (+8/-7)
gcc/c-decl.c (+1/-1)
gcc/c-typeck.c (+2/-0)
gcc/combine.c (+1/-1)
gcc/config.gcc (+1/-1)
gcc/config/alpha/alpha.c (+10/-0)
gcc/config/darwin-protos.h (+1/-0)
gcc/config/darwin.c (+28/-0)
gcc/config/i386/athlon.md (+1/-1)
gcc/config/i386/darwin.h (+14/-0)
gcc/config/i386/i386.c (+5/-0)
gcc/config/i386/i386.md (+67/-35)
gcc/config/lm32/t-lm32 (+1/-1)
gcc/config/pa/pa.md (+10/-10)
gcc/config/rs6000/altivec.md (+2/-2)
gcc/config/rs6000/rs6000.c (+1/-1)
gcc/config/rs6000/vector.md (+4/-4)
gcc/config/rs6000/vsx.md (+2/-2)
gcc/config/sparc/sol2-64.h (+2/-5)
gcc/config/sparc/sol2.h (+11/-4)
gcc/cp/ChangeLog (+10/-0)
gcc/cp/typeck.c (+2/-0)
gcc/expr.c (+9/-3)
gcc/fortran/ChangeLog (+5/-0)
gcc/fortran/resolve.c (+1/-1)
gcc/gimplify.c (+27/-4)
gcc/testsuite/ChangeLog (+135/-0)
gcc/testsuite/ada/acats/run_acats (+3/-3)
gcc/testsuite/g++.dg/debug/dwarf2/icf.C (+4/-4)
gcc/testsuite/g++.dg/eh/cond5.C (+43/-0)
gcc/testsuite/g++.dg/eh/cond6.C (+43/-0)
gcc/testsuite/g++.dg/rtti/anon-ns1.C (+1/-1)
gcc/testsuite/g++.dg/torture/pr49039.C (+76/-0)
gcc/testsuite/g++.dg/torture/pr49115.C (+25/-0)
gcc/testsuite/g++.dg/torture/pr49615.C (+29/-0)
gcc/testsuite/g++.dg/torture/pr49644.C (+17/-0)
gcc/testsuite/gcc.c-torture/compile/pr38752.c (+25/-0)
gcc/testsuite/gcc.c-torture/execute/pr48973-1.c (+20/-0)
gcc/testsuite/gcc.c-torture/execute/pr48973-2.c (+14/-0)
gcc/testsuite/gcc.c-torture/execute/pr49039.c (+26/-0)
gcc/testsuite/gcc.c-torture/execute/pr49161.c (+46/-0)
gcc/testsuite/gcc.c-torture/execute/pr49644.c (+16/-0)
gcc/testsuite/gcc.dg/gomp/pr49640.c (+29/-0)
gcc/testsuite/gcc.dg/pr49120.c (+11/-0)
gcc/testsuite/gcc.dg/pr49619.c (+13/-0)
gcc/testsuite/gcc.dg/torture/pr48822.c (+20/-0)
gcc/testsuite/gcc.dg/tree-ssa/pr49039.c (+31/-0)
gcc/testsuite/gcc.target/i386/aes-avx-check.h (+4/-1)
gcc/testsuite/gcc.target/i386/avx-check.h (+3/-1)
gcc/testsuite/gcc.target/i386/avx-os-support.h (+10/-0)
gcc/testsuite/gcc.target/i386/pclmul-avx-check.h (+4/-1)
gcc/testsuite/gcc.target/i386/pr49920.c (+23/-0)
gcc/testsuite/gcc.target/powerpc/altivec-34.c (+24/-0)
gcc/testsuite/gcc.target/sparc/cas64.c (+15/-0)
gcc/testsuite/gfortran.dg/allocate_error_3.f90 (+9/-0)
gcc/testsuite/gfortran.dg/namelist_72.f (+33/-0)
gcc/testsuite/lib/target-supports.exp (+27/-3)
gcc/tree-cfgcleanup.c (+1/-1)
gcc/tree-ssa-dce.c (+8/-1)
gcc/tree-ssa-dom.c (+1/-3)
gcc/tree-ssa-sccvn.c (+19/-7)
gcc/tree-vrp.c (+56/-36)
libgfortran/ChangeLog (+9/-0)
libgfortran/io/list_read.c (+0/-1)
libiberty/ChangeLog (+7/-3)
libiberty/testsuite/test-expandargv.c (+5/-2)
libjava/ChangeLog (+6/-0)
libjava/configure (+7/-2)
libjava/configure.ac (+7/-2)
libstdc++-v3/ChangeLog (+10/-0)
libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-1.cc (+9/-1)
libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-2.cc (+11/-1)
To merge this branch: bzr merge lp:~ams-codesourcery/gcc-linaro/merge-from-fsf-20110811-4.5
Reviewer Review Type Date Requested Status
Ulrich Weigand (community) Approve
Review via email: mp+71181@code.launchpad.net

Description of the change

Merge from FSF GCC 4.5 branch.

To post a comment you must log in.
Revision history for this message
Linaro Toolchain Builder (cbuild) wrote :

cbuild has taken a snapshot of this branch at r99535 and queued it for build.

The snapshot is available at:
 http://ex.seabright.co.nz/snapshots/gcc-linaro-4.5+bzr99535~ams-codesourcery~merge-from-fsf-20110811-4.5.tar.xdelta3.xz

and will be built on the following builders:
 a9-builder armv5-builder i686 x86_64

You can track the build queue at:
 http://ex.seabright.co.nz/helpers/scheduler

cbuild-snapshot: gcc-linaro-4.5+bzr99535~ams-codesourcery~merge-from-fsf-20110811-4.5
cbuild-ancestor: lp:gcc-linaro+bzr99534
cbuild-state: check

Revision history for this message
Michael Hope (michaelh1) wrote :
Download full text (3.9 KiB)

cbuild successfully built this on x86_64-natty-cbuild159-oort1-x86_64r1.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99535~ams-codesourcery~merge-from-fsf-20110811-4.5/logs/x86_64-natty-cbuild159-oort1-x86_64r1

+PASS: g++.dg/eh/cond5.C (test for excess errors)
+PASS: g++.dg/eh/cond5.C execution test
+PASS: g++.dg/eh/cond6.C (test for excess errors)
+PASS: g++.dg/eh/cond6.C execution test
-PASS: g++.dg/rtti/anon-ns1.C scan-assembler "*N[^"]+1AE"
+PASS: g++.dg/rtti/anon-ns1.C scan-assembler "*N[^"]+1AE
+PASS: g++.dg/torture/pr49039.C -O0 (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -O0 execution test
+PASS: g++.dg/torture/pr49039.C -O1 (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -O1 execution test
+PASS: g++.dg/torture/pr49039.C -O2 (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -O2 execution test
+PASS: g++.dg/torture/pr49039.C -O2 -flto (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -O2 -flto execution test
+PASS: g++.dg/torture/pr49039.C -O2 -fwhopr (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -O2 -fwhopr execution test
+PASS: g++.dg/torture/pr49039.C -O3 -fomit-frame-pointer (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -O3 -fomit-frame-pointer execution test
+PASS: g++.dg/torture/pr49039.C -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test
+PASS: g++.dg/torture/pr49039.C -O3 -fomit-frame-pointer -funroll-loops (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -O3 -fomit-frame-pointer -funroll-loops execution test
+PASS: g++.dg/torture/pr49039.C -O3 -g (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -O3 -g execution test
+PASS: g++.dg/torture/pr49039.C -Os (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -Os execution test
+PASS: g++.dg/torture/pr49115.C -O0 (test for excess errors)
+PASS: g++.dg/torture/pr49115.C -O0 execution test
+PASS: g++.dg/torture/pr49115.C -O1 (test for excess errors)
+PASS: g++.dg/torture/pr49115.C -O1 execution test
+PASS: g++.dg/torture/pr49115.C -O2 (test for excess errors)
+PASS: g++.dg/torture/pr49115.C -O2 execution test
+PASS: g++.dg/torture/pr49115.C -O2 -flto (test for excess errors)
+PASS: g++.dg/torture/pr49115.C -O2 -flto execution test
+PASS: g++.dg/torture/pr49115.C -O2 -fwhopr (test for excess errors)
+PASS: g++.dg/torture/pr49115.C -O2 -fwhopr execution test
+PASS: g++.dg/torture/pr49115.C -O3 -fomit-frame-pointer (test for excess errors)
+PASS: g++.dg/torture/pr49115.C -O3 -fomit-frame-pointer execution test
+PASS: g++.dg/torture/pr49115.C -O3 -g (test for excess errors)
+PASS: g++.dg/torture/pr49115.C -O3 -g execution test
+PASS: g++.dg/torture/pr49115.C -Os (test for excess errors)
+PASS: g++.dg/torture/pr49115.C -Os execution test
+PASS: g++.dg/torture/pr49615.C -O0 (test for excess errors)
+PASS: g++.dg/torture/pr49615.C -O1 (test for excess errors)
+PASS: g++.dg/torture/pr49615.C -O2 (test ...

Read more...

Revision history for this message
Michael Hope (michaelh1) wrote :
Download full text (3.8 KiB)

cbuild successfully built this on i686-natty-cbuild159-oort2-i686r1.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99535~ams-codesourcery~merge-from-fsf-20110811-4.5/logs/i686-natty-cbuild159-oort2-i686r1

+PASS: g++.dg/eh/cond5.C (test for excess errors)
+PASS: g++.dg/eh/cond5.C execution test
+PASS: g++.dg/eh/cond6.C (test for excess errors)
+PASS: g++.dg/eh/cond6.C execution test
-PASS: g++.dg/rtti/anon-ns1.C scan-assembler "*N[^"]+1AE"
+PASS: g++.dg/rtti/anon-ns1.C scan-assembler "*N[^"]+1AE
+PASS: g++.dg/torture/pr49039.C -O0 (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -O0 execution test
+PASS: g++.dg/torture/pr49039.C -O1 (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -O1 execution test
+PASS: g++.dg/torture/pr49039.C -O2 (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -O2 execution test
+PASS: g++.dg/torture/pr49039.C -O2 -flto (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -O2 -flto execution test
+PASS: g++.dg/torture/pr49039.C -O2 -fwhopr (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -O2 -fwhopr execution test
+PASS: g++.dg/torture/pr49039.C -O3 -fomit-frame-pointer (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -O3 -fomit-frame-pointer execution test
+PASS: g++.dg/torture/pr49039.C -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test
+PASS: g++.dg/torture/pr49039.C -O3 -fomit-frame-pointer -funroll-loops (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -O3 -fomit-frame-pointer -funroll-loops execution test
+PASS: g++.dg/torture/pr49039.C -O3 -g (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -O3 -g execution test
+PASS: g++.dg/torture/pr49039.C -Os (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -Os execution test
+PASS: g++.dg/torture/pr49115.C -O0 (test for excess errors)
+PASS: g++.dg/torture/pr49115.C -O0 execution test
+PASS: g++.dg/torture/pr49115.C -O1 (test for excess errors)
+PASS: g++.dg/torture/pr49115.C -O1 execution test
+PASS: g++.dg/torture/pr49115.C -O2 (test for excess errors)
+PASS: g++.dg/torture/pr49115.C -O2 execution test
+PASS: g++.dg/torture/pr49115.C -O2 -flto (test for excess errors)
+PASS: g++.dg/torture/pr49115.C -O2 -flto execution test
+PASS: g++.dg/torture/pr49115.C -O2 -fwhopr (test for excess errors)
+PASS: g++.dg/torture/pr49115.C -O2 -fwhopr execution test
+PASS: g++.dg/torture/pr49115.C -O3 -fomit-frame-pointer (test for excess errors)
+PASS: g++.dg/torture/pr49115.C -O3 -fomit-frame-pointer execution test
+PASS: g++.dg/torture/pr49115.C -O3 -g (test for excess errors)
+PASS: g++.dg/torture/pr49115.C -O3 -g execution test
+PASS: g++.dg/torture/pr49115.C -Os (test for excess errors)
+PASS: g++.dg/torture/pr49115.C -Os execution test
+PASS: g++.dg/torture/pr49615.C -O0 (test for excess errors)
+PASS: g++.dg/torture/pr49615.C -O1 (test for excess errors)
+PASS: g++.dg/torture/pr49615.C -O2 (test for exce...

Read more...

Revision history for this message
Michael Hope (michaelh1) wrote :
Download full text (3.9 KiB)

cbuild successfully built this on armv7l-natty-cbuild159-ursa4-cortexa9r1.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99535~ams-codesourcery~merge-from-fsf-20110811-4.5/logs/armv7l-natty-cbuild159-ursa4-cortexa9r1

+PASS: g++.dg/eh/cond5.C (test for excess errors)
+PASS: g++.dg/eh/cond5.C execution test
+PASS: g++.dg/eh/cond6.C (test for excess errors)
+PASS: g++.dg/eh/cond6.C execution test
-FAIL: g++.dg/rtti/anon-ns1.C scan-assembler "*N[^"]+1AE"
+PASS: g++.dg/rtti/anon-ns1.C scan-assembler "*N[^"]+1AE
+PASS: g++.dg/torture/pr49039.C -O0 (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -O0 execution test
+PASS: g++.dg/torture/pr49039.C -O1 (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -O1 execution test
+PASS: g++.dg/torture/pr49039.C -O2 (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -O2 execution test
+PASS: g++.dg/torture/pr49039.C -O2 -flto (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -O2 -flto execution test
+PASS: g++.dg/torture/pr49039.C -O2 -fwhopr (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -O2 -fwhopr execution test
+PASS: g++.dg/torture/pr49039.C -O3 -fomit-frame-pointer (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -O3 -fomit-frame-pointer execution test
+PASS: g++.dg/torture/pr49039.C -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test
+PASS: g++.dg/torture/pr49039.C -O3 -fomit-frame-pointer -funroll-loops (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -O3 -fomit-frame-pointer -funroll-loops execution test
+PASS: g++.dg/torture/pr49039.C -O3 -g (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -O3 -g execution test
+PASS: g++.dg/torture/pr49039.C -Os (test for excess errors)
+PASS: g++.dg/torture/pr49039.C -Os execution test
+PASS: g++.dg/torture/pr49115.C -O0 (test for excess errors)
+PASS: g++.dg/torture/pr49115.C -O0 execution test
+PASS: g++.dg/torture/pr49115.C -O1 (test for excess errors)
+PASS: g++.dg/torture/pr49115.C -O1 execution test
+PASS: g++.dg/torture/pr49115.C -O2 (test for excess errors)
+PASS: g++.dg/torture/pr49115.C -O2 execution test
+PASS: g++.dg/torture/pr49115.C -O2 -flto (test for excess errors)
+PASS: g++.dg/torture/pr49115.C -O2 -flto execution test
+PASS: g++.dg/torture/pr49115.C -O2 -fwhopr (test for excess errors)
+PASS: g++.dg/torture/pr49115.C -O2 -fwhopr execution test
+PASS: g++.dg/torture/pr49115.C -O3 -fomit-frame-pointer (test for excess errors)
+PASS: g++.dg/torture/pr49115.C -O3 -fomit-frame-pointer execution test
+PASS: g++.dg/torture/pr49115.C -O3 -g (test for excess errors)
+PASS: g++.dg/torture/pr49115.C -O3 -g execution test
+PASS: g++.dg/torture/pr49115.C -Os (test for excess errors)
+PASS: g++.dg/torture/pr49115.C -Os execution test
+PASS: g++.dg/torture/pr49615.C -O0 (test for excess errors)
+PASS: g++.dg/torture/pr49615.C -O1 (test for excess errors)
+PASS: g++.dg/torture/pr49615.C -O2 (t...

Read more...

Revision history for this message
Ulrich Weigand (uweigand) wrote :

This is OK.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog.linaro'
2--- ChangeLog.linaro 2011-08-09 12:53:29 +0000
3+++ ChangeLog.linaro 2011-08-11 11:29:04 +0000
4@@ -1,3 +1,7 @@
5+2011-08-11 Andrew Stubbs <ams@codesourcery.com>
6+
7+ Merge from FSF 4.5 branch r177552 (pre 4.5.4).
8+
9 2011-08-09 Revital Eres <revital.eres@linaro.org>
10
11 gcc/
12
13=== modified file 'boehm-gc/ChangeLog'
14--- boehm-gc/ChangeLog 2011-04-28 14:09:54 +0000
15+++ boehm-gc/ChangeLog 2011-08-11 11:29:04 +0000
16@@ -1,3 +1,12 @@
17+2011-07-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18+
19+ PR boehm-gc/49381
20+ Backport from mainline:
21+ 2011-01-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22+
23+ * configure.ac (*-*-solaris2*): Add -lrt to THREADLIBS.
24+ * configure: Regenerate.
25+
26 2011-04-28 Release Manager
27
28 * GCC 4.5.3 released.
29
30=== modified file 'boehm-gc/configure'
31--- boehm-gc/configure 2010-06-15 12:52:58 +0000
32+++ boehm-gc/configure 2011-08-11 11:29:04 +0000
33@@ -14910,7 +14910,9 @@
34 # The alternate thread library was only introduced in Solaris 8 and
35 # became the default in Solaris 9, so no need for the special code
36 # above otherwise.
37- THREADLIBS=-lpthread
38+ # nanosleep, sched_yield, and sem_* only live in librt before
39+ # Solaris 11.
40+ THREADLIBS="-lpthread -lrt"
41 ;;
42 *-*-irix*)
43
44
45=== modified file 'boehm-gc/configure.ac'
46--- boehm-gc/configure.ac 2010-06-15 12:52:58 +0000
47+++ boehm-gc/configure.ac 2011-08-11 11:29:04 +0000
48@@ -193,7 +193,9 @@
49 # The alternate thread library was only introduced in Solaris 8 and
50 # became the default in Solaris 9, so no need for the special code
51 # above otherwise.
52- THREADLIBS=-lpthread
53+ # nanosleep, sched_yield, and sem_* only live in librt before
54+ # Solaris 11.
55+ THREADLIBS="-lpthread -lrt"
56 ;;
57 *-*-irix*)
58 AC_DEFINE(GC_IRIX_THREADS,1,[support for Irix pthreads])
59
60=== modified file 'gcc/ChangeLog'
61--- gcc/ChangeLog 2011-06-28 21:56:48 +0000
62+++ gcc/ChangeLog 2011-08-11 11:29:04 +0000
63@@ -1,3 +1,212 @@
64+2011-08-06 Uros Bizjak <ubizjak@gmail.com>
65+
66+ PR target/50001
67+ * config/alpha/alpha.c (alpha_instantiate_decls): New function.
68+ (TARGET_INSTANTIATE_DECLS): New define.
69+
70+2011-08-01 Sebastien Bourdeauducq <sebastien@milkymist.org>
71+
72+ * config/lm32/t-lm32: Add missing multilibs.
73+
74+2011-07-31 Uros Bizjak <ubizjak@gmail.com>
75+
76+ PR target/49920
77+ * config/i386/i386.md (strset): Do not expand strset_singleop
78+ when %eax or $edi are fixed.
79+ (*strsetdi_rex_1): Disable when %eax or %edi are fixed.
80+ (*strsetsi_1): Ditto.
81+ (*strsetsi_rex_1): Ditto.
82+ (*strsethi_1): Ditto.
83+ (*strsethi_rex_1): Ditto.
84+ (*strsetqi_1): Ditto.
85+ (*strsetqi_rex_1): Ditto.
86+ (*rep_stosdi_rex64): Disable when %eax, %ecx or %edi are fixed.
87+ (*rep_stossi): Ditto.
88+ (*rep_stossi_rex64): Ditto.
89+ (*rep_stosqi): Ditto.
90+ (*rep_stosqi_rex64): Ditto.
91+ (*strlenqi_1): Ditto.
92+ (*strlenqi_rex_1): Ditto.
93+ (cmpstrnsi): Also fail when %ecx is fixed.
94+ (*cmpstrnqi_nz_1): Disable when %ecx, %esi or %edi are fixed.
95+ (*cmpstrnqi_nz_rex_1): Ditto.
96+ (*cmpstrnqi_1): Ditto.
97+ (*cmpstrnqi_rex_1): Ditto.
98+ (*strmovdi_rex_1): Disable when %esi or %edi are fixed.
99+ (*strmovsi_1): Ditto.
100+ (*strmovsi_rex_1): Ditto.
101+ (*strmovhi_1): Ditto.
102+ (*strmovhi_rex_1): Ditto.
103+ (*strmovqi_1): Ditto.
104+ (*strmovqi_rex_1): Ditto.
105+ (*rep_movdi_rex64): Disable when %ecx, %esi or %edi are fixed.
106+ (*rep_movsi): Ditto.
107+ (*rep_movsi_rex64): Ditto.
108+ (*rep_movqi): Ditto.
109+ (*rep_movqi_rex64): Ditto.
110+
111+2011-07-28 Uros Bizjak <ubizjak@gmail.com>
112+
113+ PR target/47364
114+ * config/i386/i386.md (strlensi): Enable for !TARGET_64BIT only.
115+ (strlendi): Enable for TARGET_64BIT only.
116+
117+2011-07-19 Jakub Jelinek <jakub@redhat.com>
118+
119+ Backport from mainline
120+ 2011-07-08 Jakub Jelinek <jakub@redhat.com>
121+
122+ PR target/49621
123+ * config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Use
124+ CONST0_RTX (dest_mode) instead of const0_rtx as second operand
125+ of NE.
126+ * config/rs6000/vector.md (vector_select_<mode>,
127+ vector_select_<mode>_uns): Change second operand of NE to
128+ CONST0_RTX (<MODE>mode) instead of const0_rtx.
129+ * config/rs6000/altivec.md (*altivec_vsel<mode>,
130+ *altivec_vsel<mode>_uns): Expect second operand of NE to be
131+ zero_constant of the corresponding vector mode.
132+ * config/rs6000/vsx.md (*vsx_xxsel<mode>, *vsx_xxsel<mode>_uns):
133+ Likewise.
134+
135+ 2011-07-07 Jakub Jelinek <jakub@redhat.com>
136+
137+ PR c/49644
138+ * c-typeck.c (build_binary_op): For MULT_EXPR and TRUNC_DIV_EXPR with
139+ one non-complex and one complex argument, call c_save_expr on both
140+ operands.
141+
142+ PR middle-end/49640
143+ * gimplify.c (gimplify_compound_lval): For last 2 ARRAY_*REF
144+ operands and last COMPONENT_REF operand call gimplify_expr on it
145+ if non-NULL.
146+
147+ 2011-07-04 Jakub Jelinek <jakub@redhat.com>
148+
149+ PR rtl-optimization/49619
150+ * combine.c (combine_simplify_rtx): In PLUS -> IOR simplification
151+ pass VOIDmode as op0_mode to recursive call.
152+
153+ 2011-05-27 Jakub Jelinek <jakub@redhat.com>
154+
155+ PR c++/49165
156+ * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
157+ C++ don't call c_common_truthvalue_conversion on void type arms.
158+
159+ 2011-05-26 Jakub Jelinek <jakub@redhat.com>
160+
161+ PR c++/49165
162+ * gimplify.c (shortcut_cond_r): Don't special case
163+ COND_EXPRs if they have void type on one of their arms.
164+
165+ PR tree-optimization/49161
166+ * tree-vrp.c (struct case_info): New type.
167+ (compare_case_labels): Sort case_info structs instead of
168+ trees, and not primarily by CASE_LABEL uids but by
169+ label_for_block indexes.
170+ (find_switch_asserts): Put case labels into struct case_info
171+ array instead of TREE_VEC, adjust sorting, compare label_for_block
172+ values instead of CASE_LABELs.
173+
174+ 2011-05-23 Jakub Jelinek <jakub@redhat.com>
175+
176+ PR c/49120
177+ * c-decl.c (start_decl): Convert expr to void_type_node.
178+
179+ PR middle-end/48973
180+ * expr.c (expand_expr_real_2) <case LT_EXPR>: If do_store_flag
181+ failed and the comparison has a single bit signed type, use
182+ constm1_rtx instead of const1_rtx for true value.
183+ (do_store_flag): If ops->type is single bit signed type, disable
184+ signel bit test optimization and pass -1 instead of 1 as last
185+ parameter to emit_store_flag_force.
186+
187+ 2011-05-18 Jakub Jelinek <jakub@redhat.com>
188+
189+ PR tree-optimization/49039
190+ * tree-vrp.c (extract_range_from_binary_expr): For
191+ MIN_EXPR <~[a, b], ~[c, d]> and MAX_EXPR <~[a, b], ~[c, d]>
192+ return ~[MAX_EXPR <a, c>, MIN_EXPR <b, d>].
193+
194+2011-07-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
195+
196+ PR target/49746
197+ Revert:
198+ 2010-12-30 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
199+
200+ * config/pa/pa.md: Add ",*" condition to 64-bit add/subtract boolean
201+ patterns.
202+
203+2011-07-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
204+
205+ PR target/49723
206+ * config/pa/pa.md (casesi): Use gen_int_mode instead of GEN_INT.
207+
208+2011-07-12 Andrey Belevantsev <abel@ispras.ru>
209+
210+ Backport from mainline
211+ 2011-05-25 Andrey Belevantsev <abel@ispras.ru>
212+
213+ PR rtl-optimization/49014
214+ * config/i386/athlon.md (athlon_ssecomi): Change type to ssecomi.
215+
216+2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
217+
218+ PR target/49660
219+ * config/sparc/sol2.h [TARGET_64BIT_DEFAULT] (TARGET_DEFAULT): Add
220+ MASK_V8PLUS, remove commented out flag and reorder.
221+
222+ Backport from mainline
223+ 2011-06-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
224+
225+ * config/sparc/sol2-64.h (TARGET_DEFAULT): Remove.
226+ (TARGET_64BIT_DEFAULT): Define.
227+ * config.gcc (sparc*-*-solaris2*): Move sparc/sol2-64.h to front
228+ of tm_file.
229+ * config/sparc/sol2.h [TARGET_64BIT_DEFAULT] (TARGET_DEFAULT): Define.
230+
231+2011-07-04 Richard Guenther <rguenther@suse.de>
232+
233+ Backport from mainline
234+ 2011-05-02 Richard Guenther <rguenther@suse.de>
235+
236+ PR tree-optimization/48822
237+ * tree-ssa-sccvn.c (set_ssa_val_to): Never go up the lattice.
238+
239+2011-07-04 Richard Guenther <rguenther@suse.de>
240+
241+ Backport from mainline
242+ 2011-05-23 Richard Guenther <rguenther@suse.de>
243+
244+ PR tree-optimization/49115
245+ * tree-ssa-dce.c (mark_aliased_reaching_defs_necessary_1): Likewise.
246+
247+2011-07-04 Richard Guenther <rguenther@suse.de>
248+
249+ PR tree-optimization/49615
250+ * tree-cfgcleanup.c (split_bbs_on_noreturn_calls): Fix
251+ basic-block index check.
252+
253+2011-06-30 Eric Botcazou <ebotcazou@adacore.com>
254+
255+ PR tree-optimization/49572
256+ * tree-ssa-dom.c (initialize_hash_element) <GIMPLE_SINGLE_RHS>: Use the
257+ type of the RHS instead of that of the LHS for the expression type.
258+
259+2011-06-30 Jack Howarth <howarth@bromo.med.uc.edu>
260+
261+ Backport from mainline
262+ 2011-02-07 Mike Stump <mikestump@comcast.net>
263+
264+ PR target/42333
265+ Add __ieee_divdc3 entry point.
266+ * config/i386/darwin.h (DECLARE_LIBRARY_RENAMES): Retain ___divdc3
267+ entry point.
268+ (SUBTARGET_INIT_BUILTINS): Call darwin_rename_builtins.
269+ * config/i386/i386.c (TARGET_INIT_LIBFUNCS): Likewise.
270+ * config/darwin.c (darwin_rename_builtins): Add.
271+ * config/darwin-protos.h (darwin_rename_builtins): Add.
272+
273 2011-06-28 Eric Botcazou <ebotcazou@adacore.com>
274
275 * tree-ssa-dom.c (initialize_hash_element): Fix oversight.
276@@ -15,7 +224,7 @@
277
278 2011-06-16 Kaz Kojima <kkojima@gcc.gnu.org>
279
280- Backport form main line
281+ Backport from mainline
282 2011-06-09 Kaz Kojima <kkojima@gcc.gnu.org>
283
284 PR target/49307
285
286=== modified file 'gcc/DATESTAMP'
287--- gcc/DATESTAMP 2011-06-30 00:17:21 +0000
288+++ gcc/DATESTAMP 2011-08-11 11:29:04 +0000
289@@ -1,1 +1,1 @@
290-20110630
291+20110808
292
293=== modified file 'gcc/ada/ChangeLog'
294--- gcc/ada/ChangeLog 2011-04-28 14:11:33 +0000
295+++ gcc/ada/ChangeLog 2011-08-11 11:29:04 +0000
296@@ -1,3 +1,8 @@
297+2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
298+
299+ PR ada/46350
300+ * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
301+
302 2011-04-28 Release Manager
303
304 * GCC 4.5.3 released.
305
306=== modified file 'gcc/ada/s-taprop-hpux-dce.adb'
307--- gcc/ada/s-taprop-hpux-dce.adb 2009-11-30 10:45:39 +0000
308+++ gcc/ada/s-taprop-hpux-dce.adb 2011-08-11 11:29:04 +0000
309@@ -888,8 +888,7 @@
310
311 if T.Common.State = Interrupt_Server_Blocked_On_Event_Flag then
312 System.Interrupt_Management.Operations.Interrupt_Self_Process
313- (System.Interrupt_Management.Interrupt_ID
314- (PIO.Get_Interrupt_ID (T)));
315+ (PIO.Get_Interrupt_ID (T));
316 end if;
317 end Abort_Task;
318
319
320=== modified file 'gcc/c-common.c'
321--- gcc/c-common.c 2011-04-28 16:13:24 +0000
322+++ gcc/c-common.c 2011-08-11 11:29:04 +0000
323@@ -4031,14 +4031,15 @@
324 /* Distribute the conversion into the arms of a COND_EXPR. */
325 if (c_dialect_cxx ())
326 {
327+ tree op1 = TREE_OPERAND (expr, 1);
328+ tree op2 = TREE_OPERAND (expr, 2);
329+ /* In C++ one of the arms might have void type if it is throw. */
330+ if (!VOID_TYPE_P (TREE_TYPE (op1)))
331+ op1 = c_common_truthvalue_conversion (location, op1);
332+ if (!VOID_TYPE_P (TREE_TYPE (op2)))
333+ op2 = c_common_truthvalue_conversion (location, op2);
334 expr = fold_build3_loc (location, COND_EXPR, truthvalue_type_node,
335- TREE_OPERAND (expr, 0),
336- c_common_truthvalue_conversion (location,
337- TREE_OPERAND (expr,
338- 1)),
339- c_common_truthvalue_conversion (location,
340- TREE_OPERAND (expr,
341- 2)));
342+ TREE_OPERAND (expr, 0), op1, op2);
343 goto ret;
344 }
345 else
346
347=== modified file 'gcc/c-decl.c'
348--- gcc/c-decl.c 2010-11-11 20:40:32 +0000
349+++ gcc/c-decl.c 2011-08-11 11:29:04 +0000
350@@ -3909,7 +3909,7 @@
351 return 0;
352
353 if (expr)
354- add_stmt (expr);
355+ add_stmt (fold_convert (void_type_node, expr));
356
357 if (TREE_CODE (decl) != FUNCTION_DECL && MAIN_NAME_P (DECL_NAME (decl)))
358 warning (OPT_Wmain, "%q+D is usually a function", decl);
359
360=== modified file 'gcc/c-typeck.c'
361--- gcc/c-typeck.c 2011-05-05 14:28:53 +0000
362+++ gcc/c-typeck.c 2011-08-11 11:29:04 +0000
363@@ -9671,6 +9671,7 @@
364 {
365 case MULT_EXPR:
366 case TRUNC_DIV_EXPR:
367+ op1 = c_save_expr (op1);
368 imag = build2 (resultcode, real_type, imag, op1);
369 /* Fall through. */
370 case PLUS_EXPR:
371@@ -9691,6 +9692,7 @@
372 switch (code)
373 {
374 case MULT_EXPR:
375+ op0 = c_save_expr (op0);
376 imag = build2 (resultcode, real_type, op0, imag);
377 /* Fall through. */
378 case PLUS_EXPR:
379
380=== modified file 'gcc/combine.c'
381--- gcc/combine.c 2011-04-14 13:58:12 +0000
382+++ gcc/combine.c 2011-08-11 11:29:04 +0000
383@@ -5313,7 +5313,7 @@
384 {
385 /* Try to simplify the expression further. */
386 rtx tor = simplify_gen_binary (IOR, mode, XEXP (x, 0), XEXP (x, 1));
387- temp = combine_simplify_rtx (tor, mode, in_dest, 0);
388+ temp = combine_simplify_rtx (tor, VOIDmode, in_dest, 0);
389
390 /* If we could, great. If not, do not go ahead with the IOR
391 replacement, since PLUS appears in many special purpose
392
393=== modified file 'gcc/config.gcc'
394--- gcc/config.gcc 2011-04-09 12:46:16 +0000
395+++ gcc/config.gcc 2011-08-11 11:29:04 +0000
396@@ -2449,7 +2449,7 @@
397 tm_file="${tm_file} sparc/sol2.h"
398 case ${target} in
399 sparc64-*-* | sparcv9-*-*)
400- tm_file="${tm_file} sparc/sol2-64.h"
401+ tm_file="sparc/sol2-64.h ${tm_file}"
402 ;;
403 *)
404 test x$with_cpu != x || with_cpu=v9
405
406=== modified file 'gcc/config/alpha/alpha.c'
407--- gcc/config/alpha/alpha.c 2010-08-03 17:44:56 +0000
408+++ gcc/config/alpha/alpha.c 2011-08-11 11:29:04 +0000
409@@ -4915,6 +4915,13 @@
410 return m;
411 }
412
413+static void
414+alpha_instantiate_decls (void)
415+{
416+ if (cfun->machine->gp_save_rtx != NULL_RTX)
417+ instantiate_decl_rtl (cfun->machine->gp_save_rtx);
418+}
419+
420 static int
421 alpha_ra_ever_killed (void)
422 {
423@@ -11125,6 +11132,9 @@
424 #undef TARGET_TRAMPOLINE_INIT
425 #define TARGET_TRAMPOLINE_INIT alpha_trampoline_init
426
427+#undef TARGET_INSTANTIATE_DECLS
428+#define TARGET_INSTANTIATE_DECLS alpha_instantiate_decls
429+
430 #undef TARGET_SECONDARY_RELOAD
431 #define TARGET_SECONDARY_RELOAD alpha_secondary_reload
432
433
434=== modified file 'gcc/config/darwin-protos.h'
435--- gcc/config/darwin-protos.h 2010-06-24 20:06:37 +0000
436+++ gcc/config/darwin-protos.h 2011-08-11 11:29:04 +0000
437@@ -93,3 +93,4 @@
438 extern bool darwin_kextabi_p (void);
439 extern void darwin_override_options (void);
440 extern void darwin_patch_builtins (void);
441+extern void darwin_rename_builtins (void);
442
443=== modified file 'gcc/config/darwin.c'
444--- gcc/config/darwin.c 2010-06-24 20:06:37 +0000
445+++ gcc/config/darwin.c 2011-08-11 11:29:04 +0000
446@@ -337,6 +337,34 @@
447
448 /* Return a hash value for a SLOT in the indirections hash table. */
449
450+void
451+darwin_rename_builtins (void)
452+{
453+ /* The system ___divdc3 routine in libSystem on darwin10 is not
454+ accurate to 1ulp, ours is, so we avoid ever using the system name
455+ for this routine and instead install a non-conflicting name that
456+ is accurate.
457+
458+ When -ffast-math or -funsafe-math-optimizations is given, we can
459+ use the faster version. */
460+ if (!flag_unsafe_math_optimizations)
461+ {
462+ int dcode = (BUILT_IN_COMPLEX_DIV_MIN
463+ + DCmode - MIN_MODE_COMPLEX_FLOAT);
464+ tree fn = built_in_decls[dcode];
465+ /* Fortran and c call TARGET_INIT_BUILTINS and
466+ TARGET_INIT_LIBFUNCS at different times, so we have to put a
467+ call into each to ensure that at least one of them is called
468+ after build_common_builtin_nodes. A better fix is to add a
469+ new hook to run after build_common_builtin_nodes runs. */
470+ if (fn)
471+ set_user_assembler_name (fn, "___ieee_divdc3");
472+ fn = implicit_built_in_decls[dcode];
473+ if (fn)
474+ set_user_assembler_name (fn, "___ieee_divdc3");
475+ }
476+}
477+
478 static hashval_t
479 machopic_indirection_hash (const void *slot)
480 {
481
482=== modified file 'gcc/config/i386/athlon.md'
483--- gcc/config/i386/athlon.md 2009-04-21 18:03:23 +0000
484+++ gcc/config/i386/athlon.md 2011-08-11 11:29:04 +0000
485@@ -798,7 +798,7 @@
486 "athlon-direct,athlon-fploadk8,athlon-fadd")
487 (define_insn_reservation "athlon_ssecomi" 4
488 (and (eq_attr "cpu" "athlon,k8,generic64")
489- (eq_attr "type" "ssecmp"))
490+ (eq_attr "type" "ssecomi"))
491 "athlon-vector,athlon-fpsched,athlon-fadd")
492 (define_insn_reservation "athlon_ssecomi_amdfam10" 3
493 (and (eq_attr "cpu" "amdfam10")
494
495=== modified file 'gcc/config/i386/darwin.h'
496--- gcc/config/i386/darwin.h 2010-09-10 16:12:46 +0000
497+++ gcc/config/i386/darwin.h 2011-08-11 11:29:04 +0000
498@@ -302,3 +302,17 @@
499 #define MACHO_SYMBOL_FLAG_VARIABLE ((SYMBOL_FLAG_MACH_DEP) << 3)
500
501 #define SUBTARGET32_DEFAULT_CPU "i686"
502+
503+#define SUBTARGET_INIT_BUILTINS \
504+do { \
505+ darwin_rename_builtins (); \
506+} while(0)
507+
508+/* The system ___divdc3 routine in libSystem on darwin10 is not
509+ accurate to 1ulp, ours is, so we avoid ever using the system name
510+ for this routine and instead install a non-conflicting name that is
511+ accurate. See darwin_rename_builtins. */
512+#ifdef L_divdc3
513+#define DECLARE_LIBRARY_RENAMES \
514+ asm(".text; ___divdc3: jmp ___ieee_divdc3 ; .globl ___divdc3");
515+#endif
516
517=== modified file 'gcc/config/i386/i386.c'
518--- gcc/config/i386/i386.c 2011-05-26 14:33:37 +0000
519+++ gcc/config/i386/i386.c 2011-08-11 11:29:04 +0000
520@@ -30645,6 +30645,11 @@
521 #undef TARGET_ASM_CODE_END
522 #define TARGET_ASM_CODE_END ix86_code_end
523
524+#if TARGET_MACHO
525+#undef TARGET_INIT_LIBFUNCS
526+#define TARGET_INIT_LIBFUNCS darwin_rename_builtins
527+#endif
528+
529 struct gcc_target targetm = TARGET_INITIALIZER;
530
531
532 #include "gt-i386.h"
533
534=== modified file 'gcc/config/i386/i386.md'
535--- gcc/config/i386/i386.md 2011-05-26 14:33:37 +0000
536+++ gcc/config/i386/i386.md 2011-08-11 11:29:04 +0000
537@@ -17689,7 +17689,8 @@
538 (set (match_operand:DI 1 "register_operand" "=S")
539 (plus:DI (match_dup 3)
540 (const_int 8)))]
541- "TARGET_64BIT"
542+ "TARGET_64BIT
543+ && !(fixed_regs[SI_REG] || fixed_regs[DI_REG])"
544 "movsq"
545 [(set_attr "type" "str")
546 (set_attr "mode" "DI")
547@@ -17704,7 +17705,8 @@
548 (set (match_operand:SI 1 "register_operand" "=S")
549 (plus:SI (match_dup 3)
550 (const_int 4)))]
551- "!TARGET_64BIT"
552+ "!TARGET_64BIT
553+ && !(fixed_regs[SI_REG] || fixed_regs[DI_REG])"
554 "movs{l|d}"
555 [(set_attr "type" "str")
556 (set_attr "mode" "SI")
557@@ -17719,7 +17721,8 @@
558 (set (match_operand:DI 1 "register_operand" "=S")
559 (plus:DI (match_dup 3)
560 (const_int 4)))]
561- "TARGET_64BIT"
562+ "TARGET_64BIT
563+ && !(fixed_regs[SI_REG] || fixed_regs[DI_REG])"
564 "movs{l|d}"
565 [(set_attr "type" "str")
566 (set_attr "mode" "SI")
567@@ -17734,7 +17737,8 @@
568 (set (match_operand:SI 1 "register_operand" "=S")
569 (plus:SI (match_dup 3)
570 (const_int 2)))]
571- "!TARGET_64BIT"
572+ "!TARGET_64BIT
573+ && !(fixed_regs[SI_REG] || fixed_regs[DI_REG])"
574 "movsw"
575 [(set_attr "type" "str")
576 (set_attr "memory" "both")
577@@ -17749,7 +17753,8 @@
578 (set (match_operand:DI 1 "register_operand" "=S")
579 (plus:DI (match_dup 3)
580 (const_int 2)))]
581- "TARGET_64BIT"
582+ "TARGET_64BIT
583+ && !(fixed_regs[SI_REG] || fixed_regs[DI_REG])"
584 "movsw"
585 [(set_attr "type" "str")
586 (set_attr "memory" "both")
587@@ -17764,7 +17769,8 @@
588 (set (match_operand:SI 1 "register_operand" "=S")
589 (plus:SI (match_dup 3)
590 (const_int 1)))]
591- "!TARGET_64BIT"
592+ "!TARGET_64BIT
593+ && !(fixed_regs[SI_REG] || fixed_regs[DI_REG])"
594 "movsb"
595 [(set_attr "type" "str")
596 (set_attr "memory" "both")
597@@ -17779,7 +17785,8 @@
598 (set (match_operand:DI 1 "register_operand" "=S")
599 (plus:DI (match_dup 3)
600 (const_int 1)))]
601- "TARGET_64BIT"
602+ "TARGET_64BIT
603+ && !(fixed_regs[SI_REG] || fixed_regs[DI_REG])"
604 "movsb"
605 [(set_attr "type" "str")
606 (set_attr "memory" "both")
607@@ -17810,7 +17817,8 @@
608 (set (mem:BLK (match_dup 3))
609 (mem:BLK (match_dup 4)))
610 (use (match_dup 5))]
611- "TARGET_64BIT"
612+ "TARGET_64BIT
613+ && !(fixed_regs[CX_REG] || fixed_regs[SI_REG] || fixed_regs[DI_REG])"
614 "rep{%;} movsq"
615 [(set_attr "type" "str")
616 (set_attr "prefix_rep" "1")
617@@ -17829,7 +17837,8 @@
618 (set (mem:BLK (match_dup 3))
619 (mem:BLK (match_dup 4)))
620 (use (match_dup 5))]
621- "!TARGET_64BIT"
622+ "!TARGET_64BIT
623+ && !(fixed_regs[CX_REG] || fixed_regs[SI_REG] || fixed_regs[DI_REG])"
624 "rep{%;} movs{l|d}"
625 [(set_attr "type" "str")
626 (set_attr "prefix_rep" "1")
627@@ -17848,7 +17857,8 @@
628 (set (mem:BLK (match_dup 3))
629 (mem:BLK (match_dup 4)))
630 (use (match_dup 5))]
631- "TARGET_64BIT"
632+ "TARGET_64BIT
633+ && !(fixed_regs[CX_REG] || fixed_regs[SI_REG] || fixed_regs[DI_REG])"
634 "rep{%;} movs{l|d}"
635 [(set_attr "type" "str")
636 (set_attr "prefix_rep" "1")
637@@ -17865,7 +17875,8 @@
638 (set (mem:BLK (match_dup 3))
639 (mem:BLK (match_dup 4)))
640 (use (match_dup 5))]
641- "!TARGET_64BIT"
642+ "!TARGET_64BIT
643+ && !(fixed_regs[CX_REG] || fixed_regs[SI_REG] || fixed_regs[DI_REG])"
644 "rep{%;} movsb"
645 [(set_attr "type" "str")
646 (set_attr "prefix_rep" "1")
647@@ -17882,7 +17893,8 @@
648 (set (mem:BLK (match_dup 3))
649 (mem:BLK (match_dup 4)))
650 (use (match_dup 5))]
651- "TARGET_64BIT"
652+ "TARGET_64BIT
653+ && !(fixed_regs[CX_REG] || fixed_regs[SI_REG] || fixed_regs[DI_REG])"
654 "rep{%;} movsb"
655 [(set_attr "type" "str")
656 (set_attr "prefix_rep" "1")
657@@ -17942,7 +17954,9 @@
658 operands[3] = gen_rtx_PLUS (Pmode, operands[0],
659 GEN_INT (GET_MODE_SIZE (GET_MODE
660 (operands[2]))));
661- if (TARGET_SINGLE_STRINGOP || optimize_insn_for_size_p ())
662+ /* Can't use this if the user has appropriated eax or edi. */
663+ if ((TARGET_SINGLE_STRINGOP || optimize_insn_for_size_p ())
664+ && !(fixed_regs[AX_REG] || fixed_regs[DI_REG]))
665 {
666 emit_insn (gen_strset_singleop (operands[0], operands[1], operands[2],
667 operands[3]));
668@@ -17964,7 +17978,8 @@
669 (set (match_operand:DI 0 "register_operand" "=D")
670 (plus:DI (match_dup 1)
671 (const_int 8)))]
672- "TARGET_64BIT"
673+ "TARGET_64BIT
674+ && !(fixed_regs[AX_REG] || fixed_regs[DI_REG])"
675 "stosq"
676 [(set_attr "type" "str")
677 (set_attr "memory" "store")
678@@ -17976,7 +17991,8 @@
679 (set (match_operand:SI 0 "register_operand" "=D")
680 (plus:SI (match_dup 1)
681 (const_int 4)))]
682- "!TARGET_64BIT"
683+ "!TARGET_64BIT
684+ && !(fixed_regs[AX_REG] || fixed_regs[DI_REG])"
685 "stos{l|d}"
686 [(set_attr "type" "str")
687 (set_attr "memory" "store")
688@@ -17988,7 +18004,8 @@
689 (set (match_operand:DI 0 "register_operand" "=D")
690 (plus:DI (match_dup 1)
691 (const_int 4)))]
692- "TARGET_64BIT"
693+ "TARGET_64BIT
694+ && !(fixed_regs[AX_REG] || fixed_regs[DI_REG])"
695 "stos{l|d}"
696 [(set_attr "type" "str")
697 (set_attr "memory" "store")
698@@ -18000,7 +18017,8 @@
699 (set (match_operand:SI 0 "register_operand" "=D")
700 (plus:SI (match_dup 1)
701 (const_int 2)))]
702- "!TARGET_64BIT"
703+ "!TARGET_64BIT
704+ && !(fixed_regs[AX_REG] || fixed_regs[DI_REG])"
705 "stosw"
706 [(set_attr "type" "str")
707 (set_attr "memory" "store")
708@@ -18012,7 +18030,8 @@
709 (set (match_operand:DI 0 "register_operand" "=D")
710 (plus:DI (match_dup 1)
711 (const_int 2)))]
712- "TARGET_64BIT"
713+ "TARGET_64BIT
714+ && !(fixed_regs[AX_REG] || fixed_regs[DI_REG])"
715 "stosw"
716 [(set_attr "type" "str")
717 (set_attr "memory" "store")
718@@ -18024,7 +18043,8 @@
719 (set (match_operand:SI 0 "register_operand" "=D")
720 (plus:SI (match_dup 1)
721 (const_int 1)))]
722- "!TARGET_64BIT"
723+ "!TARGET_64BIT
724+ && !(fixed_regs[AX_REG] || fixed_regs[DI_REG])"
725 "stosb"
726 [(set_attr "type" "str")
727 (set_attr "memory" "store")
728@@ -18036,7 +18056,8 @@
729 (set (match_operand:DI 0 "register_operand" "=D")
730 (plus:DI (match_dup 1)
731 (const_int 1)))]
732- "TARGET_64BIT"
733+ "TARGET_64BIT
734+ && !(fixed_regs[AX_REG] || fixed_regs[DI_REG])"
735 "stosb"
736 [(set_attr "type" "str")
737 (set_attr "memory" "store")
738@@ -18063,7 +18084,8 @@
739 (const_int 0))
740 (use (match_operand:DI 2 "register_operand" "a"))
741 (use (match_dup 4))]
742- "TARGET_64BIT"
743+ "TARGET_64BIT
744+ && !(fixed_regs[AX_REG] || fixed_regs[CX_REG] || fixed_regs[DI_REG])"
745 "rep{%;} stosq"
746 [(set_attr "type" "str")
747 (set_attr "prefix_rep" "1")
748@@ -18080,7 +18102,8 @@
749 (const_int 0))
750 (use (match_operand:SI 2 "register_operand" "a"))
751 (use (match_dup 4))]
752- "!TARGET_64BIT"
753+ "!TARGET_64BIT
754+ && !(fixed_regs[AX_REG] || fixed_regs[CX_REG] || fixed_regs[DI_REG])"
755 "rep{%;} stos{l|d}"
756 [(set_attr "type" "str")
757 (set_attr "prefix_rep" "1")
758@@ -18097,7 +18120,8 @@
759 (const_int 0))
760 (use (match_operand:SI 2 "register_operand" "a"))
761 (use (match_dup 4))]
762- "TARGET_64BIT"
763+ "TARGET_64BIT
764+ && !(fixed_regs[AX_REG] || fixed_regs[CX_REG] || fixed_regs[DI_REG])"
765 "rep{%;} stos{l|d}"
766 [(set_attr "type" "str")
767 (set_attr "prefix_rep" "1")
768@@ -18113,7 +18137,8 @@
769 (const_int 0))
770 (use (match_operand:QI 2 "register_operand" "a"))
771 (use (match_dup 4))]
772- "!TARGET_64BIT"
773+ "!TARGET_64BIT
774+ && !(fixed_regs[AX_REG] || fixed_regs[CX_REG] || fixed_regs[DI_REG])"
775 "rep{%;} stosb"
776 [(set_attr "type" "str")
777 (set_attr "prefix_rep" "1")
778@@ -18129,7 +18154,8 @@
779 (const_int 0))
780 (use (match_operand:QI 2 "register_operand" "a"))
781 (use (match_dup 4))]
782- "TARGET_64BIT"
783+ "TARGET_64BIT
784+ && !(fixed_regs[AX_REG] || fixed_regs[CX_REG] || fixed_regs[DI_REG])"
785 "rep{%;} stosb"
786 [(set_attr "type" "str")
787 (set_attr "prefix_rep" "1")
788@@ -18150,8 +18176,8 @@
789 if (optimize_insn_for_size_p () && !TARGET_INLINE_ALL_STRINGOPS)
790 FAIL;
791
792- /* Can't use this if the user has appropriated esi or edi. */
793- if (fixed_regs[SI_REG] || fixed_regs[DI_REG])
794+ /* Can't use this if the user has appropriated ecx, esi or edi. */
795+ if (fixed_regs[CX_REG] || fixed_regs[SI_REG] || fixed_regs[DI_REG])
796 FAIL;
797
798 out = operands[0];
799@@ -18245,7 +18271,8 @@
800 (clobber (match_operand:SI 0 "register_operand" "=S"))
801 (clobber (match_operand:SI 1 "register_operand" "=D"))
802 (clobber (match_operand:SI 2 "register_operand" "=c"))]
803- "!TARGET_64BIT"
804+ "!TARGET_64BIT
805+ && !(fixed_regs[CX_REG] || fixed_regs[SI_REG] || fixed_regs[DI_REG])"
806 "repz{%;} cmpsb"
807 [(set_attr "type" "str")
808 (set_attr "mode" "QI")
809@@ -18260,7 +18287,8 @@
810 (clobber (match_operand:DI 0 "register_operand" "=S"))
811 (clobber (match_operand:DI 1 "register_operand" "=D"))
812 (clobber (match_operand:DI 2 "register_operand" "=c"))]
813- "TARGET_64BIT"
814+ "TARGET_64BIT
815+ && !(fixed_regs[CX_REG] || fixed_regs[SI_REG] || fixed_regs[DI_REG])"
816 "repz{%;} cmpsb"
817 [(set_attr "type" "str")
818 (set_attr "mode" "QI")
819@@ -18296,7 +18324,8 @@
820 (clobber (match_operand:SI 0 "register_operand" "=S"))
821 (clobber (match_operand:SI 1 "register_operand" "=D"))
822 (clobber (match_operand:SI 2 "register_operand" "=c"))]
823- "!TARGET_64BIT"
824+ "!TARGET_64BIT
825+ && !(fixed_regs[CX_REG] || fixed_regs[SI_REG] || fixed_regs[DI_REG])"
826 "repz{%;} cmpsb"
827 [(set_attr "type" "str")
828 (set_attr "mode" "QI")
829@@ -18314,7 +18343,8 @@
830 (clobber (match_operand:DI 0 "register_operand" "=S"))
831 (clobber (match_operand:DI 1 "register_operand" "=D"))
832 (clobber (match_operand:DI 2 "register_operand" "=c"))]
833- "TARGET_64BIT"
834+ "TARGET_64BIT
835+ && !(fixed_regs[CX_REG] || fixed_regs[SI_REG] || fixed_regs[DI_REG])"
836 "repz{%;} cmpsb"
837 [(set_attr "type" "str")
838 (set_attr "mode" "QI")
839@@ -18326,7 +18356,7 @@
840 (unspec:SI [(match_operand:BLK 1 "general_operand" "")
841 (match_operand:QI 2 "immediate_operand" "")
842 (match_operand 3 "immediate_operand" "")] UNSPEC_SCAS))]
843- ""
844+ "!TARGET_64BIT"
845 {
846 if (ix86_expand_strlen (operands[0], operands[1], operands[2], operands[3]))
847 DONE;
848@@ -18339,7 +18369,7 @@
849 (unspec:DI [(match_operand:BLK 1 "general_operand" "")
850 (match_operand:QI 2 "immediate_operand" "")
851 (match_operand 3 "immediate_operand" "")] UNSPEC_SCAS))]
852- ""
853+ "TARGET_64BIT"
854 {
855 if (ix86_expand_strlen (operands[0], operands[1], operands[2], operands[3]))
856 DONE;
857@@ -18362,7 +18392,8 @@
858 (match_operand:SI 4 "register_operand" "0")] UNSPEC_SCAS))
859 (clobber (match_operand:SI 1 "register_operand" "=D"))
860 (clobber (reg:CC FLAGS_REG))]
861- "!TARGET_64BIT"
862+ "!TARGET_64BIT
863+ && !(fixed_regs[AX_REG] || fixed_regs[CX_REG] || fixed_regs[DI_REG])"
864 "repnz{%;} scasb"
865 [(set_attr "type" "str")
866 (set_attr "mode" "QI")
867@@ -18376,7 +18407,8 @@
868 (match_operand:DI 4 "register_operand" "0")] UNSPEC_SCAS))
869 (clobber (match_operand:DI 1 "register_operand" "=D"))
870 (clobber (reg:CC FLAGS_REG))]
871- "TARGET_64BIT"
872+ "TARGET_64BIT
873+ && !(fixed_regs[AX_REG] || fixed_regs[CX_REG] || fixed_regs[DI_REG])"
874 "repnz{%;} scasb"
875 [(set_attr "type" "str")
876 (set_attr "mode" "QI")
877
878=== modified file 'gcc/config/lm32/t-lm32'
879--- gcc/config/lm32/t-lm32 2010-03-30 09:26:24 +0000
880+++ gcc/config/lm32/t-lm32 2011-08-11 11:29:04 +0000
881@@ -1,2 +1,2 @@
882 # for multilib
883-MULTILIB_OPTIONS = mmultiply-enabled mbarrel-shift-enabled
884+MULTILIB_OPTIONS = mbarrel-shift-enabled mmultiply-enabled mdivide-enabled msign-extend-enabled
885
886=== modified file 'gcc/config/pa/pa.md'
887--- gcc/config/pa/pa.md 2011-04-30 00:15:43 +0000
888+++ gcc/config/pa/pa.md 2011-08-11 11:29:04 +0000
889@@ -811,7 +811,7 @@
890 (match_operand:DI 3 "arith11_operand" "rI"))
891 (match_operand:DI 1 "register_operand" "r")))]
892 "TARGET_64BIT"
893- "sub%I3,* %3,%2,%%r0\;add,dc %%r0,%1,%0"
894+ "sub%I3 %3,%2,%%r0\;add,dc %%r0,%1,%0"
895 [(set_attr "type" "binary")
896 (set_attr "length" "8")])
897
898@@ -833,7 +833,7 @@
899 (match_operand:DI 3 "register_operand" "r"))
900 (match_operand:DI 1 "register_operand" "r")))]
901 "TARGET_64BIT"
902- "sub,* %2,%3,%%r0\;add,dc %%r0,%1,%0"
903+ "sub %2,%3,%%r0\;add,dc %%r0,%1,%0"
904 [(set_attr "type" "binary")
905 (set_attr "length" "8")])
906
907@@ -856,7 +856,7 @@
908 (match_operand:DI 3 "int11_operand" "I"))
909 (match_operand:DI 1 "register_operand" "r")))]
910 "TARGET_64BIT"
911- "addi,* %k3,%2,%%r0\;add,dc %%r0,%1,%0"
912+ "addi %k3,%2,%%r0\;add,dc %%r0,%1,%0"
913 [(set_attr "type" "binary")
914 (set_attr "length" "8")])
915
916@@ -902,7 +902,7 @@
917 (gtu:DI (match_operand:DI 2 "register_operand" "r")
918 (match_operand:DI 3 "arith11_operand" "rI"))))]
919 "TARGET_64BIT"
920- "sub%I3,* %3,%2,%%r0\;sub,db %1,%%r0,%0"
921+ "sub%I3 %3,%2,%%r0\;sub,db %1,%%r0,%0"
922 [(set_attr "type" "binary")
923 (set_attr "length" "8")])
924
925@@ -924,7 +924,7 @@
926 (match_operand:DI 3 "arith11_operand" "rI")))
927 (match_operand:DI 4 "register_operand" "r")))]
928 "TARGET_64BIT"
929- "sub%I3,* %3,%2,%%r0\;sub,db %1,%4,%0"
930+ "sub%I3 %3,%2,%%r0\;sub,db %1,%4,%0"
931 [(set_attr "type" "binary")
932 (set_attr "length" "8")])
933
934@@ -946,7 +946,7 @@
935 (ltu:DI (match_operand:DI 2 "register_operand" "r")
936 (match_operand:DI 3 "register_operand" "r"))))]
937 "TARGET_64BIT"
938- "sub,* %2,%3,%%r0\;sub,db %1,%%r0,%0"
939+ "sub %2,%3,%%r0\;sub,db %1,%%r0,%0"
940 [(set_attr "type" "binary")
941 (set_attr "length" "8")])
942
943@@ -968,7 +968,7 @@
944 (match_operand:DI 3 "register_operand" "r")))
945 (match_operand:DI 4 "register_operand" "r")))]
946 "TARGET_64BIT"
947- "sub,* %2,%3,%%r0\;sub,db %1,%4,%0"
948+ "sub %2,%3,%%r0\;sub,db %1,%4,%0"
949 [(set_attr "type" "binary")
950 (set_attr "length" "8")])
951
952@@ -991,7 +991,7 @@
953 (leu:DI (match_operand:DI 2 "register_operand" "r")
954 (match_operand:DI 3 "int11_operand" "I"))))]
955 "TARGET_64BIT"
956- "addi,* %k3,%2,%%r0\;sub,db %1,%%r0,%0"
957+ "addi %k3,%2,%%r0\;sub,db %1,%%r0,%0"
958 [(set_attr "type" "binary")
959 (set_attr "length" "8")])
960
961@@ -1013,7 +1013,7 @@
962 (match_operand:DI 3 "int11_operand" "I")))
963 (match_operand:DI 4 "register_operand" "r")))]
964 "TARGET_64BIT"
965- "addi,* %k3,%2,%%r0\;sub,db %1,%4,%0"
966+ "addi %k3,%2,%%r0\;sub,db %1,%4,%0"
967 [(set_attr "type" "binary")
968 (set_attr "length" "8")])
969
970@@ -7126,7 +7126,7 @@
971 {
972 rtx index = gen_reg_rtx (SImode);
973
974- operands[1] = GEN_INT (-INTVAL (operands[1]));
975+ operands[1] = gen_int_mode (-INTVAL (operands[1]), SImode);
976 if (!INT_14_BITS (operands[1]))
977 operands[1] = force_reg (SImode, operands[1]);
978 emit_insn (gen_addsi3 (index, operands[0], operands[1]));
979
980=== modified file 'gcc/config/rs6000/altivec.md'
981--- gcc/config/rs6000/altivec.md 2011-02-04 16:31:48 +0000
982+++ gcc/config/rs6000/altivec.md 2011-08-11 11:29:04 +0000
983@@ -497,7 +497,7 @@
984 [(set (match_operand:VM 0 "altivec_register_operand" "=v")
985 (if_then_else:VM
986 (ne:CC (match_operand:VM 1 "altivec_register_operand" "v")
987- (const_int 0))
988+ (match_operand:VM 4 "zero_constant" ""))
989 (match_operand:VM 2 "altivec_register_operand" "v")
990 (match_operand:VM 3 "altivec_register_operand" "v")))]
991 "VECTOR_MEM_ALTIVEC_P (<MODE>mode)"
992@@ -508,7 +508,7 @@
993 [(set (match_operand:VM 0 "altivec_register_operand" "=v")
994 (if_then_else:VM
995 (ne:CCUNS (match_operand:VM 1 "altivec_register_operand" "v")
996- (const_int 0))
997+ (match_operand:VM 4 "zero_constant" ""))
998 (match_operand:VM 2 "altivec_register_operand" "v")
999 (match_operand:VM 3 "altivec_register_operand" "v")))]
1000 "VECTOR_MEM_ALTIVEC_P (<MODE>mode)"
1001
1002=== modified file 'gcc/config/rs6000/rs6000.c'
1003--- gcc/config/rs6000/rs6000.c 2011-05-26 14:33:37 +0000
1004+++ gcc/config/rs6000/rs6000.c 2011-08-11 11:29:04 +0000
1005@@ -16007,7 +16007,7 @@
1006 op_false = tmp;
1007 }
1008
1009- cond2 = gen_rtx_fmt_ee (NE, cc_mode, mask, const0_rtx);
1010+ cond2 = gen_rtx_fmt_ee (NE, cc_mode, mask, CONST0_RTX (dest_mode));
1011 emit_insn (gen_rtx_SET (VOIDmode,
1012 dest,
1013 gen_rtx_IF_THEN_ELSE (dest_mode,
1014
1015=== modified file 'gcc/config/rs6000/vector.md'
1016--- gcc/config/rs6000/vector.md 2011-02-04 16:31:48 +0000
1017+++ gcc/config/rs6000/vector.md 2011-08-11 11:29:04 +0000
1018@@ -447,21 +447,21 @@
1019 [(set (match_operand:VEC_L 0 "vlogical_operand" "")
1020 (if_then_else:VEC_L
1021 (ne:CC (match_operand:VEC_L 3 "vlogical_operand" "")
1022- (const_int 0))
1023+ (match_dup 4))
1024 (match_operand:VEC_L 2 "vlogical_operand" "")
1025 (match_operand:VEC_L 1 "vlogical_operand" "")))]
1026 "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
1027- "")
1028+ "operands[4] = CONST0_RTX (<MODE>mode);")
1029
1030 (define_expand "vector_select_<mode>_uns"
1031 [(set (match_operand:VEC_L 0 "vlogical_operand" "")
1032 (if_then_else:VEC_L
1033 (ne:CCUNS (match_operand:VEC_L 3 "vlogical_operand" "")
1034- (const_int 0))
1035+ (match_dup 4))
1036 (match_operand:VEC_L 2 "vlogical_operand" "")
1037 (match_operand:VEC_L 1 "vlogical_operand" "")))]
1038 "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
1039- "")
1040+ "operands[4] = CONST0_RTX (<MODE>mode);")
1041
1042 ;; Expansions that compare vectors producing a vector result and a predicate,
1043 ;; setting CR6 to indicate a combined status
1044
1045=== modified file 'gcc/config/rs6000/vsx.md'
1046--- gcc/config/rs6000/vsx.md 2011-02-04 16:31:48 +0000
1047+++ gcc/config/rs6000/vsx.md 2011-08-11 11:29:04 +0000
1048@@ -844,7 +844,7 @@
1049 [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?wa")
1050 (if_then_else:VSX_L
1051 (ne:CC (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,wa")
1052- (const_int 0))
1053+ (match_operand:VSX_L 4 "zero_constant" ""))
1054 (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,wa")
1055 (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,wa")))]
1056 "VECTOR_MEM_VSX_P (<MODE>mode)"
1057@@ -855,7 +855,7 @@
1058 [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?wa")
1059 (if_then_else:VSX_L
1060 (ne:CCUNS (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,wa")
1061- (const_int 0))
1062+ (match_operand:VSX_L 4 "zero_constant" ""))
1063 (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,wa")
1064 (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,wa")))]
1065 "VECTOR_MEM_VSX_P (<MODE>mode)"
1066
1067=== modified file 'gcc/config/sparc/sol2-64.h'
1068--- gcc/config/sparc/sol2-64.h 2010-03-02 23:35:12 +0000
1069+++ gcc/config/sparc/sol2-64.h 2011-08-11 11:29:04 +0000
1070@@ -1,7 +1,7 @@
1071 /* Definitions of target machine for GCC, for bi-arch SPARC
1072 running Solaris 2, defaulting to 64-bit code generation.
1073
1074- Copyright (C) 1999, 2010 Free Software Foundation, Inc.
1075+ Copyright (C) 1999, 2010, 2011 Free Software Foundation, Inc.
1076
1077 This file is part of GCC.
1078
1079@@ -19,7 +19,4 @@
1080 along with GCC; see the file COPYING3. If not see
1081 <http://www.gnu.org/licenses/>. */
1082
1083-#undef TARGET_DEFAULT
1084-#define TARGET_DEFAULT \
1085- (MASK_V9 + MASK_PTR64 + MASK_64BIT /* + MASK_HARD_QUAD */ + \
1086- MASK_STACK_BIAS + MASK_APP_REGS + MASK_FPU + MASK_LONG_DOUBLE_128)
1087+#define TARGET_64BIT_DEFAULT 1
1088
1089=== modified file 'gcc/config/sparc/sol2.h'
1090--- gcc/config/sparc/sol2.h 2010-11-20 22:05:08 +0000
1091+++ gcc/config/sparc/sol2.h 2011-08-11 11:29:04 +0000
1092@@ -153,11 +153,18 @@
1093 #undef SUN_INTEGER_MULTIPLY_64
1094 #define SUN_INTEGER_MULTIPLY_64 1
1095
1096-/* Solaris allows 64 bit out and global registers in 32 bit mode.
1097- sparc_override_options will disable V8+ if not generating V9 code. */
1098+/* Solaris allows 64-bit out and global registers to be used in 32-bit mode.
1099+ sparc_override_options will disable V8+ if either not generating V9 code
1100+ or generating 64-bit code. */
1101 #undef TARGET_DEFAULT
1102-#define TARGET_DEFAULT (MASK_V8PLUS + MASK_APP_REGS + MASK_FPU \
1103- + MASK_LONG_DOUBLE_128)
1104+#ifdef TARGET_64BIT_DEFAULT
1105+#define TARGET_DEFAULT \
1106+ (MASK_V9 + MASK_64BIT + MASK_PTR64 + MASK_STACK_BIAS + \
1107+ MASK_V8PLUS + MASK_APP_REGS + MASK_FPU + MASK_LONG_DOUBLE_128)
1108+#else
1109+#define TARGET_DEFAULT \
1110+ (MASK_V8PLUS + MASK_APP_REGS + MASK_FPU + MASK_LONG_DOUBLE_128)
1111+#endif
1112
1113 /* Solaris-specific #pragmas are implemented on top of attributes. Hook in
1114 the bits from config/sol2.c. */
1115
1116=== modified file 'gcc/cp/ChangeLog'
1117--- gcc/cp/ChangeLog 2011-06-27 01:13:33 +0000
1118+++ gcc/cp/ChangeLog 2011-08-11 11:29:04 +0000
1119@@ -1,3 +1,13 @@
1120+2011-07-19 Jakub Jelinek <jakub@redhat.com>
1121+
1122+ Backport from mainline
1123+ 2011-07-07 Jakub Jelinek <jakub@redhat.com>
1124+
1125+ PR c/49644
1126+ * typeck.c (cp_build_binary_op): For MULT_EXPR and TRUNC_DIV_EXPR with
1127+ one non-complex and one complex argument, call save_expr on both
1128+ operands.
1129+
1130 2011-06-23 Jason Merrill <jason@redhat.com>
1131
1132 PR c++/49440
1133
1134=== modified file 'gcc/cp/typeck.c'
1135--- gcc/cp/typeck.c 2011-04-28 16:13:24 +0000
1136+++ gcc/cp/typeck.c 2011-08-11 11:29:04 +0000
1137@@ -4305,6 +4305,7 @@
1138 {
1139 case MULT_EXPR:
1140 case TRUNC_DIV_EXPR:
1141+ op1 = save_expr (op1);
1142 imag = build2 (resultcode, real_type, imag, op1);
1143 /* Fall through. */
1144 case PLUS_EXPR:
1145@@ -4323,6 +4324,7 @@
1146 switch (code)
1147 {
1148 case MULT_EXPR:
1149+ op0 = save_expr (op0);
1150 imag = build2 (resultcode, real_type, op0, imag);
1151 /* Fall through. */
1152 case PLUS_EXPR:
1153
1154=== modified file 'gcc/expr.c'
1155--- gcc/expr.c 2011-07-14 11:52:06 +0000
1156+++ gcc/expr.c 2011-08-11 11:29:04 +0000
1157@@ -8070,7 +8070,10 @@
1158 op1 = gen_label_rtx ();
1159 jumpifnot_1 (code, treeop0, treeop1, op1, -1);
1160
1161- emit_move_insn (target, const1_rtx);
1162+ if (TYPE_PRECISION (type) == 1 && !TYPE_UNSIGNED (type))
1163+ emit_move_insn (target, constm1_rtx);
1164+ else
1165+ emit_move_insn (target, const1_rtx);
1166
1167 emit_label (op1);
1168 return target;
1169@@ -10006,7 +10009,8 @@
1170
1171 if ((code == NE || code == EQ)
1172 && TREE_CODE (arg0) == BIT_AND_EXPR && integer_zerop (arg1)
1173- && integer_pow2p (TREE_OPERAND (arg0, 1)))
1174+ && integer_pow2p (TREE_OPERAND (arg0, 1))
1175+ && (TYPE_PRECISION (ops->type) != 1 || TYPE_UNSIGNED (ops->type)))
1176 {
1177 tree type = lang_hooks.types.type_for_mode (mode, unsignedp);
1178 return expand_expr (fold_single_bit_test (loc,
1179@@ -10026,7 +10030,9 @@
1180
1181 /* Try a cstore if possible. */
1182 return emit_store_flag_force (target, code, op0, op1,
1183- operand_mode, unsignedp, 1);
1184+ operand_mode, unsignedp,
1185+ (TYPE_PRECISION (ops->type) == 1
1186+ && !TYPE_UNSIGNED (ops->type)) ? -1 : 1);
1187 }
1188
1189
1190
1191
1192=== modified file 'gcc/fortran/ChangeLog'
1193--- gcc/fortran/ChangeLog 2011-06-02 09:09:53 +0000
1194+++ gcc/fortran/ChangeLog 2011-08-11 11:29:04 +0000
1195@@ -1,3 +1,8 @@
1196+2011-07-23 Janus Weil <janus@gcc.gnu.org>
1197+
1198+ PR fortran/49708
1199+ * resolve.c (resolve_allocate_expr): Fix diagnostics for pointers.
1200+
1201 2011-06-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1202
1203 Backport from trunk
1204
1205=== modified file 'gcc/fortran/resolve.c'
1206--- gcc/fortran/resolve.c 2011-01-25 17:01:06 +0000
1207+++ gcc/fortran/resolve.c 2011-08-11 11:29:04 +0000
1208@@ -6402,7 +6402,7 @@
1209 }
1210 }
1211
1212- if (pointer || dimension == 0)
1213+ if (dimension == 0)
1214 return SUCCESS;
1215
1216 /* Make sure the next-to-last reference node is an array specification. */
1217
1218=== modified file 'gcc/gimplify.c'
1219--- gcc/gimplify.c 2011-07-13 13:36:36 +0000
1220+++ gcc/gimplify.c 2011-08-11 11:29:04 +0000
1221@@ -1953,8 +1953,14 @@
1222 ret = MIN (ret, tret);
1223 }
1224 }
1225+ else
1226+ {
1227+ tret = gimplify_expr (&TREE_OPERAND (t, 2), pre_p, post_p,
1228+ is_gimple_reg, fb_rvalue);
1229+ ret = MIN (ret, tret);
1230+ }
1231
1232- if (!TREE_OPERAND (t, 3))
1233+ if (TREE_OPERAND (t, 3) == NULL_TREE)
1234 {
1235 tree elmt_type = TREE_TYPE (TREE_TYPE (TREE_OPERAND (t, 0)));
1236 tree elmt_size = unshare_expr (array_ref_element_size (t));
1237@@ -1973,11 +1979,17 @@
1238 ret = MIN (ret, tret);
1239 }
1240 }
1241+ else
1242+ {
1243+ tret = gimplify_expr (&TREE_OPERAND (t, 3), pre_p, post_p,
1244+ is_gimple_reg, fb_rvalue);
1245+ ret = MIN (ret, tret);
1246+ }
1247 }
1248 else if (TREE_CODE (t) == COMPONENT_REF)
1249 {
1250 /* Set the field offset into T and gimplify it. */
1251- if (!TREE_OPERAND (t, 2))
1252+ if (TREE_OPERAND (t, 2) == NULL_TREE)
1253 {
1254 tree offset = unshare_expr (component_ref_field_offset (t));
1255 tree field = TREE_OPERAND (t, 1);
1256@@ -1996,6 +2008,12 @@
1257 ret = MIN (ret, tret);
1258 }
1259 }
1260+ else
1261+ {
1262+ tret = gimplify_expr (&TREE_OPERAND (t, 2), pre_p, post_p,
1263+ is_gimple_reg, fb_rvalue);
1264+ ret = MIN (ret, tret);
1265+ }
1266 }
1267 }
1268
1269@@ -2496,7 +2514,9 @@
1270 new_locus);
1271 append_to_statement_list (t, &expr);
1272 }
1273- else if (TREE_CODE (pred) == COND_EXPR)
1274+ else if (TREE_CODE (pred) == COND_EXPR
1275+ && !VOID_TYPE_P (TREE_TYPE (TREE_OPERAND (pred, 1)))
1276+ && !VOID_TYPE_P (TREE_TYPE (TREE_OPERAND (pred, 2))))
1277 {
1278 location_t new_locus;
1279
1280@@ -2504,7 +2524,10 @@
1281 if (a)
1282 if (b) goto yes; else goto no;
1283 else
1284- if (c) goto yes; else goto no; */
1285+ if (c) goto yes; else goto no;
1286+
1287+ Don't do this if one of the arms has void type, which can happen
1288+ in C++ when the arm is throw. */
1289
1290 /* Keep the original source location on the first 'if'. Set the source
1291 location of the ? on the second 'if'. */
1292
1293=== modified file 'gcc/testsuite/ChangeLog'
1294--- gcc/testsuite/ChangeLog 2011-06-28 21:56:48 +0000
1295+++ gcc/testsuite/ChangeLog 2011-08-11 11:29:04 +0000
1296@@ -1,3 +1,138 @@
1297+2011-07-31 Uros Bizjak <ubizjak@gmail.com>
1298+
1299+ PR target/49920
1300+ * gcc.target/i386/pr49920.c: New test.
1301+
1302+2011-07-27 Tobias Burnus <burnus@net-b.de>
1303+
1304+ Backported from mainline
1305+ 2011-07-23 Tobias Burnus <burnus@net-b.de>
1306+
1307+ PR fortran/49791
1308+ * gfortran.dg/namelist_72.f: New.
1309+
1310+2011-07-27 Uros Bizjak <ubizjak@gmail.com>
1311+
1312+ * gcc.target/i386/avx-os-support.h: New.
1313+ * gcc.target/i386/avx-check.h: Include avx-os-support.h
1314+ (main): Check avx_os_support before the test is run.
1315+ * gcc.target/i386/aes-avx-check.h: Ditto.
1316+ * gcc.target/i386/pclmul-avx-check.h: Ditto.
1317+
1318+2011-07-23 Janus Weil <janus@gcc.gnu.org>
1319+
1320+ PR fortran/49708
1321+ * gfortran.dg/allocate_error_3.f90: New.
1322+
1323+2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1324+
1325+ PR debug/47393
1326+ * g++.dg/debug/dwarf2/icf.C: XFAIL some scan-assembler on
1327+ mips-sgi-irix*.
1328+
1329+2011-07-21 Uros Bizjak <ubizjak@gmail.com>
1330+
1331+ * lib/target-supports.exp (check_avx_os_support_available): New.
1332+ (check_effective_target_avx_runtime): Use it.
1333+
1334+2011-07-19 Jakub Jelinek <jakub@redhat.com>
1335+
1336+ Backport from mainline
1337+ 2011-07-08 Jakub Jelinek <jakub@redhat.com>
1338+
1339+ PR target/49621
1340+ * gcc.target/powerpc/altivec-34.c: New test.
1341+
1342+ 2011-07-07 Jakub Jelinek <jakub@redhat.com>
1343+
1344+ PR c/49644
1345+ * g++.dg/torture/pr49644.C: New test.
1346+
1347+ PR c/49644
1348+ * gcc.c-torture/execute/pr49644.c: New test.
1349+
1350+ PR middle-end/49640
1351+ * gcc.dg/gomp/pr49640.c: New test.
1352+
1353+ 2011-07-04 Jakub Jelinek <jakub@redhat.com>
1354+
1355+ PR rtl-optimization/49619
1356+ * gcc.dg/pr49619.c: New test.
1357+
1358+ 2011-05-27 Jakub Jelinek <jakub@redhat.com>
1359+
1360+ PR c++/49165
1361+ * g++.dg/eh/cond6.C: New test.
1362+
1363+ 2011-05-26 Jakub Jelinek <jakub@redhat.com>
1364+
1365+ PR c++/49165
1366+ * g++.dg/eh/cond5.C: New test.
1367+
1368+ PR tree-optimization/49161
1369+ * gcc.c-torture/execute/pr49161.c: New test.
1370+
1371+ 2011-05-23 Jakub Jelinek <jakub@redhat.com>
1372+
1373+ PR c/49120
1374+ * c-decl.c (start_decl): Convert expr to void_type_node.
1375+
1376+ PR middle-end/48973
1377+ * gcc.c-torture/execute/pr48973-1.c: New test.
1378+ * gcc.c-torture/execute/pr48973-2.c: New test.
1379+
1380+ 2011-05-18 Jakub Jelinek <jakub@redhat.com>
1381+
1382+ PR tree-optimization/49039
1383+ * gcc.c-torture/execute/pr49039.c: New test.
1384+ * gcc.dg/tree-ssa/pr49039.c: New test.
1385+ * g++.dg/torture/pr49039.C: New test.
1386+
1387+2011-07-15 Jason Merrill <jason@redhat.com>
1388+
1389+ PR testsuite/49643
1390+ * g++.dg/rtti/anon-ns1.C: Allow for null-termination.
1391+
1392+2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1393+
1394+ * gcc.target/sparc/cas64.c: New test.
1395+
1396+2011-07-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1397+
1398+ * ada/acats/run_acats (which): Extract last field from type -p,
1399+ type output only if command succeeded.
1400+
1401+2011-07-04 Richard Guenther <rguenther@suse.de>
1402+
1403+ Backport from mainline
1404+ 2011-05-02 Richard Guenther <rguenther@suse.de>
1405+
1406+ PR tree-optimization/48822
1407+ * gcc.dg/torture/pr48822.c: New testcase.
1408+
1409+2011-07-04 Richard Guenther <rguenther@suse.de>
1410+
1411+ Backport from mainline
1412+ 2011-05-23 Richard Guenther <rguenther@suse.de>
1413+
1414+ PR tree-optimization/49115
1415+ * g++.dg/torture/pr49115.C: New testcase.
1416+
1417+2011-07-04 Richard Guenther <rguenther@suse.de>
1418+
1419+ PR tree-optimization/49615
1420+ * g++.dg/torture/pr49615.C: New testcase.
1421+
1422+2011-06-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1423+
1424+ PR ada/49511
1425+ * ada/acats/run_acats (which): Use last field of type -p output.
1426+
1427+2011-06-30 Richard Guenther <rguenther@suse.de>
1428+
1429+ PR tree-optimization/38752
1430+ * gcc.c-torture/compile/pr38752.c: New testcase.
1431+
1432 2011-06-28 Eric Botcazou <ebotcazou@adacore.com>
1433
1434 * gnat.dg/opt17.ad[sb]: New test.
1435
1436=== modified file 'gcc/testsuite/ada/acats/run_acats'
1437--- gcc/testsuite/ada/acats/run_acats 2010-12-06 16:11:05 +0000
1438+++ gcc/testsuite/ada/acats/run_acats 2011-08-11 11:29:04 +0000
1439@@ -10,12 +10,12 @@
1440 # type -p is missing from Solaris 2 /bin/sh and /bin/ksh (ksh88), but both
1441 # ksh93 and bash have it.
1442 # type output format differs between ksh88 and ksh93, so avoid it if
1443-# type -p is present.
1444+# type -p is present. Unfortunately, HP-UX /bin/sh ignores -p with type.
1445 # Fall back to whence which ksh88 and ksh93 provide, but bash does not.
1446
1447 which () {
1448- path=`type -p $* 2>/dev/null` && { echo $path; return 0; }
1449- path=`type $* 2>/dev/null | awk '{print $NF}'` && { echo $path; return 0; }
1450+ path=`type -p $* 2>/dev/null` && { echo $path | awk '{print $NF}'; return 0; }
1451+ path=`type $* 2>/dev/null` && { echo $path | awk '{print $NF}'; return 0; }
1452 path=`whence $* 2>/dev/null` && { echo $path; return 0; }
1453 return 1
1454 }
1455
1456=== modified file 'gcc/testsuite/g++.dg/debug/dwarf2/icf.C'
1457--- gcc/testsuite/g++.dg/debug/dwarf2/icf.C 2009-10-08 20:00:04 +0000
1458+++ gcc/testsuite/g++.dg/debug/dwarf2/icf.C 2011-08-11 11:29:04 +0000
1459@@ -40,11 +40,11 @@
1460
1461 // Verify that we get .debug_dcall and .debug_vcall tables generated
1462 // and that we see entries for both virtual calls.
1463-// { dg-final { scan-assembler "\\.section.*\.debug_dcall" } }
1464+// { dg-final { scan-assembler "\\.section.*\.debug_dcall" { xfail mips-sgi-irix* } } }
1465 // { dg-final { scan-assembler "\\.section.*\.debug_vcall" } }
1466-// { dg-final { scan-assembler "New caller" } }
1467-// { dg-final { scan-assembler "Caller DIE offset" } }
1468+// { dg-final { scan-assembler "New caller" { xfail mips-sgi-irix* } } }
1469+// { dg-final { scan-assembler "Caller DIE offset" { xfail mips-sgi-irix* } } }
1470 // { dg-final { scan-assembler "Point of call" } }
1471-// { dg-final { scan-assembler "Callee DIE offset" } }
1472+// { dg-final { scan-assembler "Callee DIE offset" { xfail mips-sgi-irix* } } }
1473 // { dg-final { scan-assembler "0x0.*Vtable slot" } }
1474 // { dg-final { scan-assembler "0x1.*Vtable slot" } }
1475
1476=== added file 'gcc/testsuite/g++.dg/eh/cond5.C'
1477--- gcc/testsuite/g++.dg/eh/cond5.C 1970-01-01 00:00:00 +0000
1478+++ gcc/testsuite/g++.dg/eh/cond5.C 2011-08-11 11:29:04 +0000
1479@@ -0,0 +1,43 @@
1480+// PR c++/49165
1481+// { dg-do run }
1482+
1483+extern "C" void abort ();
1484+
1485+int
1486+foo (bool x, int y)
1487+{
1488+ if (y < 10 && (x ? true : throw 1))
1489+ y++;
1490+ if (y > 20 || (x ? true : throw 2))
1491+ y++;
1492+ return y;
1493+}
1494+
1495+int
1496+main ()
1497+{
1498+ if (foo (true, 0) != 2
1499+ || foo (true, 10) != 11
1500+ || foo (false, 30) != 31)
1501+ abort ();
1502+ try
1503+ {
1504+ foo (false, 0);
1505+ abort ();
1506+ }
1507+ catch (int i)
1508+ {
1509+ if (i != 1)
1510+ abort ();
1511+ }
1512+ try
1513+ {
1514+ foo (false, 10);
1515+ abort ();
1516+ }
1517+ catch (int i)
1518+ {
1519+ if (i != 2)
1520+ abort ();
1521+ }
1522+}
1523
1524=== added file 'gcc/testsuite/g++.dg/eh/cond6.C'
1525--- gcc/testsuite/g++.dg/eh/cond6.C 1970-01-01 00:00:00 +0000
1526+++ gcc/testsuite/g++.dg/eh/cond6.C 2011-08-11 11:29:04 +0000
1527@@ -0,0 +1,43 @@
1528+// PR c++/49165
1529+// { dg-do run }
1530+
1531+extern "C" void abort ();
1532+
1533+int
1534+foo (bool x, int y)
1535+{
1536+ if (y < 10 && (x ? 1 : throw 1))
1537+ y++;
1538+ if (y > 20 || (x ? 1 : throw 2))
1539+ y++;
1540+ return y;
1541+}
1542+
1543+int
1544+main ()
1545+{
1546+ if (foo (true, 0) != 2
1547+ || foo (true, 10) != 11
1548+ || foo (false, 30) != 31)
1549+ abort ();
1550+ try
1551+ {
1552+ foo (false, 0);
1553+ abort ();
1554+ }
1555+ catch (int i)
1556+ {
1557+ if (i != 1)
1558+ abort ();
1559+ }
1560+ try
1561+ {
1562+ foo (false, 10);
1563+ abort ();
1564+ }
1565+ catch (int i)
1566+ {
1567+ if (i != 2)
1568+ abort ();
1569+ }
1570+}
1571
1572=== modified file 'gcc/testsuite/g++.dg/rtti/anon-ns1.C'
1573--- gcc/testsuite/g++.dg/rtti/anon-ns1.C 2011-06-27 01:13:33 +0000
1574+++ gcc/testsuite/g++.dg/rtti/anon-ns1.C 2011-08-11 11:29:04 +0000
1575@@ -2,7 +2,7 @@
1576 // The typeinfo name for A should start with * so we compare
1577 // it by address rather than contents.
1578
1579-// { dg-final { scan-assembler "\"\*N\[^\"\]+1AE\"" } }
1580+// { dg-final { scan-assembler "\"\*N\[^\"\]+1AE" } }
1581
1582 namespace
1583 {
1584
1585=== added file 'gcc/testsuite/g++.dg/torture/pr49039.C'
1586--- gcc/testsuite/g++.dg/torture/pr49039.C 1970-01-01 00:00:00 +0000
1587+++ gcc/testsuite/g++.dg/torture/pr49039.C 2011-08-11 11:29:04 +0000
1588@@ -0,0 +1,76 @@
1589+// PR tree-optimization/49039
1590+// { dg-do run }
1591+
1592+template <class T1, class T2>
1593+struct pair
1594+{
1595+ T1 first;
1596+ T2 second;
1597+ pair (const T1 & a, const T2 & b):first (a), second (b) {}
1598+};
1599+
1600+template <class T1, class T2>
1601+inline pair <T1, T2>
1602+make_pair (T1 x, T2 y)
1603+{
1604+ return pair <T1, T2> (x, y);
1605+}
1606+
1607+typedef __SIZE_TYPE__ size_t;
1608+struct S
1609+{
1610+ const char *Data;
1611+ size_t Length;
1612+ static size_t min (size_t a, size_t b) { return a < b ? a : b; }
1613+ static size_t max (size_t a, size_t b) { return a > b ? a : b; }
1614+ S () :Data (0), Length (0) { }
1615+ S (const char *Str) : Data (Str), Length (__builtin_strlen (Str)) {}
1616+ S (const char *data, size_t length) : Data (data), Length (length) {}
1617+ bool empty () const { return Length == 0; }
1618+ size_t size () const { return Length; }
1619+ S slice (size_t Start, size_t End) const
1620+ {
1621+ Start = min (Start, Length);
1622+ End = min (max (Start, End), Length);
1623+ return S (Data + Start, End - Start);
1624+ }
1625+ pair <S, S> split (char Separator) const
1626+ {
1627+ size_t Idx = find (Separator);
1628+ if (Idx == ~size_t (0))
1629+ return make_pair (*this, S ());
1630+ return make_pair (slice (0, Idx), slice (Idx + 1, ~size_t (0)));
1631+ }
1632+ size_t find (char C, size_t From = 0) const
1633+ {
1634+ for (size_t i = min (From, Length), e = Length; i != e; ++i)
1635+ if (Data[i] == C)
1636+ return i;
1637+ return ~size_t (0);
1638+ }
1639+};
1640+
1641+void
1642+Test (const char *arg)
1643+{
1644+ S Desc (arg);
1645+ while (!Desc.empty ())
1646+ {
1647+ pair <S, S> Split = Desc.split ('-');
1648+ S Token = Split.first;
1649+ Desc = Split.second;
1650+ if (Token.empty ())
1651+ continue;
1652+ Split = Token.split (':');
1653+ S Specifier = Split.first;
1654+ if (Specifier.empty ())
1655+ __builtin_abort ();
1656+ }
1657+}
1658+
1659+int
1660+main ()
1661+{
1662+ Test ("-");
1663+ return 0;
1664+}
1665
1666=== added file 'gcc/testsuite/g++.dg/torture/pr49115.C'
1667--- gcc/testsuite/g++.dg/torture/pr49115.C 1970-01-01 00:00:00 +0000
1668+++ gcc/testsuite/g++.dg/torture/pr49115.C 2011-08-11 11:29:04 +0000
1669@@ -0,0 +1,25 @@
1670+// { dg-do run }
1671+
1672+extern "C" void abort (void);
1673+struct MyException {};
1674+struct Data {
1675+ int nr;
1676+ Data() : nr(66) {}
1677+};
1678+Data __attribute__((noinline,noclone)) getData(int i)
1679+{
1680+ if (i) throw MyException();
1681+ Data data;
1682+ data.nr = i;
1683+ return data;
1684+}
1685+int main(int, char **)
1686+{
1687+ Data data;
1688+ try {
1689+ data = getData(1);
1690+ } catch (MyException& e) {
1691+ if (data.nr != 66)
1692+ abort ();
1693+ }
1694+}
1695
1696=== added file 'gcc/testsuite/g++.dg/torture/pr49615.C'
1697--- gcc/testsuite/g++.dg/torture/pr49615.C 1970-01-01 00:00:00 +0000
1698+++ gcc/testsuite/g++.dg/torture/pr49615.C 2011-08-11 11:29:04 +0000
1699@@ -0,0 +1,29 @@
1700+/* { dg-do compile } */
1701+/* { dg-options "-g" } */
1702+
1703+template <class T>
1704+static inline bool Dispatch (T* obj, void (T::*func) ())
1705+{
1706+ (obj->*func) ();
1707+}
1708+class C
1709+{
1710+ bool f (int);
1711+ void g ();
1712+};
1713+bool C::f (int n)
1714+{
1715+ bool b;
1716+ switch (n)
1717+ {
1718+ case 0:
1719+ b = Dispatch (this, &C::g);
1720+ case 1:
1721+ b = Dispatch (this, &C::g);
1722+ }
1723+}
1724+void C::g ()
1725+{
1726+ for (;;) { }
1727+}
1728+
1729
1730=== added file 'gcc/testsuite/g++.dg/torture/pr49644.C'
1731--- gcc/testsuite/g++.dg/torture/pr49644.C 1970-01-01 00:00:00 +0000
1732+++ gcc/testsuite/g++.dg/torture/pr49644.C 2011-08-11 11:29:04 +0000
1733@@ -0,0 +1,17 @@
1734+// PR c/49644
1735+// { dg-do run }
1736+
1737+extern "C" void abort ();
1738+
1739+int
1740+main ()
1741+{
1742+ _Complex double a[12], *c = a, s = 3.0 + 1.0i;
1743+ double b[12] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }, *d = b;
1744+ int i;
1745+ for (i = 0; i < 6; i++)
1746+ *c++ = *d++ * s;
1747+ if (c != a + 6 || d != b + 6)
1748+ abort ();
1749+ return 0;
1750+}
1751
1752=== added file 'gcc/testsuite/gcc.c-torture/compile/pr38752.c'
1753--- gcc/testsuite/gcc.c-torture/compile/pr38752.c 1970-01-01 00:00:00 +0000
1754+++ gcc/testsuite/gcc.c-torture/compile/pr38752.c 2011-08-11 11:29:04 +0000
1755@@ -0,0 +1,25 @@
1756+typedef struct
1757+{
1758+ int baddr;
1759+} mstruct_t;
1760+
1761+static struct
1762+{
1763+ unsigned int mapnum;
1764+ mstruct_t unused;
1765+} mtab;
1766+
1767+static mstruct_t *mactab = &mtab.unused;
1768+
1769+int
1770+main(void)
1771+{
1772+ int i;
1773+ int addr;
1774+
1775+ for (i=1; i <= mtab.mapnum; i++)
1776+ if (addr < mactab[i].baddr)
1777+ break;
1778+ return 0;
1779+}
1780+
1781
1782=== added file 'gcc/testsuite/gcc.c-torture/execute/pr48973-1.c'
1783--- gcc/testsuite/gcc.c-torture/execute/pr48973-1.c 1970-01-01 00:00:00 +0000
1784+++ gcc/testsuite/gcc.c-torture/execute/pr48973-1.c 2011-08-11 11:29:04 +0000
1785@@ -0,0 +1,20 @@
1786+/* PR middle-end/48973 */
1787+
1788+extern void abort (void);
1789+struct S { int f : 1; } s;
1790+int v = -1;
1791+
1792+void
1793+foo (unsigned int x)
1794+{
1795+ if (x != -1U)
1796+ abort ();
1797+}
1798+
1799+int
1800+main ()
1801+{
1802+ s.f = (v & 1) > 0;
1803+ foo (s.f);
1804+ return 0;
1805+}
1806
1807=== added file 'gcc/testsuite/gcc.c-torture/execute/pr48973-2.c'
1808--- gcc/testsuite/gcc.c-torture/execute/pr48973-2.c 1970-01-01 00:00:00 +0000
1809+++ gcc/testsuite/gcc.c-torture/execute/pr48973-2.c 2011-08-11 11:29:04 +0000
1810@@ -0,0 +1,14 @@
1811+/* PR middle-end/48973 */
1812+
1813+extern void abort (void);
1814+struct S { int f : 1; } s;
1815+int v = -1;
1816+
1817+int
1818+main ()
1819+{
1820+ s.f = v < 0;
1821+ if ((unsigned int) s.f != -1U)
1822+ abort ();
1823+ return 0;
1824+}
1825
1826=== added file 'gcc/testsuite/gcc.c-torture/execute/pr49039.c'
1827--- gcc/testsuite/gcc.c-torture/execute/pr49039.c 1970-01-01 00:00:00 +0000
1828+++ gcc/testsuite/gcc.c-torture/execute/pr49039.c 2011-08-11 11:29:04 +0000
1829@@ -0,0 +1,26 @@
1830+/* PR tree-optimization/49039 */
1831+extern void abort (void);
1832+int cnt;
1833+
1834+__attribute__((noinline, noclone)) void
1835+foo (unsigned int x, unsigned int y)
1836+{
1837+ unsigned int minv, maxv;
1838+ if (x == 1 || y == -2U)
1839+ return;
1840+ minv = x < y ? x : y;
1841+ maxv = x > y ? x : y;
1842+ if (minv == 1)
1843+ ++cnt;
1844+ if (maxv == -2U)
1845+ ++cnt;
1846+}
1847+
1848+int
1849+main ()
1850+{
1851+ foo (-2U, 1);
1852+ if (cnt != 2)
1853+ abort ();
1854+ return 0;
1855+}
1856
1857=== added file 'gcc/testsuite/gcc.c-torture/execute/pr49161.c'
1858--- gcc/testsuite/gcc.c-torture/execute/pr49161.c 1970-01-01 00:00:00 +0000
1859+++ gcc/testsuite/gcc.c-torture/execute/pr49161.c 2011-08-11 11:29:04 +0000
1860@@ -0,0 +1,46 @@
1861+/* PR tree-optimization/49161 */
1862+
1863+extern void abort (void);
1864+
1865+int c;
1866+
1867+__attribute__((noinline, noclone)) void
1868+bar (int x)
1869+{
1870+ if (x != c++)
1871+ abort ();
1872+}
1873+
1874+__attribute__((noinline, noclone)) void
1875+foo (int x)
1876+{
1877+ switch (x)
1878+ {
1879+ case 3: goto l1;
1880+ case 4: goto l2;
1881+ case 6: goto l3;
1882+ default: return;
1883+ }
1884+l1:
1885+ goto l4;
1886+l2:
1887+ goto l4;
1888+l3:
1889+ bar (-1);
1890+l4:
1891+ bar (0);
1892+ if (x != 4)
1893+ bar (1);
1894+ if (x != 3)
1895+ bar (-1);
1896+ bar (2);
1897+}
1898+
1899+int
1900+main ()
1901+{
1902+ foo (3);
1903+ if (c != 3)
1904+ abort ();
1905+ return 0;
1906+}
1907
1908=== added file 'gcc/testsuite/gcc.c-torture/execute/pr49644.c'
1909--- gcc/testsuite/gcc.c-torture/execute/pr49644.c 1970-01-01 00:00:00 +0000
1910+++ gcc/testsuite/gcc.c-torture/execute/pr49644.c 2011-08-11 11:29:04 +0000
1911@@ -0,0 +1,16 @@
1912+/* PR c/49644 */
1913+
1914+extern void abort (void);
1915+
1916+int
1917+main ()
1918+{
1919+ _Complex double a[12], *c = a, s = 3.0 + 1.0i;
1920+ double b[12] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }, *d = b;
1921+ int i;
1922+ for (i = 0; i < 6; i++)
1923+ *c++ = *d++ * s;
1924+ if (c != a + 6 || d != b + 6)
1925+ abort ();
1926+ return 0;
1927+}
1928
1929=== added file 'gcc/testsuite/gcc.dg/gomp/pr49640.c'
1930--- gcc/testsuite/gcc.dg/gomp/pr49640.c 1970-01-01 00:00:00 +0000
1931+++ gcc/testsuite/gcc.dg/gomp/pr49640.c 2011-08-11 11:29:04 +0000
1932@@ -0,0 +1,29 @@
1933+/* PR middle-end/49640 */
1934+/* { dg-do compile } */
1935+/* { dg-options "-O2 -std=gnu99 -fopenmp" } */
1936+
1937+void
1938+foo (int N, int M, int K, int P, int Q, int R, int i, int j, int k,
1939+ unsigned char x[P][Q][R], int y[N][M][K])
1940+{
1941+ int ii, jj, kk;
1942+
1943+#pragma omp parallel for private(ii,jj,kk)
1944+ for (ii = 0; ii < P; ++ii)
1945+ for (jj = 0; jj < Q; ++jj)
1946+ for (kk = 0; kk < R; ++kk)
1947+ y[i + ii][j + jj][k + kk] = x[ii][jj][kk];
1948+}
1949+
1950+void
1951+bar (int N, int M, int K, int P, int Q, int R, int i, int j, int k,
1952+ unsigned char x[P][Q][R], float y[N][M][K], float factor, float zero)
1953+{
1954+ int ii, jj, kk;
1955+
1956+#pragma omp parallel for private(ii,jj,kk)
1957+ for (ii = 0; ii < P; ++ii)
1958+ for (jj = 0; jj < Q; ++jj)
1959+ for (kk = 0; kk < R; ++kk)
1960+ y[i + ii][j + jj][k + kk] = factor * x[ii][jj][kk] + zero;
1961+}
1962
1963=== added file 'gcc/testsuite/gcc.dg/pr49120.c'
1964--- gcc/testsuite/gcc.dg/pr49120.c 1970-01-01 00:00:00 +0000
1965+++ gcc/testsuite/gcc.dg/pr49120.c 2011-08-11 11:29:04 +0000
1966@@ -0,0 +1,11 @@
1967+/* PR c/49120 */
1968+/* { dg-do compile } */
1969+/* { dg-options "-Wall" } */
1970+
1971+int
1972+main ()
1973+{
1974+ int a = 1;
1975+ int c = ({ char b[a + 1]; b[0] = 0; b[0]; });
1976+ return c;
1977+}
1978
1979=== added file 'gcc/testsuite/gcc.dg/pr49619.c'
1980--- gcc/testsuite/gcc.dg/pr49619.c 1970-01-01 00:00:00 +0000
1981+++ gcc/testsuite/gcc.dg/pr49619.c 2011-08-11 11:29:04 +0000
1982@@ -0,0 +1,13 @@
1983+/* PR rtl-optimization/49619 */
1984+/* { dg-do compile } */
1985+/* { dg-options "-O -fno-tree-fre" } */
1986+
1987+extern int a, b;
1988+
1989+void
1990+foo (int x)
1991+{
1992+ a = 2;
1993+ b = 0;
1994+ b = (a && ((a = 1, 0 >= b) || (short) (x + (b & x))));
1995+}
1996
1997=== added file 'gcc/testsuite/gcc.dg/torture/pr48822.c'
1998--- gcc/testsuite/gcc.dg/torture/pr48822.c 1970-01-01 00:00:00 +0000
1999+++ gcc/testsuite/gcc.dg/torture/pr48822.c 2011-08-11 11:29:04 +0000
2000@@ -0,0 +1,20 @@
2001+/* { dg-do compile } */
2002+
2003+void foo (int *, int *);
2004+int bar ()
2005+{
2006+ int a = 0;
2007+ int b = 0;
2008+ if (b != 0)
2009+ {
2010+ int ax = a;
2011+ int bx = b;
2012+ while (bx != 0)
2013+ {
2014+ int tem = ax % bx;
2015+ ax = bx;
2016+ bx = tem;
2017+ }
2018+ }
2019+ foo (&a, &b);
2020+}
2021
2022=== added file 'gcc/testsuite/gcc.dg/tree-ssa/pr49039.c'
2023--- gcc/testsuite/gcc.dg/tree-ssa/pr49039.c 1970-01-01 00:00:00 +0000
2024+++ gcc/testsuite/gcc.dg/tree-ssa/pr49039.c 2011-08-11 11:29:04 +0000
2025@@ -0,0 +1,31 @@
2026+/* PR tree-optimization/49039 */
2027+/* { dg-do compile } */
2028+/* { dg-options "-O2 -fdump-tree-vrp1" } */
2029+
2030+extern void bar (void);
2031+
2032+void
2033+foo (unsigned int x, unsigned int y)
2034+{
2035+ unsigned int minv, maxv;
2036+ if (x >= 3 && x <= 6)
2037+ return;
2038+ if (y >= 5 && y <= 8)
2039+ return;
2040+ minv = x < y ? x : y;
2041+ maxv = x > y ? x : y;
2042+ if (minv == 5)
2043+ bar ();
2044+ if (minv == 6)
2045+ bar ();
2046+ if (maxv == 5)
2047+ bar ();
2048+ if (maxv == 6)
2049+ bar ();
2050+}
2051+
2052+/* { dg-final { scan-tree-dump "Folding predicate minv_\[0-9\]* == 5 to 0" "vrp1" } } */
2053+/* { dg-final { scan-tree-dump "Folding predicate minv_\[0-9\]* == 6 to 0" "vrp1" } } */
2054+/* { dg-final { scan-tree-dump "Folding predicate maxv_\[0-9\]* == 5 to 0" "vrp1" } } */
2055+/* { dg-final { scan-tree-dump "Folding predicate maxv_\[0-9\]* == 6 to 0" "vrp1" } } */
2056+/* { dg-final { cleanup-tree-dump "vrp1" } } */
2057
2058=== modified file 'gcc/testsuite/gcc.target/i386/aes-avx-check.h'
2059--- gcc/testsuite/gcc.target/i386/aes-avx-check.h 2010-06-07 10:08:46 +0000
2060+++ gcc/testsuite/gcc.target/i386/aes-avx-check.h 2011-08-11 11:29:04 +0000
2061@@ -3,6 +3,7 @@
2062 #endif
2063 #include <stdlib.h>
2064 #include "cpuid.h"
2065+#include "avx-os-support.h"
2066
2067 static void aes_avx_test (void);
2068
2069@@ -22,7 +23,9 @@
2070 return 0;
2071
2072 /* Run AES + AVX test only if host has AES + AVX support. */
2073- if ((ecx & (bit_AVX | bit_AES)) == (bit_AVX | bit_AES))
2074+ if (((ecx & (bit_AVX | bit_OSXSAVE | bit_AES))
2075+ == (bit_AVX | bit_OSXSAVE | bit_AES))
2076+ && avx_os_support ())
2077 {
2078 do_test ();
2079 #ifdef DEBUG
2080
2081=== modified file 'gcc/testsuite/gcc.target/i386/avx-check.h'
2082--- gcc/testsuite/gcc.target/i386/avx-check.h 2011-02-07 13:15:14 +0000
2083+++ gcc/testsuite/gcc.target/i386/avx-check.h 2011-08-11 11:29:04 +0000
2084@@ -1,6 +1,7 @@
2085 #include <stdlib.h>
2086 #include "cpuid.h"
2087 #include "m256-check.h"
2088+#include "avx-os-support.h"
2089
2090 static void avx_test (void);
2091
2092@@ -20,7 +21,8 @@
2093 return 0;
2094
2095 /* Run AVX test only if host has AVX support. */
2096- if ((ecx & (bit_AVX | bit_OSXSAVE)) == (bit_AVX | bit_OSXSAVE))
2097+ if (((ecx & (bit_AVX | bit_OSXSAVE)) == (bit_AVX | bit_OSXSAVE))
2098+ && avx_os_support ())
2099 {
2100 do_test ();
2101 #ifdef DEBUG
2102
2103=== added file 'gcc/testsuite/gcc.target/i386/avx-os-support.h'
2104--- gcc/testsuite/gcc.target/i386/avx-os-support.h 1970-01-01 00:00:00 +0000
2105+++ gcc/testsuite/gcc.target/i386/avx-os-support.h 2011-08-11 11:29:04 +0000
2106@@ -0,0 +1,10 @@
2107+/* Check if the OS supports executing AVX instructions. */
2108+
2109+static int
2110+avx_os_support (void)
2111+{
2112+ unsigned int eax, edx;
2113+
2114+ __asm__ ("xgetbv" : "=a" (eax), "=d" (edx) : "c" (0));
2115+ return (eax & 6) == 6;
2116+}
2117
2118=== modified file 'gcc/testsuite/gcc.target/i386/pclmul-avx-check.h'
2119--- gcc/testsuite/gcc.target/i386/pclmul-avx-check.h 2010-06-07 10:08:46 +0000
2120+++ gcc/testsuite/gcc.target/i386/pclmul-avx-check.h 2011-08-11 11:29:04 +0000
2121@@ -3,6 +3,7 @@
2122 #endif
2123 #include <stdlib.h>
2124 #include "cpuid.h"
2125+#include "avx-os-support.h"
2126
2127 static void pclmul_avx_test (void);
2128
2129@@ -22,7 +23,9 @@
2130 return 0;
2131
2132 /* Run PCLMUL + AVX test only if host has PCLMUL + AVX support. */
2133- if ((ecx & (bit_AVX | bit_PCLMUL)) == (bit_AVX | bit_PCLMUL))
2134+ if (((ecx & (bit_AVX | bit_OSXSAVE | bit_PCLMUL))
2135+ == (bit_AVX | bit_OSXSAVE | bit_PCLMUL))
2136+ && avx_os_support ())
2137 {
2138 do_test ();
2139 #ifdef DEBUG
2140
2141=== added file 'gcc/testsuite/gcc.target/i386/pr49920.c'
2142--- gcc/testsuite/gcc.target/i386/pr49920.c 1970-01-01 00:00:00 +0000
2143+++ gcc/testsuite/gcc.target/i386/pr49920.c 2011-08-11 11:29:04 +0000
2144@@ -0,0 +1,23 @@
2145+/* { dg-do compile } */
2146+/* { dg-options "-O2" } */
2147+/* { dg-require-effective-target ilp32 } */
2148+
2149+typedef __SIZE_TYPE__ size_t;
2150+extern void *malloc (size_t);
2151+
2152+register unsigned int MR_mr0 asm ("esi");
2153+register unsigned int MR_mr1 asm ("edi");
2154+
2155+void ml_backend__ml_closure_gen_module11 (void)
2156+{
2157+ unsigned int MR_tempr1, MR_tempr2, MR_tempr3;
2158+
2159+ MR_tempr1 = (unsigned int)((char *) malloc (sizeof (unsigned int)) + 4);
2160+ MR_tempr3 = ((unsigned int *) MR_mr0)[0];
2161+
2162+ ((unsigned int *) (MR_tempr1 - 4))[0] = MR_tempr3;
2163+
2164+ MR_tempr2 = (unsigned int)((char *) malloc (2 * sizeof (unsigned int)));
2165+
2166+ ((unsigned int *) MR_tempr2)[1] = MR_tempr1;
2167+}
2168
2169=== added file 'gcc/testsuite/gcc.target/powerpc/altivec-34.c'
2170--- gcc/testsuite/gcc.target/powerpc/altivec-34.c 1970-01-01 00:00:00 +0000
2171+++ gcc/testsuite/gcc.target/powerpc/altivec-34.c 2011-08-11 11:29:04 +0000
2172@@ -0,0 +1,24 @@
2173+/* PR target/49621 */
2174+/* { dg-do compile } */
2175+/* { dg-options "-O2 -maltivec" } */
2176+
2177+#include <altivec.h>
2178+
2179+int
2180+foo (void)
2181+{
2182+ vector unsigned a, b, c;
2183+ unsigned k = 1;
2184+
2185+ a = (vector unsigned) { 0, 0, 0, 1 };
2186+ b = c = (vector unsigned) { 0, 0, 0, 0 };
2187+
2188+ a = vec_add (a, vec_splats (k));
2189+ b = vec_add (b, a);
2190+ c = vec_sel (c, a, b);
2191+
2192+ if (vec_any_eq (b, c))
2193+ return 1;
2194+
2195+ return 0;
2196+}
2197
2198=== added file 'gcc/testsuite/gcc.target/sparc/cas64.c'
2199--- gcc/testsuite/gcc.target/sparc/cas64.c 1970-01-01 00:00:00 +0000
2200+++ gcc/testsuite/gcc.target/sparc/cas64.c 2011-08-11 11:29:04 +0000
2201@@ -0,0 +1,15 @@
2202+/* PR target/49660 */
2203+
2204+/* { dg-do compile { target sparc*-*-solaris2.* } } */
2205+
2206+#include <stdint.h>
2207+
2208+extern int64_t *val, old, new;
2209+
2210+int
2211+cas64 (void)
2212+{
2213+ return __sync_bool_compare_and_swap (val, old, new);
2214+}
2215+
2216+/* { dg-final { scan-assembler-not "compare_and_swap_8" } } */
2217
2218=== added file 'gcc/testsuite/gfortran.dg/allocate_error_3.f90'
2219--- gcc/testsuite/gfortran.dg/allocate_error_3.f90 1970-01-01 00:00:00 +0000
2220+++ gcc/testsuite/gfortran.dg/allocate_error_3.f90 2011-08-11 11:29:04 +0000
2221@@ -0,0 +1,9 @@
2222+! { dg-do compile }
2223+!
2224+! PR 49708: [4.5/4.6/4.7 Regression] ICE with allocate and no dimensions
2225+!
2226+! Contributed by <fnordxyz@yahoo.com>
2227+
2228+ real, pointer :: x(:)
2229+ allocate(x) ! { dg-error "Array specification required" }
2230+end
2231
2232=== added file 'gcc/testsuite/gfortran.dg/namelist_72.f'
2233--- gcc/testsuite/gfortran.dg/namelist_72.f 1970-01-01 00:00:00 +0000
2234+++ gcc/testsuite/gfortran.dg/namelist_72.f 2011-08-11 11:29:04 +0000
2235@@ -0,0 +1,33 @@
2236+! { dg-do run }
2237+!
2238+! PR fortran/49791
2239+!
2240+! Contributed by Elliott Sales de Andrade
2241+!
2242+ program namelist_test
2243+
2244+ dimension xpos(5000), ypos(5000)
2245+ namelist /geometry/ xpos, ypos
2246+
2247+ xpos = -huge(xpos)
2248+ ypos = -huge(ypos)
2249+
2250+ open(unit=4,file='geometry.in')
2251+ write(4,'(a)') '$geometry'
2252+ write(4,'(a)') ' xpos(1)= 0.00, 0.10, 0.20, 0.30, 0.40,'
2253+ write(4,'(a)') ' ypos(1)= 0.50, 0.60, 0.70, 0.80, 0.90,'
2254+ write(4,'(a)') '$end'
2255+
2256+ close(4)
2257+
2258+ open (unit=4,file='geometry.in',status='old',form='formatted')
2259+ read (4,geometry)
2260+ close(4, status='delete')
2261+
2262+ !print *, 'xpos', xpos(1:10), 'ypos', ypos(1:10)
2263+
2264+ if (any (xpos(1:5) /= [0.00, 0.10, 0.20, 0.30, 0.40]))call abort()
2265+ if (any (ypos(1:5) /= [0.50, 0.60, 0.70, 0.80, 0.90]))call abort()
2266+ if (any (xpos(6:) /= -huge(xpos))) call abort ()
2267+ if (any (ypos(6:) /= -huge(ypos))) call abort ()
2268+ end
2269
2270=== modified file 'gcc/testsuite/lib/target-supports.exp'
2271--- gcc/testsuite/lib/target-supports.exp 2011-04-28 16:13:24 +0000
2272+++ gcc/testsuite/lib/target-supports.exp 2011-08-11 11:29:04 +0000
2273@@ -960,8 +960,8 @@
2274 check_runtime_nocache sse_os_support_available {
2275 int main ()
2276 {
2277- __asm__ volatile ("movss %xmm2,%xmm1");
2278- return 0;
2279+ asm volatile ("movss %xmm2,%xmm1");
2280+ return 0;
2281 }
2282 } "-msse"
2283 } else {
2284@@ -970,6 +970,29 @@
2285 }]
2286 }
2287
2288+# Return 1 if the target OS supports running AVX executables, 0
2289+# otherwise. Cache the result.
2290+
2291+proc check_avx_os_support_available { } {
2292+ return [check_cached_effective_target avx_os_support_available {
2293+ # If this is not the right target then we can skip the test.
2294+ if { !([istarget x86_64-*-*] || [istarget i?86-*-*]) } {
2295+ expr 0
2296+ } else {
2297+ # Check that OS has AVX and SSE saving enabled.
2298+ check_runtime_nocache avx_os_support_available {
2299+ int main ()
2300+ {
2301+ unsigned int eax, edx;
2302+
2303+ asm ("xgetbv" : "=a" (eax), "=d" (edx) : "c" (0));
2304+ return (eax & 6) != 6;
2305+ }
2306+ } ""
2307+ }
2308+ }]
2309+}
2310+
2311 # Return 1 if the target supports executing SSE instructions, 0
2312 # otherwise. Cache the result.
2313
2314@@ -1064,7 +1087,8 @@
2315
2316 proc check_effective_target_avx_runtime { } {
2317 if { [check_effective_target_avx]
2318- && [check_avx_hw_available] } {
2319+ && [check_avx_hw_available]
2320+ && [check_avx_os_support_available] } {
2321 return 1
2322 }
2323 return 0
2324
2325=== modified file 'gcc/tree-cfgcleanup.c'
2326--- gcc/tree-cfgcleanup.c 2010-05-21 08:27:30 +0000
2327+++ gcc/tree-cfgcleanup.c 2011-08-11 11:29:04 +0000
2328@@ -560,7 +560,7 @@
2329 BB is present in the cfg. */
2330 if (bb == NULL
2331 || bb->index < NUM_FIXED_BLOCKS
2332- || bb->index >= n_basic_blocks
2333+ || bb->index >= last_basic_block
2334 || BASIC_BLOCK (bb->index) != bb
2335 || last_stmt (bb) == stmt
2336 || !gimple_call_noreturn_p (stmt))
2337
2338=== modified file 'gcc/tree-ssa-dce.c'
2339--- gcc/tree-ssa-dce.c 2010-11-17 10:46:36 +0000
2340+++ gcc/tree-ssa-dce.c 2011-08-11 11:29:04 +0000
2341@@ -509,7 +509,14 @@
2342
2343 /* If the stmt lhs kills ref, then we can stop walking. */
2344 if (gimple_has_lhs (def_stmt)
2345- && TREE_CODE (gimple_get_lhs (def_stmt)) != SSA_NAME)
2346+ && TREE_CODE (gimple_get_lhs (def_stmt)) != SSA_NAME
2347+ /* The assignment is not necessarily carried out if it can throw
2348+ and we can catch it in the current function where we could inspect
2349+ the previous value.
2350+ ??? We only need to care about the RHS throwing. For aggregate
2351+ assignments or similar calls and non-call exceptions the LHS
2352+ might throw as well. */
2353+ && !stmt_can_throw_internal (def_stmt))
2354 {
2355 tree base, lhs = gimple_get_lhs (def_stmt);
2356 HOST_WIDE_INT size, offset, max_size;
2357
2358=== modified file 'gcc/tree-ssa-dom.c'
2359--- gcc/tree-ssa-dom.c 2011-07-01 09:27:50 +0000
2360+++ gcc/tree-ssa-dom.c 2011-08-11 11:29:04 +0000
2361@@ -211,13 +211,11 @@
2362 {
2363 enum tree_code subcode = gimple_assign_rhs_code (stmt);
2364
2365- expr->type = NULL_TREE;
2366-
2367 switch (get_gimple_rhs_class (subcode))
2368 {
2369 case GIMPLE_SINGLE_RHS:
2370 expr->kind = EXPR_SINGLE;
2371- expr->type = TREE_TYPE (gimple_assign_lhs (stmt));
2372+ expr->type = TREE_TYPE (gimple_assign_rhs1 (stmt));
2373 expr->ops.single.rhs = gimple_assign_rhs1 (stmt);
2374 break;
2375 case GIMPLE_UNARY_RHS:
2376
2377=== modified file 'gcc/tree-ssa-sccvn.c'
2378--- gcc/tree-ssa-sccvn.c 2011-04-06 12:29:08 +0000
2379+++ gcc/tree-ssa-sccvn.c 2011-08-11 11:29:04 +0000
2380@@ -1805,12 +1805,26 @@
2381 static inline bool
2382 set_ssa_val_to (tree from, tree to)
2383 {
2384- tree currval;
2385+ tree currval = SSA_VAL (from);
2386
2387- if (from != to
2388- && TREE_CODE (to) == SSA_NAME
2389- && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (to))
2390- to = from;
2391+ if (from != to)
2392+ {
2393+ if (currval == from)
2394+ {
2395+ if (dump_file && (dump_flags & TDF_DETAILS))
2396+ {
2397+ fprintf (dump_file, "Not changing value number of ");
2398+ print_generic_expr (dump_file, from, 0);
2399+ fprintf (dump_file, " from VARYING to ");
2400+ print_generic_expr (dump_file, to, 0);
2401+ fprintf (dump_file, "\n");
2402+ }
2403+ return false;
2404+ }
2405+ else if (TREE_CODE (to) == SSA_NAME
2406+ && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (to))
2407+ to = from;
2408+ }
2409
2410 /* The only thing we allow as value numbers are VN_TOP, ssa_names
2411 and invariants. So assert that here. */
2412@@ -1827,8 +1841,6 @@
2413 print_generic_expr (dump_file, to, 0);
2414 }
2415
2416- currval = SSA_VAL (from);
2417-
2418 if (currval != to && !operand_equal_p (currval, to, OEP_PURE_SAME))
2419 {
2420 VN_INFO (from)->valnum = to;
2421
2422=== modified file 'gcc/tree-vrp.c'
2423--- gcc/tree-vrp.c 2011-02-22 11:38:56 +0000
2424+++ gcc/tree-vrp.c 2011-08-11 11:29:04 +0000
2425@@ -1,5 +1,5 @@
2426 /* Support routines for Value Range Propagation (VRP).
2427- Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
2428+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
2429 Free Software Foundation, Inc.
2430 Contributed by Diego Novillo <dnovillo@redhat.com>.
2431
2432@@ -2261,17 +2261,27 @@
2433 op0 + op1 == 0, so we cannot claim that the sum is in ~[0,0].
2434 Note that we are guaranteed to have vr0.type == vr1.type at
2435 this point. */
2436- if (code == PLUS_EXPR && vr0.type == VR_ANTI_RANGE)
2437- {
2438- set_value_range_to_varying (vr);
2439- return;
2440- }
2441-
2442- /* For operations that make the resulting range directly
2443- proportional to the original ranges, apply the operation to
2444- the same end of each range. */
2445- min = vrp_int_const_binop (code, vr0.min, vr1.min);
2446- max = vrp_int_const_binop (code, vr0.max, vr1.max);
2447+ if (vr0.type == VR_ANTI_RANGE)
2448+ {
2449+ if (code == PLUS_EXPR)
2450+ {
2451+ set_value_range_to_varying (vr);
2452+ return;
2453+ }
2454+ /* For MIN_EXPR and MAX_EXPR with two VR_ANTI_RANGEs,
2455+ the resulting VR_ANTI_RANGE is the same - intersection
2456+ of the two ranges. */
2457+ min = vrp_int_const_binop (MAX_EXPR, vr0.min, vr1.min);
2458+ max = vrp_int_const_binop (MIN_EXPR, vr0.max, vr1.max);
2459+ }
2460+ else
2461+ {
2462+ /* For operations that make the resulting range directly
2463+ proportional to the original ranges, apply the operation to
2464+ the same end of each range. */
2465+ min = vrp_int_const_binop (code, vr0.min, vr1.min);
2466+ max = vrp_int_const_binop (code, vr0.max, vr1.max);
2467+ }
2468
2469 /* If both additions overflowed the range kind is still correct.
2470 This happens regularly with subtracting something in unsigned
2471@@ -4509,28 +4519,35 @@
2472 return need_assert;
2473 }
2474
2475-/* Compare two case labels sorting first by the destination label uid
2476+struct case_info
2477+{
2478+ tree expr;
2479+ basic_block bb;
2480+};
2481+
2482+/* Compare two case labels sorting first by the destination bb index
2483 and then by the case value. */
2484
2485 static int
2486 compare_case_labels (const void *p1, const void *p2)
2487 {
2488- const_tree const case1 = *(const_tree const*)p1;
2489- const_tree const case2 = *(const_tree const*)p2;
2490- unsigned int uid1 = DECL_UID (CASE_LABEL (case1));
2491- unsigned int uid2 = DECL_UID (CASE_LABEL (case2));
2492+ const struct case_info *ci1 = (const struct case_info *) p1;
2493+ const struct case_info *ci2 = (const struct case_info *) p2;
2494+ int idx1 = ci1->bb->index;
2495+ int idx2 = ci2->bb->index;
2496
2497- if (uid1 < uid2)
2498+ if (idx1 < idx2)
2499 return -1;
2500- else if (uid1 == uid2)
2501+ else if (idx1 == idx2)
2502 {
2503 /* Make sure the default label is first in a group. */
2504- if (!CASE_LOW (case1))
2505+ if (!CASE_LOW (ci1->expr))
2506 return -1;
2507- else if (!CASE_LOW (case2))
2508+ else if (!CASE_LOW (ci2->expr))
2509 return 1;
2510 else
2511- return tree_int_cst_compare (CASE_LOW (case1), CASE_LOW (case2));
2512+ return tree_int_cst_compare (CASE_LOW (ci1->expr),
2513+ CASE_LOW (ci2->expr));
2514 }
2515 else
2516 return 1;
2517@@ -4551,8 +4568,8 @@
2518 gimple_stmt_iterator bsi;
2519 tree op;
2520 edge e;
2521- tree vec2;
2522- size_t n = gimple_switch_num_labels(last);
2523+ struct case_info *ci;
2524+ size_t n = gimple_switch_num_labels (last);
2525 #if GCC_VERSION >= 4000
2526 unsigned int idx;
2527 #else
2528@@ -4567,36 +4584,38 @@
2529 return false;
2530
2531 /* Build a vector of case labels sorted by destination label. */
2532- vec2 = make_tree_vec (n);
2533+ ci = XNEWVEC (struct case_info, n);
2534 for (idx = 0; idx < n; ++idx)
2535- TREE_VEC_ELT (vec2, idx) = gimple_switch_label (last, idx);
2536- qsort (&TREE_VEC_ELT (vec2, 0), n, sizeof (tree), compare_case_labels);
2537+ {
2538+ ci[idx].expr = gimple_switch_label (last, idx);
2539+ ci[idx].bb = label_to_block (CASE_LABEL (ci[idx].expr));
2540+ }
2541+ qsort (ci, n, sizeof (struct case_info), compare_case_labels);
2542
2543 for (idx = 0; idx < n; ++idx)
2544 {
2545 tree min, max;
2546- tree cl = TREE_VEC_ELT (vec2, idx);
2547+ tree cl = ci[idx].expr;
2548+ basic_block cbb = ci[idx].bb;
2549
2550 min = CASE_LOW (cl);
2551 max = CASE_HIGH (cl);
2552
2553 /* If there are multiple case labels with the same destination
2554 we need to combine them to a single value range for the edge. */
2555- if (idx + 1 < n
2556- && CASE_LABEL (cl) == CASE_LABEL (TREE_VEC_ELT (vec2, idx + 1)))
2557+ if (idx + 1 < n && cbb == ci[idx + 1].bb)
2558 {
2559 /* Skip labels until the last of the group. */
2560 do {
2561 ++idx;
2562- } while (idx < n
2563- && CASE_LABEL (cl) == CASE_LABEL (TREE_VEC_ELT (vec2, idx)));
2564+ } while (idx < n && cbb == ci[idx].bb);
2565 --idx;
2566
2567 /* Pick up the maximum of the case label range. */
2568- if (CASE_HIGH (TREE_VEC_ELT (vec2, idx)))
2569- max = CASE_HIGH (TREE_VEC_ELT (vec2, idx));
2570+ if (CASE_HIGH (ci[idx].expr))
2571+ max = CASE_HIGH (ci[idx].expr);
2572 else
2573- max = CASE_LOW (TREE_VEC_ELT (vec2, idx));
2574+ max = CASE_LOW (ci[idx].expr);
2575 }
2576
2577 /* Nothing to do if the range includes the default label until we
2578@@ -4605,7 +4624,7 @@
2579 continue;
2580
2581 /* Find the edge to register the assert expr on. */
2582- e = find_edge (bb, label_to_block (CASE_LABEL (cl)));
2583+ e = find_edge (bb, cbb);
2584
2585 /* Register the necessary assertions for the operand in the
2586 SWITCH_EXPR. */
2587@@ -4623,6 +4642,7 @@
2588 }
2589 }
2590
2591+ XDELETEVEC (ci);
2592 return need_assert;
2593 }
2594
2595
2596=== modified file 'libgfortran/ChangeLog'
2597--- libgfortran/ChangeLog 2011-04-28 14:09:02 +0000
2598+++ libgfortran/ChangeLog 2011-08-11 11:29:04 +0000
2599@@ -1,3 +1,12 @@
2600+2011-07-27 Tobias Burnus <burnus@net-b.de>
2601+
2602+ Backport from mainline
2603+ 2011-07-23 Tobias Burnus <burnus@net-b.de>
2604+
2605+ PR fortran/49791
2606+ * io/list_read.c (nml_parse_qualifier): Remove check to
2607+ enabled extended read for another case.
2608+
2609 2011-04-28 Release Manager
2610
2611 * GCC 4.5.3 released.
2612
2613=== modified file 'libgfortran/io/list_read.c'
2614--- libgfortran/io/list_read.c 2011-03-07 02:06:27 +0000
2615+++ libgfortran/io/list_read.c 2011-08-11 11:29:04 +0000
2616@@ -2078,7 +2078,6 @@
2617 do not allow excess data to be processed. */
2618 if (is_array_section == 1
2619 || !(compile_options.allow_std & GFC_STD_GNU)
2620- || !dtp->u.p.ionml->touched
2621 || dtp->u.p.ionml->type == GFC_DTYPE_DERIVED)
2622 ls[dim].end = ls[dim].start;
2623 else
2624
2625=== modified file 'libiberty/ChangeLog'
2626--- libiberty/ChangeLog 2011-04-28 14:10:57 +0000
2627+++ libiberty/ChangeLog 2011-08-11 11:29:04 +0000
2628@@ -1,3 +1,7 @@
2629+2011-08-06 Uros Bizjak <ubizjak@gmail.com>
2630+
2631+ * testsuite/test-expandargv.c (writeout_test): Check result of fwrite.
2632+
2633 2011-04-28 Release Manager
2634
2635 * GCC 4.5.3 released.
2636@@ -284,7 +288,7 @@
2637
2638 2009-04-29 Julian Brown <julian@codesourcery.com>
2639
2640- * pex-win32.c (pex_win32_pipe): Add _O_NOINHERIT.
2641+ * pex-win32.c (pex_win32_pipe): Add _O_NOINHERIT.
2642 (pex_win32_exec_child): Ensure each process has only one handle open
2643 on pipe endpoints. Close standard input after creating child for
2644 symmetry with standard output/standard error.
2645@@ -302,7 +306,7 @@
2646 section, so that the native build does detect them at configure
2647 time.
2648 * configure: Regenerated.
2649-
2650+
2651 2009-04-13 Ozkan Sezer <sezeroz@gmail.com>
2652
2653 PR target/39397
2654@@ -402,7 +406,7 @@
2655 2008-10-08 David Edelsohn <edelsohn@gnu.org>
2656
2657 * xstrdup.c: Include <sys/types.h> after "config.h"
2658-
2659+
2660 2008-10-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2661
2662 * configure.ac: Call AC_SYS_LARGEFILE.
2663
2664=== modified file 'libiberty/testsuite/test-expandargv.c'
2665--- libiberty/testsuite/test-expandargv.c 2009-10-08 14:14:41 +0000
2666+++ libiberty/testsuite/test-expandargv.c 2011-08-11 11:29:04 +0000
2667@@ -189,7 +189,7 @@
2668 {
2669 char filename[256];
2670 FILE *fd;
2671- size_t len;
2672+ size_t len, sys_fwrite;
2673 char * parse;
2674
2675 /* Unique filename per test */
2676@@ -208,7 +208,10 @@
2677 /* Run all possible replaces */
2678 run_replaces (parse);
2679
2680- fwrite (parse, len, sizeof (char), fd);
2681+ sys_fwrite = fwrite (parse, sizeof (char), len, fd);
2682+ if (sys_fwrite != len)
2683+ fatal_error (__LINE__, "Failed to write to test file.", errno);
2684+
2685 free (parse);
2686 fclose (fd);
2687 }
2688
2689=== modified file 'libjava/ChangeLog'
2690--- libjava/ChangeLog 2011-04-28 14:10:19 +0000
2691+++ libjava/ChangeLog 2011-08-11 11:29:04 +0000
2692@@ -1,3 +1,9 @@
2693+2011-06-30 Jack Howarth <howarth@bromo.med.uc.edu>
2694+
2695+ PR target/49461
2696+ * libjava/configure.ac (SYSTEMSPEC): Pass -no_pie for darwin11.
2697+ * libjava/configure: Regenerate.
2698+
2699 2011-04-28 Release Manager
2700
2701 * GCC 4.5.3 released.
2702
2703=== modified file 'libjava/configure'
2704--- libjava/configure 2010-07-15 11:05:56 +0000
2705+++ libjava/configure 2011-08-11 11:29:04 +0000
2706@@ -19754,8 +19754,13 @@
2707 SYSTEMSPEC="-lunicows $SYSTEMSPEC"
2708 fi
2709 ;;
2710- *-*-darwin[912]*)
2711- SYSTEMSPEC="-allow_stack_execute"
2712+ *-*-darwin9*)
2713+ SYSTEMSPEC="%{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
2714+ ;;
2715+ *-*-darwin[12]*)
2716+ # Something is incompatible with pie, would be nice to fix it and
2717+ # remove -no_pie. PR49461
2718+ SYSTEMSPEC="-no_pie %{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
2719 ;;
2720 *)
2721 SYSTEMSPEC=
2722
2723=== modified file 'libjava/configure.ac'
2724--- libjava/configure.ac 2010-07-15 11:05:56 +0000
2725+++ libjava/configure.ac 2011-08-11 11:29:04 +0000
2726@@ -882,8 +882,13 @@
2727 SYSTEMSPEC="-lunicows $SYSTEMSPEC"
2728 fi
2729 ;;
2730- *-*-darwin[[912]]*)
2731- SYSTEMSPEC="-allow_stack_execute"
2732+ *-*-darwin9*)
2733+ SYSTEMSPEC="%{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
2734+ ;;
2735+ *-*-darwin[[12]]*)
2736+ # Something is incompatible with pie, would be nice to fix it and
2737+ # remove -no_pie. PR49461
2738+ SYSTEMSPEC="-no_pie %{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
2739 ;;
2740 *)
2741 SYSTEMSPEC=
2742
2743=== modified file 'libstdc++-v3/ChangeLog'
2744--- libstdc++-v3/ChangeLog 2011-04-28 14:09:18 +0000
2745+++ libstdc++-v3/ChangeLog 2011-08-11 11:29:04 +0000
2746@@ -1,3 +1,13 @@
2747+2011-07-24 Uros Bizjak <ubizjak@gmail.com>
2748+
2749+ Backport from mainline
2750+ 2011-06-07 Paolo Carlini <paolo.carlini@oracle.com>
2751+
2752+ PR libstdc++/49293
2753+ * testsuite/22_locale/time_get/get_weekday/char/38081-1.cc: Tweak
2754+ for glibc 2.14.
2755+ * testsuite/22_locale/time_get/get_weekday/char/38081-2.cc: Likewise.
2756+
2757 2011-04-28 Release Manager
2758
2759 * GCC 4.5.3 released.
2760
2761=== modified file 'libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-1.cc'
2762--- libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-1.cc 2010-01-05 20:05:20 +0000
2763+++ libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-1.cc 2011-08-11 11:29:04 +0000
2764@@ -1,6 +1,6 @@
2765 // { dg-require-namedlocale "" }
2766
2767-// Copyright (C) 2010 Free Software Foundation
2768+// Copyright (C) 2010, 2011 Free Software Foundation
2769 //
2770 // This file is part of the GNU ISO C++ Library. This library is free
2771 // software; you can redistribute it and/or modify it under the
2772@@ -49,7 +49,11 @@
2773 // get_weekday(iter_type, iter_type, ios_base&,
2774 // ios_base::iostate&, tm*) const
2775
2776+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 14)
2777+ iss.str("\xbf\xdd\x2e");
2778+#else
2779 iss.str("\xbf\xdd\xd4");
2780+#endif
2781 iterator_type is_it01(iss);
2782 tm time01;
2783 memset(&time01, -1, sizeof(tm));
2784@@ -67,7 +71,11 @@
2785 VERIFY( time02.tm_wday == 1 );
2786 VERIFY( errorstate == ios_base::eofbit );
2787
2788+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 14)
2789+ iss.str("\xbf\xdd\x2e\xd5\xd4\xd5\xdb\xec\xdd\xd8\xda");
2790+#else
2791 iss.str("\xbf\xdd\xd4\xd5\xd4\xd5\xdb\xec\xdd\xd8\xda");
2792+#endif
2793 iterator_type is_it03(iss);
2794 tm time03;
2795 memset(&time03, -1, sizeof(tm));
2796
2797=== modified file 'libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-2.cc'
2798--- libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-2.cc 2010-01-25 18:02:41 +0000
2799+++ libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-2.cc 2011-08-11 11:29:04 +0000
2800@@ -2,7 +2,7 @@
2801
2802 // 2010-01-05 Paolo Carlini <paolo.carlini@oracle.com>
2803
2804-// Copyright (C) 2010 Free Software Foundation
2805+// Copyright (C) 2010, 2011 Free Software Foundation
2806 //
2807 // This file is part of the GNU ISO C++ Library. This library is free
2808 // software; you can redistribute it and/or modify it under the
2809@@ -50,6 +50,15 @@
2810 // get_weekday(iter_type, iter_type, ios_base&,
2811 // ios_base::iostate&, tm*) const
2812
2813+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 14)
2814+ const char* awdays[7] = { "\u0412\u0441\u002E",
2815+ "\u041F\u043D\u002E",
2816+ "\u0412\u0442\u002E",
2817+ "\u0421\u0440\u002E",
2818+ "\u0427\u0442\u002E",
2819+ "\u041F\u0442\u002E",
2820+ "\u0421\u0431\u002E" };
2821+#else
2822 const char* awdays[7] = { "\u0412\u0441\u043A",
2823 "\u041F\u043D\u0434",
2824 "\u0412\u0442\u0440",
2825@@ -57,6 +66,7 @@
2826 "\u0427\u0442\u0432",
2827 "\u041F\u0442\u043D",
2828 "\u0421\u0431\u0442" };
2829+#endif
2830
2831 for (int i = 0; i < 7; ++i)
2832 {

Subscribers

People subscribed via source and target branches