Merge lp:~ams-codesourcery/gcc-linaro/4.5-merge-svn172013 into lp:gcc-linaro/4.5
- 4.5-merge-svn172013
- Merge into 4.5
Status: | Merged |
---|---|
Merge reported by: | Andrew Stubbs |
Merged at revision: | not available |
Proposed branch: | lp:~ams-codesourcery/gcc-linaro/4.5-merge-svn172013 |
Merge into: | lp:gcc-linaro/4.5 |
Diff against target: |
7080 lines (+3085/-727) 224 files modified
ChangeLog.linaro (+4/-0) gcc/ChangeLog (+225/-0) gcc/DATESTAMP (+1/-1) gcc/caller-save.c (+2/-2) gcc/cgraph.c (+1/-1) gcc/config.gcc (+10/-0) gcc/config/arm/predicates.md (+1/-0) gcc/config/avr/avr.c (+67/-4) gcc/config/freebsd-spec.h (+5/-1) gcc/config/i386/avxintrin.h (+2/-2) gcc/config/i386/i386.h (+1/-1) gcc/config/i386/i386.opt (+2/-2) gcc/config/i386/sse.md (+8/-8) gcc/config/rs6000/rs6000.h (+10/-0) gcc/config/rx/rx-protos.h (+2/-0) gcc/config/rx/rx.c (+55/-10) gcc/config/rx/rx.h (+27/-1) gcc/config/rx/rx.md (+141/-5) gcc/config/s390/s390.c (+12/-4) gcc/cp/ChangeLog (+73/-0) gcc/cp/decl.c (+1/-1) gcc/cp/mangle.c (+4/-0) gcc/cp/name-lookup.c (+9/-2) gcc/cp/parser.c (+8/-2) gcc/cp/pt.c (+28/-16) gcc/cp/tree.c (+12/-6) gcc/doc/cfg.texi (+1/-2) gcc/doc/cpp.texi (+5/-4) gcc/doc/extend.texi (+36/-36) gcc/doc/invoke.texi (+101/-101) gcc/fortran/ChangeLog (+24/-0) gcc/fortran/f95-lang.c (+6/-5) gcc/fortran/openmp.c (+1/-0) gcc/fortran/trans-array.c (+52/-50) gcc/stor-layout.c (+0/-5) gcc/testsuite/ChangeLog (+165/-0) gcc/testsuite/g++.dg/cpp0x/lambda/lambda-98.C (+8/-0) gcc/testsuite/g++.dg/cpp0x/variadic105.C (+24/-0) gcc/testsuite/g++.dg/lookup/template3.C (+35/-0) gcc/testsuite/g++.dg/opt/pr47615.C (+711/-0) gcc/testsuite/g++.dg/opt/pr47639.c (+17/-0) gcc/testsuite/g++.dg/template/anon5.C (+6/-0) gcc/testsuite/g++.dg/template/array22.C (+14/-0) gcc/testsuite/g++.dg/template/error45.C (+22/-0) gcc/testsuite/g++.dg/template/nontype21.C (+7/-0) gcc/testsuite/g++.dg/template/nontype22.C (+11/-0) gcc/testsuite/g++.dg/template/this-targ1.C (+23/-0) gcc/testsuite/gcc.c-torture/execute/postmod-1.c (+0/-62) gcc/testsuite/gcc.dg/torture/20090618-1.c (+1/-0) gcc/testsuite/gcc.dg/torture/pr39074-2.c (+1/-1) gcc/testsuite/gcc.dg/torture/pr45967-2.c (+24/-0) gcc/testsuite/gcc.dg/torture/pr45967-3.c (+21/-0) gcc/testsuite/gcc.dg/torture/pr45967.c (+21/-0) gcc/testsuite/gcc.dg/torture/pr46723.c (+10/-0) gcc/testsuite/gcc.dg/torture/pr47278-1.c (+5/-0) gcc/testsuite/gcc.dg/torture/pr47278-2.c (+15/-0) gcc/testsuite/gcc.dg/torture/pr47890.c (+9/-0) gcc/testsuite/gcc.dg/torture/pta-escape-1.c (+1/-1) gcc/testsuite/gcc.dg/torture/pta-ptrarith-1.c (+1/-1) gcc/testsuite/gcc.dg/tree-ssa/pta-callused.c (+1/-1) gcc/testsuite/gcc.dg/tree-ssa/pta-escape-1.c (+1/-1) gcc/testsuite/gcc.dg/tree-ssa/pta-escape-2.c (+1/-1) gcc/testsuite/gcc.dg/tree-ssa/pta-escape-3.c (+1/-1) gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-21.c (+1/-1) gcc/testsuite/gcc.target/arm/neon-vld-1.c (+0/-13) gcc/testsuite/gcc.target/powerpc/pr47862.c (+19/-0) gcc/testsuite/gcc.target/powerpc/pr48192.c (+49/-0) gcc/testsuite/gfortran.dg/array_constructor_36.f90 (+21/-0) gcc/testsuite/gfortran.dg/g77/cabs.f (+2/-1) gcc/testsuite/gfortran.dg/intrinsic_ifunction_2.f90 (+8/-0) gcc/testsuite/gfortran.dg/namelist_71.f90 (+36/-0) gcc/testsuite/gfortran.dg/pr47878.f90 (+10/-0) gcc/tree-inline.c (+1/-1) gcc/tree-ssa-pre.c (+1/-1) gcc/tree-ssa-sccvn.c (+8/-4) gcc/tree-ssa-sccvn.h (+3/-2) gcc/tree-ssa-structalias.c (+122/-126) gcc/tree-vect-generic.c (+11/-4) gcc/tree-vect-loop.c (+46/-20) gcc/tree-vect-stmts.c (+4/-5) gcc/tree.c (+8/-2) gcc/tree.h (+2/-20) gcc/varasm.c (+45/-0) libcpp/ChangeLog (+10/-1) libcpp/directives.c (+12/-2) libcpp/expr.c (+6/-1) libgcc/ChangeLog (+12/-0) libgcc/config.host (+2/-0) libgcc/config/rs6000/t-ppccomm (+3/-1) libgfortran/ChangeLog (+150/-0) libgfortran/generated/all_l1.c (+1/-1) libgfortran/generated/all_l16.c (+1/-1) libgfortran/generated/all_l2.c (+1/-1) libgfortran/generated/all_l4.c (+1/-1) libgfortran/generated/all_l8.c (+1/-1) libgfortran/generated/any_l1.c (+1/-1) libgfortran/generated/any_l16.c (+1/-1) libgfortran/generated/any_l2.c (+1/-1) libgfortran/generated/any_l4.c (+1/-1) libgfortran/generated/any_l8.c (+1/-1) libgfortran/generated/count_16_l.c (+1/-1) libgfortran/generated/count_1_l.c (+1/-1) libgfortran/generated/count_2_l.c (+1/-1) libgfortran/generated/count_4_l.c (+1/-1) libgfortran/generated/count_8_l.c (+1/-1) libgfortran/generated/maxloc1_16_i1.c (+1/-1) libgfortran/generated/maxloc1_16_i16.c (+1/-1) libgfortran/generated/maxloc1_16_i2.c (+1/-1) libgfortran/generated/maxloc1_16_i4.c (+1/-1) libgfortran/generated/maxloc1_16_i8.c (+1/-1) libgfortran/generated/maxloc1_16_r10.c (+1/-1) libgfortran/generated/maxloc1_16_r16.c (+1/-1) libgfortran/generated/maxloc1_16_r4.c (+1/-1) libgfortran/generated/maxloc1_16_r8.c (+1/-1) libgfortran/generated/maxloc1_4_i1.c (+1/-1) libgfortran/generated/maxloc1_4_i16.c (+1/-1) libgfortran/generated/maxloc1_4_i2.c (+1/-1) libgfortran/generated/maxloc1_4_i4.c (+1/-1) libgfortran/generated/maxloc1_4_i8.c (+1/-1) libgfortran/generated/maxloc1_4_r10.c (+1/-1) libgfortran/generated/maxloc1_4_r16.c (+1/-1) libgfortran/generated/maxloc1_4_r4.c (+1/-1) libgfortran/generated/maxloc1_4_r8.c (+1/-1) libgfortran/generated/maxloc1_8_i1.c (+1/-1) libgfortran/generated/maxloc1_8_i16.c (+1/-1) libgfortran/generated/maxloc1_8_i2.c (+1/-1) libgfortran/generated/maxloc1_8_i4.c (+1/-1) libgfortran/generated/maxloc1_8_i8.c (+1/-1) libgfortran/generated/maxloc1_8_r10.c (+1/-1) libgfortran/generated/maxloc1_8_r16.c (+1/-1) libgfortran/generated/maxloc1_8_r4.c (+1/-1) libgfortran/generated/maxloc1_8_r8.c (+1/-1) libgfortran/generated/maxval_i1.c (+1/-1) libgfortran/generated/maxval_i16.c (+1/-1) libgfortran/generated/maxval_i2.c (+1/-1) libgfortran/generated/maxval_i4.c (+1/-1) libgfortran/generated/maxval_i8.c (+1/-1) libgfortran/generated/maxval_r10.c (+1/-1) libgfortran/generated/maxval_r16.c (+1/-1) libgfortran/generated/maxval_r4.c (+1/-1) libgfortran/generated/maxval_r8.c (+1/-1) libgfortran/generated/minloc1_16_i1.c (+1/-1) libgfortran/generated/minloc1_16_i16.c (+1/-1) libgfortran/generated/minloc1_16_i2.c (+1/-1) libgfortran/generated/minloc1_16_i4.c (+1/-1) libgfortran/generated/minloc1_16_i8.c (+1/-1) libgfortran/generated/minloc1_16_r10.c (+1/-1) libgfortran/generated/minloc1_16_r16.c (+1/-1) libgfortran/generated/minloc1_16_r4.c (+1/-1) libgfortran/generated/minloc1_16_r8.c (+1/-1) libgfortran/generated/minloc1_4_i1.c (+1/-1) libgfortran/generated/minloc1_4_i16.c (+1/-1) libgfortran/generated/minloc1_4_i2.c (+1/-1) libgfortran/generated/minloc1_4_i4.c (+1/-1) libgfortran/generated/minloc1_4_i8.c (+1/-1) libgfortran/generated/minloc1_4_r10.c (+1/-1) libgfortran/generated/minloc1_4_r16.c (+1/-1) libgfortran/generated/minloc1_4_r4.c (+1/-1) libgfortran/generated/minloc1_4_r8.c (+1/-1) libgfortran/generated/minloc1_8_i1.c (+1/-1) libgfortran/generated/minloc1_8_i16.c (+1/-1) libgfortran/generated/minloc1_8_i2.c (+1/-1) libgfortran/generated/minloc1_8_i4.c (+1/-1) libgfortran/generated/minloc1_8_i8.c (+1/-1) libgfortran/generated/minloc1_8_r10.c (+1/-1) libgfortran/generated/minloc1_8_r16.c (+1/-1) libgfortran/generated/minloc1_8_r4.c (+1/-1) libgfortran/generated/minloc1_8_r8.c (+1/-1) libgfortran/generated/minval_i1.c (+1/-1) libgfortran/generated/minval_i16.c (+1/-1) libgfortran/generated/minval_i2.c (+1/-1) libgfortran/generated/minval_i4.c (+1/-1) libgfortran/generated/minval_i8.c (+1/-1) libgfortran/generated/minval_r10.c (+1/-1) libgfortran/generated/minval_r16.c (+1/-1) libgfortran/generated/minval_r4.c (+1/-1) libgfortran/generated/minval_r8.c (+1/-1) libgfortran/generated/product_c10.c (+1/-1) libgfortran/generated/product_c16.c (+1/-1) libgfortran/generated/product_c4.c (+1/-1) libgfortran/generated/product_c8.c (+1/-1) libgfortran/generated/product_i1.c (+1/-1) libgfortran/generated/product_i16.c (+1/-1) libgfortran/generated/product_i2.c (+1/-1) libgfortran/generated/product_i4.c (+1/-1) libgfortran/generated/product_i8.c (+1/-1) libgfortran/generated/product_r10.c (+1/-1) libgfortran/generated/product_r16.c (+1/-1) libgfortran/generated/product_r4.c (+1/-1) libgfortran/generated/product_r8.c (+1/-1) libgfortran/generated/sum_c10.c (+1/-1) libgfortran/generated/sum_c16.c (+1/-1) libgfortran/generated/sum_c4.c (+1/-1) libgfortran/generated/sum_c8.c (+1/-1) libgfortran/generated/sum_i1.c (+1/-1) libgfortran/generated/sum_i16.c (+1/-1) libgfortran/generated/sum_i2.c (+1/-1) libgfortran/generated/sum_i4.c (+1/-1) libgfortran/generated/sum_i8.c (+1/-1) libgfortran/generated/sum_r10.c (+1/-1) libgfortran/generated/sum_r16.c (+1/-1) libgfortran/generated/sum_r4.c (+1/-1) libgfortran/generated/sum_r8.c (+1/-1) libgfortran/intrinsics/c99_functions.c (+1/-1) libgfortran/io/fbuf.h (+6/-0) libgfortran/io/list_read.c (+10/-1) libgfortran/io/transfer.c (+28/-31) libgfortran/m4/ifunction.m4 (+1/-1) libgfortran/m4/ifunction_logical.m4 (+1/-1) libgomp/ChangeLog (+9/-0) libgomp/testsuite/libgomp.fortran/task3.f90 (+27/-0) libstdc++-v3/ChangeLog (+42/-0) libstdc++-v3/include/bits/random.tcc (+2/-2) libstdc++-v3/include/parallel/algo.h (+7/-7) libstdc++-v3/include/parallel/algobase.h (+2/-2) libstdc++-v3/include/parallel/balanced_quicksort.h (+4/-4) libstdc++-v3/include/parallel/losertree.h (+8/-4) libstdc++-v3/include/parallel/numeric (+3/-3) libstdc++-v3/include/parallel/partition.h (+5/-5) libstdc++-v3/testsuite/22_locale/num_put/put/char/14220.cc (+3/-4) libstdc++-v3/testsuite/25_algorithms/headers/algorithm/parallel_algorithm_mixed1.cc (+53/-1) libstdc++-v3/testsuite/25_algorithms/headers/algorithm/parallel_algorithm_mixed2.cc (+53/-1) libstdc++-v3/testsuite/26_numerics/headers/numeric/parallel_numeric_mixed1.cc (+11/-0) libstdc++-v3/testsuite/26_numerics/headers/numeric/parallel_numeric_mixed2.cc (+11/-0) |
To merge this branch: | bzr merge lp:~ams-codesourcery/gcc-linaro/4.5-merge-svn172013 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andrew Stubbs (community) | Approve | ||
Review via email:
|
Commit message
Description of the change
Merge from FSF 4.5 branch svn r172013.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Linaro Toolchain Builder (cbuild) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Linaro Toolchain Builder (cbuild) wrote : | # |
cbuild successfully built this on i686-lucid-
The build results are available at:
http://
The test suite results changed compared to the branch point lp:gcc-linaro+bzr99489:
-PASS: gcc.dg/
+PASS: gcc.dg/
-PASS: gcc.dg/
+PASS: gcc.dg/
-PASS: gcc.dg/
+PASS: gcc.dg/
-PASS: gcc.dg/
+PASS: gcc.dg/
-PASS: gcc.dg/
+PASS: gcc.dg/
-PASS: gcc.dg/
+PASS: gcc.dg/
-PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Linaro Toolchain Builder (cbuild) wrote : | # |
cbuild successfully built this on x86_64-
The build results are available at:
http://
The test suite results changed compared to the branch point lp:gcc-linaro+bzr99489:
-PASS: gcc.dg/
+PASS: gcc.dg/
-PASS: gcc.dg/
+PASS: gcc.dg/
-PASS: gcc.dg/
+PASS: gcc.dg/
-PASS: gcc.dg/
+PASS: gcc.dg/
-PASS: gcc.dg/
+PASS: gcc.dg/
-PASS: gcc.dg/
+PASS: gcc.dg/
-PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Linaro Toolchain Builder (cbuild) wrote : | # |
cbuild successfully built this on armv7l-
The build results are available at:
http://
The test suite was not checked as the branch point lp:gcc-linaro+bzr99489 has nothing to compare against.
The full testsuite results are at:
http://
cbuild-checked: armv7l-
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Linaro Toolchain Builder (cbuild) wrote : | # |
cbuild successfully built this on armv7l-
The build results are available at:
http://
The test suite results changed compared to the branch point lp:gcc-linaro+bzr99489:
-PASS: gcc.c-torture/
+FAIL: gcc.c-torture/
-PASS: gcc.dg/
+PASS: gcc.dg/
-PASS: gcc.dg/
+PASS: gcc.dg/
-PASS: gcc.dg/
+PASS: gcc.dg/
-PASS: gcc.dg/
+PASS: gcc.dg/
-PASS: gcc.dg/
+PASS: gcc.dg/
-PASS: gcc.dg/
+PASS: gcc.dg/
-PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Andrew Stubbs (ams-codesourcery) wrote : | # |
The test have passed. (Apart from the largefile.c segmentation fault, but that's probably a blip, and not a reason not to merge from upstream.)
Therefore I'm going to merge this.
Preview Diff
1 | === modified file 'ChangeLog.linaro' | |||
2 | --- ChangeLog.linaro 2011-03-11 17:36:50 +0000 | |||
3 | +++ ChangeLog.linaro 2011-04-06 13:16:33 +0000 | |||
4 | @@ -1,3 +1,7 @@ | |||
5 | 1 | 2011-04-06 Andrew Stubbs <ams@codesourcery.com> | ||
6 | 2 | |||
7 | 3 | Merge from FSF 4.5 branch r172013 (pre 4.5.3). | ||
8 | 4 | |||
9 | 1 | 2011-03-10 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org> | 5 | 2011-03-10 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org> |
10 | 2 | 6 | ||
11 | 3 | LP:730440 | 7 | LP:730440 |
12 | 4 | 8 | ||
13 | === modified file 'gcc/ChangeLog' | |||
14 | --- gcc/ChangeLog 2011-02-18 21:30:25 +0000 | |||
15 | +++ gcc/ChangeLog 2011-04-06 13:16:33 +0000 | |||
16 | @@ -1,3 +1,228 @@ | |||
17 | 1 | 2011-03-30 H.J. Lu <hongjiu.lu@intel.com> | ||
18 | 2 | |||
19 | 3 | Backport from mainline | ||
20 | 4 | 2011-03-30 H.J. Lu <hongjiu.lu@intel.com> | ||
21 | 5 | |||
22 | 6 | PR target/48349 | ||
23 | 7 | * config/i386/i386.h (REG_CLASS_CONTENTS): Fix a typo in | ||
24 | 8 | FLOAT_SSE_REGS. | ||
25 | 9 | |||
26 | 10 | 2011-03-29 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> | ||
27 | 11 | |||
28 | 12 | * config/s390/s390.c (s390_preferred_reload_class): Return NO_REGS | ||
29 | 13 | for invalid symbolic addresses. | ||
30 | 14 | (s390_secondary_reload): Don't use s390_check_symref_alignment for | ||
31 | 15 | larl operands. | ||
32 | 16 | |||
33 | 17 | 2011-03-28 Richard Sandiford <richard.sandiford@linaro.org> | ||
34 | 18 | |||
35 | 19 | PR target/47553 | ||
36 | 20 | * config/arm/predicates.md (neon_lane_number): Accept 0..15. | ||
37 | 21 | |||
38 | 22 | 2011-03-23 Jonathan Wakely <jwakely.gcc@gmail.com> | ||
39 | 23 | |||
40 | 24 | PR other/48254 | ||
41 | 25 | * doc/invoke.texi (-fipa-struct-reorg): Fix typo. | ||
42 | 26 | |||
43 | 27 | 2011-03-23 Jonathan Wakely <jwakely.gcc@gmail.com> | ||
44 | 28 | |||
45 | 29 | PR other/48179 | ||
46 | 30 | PR other/48234 | ||
47 | 31 | * doc/extend.texi (Alignment): Move section to match order in TOC. | ||
48 | 32 | * doc/invoke.texi (i386 and x86-64 Windows Options): Likewise. | ||
49 | 33 | |||
50 | 34 | 2011-03-18 H.J. Lu <hongjiu.lu@intel.com> | ||
51 | 35 | |||
52 | 36 | Backport from mainline | ||
53 | 37 | 2011-03-17 H.J. Lu <hongjiu.lu@intel.com> | ||
54 | 38 | |||
55 | 39 | PR target/48171 | ||
56 | 40 | * config/i386/i386.opt: Add Save to -mavx and -mfma. | ||
57 | 41 | |||
58 | 42 | 2011-03-16 Pat Haugen <pthaugen@us.ibm.com> | ||
59 | 43 | |||
60 | 44 | PR target/47862 | ||
61 | 45 | * caller-save.c (insert_restore, insert_save): Use non-validate | ||
62 | 46 | form of adjust_address. | ||
63 | 47 | |||
64 | 48 | 2011-03-16 Nick Clifton <nickc@redhat.com> | ||
65 | 49 | |||
66 | 50 | * config/rx/rx.h (JUMP_ALIGN): Define. | ||
67 | 51 | (JUMP_ALIGN_MAX_SKIP, LABEL_ALIGN_AFTER_BARRIER, LOOP_ALIGN, | ||
68 | 52 | (LABEL_ALIGN, LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP, | ||
69 | 53 | (LOOP_ALIGN_MAX_SKIP, LABEL_ALIGN_MAX_SKIP): Define. | ||
70 | 54 | * config/rx/rx-protos.h (rx_align_for_label): Prototype. | ||
71 | 55 | (rx_max_skip_for_label): Prototype. | ||
72 | 56 | * config/rx/rx.md (abssi3): Use CC_ZSmode. | ||
73 | 57 | (andis3): Fix timings. | ||
74 | 58 | (peephole): Add peephole to combine zero- and sign- extending | ||
75 | 59 | loads with arithmetic instructions. | ||
76 | 60 | (bset): Fix timing. | ||
77 | 61 | (bclr): Fix timing. | ||
78 | 62 | * config/rx/rx.c (rx_is_legitimate_address): Add checks for QImode | ||
79 | 63 | and HImode reg+int address. | ||
80 | 64 | (rx_print_operand): Add support for %R. Fix generation of .B and | ||
81 | 65 | .W addressing modes. | ||
82 | 66 | (rx_align_for_label): New function. | ||
83 | 67 | (rx_max_skip_for_label): New function. | ||
84 | 68 | |||
85 | 69 | 2011-03-10 Jason Merrill <jason@redhat.com> | ||
86 | 70 | |||
87 | 71 | PR c++/48029 | ||
88 | 72 | * stor-layout.c (layout_type): Don't set structural equality | ||
89 | 73 | on arrays of incomplete type. | ||
90 | 74 | * tree.c (type_hash_eq): Handle comparing them properly. | ||
91 | 75 | |||
92 | 76 | 2011-03-08 Richard Guenther <rguenther@suse.de> | ||
93 | 77 | |||
94 | 78 | Backport from mainline | ||
95 | 79 | 2011-02-10 Richard Guenther <rguenther@suse.de> | ||
96 | 80 | |||
97 | 81 | * tree-ssa-structalias.c (bitpos_of_field): Use BITS_PER_UNIT, not 8. | ||
98 | 82 | |||
99 | 83 | 2010-10-18 Richard Guenther <rguenther@suse.de> | ||
100 | 84 | |||
101 | 85 | PR tree-optimization/45967 | ||
102 | 86 | * tree-ssa-structalias.c (type_could_have_pointers): Remove. | ||
103 | 87 | (could_have_pointers): Likewise. | ||
104 | 88 | (handle_rhs_call, handle_const_call, handle_pure_call, | ||
105 | 89 | find_func_aliases, intra_create_variable_infos): Remove calls to them. | ||
106 | 90 | (struct fieldoff): Add must_have_pointers field. | ||
107 | 91 | (type_must_have_pointers): New function. | ||
108 | 92 | (field_must_have_pointers): Likewise. | ||
109 | 93 | (push_fields_onto_fieldstack): Remove must_have_pointers_p argument. | ||
110 | 94 | Adjust field merging. | ||
111 | 95 | (create_function_info_for): May-have-pointers of varinfo is | ||
112 | 96 | almost always true. | ||
113 | 97 | (create_variable_info_for_1): Likewise. | ||
114 | 98 | |||
115 | 99 | 2010-10-12 Richard Guenther <rguenther@suse.de> | ||
116 | 100 | |||
117 | 101 | * tree-ssa-structalias.c (get_constraint_for_1): Constants | ||
118 | 102 | only point to nonlocal, not anything. | ||
119 | 103 | |||
120 | 104 | 2011-03-08 Richard Guenther <rguenther@suse.de> | ||
121 | 105 | |||
122 | 106 | PR tree-optimization/47278 | ||
123 | 107 | * tree.h (DECL_REPLACEABLE_P): Remove. | ||
124 | 108 | (decl_replaceable_p): Declare. | ||
125 | 109 | (decl_binds_to_current_def_p): Likewise. | ||
126 | 110 | * varasm.c (decl_replaceable_p): New function. | ||
127 | 111 | (decl_binds_to_current_def_p): Likewise. | ||
128 | 112 | * cgraph.c (cgraph_function_body_availability): Use decl_replaceable_p. | ||
129 | 113 | * tree-inline.c (inlinable_function_p): Likewise. | ||
130 | 114 | |||
131 | 115 | 2011-03-07 Pat Haugen <pthaugen@us.ibm.com> | ||
132 | 116 | |||
133 | 117 | Backport from mainline | ||
134 | 118 | 2011-03-07 Pat Haugen <pthaugen@us.ibm.com> | ||
135 | 119 | |||
136 | 120 | PR target/47862 | ||
137 | 121 | * config/rs6000/rs6000.h (HARD_REGNO_CALLER_SAVE_MODE): Define. | ||
138 | 122 | |||
139 | 123 | 2011-03-07 Mingjie Xing <mingjie.xing@gmail.com> | ||
140 | 124 | |||
141 | 125 | * doc/cfg.texi: Remove "See" before @ref. | ||
142 | 126 | * doc/invoke.texi: Likewise. | ||
143 | 127 | |||
144 | 128 | 2011-03-03 Uros Bizjak <ubizjak@gmail.com> | ||
145 | 129 | |||
146 | 130 | * config/i386/sse.md (*avx_pmaddubsw128): Fix mode of VEC_SELECT RTX. | ||
147 | 131 | (ssse3_pmaddubsw128): Ditto. | ||
148 | 132 | (ssse3_pmaddubsw): Ditto. | ||
149 | 133 | |||
150 | 134 | 2011-03-03 Denis Chertykov <chertykov@gmail.com> | ||
151 | 135 | |||
152 | 136 | Backport from mainline | ||
153 | 137 | 2011-02-22 Georg-Johann Lay <avr@gjlay.de> | ||
154 | 138 | |||
155 | 139 | PR target/42240 | ||
156 | 140 | * config/avr/avr.c (avr_cannot_modify_jumps_p): New function. | ||
157 | 141 | (TARGET_CANNOT_MODIFY_JUMPS_P): Define. | ||
158 | 142 | |||
159 | 143 | 2011-03-03 Richard Guenther <rguenther@suse.de> | ||
160 | 144 | |||
161 | 145 | * tree-vect-stmt.c (vectorizable_operation): Remove unused vars. | ||
162 | 146 | |||
163 | 147 | 2011-03-02 Richard Guenther <rguenther@suse.de> | ||
164 | 148 | |||
165 | 149 | Backport from mainline | ||
166 | 150 | 2011-02-07 Richard Guenther <rguenther@suse.de> | ||
167 | 151 | |||
168 | 152 | PR tree-optimization/47615 | ||
169 | 153 | * tree-ssa-sccvn.h (run_scc_vn): Take a vn-walk mode argument. | ||
170 | 154 | * tree-ssa-sccvn.c (default_vn_walk_kind): New global. | ||
171 | 155 | (run_scc_vn): Initialize it. | ||
172 | 156 | (visit_reference_op_load): Use it. | ||
173 | 157 | * tree-ssa-pre.c (execute_pre): Use VN_WALK if in PRE. | ||
174 | 158 | |||
175 | 159 | 2011-03-01 Richard Guenther <rguenther@suse.de> | ||
176 | 160 | |||
177 | 161 | Backport from mainline | ||
178 | 162 | 2011-02-08 Richard Guenther <rguenther@suse.de> | ||
179 | 163 | |||
180 | 164 | PR middle-end/47639 | ||
181 | 165 | * tree-vect-generic.c (expand_vector_operations_1): Update | ||
182 | 166 | stmts here ... | ||
183 | 167 | (expand_vector_operations): ... not here. Cleanup EH info | ||
184 | 168 | and the CFG if required. | ||
185 | 169 | |||
186 | 170 | 2011-03-01 Richard Guenther <rguenther@suse.de> | ||
187 | 171 | |||
188 | 172 | Backport from mainline | ||
189 | 173 | 2011-03-01 Richard Guenther <rguenther@suse.de> | ||
190 | 174 | |||
191 | 175 | PR tree-optimization/47890 | ||
192 | 176 | * tree-vect-loop.c (get_initial_def_for_induction): Set | ||
193 | 177 | related stmt properly. | ||
194 | 178 | |||
195 | 179 | 2010-12-01 Richard Guenther <rguenther@suse.de> | ||
196 | 180 | |||
197 | 181 | PR tree-optimization/46723 | ||
198 | 182 | * tree-vect-loop.c (get_initial_def_for_induction): Strip | ||
199 | 183 | conversions from the induction evolution and apply it to | ||
200 | 184 | the result instead. | ||
201 | 185 | * tree-vect-stmts.c (vect_get_vec_def_for_operand): Handle | ||
202 | 186 | assigns for induction defs. | ||
203 | 187 | |||
204 | 188 | 2011-02-28 Georg-Johann Lay <avr@gjlay.de> | ||
205 | 189 | |||
206 | 190 | PR target/45261 | ||
207 | 191 | * config/avr/avr.c (avr_option_override): Use error on bad options. | ||
208 | 192 | (avr_help): New function. | ||
209 | 193 | (TARGET_HELP): Define. | ||
210 | 194 | |||
211 | 195 | 2011-02-26 Gerald Pfeifer <gerald@pfeifer.com> | ||
212 | 196 | |||
213 | 197 | * doc/invoke.texi (ARC Options): Use CPU instead of cpu. | ||
214 | 198 | (ARM Options): Ditto. | ||
215 | 199 | (i386 and x86-64 Options): Ditto. | ||
216 | 200 | (RX Options): Ditto. | ||
217 | 201 | (SPARC Options): Ditto. | ||
218 | 202 | |||
219 | 203 | 2011-02-26 Tijl Coosemans <tijl@coosemans.org> | ||
220 | 204 | |||
221 | 205 | * config.gcc (i386-*-freebsd*): Make i486 the default arch on | ||
222 | 206 | FreeBSD 6 and later. Generally use cpu generic. | ||
223 | 207 | |||
224 | 208 | 2011-02-25 Gerald Pfeifer <gerald@pfeifer.com> | ||
225 | 209 | |||
226 | 210 | * doc/cpp.texi (Obsolete Features): Add background on the | ||
227 | 211 | origin of assertions. | ||
228 | 212 | Update copyright years. | ||
229 | 213 | |||
230 | 214 | 2011-02-25 Andriy Gapon <avg@freebsd.org> | ||
231 | 215 | |||
232 | 216 | PR target/45808 | ||
233 | 217 | * config/freebsd-spec.h (FBSD_LIB_SPEC): Handle the shared case. | ||
234 | 218 | Update copyright years. | ||
235 | 219 | |||
236 | 220 | 2011-02-21 Uros Bizjak <ubizjak@gmail.com> | ||
237 | 221 | |||
238 | 222 | PR target/47840 | ||
239 | 223 | * config/i386/avxintrin.h (_mm256_insert_epi32): Use _mm_insert_epi32. | ||
240 | 224 | (_mm256_insert_epi64): Use _mm_insert_epi64. | ||
241 | 225 | |||
242 | 1 | 2011-02-18 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> | 226 | 2011-02-18 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> |
243 | 2 | 227 | ||
244 | 3 | * config.gcc (hppa[12]*-*-hpux11*): Set extra_parts. | 228 | * config.gcc (hppa[12]*-*-hpux11*): Set extra_parts. |
245 | 4 | 229 | ||
246 | === modified file 'gcc/DATESTAMP' | |||
247 | --- gcc/DATESTAMP 2011-02-21 00:18:37 +0000 | |||
248 | +++ gcc/DATESTAMP 2011-04-06 13:16:33 +0000 | |||
249 | @@ -1,1 +1,1 @@ | |||
251 | 1 | 20110221 | 1 | 20110406 |
252 | 2 | 2 | ||
253 | === modified file 'gcc/caller-save.c' | |||
254 | --- gcc/caller-save.c 2010-08-12 08:09:49 +0000 | |||
255 | +++ gcc/caller-save.c 2011-04-06 13:16:33 +0000 | |||
256 | @@ -1215,7 +1215,7 @@ | |||
257 | 1215 | /* Check that insn to restore REGNO in save_mode[regno] is | 1215 | /* Check that insn to restore REGNO in save_mode[regno] is |
258 | 1216 | correct. */ | 1216 | correct. */ |
259 | 1217 | && reg_save_code (regno, save_mode[regno]) >= 0) | 1217 | && reg_save_code (regno, save_mode[regno]) >= 0) |
261 | 1218 | mem = adjust_address (mem, save_mode[regno], 0); | 1218 | mem = adjust_address_nv (mem, save_mode[regno], 0); |
262 | 1219 | else | 1219 | else |
263 | 1220 | mem = copy_rtx (mem); | 1220 | mem = copy_rtx (mem); |
264 | 1221 | 1221 | ||
265 | @@ -1296,7 +1296,7 @@ | |||
266 | 1296 | /* Check that insn to save REGNO in save_mode[regno] is | 1296 | /* Check that insn to save REGNO in save_mode[regno] is |
267 | 1297 | correct. */ | 1297 | correct. */ |
268 | 1298 | && reg_save_code (regno, save_mode[regno]) >= 0) | 1298 | && reg_save_code (regno, save_mode[regno]) >= 0) |
270 | 1299 | mem = adjust_address (mem, save_mode[regno], 0); | 1299 | mem = adjust_address_nv (mem, save_mode[regno], 0); |
271 | 1300 | else | 1300 | else |
272 | 1301 | mem = copy_rtx (mem); | 1301 | mem = copy_rtx (mem); |
273 | 1302 | 1302 | ||
274 | 1303 | 1303 | ||
275 | === modified file 'gcc/cgraph.c' | |||
276 | --- gcc/cgraph.c 2010-07-01 10:03:31 +0000 | |||
277 | +++ gcc/cgraph.c 2011-04-06 13:16:33 +0000 | |||
278 | @@ -2093,7 +2093,7 @@ | |||
279 | 2093 | AVAIL_AVAILABLE here? That would be good reason to preserve this | 2093 | AVAIL_AVAILABLE here? That would be good reason to preserve this |
280 | 2094 | bit. */ | 2094 | bit. */ |
281 | 2095 | 2095 | ||
283 | 2096 | else if (DECL_REPLACEABLE_P (node->decl) && !DECL_EXTERNAL (node->decl)) | 2096 | else if (decl_replaceable_p (node->decl) && !DECL_EXTERNAL (node->decl)) |
284 | 2097 | avail = AVAIL_OVERWRITABLE; | 2097 | avail = AVAIL_OVERWRITABLE; |
285 | 2098 | else avail = AVAIL_AVAILABLE; | 2098 | else avail = AVAIL_AVAILABLE; |
286 | 2099 | 2099 | ||
287 | 2100 | 2100 | ||
288 | === modified file 'gcc/config.gcc' | |||
289 | --- gcc/config.gcc 2011-02-18 21:30:25 +0000 | |||
290 | +++ gcc/config.gcc 2011-04-06 13:16:33 +0000 | |||
291 | @@ -2631,6 +2631,16 @@ | |||
292 | 2631 | arch_without_sse2=no | 2631 | arch_without_sse2=no |
293 | 2632 | arch_without_64bit=no | 2632 | arch_without_64bit=no |
294 | 2633 | case ${target} in | 2633 | case ${target} in |
295 | 2634 | i386-*-freebsd*) | ||
296 | 2635 | if test $fbsd_major -ge 6; then | ||
297 | 2636 | arch=i486 | ||
298 | 2637 | else | ||
299 | 2638 | arch=i386 | ||
300 | 2639 | fi | ||
301 | 2640 | cpu=generic | ||
302 | 2641 | arch_without_sse2=yes | ||
303 | 2642 | arch_without_64bit=yes | ||
304 | 2643 | ;; | ||
305 | 2634 | i386-*-*) | 2644 | i386-*-*) |
306 | 2635 | arch=i386 | 2645 | arch=i386 |
307 | 2636 | cpu=i386 | 2646 | cpu=i386 |
308 | 2637 | 2647 | ||
309 | === modified file 'gcc/config/arm/predicates.md' | |||
310 | --- gcc/config/arm/predicates.md 2011-03-02 12:28:41 +0000 | |||
311 | +++ gcc/config/arm/predicates.md 2011-04-06 13:16:33 +0000 | |||
312 | @@ -608,6 +608,7 @@ | |||
313 | 608 | (define_predicate "neon_lane_number" | 608 | (define_predicate "neon_lane_number" |
314 | 609 | (and (match_code "const_int") | 609 | (and (match_code "const_int") |
315 | 610 | (match_test "INTVAL (op) >= 0 && INTVAL (op) <= 15"))) | 610 | (match_test "INTVAL (op) >= 0 && INTVAL (op) <= 15"))) |
316 | 611 | |||
317 | 611 | ;; Predicates for named expanders that overlap multiple ISAs. | 612 | ;; Predicates for named expanders that overlap multiple ISAs. |
318 | 612 | 613 | ||
319 | 613 | (define_predicate "cmpdi_operand" | 614 | (define_predicate "cmpdi_operand" |
320 | 614 | 615 | ||
321 | === modified file 'gcc/config/avr/avr.c' | |||
322 | --- gcc/config/avr/avr.c 2010-04-02 18:54:46 +0000 | |||
323 | +++ gcc/config/avr/avr.c 2011-04-06 13:16:33 +0000 | |||
324 | @@ -73,6 +73,7 @@ | |||
325 | 73 | static bool avr_legitimate_address_p (enum machine_mode, rtx, bool); | 73 | static bool avr_legitimate_address_p (enum machine_mode, rtx, bool); |
326 | 74 | static void avr_asm_function_end_prologue (FILE *); | 74 | static void avr_asm_function_end_prologue (FILE *); |
327 | 75 | static void avr_asm_function_begin_epilogue (FILE *); | 75 | static void avr_asm_function_begin_epilogue (FILE *); |
328 | 76 | static bool avr_cannot_modify_jumps_p (void); | ||
329 | 76 | static rtx avr_function_value (const_tree, const_tree, bool); | 77 | static rtx avr_function_value (const_tree, const_tree, bool); |
330 | 77 | static void avr_insert_attributes (tree, tree *); | 78 | static void avr_insert_attributes (tree, tree *); |
331 | 78 | static void avr_asm_init_sections (void); | 79 | static void avr_asm_init_sections (void); |
332 | @@ -91,6 +92,7 @@ | |||
333 | 91 | static unsigned int avr_case_values_threshold (void); | 92 | static unsigned int avr_case_values_threshold (void); |
334 | 92 | static bool avr_frame_pointer_required_p (void); | 93 | static bool avr_frame_pointer_required_p (void); |
335 | 93 | static bool avr_can_eliminate (const int, const int); | 94 | static bool avr_can_eliminate (const int, const int); |
336 | 95 | static void avr_help (void); | ||
337 | 94 | 96 | ||
338 | 95 | /* Allocate registers from r25 to r8 for parameters for function calls. */ | 97 | /* Allocate registers from r25 to r8 for parameters for function calls. */ |
339 | 96 | #define FIRST_CUM_REG 26 | 98 | #define FIRST_CUM_REG 26 |
340 | @@ -192,6 +194,12 @@ | |||
341 | 192 | #undef TARGET_CAN_ELIMINATE | 194 | #undef TARGET_CAN_ELIMINATE |
342 | 193 | #define TARGET_CAN_ELIMINATE avr_can_eliminate | 195 | #define TARGET_CAN_ELIMINATE avr_can_eliminate |
343 | 194 | 196 | ||
344 | 197 | #undef TARGET_HELP | ||
345 | 198 | #define TARGET_HELP avr_help | ||
346 | 199 | |||
347 | 200 | #undef TARGET_CANNOT_MODIFY_JUMPS_P | ||
348 | 201 | #define TARGET_CANNOT_MODIFY_JUMPS_P avr_cannot_modify_jumps_p | ||
349 | 202 | |||
350 | 195 | struct gcc_target targetm = TARGET_INITIALIZER; | 203 | struct gcc_target targetm = TARGET_INITIALIZER; |
351 | 196 | 204 | ||
352 | 197 | 205 | ||
353 | 198 | void | 206 | void |
354 | @@ -207,10 +215,8 @@ | |||
355 | 207 | 215 | ||
356 | 208 | if (!t->name) | 216 | if (!t->name) |
357 | 209 | { | 217 | { |
362 | 210 | fprintf (stderr, "unknown MCU '%s' specified\nKnown MCU names:\n", | 218 | error ("unrecognized argument to -mmcu= option: %qs", avr_mcu_name); |
363 | 211 | avr_mcu_name); | 219 | inform (input_location, "See --target-help for supported MCUs"); |
360 | 212 | for (t = avr_mcu_types; t->name; t++) | ||
361 | 213 | fprintf (stderr," %s\n", t->name); | ||
364 | 214 | } | 220 | } |
365 | 215 | 221 | ||
366 | 216 | avr_current_device = t; | 222 | avr_current_device = t; |
367 | @@ -223,6 +229,42 @@ | |||
368 | 223 | init_machine_status = avr_init_machine_status; | 229 | init_machine_status = avr_init_machine_status; |
369 | 224 | } | 230 | } |
370 | 225 | 231 | ||
371 | 232 | /* Implement TARGET_HELP */ | ||
372 | 233 | /* Report extra information for --target-help */ | ||
373 | 234 | |||
374 | 235 | static void | ||
375 | 236 | avr_help (void) | ||
376 | 237 | { | ||
377 | 238 | const struct mcu_type_s *t; | ||
378 | 239 | const char * const indent = " "; | ||
379 | 240 | int len; | ||
380 | 241 | |||
381 | 242 | /* Give a list of MCUs that are accepted by -mmcu=* . | ||
382 | 243 | Note that MCUs supported by the compiler might differ from | ||
383 | 244 | MCUs supported by binutils. */ | ||
384 | 245 | |||
385 | 246 | len = strlen (indent); | ||
386 | 247 | printf ("Known MCU names:\n%s", indent); | ||
387 | 248 | |||
388 | 249 | /* Print a blank-separated list of all supported MCUs */ | ||
389 | 250 | |||
390 | 251 | for (t = avr_mcu_types; t->name; t++) | ||
391 | 252 | { | ||
392 | 253 | printf ("%s ", t->name); | ||
393 | 254 | len += 1 + strlen (t->name); | ||
394 | 255 | |||
395 | 256 | /* Break long lines */ | ||
396 | 257 | |||
397 | 258 | if (len > 66 && (t+1)->name) | ||
398 | 259 | { | ||
399 | 260 | printf ("\n%s", indent); | ||
400 | 261 | len = strlen (indent); | ||
401 | 262 | } | ||
402 | 263 | } | ||
403 | 264 | |||
404 | 265 | printf ("\n\n"); | ||
405 | 266 | } | ||
406 | 267 | |||
407 | 226 | /* return register class from register number. */ | 268 | /* return register class from register number. */ |
408 | 227 | 269 | ||
409 | 228 | static const enum reg_class reg_class_tab[]={ | 270 | static const enum reg_class reg_class_tab[]={ |
410 | @@ -953,6 +995,27 @@ | |||
411 | 953 | fprintf (file, "/* epilogue start */\n"); | 995 | fprintf (file, "/* epilogue start */\n"); |
412 | 954 | } | 996 | } |
413 | 955 | 997 | ||
414 | 998 | |||
415 | 999 | /* Implement TARGET_CANNOT_MODITY_JUMPS_P */ | ||
416 | 1000 | |||
417 | 1001 | static bool | ||
418 | 1002 | avr_cannot_modify_jumps_p (void) | ||
419 | 1003 | { | ||
420 | 1004 | |||
421 | 1005 | /* Naked Functions must not have any instructions after | ||
422 | 1006 | their epilogue, see PR42240 */ | ||
423 | 1007 | |||
424 | 1008 | if (reload_completed | ||
425 | 1009 | && cfun->machine | ||
426 | 1010 | && cfun->machine->is_naked) | ||
427 | 1011 | { | ||
428 | 1012 | return true; | ||
429 | 1013 | } | ||
430 | 1014 | |||
431 | 1015 | return false; | ||
432 | 1016 | } | ||
433 | 1017 | |||
434 | 1018 | |||
435 | 956 | /* Return nonzero if X (an RTX) is a legitimate memory address on the target | 1019 | /* Return nonzero if X (an RTX) is a legitimate memory address on the target |
436 | 957 | machine for a memory operand of mode MODE. */ | 1020 | machine for a memory operand of mode MODE. */ |
437 | 958 | 1021 | ||
438 | 959 | 1022 | ||
439 | === modified file 'gcc/config/freebsd-spec.h' | |||
440 | --- gcc/config/freebsd-spec.h 2009-09-22 15:28:26 +0000 | |||
441 | +++ gcc/config/freebsd-spec.h 2011-04-06 13:16:33 +0000 | |||
442 | @@ -1,5 +1,6 @@ | |||
443 | 1 | /* Base configuration file for all FreeBSD targets. | 1 | /* Base configuration file for all FreeBSD targets. |
445 | 2 | Copyright (C) 1999, 2000, 2001, 2004, 2005, 2007, 2009 Free Software Foundation, Inc. | 2 | Copyright (C) 1999, 2000, 2001, 2004, 2005, 2007, 2009, 2011 |
446 | 3 | Free Software Foundation, Inc. | ||
447 | 3 | 4 | ||
448 | 4 | This file is part of GCC. | 5 | This file is part of GCC. |
449 | 5 | 6 | ||
450 | @@ -139,6 +140,9 @@ | |||
451 | 139 | %{!shared: \ | 140 | %{!shared: \ |
452 | 140 | %{!pg: %{pthread:-lpthread} -lc} \ | 141 | %{!pg: %{pthread:-lpthread} -lc} \ |
453 | 141 | %{pg: %{pthread:-lpthread_p} -lc_p} \ | 142 | %{pg: %{pthread:-lpthread_p} -lc_p} \ |
454 | 143 | } \ | ||
455 | 144 | %{shared: \ | ||
456 | 145 | %{pthread:-lpthread} -lc \ | ||
457 | 142 | }" | 146 | }" |
458 | 143 | #endif | 147 | #endif |
459 | 144 | #endif | 148 | #endif |
460 | 145 | 149 | ||
461 | === modified file 'gcc/config/i386/avxintrin.h' | |||
462 | --- gcc/config/i386/avxintrin.h 2011-01-17 13:10:18 +0000 | |||
463 | +++ gcc/config/i386/avxintrin.h 2011-04-06 13:16:33 +0000 | |||
464 | @@ -737,7 +737,7 @@ | |||
465 | 737 | _mm256_insert_epi32 (__m256i __X, int __D, int const __N) | 737 | _mm256_insert_epi32 (__m256i __X, int __D, int const __N) |
466 | 738 | { | 738 | { |
467 | 739 | __m128i __Y = _mm256_extractf128_si256 (__X, __N >> 2); | 739 | __m128i __Y = _mm256_extractf128_si256 (__X, __N >> 2); |
469 | 740 | __Y = _mm_insert_epi16 (__Y, __D, __N % 4); | 740 | __Y = _mm_insert_epi32 (__Y, __D, __N % 4); |
470 | 741 | return _mm256_insertf128_si256 (__X, __Y, __N >> 2); | 741 | return _mm256_insertf128_si256 (__X, __Y, __N >> 2); |
471 | 742 | } | 742 | } |
472 | 743 | 743 | ||
473 | @@ -762,7 +762,7 @@ | |||
474 | 762 | _mm256_insert_epi64 (__m256i __X, int __D, int const __N) | 762 | _mm256_insert_epi64 (__m256i __X, int __D, int const __N) |
475 | 763 | { | 763 | { |
476 | 764 | __m128i __Y = _mm256_extractf128_si256 (__X, __N >> 1); | 764 | __m128i __Y = _mm256_extractf128_si256 (__X, __N >> 1); |
478 | 765 | __Y = _mm_insert_epi16 (__Y, __D, __N % 2); | 765 | __Y = _mm_insert_epi64 (__Y, __D, __N % 2); |
479 | 766 | return _mm256_insertf128_si256 (__X, __Y, __N >> 1); | 766 | return _mm256_insertf128_si256 (__X, __Y, __N >> 1); |
480 | 767 | } | 767 | } |
481 | 768 | #endif | 768 | #endif |
482 | 769 | 769 | ||
483 | === modified file 'gcc/config/i386/i386.h' | |||
484 | --- gcc/config/i386/i386.h 2010-09-01 13:29:58 +0000 | |||
485 | +++ gcc/config/i386/i386.h 2011-04-06 13:16:33 +0000 | |||
486 | @@ -1282,7 +1282,7 @@ | |||
487 | 1282 | { 0xe0000000, 0x1f }, /* MMX_REGS */ \ | 1282 | { 0xe0000000, 0x1f }, /* MMX_REGS */ \ |
488 | 1283 | { 0x1fe00100,0x1fe000 }, /* FP_TOP_SSE_REG */ \ | 1283 | { 0x1fe00100,0x1fe000 }, /* FP_TOP_SSE_REG */ \ |
489 | 1284 | { 0x1fe00200,0x1fe000 }, /* FP_SECOND_SSE_REG */ \ | 1284 | { 0x1fe00200,0x1fe000 }, /* FP_SECOND_SSE_REG */ \ |
491 | 1285 | { 0x1fe0ff00,0x3fe000 }, /* FLOAT_SSE_REGS */ \ | 1285 | { 0x1fe0ff00,0x1fe000 }, /* FLOAT_SSE_REGS */ \ |
492 | 1286 | { 0x1ffff, 0x1fe0 }, /* FLOAT_INT_REGS */ \ | 1286 | { 0x1ffff, 0x1fe0 }, /* FLOAT_INT_REGS */ \ |
493 | 1287 | { 0x1fe100ff,0x1fffe0 }, /* INT_SSE_REGS */ \ | 1287 | { 0x1fe100ff,0x1fffe0 }, /* INT_SSE_REGS */ \ |
494 | 1288 | { 0x1fe1ffff,0x1fffe0 }, /* FLOAT_INT_SSE_REGS */ \ | 1288 | { 0x1fe1ffff,0x1fffe0 }, /* FLOAT_INT_SSE_REGS */ \ |
495 | 1289 | 1289 | ||
496 | === modified file 'gcc/config/i386/i386.opt' | |||
497 | --- gcc/config/i386/i386.opt 2009-12-05 20:11:52 +0000 | |||
498 | +++ gcc/config/i386/i386.opt 2011-04-06 13:16:33 +0000 | |||
499 | @@ -305,11 +305,11 @@ | |||
500 | 305 | Do not support SSE4.1 and SSE4.2 built-in functions and code generation | 305 | Do not support SSE4.1 and SSE4.2 built-in functions and code generation |
501 | 306 | 306 | ||
502 | 307 | mavx | 307 | mavx |
504 | 308 | Target Report Mask(ISA_AVX) Var(ix86_isa_flags) VarExists | 308 | Target Report Mask(ISA_AVX) Var(ix86_isa_flags) VarExists Save |
505 | 309 | Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2 and AVX built-in functions and code generation | 309 | Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2 and AVX built-in functions and code generation |
506 | 310 | 310 | ||
507 | 311 | mfma | 311 | mfma |
509 | 312 | Target Report Mask(ISA_FMA) Var(ix86_isa_flags) VarExists | 312 | Target Report Mask(ISA_FMA) Var(ix86_isa_flags) VarExists Save |
510 | 313 | Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX and FMA built-in functions and code generation | 313 | Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX and FMA built-in functions and code generation |
511 | 314 | 314 | ||
512 | 315 | msse4a | 315 | msse4a |
513 | 316 | 316 | ||
514 | === modified file 'gcc/config/i386/sse.md' | |||
515 | --- gcc/config/i386/sse.md 2011-01-17 13:10:18 +0000 | |||
516 | +++ gcc/config/i386/sse.md 2011-04-06 13:16:33 +0000 | |||
517 | @@ -8932,7 +8932,7 @@ | |||
518 | 8932 | (ss_plus:V8HI | 8932 | (ss_plus:V8HI |
519 | 8933 | (mult:V8HI | 8933 | (mult:V8HI |
520 | 8934 | (zero_extend:V8HI | 8934 | (zero_extend:V8HI |
522 | 8935 | (vec_select:V4QI | 8935 | (vec_select:V8QI |
523 | 8936 | (match_operand:V16QI 1 "register_operand" "x") | 8936 | (match_operand:V16QI 1 "register_operand" "x") |
524 | 8937 | (parallel [(const_int 0) | 8937 | (parallel [(const_int 0) |
525 | 8938 | (const_int 2) | 8938 | (const_int 2) |
526 | @@ -8955,7 +8955,7 @@ | |||
527 | 8955 | (const_int 14)])))) | 8955 | (const_int 14)])))) |
528 | 8956 | (mult:V8HI | 8956 | (mult:V8HI |
529 | 8957 | (zero_extend:V8HI | 8957 | (zero_extend:V8HI |
531 | 8958 | (vec_select:V16QI (match_dup 1) | 8958 | (vec_select:V8QI (match_dup 1) |
532 | 8959 | (parallel [(const_int 1) | 8959 | (parallel [(const_int 1) |
533 | 8960 | (const_int 3) | 8960 | (const_int 3) |
534 | 8961 | (const_int 5) | 8961 | (const_int 5) |
535 | @@ -8965,7 +8965,7 @@ | |||
536 | 8965 | (const_int 13) | 8965 | (const_int 13) |
537 | 8966 | (const_int 15)]))) | 8966 | (const_int 15)]))) |
538 | 8967 | (sign_extend:V8HI | 8967 | (sign_extend:V8HI |
540 | 8968 | (vec_select:V16QI (match_dup 2) | 8968 | (vec_select:V8QI (match_dup 2) |
541 | 8969 | (parallel [(const_int 1) | 8969 | (parallel [(const_int 1) |
542 | 8970 | (const_int 3) | 8970 | (const_int 3) |
543 | 8971 | (const_int 5) | 8971 | (const_int 5) |
544 | @@ -8986,7 +8986,7 @@ | |||
545 | 8986 | (ss_plus:V8HI | 8986 | (ss_plus:V8HI |
546 | 8987 | (mult:V8HI | 8987 | (mult:V8HI |
547 | 8988 | (zero_extend:V8HI | 8988 | (zero_extend:V8HI |
549 | 8989 | (vec_select:V4QI | 8989 | (vec_select:V8QI |
550 | 8990 | (match_operand:V16QI 1 "register_operand" "0") | 8990 | (match_operand:V16QI 1 "register_operand" "0") |
551 | 8991 | (parallel [(const_int 0) | 8991 | (parallel [(const_int 0) |
552 | 8992 | (const_int 2) | 8992 | (const_int 2) |
553 | @@ -9009,7 +9009,7 @@ | |||
554 | 9009 | (const_int 14)])))) | 9009 | (const_int 14)])))) |
555 | 9010 | (mult:V8HI | 9010 | (mult:V8HI |
556 | 9011 | (zero_extend:V8HI | 9011 | (zero_extend:V8HI |
558 | 9012 | (vec_select:V16QI (match_dup 1) | 9012 | (vec_select:V8QI (match_dup 1) |
559 | 9013 | (parallel [(const_int 1) | 9013 | (parallel [(const_int 1) |
560 | 9014 | (const_int 3) | 9014 | (const_int 3) |
561 | 9015 | (const_int 5) | 9015 | (const_int 5) |
562 | @@ -9019,7 +9019,7 @@ | |||
563 | 9019 | (const_int 13) | 9019 | (const_int 13) |
564 | 9020 | (const_int 15)]))) | 9020 | (const_int 15)]))) |
565 | 9021 | (sign_extend:V8HI | 9021 | (sign_extend:V8HI |
567 | 9022 | (vec_select:V16QI (match_dup 2) | 9022 | (vec_select:V8QI (match_dup 2) |
568 | 9023 | (parallel [(const_int 1) | 9023 | (parallel [(const_int 1) |
569 | 9024 | (const_int 3) | 9024 | (const_int 3) |
570 | 9025 | (const_int 5) | 9025 | (const_int 5) |
571 | @@ -9056,13 +9056,13 @@ | |||
572 | 9056 | (const_int 6)])))) | 9056 | (const_int 6)])))) |
573 | 9057 | (mult:V4HI | 9057 | (mult:V4HI |
574 | 9058 | (zero_extend:V4HI | 9058 | (zero_extend:V4HI |
576 | 9059 | (vec_select:V8QI (match_dup 1) | 9059 | (vec_select:V4QI (match_dup 1) |
577 | 9060 | (parallel [(const_int 1) | 9060 | (parallel [(const_int 1) |
578 | 9061 | (const_int 3) | 9061 | (const_int 3) |
579 | 9062 | (const_int 5) | 9062 | (const_int 5) |
580 | 9063 | (const_int 7)]))) | 9063 | (const_int 7)]))) |
581 | 9064 | (sign_extend:V4HI | 9064 | (sign_extend:V4HI |
583 | 9065 | (vec_select:V8QI (match_dup 2) | 9065 | (vec_select:V4QI (match_dup 2) |
584 | 9066 | (parallel [(const_int 1) | 9066 | (parallel [(const_int 1) |
585 | 9067 | (const_int 3) | 9067 | (const_int 3) |
586 | 9068 | (const_int 5) | 9068 | (const_int 5) |
587 | 9069 | 9069 | ||
588 | === modified file 'gcc/config/rs6000/rs6000.h' | |||
589 | --- gcc/config/rs6000/rs6000.h 2011-02-04 16:31:48 +0000 | |||
590 | +++ gcc/config/rs6000/rs6000.h 2011-04-06 13:16:33 +0000 | |||
591 | @@ -1036,6 +1036,16 @@ | |||
592 | 1036 | 1036 | ||
593 | 1037 | #define HARD_REGNO_NREGS(REGNO, MODE) rs6000_hard_regno_nregs[(MODE)][(REGNO)] | 1037 | #define HARD_REGNO_NREGS(REGNO, MODE) rs6000_hard_regno_nregs[(MODE)][(REGNO)] |
594 | 1038 | 1038 | ||
595 | 1039 | /* When setting up caller-save slots (MODE == VOIDmode) ensure we allocate | ||
596 | 1040 | enough space to account for vectors in FP regs. */ | ||
597 | 1041 | #define HARD_REGNO_CALLER_SAVE_MODE(REGNO, NREGS, MODE) \ | ||
598 | 1042 | (TARGET_VSX \ | ||
599 | 1043 | && ((MODE) == VOIDmode || VSX_VECTOR_MODE (MODE) \ | ||
600 | 1044 | || ALTIVEC_VECTOR_MODE (MODE)) \ | ||
601 | 1045 | && FP_REGNO_P (REGNO) \ | ||
602 | 1046 | ? V2DFmode \ | ||
603 | 1047 | : choose_hard_reg_mode ((REGNO), (NREGS), false)) | ||
604 | 1048 | |||
605 | 1039 | #define HARD_REGNO_CALL_PART_CLOBBERED(REGNO, MODE) \ | 1049 | #define HARD_REGNO_CALL_PART_CLOBBERED(REGNO, MODE) \ |
606 | 1040 | (((TARGET_32BIT && TARGET_POWERPC64 \ | 1050 | (((TARGET_32BIT && TARGET_POWERPC64 \ |
607 | 1041 | && (GET_MODE_SIZE (MODE) > 4) \ | 1051 | && (GET_MODE_SIZE (MODE) > 4) \ |
608 | 1042 | 1052 | ||
609 | === modified file 'gcc/config/rx/rx-protos.h' | |||
610 | --- gcc/config/rx/rx-protos.h 2011-02-02 14:31:55 +0000 | |||
611 | +++ gcc/config/rx/rx-protos.h 2011-04-06 13:16:33 +0000 | |||
612 | @@ -31,6 +31,7 @@ | |||
613 | 31 | extern void rx_set_optimization_options (void); | 31 | extern void rx_set_optimization_options (void); |
614 | 32 | 32 | ||
615 | 33 | #ifdef RTX_CODE | 33 | #ifdef RTX_CODE |
616 | 34 | extern int rx_align_for_label (rtx); | ||
617 | 34 | extern bool rx_compare_redundant (rtx); | 35 | extern bool rx_compare_redundant (rtx); |
618 | 35 | extern void rx_emit_stack_popm (rtx *, bool); | 36 | extern void rx_emit_stack_popm (rtx *, bool); |
619 | 36 | extern void rx_emit_stack_pushm (rtx *); | 37 | extern void rx_emit_stack_pushm (rtx *); |
620 | @@ -41,6 +42,7 @@ | |||
621 | 41 | extern bool rx_is_mode_dependent_addr (rtx); | 42 | extern bool rx_is_mode_dependent_addr (rtx); |
622 | 42 | extern bool rx_is_restricted_memory_address (rtx, Mmode); | 43 | extern bool rx_is_restricted_memory_address (rtx, Mmode); |
623 | 43 | extern bool rx_match_ccmode (rtx, Mmode); | 44 | extern bool rx_match_ccmode (rtx, Mmode); |
624 | 45 | extern int rx_max_skip_for_label (rtx); | ||
625 | 44 | extern void rx_notice_update_cc (rtx body, rtx insn); | 46 | extern void rx_notice_update_cc (rtx body, rtx insn); |
626 | 45 | extern void rx_print_operand (FILE *, rtx, int); | 47 | extern void rx_print_operand (FILE *, rtx, int); |
627 | 46 | extern void rx_print_operand_address (FILE *, rtx); | 48 | extern void rx_print_operand_address (FILE *, rtx); |
628 | 47 | 49 | ||
629 | === modified file 'gcc/config/rx/rx.c' | |||
630 | --- gcc/config/rx/rx.c 2011-02-22 11:38:56 +0000 | |||
631 | +++ gcc/config/rx/rx.c 2011-04-06 13:16:33 +0000 | |||
632 | @@ -80,7 +80,9 @@ | |||
633 | 80 | /* Register Indirect. */ | 80 | /* Register Indirect. */ |
634 | 81 | return true; | 81 | return true; |
635 | 82 | 82 | ||
637 | 83 | if (GET_MODE_SIZE (mode) == 4 | 83 | if ((GET_MODE_SIZE (mode) == 4 |
638 | 84 | || GET_MODE_SIZE (mode) == 2 | ||
639 | 85 | || GET_MODE_SIZE (mode) == 1) | ||
640 | 84 | && (GET_CODE (x) == PRE_DEC || GET_CODE (x) == POST_INC)) | 86 | && (GET_CODE (x) == PRE_DEC || GET_CODE (x) == POST_INC)) |
641 | 85 | /* Pre-decrement Register Indirect or | 87 | /* Pre-decrement Register Indirect or |
642 | 86 | Post-increment Register Indirect. */ | 88 | Post-increment Register Indirect. */ |
643 | @@ -182,7 +184,10 @@ | |||
644 | 182 | base = XEXP (mem, 0); | 184 | base = XEXP (mem, 0); |
645 | 183 | index = XEXP (mem, 1); | 185 | index = XEXP (mem, 1); |
646 | 184 | 186 | ||
648 | 185 | return RX_REG_P (base) && CONST_INT_P (index); | 187 | if (! RX_REG_P (base) || ! CONST_INT_P (index)) |
649 | 188 | return false; | ||
650 | 189 | |||
651 | 190 | return IN_RANGE (INTVAL (index), 0, (0x10000 * GET_MODE_SIZE (mode)) - 1); | ||
652 | 186 | 191 | ||
653 | 187 | case SYMBOL_REF: | 192 | case SYMBOL_REF: |
654 | 188 | /* Can happen when small data is being supported. | 193 | /* Can happen when small data is being supported. |
655 | @@ -447,11 +452,14 @@ | |||
656 | 447 | %L Print low part of a DImode register, integer or address. | 452 | %L Print low part of a DImode register, integer or address. |
657 | 448 | %N Print the negation of the immediate value. | 453 | %N Print the negation of the immediate value. |
658 | 449 | %Q If the operand is a MEM, then correctly generate | 454 | %Q If the operand is a MEM, then correctly generate |
660 | 450 | register indirect or register relative addressing. */ | 455 | register indirect or register relative addressing. |
661 | 456 | %R Like %Q but for zero-extending loads. */ | ||
662 | 451 | 457 | ||
663 | 452 | void | 458 | void |
664 | 453 | rx_print_operand (FILE * file, rtx op, int letter) | 459 | rx_print_operand (FILE * file, rtx op, int letter) |
665 | 454 | { | 460 | { |
666 | 461 | bool unsigned_load = false; | ||
667 | 462 | |||
668 | 455 | switch (letter) | 463 | switch (letter) |
669 | 456 | { | 464 | { |
670 | 457 | case 'A': | 465 | case 'A': |
671 | @@ -615,10 +623,15 @@ | |||
672 | 615 | rx_print_integer (file, - INTVAL (op)); | 623 | rx_print_integer (file, - INTVAL (op)); |
673 | 616 | break; | 624 | break; |
674 | 617 | 625 | ||
675 | 626 | case 'R': | ||
676 | 627 | gcc_assert (GET_MODE_SIZE (GET_MODE (op)) < 4); | ||
677 | 628 | unsigned_load = true; | ||
678 | 629 | /* Fall through. */ | ||
679 | 618 | case 'Q': | 630 | case 'Q': |
680 | 619 | if (MEM_P (op)) | 631 | if (MEM_P (op)) |
681 | 620 | { | 632 | { |
682 | 621 | HOST_WIDE_INT offset; | 633 | HOST_WIDE_INT offset; |
683 | 634 | rtx mem = op; | ||
684 | 622 | 635 | ||
685 | 623 | op = XEXP (op, 0); | 636 | op = XEXP (op, 0); |
686 | 624 | 637 | ||
687 | @@ -653,22 +666,24 @@ | |||
688 | 653 | rx_print_operand (file, op, 0); | 666 | rx_print_operand (file, op, 0); |
689 | 654 | fprintf (file, "]."); | 667 | fprintf (file, "]."); |
690 | 655 | 668 | ||
692 | 656 | switch (GET_MODE_SIZE (GET_MODE (op))) | 669 | switch (GET_MODE_SIZE (GET_MODE (mem))) |
693 | 657 | { | 670 | { |
694 | 658 | case 1: | 671 | case 1: |
697 | 659 | gcc_assert (offset < 65535 * 1); | 672 | gcc_assert (offset <= 65535 * 1); |
698 | 660 | fprintf (file, "B"); | 673 | fprintf (file, unsigned_load ? "UB" : "B"); |
699 | 661 | break; | 674 | break; |
700 | 662 | case 2: | 675 | case 2: |
701 | 663 | gcc_assert (offset % 2 == 0); | 676 | gcc_assert (offset % 2 == 0); |
704 | 664 | gcc_assert (offset < 65535 * 2); | 677 | gcc_assert (offset <= 65535 * 2); |
705 | 665 | fprintf (file, "W"); | 678 | fprintf (file, unsigned_load ? "UW" : "W"); |
706 | 666 | break; | 679 | break; |
708 | 667 | default: | 680 | case 4: |
709 | 668 | gcc_assert (offset % 4 == 0); | 681 | gcc_assert (offset % 4 == 0); |
711 | 669 | gcc_assert (offset < 65535 * 4); | 682 | gcc_assert (offset <= 65535 * 4); |
712 | 670 | fprintf (file, "L"); | 683 | fprintf (file, "L"); |
713 | 671 | break; | 684 | break; |
714 | 685 | default: | ||
715 | 686 | gcc_unreachable (); | ||
716 | 672 | } | 687 | } |
717 | 673 | break; | 688 | break; |
718 | 674 | } | 689 | } |
719 | @@ -2664,6 +2679,36 @@ | |||
720 | 2664 | return true; | 2679 | return true; |
721 | 2665 | } | 2680 | } |
722 | 2666 | 2681 | ||
723 | 2667 | 2682 | ||
724 | 2683 | int | ||
725 | 2684 | rx_align_for_label (rtx lab ATTRIBUTE_UNUSED) | ||
726 | 2685 | { | ||
727 | 2686 | return optimize_size ? 1 : 3; | ||
728 | 2687 | } | ||
729 | 2688 | |||
730 | 2689 | int | ||
731 | 2690 | rx_max_skip_for_label (rtx lab) | ||
732 | 2691 | { | ||
733 | 2692 | int opsize; | ||
734 | 2693 | rtx op; | ||
735 | 2694 | |||
736 | 2695 | if (lab == NULL_RTX) | ||
737 | 2696 | return 0; | ||
738 | 2697 | op = lab; | ||
739 | 2698 | do | ||
740 | 2699 | { | ||
741 | 2700 | op = next_nonnote_insn (op); | ||
742 | 2701 | } | ||
743 | 2702 | while (op && (LABEL_P (op) | ||
744 | 2703 | || (INSN_P (op) && GET_CODE (PATTERN (op)) == USE))); | ||
745 | 2704 | if (!op) | ||
746 | 2705 | return 0; | ||
747 | 2706 | |||
748 | 2707 | opsize = get_attr_length (op); | ||
749 | 2708 | if (opsize >= 0 && opsize < 8) | ||
750 | 2709 | return opsize - 1; | ||
751 | 2710 | return 0; | ||
752 | 2711 | } | ||
753 | 2712 | |||
754 | 2668 | 2713 | ||
755 | 2669 | #undef TARGET_FUNCTION_VALUE | 2714 | #undef TARGET_FUNCTION_VALUE |
756 | 2670 | #define TARGET_FUNCTION_VALUE rx_function_value | 2715 | #define TARGET_FUNCTION_VALUE rx_function_value |
757 | 2671 | 2716 | ||
758 | 2672 | 2717 | ||
759 | === modified file 'gcc/config/rx/rx.h' | |||
760 | --- gcc/config/rx/rx.h 2011-02-02 14:31:55 +0000 | |||
761 | +++ gcc/config/rx/rx.h 2011-04-06 13:16:33 +0000 | |||
762 | @@ -659,7 +659,33 @@ | |||
763 | 659 | 659 | ||
764 | 660 | #define BRANCH_COST(SPEED, PREDICT) 1 | 660 | #define BRANCH_COST(SPEED, PREDICT) 1 |
765 | 661 | #define REGISTER_MOVE_COST(MODE, FROM, TO) 2 | 661 | #define REGISTER_MOVE_COST(MODE, FROM, TO) 2 |
767 | 662 | #define MEMORY_MOVE_COST(MODE, REGCLASS, IN) (2 + memory_move_secondary_cost (MODE, REGCLASS, IN)) | 662 | #define MEMORY_MOVE_COST(MODE, REGCLASS, IN) \ |
768 | 663 | (((IN) ? 2 : 0) + memory_move_secondary_cost (MODE, REGCLASS, IN)) | ||
769 | 663 | 664 | ||
770 | 664 | #define SELECT_CC_MODE(OP,X,Y) rx_select_cc_mode ((OP), (X), (Y)) | 665 | #define SELECT_CC_MODE(OP,X,Y) rx_select_cc_mode ((OP), (X), (Y)) |
771 | 665 | 666 | ||
772 | 667 | #define JUMP_ALIGN(x) rx_align_for_label (x) | ||
773 | 668 | #define JUMP_ALIGN_MAX_SKIP rx_max_skip_for_label (label) | ||
774 | 669 | #define LABEL_ALIGN_AFTER_BARRIER(x) rx_align_for_label (x) | ||
775 | 670 | #define LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP rx_max_skip_for_label (label) | ||
776 | 671 | #define LOOP_ALIGN(x) rx_align_for_label (x) | ||
777 | 672 | #define LOOP_ALIGN_MAX_SKIP rx_max_skip_for_label (label) | ||
778 | 673 | #define LABEL_ALIGN(x) rx_align_for_label (x) | ||
779 | 674 | #define LABEL_ALIGN_MAX_SKIP rx_max_skip_for_label (NULL_RTX) | ||
780 | 675 | |||
781 | 676 | #define ASM_OUTPUT_MAX_SKIP_ALIGN(STREAM, LOG, MAX_SKIP) \ | ||
782 | 677 | do \ | ||
783 | 678 | { \ | ||
784 | 679 | if ((LOG) == 0 || (MAX_SKIP) == 0) \ | ||
785 | 680 | break; \ | ||
786 | 681 | if (TARGET_AS100_SYNTAX) \ | ||
787 | 682 | { \ | ||
788 | 683 | if ((LOG) >= 2) \ | ||
789 | 684 | fprintf (STREAM, "\t.ALIGN 4\t; %d alignment actually requested\n", 1 << (LOG)); \ | ||
790 | 685 | else \ | ||
791 | 686 | fprintf (STREAM, "\t.ALIGN 2\n"); \ | ||
792 | 687 | } \ | ||
793 | 688 | else \ | ||
794 | 689 | fprintf (STREAM, "\t.balign %d,3,%d\n", 1 << (LOG), (MAX_SKIP)); \ | ||
795 | 690 | } \ | ||
796 | 691 | while (0) | ||
797 | 666 | 692 | ||
798 | === modified file 'gcc/config/rx/rx.md' | |||
799 | --- gcc/config/rx/rx.md 2011-02-02 14:31:55 +0000 | |||
800 | +++ gcc/config/rx/rx.md 2011-04-06 13:16:33 +0000 | |||
801 | @@ -798,7 +798,10 @@ | |||
802 | 798 | (set (reg CC_REG) | 798 | (set (reg CC_REG) |
803 | 799 | (compare (abs:SI (match_dup 1)) | 799 | (compare (abs:SI (match_dup 1)) |
804 | 800 | (const_int 0)))] | 800 | (const_int 0)))] |
806 | 801 | "reload_completed && rx_match_ccmode (insn, CC_ZSOmode)" | 801 | ;; Note - although the ABS instruction does set the O bit in the processor |
807 | 802 | ;; status word, it does not do so in a way that is comparable with the CMP | ||
808 | 803 | ;; instruction. Hence we use CC_ZSmode rather than CC_ZSOmode. | ||
809 | 804 | "reload_completed && rx_match_ccmode (insn, CC_ZSmode)" | ||
810 | 802 | "@ | 805 | "@ |
811 | 803 | abs\t%0 | 806 | abs\t%0 |
812 | 804 | abs\t%1, %0" | 807 | abs\t%1, %0" |
813 | @@ -1005,7 +1008,7 @@ | |||
814 | 1005 | and\t%1, %0 | 1008 | and\t%1, %0 |
815 | 1006 | and\t%2, %1, %0 | 1009 | and\t%2, %1, %0 |
816 | 1007 | and\t%Q2, %0" | 1010 | and\t%Q2, %0" |
818 | 1008 | [(set_attr "timings" "11,11,11,11,11,11,11,33,33") | 1011 | [(set_attr "timings" "11,11,11,11,11,11,11,11,33") |
819 | 1009 | (set_attr "length" "2,2,3,4,5,6,2,5,5")] | 1012 | (set_attr "length" "2,2,3,4,5,6,2,5,5")] |
820 | 1010 | ) | 1013 | ) |
821 | 1011 | 1014 | ||
822 | @@ -1027,7 +1030,7 @@ | |||
823 | 1027 | and\t%1, %0 | 1030 | and\t%1, %0 |
824 | 1028 | and\t%2, %1, %0 | 1031 | and\t%2, %1, %0 |
825 | 1029 | and\t%Q2, %0" | 1032 | and\t%Q2, %0" |
827 | 1030 | [(set_attr "timings" "11,11,11,11,11,11,11,33,33") | 1033 | [(set_attr "timings" "11,11,11,11,11,11,11,11,33") |
828 | 1031 | (set_attr "length" "2,2,3,4,5,6,2,5,5")] | 1034 | (set_attr "length" "2,2,3,4,5,6,2,5,5")] |
829 | 1032 | ) | 1035 | ) |
830 | 1033 | 1036 | ||
831 | @@ -1543,6 +1546,139 @@ | |||
832 | 1543 | (set_attr "length" "3,4,5,6,7,6")] | 1546 | (set_attr "length" "3,4,5,6,7,6")] |
833 | 1544 | ) | 1547 | ) |
834 | 1545 | 1548 | ||
835 | 1546 | 1549 | ||
836 | 1550 | ;; A set of peepholes to catch extending loads followed by arithmetic operations. | ||
837 | 1551 | ;; We use iterators where possible to reduce the amount of typing and hence the | ||
838 | 1552 | ;; possibilities for typos. | ||
839 | 1553 | |||
840 | 1554 | (define_code_iterator extend_types [(zero_extend "") (sign_extend "")]) | ||
841 | 1555 | (define_code_attr letter [(zero_extend "R") (sign_extend "Q")]) | ||
842 | 1556 | |||
843 | 1557 | (define_code_iterator memex_commutative [(plus "") (and "") (ior "") (xor "")]) | ||
844 | 1558 | (define_code_iterator memex_noncomm [(div "") (udiv "") (minus "")]) | ||
845 | 1559 | (define_code_iterator memex_nocc [(smax "") (smin "") (mult "")]) | ||
846 | 1560 | |||
847 | 1561 | (define_code_attr op [(plus "add") (and "and") (div "div") (udiv "divu") (smax "max") (smin "min") (mult "mul") (ior "or") (minus "sub") (xor "xor")]) | ||
848 | 1562 | |||
849 | 1563 | (define_peephole2 | ||
850 | 1564 | [(set (match_operand:SI 0 "register_operand") | ||
851 | 1565 | (extend_types:SI (match_operand:small_int_modes 1 "rx_restricted_mem_operand"))) | ||
852 | 1566 | (parallel [(set (match_operand:SI 2 "register_operand") | ||
853 | 1567 | (memex_commutative:SI (match_dup 0) | ||
854 | 1568 | (match_dup 2))) | ||
855 | 1569 | (clobber (reg:CC CC_REG))])] | ||
856 | 1570 | "peep2_regno_dead_p (2, REGNO (operands[0]))" | ||
857 | 1571 | [(parallel [(set:SI (match_dup 2) | ||
858 | 1572 | (memex_commutative:SI (match_dup 2) | ||
859 | 1573 | (extend_types:SI (match_dup 1)))) | ||
860 | 1574 | (clobber (reg:CC CC_REG))])] | ||
861 | 1575 | ) | ||
862 | 1576 | |||
863 | 1577 | (define_peephole2 | ||
864 | 1578 | [(set (match_operand:SI 0 "register_operand") | ||
865 | 1579 | (extend_types:SI (match_operand:small_int_modes 1 "rx_restricted_mem_operand"))) | ||
866 | 1580 | (parallel [(set (match_operand:SI 2 "register_operand") | ||
867 | 1581 | (memex_commutative:SI (match_dup 2) | ||
868 | 1582 | (match_dup 0))) | ||
869 | 1583 | (clobber (reg:CC CC_REG))])] | ||
870 | 1584 | "peep2_regno_dead_p (2, REGNO (operands[0]))" | ||
871 | 1585 | [(parallel [(set:SI (match_dup 2) | ||
872 | 1586 | (memex_commutative:SI (match_dup 2) | ||
873 | 1587 | (extend_types:SI (match_dup 1)))) | ||
874 | 1588 | (clobber (reg:CC CC_REG))])] | ||
875 | 1589 | ) | ||
876 | 1590 | |||
877 | 1591 | (define_peephole2 | ||
878 | 1592 | [(set (match_operand:SI 0 "register_operand") | ||
879 | 1593 | (extend_types:SI (match_operand:small_int_modes 1 "rx_restricted_mem_operand"))) | ||
880 | 1594 | (parallel [(set (match_operand:SI 2 "register_operand") | ||
881 | 1595 | (memex_noncomm:SI (match_dup 2) | ||
882 | 1596 | (match_dup 0))) | ||
883 | 1597 | (clobber (reg:CC CC_REG))])] | ||
884 | 1598 | "peep2_regno_dead_p (2, REGNO (operands[0]))" | ||
885 | 1599 | [(parallel [(set:SI (match_dup 2) | ||
886 | 1600 | (memex_noncomm:SI (match_dup 2) | ||
887 | 1601 | (extend_types:SI (match_dup 1)))) | ||
888 | 1602 | (clobber (reg:CC CC_REG))])] | ||
889 | 1603 | ) | ||
890 | 1604 | |||
891 | 1605 | (define_peephole2 | ||
892 | 1606 | [(set (match_operand:SI 0 "register_operand") | ||
893 | 1607 | (extend_types:SI (match_operand:small_int_modes 1 "rx_restricted_mem_operand"))) | ||
894 | 1608 | (set (match_operand:SI 2 "register_operand") | ||
895 | 1609 | (memex_nocc:SI (match_dup 0) | ||
896 | 1610 | (match_dup 2)))] | ||
897 | 1611 | "peep2_regno_dead_p (2, REGNO (operands[0]))" | ||
898 | 1612 | [(set:SI (match_dup 2) | ||
899 | 1613 | (memex_nocc:SI (match_dup 2) | ||
900 | 1614 | (extend_types:SI (match_dup 1))))] | ||
901 | 1615 | ) | ||
902 | 1616 | |||
903 | 1617 | (define_peephole2 | ||
904 | 1618 | [(set (match_operand:SI 0 "register_operand") | ||
905 | 1619 | (extend_types:SI (match_operand:small_int_modes 1 "rx_restricted_mem_operand"))) | ||
906 | 1620 | (set (match_operand:SI 2 "register_operand") | ||
907 | 1621 | (memex_nocc:SI (match_dup 2) | ||
908 | 1622 | (match_dup 0)))] | ||
909 | 1623 | "peep2_regno_dead_p (2, REGNO (operands[0]))" | ||
910 | 1624 | [(set:SI (match_dup 2) | ||
911 | 1625 | (memex_nocc:SI (match_dup 2) | ||
912 | 1626 | (extend_types:SI (match_dup 1))))] | ||
913 | 1627 | ) | ||
914 | 1628 | |||
915 | 1629 | (define_insn "*<memex_commutative:code>si3_<extend_types:code><small_int_modes:mode>" | ||
916 | 1630 | [(set (match_operand:SI 0 "register_operand" "=r") | ||
917 | 1631 | (memex_commutative:SI (match_operand:SI 1 "register_operand" "%0") | ||
918 | 1632 | (extend_types:SI (match_operand:small_int_modes 2 "rx_restricted_mem_operand" "Q")))) | ||
919 | 1633 | (clobber (reg:CC CC_REG))] | ||
920 | 1634 | "" | ||
921 | 1635 | "<memex_commutative:op>\t%<extend_types:letter>2, %0" | ||
922 | 1636 | [(set_attr "timings" "33") | ||
923 | 1637 | (set_attr "length" "5")] ;; Worst case sceanario. FIXME: If we defined separate patterns | ||
924 | 1638 | ) ;; rather than using iterators we could specify exact sizes. | ||
925 | 1639 | |||
926 | 1640 | (define_insn "*<memex_noncomm:code>si3_<extend_types:code><small_int_modes:mode>" | ||
927 | 1641 | [(set (match_operand:SI 0 "register_operand" "=r") | ||
928 | 1642 | (memex_noncomm:SI (match_operand:SI 1 "register_operand" "0") | ||
929 | 1643 | (extend_types:SI (match_operand:small_int_modes 2 "rx_restricted_mem_operand" "Q")))) | ||
930 | 1644 | (clobber (reg:CC CC_REG))] | ||
931 | 1645 | "" | ||
932 | 1646 | "<memex_noncomm:op>\t%<extend_types:letter>2, %0" | ||
933 | 1647 | [(set_attr "timings" "33") | ||
934 | 1648 | (set_attr "length" "5")] ;; Worst case sceanario. FIXME: If we defined separate patterns | ||
935 | 1649 | ) ;; rather than using iterators we could specify exact sizes. | ||
936 | 1650 | |||
937 | 1651 | (define_insn "*<memex_nocc:code>si3_<extend_types:code><small_int_modes:mode>" | ||
938 | 1652 | [(set (match_operand:SI 0 "register_operand" "=r") | ||
939 | 1653 | (memex_nocc:SI (match_operand:SI 1 "register_operand" "%0") | ||
940 | 1654 | (extend_types:SI (match_operand:small_int_modes 2 "rx_restricted_mem_operand" "Q"))))] | ||
941 | 1655 | "" | ||
942 | 1656 | "<memex_nocc:op>\t%<extend_types:letter>2, %0" | ||
943 | 1657 | [(set_attr "timings" "33") | ||
944 | 1658 | (set_attr "length" "5")] ;; Worst case sceanario. FIXME: If we defined separate patterns | ||
945 | 1659 | ) ;; rather than using iterators we could specify exact sizes. | ||
946 | 1660 | |||
947 | 1661 | (define_peephole2 | ||
948 | 1662 | [(set (match_operand:SI 0 "register_operand") | ||
949 | 1663 | (extend_types:SI (match_operand:small_int_modes 1 "rx_restricted_mem_operand"))) | ||
950 | 1664 | (set (reg:CC CC_REG) | ||
951 | 1665 | (compare:CC (match_operand:SI 2 "register_operand") | ||
952 | 1666 | (match_dup 0)))] | ||
953 | 1667 | "peep2_regno_dead_p (2, REGNO (operands[0]))" | ||
954 | 1668 | [(set (reg:CC CC_REG) | ||
955 | 1669 | (compare:CC (match_dup 2) | ||
956 | 1670 | (extend_types:SI (match_dup 1))))] | ||
957 | 1671 | ) | ||
958 | 1672 | |||
959 | 1673 | (define_insn "*comparesi3_<extend_types:code><small_int_modes:mode>" | ||
960 | 1674 | [(set (reg:CC CC_REG) | ||
961 | 1675 | (compare:CC (match_operand:SI 0 "register_operand" "=r") | ||
962 | 1676 | (extend_types:SI (match_operand:small_int_modes 1 "rx_restricted_mem_operand" "Q"))))] | ||
963 | 1677 | "" | ||
964 | 1678 | "cmp\t%<extend_types:letter>1, %0" | ||
965 | 1679 | [(set_attr "timings" "33") | ||
966 | 1680 | (set_attr "length" "5")] ;; Worst case sceanario. FIXME: If we defined separate patterns | ||
967 | 1681 | ) ;; rather than using iterators we could specify exact sizes. | ||
968 | 1682 | |||
969 | 1547 | 1683 | ||
970 | 1548 | ;; Floating Point Instructions | 1684 | ;; Floating Point Instructions |
971 | 1549 | 1685 | ||
972 | 1550 | (define_insn "addsf3" | 1686 | (define_insn "addsf3" |
973 | @@ -1641,7 +1777,7 @@ | |||
974 | 1641 | "" | 1777 | "" |
975 | 1642 | "bset\t%1, %0.B" | 1778 | "bset\t%1, %0.B" |
976 | 1643 | [(set_attr "length" "3") | 1779 | [(set_attr "length" "3") |
978 | 1644 | (set_attr "timings" "34")] | 1780 | (set_attr "timings" "33")] |
979 | 1645 | ) | 1781 | ) |
980 | 1646 | 1782 | ||
981 | 1647 | (define_insn "*bitinvert" | 1783 | (define_insn "*bitinvert" |
982 | @@ -1687,7 +1823,7 @@ | |||
983 | 1687 | "" | 1823 | "" |
984 | 1688 | "bclr\t%1, %0.B" | 1824 | "bclr\t%1, %0.B" |
985 | 1689 | [(set_attr "length" "3") | 1825 | [(set_attr "length" "3") |
987 | 1690 | (set_attr "timings" "34")] | 1826 | (set_attr "timings" "33")] |
988 | 1691 | ) | 1827 | ) |
989 | 1692 | 1828 | ||
990 | 1693 | (define_insn "*insv_imm" | 1829 | (define_insn "*insv_imm" |
991 | 1694 | 1830 | ||
992 | === modified file 'gcc/config/s390/s390.c' | |||
993 | --- gcc/config/s390/s390.c 2011-02-08 10:51:58 +0000 | |||
994 | +++ gcc/config/s390/s390.c 2011-04-06 13:16:33 +0000 | |||
995 | @@ -2830,12 +2830,16 @@ | |||
996 | 2830 | it is most likely being used as an address, so | 2830 | it is most likely being used as an address, so |
997 | 2831 | prefer ADDR_REGS. If 'class' is not a superset | 2831 | prefer ADDR_REGS. If 'class' is not a superset |
998 | 2832 | of ADDR_REGS, e.g. FP_REGS, reject this reload. */ | 2832 | of ADDR_REGS, e.g. FP_REGS, reject this reload. */ |
999 | 2833 | case PLUS: | ||
1000 | 2834 | case LABEL_REF: | 2833 | case LABEL_REF: |
1001 | 2835 | case SYMBOL_REF: | 2834 | case SYMBOL_REF: |
1002 | 2836 | case CONST: | 2835 | case CONST: |
1003 | 2836 | if (!legitimate_reload_constant_p (op)) | ||
1004 | 2837 | return NO_REGS; | ||
1005 | 2838 | /* fallthrough */ | ||
1006 | 2839 | case PLUS: | ||
1007 | 2840 | /* load address will be used. */ | ||
1008 | 2837 | if (reg_class_subset_p (ADDR_REGS, rclass)) | 2841 | if (reg_class_subset_p (ADDR_REGS, rclass)) |
1010 | 2838 | return ADDR_REGS; | 2842 | return ADDR_REGS; |
1011 | 2839 | else | 2843 | else |
1012 | 2840 | return NO_REGS; | 2844 | return NO_REGS; |
1013 | 2841 | 2845 | ||
1014 | @@ -2951,12 +2955,16 @@ | |||
1015 | 2951 | 2955 | ||
1016 | 2952 | if (TARGET_Z10) | 2956 | if (TARGET_Z10) |
1017 | 2953 | { | 2957 | { |
1018 | 2958 | HOST_WIDE_INT offset; | ||
1019 | 2959 | rtx symref; | ||
1020 | 2960 | |||
1021 | 2954 | /* On z10 several optimizer steps may generate larl operands with | 2961 | /* On z10 several optimizer steps may generate larl operands with |
1022 | 2955 | an odd addend. */ | 2962 | an odd addend. */ |
1023 | 2956 | if (in_p | 2963 | if (in_p |
1025 | 2957 | && s390_symref_operand_p (x, NULL, NULL) | 2964 | && s390_symref_operand_p (x, &symref, &offset) |
1026 | 2958 | && mode == Pmode | 2965 | && mode == Pmode |
1028 | 2959 | && !s390_check_symref_alignment (x, 2)) | 2966 | && !SYMBOL_REF_ALIGN1_P (symref) |
1029 | 2967 | && (offset & 1) == 1) | ||
1030 | 2960 | sri->icode = ((mode == DImode) ? CODE_FOR_reloaddi_larl_odd_addend_z10 | 2968 | sri->icode = ((mode == DImode) ? CODE_FOR_reloaddi_larl_odd_addend_z10 |
1031 | 2961 | : CODE_FOR_reloadsi_larl_odd_addend_z10); | 2969 | : CODE_FOR_reloadsi_larl_odd_addend_z10); |
1032 | 2962 | 2970 | ||
1033 | 2963 | 2971 | ||
1034 | === modified file 'gcc/cp/ChangeLog' | |||
1035 | --- gcc/cp/ChangeLog 2010-12-16 12:33:06 +0000 | |||
1036 | +++ gcc/cp/ChangeLog 2011-04-06 13:16:33 +0000 | |||
1037 | @@ -1,3 +1,76 @@ | |||
1038 | 1 | 2011-03-28 Jason Merrill <jason@redhat.com> | ||
1039 | 2 | |||
1040 | 3 | Revert: | ||
1041 | 4 | PR c++/48289 | ||
1042 | 5 | * pt.c (build_non_dependent_expr): Keep dereferences outside the | ||
1043 | 6 | NON_DEPENDENT_EXPR. | ||
1044 | 7 | |||
1045 | 8 | 2011-03-25 Jason Merrill <jason@redhat.com> | ||
1046 | 9 | |||
1047 | 10 | PR c++/48289 | ||
1048 | 11 | * pt.c (build_non_dependent_expr): Keep dereferences outside the | ||
1049 | 12 | NON_DEPENDENT_EXPR. | ||
1050 | 13 | |||
1051 | 14 | 2011-03-11 Jason Merrill <jason@redhat.com> | ||
1052 | 15 | |||
1053 | 16 | PR c++/47125 | ||
1054 | 17 | * pt.c (tsubst) [TYPENAME_TYPE]: Only give errors if tf_error. | ||
1055 | 18 | |||
1056 | 19 | 2011-03-10 Jason Merrill <jason@redhat.com> | ||
1057 | 20 | |||
1058 | 21 | PR c++/48029 | ||
1059 | 22 | * pt.c (iterative_hash_template_arg): Remove special case for | ||
1060 | 23 | ARRAY_TYPE. | ||
1061 | 24 | |||
1062 | 25 | 2011-03-09 Jason Merrill <jason@redhat.com> | ||
1063 | 26 | |||
1064 | 27 | PR c++/44629 | ||
1065 | 28 | * pt.c (unify): An unresolved overload is a nondeduced context. | ||
1066 | 29 | |||
1067 | 30 | 2011-03-08 Jason Merrill <jason@redhat.com> | ||
1068 | 31 | |||
1069 | 32 | PR c++/45651 | ||
1070 | 33 | * pt.c (instantiate_decl): Don't clear DECL_INTERFACE_KNOWN on | ||
1071 | 34 | !TREE_PUBLIC decls. | ||
1072 | 35 | |||
1073 | 36 | 2011-03-08 Jason Merrill <jason@redhat.com> | ||
1074 | 37 | |||
1075 | 38 | PR c++/47289 | ||
1076 | 39 | * pt.c (coerce_template_parms): Fix error recovery. | ||
1077 | 40 | |||
1078 | 41 | 2011-03-08 Dodji Seketeli <dodji@redhat.com> | ||
1079 | 42 | |||
1080 | 43 | PR c++/47705 | ||
1081 | 44 | * pt.c (convert_nontype_argument): Only call decay_conversion on | ||
1082 | 45 | arrays. | ||
1083 | 46 | |||
1084 | 47 | 2011-03-08 Dodji Seketeli <dodji@redhat.com> | ||
1085 | 48 | |||
1086 | 49 | * name-lookup.c (binding_to_template_parms_of_scope_p): Only | ||
1087 | 50 | consider scopes of primary template definitions. Adjust comments. | ||
1088 | 51 | |||
1089 | 52 | 2011-03-08 Jason Merrill <jason@redhat.com> | ||
1090 | 53 | |||
1091 | 54 | PR c++/47488 | ||
1092 | 55 | * mangle.c (write_template_arg_literal) [STRING_CST]: Sorry. | ||
1093 | 56 | |||
1094 | 57 | 2011-03-08 Richard Guenther <rguenther@suse.de> | ||
1095 | 58 | |||
1096 | 59 | PR tree-optimization/47278 | ||
1097 | 60 | * decl.c (finish_function): Use decl_replaceable_p. | ||
1098 | 61 | |||
1099 | 62 | 2011-03-01 Jason Merrill <jason@redhat.com> | ||
1100 | 63 | |||
1101 | 64 | PR c++/46159 | ||
1102 | 65 | * parser.c (cp_parser_primary_expression): Don't warn about a | ||
1103 | 66 | failed tentative parse. | ||
1104 | 67 | |||
1105 | 68 | 2011-02-26 Jason Merrill <jason@redhat.com> | ||
1106 | 69 | |||
1107 | 70 | PR c++/47904 | ||
1108 | 71 | * tree.c (cp_tree_equal) [PARM_DECL]: Don't crash on | ||
1109 | 72 | DECL_ARTIFICIAL parms. | ||
1110 | 73 | |||
1111 | 1 | 2010-12-16 Release Manager | 74 | 2010-12-16 Release Manager |
1112 | 2 | 75 | ||
1113 | 3 | * GCC 4.5.2 released. | 76 | * GCC 4.5.2 released. |
1114 | 4 | 77 | ||
1115 | === modified file 'gcc/cp/decl.c' | |||
1116 | --- gcc/cp/decl.c 2011-01-06 11:02:44 +0000 | |||
1117 | +++ gcc/cp/decl.c 2011-04-06 13:16:33 +0000 | |||
1118 | @@ -12502,7 +12502,7 @@ | |||
1119 | 12502 | if (!processing_template_decl | 12502 | if (!processing_template_decl |
1120 | 12503 | && !cp_function_chain->can_throw | 12503 | && !cp_function_chain->can_throw |
1121 | 12504 | && !flag_non_call_exceptions | 12504 | && !flag_non_call_exceptions |
1123 | 12505 | && !DECL_REPLACEABLE_P (fndecl)) | 12505 | && !decl_replaceable_p (fndecl)) |
1124 | 12506 | TREE_NOTHROW (fndecl) = 1; | 12506 | TREE_NOTHROW (fndecl) = 1; |
1125 | 12507 | 12507 | ||
1126 | 12508 | /* This must come after expand_function_end because cleanups might | 12508 | /* This must come after expand_function_end because cleanups might |
1127 | 12509 | 12509 | ||
1128 | === modified file 'gcc/cp/mangle.c' | |||
1129 | --- gcc/cp/mangle.c 2010-03-23 22:29:53 +0000 | |||
1130 | +++ gcc/cp/mangle.c 2011-04-06 13:16:33 +0000 | |||
1131 | @@ -2683,6 +2683,10 @@ | |||
1132 | 2683 | write_real_cst (value); | 2683 | write_real_cst (value); |
1133 | 2684 | break; | 2684 | break; |
1134 | 2685 | 2685 | ||
1135 | 2686 | case STRING_CST: | ||
1136 | 2687 | sorry ("string literal in function template signature"); | ||
1137 | 2688 | break; | ||
1138 | 2689 | |||
1139 | 2686 | default: | 2690 | default: |
1140 | 2687 | gcc_unreachable (); | 2691 | gcc_unreachable (); |
1141 | 2688 | } | 2692 | } |
1142 | 2689 | 2693 | ||
1143 | === modified file 'gcc/cp/name-lookup.c' | |||
1144 | --- gcc/cp/name-lookup.c 2010-04-27 22:03:06 +0000 | |||
1145 | +++ gcc/cp/name-lookup.c 2011-04-06 13:16:33 +0000 | |||
1146 | @@ -4067,8 +4067,13 @@ | |||
1147 | 4067 | } | 4067 | } |
1148 | 4068 | 4068 | ||
1149 | 4069 | /* Subroutine of outer_binding. | 4069 | /* Subroutine of outer_binding. |
1152 | 4070 | Returns TRUE if BINDING is a binding to a template parameter of SCOPE, | 4070 | |
1153 | 4071 | FALSE otherwise. */ | 4071 | Returns TRUE if BINDING is a binding to a template parameter of |
1154 | 4072 | SCOPE. In that case SCOPE is the scope of a primary template | ||
1155 | 4073 | parameter -- in the sense of G++, i.e, a template that has its own | ||
1156 | 4074 | template header. | ||
1157 | 4075 | |||
1158 | 4076 | Returns FALSE otherwise. */ | ||
1159 | 4072 | 4077 | ||
1160 | 4073 | static bool | 4078 | static bool |
1161 | 4074 | binding_to_template_parms_of_scope_p (cxx_binding *binding, | 4079 | binding_to_template_parms_of_scope_p (cxx_binding *binding, |
1162 | @@ -4084,6 +4089,8 @@ | |||
1163 | 4084 | return (scope | 4089 | return (scope |
1164 | 4085 | && scope->this_entity | 4090 | && scope->this_entity |
1165 | 4086 | && get_template_info (scope->this_entity) | 4091 | && get_template_info (scope->this_entity) |
1166 | 4092 | && PRIMARY_TEMPLATE_P (TI_TEMPLATE | ||
1167 | 4093 | (get_template_info (scope->this_entity))) | ||
1168 | 4087 | && parameter_of_template_p (binding_value, | 4094 | && parameter_of_template_p (binding_value, |
1169 | 4088 | TI_TEMPLATE (get_template_info \ | 4095 | TI_TEMPLATE (get_template_info \ |
1170 | 4089 | (scope->this_entity)))); | 4096 | (scope->this_entity)))); |
1171 | 4090 | 4097 | ||
1172 | === modified file 'gcc/cp/parser.c' | |||
1173 | --- gcc/cp/parser.c 2010-08-30 19:33:31 +0000 | |||
1174 | +++ gcc/cp/parser.c 2011-04-06 13:16:33 +0000 | |||
1175 | @@ -3341,8 +3341,14 @@ | |||
1176 | 3341 | if (c_dialect_objc ()) | 3341 | if (c_dialect_objc ()) |
1177 | 3342 | /* We have an Objective-C++ message. */ | 3342 | /* We have an Objective-C++ message. */ |
1178 | 3343 | return cp_parser_objc_expression (parser); | 3343 | return cp_parser_objc_expression (parser); |
1181 | 3344 | maybe_warn_cpp0x (CPP0X_LAMBDA_EXPR); | 3344 | { |
1182 | 3345 | return cp_parser_lambda_expression (parser); | 3345 | tree lam = cp_parser_lambda_expression (parser); |
1183 | 3346 | /* Don't warn about a failed tentative parse. */ | ||
1184 | 3347 | if (cp_parser_error_occurred (parser)) | ||
1185 | 3348 | return error_mark_node; | ||
1186 | 3349 | maybe_warn_cpp0x (CPP0X_LAMBDA_EXPR); | ||
1187 | 3350 | return lam; | ||
1188 | 3351 | } | ||
1189 | 3346 | 3352 | ||
1190 | 3347 | case CPP_OBJC_STRING: | 3353 | case CPP_OBJC_STRING: |
1191 | 3348 | if (c_dialect_objc ()) | 3354 | if (c_dialect_objc ()) |
1192 | 3349 | 3355 | ||
1193 | === modified file 'gcc/cp/pt.c' | |||
1194 | --- gcc/cp/pt.c 2010-07-02 09:15:10 +0000 | |||
1195 | +++ gcc/cp/pt.c 2011-04-06 13:16:33 +0000 | |||
1196 | @@ -1556,13 +1556,6 @@ | |||
1197 | 1556 | val = iterative_hash_object (code, val); | 1556 | val = iterative_hash_object (code, val); |
1198 | 1557 | return iterative_hash_template_arg (TREE_OPERAND (arg, 2), val); | 1557 | return iterative_hash_template_arg (TREE_OPERAND (arg, 2), val); |
1199 | 1558 | 1558 | ||
1200 | 1559 | case ARRAY_TYPE: | ||
1201 | 1560 | /* layout_type sets structural equality for arrays of | ||
1202 | 1561 | incomplete type, so we can't rely on the canonical type | ||
1203 | 1562 | for hashing. */ | ||
1204 | 1563 | val = iterative_hash_template_arg (TREE_TYPE (arg), val); | ||
1205 | 1564 | return iterative_hash_template_arg (TYPE_DOMAIN (arg), val); | ||
1206 | 1565 | |||
1207 | 1566 | case LAMBDA_EXPR: | 1559 | case LAMBDA_EXPR: |
1208 | 1567 | /* A lambda can't appear in a template arg, but don't crash on | 1560 | /* A lambda can't appear in a template arg, but don't crash on |
1209 | 1568 | erroneous input. */ | 1561 | erroneous input. */ |
1210 | @@ -4951,7 +4944,8 @@ | |||
1211 | 4951 | 4944 | ||
1212 | 4952 | /* Add the ADDR_EXPR now for the benefit of | 4945 | /* Add the ADDR_EXPR now for the benefit of |
1213 | 4953 | value_dependent_expression_p. */ | 4946 | value_dependent_expression_p. */ |
1215 | 4954 | if (TYPE_PTROBV_P (type)) | 4947 | if (TYPE_PTROBV_P (type) |
1216 | 4948 | && TREE_CODE (TREE_TYPE (expr)) == ARRAY_TYPE) | ||
1217 | 4955 | expr = decay_conversion (expr); | 4949 | expr = decay_conversion (expr); |
1218 | 4956 | 4950 | ||
1219 | 4957 | /* If we are in a template, EXPR may be non-dependent, but still | 4951 | /* If we are in a template, EXPR may be non-dependent, but still |
1220 | @@ -6043,7 +6037,7 @@ | |||
1221 | 6043 | sorry ("cannot expand %<%T%> into a fixed-length " | 6037 | sorry ("cannot expand %<%T%> into a fixed-length " |
1222 | 6044 | "argument list", arg); | 6038 | "argument list", arg); |
1223 | 6045 | } | 6039 | } |
1225 | 6046 | return error_mark_node; | 6040 | ++lost; |
1226 | 6047 | } | 6041 | } |
1227 | 6048 | } | 6042 | } |
1228 | 6049 | else if (require_all_args) | 6043 | else if (require_all_args) |
1229 | @@ -6071,7 +6065,7 @@ | |||
1230 | 6071 | reported) that we are trying to recover from, e.g., a class | 6065 | reported) that we are trying to recover from, e.g., a class |
1231 | 6072 | template with a parameter list such as | 6066 | template with a parameter list such as |
1232 | 6073 | template<typename..., typename>. */ | 6067 | template<typename..., typename>. */ |
1234 | 6074 | return error_mark_node; | 6068 | ++lost; |
1235 | 6075 | else | 6069 | else |
1236 | 6076 | arg = convert_template_argument (TREE_VALUE (parm), | 6070 | arg = convert_template_argument (TREE_VALUE (parm), |
1237 | 6077 | arg, new_args, complain, | 6071 | arg, new_args, complain, |
1238 | @@ -10555,11 +10549,21 @@ | |||
1239 | 10555 | if (TREE_CODE (f) != TYPENAME_TYPE) | 10549 | if (TREE_CODE (f) != TYPENAME_TYPE) |
1240 | 10556 | { | 10550 | { |
1241 | 10557 | if (TYPENAME_IS_ENUM_P (t) && TREE_CODE (f) != ENUMERAL_TYPE) | 10551 | if (TYPENAME_IS_ENUM_P (t) && TREE_CODE (f) != ENUMERAL_TYPE) |
1244 | 10558 | error ("%qT resolves to %qT, which is not an enumeration type", | 10552 | { |
1245 | 10559 | t, f); | 10553 | if (complain & tf_error) |
1246 | 10554 | error ("%qT resolves to %qT, which is not an enumeration type", | ||
1247 | 10555 | t, f); | ||
1248 | 10556 | else | ||
1249 | 10557 | return error_mark_node; | ||
1250 | 10558 | } | ||
1251 | 10560 | else if (TYPENAME_IS_CLASS_P (t) && !CLASS_TYPE_P (f)) | 10559 | else if (TYPENAME_IS_CLASS_P (t) && !CLASS_TYPE_P (f)) |
1254 | 10561 | error ("%qT resolves to %qT, which is is not a class type", | 10560 | { |
1255 | 10562 | t, f); | 10561 | if (complain & tf_error) |
1256 | 10562 | error ("%qT resolves to %qT, which is is not a class type", | ||
1257 | 10563 | t, f); | ||
1258 | 10564 | else | ||
1259 | 10565 | return error_mark_node; | ||
1260 | 10566 | } | ||
1261 | 10563 | } | 10567 | } |
1262 | 10564 | 10568 | ||
1263 | 10565 | /* cv-quals from the template are discarded when | 10569 | /* cv-quals from the template are discarded when |
1264 | @@ -15193,6 +15197,9 @@ | |||
1265 | 15193 | return 1; | 15197 | return 1; |
1266 | 15194 | 15198 | ||
1267 | 15195 | default: | 15199 | default: |
1268 | 15200 | /* An unresolved overload is a nondeduced context. */ | ||
1269 | 15201 | if (type_unknown_p (parm)) | ||
1270 | 15202 | return 0; | ||
1271 | 15196 | gcc_assert (EXPR_P (parm)); | 15203 | gcc_assert (EXPR_P (parm)); |
1272 | 15197 | 15204 | ||
1273 | 15198 | /* We must be looking at an expression. This can happen with | 15205 | /* We must be looking at an expression. This can happen with |
1274 | @@ -16720,8 +16727,13 @@ | |||
1275 | 16720 | if (!pattern_defined && expl_inst_class_mem_p | 16727 | if (!pattern_defined && expl_inst_class_mem_p |
1276 | 16721 | && DECL_EXPLICIT_INSTANTIATION (d)) | 16728 | && DECL_EXPLICIT_INSTANTIATION (d)) |
1277 | 16722 | { | 16729 | { |
1280 | 16723 | DECL_NOT_REALLY_EXTERN (d) = 0; | 16730 | /* Leave linkage flags alone on instantiations with anonymous |
1281 | 16724 | DECL_INTERFACE_KNOWN (d) = 0; | 16731 | visibility. */ |
1282 | 16732 | if (TREE_PUBLIC (d)) | ||
1283 | 16733 | { | ||
1284 | 16734 | DECL_NOT_REALLY_EXTERN (d) = 0; | ||
1285 | 16735 | DECL_INTERFACE_KNOWN (d) = 0; | ||
1286 | 16736 | } | ||
1287 | 16725 | SET_DECL_IMPLICIT_INSTANTIATION (d); | 16737 | SET_DECL_IMPLICIT_INSTANTIATION (d); |
1288 | 16726 | } | 16738 | } |
1289 | 16727 | 16739 | ||
1290 | 16728 | 16740 | ||
1291 | === modified file 'gcc/cp/tree.c' | |||
1292 | --- gcc/cp/tree.c 2010-12-03 18:44:04 +0000 | |||
1293 | +++ gcc/cp/tree.c 2011-04-06 13:16:33 +0000 | |||
1294 | @@ -2089,12 +2089,18 @@ | |||
1295 | 2089 | 2089 | ||
1296 | 2090 | case PARM_DECL: | 2090 | case PARM_DECL: |
1297 | 2091 | /* For comparing uses of parameters in late-specified return types | 2091 | /* For comparing uses of parameters in late-specified return types |
1304 | 2092 | with an out-of-class definition of the function. */ | 2092 | with an out-of-class definition of the function, but can also come |
1305 | 2093 | if (same_type_p (TREE_TYPE (t1), TREE_TYPE (t2)) | 2093 | up for expressions that involve 'this' in a member function |
1306 | 2094 | && DECL_PARM_INDEX (t1) == DECL_PARM_INDEX (t2)) | 2094 | template. */ |
1307 | 2095 | return true; | 2095 | if (same_type_p (TREE_TYPE (t1), TREE_TYPE (t2))) |
1308 | 2096 | else | 2096 | { |
1309 | 2097 | return false; | 2097 | if (DECL_ARTIFICIAL (t1) ^ DECL_ARTIFICIAL (t2)) |
1310 | 2098 | return false; | ||
1311 | 2099 | if (DECL_ARTIFICIAL (t1) | ||
1312 | 2100 | || DECL_PARM_INDEX (t1) == DECL_PARM_INDEX (t2)) | ||
1313 | 2101 | return true; | ||
1314 | 2102 | } | ||
1315 | 2103 | return false; | ||
1316 | 2098 | 2104 | ||
1317 | 2099 | case VAR_DECL: | 2105 | case VAR_DECL: |
1318 | 2100 | case CONST_DECL: | 2106 | case CONST_DECL: |
1319 | 2101 | 2107 | ||
1320 | === modified file 'gcc/doc/cfg.texi' | |||
1321 | --- gcc/doc/cfg.texi 2009-04-27 19:23:51 +0000 | |||
1322 | +++ gcc/doc/cfg.texi 2011-04-06 13:16:33 +0000 | |||
1323 | @@ -559,8 +559,7 @@ | |||
1324 | 559 | In the RTL representation, the macros @code{BB_HEAD} and @code{BB_END} | 559 | In the RTL representation, the macros @code{BB_HEAD} and @code{BB_END} |
1325 | 560 | may be used to get the head and end @code{rtx} of a basic block. No | 560 | may be used to get the head and end @code{rtx} of a basic block. No |
1326 | 561 | abstract iterators are defined for traversing the insn chain, but you | 561 | abstract iterators are defined for traversing the insn chain, but you |
1329 | 562 | can just use @code{NEXT_INSN} and @code{PREV_INSN} instead. See | 562 | can just use @code{NEXT_INSN} and @code{PREV_INSN} instead. @xref{Insns}. |
1328 | 563 | @xref{Insns}. | ||
1330 | 564 | 563 | ||
1331 | 565 | @findex purge_dead_edges | 564 | @findex purge_dead_edges |
1332 | 566 | Usually a code manipulating pass simplifies the instruction stream and | 565 | Usually a code manipulating pass simplifies the instruction stream and |
1333 | 567 | 566 | ||
1334 | === modified file 'gcc/doc/cpp.texi' | |||
1335 | --- gcc/doc/cpp.texi 2010-04-02 18:54:46 +0000 | |||
1336 | +++ gcc/doc/cpp.texi 2011-04-06 13:16:33 +0000 | |||
1337 | @@ -12,7 +12,7 @@ | |||
1338 | 12 | @c man begin COPYRIGHT | 12 | @c man begin COPYRIGHT |
1339 | 13 | Copyright @copyright{} 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, | 13 | Copyright @copyright{} 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, |
1340 | 14 | 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 14 | 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, |
1342 | 15 | 2008, 2009, 2010 | 15 | 2008, 2009, 2010, 2011 |
1343 | 16 | Free Software Foundation, Inc. | 16 | Free Software Foundation, Inc. |
1344 | 17 | 17 | ||
1345 | 18 | Permission is granted to copy, distribute and/or modify this document | 18 | Permission is granted to copy, distribute and/or modify this document |
1346 | @@ -4161,9 +4161,10 @@ | |||
1347 | 4161 | define them with preprocessing directives or command-line options. | 4161 | define them with preprocessing directives or command-line options. |
1348 | 4162 | 4162 | ||
1349 | 4163 | Assertions were intended to provide a more systematic way to describe | 4163 | Assertions were intended to provide a more systematic way to describe |
1353 | 4164 | the compiler's target system. However, in practice they are just as | 4164 | the compiler's target system and we added them for compatibility with |
1354 | 4165 | unpredictable as the system-specific predefined macros. In addition, they | 4165 | existing compilers. In practice they are just as unpredictable as the |
1355 | 4166 | are not part of any standard, and only a few compilers support them. | 4166 | system-specific predefined macros. In addition, they are not part of |
1356 | 4167 | any standard, and only a few compilers support them. | ||
1357 | 4167 | Therefore, the use of assertions is @strong{less} portable than the use | 4168 | Therefore, the use of assertions is @strong{less} portable than the use |
1358 | 4168 | of system-specific predefined macros. We recommend you do not use them at | 4169 | of system-specific predefined macros. We recommend you do not use them at |
1359 | 4169 | all. | 4170 | all. |
1360 | 4170 | 4171 | ||
1361 | === modified file 'gcc/doc/extend.texi' | |||
1362 | --- gcc/doc/extend.texi 2011-02-04 16:31:48 +0000 | |||
1363 | +++ gcc/doc/extend.texi 2011-04-06 13:16:33 +0000 | |||
1364 | @@ -3855,42 +3855,6 @@ | |||
1365 | 3855 | You can use the sequence @samp{\e} in a string or character constant to | 3855 | You can use the sequence @samp{\e} in a string or character constant to |
1366 | 3856 | stand for the ASCII character @key{ESC}. | 3856 | stand for the ASCII character @key{ESC}. |
1367 | 3857 | 3857 | ||
1368 | 3858 | @node Alignment | ||
1369 | 3859 | @section Inquiring on Alignment of Types or Variables | ||
1370 | 3860 | @cindex alignment | ||
1371 | 3861 | @cindex type alignment | ||
1372 | 3862 | @cindex variable alignment | ||
1373 | 3863 | |||
1374 | 3864 | The keyword @code{__alignof__} allows you to inquire about how an object | ||
1375 | 3865 | is aligned, or the minimum alignment usually required by a type. Its | ||
1376 | 3866 | syntax is just like @code{sizeof}. | ||
1377 | 3867 | |||
1378 | 3868 | For example, if the target machine requires a @code{double} value to be | ||
1379 | 3869 | aligned on an 8-byte boundary, then @code{__alignof__ (double)} is 8. | ||
1380 | 3870 | This is true on many RISC machines. On more traditional machine | ||
1381 | 3871 | designs, @code{__alignof__ (double)} is 4 or even 2. | ||
1382 | 3872 | |||
1383 | 3873 | Some machines never actually require alignment; they allow reference to any | ||
1384 | 3874 | data type even at an odd address. For these machines, @code{__alignof__} | ||
1385 | 3875 | reports the smallest alignment that GCC will give the data type, usually as | ||
1386 | 3876 | mandated by the target ABI. | ||
1387 | 3877 | |||
1388 | 3878 | If the operand of @code{__alignof__} is an lvalue rather than a type, | ||
1389 | 3879 | its value is the required alignment for its type, taking into account | ||
1390 | 3880 | any minimum alignment specified with GCC's @code{__attribute__} | ||
1391 | 3881 | extension (@pxref{Variable Attributes}). For example, after this | ||
1392 | 3882 | declaration: | ||
1393 | 3883 | |||
1394 | 3884 | @smallexample | ||
1395 | 3885 | struct foo @{ int x; char y; @} foo1; | ||
1396 | 3886 | @end smallexample | ||
1397 | 3887 | |||
1398 | 3888 | @noindent | ||
1399 | 3889 | the value of @code{__alignof__ (foo1.y)} is 1, even though its actual | ||
1400 | 3890 | alignment is probably 2 or 4, the same as @code{__alignof__ (int)}. | ||
1401 | 3891 | |||
1402 | 3892 | It is an error to ask for the alignment of an incomplete type. | ||
1403 | 3893 | |||
1404 | 3894 | @node Variable Attributes | 3858 | @node Variable Attributes |
1405 | 3895 | @section Specifying Attributes of Variables | 3859 | @section Specifying Attributes of Variables |
1406 | 3896 | @cindex attribute of variables | 3860 | @cindex attribute of variables |
1407 | @@ -4899,6 +4863,42 @@ | |||
1408 | 4899 | Language Extensions Specification. It is intended to support the | 4863 | Language Extensions Specification. It is intended to support the |
1409 | 4900 | @code{__vector} keyword. | 4864 | @code{__vector} keyword. |
1410 | 4901 | 4865 | ||
1411 | 4866 | @node Alignment | ||
1412 | 4867 | @section Inquiring on Alignment of Types or Variables | ||
1413 | 4868 | @cindex alignment | ||
1414 | 4869 | @cindex type alignment | ||
1415 | 4870 | @cindex variable alignment | ||
1416 | 4871 | |||
1417 | 4872 | The keyword @code{__alignof__} allows you to inquire about how an object | ||
1418 | 4873 | is aligned, or the minimum alignment usually required by a type. Its | ||
1419 | 4874 | syntax is just like @code{sizeof}. | ||
1420 | 4875 | |||
1421 | 4876 | For example, if the target machine requires a @code{double} value to be | ||
1422 | 4877 | aligned on an 8-byte boundary, then @code{__alignof__ (double)} is 8. | ||
1423 | 4878 | This is true on many RISC machines. On more traditional machine | ||
1424 | 4879 | designs, @code{__alignof__ (double)} is 4 or even 2. | ||
1425 | 4880 | |||
1426 | 4881 | Some machines never actually require alignment; they allow reference to any | ||
1427 | 4882 | data type even at an odd address. For these machines, @code{__alignof__} | ||
1428 | 4883 | reports the smallest alignment that GCC will give the data type, usually as | ||
1429 | 4884 | mandated by the target ABI. | ||
1430 | 4885 | |||
1431 | 4886 | If the operand of @code{__alignof__} is an lvalue rather than a type, | ||
1432 | 4887 | its value is the required alignment for its type, taking into account | ||
1433 | 4888 | any minimum alignment specified with GCC's @code{__attribute__} | ||
1434 | 4889 | extension (@pxref{Variable Attributes}). For example, after this | ||
1435 | 4890 | declaration: | ||
1436 | 4891 | |||
1437 | 4892 | @smallexample | ||
1438 | 4893 | struct foo @{ int x; char y; @} foo1; | ||
1439 | 4894 | @end smallexample | ||
1440 | 4895 | |||
1441 | 4896 | @noindent | ||
1442 | 4897 | the value of @code{__alignof__ (foo1.y)} is 1, even though its actual | ||
1443 | 4898 | alignment is probably 2 or 4, the same as @code{__alignof__ (int)}. | ||
1444 | 4899 | |||
1445 | 4900 | It is an error to ask for the alignment of an incomplete type. | ||
1446 | 4901 | |||
1447 | 4902 | 4902 | ||
1448 | 4903 | @node Inline | 4903 | @node Inline |
1449 | 4904 | @section An Inline Function is As Fast As a Macro | 4904 | @section An Inline Function is As Fast As a Macro |
1450 | 4905 | 4905 | ||
1451 | === modified file 'gcc/doc/invoke.texi' | |||
1452 | --- gcc/doc/invoke.texi 2011-02-08 10:51:58 +0000 | |||
1453 | +++ gcc/doc/invoke.texi 2011-04-06 13:16:33 +0000 | |||
1454 | @@ -607,6 +607,11 @@ | |||
1455 | 607 | -m32 -m64 -mlarge-data-threshold=@var{num} @gol | 607 | -m32 -m64 -mlarge-data-threshold=@var{num} @gol |
1456 | 608 | -msse2avx} | 608 | -msse2avx} |
1457 | 609 | 609 | ||
1458 | 610 | @emph{i386 and x86-64 Windows Options} | ||
1459 | 611 | @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll | ||
1460 | 612 | -mnop-fun-dllimport -mthread -municode -mwin32 -mwindows | ||
1461 | 613 | -fno-set-stack-executable} | ||
1462 | 614 | |||
1463 | 610 | @emph{IA-64 Options} | 615 | @emph{IA-64 Options} |
1464 | 611 | @gccoptlist{-mbig-endian -mlittle-endian -mgnu-as -mgnu-ld -mno-pic @gol | 616 | @gccoptlist{-mbig-endian -mlittle-endian -mgnu-as -mgnu-ld -mno-pic @gol |
1465 | 612 | -mvolatile-asm-stop -mregister-names -msdata -mno-sdata @gol | 617 | -mvolatile-asm-stop -mregister-names -msdata -mno-sdata @gol |
1466 | @@ -883,11 +888,6 @@ | |||
1467 | 883 | @emph{x86-64 Options} | 888 | @emph{x86-64 Options} |
1468 | 884 | See i386 and x86-64 Options. | 889 | See i386 and x86-64 Options. |
1469 | 885 | 890 | ||
1470 | 886 | @emph{i386 and x86-64 Windows Options} | ||
1471 | 887 | @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll | ||
1472 | 888 | -mnop-fun-dllimport -mthread -municode -mwin32 -mwindows | ||
1473 | 889 | -fno-set-stack-executable} | ||
1474 | 890 | |||
1475 | 891 | @emph{Xstormy16 Options} | 891 | @emph{Xstormy16 Options} |
1476 | 892 | @gccoptlist{-msim} | 892 | @gccoptlist{-msim} |
1477 | 893 | 893 | ||
1478 | @@ -2420,7 +2420,7 @@ | |||
1479 | 2420 | @cindex Objective-C and Objective-C++ options, command line | 2420 | @cindex Objective-C and Objective-C++ options, command line |
1480 | 2421 | @cindex options, Objective-C and Objective-C++ | 2421 | @cindex options, Objective-C and Objective-C++ |
1481 | 2422 | (NOTE: This manual does not describe the Objective-C and Objective-C++ | 2422 | (NOTE: This manual does not describe the Objective-C and Objective-C++ |
1483 | 2423 | languages themselves. See @xref{Standards,,Language Standards | 2423 | languages themselves. @xref{Standards,,Language Standards |
1484 | 2424 | Supported by GCC}, for references.) | 2424 | Supported by GCC}, for references.) |
1485 | 2425 | 2425 | ||
1486 | 2426 | This section describes the command-line options that are only meaningful | 2426 | This section describes the command-line options that are only meaningful |
1487 | @@ -6581,7 +6581,7 @@ | |||
1488 | 6581 | @opindex fipa-struct-reorg | 6581 | @opindex fipa-struct-reorg |
1489 | 6582 | Perform structure reorganization optimization, that change C-like structures | 6582 | Perform structure reorganization optimization, that change C-like structures |
1490 | 6583 | layout in order to better utilize spatial locality. This transformation is | 6583 | layout in order to better utilize spatial locality. This transformation is |
1492 | 6584 | affective for programs containing arrays of structures. Available in two | 6584 | effective for programs containing arrays of structures. Available in two |
1493 | 6585 | compilation modes: profile-based (enabled with @option{-fprofile-generate}) | 6585 | compilation modes: profile-based (enabled with @option{-fprofile-generate}) |
1494 | 6586 | or static (which uses built-in heuristics). Require @option{-fipa-type-escape} | 6586 | or static (which uses built-in heuristics). Require @option{-fipa-type-escape} |
1495 | 6587 | to provide the safety of this transformation. It works only in whole program | 6587 | to provide the safety of this transformation. It works only in whole program |
1496 | @@ -9729,10 +9729,10 @@ | |||
1497 | 9729 | 9729 | ||
1498 | 9730 | @item -mmangle-cpu | 9730 | @item -mmangle-cpu |
1499 | 9731 | @opindex mmangle-cpu | 9731 | @opindex mmangle-cpu |
1501 | 9732 | Prepend the name of the cpu to all public symbol names. | 9732 | Prepend the name of the CPU to all public symbol names. |
1502 | 9733 | In multiple-processor systems, there are many ARC variants with different | 9733 | In multiple-processor systems, there are many ARC variants with different |
1503 | 9734 | instruction and register set characteristics. This flag prevents code | 9734 | instruction and register set characteristics. This flag prevents code |
1505 | 9735 | compiled for one cpu to be linked with code compiled for another. | 9735 | compiled for one CPU to be linked with code compiled for another. |
1506 | 9736 | No facility exists for handling variants that are ``almost identical''. | 9736 | No facility exists for handling variants that are ``almost identical''. |
1507 | 9737 | This is an all or nothing option. | 9737 | This is an all or nothing option. |
1508 | 9738 | 9738 | ||
1509 | @@ -9912,7 +9912,7 @@ | |||
1510 | 9912 | restricting which instructions can be used, it specifies that GCC should | 9912 | restricting which instructions can be used, it specifies that GCC should |
1511 | 9913 | tune the performance of the code as if the target were of the type | 9913 | tune the performance of the code as if the target were of the type |
1512 | 9914 | specified in this option, but still choosing the instructions that it | 9914 | specified in this option, but still choosing the instructions that it |
1514 | 9915 | will generate based on the cpu specified by a @option{-mcpu=} option. | 9915 | will generate based on the CPU specified by a @option{-mcpu=} option. |
1515 | 9916 | For some ARM implementations better performance can be obtained by using | 9916 | For some ARM implementations better performance can be obtained by using |
1516 | 9917 | this option. | 9917 | this option. |
1517 | 9918 | 9918 | ||
1518 | @@ -11969,7 +11969,7 @@ | |||
1519 | 11969 | @code{sqrt} instructions for the 387. Specify this option to avoid | 11969 | @code{sqrt} instructions for the 387. Specify this option to avoid |
1520 | 11970 | generating those instructions. This option is the default on FreeBSD, | 11970 | generating those instructions. This option is the default on FreeBSD, |
1521 | 11971 | OpenBSD and NetBSD@. This option is overridden when @option{-march} | 11971 | OpenBSD and NetBSD@. This option is overridden when @option{-march} |
1523 | 11972 | indicates that the target cpu will always have an FPU and so the | 11972 | indicates that the target CPU will always have an FPU and so the |
1524 | 11973 | instruction will not need emulation. As of revision 2.6.1, these | 11973 | instruction will not need emulation. As of revision 2.6.1, these |
1525 | 11974 | instructions are not generated unless you also use the | 11974 | instructions are not generated unless you also use the |
1526 | 11975 | @option{-funsafe-math-optimizations} switch. | 11975 | @option{-funsafe-math-optimizations} switch. |
1527 | @@ -12429,6 +12429,94 @@ | |||
1528 | 12429 | about addresses and sizes of sections. | 12429 | about addresses and sizes of sections. |
1529 | 12430 | @end table | 12430 | @end table |
1530 | 12431 | 12431 | ||
1531 | 12432 | @node i386 and x86-64 Windows Options | ||
1532 | 12433 | @subsection i386 and x86-64 Windows Options | ||
1533 | 12434 | @cindex i386 and x86-64 Windows Options | ||
1534 | 12435 | |||
1535 | 12436 | These additional options are available for Windows targets: | ||
1536 | 12437 | |||
1537 | 12438 | @table @gcctabopt | ||
1538 | 12439 | @item -mconsole | ||
1539 | 12440 | @opindex mconsole | ||
1540 | 12441 | This option is available for Cygwin and MinGW targets. It | ||
1541 | 12442 | specifies that a console application is to be generated, by | ||
1542 | 12443 | instructing the linker to set the PE header subsystem type | ||
1543 | 12444 | required for console applications. | ||
1544 | 12445 | This is the default behavior for Cygwin and MinGW targets. | ||
1545 | 12446 | |||
1546 | 12447 | @item -mcygwin | ||
1547 | 12448 | @opindex mcygwin | ||
1548 | 12449 | This option is available for Cygwin targets. It specifies that | ||
1549 | 12450 | the Cygwin internal interface is to be used for predefined | ||
1550 | 12451 | preprocessor macros, C runtime libraries and related linker | ||
1551 | 12452 | paths and options. For Cygwin targets this is the default behavior. | ||
1552 | 12453 | This option is deprecated and will be removed in a future release. | ||
1553 | 12454 | |||
1554 | 12455 | @item -mno-cygwin | ||
1555 | 12456 | @opindex mno-cygwin | ||
1556 | 12457 | This option is available for Cygwin targets. It specifies that | ||
1557 | 12458 | the MinGW internal interface is to be used instead of Cygwin's, by | ||
1558 | 12459 | setting MinGW-related predefined macros and linker paths and default | ||
1559 | 12460 | library options. | ||
1560 | 12461 | This option is deprecated and will be removed in a future release. | ||
1561 | 12462 | |||
1562 | 12463 | @item -mdll | ||
1563 | 12464 | @opindex mdll | ||
1564 | 12465 | This option is available for Cygwin and MinGW targets. It | ||
1565 | 12466 | specifies that a DLL - a dynamic link library - is to be | ||
1566 | 12467 | generated, enabling the selection of the required runtime | ||
1567 | 12468 | startup object and entry point. | ||
1568 | 12469 | |||
1569 | 12470 | @item -mnop-fun-dllimport | ||
1570 | 12471 | @opindex mnop-fun-dllimport | ||
1571 | 12472 | This option is available for Cygwin and MinGW targets. It | ||
1572 | 12473 | specifies that the dllimport attribute should be ignored. | ||
1573 | 12474 | |||
1574 | 12475 | @item -mthread | ||
1575 | 12476 | @opindex mthread | ||
1576 | 12477 | This option is available for MinGW targets. It specifies | ||
1577 | 12478 | that MinGW-specific thread support is to be used. | ||
1578 | 12479 | |||
1579 | 12480 | @item -municode | ||
1580 | 12481 | @opindex municode | ||
1581 | 12482 | This option is available for mingw-w64 targets. It specifies | ||
1582 | 12483 | that the UNICODE macro is getting pre-defined and that the | ||
1583 | 12484 | unicode capable runtime startup code is chosen. | ||
1584 | 12485 | |||
1585 | 12486 | @item -mwin32 | ||
1586 | 12487 | @opindex mwin32 | ||
1587 | 12488 | This option is available for Cygwin and MinGW targets. It | ||
1588 | 12489 | specifies that the typical Windows pre-defined macros are to | ||
1589 | 12490 | be set in the pre-processor, but does not influence the choice | ||
1590 | 12491 | of runtime library/startup code. | ||
1591 | 12492 | |||
1592 | 12493 | @item -mwindows | ||
1593 | 12494 | @opindex mwindows | ||
1594 | 12495 | This option is available for Cygwin and MinGW targets. It | ||
1595 | 12496 | specifies that a GUI application is to be generated by | ||
1596 | 12497 | instructing the linker to set the PE header subsystem type | ||
1597 | 12498 | appropriately. | ||
1598 | 12499 | |||
1599 | 12500 | @item -fno-set-stack-executable | ||
1600 | 12501 | @opindex fno-set-stack-executable | ||
1601 | 12502 | This option is available for MinGW targets. It specifies that | ||
1602 | 12503 | the executable flag for stack used by nested functions isn't | ||
1603 | 12504 | set. This is necessary for binaries running in kernel mode of | ||
1604 | 12505 | Windows, as there the user32 API, which is used to set executable | ||
1605 | 12506 | privileges, isn't available. | ||
1606 | 12507 | |||
1607 | 12508 | @item -mpe-aligned-commons | ||
1608 | 12509 | @opindex mpe-aligned-commons | ||
1609 | 12510 | This option is available for Cygwin and MinGW targets. It | ||
1610 | 12511 | specifies that the GNU extension to the PE file format that | ||
1611 | 12512 | permits the correct alignment of COMMON variables should be | ||
1612 | 12513 | used when generating code. It will be enabled by default if | ||
1613 | 12514 | GCC detects that the target assembler found during configuration | ||
1614 | 12515 | supports the feature. | ||
1615 | 12516 | @end table | ||
1616 | 12517 | |||
1617 | 12518 | See also under @ref{i386 and x86-64 Options} for standard options. | ||
1618 | 12519 | |||
1619 | 12432 | @node IA-64 Options | 12520 | @node IA-64 Options |
1620 | 12433 | @subsection IA-64 Options | 12521 | @subsection IA-64 Options |
1621 | 12434 | @cindex IA-64 Options | 12522 | @cindex IA-64 Options |
1622 | @@ -15644,7 +15732,7 @@ | |||
1623 | 15644 | @opindex -patch | 15732 | @opindex -patch |
1624 | 15645 | Selects the type of RX CPU to be targeted. Currently three types are | 15733 | Selects the type of RX CPU to be targeted. Currently three types are |
1625 | 15646 | supported, the generic @var{RX600} and @var{RX200} series hardware and | 15734 | supported, the generic @var{RX600} and @var{RX200} series hardware and |
1627 | 15647 | the specific @var{RX610} cpu. The default is @var{RX600}. | 15735 | the specific @var{RX610} CPU. The default is @var{RX600}. |
1628 | 15648 | 15736 | ||
1629 | 15649 | The only difference between @var{RX600} and @var{RX610} is that the | 15737 | The only difference between @var{RX600} and @var{RX610} is that the |
1630 | 15650 | @var{RX610} does not support the @code{MVTIPL} instruction. | 15738 | @var{RX610} does not support the @code{MVTIPL} instruction. |
1631 | @@ -16462,7 +16550,7 @@ | |||
1632 | 16462 | 16550 | ||
1633 | 16463 | The same values for @option{-mcpu=@var{cpu_type}} can be used for | 16551 | The same values for @option{-mcpu=@var{cpu_type}} can be used for |
1634 | 16464 | @option{-mtune=@var{cpu_type}}, but the only useful values are those | 16552 | @option{-mtune=@var{cpu_type}}, but the only useful values are those |
1636 | 16465 | that select a particular cpu implementation. Those are @samp{cypress}, | 16553 | that select a particular CPU implementation. Those are @samp{cypress}, |
1637 | 16466 | @samp{supersparc}, @samp{hypersparc}, @samp{f930}, @samp{f934}, | 16554 | @samp{supersparc}, @samp{hypersparc}, @samp{f930}, @samp{f934}, |
1638 | 16467 | @samp{sparclite86x}, @samp{tsc701}, @samp{ultrasparc}, | 16555 | @samp{sparclite86x}, @samp{tsc701}, @samp{ultrasparc}, |
1639 | 16468 | @samp{ultrasparc3}, @samp{niagara}, and @samp{niagara2}. | 16556 | @samp{ultrasparc3}, @samp{niagara}, and @samp{niagara2}. |
1640 | @@ -16902,94 +16990,6 @@ | |||
1641 | 16902 | 16990 | ||
1642 | 16903 | These are listed under @xref{i386 and x86-64 Options}. | 16991 | These are listed under @xref{i386 and x86-64 Options}. |
1643 | 16904 | 16992 | ||
1644 | 16905 | @node i386 and x86-64 Windows Options | ||
1645 | 16906 | @subsection i386 and x86-64 Windows Options | ||
1646 | 16907 | @cindex i386 and x86-64 Windows Options | ||
1647 | 16908 | |||
1648 | 16909 | These additional options are available for Windows targets: | ||
1649 | 16910 | |||
1650 | 16911 | @table @gcctabopt | ||
1651 | 16912 | @item -mconsole | ||
1652 | 16913 | @opindex mconsole | ||
1653 | 16914 | This option is available for Cygwin and MinGW targets. It | ||
1654 | 16915 | specifies that a console application is to be generated, by | ||
1655 | 16916 | instructing the linker to set the PE header subsystem type | ||
1656 | 16917 | required for console applications. | ||
1657 | 16918 | This is the default behavior for Cygwin and MinGW targets. | ||
1658 | 16919 | |||
1659 | 16920 | @item -mcygwin | ||
1660 | 16921 | @opindex mcygwin | ||
1661 | 16922 | This option is available for Cygwin targets. It specifies that | ||
1662 | 16923 | the Cygwin internal interface is to be used for predefined | ||
1663 | 16924 | preprocessor macros, C runtime libraries and related linker | ||
1664 | 16925 | paths and options. For Cygwin targets this is the default behavior. | ||
1665 | 16926 | This option is deprecated and will be removed in a future release. | ||
1666 | 16927 | |||
1667 | 16928 | @item -mno-cygwin | ||
1668 | 16929 | @opindex mno-cygwin | ||
1669 | 16930 | This option is available for Cygwin targets. It specifies that | ||
1670 | 16931 | the MinGW internal interface is to be used instead of Cygwin's, by | ||
1671 | 16932 | setting MinGW-related predefined macros and linker paths and default | ||
1672 | 16933 | library options. | ||
1673 | 16934 | This option is deprecated and will be removed in a future release. | ||
1674 | 16935 | |||
1675 | 16936 | @item -mdll | ||
1676 | 16937 | @opindex mdll | ||
1677 | 16938 | This option is available for Cygwin and MinGW targets. It | ||
1678 | 16939 | specifies that a DLL - a dynamic link library - is to be | ||
1679 | 16940 | generated, enabling the selection of the required runtime | ||
1680 | 16941 | startup object and entry point. | ||
1681 | 16942 | |||
1682 | 16943 | @item -mnop-fun-dllimport | ||
1683 | 16944 | @opindex mnop-fun-dllimport | ||
1684 | 16945 | This option is available for Cygwin and MinGW targets. It | ||
1685 | 16946 | specifies that the dllimport attribute should be ignored. | ||
1686 | 16947 | |||
1687 | 16948 | @item -mthread | ||
1688 | 16949 | @opindex mthread | ||
1689 | 16950 | This option is available for MinGW targets. It specifies | ||
1690 | 16951 | that MinGW-specific thread support is to be used. | ||
1691 | 16952 | |||
1692 | 16953 | @item -municode | ||
1693 | 16954 | @opindex municode | ||
1694 | 16955 | This option is available for mingw-w64 targets. It specifies | ||
1695 | 16956 | that the UNICODE macro is getting pre-defined and that the | ||
1696 | 16957 | unicode capable runtime startup code is chosen. | ||
1697 | 16958 | |||
1698 | 16959 | @item -mwin32 | ||
1699 | 16960 | @opindex mwin32 | ||
1700 | 16961 | This option is available for Cygwin and MinGW targets. It | ||
1701 | 16962 | specifies that the typical Windows pre-defined macros are to | ||
1702 | 16963 | be set in the pre-processor, but does not influence the choice | ||
1703 | 16964 | of runtime library/startup code. | ||
1704 | 16965 | |||
1705 | 16966 | @item -mwindows | ||
1706 | 16967 | @opindex mwindows | ||
1707 | 16968 | This option is available for Cygwin and MinGW targets. It | ||
1708 | 16969 | specifies that a GUI application is to be generated by | ||
1709 | 16970 | instructing the linker to set the PE header subsystem type | ||
1710 | 16971 | appropriately. | ||
1711 | 16972 | |||
1712 | 16973 | @item -fno-set-stack-executable | ||
1713 | 16974 | @opindex fno-set-stack-executable | ||
1714 | 16975 | This option is available for MinGW targets. It specifies that | ||
1715 | 16976 | the executable flag for stack used by nested functions isn't | ||
1716 | 16977 | set. This is necessary for binaries running in kernel mode of | ||
1717 | 16978 | Windows, as there the user32 API, which is used to set executable | ||
1718 | 16979 | privileges, isn't available. | ||
1719 | 16980 | |||
1720 | 16981 | @item -mpe-aligned-commons | ||
1721 | 16982 | @opindex mpe-aligned-commons | ||
1722 | 16983 | This option is available for Cygwin and MinGW targets. It | ||
1723 | 16984 | specifies that the GNU extension to the PE file format that | ||
1724 | 16985 | permits the correct alignment of COMMON variables should be | ||
1725 | 16986 | used when generating code. It will be enabled by default if | ||
1726 | 16987 | GCC detects that the target assembler found during configuration | ||
1727 | 16988 | supports the feature. | ||
1728 | 16989 | @end table | ||
1729 | 16990 | |||
1730 | 16991 | See also under @ref{i386 and x86-64 Options} for standard options. | ||
1731 | 16992 | |||
1732 | 16993 | @node Xstormy16 Options | 16993 | @node Xstormy16 Options |
1733 | 16994 | @subsection Xstormy16 Options | 16994 | @subsection Xstormy16 Options |
1734 | 16995 | @cindex Xstormy16 Options | 16995 | @cindex Xstormy16 Options |
1735 | 16996 | 16996 | ||
1736 | === modified file 'gcc/fortran/ChangeLog' | |||
1737 | --- gcc/fortran/ChangeLog 2011-02-19 08:57:10 +0000 | |||
1738 | +++ gcc/fortran/ChangeLog 2011-04-06 13:16:33 +0000 | |||
1739 | @@ -1,3 +1,27 @@ | |||
1740 | 1 | 2011-04-05 Duncan Sands <baldrick@free.fr> | ||
1741 | 2 | |||
1742 | 3 | * f95-lang.c (build_builtin_fntypes): Swap frexp and scalbn parameter | ||
1743 | 4 | types. | ||
1744 | 5 | |||
1745 | 6 | 2011-03-13 Paul Thomas <pault@gcc.gnu.org> | ||
1746 | 7 | |||
1747 | 8 | PR fortran/47348 | ||
1748 | 9 | * trans-array.c (get_array_ctor_all_strlen): Move up in file. | ||
1749 | 10 | (get_array_ctor_var_strlen): Add block dummy and add call to | ||
1750 | 11 | get_array_ctor_all_strlen instead of giving up on substrings. | ||
1751 | 12 | Call gcc_unreachable for default case. | ||
1752 | 13 | (get_array_ctor_strlen): Add extra argument to in call to | ||
1753 | 14 | get_array_ctor_var_strlen. | ||
1754 | 15 | |||
1755 | 16 | 2011-01-27 Tobias Burnus <burnus@net-b.de> | ||
1756 | 17 | |||
1757 | 18 | Backport from mainline | ||
1758 | 19 | 2011-02-26 Tobias Burnus <burnus@net-b.de> | ||
1759 | 20 | |||
1760 | 21 | PR fortran/47886 | ||
1761 | 22 | * openmp.c (gfc_resolve_omp_directive): Resolve if() | ||
1762 | 23 | condition of OpenMP's task. | ||
1763 | 24 | |||
1764 | 1 | 2011-02-19 Tobias Burnus | 25 | 2011-02-19 Tobias Burnus |
1765 | 2 | 26 | ||
1766 | 3 | PR fortran/47775 | 27 | PR fortran/47775 |
1767 | 4 | 28 | ||
1768 | === modified file 'gcc/fortran/f95-lang.c' | |||
1769 | --- gcc/fortran/f95-lang.c 2010-06-15 11:17:16 +0000 | |||
1770 | +++ gcc/fortran/f95-lang.c 2011-04-06 13:16:33 +0000 | |||
1771 | @@ -646,19 +646,20 @@ | |||
1772 | 646 | /* type (*) (type, type) */ | 646 | /* type (*) (type, type) */ |
1773 | 647 | tmp = tree_cons (NULL_TREE, type, tmp); | 647 | tmp = tree_cons (NULL_TREE, type, tmp); |
1774 | 648 | fntype[1] = build_function_type (type, tmp); | 648 | fntype[1] = build_function_type (type, tmp); |
1776 | 649 | /* type (*) (int, type) */ | 649 | /* type (*) (type, int) */ |
1777 | 650 | tmp = tree_cons (NULL_TREE, integer_type_node, void_list_node); | 650 | tmp = tree_cons (NULL_TREE, integer_type_node, void_list_node); |
1778 | 651 | tmp = tree_cons (NULL_TREE, type, tmp); | 651 | tmp = tree_cons (NULL_TREE, type, tmp); |
1779 | 652 | fntype[2] = build_function_type (type, tmp); | 652 | fntype[2] = build_function_type (type, tmp); |
1780 | 653 | /* type (*) (void) */ | 653 | /* type (*) (void) */ |
1781 | 654 | fntype[3] = build_function_type (type, void_list_node); | 654 | fntype[3] = build_function_type (type, void_list_node); |
1782 | 655 | /* type (*) (type, &int) */ | 655 | /* type (*) (type, &int) */ |
1785 | 656 | tmp = tree_cons (NULL_TREE, type, void_list_node); | 656 | tmp = tree_cons (NULL_TREE, build_pointer_type (integer_type_node), |
1786 | 657 | tmp = tree_cons (NULL_TREE, build_pointer_type (integer_type_node), tmp); | 657 | void_list_node); |
1787 | 658 | tmp = tree_cons (NULL_TREE, type, tmp); | ||
1788 | 658 | fntype[4] = build_function_type (type, tmp); | 659 | fntype[4] = build_function_type (type, tmp); |
1789 | 659 | /* type (*) (type, int) */ | 660 | /* type (*) (type, int) */ |
1792 | 660 | tmp = tree_cons (NULL_TREE, type, void_list_node); | 661 | tmp = tree_cons (NULL_TREE, integer_type_node, void_list_node); |
1793 | 661 | tmp = tree_cons (NULL_TREE, integer_type_node, tmp); | 662 | tmp = tree_cons (NULL_TREE, type, tmp); |
1794 | 662 | fntype[5] = build_function_type (type, tmp); | 663 | fntype[5] = build_function_type (type, tmp); |
1795 | 663 | } | 664 | } |
1796 | 664 | 665 | ||
1797 | 665 | 666 | ||
1798 | === modified file 'gcc/fortran/openmp.c' | |||
1799 | --- gcc/fortran/openmp.c 2011-01-25 17:01:06 +0000 | |||
1800 | +++ gcc/fortran/openmp.c 2011-04-06 13:16:33 +0000 | |||
1801 | @@ -1546,6 +1546,7 @@ | |||
1802 | 1546 | case EXEC_OMP_PARALLEL_SECTIONS: | 1546 | case EXEC_OMP_PARALLEL_SECTIONS: |
1803 | 1547 | case EXEC_OMP_SECTIONS: | 1547 | case EXEC_OMP_SECTIONS: |
1804 | 1548 | case EXEC_OMP_SINGLE: | 1548 | case EXEC_OMP_SINGLE: |
1805 | 1549 | case EXEC_OMP_TASK: | ||
1806 | 1549 | if (code->ext.omp_clauses) | 1550 | if (code->ext.omp_clauses) |
1807 | 1550 | resolve_omp_clauses (code); | 1551 | resolve_omp_clauses (code); |
1808 | 1551 | break; | 1552 | break; |
1809 | 1552 | 1553 | ||
1810 | === modified file 'gcc/fortran/trans-array.c' | |||
1811 | --- gcc/fortran/trans-array.c 2011-01-16 11:46:55 +0000 | |||
1812 | +++ gcc/fortran/trans-array.c 2011-04-06 13:16:33 +0000 | |||
1813 | @@ -1483,11 +1483,55 @@ | |||
1814 | 1483 | } | 1483 | } |
1815 | 1484 | 1484 | ||
1816 | 1485 | 1485 | ||
1817 | 1486 | /* A catch-all to obtain the string length for anything that is not a | ||
1818 | 1487 | a substring of non-constant length, a constant, array or variable. */ | ||
1819 | 1488 | |||
1820 | 1489 | static void | ||
1821 | 1490 | get_array_ctor_all_strlen (stmtblock_t *block, gfc_expr *e, tree *len) | ||
1822 | 1491 | { | ||
1823 | 1492 | gfc_se se; | ||
1824 | 1493 | gfc_ss *ss; | ||
1825 | 1494 | |||
1826 | 1495 | /* Don't bother if we already know the length is a constant. */ | ||
1827 | 1496 | if (*len && INTEGER_CST_P (*len)) | ||
1828 | 1497 | return; | ||
1829 | 1498 | |||
1830 | 1499 | if (!e->ref && e->ts.u.cl && e->ts.u.cl->length | ||
1831 | 1500 | && e->ts.u.cl->length->expr_type == EXPR_CONSTANT) | ||
1832 | 1501 | { | ||
1833 | 1502 | /* This is easy. */ | ||
1834 | 1503 | gfc_conv_const_charlen (e->ts.u.cl); | ||
1835 | 1504 | *len = e->ts.u.cl->backend_decl; | ||
1836 | 1505 | } | ||
1837 | 1506 | else | ||
1838 | 1507 | { | ||
1839 | 1508 | /* Otherwise, be brutal even if inefficient. */ | ||
1840 | 1509 | ss = gfc_walk_expr (e); | ||
1841 | 1510 | gfc_init_se (&se, NULL); | ||
1842 | 1511 | |||
1843 | 1512 | /* No function call, in case of side effects. */ | ||
1844 | 1513 | se.no_function_call = 1; | ||
1845 | 1514 | if (ss == gfc_ss_terminator) | ||
1846 | 1515 | gfc_conv_expr (&se, e); | ||
1847 | 1516 | else | ||
1848 | 1517 | gfc_conv_expr_descriptor (&se, e, ss); | ||
1849 | 1518 | |||
1850 | 1519 | /* Fix the value. */ | ||
1851 | 1520 | *len = gfc_evaluate_now (se.string_length, &se.pre); | ||
1852 | 1521 | |||
1853 | 1522 | gfc_add_block_to_block (block, &se.pre); | ||
1854 | 1523 | gfc_add_block_to_block (block, &se.post); | ||
1855 | 1524 | |||
1856 | 1525 | e->ts.u.cl->backend_decl = *len; | ||
1857 | 1526 | } | ||
1858 | 1527 | } | ||
1859 | 1528 | |||
1860 | 1529 | |||
1861 | 1486 | /* Figure out the string length of a variable reference expression. | 1530 | /* Figure out the string length of a variable reference expression. |
1862 | 1487 | Used by get_array_ctor_strlen. */ | 1531 | Used by get_array_ctor_strlen. */ |
1863 | 1488 | 1532 | ||
1864 | 1489 | static void | 1533 | static void |
1866 | 1490 | get_array_ctor_var_strlen (gfc_expr * expr, tree * len) | 1534 | get_array_ctor_var_strlen (stmtblock_t *block, gfc_expr * expr, tree * len) |
1867 | 1491 | { | 1535 | { |
1868 | 1492 | gfc_ref *ref; | 1536 | gfc_ref *ref; |
1869 | 1493 | gfc_typespec *ts; | 1537 | gfc_typespec *ts; |
1870 | @@ -1514,7 +1558,11 @@ | |||
1871 | 1514 | case REF_SUBSTRING: | 1558 | case REF_SUBSTRING: |
1872 | 1515 | if (ref->u.ss.start->expr_type != EXPR_CONSTANT | 1559 | if (ref->u.ss.start->expr_type != EXPR_CONSTANT |
1873 | 1516 | || ref->u.ss.end->expr_type != EXPR_CONSTANT) | 1560 | || ref->u.ss.end->expr_type != EXPR_CONSTANT) |
1875 | 1517 | break; | 1561 | { |
1876 | 1562 | /* Note that this might evaluate expr. */ | ||
1877 | 1563 | get_array_ctor_all_strlen (block, expr, len); | ||
1878 | 1564 | return; | ||
1879 | 1565 | } | ||
1880 | 1518 | mpz_init_set_ui (char_len, 1); | 1566 | mpz_init_set_ui (char_len, 1); |
1881 | 1519 | mpz_add (char_len, char_len, ref->u.ss.end->value.integer); | 1567 | mpz_add (char_len, char_len, ref->u.ss.end->value.integer); |
1882 | 1520 | mpz_sub (char_len, char_len, ref->u.ss.start->value.integer); | 1568 | mpz_sub (char_len, char_len, ref->u.ss.start->value.integer); |
1883 | @@ -1524,10 +1572,7 @@ | |||
1884 | 1524 | return; | 1572 | return; |
1885 | 1525 | 1573 | ||
1886 | 1526 | default: | 1574 | default: |
1891 | 1527 | /* TODO: Substrings are tricky because we can't evaluate the | 1575 | gcc_unreachable (); |
1888 | 1528 | expression more than once. For now we just give up, and hope | ||
1889 | 1529 | we can figure it out elsewhere. */ | ||
1890 | 1530 | return; | ||
1892 | 1531 | } | 1576 | } |
1893 | 1532 | } | 1577 | } |
1894 | 1533 | 1578 | ||
1895 | @@ -1535,49 +1580,6 @@ | |||
1896 | 1535 | } | 1580 | } |
1897 | 1536 | 1581 | ||
1898 | 1537 | 1582 | ||
1899 | 1538 | /* A catch-all to obtain the string length for anything that is not a | ||
1900 | 1539 | constant, array or variable. */ | ||
1901 | 1540 | static void | ||
1902 | 1541 | get_array_ctor_all_strlen (stmtblock_t *block, gfc_expr *e, tree *len) | ||
1903 | 1542 | { | ||
1904 | 1543 | gfc_se se; | ||
1905 | 1544 | gfc_ss *ss; | ||
1906 | 1545 | |||
1907 | 1546 | /* Don't bother if we already know the length is a constant. */ | ||
1908 | 1547 | if (*len && INTEGER_CST_P (*len)) | ||
1909 | 1548 | return; | ||
1910 | 1549 | |||
1911 | 1550 | if (!e->ref && e->ts.u.cl && e->ts.u.cl->length | ||
1912 | 1551 | && e->ts.u.cl->length->expr_type == EXPR_CONSTANT) | ||
1913 | 1552 | { | ||
1914 | 1553 | /* This is easy. */ | ||
1915 | 1554 | gfc_conv_const_charlen (e->ts.u.cl); | ||
1916 | 1555 | *len = e->ts.u.cl->backend_decl; | ||
1917 | 1556 | } | ||
1918 | 1557 | else | ||
1919 | 1558 | { | ||
1920 | 1559 | /* Otherwise, be brutal even if inefficient. */ | ||
1921 | 1560 | ss = gfc_walk_expr (e); | ||
1922 | 1561 | gfc_init_se (&se, NULL); | ||
1923 | 1562 | |||
1924 | 1563 | /* No function call, in case of side effects. */ | ||
1925 | 1564 | se.no_function_call = 1; | ||
1926 | 1565 | if (ss == gfc_ss_terminator) | ||
1927 | 1566 | gfc_conv_expr (&se, e); | ||
1928 | 1567 | else | ||
1929 | 1568 | gfc_conv_expr_descriptor (&se, e, ss); | ||
1930 | 1569 | |||
1931 | 1570 | /* Fix the value. */ | ||
1932 | 1571 | *len = gfc_evaluate_now (se.string_length, &se.pre); | ||
1933 | 1572 | |||
1934 | 1573 | gfc_add_block_to_block (block, &se.pre); | ||
1935 | 1574 | gfc_add_block_to_block (block, &se.post); | ||
1936 | 1575 | |||
1937 | 1576 | e->ts.u.cl->backend_decl = *len; | ||
1938 | 1577 | } | ||
1939 | 1578 | } | ||
1940 | 1579 | |||
1941 | 1580 | |||
1942 | 1581 | /* Figure out the string length of a character array constructor. | 1583 | /* Figure out the string length of a character array constructor. |
1943 | 1582 | If len is NULL, don't calculate the length; this happens for recursive calls | 1584 | If len is NULL, don't calculate the length; this happens for recursive calls |
1944 | 1583 | when a sub-array-constructor is an element but not at the first position, | 1585 | when a sub-array-constructor is an element but not at the first position, |
1945 | @@ -1619,7 +1621,7 @@ | |||
1946 | 1619 | case EXPR_VARIABLE: | 1621 | case EXPR_VARIABLE: |
1947 | 1620 | is_const = false; | 1622 | is_const = false; |
1948 | 1621 | if (len) | 1623 | if (len) |
1950 | 1622 | get_array_ctor_var_strlen (c->expr, len); | 1624 | get_array_ctor_var_strlen (block, c->expr, len); |
1951 | 1623 | break; | 1625 | break; |
1952 | 1624 | 1626 | ||
1953 | 1625 | default: | 1627 | default: |
1954 | 1626 | 1628 | ||
1955 | === modified file 'gcc/stor-layout.c' | |||
1956 | --- gcc/stor-layout.c 2010-12-10 15:34:19 +0000 | |||
1957 | +++ gcc/stor-layout.c 2011-04-06 13:16:33 +0000 | |||
1958 | @@ -2033,11 +2033,6 @@ | |||
1959 | 2033 | #else | 2033 | #else |
1960 | 2034 | TYPE_ALIGN (type) = MAX (TYPE_ALIGN (element), BITS_PER_UNIT); | 2034 | TYPE_ALIGN (type) = MAX (TYPE_ALIGN (element), BITS_PER_UNIT); |
1961 | 2035 | #endif | 2035 | #endif |
1962 | 2036 | if (!TYPE_SIZE (element)) | ||
1963 | 2037 | /* We don't know the size of the underlying element type, so | ||
1964 | 2038 | our alignment calculations will be wrong, forcing us to | ||
1965 | 2039 | fall back on structural equality. */ | ||
1966 | 2040 | SET_TYPE_STRUCTURAL_EQUALITY (type); | ||
1967 | 2041 | TYPE_USER_ALIGN (type) = TYPE_USER_ALIGN (element); | 2036 | TYPE_USER_ALIGN (type) = TYPE_USER_ALIGN (element); |
1968 | 2042 | SET_TYPE_MODE (type, BLKmode); | 2037 | SET_TYPE_MODE (type, BLKmode); |
1969 | 2043 | if (TYPE_SIZE (type) != 0 | 2038 | if (TYPE_SIZE (type) != 0 |
1970 | 2044 | 2039 | ||
1971 | === modified file 'gcc/testsuite/ChangeLog' | |||
1972 | --- gcc/testsuite/ChangeLog 2011-02-19 21:08:40 +0000 | |||
1973 | +++ gcc/testsuite/ChangeLog 2011-04-06 13:16:33 +0000 | |||
1974 | @@ -1,3 +1,168 @@ | |||
1975 | 1 | 2011-03-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | ||
1976 | 2 | |||
1977 | 3 | PR target/16292 | ||
1978 | 4 | * gfortran.dg/g77/cabs.f: Only xfail execution on mips-sgi-irix6* | ||
1979 | 5 | with -O0 except with -mabi=32. | ||
1980 | 6 | |||
1981 | 7 | 2011-03-28 Jason Merrill <jason@redhat.com> | ||
1982 | 8 | |||
1983 | 9 | Revert: | ||
1984 | 10 | * g++.dg/cpp0x/move1.C: New. | ||
1985 | 11 | |||
1986 | 12 | 2011-03-28 Richard Sandiford <richard.sandiford@linaro.org> | ||
1987 | 13 | |||
1988 | 14 | PR target/47553 | ||
1989 | 15 | * gcc.target/arm/neon-vld-1.c: New test. | ||
1990 | 16 | |||
1991 | 17 | 2011-03-25 Jason Merrill <jason@redhat.com> | ||
1992 | 18 | |||
1993 | 19 | * g++.dg/cpp0x/move1.C: New. | ||
1994 | 20 | |||
1995 | 21 | 2011-03-21 Michael Meissner <meissner@linux.vnet.ibm.com> | ||
1996 | 22 | |||
1997 | 23 | PR preprocessor/48192 | ||
1998 | 24 | Backport from trunk | ||
1999 | 25 | * gcc.target/powerpc/pr48192.c: New file. | ||
2000 | 26 | |||
2001 | 27 | 2011-03-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | ||
2002 | 28 | |||
2003 | 29 | PR middle-end/47405 | ||
2004 | 30 | * gcc.dg/torture/20090618-1.c: Skip on mips-sgi-irix*. | ||
2005 | 31 | |||
2006 | 32 | 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org> | ||
2007 | 33 | |||
2008 | 34 | PR rtl-optimization/47166 | ||
2009 | 35 | * gcc.c-torture/execute/postmod-1.c: New test. | ||
2010 | 36 | |||
2011 | 37 | 2011-03-13 Thomas Koenig <tkoenig@gcc.gnu.org> | ||
2012 | 38 | |||
2013 | 39 | PR libfortran/48066 | ||
2014 | 40 | Backport from trunk | ||
2015 | 41 | * gfortran.dg/intrinsic_ifunction_2.f90: Correct PR number. | ||
2016 | 42 | |||
2017 | 43 | 2011-03-13 Paul Thomas <pault@gcc.gnu.org> | ||
2018 | 44 | |||
2019 | 45 | PR fortran/47348 | ||
2020 | 46 | * gfortran.dg/array_constructor_36.f90 : New test. | ||
2021 | 47 | * gfortran.dg/bounds_check_10.f90 : Change dg-output message to | ||
2022 | 48 | allow for comparison between different elements of the array | ||
2023 | 49 | constructor at different levels of optimization. | ||
2024 | 50 | |||
2025 | 51 | 2011-03-11 Jason Merrill <jason@redhat.com> | ||
2026 | 52 | |||
2027 | 53 | * g++.dg/template/error45.C: New. | ||
2028 | 54 | |||
2029 | 55 | 2011-03-10 Jason Merrill <jason@redhat.com> | ||
2030 | 56 | |||
2031 | 57 | * g++.dg/template/array22.C: New. | ||
2032 | 58 | |||
2033 | 59 | 2011-03-11 Richard Guenther <rguenther@suse.de> | ||
2034 | 60 | |||
2035 | 61 | PR tree-optimization/47278 | ||
2036 | 62 | * gcc.dg/torture/pr47278-1.c: Require visibility support. | ||
2037 | 63 | * gcc.dg/torture/pr47278-2.c: Likewise. | ||
2038 | 64 | |||
2039 | 65 | 2011-03-09 Jason Merrill <jason@redhat.com> | ||
2040 | 66 | |||
2041 | 67 | * g++.dg/template/nontype22.C: New. | ||
2042 | 68 | |||
2043 | 69 | 2011-03-08 Jason Merrill <jason@redhat.com> | ||
2044 | 70 | |||
2045 | 71 | * g++.dg/template/anon5.C: New. | ||
2046 | 72 | |||
2047 | 73 | 2011-03-08 Jason Merrill <jason@redhat.com> | ||
2048 | 74 | |||
2049 | 75 | * g++.dg/cpp0x/variadic105.C: New. | ||
2050 | 76 | |||
2051 | 77 | 2011-03-08 Jason Merrill <jason@redhat.com> | ||
2052 | 78 | |||
2053 | 79 | * g++.dg/template/nontype21.C: New. | ||
2054 | 80 | |||
2055 | 81 | 2011-03-08 Dodji Seketeli <dodji@redhat.com> | ||
2056 | 82 | |||
2057 | 83 | * g++.dg/lookup/template3.C: New test. | ||
2058 | 84 | |||
2059 | 85 | 2011-03-08 Richard Guenther <rguenther@suse.de> | ||
2060 | 86 | |||
2061 | 87 | Backport from mainline | ||
2062 | 88 | 2010-10-18 Richard Guenther <rguenther@suse.de> | ||
2063 | 89 | |||
2064 | 90 | PR tree-optimization/45967 | ||
2065 | 91 | * gcc.dg/torture/pr45967.c: New testcase. | ||
2066 | 92 | * gcc.dg/torture/pr45967-2.c: Likewise. | ||
2067 | 93 | * gcc.dg/torture/pr45967-3.c: Likewise. | ||
2068 | 94 | * gcc.dg/torture/pr39074-2.c: Adjust. | ||
2069 | 95 | * gcc.dg/torture/pta-escape-1.c: Likewise | ||
2070 | 96 | * gcc.dg/torture/pta-ptrarith-1.c: Likewise | ||
2071 | 97 | * gcc.dg/tree-ssa/pta-callused.c: Likewise | ||
2072 | 98 | * gcc.dg/tree-ssa/pta-escape-1.c: Likewise | ||
2073 | 99 | * gcc.dg/tree-ssa/pta-escape-2.c: Likewise | ||
2074 | 100 | * gcc.dg/tree-ssa/pta-escape-3.c: Likewise | ||
2075 | 101 | * gcc.dg/tree-ssa/ssa-pre-21.c: Likewise | ||
2076 | 102 | |||
2077 | 103 | 2011-03-08 Richard Guenther <rguenther@suse.de> | ||
2078 | 104 | |||
2079 | 105 | PR tree-optimization/47278 | ||
2080 | 106 | * gcc.dg/torture/pr47278-1.c: New testcase. | ||
2081 | 107 | * gcc.dg/torture/pr47278-2.c: Likewise. | ||
2082 | 108 | |||
2083 | 109 | 2011-03-07 Pat Haugen <pthaugen@us.ibm.com> | ||
2084 | 110 | |||
2085 | 111 | Backport from mainline | ||
2086 | 112 | 2011-03-07 Pat Haugen <pthaugen@us.ibm.com> | ||
2087 | 113 | |||
2088 | 114 | PR target/47862 | ||
2089 | 115 | * gcc.target/powerpc/pr47862.c: New. | ||
2090 | 116 | |||
2091 | 117 | 2011-03-06 Jerry DeLisle <jvdelisle@gcc.gnu.org> | ||
2092 | 118 | |||
2093 | 119 | Backport from mainline | ||
2094 | 120 | PR libgfortran/47778 | ||
2095 | 121 | * gfortran.dg/namelist_71.f90: New test. | ||
2096 | 122 | |||
2097 | 123 | 2011-03-04 Jerry DeLisle <jvdelisle@gcc.gnu.org> | ||
2098 | 124 | |||
2099 | 125 | Backport from mainline | ||
2100 | 126 | PR libgfortran/47878 | ||
2101 | 127 | * gfortran.dg/pr47878.f90: New test. | ||
2102 | 128 | |||
2103 | 129 | 2011-03-01 Jason Merrill <jason@redhat.com> | ||
2104 | 130 | |||
2105 | 131 | * g++.dg/cpp0x/lambda/lambda-98.C: New. | ||
2106 | 132 | |||
2107 | 133 | 2011-03-02 Richard Guenther <rguenther@suse.de> | ||
2108 | 134 | |||
2109 | 135 | Backport from mainline | ||
2110 | 136 | 2011-02-07 Richard Guenther <rguenther@suse.de> | ||
2111 | 137 | |||
2112 | 138 | PR tree-optimization/47615 | ||
2113 | 139 | * g++.dg/opt/pr47615.C: New testcase. | ||
2114 | 140 | |||
2115 | 141 | 2011-03-01 Richard Guenther <rguenther@suse.de> | ||
2116 | 142 | |||
2117 | 143 | Backport from mainline | ||
2118 | 144 | 2011-02-08 Richard Guenther <rguenther@suse.de> | ||
2119 | 145 | |||
2120 | 146 | PR middle-end/47639 | ||
2121 | 147 | * g++.dg/opt/pr47639.c: New testcase. | ||
2122 | 148 | |||
2123 | 149 | 2011-03-01 Richard Guenther <rguenther@suse.de> | ||
2124 | 150 | |||
2125 | 151 | Backport from mainline | ||
2126 | 152 | 2011-03-01 Richard Guenther <rguenther@suse.de> | ||
2127 | 153 | |||
2128 | 154 | PR tree-optimization/47890 | ||
2129 | 155 | * gcc.dg/torture/pr47890.c: New testcase. | ||
2130 | 156 | |||
2131 | 157 | 2010-12-01 Richard Guenther <rguenther@suse.de> | ||
2132 | 158 | |||
2133 | 159 | PR tree-optimization/46723 | ||
2134 | 160 | * gcc.dg/torture/pr46723.c: New testcase. | ||
2135 | 161 | |||
2136 | 162 | 2011-02-26 Jason Merrill <jason@redhat.com> | ||
2137 | 163 | |||
2138 | 164 | * g++.dg/template/this-targ1.C: New. | ||
2139 | 165 | |||
2140 | 1 | 2011-02-19 Alexandre Oliva <aoliva@redhat.com> | 166 | 2011-02-19 Alexandre Oliva <aoliva@redhat.com> |
2141 | 2 | 167 | ||
2142 | 3 | PR tree-optimization/46620 | 168 | PR tree-optimization/46620 |
2143 | 4 | 169 | ||
2144 | === added file 'gcc/testsuite/g++.dg/cpp0x/lambda/lambda-98.C' | |||
2145 | --- gcc/testsuite/g++.dg/cpp0x/lambda/lambda-98.C 1970-01-01 00:00:00 +0000 | |||
2146 | +++ gcc/testsuite/g++.dg/cpp0x/lambda/lambda-98.C 2011-04-06 13:16:33 +0000 | |||
2147 | @@ -0,0 +1,8 @@ | |||
2148 | 1 | // PR c++/46159 | ||
2149 | 2 | // { dg-options -std=c++98 } | ||
2150 | 3 | |||
2151 | 4 | void | ||
2152 | 5 | f() | ||
2153 | 6 | { | ||
2154 | 7 | int **p = new(int(*[2])); | ||
2155 | 8 | } | ||
2156 | 0 | 9 | ||
2157 | === added file 'gcc/testsuite/g++.dg/cpp0x/variadic105.C' | |||
2158 | --- gcc/testsuite/g++.dg/cpp0x/variadic105.C 1970-01-01 00:00:00 +0000 | |||
2159 | +++ gcc/testsuite/g++.dg/cpp0x/variadic105.C 2011-04-06 13:16:33 +0000 | |||
2160 | @@ -0,0 +1,24 @@ | |||
2161 | 1 | // PR c++/47289 | ||
2162 | 2 | // { dg-options -std=c++0x } | ||
2163 | 3 | // { dg-prune-output "note" } | ||
2164 | 4 | |||
2165 | 5 | template <template <typename... __ARGS> class _F, typename... _ARGS> | ||
2166 | 6 | auto reverse (_ARGS... args) -> decltype(_F<_ARGS...>::call_function(args...)) { | ||
2167 | 7 | return _F<_ARGS...>::call_function(args...); | ||
2168 | 8 | } | ||
2169 | 9 | |||
2170 | 10 | template <typename _T> | ||
2171 | 11 | _T sum(_T x) { return x; } | ||
2172 | 12 | |||
2173 | 13 | template <typename _T, typename... _ARGS> | ||
2174 | 14 | _T sum(_T x, _ARGS... args) { return x + sum(args...); } | ||
2175 | 15 | |||
2176 | 16 | template <typename _T, typename... _ARGS> | ||
2177 | 17 | struct call_sum { | ||
2178 | 18 | static _T call_function(_T x1, _ARGS... args) { return sum(x1, args...); } | ||
2179 | 19 | }; | ||
2180 | 20 | |||
2181 | 21 | int main() { | ||
2182 | 22 | // This shouldn't be an error; this is bug 35722. | ||
2183 | 23 | reverse<call_sum>(1,2); // { dg-bogus "no match" "" { xfail *-*-* } } | ||
2184 | 24 | } | ||
2185 | 0 | 25 | ||
2186 | === added file 'gcc/testsuite/g++.dg/lookup/template3.C' | |||
2187 | --- gcc/testsuite/g++.dg/lookup/template3.C 1970-01-01 00:00:00 +0000 | |||
2188 | +++ gcc/testsuite/g++.dg/lookup/template3.C 2011-04-06 13:16:33 +0000 | |||
2189 | @@ -0,0 +1,35 @@ | |||
2190 | 1 | // Origin PR c++/47957 | ||
2191 | 2 | // { dg-do compile } | ||
2192 | 3 | |||
2193 | 4 | struct S | ||
2194 | 5 | { | ||
2195 | 6 | int m; | ||
2196 | 7 | |||
2197 | 8 | S() | ||
2198 | 9 | : m(0) | ||
2199 | 10 | { | ||
2200 | 11 | } | ||
2201 | 12 | }; | ||
2202 | 13 | |||
2203 | 14 | struct Base | ||
2204 | 15 | { | ||
2205 | 16 | typedef S T; | ||
2206 | 17 | }; | ||
2207 | 18 | |||
2208 | 19 | template<class T> | ||
2209 | 20 | struct Derived : public Base | ||
2210 | 21 | { | ||
2211 | 22 | int | ||
2212 | 23 | foo() | ||
2213 | 24 | { | ||
2214 | 25 | T a; // This is Base::T, not the template parameter. | ||
2215 | 26 | return a.m; | ||
2216 | 27 | } | ||
2217 | 28 | }; | ||
2218 | 29 | |||
2219 | 30 | int | ||
2220 | 31 | main() | ||
2221 | 32 | { | ||
2222 | 33 | Derived<char> d; | ||
2223 | 34 | return d.foo(); | ||
2224 | 35 | } | ||
2225 | 0 | 36 | ||
2226 | === added file 'gcc/testsuite/g++.dg/opt/pr47615.C' | |||
2227 | --- gcc/testsuite/g++.dg/opt/pr47615.C 1970-01-01 00:00:00 +0000 | |||
2228 | +++ gcc/testsuite/g++.dg/opt/pr47615.C 2011-04-06 13:16:33 +0000 | |||
2229 | @@ -0,0 +1,711 @@ | |||
2230 | 1 | // { dg-do compile } | ||
2231 | 2 | // { dg-options "-O -fstrict-aliasing -ftree-pre -fno-tree-fre -fno-tree-sra" } | ||
2232 | 3 | |||
2233 | 4 | typedef __SIZE_TYPE__ size_t; | ||
2234 | 5 | namespace std | ||
2235 | 6 | { | ||
2236 | 7 | template < class _T1, class > struct pair | ||
2237 | 8 | { | ||
2238 | 9 | _T1 first; | ||
2239 | 10 | }; | ||
2240 | 11 | } | ||
2241 | 12 | namespace __gnu_cxx | ||
2242 | 13 | { | ||
2243 | 14 | template < typename _Tp > class new_allocator | ||
2244 | 15 | { | ||
2245 | 16 | public: | ||
2246 | 17 | typedef size_t size_type; | ||
2247 | 18 | typedef _Tp * pointer; | ||
2248 | 19 | typedef _Tp const_pointer; | ||
2249 | 20 | typedef _Tp & reference; | ||
2250 | 21 | typedef const _Tp & const_reference; | ||
2251 | 22 | template < typename _Tp1 > struct rebind | ||
2252 | 23 | { | ||
2253 | 24 | typedef new_allocator < _Tp1 > other; | ||
2254 | 25 | }; | ||
2255 | 26 | }; | ||
2256 | 27 | } | ||
2257 | 28 | namespace std | ||
2258 | 29 | { | ||
2259 | 30 | template < typename _Tp > class allocator: | ||
2260 | 31 | public __gnu_cxx::new_allocator < _Tp > | ||
2261 | 32 | {}; | ||
2262 | 33 | template < typename, typename, typename > struct binary_function; | ||
2263 | 34 | template < typename _Tp > struct less:binary_function < _Tp, _Tp, bool > | ||
2264 | 35 | {}; | ||
2265 | 36 | } | ||
2266 | 37 | namespace __gnu_cxx | ||
2267 | 38 | { | ||
2268 | 39 | namespace typelist | ||
2269 | 40 | { | ||
2270 | 41 | struct null_type; | ||
2271 | 42 | template < typename Root > struct node | ||
2272 | 43 | { | ||
2273 | 44 | typedef Root root; | ||
2274 | 45 | }; | ||
2275 | 46 | template < typename, typename > struct chain; | ||
2276 | 47 | namespace detail | ||
2277 | 48 | { | ||
2278 | 49 | template < typename, int >struct chain_at_index_; | ||
2279 | 50 | template | ||
2280 | 51 | < | ||
2281 | 52 | typename | ||
2282 | 53 | Hd, typename Tl > struct chain_at_index_ <chain < Hd, Tl >, 0 > | ||
2283 | 54 | { | ||
2284 | 55 | typedef Hd type; | ||
2285 | 56 | }; | ||
2286 | 57 | template | ||
2287 | 58 | < | ||
2288 | 59 | typename | ||
2289 | 60 | Hd, typename Tl, int i > struct chain_at_index_ <chain < Hd, Tl >, i > | ||
2290 | 61 | { | ||
2291 | 62 | typedef typename chain_at_index_ < Tl, i - 1 >::type type; | ||
2292 | 63 | }; | ||
2293 | 64 | } | ||
2294 | 65 | template < typename Typelist, int i > struct at_index | ||
2295 | 66 | { | ||
2296 | 67 | typedef typename Typelist::root root_type; | ||
2297 | 68 | typedef detail::chain_at_index_ < root_type, i > index_type; | ||
2298 | 69 | typedef typename index_type::type type; | ||
2299 | 70 | }; | ||
2300 | 71 | template < typename T1, typename T2 > struct create2 | ||
2301 | 72 | { | ||
2302 | 73 | typedef node < chain < T1, chain < T2, null_type > > >type; | ||
2303 | 74 | }; | ||
2304 | 75 | } | ||
2305 | 76 | } | ||
2306 | 77 | namespace std | ||
2307 | 78 | { | ||
2308 | 79 | namespace tr1 | ||
2309 | 80 | { | ||
2310 | 81 | template < typename _Tp, _Tp __v > struct integral_constant | ||
2311 | 82 | { | ||
2312 | 83 | static const _Tp value = __v; | ||
2313 | 84 | }; | ||
2314 | 85 | typedef integral_constant < bool, false > false_type; | ||
2315 | 86 | template < typename, typename > struct is_same:false_type | ||
2316 | 87 | {}; | ||
2317 | 88 | } | ||
2318 | 89 | } | ||
2319 | 90 | using std::tr1::is_same; | ||
2320 | 91 | namespace __gnu_pbds | ||
2321 | 92 | { | ||
2322 | 93 | struct null_mapped_type; | ||
2323 | 94 | struct rb_tree_tag; | ||
2324 | 95 | namespace detail | ||
2325 | 96 | { | ||
2326 | 97 | template < typename, typename, typename > struct basic_tree_policy_base; | ||
2327 | 98 | template | ||
2328 | 99 | < | ||
2329 | 100 | typename | ||
2330 | 101 | Const_Node_Iterator, | ||
2331 | 102 | typename | ||
2332 | 103 | Allocator | ||
2333 | 104 | > | ||
2334 | 105 | struct | ||
2335 | 106 | basic_tree_policy_base | ||
2336 | 107 | <Const_Node_Iterator, Const_Node_Iterator, Allocator > | ||
2337 | 108 | {}; | ||
2338 | 109 | } | ||
2339 | 110 | template | ||
2340 | 111 | < typename, typename, typename, typename > struct null_tree_node_update; | ||
2341 | 112 | template < typename Const_Node_Iterator, typename Node_Iterator, typename, typename Allocator > class tree_order_statistics_node_update: | ||
2342 | 113 | detail::basic_tree_policy_base | ||
2343 | 114 | < Const_Node_Iterator, Node_Iterator, Allocator > | ||
2344 | 115 | { | ||
2345 | 116 | public: | ||
2346 | 117 | typedef Allocator allocator_type; | ||
2347 | 118 | typedef typename allocator_type::size_type size_type; | ||
2348 | 119 | typedef size_type metadata_type; | ||
2349 | 120 | typedef Const_Node_Iterator const_node_iterator; | ||
2350 | 121 | typedef Node_Iterator node_iterator; | ||
2351 | 122 | typedef | ||
2352 | 123 | typename | ||
2353 | 124 | allocator_type::template | ||
2354 | 125 | rebind < metadata_type >::other::reference metadata_reference; | ||
2355 | 126 | void operator () (node_iterator, const_node_iterator) const; | ||
2356 | 127 | }; | ||
2357 | 128 | template | ||
2358 | 129 | < | ||
2359 | 130 | typename | ||
2360 | 131 | Const_Node_Iterator, | ||
2361 | 132 | class | ||
2362 | 133 | Node_Iterator, | ||
2363 | 134 | class | ||
2364 | 135 | Cmp_Fn, | ||
2365 | 136 | class | ||
2366 | 137 | Allocator | ||
2367 | 138 | > | ||
2368 | 139 | inline | ||
2369 | 140 | void | ||
2370 | 141 | tree_order_statistics_node_update | ||
2371 | 142 | < | ||
2372 | 143 | Const_Node_Iterator, | ||
2373 | 144 | Node_Iterator, | ||
2374 | 145 | Cmp_Fn, | ||
2375 | 146 | Allocator | ||
2376 | 147 | >::operator | ||
2377 | 148 | () (node_iterator node_it, const_node_iterator end_nd_it) const | ||
2378 | 149 | { | ||
2379 | 150 | node_iterator l_child_it; | ||
2380 | 151 | size_type | ||
2381 | 152 | l_rank = (l_child_it == end_nd_it) ? : l_child_it.get_metadata (); | ||
2382 | 153 | node_iterator r_child_it = node_it.get_r_child (); | ||
2383 | 154 | size_type | ||
2384 | 155 | r_rank = (r_child_it == end_nd_it) ? : r_child_it.get_metadata (); | ||
2385 | 156 | const_cast | ||
2386 | 157 | < metadata_reference > (node_it.get_metadata ()) = l_rank + r_rank; | ||
2387 | 158 | } | ||
2388 | 159 | namespace | ||
2389 | 160 | { | ||
2390 | 161 | template < typename, typename, typename, bool > struct value_type_base; | ||
2391 | 162 | template | ||
2392 | 163 | < | ||
2393 | 164 | typename | ||
2394 | 165 | Key, | ||
2395 | 166 | typename | ||
2396 | 167 | Allocator | ||
2397 | 168 | > struct value_type_base <Key, null_mapped_type, Allocator, false > | ||
2398 | 169 | { | ||
2399 | 170 | typedef Key value_type; | ||
2400 | 171 | typedef | ||
2401 | 172 | typename | ||
2402 | 173 | Allocator::template rebind < value_type >::other value_type_allocator; | ||
2403 | 174 | typedef typename value_type_allocator::pointer pointer; | ||
2404 | 175 | typedef typename value_type_allocator::const_pointer const_pointer; | ||
2405 | 176 | typedef typename value_type_allocator::reference reference; | ||
2406 | 177 | typedef typename value_type_allocator::const_reference const_reference; | ||
2407 | 178 | }; | ||
2408 | 179 | template | ||
2409 | 180 | < | ||
2410 | 181 | typename | ||
2411 | 182 | Key, | ||
2412 | 183 | typename | ||
2413 | 184 | Mapped, typename Alloc, bool Store_Extra > struct vt_base_selector | ||
2414 | 185 | { | ||
2415 | 186 | typedef value_type_base < Key, Mapped, Alloc, Store_Extra > type; | ||
2416 | 187 | }; | ||
2417 | 188 | template | ||
2418 | 189 | < | ||
2419 | 190 | typename | ||
2420 | 191 | Key, | ||
2421 | 192 | typename | ||
2422 | 193 | Mapped, | ||
2423 | 194 | typename | ||
2424 | 195 | Alloc, | ||
2425 | 196 | bool | ||
2426 | 197 | Store_Extra | ||
2427 | 198 | > | ||
2428 | 199 | struct | ||
2429 | 200 | types_traits:vt_base_selector < Key, Mapped, Alloc, Store_Extra >::type | ||
2430 | 201 | {}; | ||
2431 | 202 | template < typename, class, class > struct dumconst_node_iterator; | ||
2432 | 203 | template | ||
2433 | 204 | < | ||
2434 | 205 | typename | ||
2435 | 206 | Key, | ||
2436 | 207 | typename | ||
2437 | 208 | Mapped, | ||
2438 | 209 | class, | ||
2439 | 210 | class | ||
2440 | 211 | Node_And_It_Traits, class Allocator > class bin_search_tree_no_data_ | ||
2441 | 212 | { | ||
2442 | 213 | protected: | ||
2443 | 214 | typedef | ||
2444 | 215 | typename | ||
2445 | 216 | Allocator::template | ||
2446 | 217 | rebind | ||
2447 | 218 | < typename Node_And_It_Traits::node >::other::pointer node_pointer; | ||
2448 | 219 | typedef | ||
2449 | 220 | typename | ||
2450 | 221 | types_traits | ||
2451 | 222 | < Key, Mapped, Allocator, false >::const_reference const_reference; | ||
2452 | 223 | typedef typename Node_And_It_Traits::point_iterator point_iterator; | ||
2453 | 224 | typedef typename Node_And_It_Traits::node_update node_update; | ||
2454 | 225 | void rotate_right (node_pointer); | ||
2455 | 226 | template | ||
2456 | 227 | < | ||
2457 | 228 | typename | ||
2458 | 229 | Node_Update_ > void apply_update (node_pointer, Node_Update_ *); | ||
2459 | 230 | }; | ||
2460 | 231 | template | ||
2461 | 232 | < | ||
2462 | 233 | typename | ||
2463 | 234 | Key, | ||
2464 | 235 | typename | ||
2465 | 236 | Mapped, | ||
2466 | 237 | class | ||
2467 | 238 | Cmp_Fn, | ||
2468 | 239 | class | ||
2469 | 240 | Node_And_It_Traits, | ||
2470 | 241 | class | ||
2471 | 242 | Allocator | ||
2472 | 243 | > | ||
2473 | 244 | void | ||
2474 | 245 | bin_search_tree_no_data_ | ||
2475 | 246 | < | ||
2476 | 247 | Key, | ||
2477 | 248 | Mapped, | ||
2478 | 249 | Cmp_Fn, Node_And_It_Traits, Allocator >::rotate_right (node_pointer p_x) | ||
2479 | 250 | { | ||
2480 | 251 | node_pointer p_y = p_x->m_p_parent; | ||
2481 | 252 | p_y->m_p_right = p_x; | ||
2482 | 253 | apply_update (p_x, this); | ||
2483 | 254 | apply_update (p_x->m_p_parent, (node_update *) this); | ||
2484 | 255 | } | ||
2485 | 256 | template | ||
2486 | 257 | < | ||
2487 | 258 | typename | ||
2488 | 259 | Key, | ||
2489 | 260 | typename | ||
2490 | 261 | Mapped, | ||
2491 | 262 | class | ||
2492 | 263 | Cmp_Fn, | ||
2493 | 264 | class | ||
2494 | 265 | Node_And_It_Traits, | ||
2495 | 266 | class | ||
2496 | 267 | Allocator | ||
2497 | 268 | > | ||
2498 | 269 | template | ||
2499 | 270 | < | ||
2500 | 271 | typename | ||
2501 | 272 | Node_Update_ | ||
2502 | 273 | > | ||
2503 | 274 | void | ||
2504 | 275 | bin_search_tree_no_data_ | ||
2505 | 276 | < | ||
2506 | 277 | Key, | ||
2507 | 278 | Mapped, | ||
2508 | 279 | Cmp_Fn, | ||
2509 | 280 | Node_And_It_Traits, | ||
2510 | 281 | Allocator >::apply_update (node_pointer p_nd, Node_Update_ *) | ||
2511 | 282 | { | ||
2512 | 283 | node_update ()((p_nd), ((0))); | ||
2513 | 284 | } | ||
2514 | 285 | } | ||
2515 | 286 | namespace detail | ||
2516 | 287 | { | ||
2517 | 288 | template < typename Key, typename Mapped, typename Cmp_Fn, typename Node_And_It_Traits, typename Allocator > class rb_tree_no_data_: | ||
2518 | 289 | bin_search_tree_no_data_ | ||
2519 | 290 | < Key, Mapped, Cmp_Fn, Node_And_It_Traits, Allocator > | ||
2520 | 291 | { | ||
2521 | 292 | typedef | ||
2522 | 293 | bin_search_tree_no_data_ | ||
2523 | 294 | < Key, Mapped, Cmp_Fn, Node_And_It_Traits, Allocator > base_type; | ||
2524 | 295 | typedef typename base_type::node_pointer node_pointer; | ||
2525 | 296 | public: | ||
2526 | 297 | typedef typename base_type::const_reference const_reference; | ||
2527 | 298 | typedef typename base_type::point_iterator point_iterator; | ||
2528 | 299 | std::pair < point_iterator, bool > insert (const_reference); | ||
2529 | 300 | void insert_fixup (node_pointer); | ||
2530 | 301 | }; | ||
2531 | 302 | template | ||
2532 | 303 | < | ||
2533 | 304 | typename | ||
2534 | 305 | Key, | ||
2535 | 306 | typename | ||
2536 | 307 | Mapped, | ||
2537 | 308 | typename | ||
2538 | 309 | Cmp_Fn, | ||
2539 | 310 | typename | ||
2540 | 311 | Node_And_It_Traits, | ||
2541 | 312 | typename | ||
2542 | 313 | Allocator | ||
2543 | 314 | > | ||
2544 | 315 | std::pair | ||
2545 | 316 | < | ||
2546 | 317 | typename | ||
2547 | 318 | rb_tree_no_data_ | ||
2548 | 319 | < | ||
2549 | 320 | Key, | ||
2550 | 321 | Mapped, | ||
2551 | 322 | Cmp_Fn, | ||
2552 | 323 | Node_And_It_Traits, | ||
2553 | 324 | Allocator | ||
2554 | 325 | >::point_iterator, | ||
2555 | 326 | bool | ||
2556 | 327 | > | ||
2557 | 328 | rb_tree_no_data_ | ||
2558 | 329 | < | ||
2559 | 330 | Key, | ||
2560 | 331 | Mapped, | ||
2561 | 332 | Cmp_Fn, Node_And_It_Traits, Allocator >::insert (const_reference) | ||
2562 | 333 | { | ||
2563 | 334 | std::pair < point_iterator, bool > ins_pair; | ||
2564 | 335 | { | ||
2565 | 336 | insert_fixup (ins_pair.first.m_p_nd); | ||
2566 | 337 | } | ||
2567 | 338 | } | ||
2568 | 339 | template | ||
2569 | 340 | < | ||
2570 | 341 | typename | ||
2571 | 342 | Key, | ||
2572 | 343 | typename | ||
2573 | 344 | Mapped, | ||
2574 | 345 | typename | ||
2575 | 346 | Cmp_Fn, | ||
2576 | 347 | typename | ||
2577 | 348 | Node_And_It_Traits, | ||
2578 | 349 | typename | ||
2579 | 350 | Allocator | ||
2580 | 351 | > | ||
2581 | 352 | void | ||
2582 | 353 | rb_tree_no_data_ | ||
2583 | 354 | < | ||
2584 | 355 | Key, | ||
2585 | 356 | Mapped, | ||
2586 | 357 | Cmp_Fn, | ||
2587 | 358 | Node_And_It_Traits, Allocator >::insert_fixup (node_pointer p_nd) | ||
2588 | 359 | { | ||
2589 | 360 | { | ||
2590 | 361 | { | ||
2591 | 362 | { | ||
2592 | 363 | rotate_right (p_nd); | ||
2593 | 364 | } | ||
2594 | 365 | } | ||
2595 | 366 | } | ||
2596 | 367 | } | ||
2597 | 368 | template | ||
2598 | 369 | < | ||
2599 | 370 | typename, | ||
2600 | 371 | typename, typename, typename, typename > struct container_base_dispatch; | ||
2601 | 372 | template | ||
2602 | 373 | < | ||
2603 | 374 | typename | ||
2604 | 375 | Key, | ||
2605 | 376 | typename | ||
2606 | 377 | Policy_Tl, | ||
2607 | 378 | typename | ||
2608 | 379 | Alloc | ||
2609 | 380 | > | ||
2610 | 381 | struct | ||
2611 | 382 | container_base_dispatch | ||
2612 | 383 | <Key, null_mapped_type, rb_tree_tag, Policy_Tl, Alloc > | ||
2613 | 384 | { | ||
2614 | 385 | typedef __gnu_cxx::typelist::at_index < Policy_Tl, 0 > at0; | ||
2615 | 386 | typedef typename at0::type at0t; | ||
2616 | 387 | typedef __gnu_cxx::typelist::at_index < Policy_Tl, 1 > at1; | ||
2617 | 388 | typedef typename at1::type at1t; | ||
2618 | 389 | typedef | ||
2619 | 390 | rb_tree_no_data_ < Key, null_mapped_type, at0t, at1t, Alloc > type; | ||
2620 | 391 | }; | ||
2621 | 392 | template | ||
2622 | 393 | < | ||
2623 | 394 | typename | ||
2624 | 395 | Node_Pointer, | ||
2625 | 396 | typename, | ||
2626 | 397 | typename, | ||
2627 | 398 | typename, | ||
2628 | 399 | typename, typename, bool, class > class bin_search_tree_const_it_ | ||
2629 | 400 | { | ||
2630 | 401 | public: | ||
2631 | 402 | Node_Pointer m_p_nd; | ||
2632 | 403 | }; | ||
2633 | 404 | template | ||
2634 | 405 | < | ||
2635 | 406 | typename | ||
2636 | 407 | Node, | ||
2637 | 408 | class | ||
2638 | 409 | Const_Iterator, | ||
2639 | 410 | class Iterator, class Allocator > class bin_search_tree_const_node_it_ | ||
2640 | 411 | { | ||
2641 | 412 | typedef | ||
2642 | 413 | typename | ||
2643 | 414 | Allocator::template rebind < Node >::other::pointer node_pointer; | ||
2644 | 415 | public: | ||
2645 | 416 | typedef typename Node::metadata_type metadata_type; | ||
2646 | 417 | typedef | ||
2647 | 418 | typename | ||
2648 | 419 | Allocator::template | ||
2649 | 420 | rebind | ||
2650 | 421 | < metadata_type >::other::const_reference const_metadata_reference; | ||
2651 | 422 | bin_search_tree_const_node_it_ (node_pointer p_nd): | ||
2652 | 423 | m_p_nd ((p_nd)) | ||
2653 | 424 | {} | ||
2654 | 425 | const_metadata_reference get_metadata () | ||
2655 | 426 | { | ||
2656 | 427 | return (m_p_nd->get_metadata ()); | ||
2657 | 428 | } | ||
2658 | 429 | bin_search_tree_const_node_it_ () | ||
2659 | 430 | {} | ||
2660 | 431 | bin_search_tree_const_node_it_ | ||
2661 | 432 | < Node, Const_Iterator, Iterator, Allocator > get_r_child () | ||
2662 | 433 | { | ||
2663 | 434 | return ((m_p_nd->m_p_right)); | ||
2664 | 435 | } | ||
2665 | 436 | bool operator == (bin_search_tree_const_node_it_) | ||
2666 | 437 | {} | ||
2667 | 438 | node_pointer m_p_nd; | ||
2668 | 439 | }; | ||
2669 | 440 | template | ||
2670 | 441 | < | ||
2671 | 442 | typename, | ||
2672 | 443 | typename, | ||
2673 | 444 | class, | ||
2674 | 445 | template | ||
2675 | 446 | < | ||
2676 | 447 | typename, | ||
2677 | 448 | class, | ||
2678 | 449 | class, class > class, class, class > struct bin_search_tree_traits; | ||
2679 | 450 | template | ||
2680 | 451 | < | ||
2681 | 452 | typename | ||
2682 | 453 | Key, | ||
2683 | 454 | class | ||
2684 | 455 | Cmp_Fn, | ||
2685 | 456 | template | ||
2686 | 457 | < | ||
2687 | 458 | typename, | ||
2688 | 459 | class, | ||
2689 | 460 | class, | ||
2690 | 461 | class | ||
2691 | 462 | > | ||
2692 | 463 | class | ||
2693 | 464 | Node_Update, | ||
2694 | 465 | class | ||
2695 | 466 | Node, | ||
2696 | 467 | class | ||
2697 | 468 | Allocator | ||
2698 | 469 | > | ||
2699 | 470 | struct | ||
2700 | 471 | bin_search_tree_traits | ||
2701 | 472 | <Key, null_mapped_type, Cmp_Fn, Node_Update, Node, Allocator > | ||
2702 | 473 | { | ||
2703 | 474 | typedef | ||
2704 | 475 | types_traits < Key, null_mapped_type, Allocator, false > type_traits; | ||
2705 | 476 | typedef Node node; | ||
2706 | 477 | typedef | ||
2707 | 478 | bin_search_tree_const_it_ | ||
2708 | 479 | < | ||
2709 | 480 | typename | ||
2710 | 481 | Allocator::template | ||
2711 | 482 | rebind | ||
2712 | 483 | < | ||
2713 | 484 | node | ||
2714 | 485 | >::other::pointer, | ||
2715 | 486 | typename | ||
2716 | 487 | type_traits::value_type, | ||
2717 | 488 | typename | ||
2718 | 489 | type_traits::pointer, | ||
2719 | 490 | typename | ||
2720 | 491 | type_traits::const_pointer, | ||
2721 | 492 | typename | ||
2722 | 493 | type_traits::reference, | ||
2723 | 494 | typename | ||
2724 | 495 | type_traits::const_reference, true, Allocator > const_point_iterator; | ||
2725 | 496 | typedef const_point_iterator point_iterator; | ||
2726 | 497 | typedef | ||
2727 | 498 | bin_search_tree_const_node_it_ | ||
2728 | 499 | < | ||
2729 | 500 | Node, | ||
2730 | 501 | const_point_iterator, point_iterator, Allocator > const_node_iterator; | ||
2731 | 502 | typedef const_node_iterator node_iterator; | ||
2732 | 503 | typedef | ||
2733 | 504 | Node_Update | ||
2734 | 505 | < const_node_iterator, node_iterator, Cmp_Fn, Allocator > node_update; | ||
2735 | 506 | }; | ||
2736 | 507 | template < typename Node_Update, bool > struct tree_metadata_helper | ||
2737 | 508 | { | ||
2738 | 509 | typedef typename Node_Update::metadata_type type; | ||
2739 | 510 | }; | ||
2740 | 511 | template | ||
2741 | 512 | < | ||
2742 | 513 | typename | ||
2743 | 514 | Key, | ||
2744 | 515 | typename | ||
2745 | 516 | Data, | ||
2746 | 517 | class | ||
2747 | 518 | Cmp_Fn, | ||
2748 | 519 | template | ||
2749 | 520 | < | ||
2750 | 521 | typename, | ||
2751 | 522 | class, | ||
2752 | 523 | class, | ||
2753 | 524 | class | ||
2754 | 525 | > | ||
2755 | 526 | class Node_Update, class Allocator > struct tree_node_metadata_selector | ||
2756 | 527 | { | ||
2757 | 528 | typedef | ||
2758 | 529 | dumconst_node_iterator < Key, Data, Allocator > dumconst_node_it; | ||
2759 | 530 | enum | ||
2760 | 531 | { | ||
2761 | 532 | null_update = is_same < Node_Update < dumconst_node_it, | ||
2762 | 533 | dumconst_node_it, | ||
2763 | 534 | Cmp_Fn, | ||
2764 | 535 | Allocator >, | ||
2765 | 536 | null_tree_node_update < dumconst_node_it, | ||
2766 | 537 | dumconst_node_it, | ||
2767 | 538 | Cmp_Fn, | ||
2768 | 539 | Allocator > >::value | ||
2769 | 540 | }; | ||
2770 | 541 | typedef | ||
2771 | 542 | typename | ||
2772 | 543 | tree_metadata_helper | ||
2773 | 544 | < | ||
2774 | 545 | Node_Update | ||
2775 | 546 | < | ||
2776 | 547 | dumconst_node_it, | ||
2777 | 548 | dumconst_node_it, Cmp_Fn, Allocator >, null_update >::type type; | ||
2778 | 549 | }; | ||
2779 | 550 | template | ||
2780 | 551 | < | ||
2781 | 552 | typename, | ||
2782 | 553 | typename, | ||
2783 | 554 | class, | ||
2784 | 555 | template | ||
2785 | 556 | < | ||
2786 | 557 | typename, | ||
2787 | 558 | class, class, class > class, class, class > struct tree_traits; | ||
2788 | 559 | template < typename Value_Type, class Metadata, class Allocator > struct rb_tree_node_ | ||
2789 | 560 | { | ||
2790 | 561 | typedef Metadata metadata_type; | ||
2791 | 562 | typedef | ||
2792 | 563 | typename | ||
2793 | 564 | Allocator::template | ||
2794 | 565 | rebind | ||
2795 | 566 | < | ||
2796 | 567 | rb_tree_node_ | ||
2797 | 568 | < Value_Type, Metadata, Allocator > >::other::pointer node_pointer; | ||
2798 | 569 | typedef | ||
2799 | 570 | typename | ||
2800 | 571 | Allocator::template | ||
2801 | 572 | rebind < metadata_type >::other::reference metadata_reference; | ||
2802 | 573 | metadata_reference get_metadata () | ||
2803 | 574 | { | ||
2804 | 575 | return m_metadata; | ||
2805 | 576 | } | ||
2806 | 577 | node_pointer m_p_right; | ||
2807 | 578 | node_pointer m_p_parent; | ||
2808 | 579 | metadata_type m_metadata; | ||
2809 | 580 | }; | ||
2810 | 581 | template | ||
2811 | 582 | < | ||
2812 | 583 | typename | ||
2813 | 584 | Key, | ||
2814 | 585 | typename | ||
2815 | 586 | Mapped, | ||
2816 | 587 | typename | ||
2817 | 588 | Cmp_Fn, | ||
2818 | 589 | template | ||
2819 | 590 | < | ||
2820 | 591 | typename, | ||
2821 | 592 | class, | ||
2822 | 593 | class, | ||
2823 | 594 | class | ||
2824 | 595 | > | ||
2825 | 596 | class | ||
2826 | 597 | Node_Update, | ||
2827 | 598 | typename | ||
2828 | 599 | Allocator | ||
2829 | 600 | > | ||
2830 | 601 | struct | ||
2831 | 602 | tree_traits | ||
2832 | 603 | <Key, | ||
2833 | 604 | Mapped, | ||
2834 | 605 | Cmp_Fn, | ||
2835 | 606 | Node_Update, | ||
2836 | 607 | rb_tree_tag, | ||
2837 | 608 | Allocator | ||
2838 | 609 | >:bin_search_tree_traits | ||
2839 | 610 | < | ||
2840 | 611 | Key, | ||
2841 | 612 | Mapped, | ||
2842 | 613 | Cmp_Fn, | ||
2843 | 614 | Node_Update, | ||
2844 | 615 | rb_tree_node_ | ||
2845 | 616 | < | ||
2846 | 617 | typename | ||
2847 | 618 | types_traits | ||
2848 | 619 | < | ||
2849 | 620 | Key, | ||
2850 | 621 | Mapped, | ||
2851 | 622 | Allocator, | ||
2852 | 623 | false | ||
2853 | 624 | >::value_type, | ||
2854 | 625 | typename | ||
2855 | 626 | tree_node_metadata_selector | ||
2856 | 627 | < | ||
2857 | 628 | Key, | ||
2858 | 629 | Mapped, Cmp_Fn, Node_Update, Allocator >::type, Allocator >, Allocator > | ||
2859 | 630 | {}; | ||
2860 | 631 | } | ||
2861 | 632 | template < typename Key, typename Mapped, typename Tag, typename Policy_Tl, typename Allocator > class container_base: | ||
2862 | 633 | public | ||
2863 | 634 | detail::container_base_dispatch | ||
2864 | 635 | < Key, Mapped, Tag, Policy_Tl, Allocator >::type | ||
2865 | 636 | {}; | ||
2866 | 637 | template < typename Key, typename Mapped, typename Tag, typename, typename Policy_Tl, typename Allocator > class basic_tree: | ||
2867 | 638 | public | ||
2868 | 639 | container_base < Key, Mapped, Tag, Policy_Tl, Allocator > | ||
2869 | 640 | {}; | ||
2870 | 641 | template | ||
2871 | 642 | < | ||
2872 | 643 | typename | ||
2873 | 644 | Key, | ||
2874 | 645 | typename | ||
2875 | 646 | Mapped, | ||
2876 | 647 | typename | ||
2877 | 648 | Cmp_Fn | ||
2878 | 649 | = | ||
2879 | 650 | std::less | ||
2880 | 651 | < | ||
2881 | 652 | Key | ||
2882 | 653 | >, | ||
2883 | 654 | typename | ||
2884 | 655 | Tag | ||
2885 | 656 | = | ||
2886 | 657 | rb_tree_tag, | ||
2887 | 658 | template | ||
2888 | 659 | < | ||
2889 | 660 | typename, | ||
2890 | 661 | typename, | ||
2891 | 662 | typename, | ||
2892 | 663 | typename | ||
2893 | 664 | > | ||
2894 | 665 | class | ||
2895 | 666 | Node_Update | ||
2896 | 667 | = | ||
2897 | 668 | null_tree_node_update, | ||
2898 | 669 | typename | ||
2899 | 670 | Allocator | ||
2900 | 671 | = | ||
2901 | 672 | std::allocator | ||
2902 | 673 | < | ||
2903 | 674 | char | ||
2904 | 675 | > >class | ||
2905 | 676 | tree:public | ||
2906 | 677 | basic_tree | ||
2907 | 678 | < | ||
2908 | 679 | Key, | ||
2909 | 680 | Mapped, | ||
2910 | 681 | Tag, | ||
2911 | 682 | detail::tree_traits | ||
2912 | 683 | < | ||
2913 | 684 | Key, | ||
2914 | 685 | Mapped, | ||
2915 | 686 | Cmp_Fn, | ||
2916 | 687 | Node_Update, | ||
2917 | 688 | Tag, | ||
2918 | 689 | Allocator | ||
2919 | 690 | >, | ||
2920 | 691 | typename | ||
2921 | 692 | __gnu_cxx::typelist::create2 | ||
2922 | 693 | < | ||
2923 | 694 | Cmp_Fn, | ||
2924 | 695 | detail::tree_traits | ||
2925 | 696 | < Key, Mapped, Cmp_Fn, Node_Update, Tag, Allocator > >::type, Allocator > | ||
2926 | 697 | {}; | ||
2927 | 698 | } | ||
2928 | 699 | using namespace std; | ||
2929 | 700 | using namespace __gnu_pbds; | ||
2930 | 701 | typedef | ||
2931 | 702 | tree | ||
2932 | 703 | < | ||
2933 | 704 | int, | ||
2934 | 705 | null_mapped_type, | ||
2935 | 706 | less < int >, rb_tree_tag, tree_order_statistics_node_update > set_t; | ||
2936 | 707 | main () | ||
2937 | 708 | { | ||
2938 | 709 | set_t s; | ||
2939 | 710 | s.insert (12); | ||
2940 | 711 | } | ||
2941 | 0 | 712 | ||
2942 | === added file 'gcc/testsuite/g++.dg/opt/pr47639.c' | |||
2943 | --- gcc/testsuite/g++.dg/opt/pr47639.c 1970-01-01 00:00:00 +0000 | |||
2944 | +++ gcc/testsuite/g++.dg/opt/pr47639.c 2011-04-06 13:16:33 +0000 | |||
2945 | @@ -0,0 +1,17 @@ | |||
2946 | 1 | // { dg-do compile } | ||
2947 | 2 | // { dg-options "-fnon-call-exceptions" } | ||
2948 | 3 | |||
2949 | 4 | typedef int __attribute__ ((vector_size (8))) vec; | ||
2950 | 5 | |||
2951 | 6 | vec foo (vec v1, vec v2) | ||
2952 | 7 | { | ||
2953 | 8 | try | ||
2954 | 9 | { | ||
2955 | 10 | return v1 / v2; | ||
2956 | 11 | } | ||
2957 | 12 | catch (...) | ||
2958 | 13 | { | ||
2959 | 14 | throw; | ||
2960 | 15 | } | ||
2961 | 16 | } | ||
2962 | 17 | |||
2963 | 0 | 18 | ||
2964 | === added file 'gcc/testsuite/g++.dg/template/anon5.C' | |||
2965 | --- gcc/testsuite/g++.dg/template/anon5.C 1970-01-01 00:00:00 +0000 | |||
2966 | +++ gcc/testsuite/g++.dg/template/anon5.C 2011-04-06 13:16:33 +0000 | |||
2967 | @@ -0,0 +1,6 @@ | |||
2968 | 1 | // PR c++/45651 | ||
2969 | 2 | |||
2970 | 3 | namespace { template <int T> struct A {}; } | ||
2971 | 4 | template <int T> struct B { void f(A<T>); }; | ||
2972 | 5 | template struct B<1>; | ||
2973 | 6 | template<int T> void B<T>::f(A<T>) {} | ||
2974 | 0 | 7 | ||
2975 | === added file 'gcc/testsuite/g++.dg/template/array22.C' | |||
2976 | --- gcc/testsuite/g++.dg/template/array22.C 1970-01-01 00:00:00 +0000 | |||
2977 | +++ gcc/testsuite/g++.dg/template/array22.C 2011-04-06 13:16:33 +0000 | |||
2978 | @@ -0,0 +1,14 @@ | |||
2979 | 1 | // PR c++/48029 | ||
2980 | 2 | |||
2981 | 3 | template <class T> struct A { }; | ||
2982 | 4 | template <class T, class U> struct B | ||
2983 | 5 | { | ||
2984 | 6 | struct N { }; | ||
2985 | 7 | typedef U u; | ||
2986 | 8 | }; | ||
2987 | 9 | |||
2988 | 10 | typedef B<int, A<int>(*)[2]> btype; | ||
2989 | 11 | A<int> v1[2]; | ||
2990 | 12 | btype v2; | ||
2991 | 13 | |||
2992 | 14 | |||
2993 | 0 | 15 | ||
2994 | === added file 'gcc/testsuite/g++.dg/template/error45.C' | |||
2995 | --- gcc/testsuite/g++.dg/template/error45.C 1970-01-01 00:00:00 +0000 | |||
2996 | +++ gcc/testsuite/g++.dg/template/error45.C 2011-04-06 13:16:33 +0000 | |||
2997 | @@ -0,0 +1,22 @@ | |||
2998 | 1 | // PR c++/47125 | ||
2999 | 2 | |||
3000 | 3 | template < bool, typename > | ||
3001 | 4 | struct enable_if {}; | ||
3002 | 5 | |||
3003 | 6 | template < typename T > | ||
3004 | 7 | struct enable_if< true, T > | ||
3005 | 8 | { | ||
3006 | 9 | typedef T type; | ||
3007 | 10 | }; | ||
3008 | 11 | |||
3009 | 12 | template < typename T > | ||
3010 | 13 | struct enable_if< true, T >::type | ||
3011 | 14 | f( T x ); | ||
3012 | 15 | |||
3013 | 16 | void | ||
3014 | 17 | g( void ) | ||
3015 | 18 | { | ||
3016 | 19 | f< int >( 0 ); // { dg-error "no match" } | ||
3017 | 20 | } | ||
3018 | 21 | |||
3019 | 22 | // { dg-prune-output "note" } | ||
3020 | 0 | 23 | ||
3021 | === added file 'gcc/testsuite/g++.dg/template/nontype21.C' | |||
3022 | --- gcc/testsuite/g++.dg/template/nontype21.C 1970-01-01 00:00:00 +0000 | |||
3023 | +++ gcc/testsuite/g++.dg/template/nontype21.C 2011-04-06 13:16:33 +0000 | |||
3024 | @@ -0,0 +1,7 @@ | |||
3025 | 1 | // PR c++/47705 | ||
3026 | 2 | |||
3027 | 3 | template<char const * const x> class Something { }; | ||
3028 | 4 | |||
3029 | 5 | extern char const xyz; | ||
3030 | 6 | |||
3031 | 7 | class SomethingElse:public Something<xyz> { }; // { dg-error "xyz. is a variable" } | ||
3032 | 0 | 8 | ||
3033 | === added file 'gcc/testsuite/g++.dg/template/nontype22.C' | |||
3034 | --- gcc/testsuite/g++.dg/template/nontype22.C 1970-01-01 00:00:00 +0000 | |||
3035 | +++ gcc/testsuite/g++.dg/template/nontype22.C 2011-04-06 13:16:33 +0000 | |||
3036 | @@ -0,0 +1,11 @@ | |||
3037 | 1 | // PR c++/44629 | ||
3038 | 2 | // The proper mangling is unclear. | ||
3039 | 3 | |||
3040 | 4 | template<typename T> int cmp1(T a, T b); | ||
3041 | 5 | template<typename T, int (*cmp)(T, T) = cmp1> struct A { }; | ||
3042 | 6 | template <typename T> void f (A<T> &); // { dg-bogus "" "" { xfail *-*-* } } | ||
3043 | 7 | void g() | ||
3044 | 8 | { | ||
3045 | 9 | A<char> a; | ||
3046 | 10 | f(a); | ||
3047 | 11 | } | ||
3048 | 0 | 12 | ||
3049 | === added file 'gcc/testsuite/g++.dg/template/this-targ1.C' | |||
3050 | --- gcc/testsuite/g++.dg/template/this-targ1.C 1970-01-01 00:00:00 +0000 | |||
3051 | +++ gcc/testsuite/g++.dg/template/this-targ1.C 2011-04-06 13:16:33 +0000 | |||
3052 | @@ -0,0 +1,23 @@ | |||
3053 | 1 | // PR c++/47904 | ||
3054 | 2 | |||
3055 | 3 | template <bool> | ||
3056 | 4 | struct S | ||
3057 | 5 | { | ||
3058 | 6 | }; | ||
3059 | 7 | |||
3060 | 8 | template <class T> | ||
3061 | 9 | class U | ||
3062 | 10 | { | ||
3063 | 11 | T t; | ||
3064 | 12 | int foo () const | ||
3065 | 13 | { | ||
3066 | 14 | S <sizeof (t) == 1> s; | ||
3067 | 15 | return 1; | ||
3068 | 16 | } | ||
3069 | 17 | int bar () const | ||
3070 | 18 | { | ||
3071 | 19 | S <sizeof (t) == 1> s; | ||
3072 | 20 | return 1; | ||
3073 | 21 | } | ||
3074 | 22 | }; | ||
3075 | 23 | |||
3076 | 0 | 24 | ||
3077 | === added file 'gcc/testsuite/gcc.c-torture/execute/postmod-1.c' | |||
3078 | --- gcc/testsuite/gcc.c-torture/execute/postmod-1.c 1970-01-01 00:00:00 +0000 | |||
3079 | +++ gcc/testsuite/gcc.c-torture/execute/postmod-1.c 2011-04-06 13:16:33 +0000 | |||
3080 | @@ -0,0 +1,62 @@ | |||
3081 | 1 | #define DECLARE_ARRAY(A) array##A[0x10] | ||
3082 | 2 | #define DECLARE_COUNTER(A) counter##A = 0 | ||
3083 | 3 | #define DECLARE_POINTER(A) *pointer##A = array##A + x | ||
3084 | 4 | /* Create a loop that allows post-modification of pointerA, followed by | ||
3085 | 5 | a use of the post-modified address. */ | ||
3086 | 6 | #define BEFORE(A) counter##A += *pointer##A, pointer##A += 3 | ||
3087 | 7 | #define AFTER(A) counter##A += pointer##A[x] | ||
3088 | 8 | |||
3089 | 9 | /* Set up the arrays so that one iteration of the loop sets the counter | ||
3090 | 10 | to 3.0f. */ | ||
3091 | 11 | #define INIT_ARRAY(A) array##A[1] = 1.0f, array##A[5] = 2.0f | ||
3092 | 12 | |||
3093 | 13 | /* Check that the loop worked correctly for all values. */ | ||
3094 | 14 | #define CHECK_ARRAY(A) exit_code |= (counter##A != 3.0f) | ||
3095 | 15 | |||
3096 | 16 | /* Having 6 copies triggered the bug for ARM and Thumb. */ | ||
3097 | 17 | #define MANY(A) A (0), A (1), A (2), A (3), A (4), A (5) | ||
3098 | 18 | |||
3099 | 19 | /* Each addendA should be allocated a register. */ | ||
3100 | 20 | #define INIT_VOLATILE(A) addend##A = vol | ||
3101 | 21 | #define ADD_VOLATILE(A) vol += addend##A | ||
3102 | 22 | |||
3103 | 23 | /* Having 5 copies triggered the bug for ARM and Thumb. */ | ||
3104 | 24 | #define MANY2(A) A (0), A (1), A (2), A (3), A (4) | ||
3105 | 25 | |||
3106 | 26 | float MANY (DECLARE_ARRAY); | ||
3107 | 27 | float MANY (DECLARE_COUNTER); | ||
3108 | 28 | |||
3109 | 29 | volatile int stop = 1; | ||
3110 | 30 | volatile int vol; | ||
3111 | 31 | |||
3112 | 32 | void __attribute__((noinline)) | ||
3113 | 33 | foo (int x) | ||
3114 | 34 | { | ||
3115 | 35 | float MANY (DECLARE_POINTER); | ||
3116 | 36 | int i; | ||
3117 | 37 | |||
3118 | 38 | do | ||
3119 | 39 | { | ||
3120 | 40 | MANY (BEFORE); | ||
3121 | 41 | MANY (AFTER); | ||
3122 | 42 | /* Create an inner loop that should ensure the code above | ||
3123 | 43 | has registers free for reload inheritance. */ | ||
3124 | 44 | { | ||
3125 | 45 | int MANY2 (INIT_VOLATILE); | ||
3126 | 46 | for (i = 0; i < 10; i++) | ||
3127 | 47 | MANY2 (ADD_VOLATILE); | ||
3128 | 48 | } | ||
3129 | 49 | } | ||
3130 | 50 | while (!stop); | ||
3131 | 51 | } | ||
3132 | 52 | |||
3133 | 53 | int | ||
3134 | 54 | main (void) | ||
3135 | 55 | { | ||
3136 | 56 | int exit_code = 0; | ||
3137 | 57 | |||
3138 | 58 | MANY (INIT_ARRAY); | ||
3139 | 59 | foo (1); | ||
3140 | 60 | MANY (CHECK_ARRAY); | ||
3141 | 61 | return exit_code; | ||
3142 | 62 | } | ||
3143 | 0 | 63 | ||
3144 | === removed file 'gcc/testsuite/gcc.c-torture/execute/postmod-1.c' | |||
3145 | --- gcc/testsuite/gcc.c-torture/execute/postmod-1.c 2011-02-02 14:23:10 +0000 | |||
3146 | +++ gcc/testsuite/gcc.c-torture/execute/postmod-1.c 1970-01-01 00:00:00 +0000 | |||
3147 | @@ -1,62 +0,0 @@ | |||
3148 | 1 | #define DECLARE_ARRAY(A) array##A[0x10] | ||
3149 | 2 | #define DECLARE_COUNTER(A) counter##A = 0 | ||
3150 | 3 | #define DECLARE_POINTER(A) *pointer##A = array##A + x | ||
3151 | 4 | /* Create a loop that allows post-modification of pointerA, followed by | ||
3152 | 5 | a use of the post-modified address. */ | ||
3153 | 6 | #define BEFORE(A) counter##A += *pointer##A, pointer##A += 3 | ||
3154 | 7 | #define AFTER(A) counter##A += pointer##A[x] | ||
3155 | 8 | |||
3156 | 9 | /* Set up the arrays so that one iteration of the loop sets the counter | ||
3157 | 10 | to 3.0f. */ | ||
3158 | 11 | #define INIT_ARRAY(A) array##A[1] = 1.0f, array##A[5] = 2.0f | ||
3159 | 12 | |||
3160 | 13 | /* Check that the loop worked correctly for all values. */ | ||
3161 | 14 | #define CHECK_ARRAY(A) exit_code |= (counter##A != 3.0f) | ||
3162 | 15 | |||
3163 | 16 | /* Having 6 copies triggered the bug for ARM and Thumb. */ | ||
3164 | 17 | #define MANY(A) A (0), A (1), A (2), A (3), A (4), A (5) | ||
3165 | 18 | |||
3166 | 19 | /* Each addendA should be allocated a register. */ | ||
3167 | 20 | #define INIT_VOLATILE(A) addend##A = vol | ||
3168 | 21 | #define ADD_VOLATILE(A) vol += addend##A | ||
3169 | 22 | |||
3170 | 23 | /* Having 5 copies triggered the bug for ARM and Thumb. */ | ||
3171 | 24 | #define MANY2(A) A (0), A (1), A (2), A (3), A (4) | ||
3172 | 25 | |||
3173 | 26 | float MANY (DECLARE_ARRAY); | ||
3174 | 27 | float MANY (DECLARE_COUNTER); | ||
3175 | 28 | |||
3176 | 29 | volatile int stop = 1; | ||
3177 | 30 | volatile int vol; | ||
3178 | 31 | |||
3179 | 32 | void __attribute__((noinline)) | ||
3180 | 33 | foo (int x) | ||
3181 | 34 | { | ||
3182 | 35 | float MANY (DECLARE_POINTER); | ||
3183 | 36 | int i; | ||
3184 | 37 | |||
3185 | 38 | do | ||
3186 | 39 | { | ||
3187 | 40 | MANY (BEFORE); | ||
3188 | 41 | MANY (AFTER); | ||
3189 | 42 | /* Create an inner loop that should ensure the code above | ||
3190 | 43 | has registers free for reload inheritance. */ | ||
3191 | 44 | { | ||
3192 | 45 | int MANY2 (INIT_VOLATILE); | ||
3193 | 46 | for (i = 0; i < 10; i++) | ||
3194 | 47 | MANY2 (ADD_VOLATILE); | ||
3195 | 48 | } | ||
3196 | 49 | } | ||
3197 | 50 | while (!stop); | ||
3198 | 51 | } | ||
3199 | 52 | |||
3200 | 53 | int | ||
3201 | 54 | main (void) | ||
3202 | 55 | { | ||
3203 | 56 | int exit_code = 0; | ||
3204 | 57 | |||
3205 | 58 | MANY (INIT_ARRAY); | ||
3206 | 59 | foo (1); | ||
3207 | 60 | MANY (CHECK_ARRAY); | ||
3208 | 61 | return exit_code; | ||
3209 | 62 | } | ||
3210 | 63 | 0 | ||
3211 | === modified file 'gcc/testsuite/gcc.dg/torture/20090618-1.c' | |||
3212 | --- gcc/testsuite/gcc.dg/torture/20090618-1.c 2009-09-30 02:01:30 +0000 | |||
3213 | +++ gcc/testsuite/gcc.dg/torture/20090618-1.c 2011-04-06 13:16:33 +0000 | |||
3214 | @@ -1,5 +1,6 @@ | |||
3215 | 1 | /* { dg-do run } */ | 1 | /* { dg-do run } */ |
3216 | 2 | /* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */ | 2 | /* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */ |
3217 | 3 | /* { dg-skip-if "PR middle-end/47405" { mips-sgi-irix* } } */ | ||
3218 | 3 | 4 | ||
3219 | 4 | extern void abort (void); | 5 | extern void abort (void); |
3220 | 5 | 6 | ||
3221 | 6 | 7 | ||
3222 | === modified file 'gcc/testsuite/gcc.dg/torture/pr39074-2.c' | |||
3223 | --- gcc/testsuite/gcc.dg/torture/pr39074-2.c 2010-10-13 11:33:51 +0000 | |||
3224 | +++ gcc/testsuite/gcc.dg/torture/pr39074-2.c 2011-04-06 13:16:33 +0000 | |||
3225 | @@ -30,5 +30,5 @@ | |||
3226 | 30 | return 0; | 30 | return 0; |
3227 | 31 | } | 31 | } |
3228 | 32 | 32 | ||
3230 | 33 | /* { dg-final { scan-tree-dump "y.._., points-to non-local, points-to escaped, points-to vars: { i }" "alias" } } */ | 33 | /* { dg-final { scan-tree-dump "y.._., points-to vars: { i }" "alias" } } */ |
3231 | 34 | /* { dg-final { cleanup-tree-dump "alias" } } */ | 34 | /* { dg-final { cleanup-tree-dump "alias" } } */ |
3232 | 35 | 35 | ||
3233 | === added file 'gcc/testsuite/gcc.dg/torture/pr45967-2.c' | |||
3234 | --- gcc/testsuite/gcc.dg/torture/pr45967-2.c 1970-01-01 00:00:00 +0000 | |||
3235 | +++ gcc/testsuite/gcc.dg/torture/pr45967-2.c 2011-04-06 13:16:33 +0000 | |||
3236 | @@ -0,0 +1,24 @@ | |||
3237 | 1 | /* { dg-do run } */ | ||
3238 | 2 | |||
3239 | 3 | extern void abort (void); | ||
3240 | 4 | int b; | ||
3241 | 5 | void | ||
3242 | 6 | foo (void *p_, int *q) | ||
3243 | 7 | { | ||
3244 | 8 | int *p; | ||
3245 | 9 | int i; | ||
3246 | 10 | for (i = 0; i < sizeof(int *); ++i) | ||
3247 | 11 | ((char *)&p)[i] = ((char *)p_)[i]; | ||
3248 | 12 | if (b) | ||
3249 | 13 | p = q; | ||
3250 | 14 | *p = 1; | ||
3251 | 15 | } | ||
3252 | 16 | int main() | ||
3253 | 17 | { | ||
3254 | 18 | int i = 0, j; | ||
3255 | 19 | int *p = &i; | ||
3256 | 20 | foo (&p, &j); | ||
3257 | 21 | if (i != 1) | ||
3258 | 22 | abort (); | ||
3259 | 23 | return 0; | ||
3260 | 24 | } | ||
3261 | 0 | 25 | ||
3262 | === added file 'gcc/testsuite/gcc.dg/torture/pr45967-3.c' | |||
3263 | --- gcc/testsuite/gcc.dg/torture/pr45967-3.c 1970-01-01 00:00:00 +0000 | |||
3264 | +++ gcc/testsuite/gcc.dg/torture/pr45967-3.c 2011-04-06 13:16:33 +0000 | |||
3265 | @@ -0,0 +1,21 @@ | |||
3266 | 1 | /* { dg-do run } */ | ||
3267 | 2 | |||
3268 | 3 | extern void abort (void); | ||
3269 | 4 | void | ||
3270 | 5 | foo (void *p_) | ||
3271 | 6 | { | ||
3272 | 7 | int *p; | ||
3273 | 8 | int i; | ||
3274 | 9 | for (i = 0; i < sizeof(int *); ++i) | ||
3275 | 10 | ((char *)&p)[i] = ((char *)p_)[i]; | ||
3276 | 11 | *p = 1; | ||
3277 | 12 | } | ||
3278 | 13 | int main() | ||
3279 | 14 | { | ||
3280 | 15 | int i = 0; | ||
3281 | 16 | int *p = &i; | ||
3282 | 17 | foo (&p); | ||
3283 | 18 | if (i != 1) | ||
3284 | 19 | abort (); | ||
3285 | 20 | return 0; | ||
3286 | 21 | } | ||
3287 | 0 | 22 | ||
3288 | === added file 'gcc/testsuite/gcc.dg/torture/pr45967.c' | |||
3289 | --- gcc/testsuite/gcc.dg/torture/pr45967.c 1970-01-01 00:00:00 +0000 | |||
3290 | +++ gcc/testsuite/gcc.dg/torture/pr45967.c 2011-04-06 13:16:33 +0000 | |||
3291 | @@ -0,0 +1,21 @@ | |||
3292 | 1 | /* { dg-do run } */ | ||
3293 | 2 | |||
3294 | 3 | extern void abort (void); | ||
3295 | 4 | void __attribute__((noinline,noclone)) | ||
3296 | 5 | foo (void *p_) | ||
3297 | 6 | { | ||
3298 | 7 | int *p; | ||
3299 | 8 | int i; | ||
3300 | 9 | for (i = 0; i < sizeof(int *); ++i) | ||
3301 | 10 | ((char *)&p)[i] = ((char *)p_)[i]; | ||
3302 | 11 | *p = 1; | ||
3303 | 12 | } | ||
3304 | 13 | int main() | ||
3305 | 14 | { | ||
3306 | 15 | int i = 0; | ||
3307 | 16 | int *p = &i; | ||
3308 | 17 | foo (&p); | ||
3309 | 18 | if (i != 1) | ||
3310 | 19 | abort (); | ||
3311 | 20 | return 0; | ||
3312 | 21 | } | ||
3313 | 0 | 22 | ||
3314 | === added file 'gcc/testsuite/gcc.dg/torture/pr46723.c' | |||
3315 | --- gcc/testsuite/gcc.dg/torture/pr46723.c 1970-01-01 00:00:00 +0000 | |||
3316 | +++ gcc/testsuite/gcc.dg/torture/pr46723.c 2011-04-06 13:16:33 +0000 | |||
3317 | @@ -0,0 +1,10 @@ | |||
3318 | 1 | /* { dg-do compile } */ | ||
3319 | 2 | |||
3320 | 3 | short *m; | ||
3321 | 4 | void test() | ||
3322 | 5 | { | ||
3323 | 6 | short x = 128; | ||
3324 | 7 | unsigned int i; | ||
3325 | 8 | for (i = 0; i < 128; ++i, x = (unsigned short)x + 1) | ||
3326 | 9 | m[i] = x; | ||
3327 | 10 | } | ||
3328 | 0 | 11 | ||
3329 | === added file 'gcc/testsuite/gcc.dg/torture/pr47278-1.c' | |||
3330 | --- gcc/testsuite/gcc.dg/torture/pr47278-1.c 1970-01-01 00:00:00 +0000 | |||
3331 | +++ gcc/testsuite/gcc.dg/torture/pr47278-1.c 2011-04-06 13:16:33 +0000 | |||
3332 | @@ -0,0 +1,5 @@ | |||
3333 | 1 | /* { dg-do run } */ | ||
3334 | 2 | /* { dg-require-visibility "" } */ | ||
3335 | 3 | /* { dg-additional-sources "pr47278-2.c" } */ | ||
3336 | 4 | |||
3337 | 5 | int foo (void) { return 1; } | ||
3338 | 0 | 6 | ||
3339 | === added file 'gcc/testsuite/gcc.dg/torture/pr47278-2.c' | |||
3340 | --- gcc/testsuite/gcc.dg/torture/pr47278-2.c 1970-01-01 00:00:00 +0000 | |||
3341 | +++ gcc/testsuite/gcc.dg/torture/pr47278-2.c 2011-04-06 13:16:33 +0000 | |||
3342 | @@ -0,0 +1,15 @@ | |||
3343 | 1 | /* { dg-require-visibility "" } */ | ||
3344 | 2 | |||
3345 | 3 | extern void abort (void); | ||
3346 | 4 | |||
3347 | 5 | int __attribute__((weak,visibility("hidden"))) foo (void) | ||
3348 | 6 | { | ||
3349 | 7 | return 0; | ||
3350 | 8 | } | ||
3351 | 9 | |||
3352 | 10 | int main() | ||
3353 | 11 | { | ||
3354 | 12 | if (foo() != 1) | ||
3355 | 13 | abort (); | ||
3356 | 14 | return 0; | ||
3357 | 15 | } | ||
3358 | 0 | 16 | ||
3359 | === added file 'gcc/testsuite/gcc.dg/torture/pr47890.c' | |||
3360 | --- gcc/testsuite/gcc.dg/torture/pr47890.c 1970-01-01 00:00:00 +0000 | |||
3361 | +++ gcc/testsuite/gcc.dg/torture/pr47890.c 2011-04-06 13:16:33 +0000 | |||
3362 | @@ -0,0 +1,9 @@ | |||
3363 | 1 | /* { dg-do compile } */ | ||
3364 | 2 | |||
3365 | 3 | void f(char *s) | ||
3366 | 4 | { | ||
3367 | 5 | signed short i; | ||
3368 | 6 | |||
3369 | 7 | for (i = 0; i < 19; i = i + 1) | ||
3370 | 8 | s[i] = i; | ||
3371 | 9 | } | ||
3372 | 0 | 10 | ||
3373 | === modified file 'gcc/testsuite/gcc.dg/torture/pta-escape-1.c' | |||
3374 | --- gcc/testsuite/gcc.dg/torture/pta-escape-1.c 2010-05-19 13:48:24 +0000 | |||
3375 | +++ gcc/testsuite/gcc.dg/torture/pta-escape-1.c 2011-04-06 13:16:33 +0000 | |||
3376 | @@ -30,5 +30,5 @@ | |||
3377 | 30 | return 0; | 30 | return 0; |
3378 | 31 | } | 31 | } |
3379 | 32 | 32 | ||
3381 | 33 | /* { dg-final { scan-tree-dump "ESCAPED = { ESCAPED NONLOCAL i }" "alias" } } */ | 33 | /* { dg-final { scan-tree-dump "ESCAPED = {\[^\n\}\]* i \[^\n\}\]*}" "alias" } } */ |
3382 | 34 | /* { dg-final { cleanup-tree-dump "alias" } } */ | 34 | /* { dg-final { cleanup-tree-dump "alias" } } */ |
3383 | 35 | 35 | ||
3384 | === modified file 'gcc/testsuite/gcc.dg/torture/pta-ptrarith-1.c' | |||
3385 | --- gcc/testsuite/gcc.dg/torture/pta-ptrarith-1.c 2008-07-07 14:48:23 +0000 | |||
3386 | +++ gcc/testsuite/gcc.dg/torture/pta-ptrarith-1.c 2011-04-06 13:16:33 +0000 | |||
3387 | @@ -29,5 +29,5 @@ | |||
3388 | 29 | return 0; | 29 | return 0; |
3389 | 30 | } | 30 | } |
3390 | 31 | 31 | ||
3392 | 32 | /* { dg-final { scan-tree-dump "ESCAPED = { ESCAPED NONLOCAL f .* i }" "alias" } } */ | 32 | /* { dg-final { scan-tree-dump "ESCAPED = {\[^\n\}\]* i f \[^\n\}\]*}" "alias" } } */ |
3393 | 33 | /* { dg-final { cleanup-tree-dump "alias" } } */ | 33 | /* { dg-final { cleanup-tree-dump "alias" } } */ |
3394 | 34 | 34 | ||
3395 | === modified file 'gcc/testsuite/gcc.dg/tree-ssa/pta-callused.c' | |||
3396 | --- gcc/testsuite/gcc.dg/tree-ssa/pta-callused.c 2010-10-13 11:33:51 +0000 | |||
3397 | +++ gcc/testsuite/gcc.dg/tree-ssa/pta-callused.c 2011-04-06 13:16:33 +0000 | |||
3398 | @@ -22,6 +22,6 @@ | |||
3399 | 22 | return *foo (&q); | 22 | return *foo (&q); |
3400 | 23 | } | 23 | } |
3401 | 24 | 24 | ||
3403 | 25 | /* { dg-final { scan-tree-dump "CALLUSED = { f.* i q }" "alias" } } */ | 25 | /* { dg-final { scan-tree-dump "CALLUSED = { ESCAPED NONLOCAL f.* i q }" "alias" } } */ |
3404 | 26 | /* { dg-final { cleanup-tree-dump "alias" } } */ | 26 | /* { dg-final { cleanup-tree-dump "alias" } } */ |
3405 | 27 | 27 | ||
3406 | 28 | 28 | ||
3407 | === modified file 'gcc/testsuite/gcc.dg/tree-ssa/pta-escape-1.c' | |||
3408 | --- gcc/testsuite/gcc.dg/tree-ssa/pta-escape-1.c 2010-05-19 13:48:24 +0000 | |||
3409 | +++ gcc/testsuite/gcc.dg/tree-ssa/pta-escape-1.c 2011-04-06 13:16:33 +0000 | |||
3410 | @@ -33,5 +33,5 @@ | |||
3411 | 33 | return 0; | 33 | return 0; |
3412 | 34 | } | 34 | } |
3413 | 35 | 35 | ||
3415 | 36 | /* { dg-final { scan-tree-dump "ESCAPED, points-to non-local, points-to vars: { x }" "alias" } } */ | 36 | /* { dg-final { scan-tree-dump "ESCAPED, points-to non-local, points-to NULL, points-to vars: { x }" "alias" } } */ |
3416 | 37 | /* { dg-final { cleanup-tree-dump "alias" } } */ | 37 | /* { dg-final { cleanup-tree-dump "alias" } } */ |
3417 | 38 | 38 | ||
3418 | === modified file 'gcc/testsuite/gcc.dg/tree-ssa/pta-escape-2.c' | |||
3419 | --- gcc/testsuite/gcc.dg/tree-ssa/pta-escape-2.c 2010-05-19 13:48:24 +0000 | |||
3420 | +++ gcc/testsuite/gcc.dg/tree-ssa/pta-escape-2.c 2011-04-06 13:16:33 +0000 | |||
3421 | @@ -34,5 +34,5 @@ | |||
3422 | 34 | return 0; | 34 | return 0; |
3423 | 35 | } | 35 | } |
3424 | 36 | 36 | ||
3426 | 37 | /* { dg-final { scan-tree-dump "ESCAPED, points-to non-local, points-to vars: { x }" "alias" } } */ | 37 | /* { dg-final { scan-tree-dump "ESCAPED, points-to non-local, points-to NULL, points-to vars: { x }" "alias" } } */ |
3427 | 38 | /* { dg-final { cleanup-tree-dump "alias" } } */ | 38 | /* { dg-final { cleanup-tree-dump "alias" } } */ |
3428 | 39 | 39 | ||
3429 | === modified file 'gcc/testsuite/gcc.dg/tree-ssa/pta-escape-3.c' | |||
3430 | --- gcc/testsuite/gcc.dg/tree-ssa/pta-escape-3.c 2010-05-19 13:48:24 +0000 | |||
3431 | +++ gcc/testsuite/gcc.dg/tree-ssa/pta-escape-3.c 2011-04-06 13:16:33 +0000 | |||
3432 | @@ -38,5 +38,5 @@ | |||
3433 | 38 | return 0; | 38 | return 0; |
3434 | 39 | } | 39 | } |
3435 | 40 | 40 | ||
3437 | 41 | /* { dg-final { scan-tree-dump "ESCAPED, points-to non-local, points-to vars: { x }" "alias" } } */ | 41 | /* { dg-final { scan-tree-dump "ESCAPED, points-to non-local, points-to NULL, points-to vars: { x }" "alias" } } */ |
3438 | 42 | /* { dg-final { cleanup-tree-dump "alias" } } */ | 42 | /* { dg-final { cleanup-tree-dump "alias" } } */ |
3439 | 43 | 43 | ||
3440 | === modified file 'gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-21.c' | |||
3441 | --- gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-21.c 2008-10-04 13:19:48 +0000 | |||
3442 | +++ gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-21.c 2011-04-06 13:16:33 +0000 | |||
3443 | @@ -11,5 +11,5 @@ | |||
3444 | 11 | 11 | ||
3445 | 12 | /* There should be only two loads left. */ | 12 | /* There should be only two loads left. */ |
3446 | 13 | 13 | ||
3448 | 14 | /* { dg-final { scan-tree-dump-times "= \\\*D" 2 "pre" } } */ | 14 | /* { dg-final { scan-tree-dump-times "= \\\*D\[^\n;\]*;" 2 "pre" } } */ |
3449 | 15 | /* { dg-final { cleanup-tree-dump "pre" } } */ | 15 | /* { dg-final { cleanup-tree-dump "pre" } } */ |
3450 | 16 | 16 | ||
3451 | === added file 'gcc/testsuite/gcc.target/arm/neon-vld-1.c' | |||
3452 | --- gcc/testsuite/gcc.target/arm/neon-vld-1.c 1970-01-01 00:00:00 +0000 | |||
3453 | +++ gcc/testsuite/gcc.target/arm/neon-vld-1.c 2011-04-06 13:16:33 +0000 | |||
3454 | @@ -0,0 +1,13 @@ | |||
3455 | 1 | /* { dg-do compile } */ | ||
3456 | 2 | /* { dg-require-effective-target arm_neon_ok } */ | ||
3457 | 3 | /* { dg-options "-O1" } */ | ||
3458 | 4 | /* { dg-add-options arm_neon } */ | ||
3459 | 5 | |||
3460 | 6 | #include <arm_neon.h> | ||
3461 | 7 | |||
3462 | 8 | uint8x16_t | ||
3463 | 9 | foo (uint8_t *a, uint8x16_t b) | ||
3464 | 10 | { | ||
3465 | 11 | vst1q_lane_u8 (a, b, 14); | ||
3466 | 12 | return vld1q_lane_u8 (a + 0x100, b, 15); | ||
3467 | 13 | } | ||
3468 | 0 | 14 | ||
3469 | === removed file 'gcc/testsuite/gcc.target/arm/neon-vld-1.c' | |||
3470 | --- gcc/testsuite/gcc.target/arm/neon-vld-1.c 2011-02-02 13:57:54 +0000 | |||
3471 | +++ gcc/testsuite/gcc.target/arm/neon-vld-1.c 1970-01-01 00:00:00 +0000 | |||
3472 | @@ -1,13 +0,0 @@ | |||
3473 | 1 | /* { dg-do compile } */ | ||
3474 | 2 | /* { dg-require-effective-target arm_neon_ok } */ | ||
3475 | 3 | /* { dg-options "-O1" } */ | ||
3476 | 4 | /* { dg-add-options arm_neon } */ | ||
3477 | 5 | |||
3478 | 6 | #include <arm_neon.h> | ||
3479 | 7 | |||
3480 | 8 | uint8x16_t | ||
3481 | 9 | foo (uint8_t *a, uint8x16_t b) | ||
3482 | 10 | { | ||
3483 | 11 | vst1q_lane_u8 (a, b, 14); | ||
3484 | 12 | return vld1q_lane_u8 (a + 0x100, b, 15); | ||
3485 | 13 | } | ||
3486 | 14 | 0 | ||
3487 | === added file 'gcc/testsuite/gcc.target/powerpc/pr47862.c' | |||
3488 | --- gcc/testsuite/gcc.target/powerpc/pr47862.c 1970-01-01 00:00:00 +0000 | |||
3489 | +++ gcc/testsuite/gcc.target/powerpc/pr47862.c 2011-04-06 13:16:33 +0000 | |||
3490 | @@ -0,0 +1,19 @@ | |||
3491 | 1 | /* { dg-do compile { target { powerpc*-*-* } } } */ | ||
3492 | 2 | /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ | ||
3493 | 3 | /* { dg-require-effective-target powerpc_vsx_ok } */ | ||
3494 | 4 | /* { dg-options "-O2 -mcpu=power7" } */ | ||
3495 | 5 | /* { dg-final { scan-assembler-not "stfd" } } */ | ||
3496 | 6 | |||
3497 | 7 | /* PR 47862: Verify caller-save spill of vectors in FP regs do not use | ||
3498 | 8 | legacy FP insns, which spill only half the vector. */ | ||
3499 | 9 | extern vector double dd[15]; | ||
3500 | 10 | |||
3501 | 11 | vector double foo() { | ||
3502 | 12 | vector double a,b,c,d,e,f,g,h,i,j,k,l,m,n; | ||
3503 | 13 | |||
3504 | 14 | a=dd[1]; b=dd[2]; c=dd[3]; d=dd[4]; e=dd[5]; f=dd[6]; g=dd[7]; h=dd[8]; i=dd[9]; | ||
3505 | 15 | j=dd[10]; k=dd[11]; l=dd[12]; m=dd[13]; n=dd[14]; | ||
3506 | 16 | bar(); | ||
3507 | 17 | return (a+b+c+d+e+f+g+h+i+j+k+l+m+n); | ||
3508 | 18 | } | ||
3509 | 19 | |||
3510 | 0 | 20 | ||
3511 | === added file 'gcc/testsuite/gcc.target/powerpc/pr48192.c' | |||
3512 | --- gcc/testsuite/gcc.target/powerpc/pr48192.c 1970-01-01 00:00:00 +0000 | |||
3513 | +++ gcc/testsuite/gcc.target/powerpc/pr48192.c 2011-04-06 13:16:33 +0000 | |||
3514 | @@ -0,0 +1,49 @@ | |||
3515 | 1 | /* { dg-do compile } */ | ||
3516 | 2 | /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ | ||
3517 | 3 | /* { dg-require-effective-target powerpc_vsx_ok } */ | ||
3518 | 4 | /* { dg-options "-O3 -mcpu=power7 -std=gnu89" } */ | ||
3519 | 5 | |||
3520 | 6 | /* Make sure that the conditional macros vector, bool, and pixel are not | ||
3521 | 7 | considered as being defined. */ | ||
3522 | 8 | |||
3523 | 9 | #ifdef bool | ||
3524 | 10 | #error "bool is considered defined" | ||
3525 | 11 | #endif | ||
3526 | 12 | |||
3527 | 13 | #ifdef vector | ||
3528 | 14 | #error "vector is considered defined" | ||
3529 | 15 | #endif | ||
3530 | 16 | |||
3531 | 17 | #ifdef pixel | ||
3532 | 18 | #error "pixel is condsidered defined" | ||
3533 | 19 | #endif | ||
3534 | 20 | |||
3535 | 21 | #if defined(bool) | ||
3536 | 22 | #error "bool is considered defined" | ||
3537 | 23 | #endif | ||
3538 | 24 | |||
3539 | 25 | #if defined(vector) | ||
3540 | 26 | #error "vector is considered defined" | ||
3541 | 27 | #endif | ||
3542 | 28 | |||
3543 | 29 | #if defined(pixel) | ||
3544 | 30 | #error "pixel is condsidered defined" | ||
3545 | 31 | #endif | ||
3546 | 32 | |||
3547 | 33 | #ifndef bool | ||
3548 | 34 | #else | ||
3549 | 35 | #error "bool is considered defined" | ||
3550 | 36 | #endif | ||
3551 | 37 | |||
3552 | 38 | #ifndef vector | ||
3553 | 39 | #else | ||
3554 | 40 | #error "vector is considered defined" | ||
3555 | 41 | #endif | ||
3556 | 42 | |||
3557 | 43 | #ifndef pixel | ||
3558 | 44 | #else | ||
3559 | 45 | #error "pixel is condsidered defined" | ||
3560 | 46 | #endif | ||
3561 | 47 | |||
3562 | 48 | #define bool long double | ||
3563 | 49 | bool pixel = 0; | ||
3564 | 0 | 50 | ||
3565 | === added file 'gcc/testsuite/gfortran.dg/array_constructor_36.f90' | |||
3566 | --- gcc/testsuite/gfortran.dg/array_constructor_36.f90 1970-01-01 00:00:00 +0000 | |||
3567 | +++ gcc/testsuite/gfortran.dg/array_constructor_36.f90 2011-04-06 13:16:33 +0000 | |||
3568 | @@ -0,0 +1,21 @@ | |||
3569 | 1 | ! { dg-do run } | ||
3570 | 2 | ! Test the fix for PR47348, in which the substring length | ||
3571 | 3 | ! in the array constructor at line 19 would be missed and | ||
3572 | 4 | ! the length of q used instead. | ||
3573 | 5 | ! | ||
3574 | 6 | ! Contributed by Thomas Koenig <tkoenig@netcologne.de> | ||
3575 | 7 | ! | ||
3576 | 8 | program main | ||
3577 | 9 | implicit none | ||
3578 | 10 | character(len = *), parameter :: fmt='(2(A,"|"))' | ||
3579 | 11 | character(len = *), parameter :: test='xyc|aec|' | ||
3580 | 12 | integer :: i | ||
3581 | 13 | character(len = 4) :: q | ||
3582 | 14 | character(len = 8) :: buffer | ||
3583 | 15 | q = 'xy' | ||
3584 | 16 | i = 2 | ||
3585 | 17 | write (buffer, fmt) (/ trim(q), 'ae' /)//'c' | ||
3586 | 18 | if (buffer .ne. test) Call abort | ||
3587 | 19 | write (buffer, FMT) (/ q(1:i), 'ae' /)//'c' | ||
3588 | 20 | if (buffer .ne. test) Call abort | ||
3589 | 21 | end program main | ||
3590 | 0 | 22 | ||
3591 | === modified file 'gcc/testsuite/gfortran.dg/g77/cabs.f' | |||
3592 | --- gcc/testsuite/gfortran.dg/g77/cabs.f 2005-12-17 15:41:15 +0000 | |||
3593 | +++ gcc/testsuite/gfortran.dg/g77/cabs.f 2011-04-06 13:16:33 +0000 | |||
3594 | @@ -1,4 +1,5 @@ | |||
3596 | 1 | c { dg-do run { xfail mips-sgi-irix6* } } PR 16292 | 1 | c { dg-do run } |
3597 | 2 | c { dg-xfail-run-if "PR target/16292" { mips-sgi-irix6* } { -O0 } { -mabi=32 } } | ||
3598 | 2 | program cabs_1 | 3 | program cabs_1 |
3599 | 3 | complex z0 | 4 | complex z0 |
3600 | 4 | real r0 | 5 | real r0 |
3601 | 5 | 6 | ||
3602 | === added file 'gcc/testsuite/gfortran.dg/intrinsic_ifunction_2.f90' | |||
3603 | --- gcc/testsuite/gfortran.dg/intrinsic_ifunction_2.f90 1970-01-01 00:00:00 +0000 | |||
3604 | +++ gcc/testsuite/gfortran.dg/intrinsic_ifunction_2.f90 2011-04-06 13:16:33 +0000 | |||
3605 | @@ -0,0 +1,8 @@ | |||
3606 | 1 | ! { dg-do run } | ||
3607 | 2 | ! PR 48066 - this used to segfault. | ||
3608 | 3 | program p | ||
3609 | 4 | real(8) :: empty(0, 3), square(0) | ||
3610 | 5 | logical :: lempty(0, 3), lsquare(0) | ||
3611 | 6 | square = sum(empty * empty, 2) | ||
3612 | 7 | lsquare = any(lempty .and. lempty, 2) | ||
3613 | 8 | end | ||
3614 | 0 | 9 | ||
3615 | === added file 'gcc/testsuite/gfortran.dg/namelist_71.f90' | |||
3616 | --- gcc/testsuite/gfortran.dg/namelist_71.f90 1970-01-01 00:00:00 +0000 | |||
3617 | +++ gcc/testsuite/gfortran.dg/namelist_71.f90 2011-04-06 13:16:33 +0000 | |||
3618 | @@ -0,0 +1,36 @@ | |||
3619 | 1 | ! { dg-do run } | ||
3620 | 2 | ! PR47778 Reading array of structures from namelist | ||
3621 | 3 | ! Test case derived from the reporters test case. | ||
3622 | 4 | program test_nml | ||
3623 | 5 | type field_descr | ||
3624 | 6 | integer number | ||
3625 | 7 | end type | ||
3626 | 8 | type fsetup | ||
3627 | 9 | type (field_descr), dimension(3) :: vel ! 3 velocity components | ||
3628 | 10 | type (field_descr), dimension(3) :: scal ! 3 scalars | ||
3629 | 11 | end type | ||
3630 | 12 | type (fsetup) field_setup | ||
3631 | 13 | namelist /nl_setup/ field_setup | ||
3632 | 14 | field_setup%vel%number = 0 | ||
3633 | 15 | field_setup%scal%number = 0 | ||
3634 | 16 | ! write(*,nml=nl_setup) | ||
3635 | 17 | open(10, status="scratch") | ||
3636 | 18 | write(10,'(a)') "&nl_setup" | ||
3637 | 19 | write(10,'(a)') " field_setup%vel(1)%number= 3," | ||
3638 | 20 | write(10,'(a)') " field_setup%vel(2)%number= 9," | ||
3639 | 21 | write(10,'(a)') " field_setup%vel(3)%number= 27," | ||
3640 | 22 | write(10,'(a)') " field_setup%scal(1)%number= 2," | ||
3641 | 23 | write(10,'(a)') " field_setup%scal(2)%number= 4," | ||
3642 | 24 | write(10,'(a)') " field_setup%scal(3)%number= 8," | ||
3643 | 25 | write(10,'(a)') "/" | ||
3644 | 26 | rewind(10) | ||
3645 | 27 | read(10,nml=nl_setup) | ||
3646 | 28 | if (field_setup%vel(1)%number .ne. 3) call abort | ||
3647 | 29 | if (field_setup%vel(2)%number .ne. 9) call abort | ||
3648 | 30 | if (field_setup%vel(3)%number .ne. 27) call abort | ||
3649 | 31 | if (field_setup%scal(1)%number .ne. 2) call abort | ||
3650 | 32 | if (field_setup%scal(2)%number .ne. 4) call abort | ||
3651 | 33 | if (field_setup%scal(3)%number .ne. 8) call abort | ||
3652 | 34 | !write(*,nml=nl_setup) | ||
3653 | 35 | end program test_nml | ||
3654 | 36 | |||
3655 | 0 | 37 | ||
3656 | === added file 'gcc/testsuite/gfortran.dg/pr47878.f90' | |||
3657 | --- gcc/testsuite/gfortran.dg/pr47878.f90 1970-01-01 00:00:00 +0000 | |||
3658 | +++ gcc/testsuite/gfortran.dg/pr47878.f90 2011-04-06 13:16:33 +0000 | |||
3659 | @@ -0,0 +1,10 @@ | |||
3660 | 1 | ! PR fortran/47878 | ||
3661 | 2 | ! { dg-do run } | ||
3662 | 3 | integer :: a(5) | ||
3663 | 4 | open (99, recl = 40) | ||
3664 | 5 | write (99, '(5i3)') 1, 2, 3 | ||
3665 | 6 | rewind (99) | ||
3666 | 7 | read (99, '(5i3)') a | ||
3667 | 8 | if (any (a.ne.(/1, 2, 3, 0, 0/))) call abort | ||
3668 | 9 | close (99, status = 'delete') | ||
3669 | 10 | end | ||
3670 | 0 | 11 | ||
3671 | === modified file 'gcc/tree-inline.c' | |||
3672 | --- gcc/tree-inline.c 2010-10-04 00:50:43 +0000 | |||
3673 | +++ gcc/tree-inline.c 2011-04-06 13:16:33 +0000 | |||
3674 | @@ -3068,7 +3068,7 @@ | |||
3675 | 3068 | /* Don't auto-inline anything that might not be bound within | 3068 | /* Don't auto-inline anything that might not be bound within |
3676 | 3069 | this unit of translation. */ | 3069 | this unit of translation. */ |
3677 | 3070 | else if (!DECL_DECLARED_INLINE_P (fn) | 3070 | else if (!DECL_DECLARED_INLINE_P (fn) |
3679 | 3071 | && DECL_REPLACEABLE_P (fn)) | 3071 | && decl_replaceable_p (fn)) |
3680 | 3072 | inlinable = false; | 3072 | inlinable = false; |
3681 | 3073 | 3073 | ||
3682 | 3074 | else if (!function_attribute_inlinable_p (fn)) | 3074 | else if (!function_attribute_inlinable_p (fn)) |
3683 | 3075 | 3075 | ||
3684 | === modified file 'gcc/tree-ssa-pre.c' | |||
3685 | --- gcc/tree-ssa-pre.c 2011-01-21 14:05:00 +0000 | |||
3686 | +++ gcc/tree-ssa-pre.c 2011-04-06 13:16:33 +0000 | |||
3687 | @@ -4759,7 +4759,7 @@ | |||
3688 | 4759 | if (!do_fre) | 4759 | if (!do_fre) |
3689 | 4760 | loop_optimizer_init (LOOPS_NORMAL); | 4760 | loop_optimizer_init (LOOPS_NORMAL); |
3690 | 4761 | 4761 | ||
3692 | 4762 | if (!run_scc_vn (do_fre)) | 4762 | if (!run_scc_vn (do_fre, do_fre ? VN_WALKREWRITE : VN_WALK)) |
3693 | 4763 | { | 4763 | { |
3694 | 4764 | if (!do_fre) | 4764 | if (!do_fre) |
3695 | 4765 | { | 4765 | { |
3696 | 4766 | 4766 | ||
3697 | === modified file 'gcc/tree-ssa-sccvn.c' | |||
3698 | --- gcc/tree-ssa-sccvn.c 2011-02-22 11:38:56 +0000 | |||
3699 | +++ gcc/tree-ssa-sccvn.c 2011-04-06 13:16:33 +0000 | |||
3700 | @@ -989,6 +989,7 @@ | |||
3701 | 989 | 989 | ||
3702 | 990 | static tree *last_vuse_ptr; | 990 | static tree *last_vuse_ptr; |
3703 | 991 | static vn_lookup_kind vn_walk_kind; | 991 | static vn_lookup_kind vn_walk_kind; |
3704 | 992 | static vn_lookup_kind default_vn_walk_kind; | ||
3705 | 992 | 993 | ||
3706 | 993 | /* Callback for walk_non_aliased_vuses. Adjusts the vn_reference_t VR_ | 994 | /* Callback for walk_non_aliased_vuses. Adjusts the vn_reference_t VR_ |
3707 | 994 | with the current VUSE and performs the expression lookup. */ | 995 | with the current VUSE and performs the expression lookup. */ |
3708 | @@ -1987,14 +1988,15 @@ | |||
3709 | 1987 | 1988 | ||
3710 | 1988 | last_vuse = gimple_vuse (stmt); | 1989 | last_vuse = gimple_vuse (stmt); |
3711 | 1989 | last_vuse_ptr = &last_vuse; | 1990 | last_vuse_ptr = &last_vuse; |
3713 | 1990 | result = vn_reference_lookup (op, gimple_vuse (stmt), VN_WALKREWRITE, NULL); | 1991 | result = vn_reference_lookup (op, gimple_vuse (stmt), |
3714 | 1992 | default_vn_walk_kind, NULL); | ||
3715 | 1991 | last_vuse_ptr = NULL; | 1993 | last_vuse_ptr = NULL; |
3716 | 1992 | 1994 | ||
3717 | 1993 | /* If we have a VCE, try looking up its operand as it might be stored in | 1995 | /* If we have a VCE, try looking up its operand as it might be stored in |
3718 | 1994 | a different type. */ | 1996 | a different type. */ |
3719 | 1995 | if (!result && TREE_CODE (op) == VIEW_CONVERT_EXPR) | 1997 | if (!result && TREE_CODE (op) == VIEW_CONVERT_EXPR) |
3720 | 1996 | result = vn_reference_lookup (TREE_OPERAND (op, 0), gimple_vuse (stmt), | 1998 | result = vn_reference_lookup (TREE_OPERAND (op, 0), gimple_vuse (stmt), |
3722 | 1997 | VN_WALKREWRITE, NULL); | 1999 | default_vn_walk_kind, NULL); |
3723 | 1998 | 2000 | ||
3724 | 1999 | /* We handle type-punning through unions by value-numbering based | 2001 | /* We handle type-punning through unions by value-numbering based |
3725 | 2000 | on offset and size of the access. Be prepared to handle a | 2002 | on offset and size of the access. Be prepared to handle a |
3726 | @@ -3197,16 +3199,18 @@ | |||
3727 | 3197 | } | 3199 | } |
3728 | 3198 | 3200 | ||
3729 | 3199 | /* Do SCCVN. Returns true if it finished, false if we bailed out | 3201 | /* Do SCCVN. Returns true if it finished, false if we bailed out |
3731 | 3200 | due to resource constraints. */ | 3202 | due to resource constraints. DEFAULT_VN_WALK_KIND_ specifies |
3732 | 3203 | how we use the alias oracle walking during the VN process. */ | ||
3733 | 3201 | 3204 | ||
3734 | 3202 | bool | 3205 | bool |
3736 | 3203 | run_scc_vn (bool may_insert_arg) | 3206 | run_scc_vn (bool may_insert_arg, vn_lookup_kind default_vn_walk_kind_) |
3737 | 3204 | { | 3207 | { |
3738 | 3205 | size_t i; | 3208 | size_t i; |
3739 | 3206 | tree param; | 3209 | tree param; |
3740 | 3207 | bool changed = true; | 3210 | bool changed = true; |
3741 | 3208 | 3211 | ||
3742 | 3209 | may_insert = may_insert_arg; | 3212 | may_insert = may_insert_arg; |
3743 | 3213 | default_vn_walk_kind = default_vn_walk_kind_; | ||
3744 | 3210 | 3214 | ||
3745 | 3211 | init_scc_vn (); | 3215 | init_scc_vn (); |
3746 | 3212 | current_info = valid_info; | 3216 | current_info = valid_info; |
3747 | 3213 | 3217 | ||
3748 | === modified file 'gcc/tree-ssa-sccvn.h' | |||
3749 | --- gcc/tree-ssa-sccvn.h 2011-01-21 14:05:00 +0000 | |||
3750 | +++ gcc/tree-ssa-sccvn.h 2011-04-06 13:16:33 +0000 | |||
3751 | @@ -163,11 +163,13 @@ | |||
3752 | 163 | unsigned needs_insertion : 1; | 163 | unsigned needs_insertion : 1; |
3753 | 164 | } *vn_ssa_aux_t; | 164 | } *vn_ssa_aux_t; |
3754 | 165 | 165 | ||
3755 | 166 | typedef enum { VN_NOWALK, VN_WALK, VN_WALKREWRITE } vn_lookup_kind; | ||
3756 | 167 | |||
3757 | 166 | /* Return the value numbering info for an SSA_NAME. */ | 168 | /* Return the value numbering info for an SSA_NAME. */ |
3758 | 167 | extern vn_ssa_aux_t VN_INFO (tree); | 169 | extern vn_ssa_aux_t VN_INFO (tree); |
3759 | 168 | extern vn_ssa_aux_t VN_INFO_GET (tree); | 170 | extern vn_ssa_aux_t VN_INFO_GET (tree); |
3760 | 169 | tree vn_get_expr_for (tree); | 171 | tree vn_get_expr_for (tree); |
3762 | 170 | bool run_scc_vn (bool); | 172 | bool run_scc_vn (bool, vn_lookup_kind); |
3763 | 171 | void free_scc_vn (void); | 173 | void free_scc_vn (void); |
3764 | 172 | tree vn_nary_op_lookup (tree, vn_nary_op_t *); | 174 | tree vn_nary_op_lookup (tree, vn_nary_op_t *); |
3765 | 173 | tree vn_nary_op_lookup_stmt (gimple, vn_nary_op_t *); | 175 | tree vn_nary_op_lookup_stmt (gimple, vn_nary_op_t *); |
3766 | @@ -185,7 +187,6 @@ | |||
3767 | 185 | void copy_reference_ops_from_call (gimple, VEC(vn_reference_op_s, heap) **); | 187 | void copy_reference_ops_from_call (gimple, VEC(vn_reference_op_s, heap) **); |
3768 | 186 | bool ao_ref_init_from_vn_reference (ao_ref *, alias_set_type, tree, | 188 | bool ao_ref_init_from_vn_reference (ao_ref *, alias_set_type, tree, |
3769 | 187 | VEC (vn_reference_op_s, heap) *); | 189 | VEC (vn_reference_op_s, heap) *); |
3770 | 188 | typedef enum { VN_NOWALK, VN_WALK, VN_WALKREWRITE } vn_lookup_kind; | ||
3771 | 189 | tree vn_reference_lookup_pieces (tree, alias_set_type, tree, | 190 | tree vn_reference_lookup_pieces (tree, alias_set_type, tree, |
3772 | 190 | VEC (vn_reference_op_s, heap) *, | 191 | VEC (vn_reference_op_s, heap) *, |
3773 | 191 | vn_reference_t *, vn_lookup_kind); | 192 | vn_reference_t *, vn_lookup_kind); |
3774 | 192 | 193 | ||
3775 | === modified file 'gcc/tree-ssa-structalias.c' | |||
3776 | --- gcc/tree-ssa-structalias.c 2011-02-01 11:27:04 +0000 | |||
3777 | +++ gcc/tree-ssa-structalias.c 2011-04-06 13:16:33 +0000 | |||
3778 | @@ -2788,33 +2788,6 @@ | |||
3779 | 2788 | } | 2788 | } |
3780 | 2789 | } | 2789 | } |
3781 | 2790 | 2790 | ||
3782 | 2791 | /* Return true if T is a type that could contain pointers. */ | ||
3783 | 2792 | |||
3784 | 2793 | static bool | ||
3785 | 2794 | type_could_have_pointers (tree type) | ||
3786 | 2795 | { | ||
3787 | 2796 | if (POINTER_TYPE_P (type)) | ||
3788 | 2797 | return true; | ||
3789 | 2798 | |||
3790 | 2799 | if (TREE_CODE (type) == ARRAY_TYPE) | ||
3791 | 2800 | return type_could_have_pointers (TREE_TYPE (type)); | ||
3792 | 2801 | |||
3793 | 2802 | return AGGREGATE_TYPE_P (type); | ||
3794 | 2803 | } | ||
3795 | 2804 | |||
3796 | 2805 | /* Return true if T is a variable of a type that could contain | ||
3797 | 2806 | pointers. */ | ||
3798 | 2807 | |||
3799 | 2808 | static bool | ||
3800 | 2809 | could_have_pointers (tree t) | ||
3801 | 2810 | { | ||
3802 | 2811 | return (((TREE_CODE (t) == VAR_DECL | ||
3803 | 2812 | || TREE_CODE (t) == PARM_DECL | ||
3804 | 2813 | || TREE_CODE (t) == RESULT_DECL) | ||
3805 | 2814 | && (TREE_PUBLIC (t) || DECL_EXTERNAL (t) || TREE_ADDRESSABLE (t))) | ||
3806 | 2815 | || type_could_have_pointers (TREE_TYPE (t))); | ||
3807 | 2816 | } | ||
3808 | 2817 | |||
3809 | 2818 | /* Return the position, in bits, of FIELD_DECL from the beginning of its | 2791 | /* Return the position, in bits, of FIELD_DECL from the beginning of its |
3810 | 2819 | structure. */ | 2792 | structure. */ |
3811 | 2820 | 2793 | ||
3812 | @@ -2826,7 +2799,7 @@ | |||
3813 | 2826 | || !host_integerp (DECL_FIELD_BIT_OFFSET (fdecl), 0)) | 2799 | || !host_integerp (DECL_FIELD_BIT_OFFSET (fdecl), 0)) |
3814 | 2827 | return -1; | 2800 | return -1; |
3815 | 2828 | 2801 | ||
3817 | 2829 | return (TREE_INT_CST_LOW (DECL_FIELD_OFFSET (fdecl)) * 8 | 2802 | return (TREE_INT_CST_LOW (DECL_FIELD_OFFSET (fdecl)) * BITS_PER_UNIT |
3818 | 2830 | + TREE_INT_CST_LOW (DECL_FIELD_BIT_OFFSET (fdecl))); | 2803 | + TREE_INT_CST_LOW (DECL_FIELD_BIT_OFFSET (fdecl))); |
3819 | 2831 | } | 2804 | } |
3820 | 2832 | 2805 | ||
3821 | @@ -3167,14 +3140,18 @@ | |||
3822 | 3167 | in that case *NULL does not fail, so it _should_ alias *anything. | 3140 | in that case *NULL does not fail, so it _should_ alias *anything. |
3823 | 3168 | It is not worth adding a new option or renaming the existing one, | 3141 | It is not worth adding a new option or renaming the existing one, |
3824 | 3169 | since this case is relatively obscure. */ | 3142 | since this case is relatively obscure. */ |
3831 | 3170 | if (flag_delete_null_pointer_checks | 3143 | if ((TREE_CODE (t) == INTEGER_CST |
3832 | 3171 | && ((TREE_CODE (t) == INTEGER_CST | 3144 | && integer_zerop (t)) |
3833 | 3172 | && integer_zerop (t)) | 3145 | /* The only valid CONSTRUCTORs in gimple with pointer typed |
3834 | 3173 | /* The only valid CONSTRUCTORs in gimple with pointer typed | 3146 | elements are zero-initializer. But in IPA mode we also |
3835 | 3174 | elements are zero-initializer. */ | 3147 | process global initializers, so verify at least. */ |
3836 | 3175 | || TREE_CODE (t) == CONSTRUCTOR)) | 3148 | || (TREE_CODE (t) == CONSTRUCTOR |
3837 | 3149 | && CONSTRUCTOR_NELTS (t) == 0)) | ||
3838 | 3176 | { | 3150 | { |
3840 | 3177 | temp.var = nothing_id; | 3151 | if (flag_delete_null_pointer_checks) |
3841 | 3152 | temp.var = nothing_id; | ||
3842 | 3153 | else | ||
3843 | 3154 | temp.var = nonlocal_id; | ||
3844 | 3178 | temp.type = ADDRESSOF; | 3155 | temp.type = ADDRESSOF; |
3845 | 3179 | temp.offset = 0; | 3156 | temp.offset = 0; |
3846 | 3180 | VEC_safe_push (ce_s, heap, *results, &temp); | 3157 | VEC_safe_push (ce_s, heap, *results, &temp); |
3847 | @@ -3247,6 +3224,15 @@ | |||
3848 | 3247 | get_constraint_for_ssa_var (t, results, address_p); | 3224 | get_constraint_for_ssa_var (t, results, address_p); |
3849 | 3248 | return; | 3225 | return; |
3850 | 3249 | } | 3226 | } |
3851 | 3227 | case tcc_constant: | ||
3852 | 3228 | { | ||
3853 | 3229 | /* We cannot refer to automatic variables through constants. */ | ||
3854 | 3230 | temp.type = ADDRESSOF; | ||
3855 | 3231 | temp.var = nonlocal_id; | ||
3856 | 3232 | temp.offset = 0; | ||
3857 | 3233 | VEC_safe_push (ce_s, heap, *results, &temp); | ||
3858 | 3234 | return; | ||
3859 | 3235 | } | ||
3860 | 3250 | default:; | 3236 | default:; |
3861 | 3251 | } | 3237 | } |
3862 | 3252 | 3238 | ||
3863 | @@ -3502,8 +3488,7 @@ | |||
3864 | 3502 | 3488 | ||
3865 | 3503 | /* Find those pointers being passed, and make sure they end up | 3489 | /* Find those pointers being passed, and make sure they end up |
3866 | 3504 | pointing to anything. */ | 3490 | pointing to anything. */ |
3869 | 3505 | if (could_have_pointers (arg)) | 3491 | make_escape_constraint (arg); |
3868 | 3506 | make_escape_constraint (arg); | ||
3870 | 3507 | } | 3492 | } |
3871 | 3508 | 3493 | ||
3872 | 3509 | /* The static chain escapes as well. */ | 3494 | /* The static chain escapes as well. */ |
3873 | @@ -3603,17 +3588,13 @@ | |||
3874 | 3603 | for (k = 0; k < gimple_call_num_args (stmt); ++k) | 3588 | for (k = 0; k < gimple_call_num_args (stmt); ++k) |
3875 | 3604 | { | 3589 | { |
3876 | 3605 | tree arg = gimple_call_arg (stmt, k); | 3590 | tree arg = gimple_call_arg (stmt, k); |
3888 | 3606 | 3591 | VEC(ce_s, heap) *argc = NULL; | |
3889 | 3607 | if (could_have_pointers (arg)) | 3592 | unsigned i; |
3890 | 3608 | { | 3593 | struct constraint_expr *argp; |
3891 | 3609 | VEC(ce_s, heap) *argc = NULL; | 3594 | get_constraint_for_rhs (arg, &argc); |
3892 | 3610 | unsigned i; | 3595 | for (i = 0; VEC_iterate (ce_s, argc, i, argp); ++i) |
3893 | 3611 | struct constraint_expr *argp; | 3596 | VEC_safe_push (ce_s, heap, *results, argp); |
3894 | 3612 | get_constraint_for_rhs (arg, &argc); | 3597 | VEC_free(ce_s, heap, argc); |
3884 | 3613 | for (i = 0; VEC_iterate (ce_s, argc, i, argp); ++i) | ||
3885 | 3614 | VEC_safe_push (ce_s, heap, *results, argp); | ||
3886 | 3615 | VEC_free(ce_s, heap, argc); | ||
3887 | 3616 | } | ||
3895 | 3617 | } | 3598 | } |
3896 | 3618 | 3599 | ||
3897 | 3619 | /* May return addresses of globals. */ | 3600 | /* May return addresses of globals. */ |
3898 | @@ -3637,12 +3618,8 @@ | |||
3899 | 3637 | for (i = 0; i < gimple_call_num_args (stmt); ++i) | 3618 | for (i = 0; i < gimple_call_num_args (stmt); ++i) |
3900 | 3638 | { | 3619 | { |
3901 | 3639 | tree arg = gimple_call_arg (stmt, i); | 3620 | tree arg = gimple_call_arg (stmt, i); |
3908 | 3640 | 3621 | make_constraint_to (callused_id, arg); | |
3909 | 3641 | if (could_have_pointers (arg)) | 3622 | need_callused = true; |
3904 | 3642 | { | ||
3905 | 3643 | make_constraint_to (callused_id, arg); | ||
3906 | 3644 | need_callused = true; | ||
3907 | 3645 | } | ||
3910 | 3646 | } | 3623 | } |
3911 | 3647 | 3624 | ||
3912 | 3648 | /* The static chain is used as well. */ | 3625 | /* The static chain is used as well. */ |
3913 | @@ -3682,34 +3659,27 @@ | |||
3914 | 3682 | /* Now build constraints expressions. */ | 3659 | /* Now build constraints expressions. */ |
3915 | 3683 | if (gimple_code (t) == GIMPLE_PHI) | 3660 | if (gimple_code (t) == GIMPLE_PHI) |
3916 | 3684 | { | 3661 | { |
3918 | 3685 | gcc_assert (!AGGREGATE_TYPE_P (TREE_TYPE (gimple_phi_result (t)))); | 3662 | size_t i; |
3919 | 3663 | unsigned int j; | ||
3920 | 3686 | 3664 | ||
3924 | 3687 | /* Only care about pointers and structures containing | 3665 | /* For a phi node, assign all the arguments to |
3925 | 3688 | pointers. */ | 3666 | the result. */ |
3926 | 3689 | if (could_have_pointers (gimple_phi_result (t))) | 3667 | get_constraint_for (gimple_phi_result (t), &lhsc); |
3927 | 3668 | for (i = 0; i < gimple_phi_num_args (t); i++) | ||
3928 | 3690 | { | 3669 | { |
3936 | 3691 | size_t i; | 3670 | tree strippedrhs = PHI_ARG_DEF (t, i); |
3937 | 3692 | unsigned int j; | 3671 | |
3938 | 3693 | 3672 | STRIP_NOPS (strippedrhs); | |
3939 | 3694 | /* For a phi node, assign all the arguments to | 3673 | get_constraint_for_rhs (gimple_phi_arg_def (t, i), &rhsc); |
3940 | 3695 | the result. */ | 3674 | |
3941 | 3696 | get_constraint_for (gimple_phi_result (t), &lhsc); | 3675 | for (j = 0; VEC_iterate (ce_s, lhsc, j, c); j++) |
3935 | 3697 | for (i = 0; i < gimple_phi_num_args (t); i++) | ||
3942 | 3698 | { | 3676 | { |
3949 | 3699 | tree strippedrhs = PHI_ARG_DEF (t, i); | 3677 | struct constraint_expr *c2; |
3950 | 3700 | 3678 | while (VEC_length (ce_s, rhsc) > 0) | |
3945 | 3701 | STRIP_NOPS (strippedrhs); | ||
3946 | 3702 | get_constraint_for_rhs (gimple_phi_arg_def (t, i), &rhsc); | ||
3947 | 3703 | |||
3948 | 3704 | for (j = 0; VEC_iterate (ce_s, lhsc, j, c); j++) | ||
3951 | 3705 | { | 3679 | { |
3959 | 3706 | struct constraint_expr *c2; | 3680 | c2 = VEC_last (ce_s, rhsc); |
3960 | 3707 | while (VEC_length (ce_s, rhsc) > 0) | 3681 | process_constraint (new_constraint (*c, *c2)); |
3961 | 3708 | { | 3682 | VEC_pop (ce_s, rhsc); |
3955 | 3709 | c2 = VEC_last (ce_s, rhsc); | ||
3956 | 3710 | process_constraint (new_constraint (*c, *c2)); | ||
3957 | 3711 | VEC_pop (ce_s, rhsc); | ||
3958 | 3712 | } | ||
3962 | 3713 | } | 3683 | } |
3963 | 3714 | } | 3684 | } |
3964 | 3715 | } | 3685 | } |
3965 | @@ -3858,16 +3828,7 @@ | |||
3966 | 3858 | else | 3828 | else |
3967 | 3859 | handle_rhs_call (t, &rhsc); | 3829 | handle_rhs_call (t, &rhsc); |
3968 | 3860 | if (gimple_call_lhs (t)) | 3830 | if (gimple_call_lhs (t)) |
3979 | 3861 | { | 3831 | handle_lhs_call (gimple_call_lhs (t), flags, rhsc, fndecl); |
3970 | 3862 | if (could_have_pointers (gimple_call_lhs (t))) | ||
3971 | 3863 | handle_lhs_call (gimple_call_lhs (t), flags, rhsc, fndecl); | ||
3972 | 3864 | /* Similar to conversions a result that is not a pointer | ||
3973 | 3865 | is an escape point for any pointer the function might | ||
3974 | 3866 | return. */ | ||
3975 | 3867 | else if (flags & (ECF_CONST|ECF_PURE | ||
3976 | 3868 | |ECF_NOVOPS|ECF_LOOPING_CONST_OR_PURE)) | ||
3977 | 3869 | make_constraints_to (escaped_id, rhsc); | ||
3978 | 3870 | } | ||
3980 | 3871 | VEC_free (ce_s, heap, rhsc); | 3832 | VEC_free (ce_s, heap, rhsc); |
3981 | 3872 | } | 3833 | } |
3982 | 3873 | else | 3834 | else |
3983 | @@ -3950,8 +3911,7 @@ | |||
3984 | 3950 | /* Otherwise, just a regular assignment statement. Only care about | 3911 | /* Otherwise, just a regular assignment statement. Only care about |
3985 | 3951 | operations with pointer result, others are dealt with as escape | 3912 | operations with pointer result, others are dealt with as escape |
3986 | 3952 | points if they have pointer operands. */ | 3913 | points if they have pointer operands. */ |
3989 | 3953 | else if (is_gimple_assign (t) | 3914 | else if (is_gimple_assign (t)) |
3988 | 3954 | && type_could_have_pointers (TREE_TYPE (gimple_assign_lhs (t)))) | ||
3990 | 3955 | { | 3915 | { |
3991 | 3956 | /* Otherwise, just a regular assignment statement. */ | 3916 | /* Otherwise, just a regular assignment statement. */ |
3992 | 3957 | tree lhsop = gimple_assign_lhs (t); | 3917 | tree lhsop = gimple_assign_lhs (t); |
3993 | @@ -3961,23 +3921,45 @@ | |||
3994 | 3961 | do_structure_copy (lhsop, rhsop); | 3921 | do_structure_copy (lhsop, rhsop); |
3995 | 3962 | else | 3922 | else |
3996 | 3963 | { | 3923 | { |
3998 | 3964 | struct constraint_expr temp; | 3924 | enum tree_code code = gimple_assign_rhs_code (t); |
3999 | 3925 | |||
4000 | 3965 | get_constraint_for (lhsop, &lhsc); | 3926 | get_constraint_for (lhsop, &lhsc); |
4001 | 3966 | 3927 | ||
4003 | 3967 | if (gimple_assign_rhs_code (t) == POINTER_PLUS_EXPR) | 3928 | if (code == POINTER_PLUS_EXPR) |
4004 | 3968 | get_constraint_for_ptr_offset (gimple_assign_rhs1 (t), | 3929 | get_constraint_for_ptr_offset (gimple_assign_rhs1 (t), |
4005 | 3969 | gimple_assign_rhs2 (t), &rhsc); | 3930 | gimple_assign_rhs2 (t), &rhsc); |
4007 | 3970 | else if ((CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (t)) | 3931 | else if (code == BIT_AND_EXPR |
4008 | 3932 | && TREE_CODE (gimple_assign_rhs2 (t)) == INTEGER_CST) | ||
4009 | 3933 | { | ||
4010 | 3934 | /* Aligning a pointer via a BIT_AND_EXPR is offsetting | ||
4011 | 3935 | the pointer. Handle it by offsetting it by UNKNOWN. */ | ||
4012 | 3936 | get_constraint_for_ptr_offset (gimple_assign_rhs1 (t), | ||
4013 | 3937 | NULL_TREE, &rhsc); | ||
4014 | 3938 | } | ||
4015 | 3939 | else if ((CONVERT_EXPR_CODE_P (code) | ||
4016 | 3971 | && !(POINTER_TYPE_P (gimple_expr_type (t)) | 3940 | && !(POINTER_TYPE_P (gimple_expr_type (t)) |
4017 | 3972 | && !POINTER_TYPE_P (TREE_TYPE (rhsop)))) | 3941 | && !POINTER_TYPE_P (TREE_TYPE (rhsop)))) |
4018 | 3973 | || gimple_assign_single_p (t)) | 3942 | || gimple_assign_single_p (t)) |
4019 | 3974 | get_constraint_for_rhs (rhsop, &rhsc); | 3943 | get_constraint_for_rhs (rhsop, &rhsc); |
4020 | 3944 | else if (truth_value_p (code)) | ||
4021 | 3945 | /* Truth value results are not pointer (parts). Or at least | ||
4022 | 3946 | very very unreasonable obfuscation of a part. */ | ||
4023 | 3947 | ; | ||
4024 | 3975 | else | 3948 | else |
4025 | 3976 | { | 3949 | { |
4030 | 3977 | temp.type = ADDRESSOF; | 3950 | /* All other operations are merges. */ |
4031 | 3978 | temp.var = anything_id; | 3951 | VEC (ce_s, heap) *tmp = NULL; |
4032 | 3979 | temp.offset = 0; | 3952 | struct constraint_expr *rhsp; |
4033 | 3980 | VEC_safe_push (ce_s, heap, rhsc, &temp); | 3953 | unsigned i, j; |
4034 | 3954 | get_constraint_for_rhs (gimple_assign_rhs1 (t), &rhsc); | ||
4035 | 3955 | for (i = 2; i < gimple_num_ops (t); ++i) | ||
4036 | 3956 | { | ||
4037 | 3957 | get_constraint_for_rhs (gimple_op (t, i), &tmp); | ||
4038 | 3958 | for (j = 0; VEC_iterate (ce_s, tmp, j, rhsp); ++j) | ||
4039 | 3959 | VEC_safe_push (ce_s, heap, rhsc, rhsp); | ||
4040 | 3960 | VEC_truncate (ce_s, tmp, 0); | ||
4041 | 3961 | } | ||
4042 | 3962 | VEC_free (ce_s, heap, tmp); | ||
4043 | 3981 | } | 3963 | } |
4044 | 3982 | process_all_all_constraints (lhsc, rhsc); | 3964 | process_all_all_constraints (lhsc, rhsc); |
4045 | 3983 | } | 3965 | } |
4046 | @@ -3996,17 +3978,9 @@ | |||
4047 | 3996 | make_constraint_from_restrict (get_vi_for_tree (lhsop), | 3978 | make_constraint_from_restrict (get_vi_for_tree (lhsop), |
4048 | 3997 | "CAST_RESTRICT"); | 3979 | "CAST_RESTRICT"); |
4049 | 3998 | } | 3980 | } |
4050 | 3999 | /* For conversions of pointers to non-pointers the pointer escapes. */ | ||
4051 | 4000 | else if (gimple_assign_cast_p (t) | ||
4052 | 4001 | && POINTER_TYPE_P (TREE_TYPE (gimple_assign_rhs1 (t))) | ||
4053 | 4002 | && !POINTER_TYPE_P (TREE_TYPE (gimple_assign_lhs (t)))) | ||
4054 | 4003 | { | ||
4055 | 4004 | make_escape_constraint (gimple_assign_rhs1 (t)); | ||
4056 | 4005 | } | ||
4057 | 4006 | /* Handle escapes through return. */ | 3981 | /* Handle escapes through return. */ |
4058 | 4007 | else if (gimple_code (t) == GIMPLE_RETURN | 3982 | else if (gimple_code (t) == GIMPLE_RETURN |
4061 | 4008 | && gimple_return_retval (t) != NULL_TREE | 3983 | && gimple_return_retval (t) != NULL_TREE) |
4060 | 4009 | && could_have_pointers (gimple_return_retval (t))) | ||
4062 | 4010 | { | 3984 | { |
4063 | 4011 | make_escape_constraint (gimple_return_retval (t)); | 3985 | make_escape_constraint (gimple_return_retval (t)); |
4064 | 4012 | } | 3986 | } |
4065 | @@ -4037,7 +4011,7 @@ | |||
4066 | 4037 | 4011 | ||
4067 | 4038 | /* The asm may read global memory, so outputs may point to | 4012 | /* The asm may read global memory, so outputs may point to |
4068 | 4039 | any global memory. */ | 4013 | any global memory. */ |
4070 | 4040 | if (op && could_have_pointers (op)) | 4014 | if (op) |
4071 | 4041 | { | 4015 | { |
4072 | 4042 | VEC(ce_s, heap) *lhsc = NULL; | 4016 | VEC(ce_s, heap) *lhsc = NULL; |
4073 | 4043 | struct constraint_expr rhsc, *lhsp; | 4017 | struct constraint_expr rhsc, *lhsp; |
4074 | @@ -4067,7 +4041,7 @@ | |||
4075 | 4067 | /* Strictly we'd only need the constraint to ESCAPED if | 4041 | /* Strictly we'd only need the constraint to ESCAPED if |
4076 | 4068 | the asm clobbers memory, otherwise using CALLUSED | 4042 | the asm clobbers memory, otherwise using CALLUSED |
4077 | 4069 | would be enough. */ | 4043 | would be enough. */ |
4079 | 4070 | else if (op && could_have_pointers (op)) | 4044 | else if (op) |
4080 | 4071 | make_escape_constraint (op); | 4045 | make_escape_constraint (op); |
4081 | 4072 | } | 4046 | } |
4082 | 4073 | } | 4047 | } |
4083 | @@ -4192,6 +4166,8 @@ | |||
4084 | 4192 | 4166 | ||
4085 | 4193 | unsigned has_unknown_size : 1; | 4167 | unsigned has_unknown_size : 1; |
4086 | 4194 | 4168 | ||
4087 | 4169 | unsigned must_have_pointers : 1; | ||
4088 | 4170 | |||
4089 | 4195 | unsigned may_have_pointers : 1; | 4171 | unsigned may_have_pointers : 1; |
4090 | 4196 | 4172 | ||
4091 | 4197 | unsigned only_restrict_pointers : 1; | 4173 | unsigned only_restrict_pointers : 1; |
4092 | @@ -4256,6 +4232,33 @@ | |||
4093 | 4256 | return false; | 4232 | return false; |
4094 | 4257 | } | 4233 | } |
4095 | 4258 | 4234 | ||
4096 | 4235 | /* Return true if T is a type that does contain pointers. */ | ||
4097 | 4236 | |||
4098 | 4237 | static bool | ||
4099 | 4238 | type_must_have_pointers (tree type) | ||
4100 | 4239 | { | ||
4101 | 4240 | if (POINTER_TYPE_P (type)) | ||
4102 | 4241 | return true; | ||
4103 | 4242 | |||
4104 | 4243 | if (TREE_CODE (type) == ARRAY_TYPE) | ||
4105 | 4244 | return type_must_have_pointers (TREE_TYPE (type)); | ||
4106 | 4245 | |||
4107 | 4246 | /* A function or method can have pointers as arguments, so track | ||
4108 | 4247 | those separately. */ | ||
4109 | 4248 | if (TREE_CODE (type) == FUNCTION_TYPE | ||
4110 | 4249 | || TREE_CODE (type) == METHOD_TYPE) | ||
4111 | 4250 | return true; | ||
4112 | 4251 | |||
4113 | 4252 | return false; | ||
4114 | 4253 | } | ||
4115 | 4254 | |||
4116 | 4255 | static bool | ||
4117 | 4256 | field_must_have_pointers (tree t) | ||
4118 | 4257 | { | ||
4119 | 4258 | return type_must_have_pointers (TREE_TYPE (t)); | ||
4120 | 4259 | } | ||
4121 | 4260 | |||
4122 | 4261 | |||
4123 | 4259 | /* Given a TYPE, and a vector of field offsets FIELDSTACK, push all | 4262 | /* Given a TYPE, and a vector of field offsets FIELDSTACK, push all |
4124 | 4260 | the fields of TYPE onto fieldstack, recording their offsets along | 4263 | the fields of TYPE onto fieldstack, recording their offsets along |
4125 | 4261 | the way. | 4264 | the way. |
4126 | @@ -4266,7 +4269,7 @@ | |||
4127 | 4266 | 4269 | ||
4128 | 4267 | static int | 4270 | static int |
4129 | 4268 | push_fields_onto_fieldstack (tree type, VEC(fieldoff_s,heap) **fieldstack, | 4271 | push_fields_onto_fieldstack (tree type, VEC(fieldoff_s,heap) **fieldstack, |
4131 | 4269 | HOST_WIDE_INT offset, bool must_have_pointers_p) | 4272 | HOST_WIDE_INT offset) |
4132 | 4270 | { | 4273 | { |
4133 | 4271 | tree field; | 4274 | tree field; |
4134 | 4272 | int count = 0; | 4275 | int count = 0; |
4135 | @@ -4292,8 +4295,7 @@ | |||
4136 | 4292 | || TREE_CODE (TREE_TYPE (field)) == UNION_TYPE) | 4295 | || TREE_CODE (TREE_TYPE (field)) == UNION_TYPE) |
4137 | 4293 | push = true; | 4296 | push = true; |
4138 | 4294 | else if (!(pushed = push_fields_onto_fieldstack | 4297 | else if (!(pushed = push_fields_onto_fieldstack |
4141 | 4295 | (TREE_TYPE (field), fieldstack, offset + foff, | 4298 | (TREE_TYPE (field), fieldstack, offset + foff)) |
4140 | 4296 | must_have_pointers_p)) | ||
4142 | 4297 | && (DECL_SIZE (field) | 4299 | && (DECL_SIZE (field) |
4143 | 4298 | && !integer_zerop (DECL_SIZE (field)))) | 4300 | && !integer_zerop (DECL_SIZE (field)))) |
4144 | 4299 | /* Empty structures may have actual size, like in C++. So | 4301 | /* Empty structures may have actual size, like in C++. So |
4145 | @@ -4305,6 +4307,7 @@ | |||
4146 | 4305 | { | 4307 | { |
4147 | 4306 | fieldoff_s *pair = NULL; | 4308 | fieldoff_s *pair = NULL; |
4148 | 4307 | bool has_unknown_size = false; | 4309 | bool has_unknown_size = false; |
4149 | 4310 | bool must_have_pointers_p; | ||
4150 | 4308 | 4311 | ||
4151 | 4309 | if (!VEC_empty (fieldoff_s, *fieldstack)) | 4312 | if (!VEC_empty (fieldoff_s, *fieldstack)) |
4152 | 4310 | pair = VEC_last (fieldoff_s, *fieldstack); | 4313 | pair = VEC_last (fieldoff_s, *fieldstack); |
4153 | @@ -4325,15 +4328,14 @@ | |||
4154 | 4325 | has_unknown_size = true; | 4328 | has_unknown_size = true; |
4155 | 4326 | 4329 | ||
4156 | 4327 | /* If adjacent fields do not contain pointers merge them. */ | 4330 | /* If adjacent fields do not contain pointers merge them. */ |
4157 | 4331 | must_have_pointers_p = field_must_have_pointers (field); | ||
4158 | 4328 | if (pair | 4332 | if (pair |
4159 | 4329 | && !pair->may_have_pointers | ||
4160 | 4330 | && !pair->has_unknown_size | ||
4161 | 4331 | && !has_unknown_size | 4333 | && !has_unknown_size |
4162 | 4332 | && pair->offset + (HOST_WIDE_INT)pair->size == offset + foff | ||
4163 | 4333 | && !must_have_pointers_p | 4334 | && !must_have_pointers_p |
4165 | 4334 | && !could_have_pointers (field)) | 4335 | && !pair->must_have_pointers |
4166 | 4336 | && !pair->has_unknown_size | ||
4167 | 4337 | && pair->offset + (HOST_WIDE_INT)pair->size == offset + foff) | ||
4168 | 4335 | { | 4338 | { |
4169 | 4336 | pair = VEC_last (fieldoff_s, *fieldstack); | ||
4170 | 4337 | pair->size += TREE_INT_CST_LOW (DECL_SIZE (field)); | 4339 | pair->size += TREE_INT_CST_LOW (DECL_SIZE (field)); |
4171 | 4338 | } | 4340 | } |
4172 | 4339 | else | 4341 | else |
4173 | @@ -4345,8 +4347,8 @@ | |||
4174 | 4345 | pair->size = TREE_INT_CST_LOW (DECL_SIZE (field)); | 4347 | pair->size = TREE_INT_CST_LOW (DECL_SIZE (field)); |
4175 | 4346 | else | 4348 | else |
4176 | 4347 | pair->size = -1; | 4349 | pair->size = -1; |
4179 | 4348 | pair->may_have_pointers | 4350 | pair->must_have_pointers = must_have_pointers_p; |
4180 | 4349 | = must_have_pointers_p || could_have_pointers (field); | 4351 | pair->may_have_pointers = true; |
4181 | 4350 | pair->only_restrict_pointers | 4352 | pair->only_restrict_pointers |
4182 | 4351 | = (!has_unknown_size | 4353 | = (!has_unknown_size |
4183 | 4352 | && POINTER_TYPE_P (TREE_TYPE (field)) | 4354 | && POINTER_TYPE_P (TREE_TYPE (field)) |
4184 | @@ -4512,17 +4514,14 @@ | |||
4185 | 4512 | VEC (fieldoff_s,heap) *fieldstack = NULL; | 4514 | VEC (fieldoff_s,heap) *fieldstack = NULL; |
4186 | 4513 | 4515 | ||
4187 | 4514 | if (var_can_have_subvars (decl) && use_field_sensitive) | 4516 | if (var_can_have_subvars (decl) && use_field_sensitive) |
4192 | 4515 | push_fields_onto_fieldstack (decl_type, &fieldstack, 0, | 4517 | push_fields_onto_fieldstack (decl_type, &fieldstack, 0); |
4189 | 4516 | TREE_PUBLIC (decl) | ||
4190 | 4517 | || DECL_EXTERNAL (decl) | ||
4191 | 4518 | || TREE_ADDRESSABLE (decl)); | ||
4193 | 4519 | 4518 | ||
4194 | 4520 | /* If the variable doesn't have subvars, we may end up needing to | 4519 | /* If the variable doesn't have subvars, we may end up needing to |
4195 | 4521 | sort the field list and create fake variables for all the | 4520 | sort the field list and create fake variables for all the |
4196 | 4522 | fields. */ | 4521 | fields. */ |
4197 | 4523 | vi = new_var_info (decl, name); | 4522 | vi = new_var_info (decl, name); |
4198 | 4524 | vi->offset = 0; | 4523 | vi->offset = 0; |
4200 | 4525 | vi->may_have_pointers = could_have_pointers (decl); | 4524 | vi->may_have_pointers = true; |
4201 | 4526 | if (!declsize | 4525 | if (!declsize |
4202 | 4527 | || !host_integerp (declsize, 1)) | 4526 | || !host_integerp (declsize, 1)) |
4203 | 4528 | { | 4527 | { |
4204 | @@ -4695,9 +4694,6 @@ | |||
4205 | 4695 | { | 4694 | { |
4206 | 4696 | varinfo_t p; | 4695 | varinfo_t p; |
4207 | 4697 | 4696 | ||
4208 | 4698 | if (!could_have_pointers (t)) | ||
4209 | 4699 | continue; | ||
4210 | 4700 | |||
4211 | 4701 | /* For restrict qualified pointers to objects passed by | 4697 | /* For restrict qualified pointers to objects passed by |
4212 | 4702 | reference build a real representative for the pointed-to object. */ | 4698 | reference build a real representative for the pointed-to object. */ |
4213 | 4703 | if (DECL_BY_REFERENCE (t) | 4699 | if (DECL_BY_REFERENCE (t) |
4214 | 4704 | 4700 | ||
4215 | === modified file 'gcc/tree-vect-generic.c' | |||
4216 | --- gcc/tree-vect-generic.c 2009-11-25 10:55:54 +0000 | |||
4217 | +++ gcc/tree-vect-generic.c 2011-04-06 13:16:33 +0000 | |||
4218 | @@ -518,8 +518,7 @@ | |||
4219 | 518 | way to do it is change expand_vector_operation and its callees to | 518 | way to do it is change expand_vector_operation and its callees to |
4220 | 519 | return a tree_code, RHS1 and RHS2 instead of a tree. */ | 519 | return a tree_code, RHS1 and RHS2 instead of a tree. */ |
4221 | 520 | gimple_assign_set_rhs_from_tree (gsi, new_rhs); | 520 | gimple_assign_set_rhs_from_tree (gsi, new_rhs); |
4224 | 521 | 521 | update_stmt (gsi_stmt (*gsi)); | |
4223 | 522 | gimple_set_modified (gsi_stmt (*gsi), true); | ||
4225 | 523 | } | 522 | } |
4226 | 524 | 523 | ||
4227 | 525 | 524 | ||
4228 | 526 | /* Use this to lower vector operations introduced by the vectorizer, | 525 | /* Use this to lower vector operations introduced by the vectorizer, |
4229 | @@ -536,16 +535,24 @@ | |||
4230 | 536 | { | 535 | { |
4231 | 537 | gimple_stmt_iterator gsi; | 536 | gimple_stmt_iterator gsi; |
4232 | 538 | basic_block bb; | 537 | basic_block bb; |
4233 | 538 | bool cfg_changed = false; | ||
4234 | 539 | 539 | ||
4235 | 540 | FOR_EACH_BB (bb) | 540 | FOR_EACH_BB (bb) |
4236 | 541 | { | 541 | { |
4237 | 542 | for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi)) | 542 | for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi)) |
4238 | 543 | { | 543 | { |
4239 | 544 | expand_vector_operations_1 (&gsi); | 544 | expand_vector_operations_1 (&gsi); |
4241 | 545 | update_stmt_if_modified (gsi_stmt (gsi)); | 545 | /* ??? If we do not cleanup EH then we will ICE in |
4242 | 546 | verification. But in reality we have created wrong-code | ||
4243 | 547 | as we did not properly transition EH info and edges to | ||
4244 | 548 | the piecewise computations. */ | ||
4245 | 549 | if (maybe_clean_eh_stmt (gsi_stmt (gsi)) | ||
4246 | 550 | && gimple_purge_dead_eh_edges (bb)) | ||
4247 | 551 | cfg_changed = true; | ||
4248 | 546 | } | 552 | } |
4249 | 547 | } | 553 | } |
4251 | 548 | return 0; | 554 | |
4252 | 555 | return cfg_changed ? TODO_cleanup_cfg : 0; | ||
4253 | 549 | } | 556 | } |
4254 | 550 | 557 | ||
4255 | 551 | struct gimple_opt_pass pass_lower_vector = | 558 | struct gimple_opt_pass pass_lower_vector = |
4256 | 552 | 559 | ||
4257 | === modified file 'gcc/tree-vect-loop.c' | |||
4258 | --- gcc/tree-vect-loop.c 2010-06-14 12:43:24 +0000 | |||
4259 | +++ gcc/tree-vect-loop.c 2011-04-06 13:16:33 +0000 | |||
4260 | @@ -2363,7 +2363,7 @@ | |||
4261 | 2363 | stmt_vec_info stmt_vinfo = vinfo_for_stmt (iv_phi); | 2363 | stmt_vec_info stmt_vinfo = vinfo_for_stmt (iv_phi); |
4262 | 2364 | loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_vinfo); | 2364 | loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_vinfo); |
4263 | 2365 | struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo); | 2365 | struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo); |
4265 | 2366 | tree scalar_type = TREE_TYPE (gimple_phi_result (iv_phi)); | 2366 | tree scalar_type; |
4266 | 2367 | tree vectype; | 2367 | tree vectype; |
4267 | 2368 | int nunits; | 2368 | int nunits; |
4268 | 2369 | edge pe = loop_preheader_edge (loop); | 2369 | edge pe = loop_preheader_edge (loop); |
4269 | @@ -2392,24 +2392,7 @@ | |||
4270 | 2392 | gimple_stmt_iterator si; | 2392 | gimple_stmt_iterator si; |
4271 | 2393 | basic_block bb = gimple_bb (iv_phi); | 2393 | basic_block bb = gimple_bb (iv_phi); |
4272 | 2394 | tree stepvectype; | 2394 | tree stepvectype; |
4291 | 2395 | 2395 | tree resvectype; | |
4274 | 2396 | vectype = get_vectype_for_scalar_type (scalar_type); | ||
4275 | 2397 | gcc_assert (vectype); | ||
4276 | 2398 | nunits = TYPE_VECTOR_SUBPARTS (vectype); | ||
4277 | 2399 | ncopies = vf / nunits; | ||
4278 | 2400 | |||
4279 | 2401 | gcc_assert (phi_info); | ||
4280 | 2402 | gcc_assert (ncopies >= 1); | ||
4281 | 2403 | |||
4282 | 2404 | /* Find the first insertion point in the BB. */ | ||
4283 | 2405 | si = gsi_after_labels (bb); | ||
4284 | 2406 | |||
4285 | 2407 | if (INTEGRAL_TYPE_P (scalar_type)) | ||
4286 | 2408 | step_expr = build_int_cst (scalar_type, 0); | ||
4287 | 2409 | else if (POINTER_TYPE_P (scalar_type)) | ||
4288 | 2410 | step_expr = build_int_cst (sizetype, 0); | ||
4289 | 2411 | else | ||
4290 | 2412 | step_expr = build_real (scalar_type, dconst0); | ||
4292 | 2413 | 2396 | ||
4293 | 2414 | /* Is phi in an inner-loop, while vectorizing an enclosing outer-loop? */ | 2397 | /* Is phi in an inner-loop, while vectorizing an enclosing outer-loop? */ |
4294 | 2415 | if (nested_in_vect_loop_p (loop, iv_phi)) | 2398 | if (nested_in_vect_loop_p (loop, iv_phi)) |
4295 | @@ -2426,11 +2409,25 @@ | |||
4296 | 2426 | 2409 | ||
4297 | 2427 | access_fn = analyze_scalar_evolution (iv_loop, PHI_RESULT (iv_phi)); | 2410 | access_fn = analyze_scalar_evolution (iv_loop, PHI_RESULT (iv_phi)); |
4298 | 2428 | gcc_assert (access_fn); | 2411 | gcc_assert (access_fn); |
4299 | 2412 | STRIP_NOPS (access_fn); | ||
4300 | 2429 | ok = vect_is_simple_iv_evolution (iv_loop->num, access_fn, | 2413 | ok = vect_is_simple_iv_evolution (iv_loop->num, access_fn, |
4301 | 2430 | &init_expr, &step_expr); | 2414 | &init_expr, &step_expr); |
4302 | 2431 | gcc_assert (ok); | 2415 | gcc_assert (ok); |
4303 | 2432 | pe = loop_preheader_edge (iv_loop); | 2416 | pe = loop_preheader_edge (iv_loop); |
4304 | 2433 | 2417 | ||
4305 | 2418 | scalar_type = TREE_TYPE (init_expr); | ||
4306 | 2419 | vectype = get_vectype_for_scalar_type (scalar_type); | ||
4307 | 2420 | resvectype = get_vectype_for_scalar_type (TREE_TYPE (PHI_RESULT (iv_phi))); | ||
4308 | 2421 | gcc_assert (vectype); | ||
4309 | 2422 | nunits = TYPE_VECTOR_SUBPARTS (vectype); | ||
4310 | 2423 | ncopies = vf / nunits; | ||
4311 | 2424 | |||
4312 | 2425 | gcc_assert (phi_info); | ||
4313 | 2426 | gcc_assert (ncopies >= 1); | ||
4314 | 2427 | |||
4315 | 2428 | /* Find the first insertion point in the BB. */ | ||
4316 | 2429 | si = gsi_after_labels (bb); | ||
4317 | 2430 | |||
4318 | 2434 | /* Create the vector that holds the initial_value of the induction. */ | 2431 | /* Create the vector that holds the initial_value of the induction. */ |
4319 | 2435 | if (nested_in_vect_loop) | 2432 | if (nested_in_vect_loop) |
4320 | 2436 | { | 2433 | { |
4321 | @@ -2456,7 +2453,7 @@ | |||
4322 | 2456 | } | 2453 | } |
4323 | 2457 | 2454 | ||
4324 | 2458 | t = NULL_TREE; | 2455 | t = NULL_TREE; |
4326 | 2459 | t = tree_cons (NULL_TREE, init_expr, t); | 2456 | t = tree_cons (NULL_TREE, new_name, t); |
4327 | 2460 | for (i = 1; i < nunits; i++) | 2457 | for (i = 1; i < nunits; i++) |
4328 | 2461 | { | 2458 | { |
4329 | 2462 | /* Create: new_name_i = new_name + step_expr */ | 2459 | /* Create: new_name_i = new_name + step_expr */ |
4330 | @@ -2575,6 +2572,19 @@ | |||
4331 | 2575 | gimple_assign_set_lhs (new_stmt, vec_def); | 2572 | gimple_assign_set_lhs (new_stmt, vec_def); |
4332 | 2576 | 2573 | ||
4333 | 2577 | gsi_insert_before (&si, new_stmt, GSI_SAME_STMT); | 2574 | gsi_insert_before (&si, new_stmt, GSI_SAME_STMT); |
4334 | 2575 | if (!useless_type_conversion_p (resvectype, vectype)) | ||
4335 | 2576 | { | ||
4336 | 2577 | new_stmt = gimple_build_assign_with_ops | ||
4337 | 2578 | (VIEW_CONVERT_EXPR, | ||
4338 | 2579 | vect_get_new_vect_var (resvectype, vect_simple_var, | ||
4339 | 2580 | "vec_iv_"), | ||
4340 | 2581 | build1 (VIEW_CONVERT_EXPR, resvectype, | ||
4341 | 2582 | gimple_assign_lhs (new_stmt)), NULL_TREE); | ||
4342 | 2583 | gimple_assign_set_lhs (new_stmt, | ||
4343 | 2584 | make_ssa_name | ||
4344 | 2585 | (gimple_assign_lhs (new_stmt), new_stmt)); | ||
4345 | 2586 | gsi_insert_before (&si, new_stmt, GSI_SAME_STMT); | ||
4346 | 2587 | } | ||
4347 | 2578 | set_vinfo_for_stmt (new_stmt, | 2588 | set_vinfo_for_stmt (new_stmt, |
4348 | 2579 | new_stmt_vec_info (new_stmt, loop_vinfo, NULL)); | 2589 | new_stmt_vec_info (new_stmt, loop_vinfo, NULL)); |
4349 | 2580 | STMT_VINFO_RELATED_STMT (prev_stmt_vinfo) = new_stmt; | 2590 | STMT_VINFO_RELATED_STMT (prev_stmt_vinfo) = new_stmt; |
4350 | @@ -2622,6 +2632,22 @@ | |||
4351 | 2622 | } | 2632 | } |
4352 | 2623 | 2633 | ||
4353 | 2624 | STMT_VINFO_VEC_STMT (phi_info) = induction_phi; | 2634 | STMT_VINFO_VEC_STMT (phi_info) = induction_phi; |
4354 | 2635 | if (!useless_type_conversion_p (resvectype, vectype)) | ||
4355 | 2636 | { | ||
4356 | 2637 | new_stmt = gimple_build_assign_with_ops | ||
4357 | 2638 | (VIEW_CONVERT_EXPR, | ||
4358 | 2639 | vect_get_new_vect_var (resvectype, vect_simple_var, "vec_iv_"), | ||
4359 | 2640 | build1 (VIEW_CONVERT_EXPR, resvectype, induc_def), NULL_TREE); | ||
4360 | 2641 | induc_def = make_ssa_name (gimple_assign_lhs (new_stmt), new_stmt); | ||
4361 | 2642 | gimple_assign_set_lhs (new_stmt, induc_def); | ||
4362 | 2643 | si = gsi_start_bb (bb); | ||
4363 | 2644 | gsi_insert_before (&si, new_stmt, GSI_SAME_STMT); | ||
4364 | 2645 | set_vinfo_for_stmt (new_stmt, | ||
4365 | 2646 | new_stmt_vec_info (new_stmt, loop_vinfo, NULL)); | ||
4366 | 2647 | STMT_VINFO_RELATED_STMT (vinfo_for_stmt (new_stmt)) | ||
4367 | 2648 | = STMT_VINFO_RELATED_STMT (vinfo_for_stmt (induction_phi)); | ||
4368 | 2649 | } | ||
4369 | 2650 | |||
4370 | 2625 | return induc_def; | 2651 | return induc_def; |
4371 | 2626 | } | 2652 | } |
4372 | 2627 | 2653 | ||
4373 | 2628 | 2654 | ||
4374 | === modified file 'gcc/tree-vect-stmts.c' | |||
4375 | --- gcc/tree-vect-stmts.c 2010-11-26 12:03:32 +0000 | |||
4376 | +++ gcc/tree-vect-stmts.c 2011-04-06 13:16:33 +0000 | |||
4377 | @@ -1014,8 +1014,10 @@ | |||
4378 | 1014 | /* Get the def from the vectorized stmt. */ | 1014 | /* Get the def from the vectorized stmt. */ |
4379 | 1015 | def_stmt_info = vinfo_for_stmt (def_stmt); | 1015 | def_stmt_info = vinfo_for_stmt (def_stmt); |
4380 | 1016 | vec_stmt = STMT_VINFO_VEC_STMT (def_stmt_info); | 1016 | vec_stmt = STMT_VINFO_VEC_STMT (def_stmt_info); |
4383 | 1017 | gcc_assert (vec_stmt && gimple_code (vec_stmt) == GIMPLE_PHI); | 1017 | if (gimple_code (vec_stmt) == GIMPLE_PHI) |
4384 | 1018 | vec_oprnd = PHI_RESULT (vec_stmt); | 1018 | vec_oprnd = PHI_RESULT (vec_stmt); |
4385 | 1019 | else | ||
4386 | 1020 | vec_oprnd = gimple_get_lhs (vec_stmt); | ||
4387 | 1019 | return vec_oprnd; | 1021 | return vec_oprnd; |
4388 | 1020 | } | 1022 | } |
4389 | 1021 | 1023 | ||
4390 | @@ -2236,7 +2238,6 @@ | |||
4391 | 2236 | int op_type; | 2238 | int op_type; |
4392 | 2237 | optab optab; | 2239 | optab optab; |
4393 | 2238 | int icode; | 2240 | int icode; |
4394 | 2239 | enum machine_mode optab_op2_mode; | ||
4395 | 2240 | tree def; | 2241 | tree def; |
4396 | 2241 | gimple def_stmt; | 2242 | gimple def_stmt; |
4397 | 2242 | enum vect_def_type dt[2] = {vect_unknown_def_type, vect_unknown_def_type}; | 2243 | enum vect_def_type dt[2] = {vect_unknown_def_type, vect_unknown_def_type}; |
4398 | @@ -2249,8 +2250,6 @@ | |||
4399 | 2249 | int j, i; | 2250 | int j, i; |
4400 | 2250 | VEC(tree,heap) *vec_oprnds0 = NULL, *vec_oprnds1 = NULL; | 2251 | VEC(tree,heap) *vec_oprnds0 = NULL, *vec_oprnds1 = NULL; |
4401 | 2251 | tree vop0, vop1; | 2252 | tree vop0, vop1; |
4402 | 2252 | unsigned int k; | ||
4403 | 2253 | bool scalar_shift_arg = false; | ||
4404 | 2254 | bb_vec_info bb_vinfo = STMT_VINFO_BB_VINFO (stmt_info); | 2253 | bb_vec_info bb_vinfo = STMT_VINFO_BB_VINFO (stmt_info); |
4405 | 2255 | int vf; | 2254 | int vf; |
4406 | 2256 | 2255 | ||
4407 | 2257 | 2256 | ||
4408 | === modified file 'gcc/tree.c' | |||
4409 | --- gcc/tree.c 2010-09-16 09:15:46 +0000 | |||
4410 | +++ gcc/tree.c 2011-04-06 13:16:33 +0000 | |||
4411 | @@ -5797,12 +5797,18 @@ | |||
4412 | 5797 | || TREE_TYPE (a->type) != TREE_TYPE (b->type) | 5797 | || TREE_TYPE (a->type) != TREE_TYPE (b->type) |
4413 | 5798 | || !attribute_list_equal (TYPE_ATTRIBUTES (a->type), | 5798 | || !attribute_list_equal (TYPE_ATTRIBUTES (a->type), |
4414 | 5799 | TYPE_ATTRIBUTES (b->type)) | 5799 | TYPE_ATTRIBUTES (b->type)) |
4415 | 5800 | || TYPE_ALIGN (a->type) != TYPE_ALIGN (b->type) | ||
4416 | 5801 | || TYPE_MODE (a->type) != TYPE_MODE (b->type) | ||
4417 | 5802 | || (TREE_CODE (a->type) != COMPLEX_TYPE | 5800 | || (TREE_CODE (a->type) != COMPLEX_TYPE |
4418 | 5803 | && TYPE_NAME (a->type) != TYPE_NAME (b->type))) | 5801 | && TYPE_NAME (a->type) != TYPE_NAME (b->type))) |
4419 | 5804 | return 0; | 5802 | return 0; |
4420 | 5805 | 5803 | ||
4421 | 5804 | /* Be careful about comparing arrays before and after the element type | ||
4422 | 5805 | has been completed; don't compare TYPE_ALIGN unless both types are | ||
4423 | 5806 | complete. */ | ||
4424 | 5807 | if (COMPLETE_TYPE_P (a->type) && COMPLETE_TYPE_P (b->type) | ||
4425 | 5808 | && (TYPE_ALIGN (a->type) != TYPE_ALIGN (b->type) | ||
4426 | 5809 | || TYPE_MODE (a->type) != TYPE_MODE (b->type))) | ||
4427 | 5810 | return 0; | ||
4428 | 5811 | |||
4429 | 5806 | switch (TREE_CODE (a->type)) | 5812 | switch (TREE_CODE (a->type)) |
4430 | 5807 | { | 5813 | { |
4431 | 5808 | case VOID_TYPE: | 5814 | case VOID_TYPE: |
4432 | 5809 | 5815 | ||
4433 | === modified file 'gcc/tree.h' | |||
4434 | --- gcc/tree.h 2010-11-26 12:03:32 +0000 | |||
4435 | +++ gcc/tree.h 2011-04-06 13:16:33 +0000 | |||
4436 | @@ -2913,26 +2913,6 @@ | |||
4437 | 2913 | 2913 | ||
4438 | 2914 | #define DECL_COMDAT_GROUP(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.comdat_group) | 2914 | #define DECL_COMDAT_GROUP(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.comdat_group) |
4439 | 2915 | 2915 | ||
4440 | 2916 | /* A replaceable function is one which may be replaced at link-time | ||
4441 | 2917 | with an entirely different definition, provided that the | ||
4442 | 2918 | replacement has the same type. For example, functions declared | ||
4443 | 2919 | with __attribute__((weak)) on most systems are replaceable. | ||
4444 | 2920 | |||
4445 | 2921 | COMDAT functions are not replaceable, since all definitions of the | ||
4446 | 2922 | function must be equivalent. It is important that COMDAT functions | ||
4447 | 2923 | not be treated as replaceable so that use of C++ template | ||
4448 | 2924 | instantiations is not penalized. | ||
4449 | 2925 | |||
4450 | 2926 | For example, DECL_REPLACEABLE is used to determine whether or not a | ||
4451 | 2927 | function (including a template instantiation) which is not | ||
4452 | 2928 | explicitly declared "inline" can be inlined. If the function is | ||
4453 | 2929 | DECL_REPLACEABLE then it is not safe to do the inlining, since the | ||
4454 | 2930 | implementation chosen at link-time may be different. However, a | ||
4455 | 2931 | function that is not DECL_REPLACEABLE can be inlined, since all | ||
4456 | 2932 | versions of the function will be functionally identical. */ | ||
4457 | 2933 | #define DECL_REPLACEABLE_P(NODE) \ | ||
4458 | 2934 | (!DECL_COMDAT (NODE) && !targetm.binds_local_p (NODE)) | ||
4459 | 2935 | |||
4460 | 2936 | /* The name of the object as the assembler will see it (but before any | 2916 | /* The name of the object as the assembler will see it (but before any |
4461 | 2937 | translations made by ASM_OUTPUT_LABELREF). Often this is the same | 2917 | translations made by ASM_OUTPUT_LABELREF). Often this is the same |
4462 | 2938 | as DECL_NAME. It is an IDENTIFIER_NODE. */ | 2918 | as DECL_NAME. It is an IDENTIFIER_NODE. */ |
4463 | @@ -5148,6 +5128,8 @@ | |||
4464 | 5148 | extern void finish_aliases_2 (void); | 5128 | extern void finish_aliases_2 (void); |
4465 | 5149 | extern tree emutls_decl (tree); | 5129 | extern tree emutls_decl (tree); |
4466 | 5150 | extern void remove_unreachable_alias_pairs (void); | 5130 | extern void remove_unreachable_alias_pairs (void); |
4467 | 5131 | extern bool decl_replaceable_p (tree); | ||
4468 | 5132 | extern bool decl_binds_to_current_def_p (tree); | ||
4469 | 5151 | 5133 | ||
4470 | 5152 | /* In stmt.c */ | 5134 | /* In stmt.c */ |
4471 | 5153 | extern void expand_computed_goto (tree); | 5135 | extern void expand_computed_goto (tree); |
4472 | 5154 | 5136 | ||
4473 | === modified file 'gcc/varasm.c' | |||
4474 | --- gcc/varasm.c 2010-08-13 11:53:46 +0000 | |||
4475 | +++ gcc/varasm.c 2011-04-06 13:16:33 +0000 | |||
4476 | @@ -6721,6 +6721,51 @@ | |||
4477 | 6721 | return local_p; | 6721 | return local_p; |
4478 | 6722 | } | 6722 | } |
4479 | 6723 | 6723 | ||
4480 | 6724 | /* Return true when references to DECL must bind to current definition in | ||
4481 | 6725 | final executable. | ||
4482 | 6726 | |||
4483 | 6727 | The condition is usually equivalent to whether the function binds to the | ||
4484 | 6728 | current module (shared library or executable), that is to binds_local_p. | ||
4485 | 6729 | We use this fact to avoid need for another target hook and implement | ||
4486 | 6730 | the logic using binds_local_p and just special cases where | ||
4487 | 6731 | decl_binds_to_current_def_p is stronger than binds local_p. In particular | ||
4488 | 6732 | the weak definitions (that can be overwritten at linktime by other | ||
4489 | 6733 | definition from different object file) and when resolution info is available | ||
4490 | 6734 | we simply use the knowledge passed to us by linker plugin. */ | ||
4491 | 6735 | bool | ||
4492 | 6736 | decl_binds_to_current_def_p (tree decl) | ||
4493 | 6737 | { | ||
4494 | 6738 | gcc_assert (DECL_P (decl)); | ||
4495 | 6739 | if (!TREE_PUBLIC (decl)) | ||
4496 | 6740 | return true; | ||
4497 | 6741 | if (!targetm.binds_local_p (decl)) | ||
4498 | 6742 | return false; | ||
4499 | 6743 | /* Otherwise we have to assume the worst for DECL_WEAK (hidden weaks | ||
4500 | 6744 | binds localy but still can be overwritten). | ||
4501 | 6745 | This rely on fact that binds_local_p behave as decl_replaceable_p | ||
4502 | 6746 | for all other declaration types. */ | ||
4503 | 6747 | return !DECL_WEAK (decl); | ||
4504 | 6748 | } | ||
4505 | 6749 | |||
4506 | 6750 | /* A replaceable function or variable is one which may be replaced | ||
4507 | 6751 | at link-time with an entirely different definition, provided that the | ||
4508 | 6752 | replacement has the same type. For example, functions declared | ||
4509 | 6753 | with __attribute__((weak)) on most systems are replaceable. | ||
4510 | 6754 | |||
4511 | 6755 | COMDAT functions are not replaceable, since all definitions of the | ||
4512 | 6756 | function must be equivalent. It is important that COMDAT functions | ||
4513 | 6757 | not be treated as replaceable so that use of C++ template | ||
4514 | 6758 | instantiations is not penalized. */ | ||
4515 | 6759 | |||
4516 | 6760 | bool | ||
4517 | 6761 | decl_replaceable_p (tree decl) | ||
4518 | 6762 | { | ||
4519 | 6763 | gcc_assert (DECL_P (decl)); | ||
4520 | 6764 | if (!TREE_PUBLIC (decl) || DECL_COMDAT (decl)) | ||
4521 | 6765 | return false; | ||
4522 | 6766 | return !decl_binds_to_current_def_p (decl); | ||
4523 | 6767 | } | ||
4524 | 6768 | |||
4525 | 6724 | /* Default function to output code that will globalize a label. A | 6769 | /* Default function to output code that will globalize a label. A |
4526 | 6725 | target must define GLOBAL_ASM_OP or provide its own function to | 6770 | target must define GLOBAL_ASM_OP or provide its own function to |
4527 | 6726 | globalize a label. */ | 6771 | globalize a label. */ |
4528 | 6727 | 6772 | ||
4529 | === modified file 'libcpp/ChangeLog' | |||
4530 | --- libcpp/ChangeLog 2011-01-04 23:18:29 +0000 | |||
4531 | +++ libcpp/ChangeLog 2011-04-06 13:16:33 +0000 | |||
4532 | @@ -1,4 +1,13 @@ | |||
4534 | 1 | 2011-11-04 Eric Botcazou <ebotcazou@adacore.com> | 1 | 2011-03-21 Michael Meissner <meissner@linux.vnet.ibm.com> |
4535 | 2 | |||
4536 | 3 | PR preprocessor/48192 | ||
4537 | 4 | Backport from trunk | ||
4538 | 5 | * directives.c (do_ifdef): Do not consider conditional macros as | ||
4539 | 6 | being defined. | ||
4540 | 7 | (do_ifndef): Ditto. | ||
4541 | 8 | * expr.c (parse_defined): Ditto. | ||
4542 | 9 | |||
4543 | 10 | 2011-01-04 Eric Botcazou <ebotcazou@adacore.com> | ||
4544 | 2 | Jakub Jelinek <jakub@redhat.com> | 11 | Jakub Jelinek <jakub@redhat.com> |
4545 | 3 | 12 | ||
4546 | 4 | PR preprocessor/39213 | 13 | PR preprocessor/39213 |
4547 | 5 | 14 | ||
4548 | === modified file 'libcpp/directives.c' | |||
4549 | --- libcpp/directives.c 2011-01-04 23:18:29 +0000 | |||
4550 | +++ libcpp/directives.c 2011-04-06 13:16:33 +0000 | |||
4551 | @@ -1793,7 +1793,12 @@ | |||
4552 | 1793 | 1793 | ||
4553 | 1794 | if (node) | 1794 | if (node) |
4554 | 1795 | { | 1795 | { |
4556 | 1796 | skip = node->type != NT_MACRO; | 1796 | /* Do not treat conditional macros as being defined. This is due to |
4557 | 1797 | the powerpc and spu ports using conditional macros for 'vector', | ||
4558 | 1798 | 'bool', and 'pixel' to act as conditional keywords. This messes | ||
4559 | 1799 | up tests like #ifndef bool. */ | ||
4560 | 1800 | skip = (node->type != NT_MACRO | ||
4561 | 1801 | || ((node->flags & NODE_CONDITIONAL) != 0)); | ||
4562 | 1797 | _cpp_mark_macro_used (node); | 1802 | _cpp_mark_macro_used (node); |
4563 | 1798 | if (!(node->flags & NODE_USED)) | 1803 | if (!(node->flags & NODE_USED)) |
4564 | 1799 | { | 1804 | { |
4565 | @@ -1831,7 +1836,12 @@ | |||
4566 | 1831 | 1836 | ||
4567 | 1832 | if (node) | 1837 | if (node) |
4568 | 1833 | { | 1838 | { |
4570 | 1834 | skip = node->type == NT_MACRO; | 1839 | /* Do not treat conditional macros as being defined. This is due to |
4571 | 1840 | the powerpc and spu ports using conditional macros for 'vector', | ||
4572 | 1841 | 'bool', and 'pixel' to act as conditional keywords. This messes | ||
4573 | 1842 | up tests like #ifndef bool. */ | ||
4574 | 1843 | skip = (node->type == NT_MACRO | ||
4575 | 1844 | && ((node->flags & NODE_CONDITIONAL) == 0)); | ||
4576 | 1835 | _cpp_mark_macro_used (node); | 1845 | _cpp_mark_macro_used (node); |
4577 | 1836 | if (!(node->flags & NODE_USED)) | 1846 | if (!(node->flags & NODE_USED)) |
4578 | 1837 | { | 1847 | { |
4579 | 1838 | 1848 | ||
4580 | === modified file 'libcpp/expr.c' | |||
4581 | --- libcpp/expr.c 2010-01-01 18:08:17 +0000 | |||
4582 | +++ libcpp/expr.c 2011-04-06 13:16:33 +0000 | |||
4583 | @@ -711,10 +711,15 @@ | |||
4584 | 711 | 711 | ||
4585 | 712 | pfile->state.prevent_expansion--; | 712 | pfile->state.prevent_expansion--; |
4586 | 713 | 713 | ||
4587 | 714 | /* Do not treat conditional macros as being defined. This is due to the | ||
4588 | 715 | powerpc and spu ports using conditional macros for 'vector', 'bool', and | ||
4589 | 716 | 'pixel' to act as conditional keywords. This messes up tests like #ifndef | ||
4590 | 717 | bool. */ | ||
4591 | 714 | result.unsignedp = false; | 718 | result.unsignedp = false; |
4592 | 715 | result.high = 0; | 719 | result.high = 0; |
4593 | 716 | result.overflow = false; | 720 | result.overflow = false; |
4595 | 717 | result.low = node && node->type == NT_MACRO; | 721 | result.low = (node && node->type == NT_MACRO |
4596 | 722 | && (node->flags & NODE_CONDITIONAL) == 0); | ||
4597 | 718 | return result; | 723 | return result; |
4598 | 719 | } | 724 | } |
4599 | 720 | 725 | ||
4600 | 721 | 726 | ||
4601 | === modified file 'libgcc/ChangeLog' | |||
4602 | --- libgcc/ChangeLog 2010-12-16 12:32:01 +0000 | |||
4603 | +++ libgcc/ChangeLog 2011-04-06 13:16:33 +0000 | |||
4604 | @@ -1,3 +1,15 @@ | |||
4605 | 1 | 2011-02-23 Nathan Froyd <froydnj@codesourcery.com> | ||
4606 | 2 | |||
4607 | 3 | PR target/43810 | ||
4608 | 4 | |||
4609 | 5 | Backport from mainline: | ||
4610 | 6 | 2010-07-23 Nathan Froyd <froydnj@codesourcery.com> | ||
4611 | 7 | |||
4612 | 8 | * config.host (powerpc*-eabispe*): Set tmake_file. | ||
4613 | 9 | (powerpc*-eabi*): Likewise. | ||
4614 | 10 | * config/rs6000/t-ppccomm (EXTRA_PARTS): Add crtbegin, crtend, | ||
4615 | 11 | crtbeginS, crtendS, crtbeginT. | ||
4616 | 12 | |||
4617 | 1 | 2010-12-16 Release Manager | 13 | 2010-12-16 Release Manager |
4618 | 2 | 14 | ||
4619 | 3 | * GCC 4.5.2 released. | 15 | * GCC 4.5.2 released. |
4620 | 4 | 16 | ||
4621 | === modified file 'libgcc/config.host' | |||
4622 | --- libgcc/config.host 2010-10-04 00:50:43 +0000 | |||
4623 | +++ libgcc/config.host 2011-04-06 13:16:33 +0000 | |||
4624 | @@ -459,6 +459,7 @@ | |||
4625 | 459 | powerpc-*-netbsd*) | 459 | powerpc-*-netbsd*) |
4626 | 460 | ;; | 460 | ;; |
4627 | 461 | powerpc-*-eabispe*) | 461 | powerpc-*-eabispe*) |
4628 | 462 | tmake_file="${tmake_file} rs6000/t-ppccomm" | ||
4629 | 462 | ;; | 463 | ;; |
4630 | 463 | powerpc-*-eabisimaltivec*) | 464 | powerpc-*-eabisimaltivec*) |
4631 | 464 | ;; | 465 | ;; |
4632 | @@ -469,6 +470,7 @@ | |||
4633 | 469 | powerpc-*-eabialtivec*) | 470 | powerpc-*-eabialtivec*) |
4634 | 470 | ;; | 471 | ;; |
4635 | 471 | powerpc-*-eabi*) | 472 | powerpc-*-eabi*) |
4636 | 473 | tmake_file="${tmake_file} rs6000/t-ppccomm" | ||
4637 | 472 | ;; | 474 | ;; |
4638 | 473 | powerpc-*-rtems*) | 475 | powerpc-*-rtems*) |
4639 | 474 | ;; | 476 | ;; |
4640 | 475 | 477 | ||
4641 | === modified file 'libgcc/config/rs6000/t-ppccomm' | |||
4642 | --- libgcc/config/rs6000/t-ppccomm 2008-06-26 13:15:49 +0000 | |||
4643 | +++ libgcc/config/rs6000/t-ppccomm 2011-04-06 13:16:33 +0000 | |||
4644 | @@ -15,7 +15,9 @@ | |||
4645 | 15 | e500crtsavg64gpr.S \ | 15 | e500crtsavg64gpr.S \ |
4646 | 16 | e500crtsavg64gprctr.S | 16 | e500crtsavg64gprctr.S |
4647 | 17 | 17 | ||
4649 | 18 | EXTRA_PARTS += ecrti$(objext) ecrtn$(objext) ncrti$(objext) ncrtn$(objext) | 18 | EXTRA_PARTS += crtbegin$(objext) crtend$(objext) \ |
4650 | 19 | crtbeginS$(objext) crtendS$(objext) crtbeginT$(objext) \ | ||
4651 | 20 | ecrti$(objext) ecrtn$(objext) ncrti$(objext) ncrtn$(objext) | ||
4652 | 19 | 21 | ||
4653 | 20 | # We build {e,n}crti.o and {e,n}crtn.o, which serve to add begin and | 22 | # We build {e,n}crti.o and {e,n}crtn.o, which serve to add begin and |
4654 | 21 | # end labels to all of the special sections used when we link using gcc. | 23 | # end labels to all of the special sections used when we link using gcc. |
4655 | 22 | 24 | ||
4656 | === modified file 'libgfortran/ChangeLog' | |||
4657 | --- libgfortran/ChangeLog 2010-12-16 12:30:06 +0000 | |||
4658 | +++ libgfortran/ChangeLog 2011-04-06 13:16:33 +0000 | |||
4659 | @@ -1,3 +1,153 @@ | |||
4660 | 1 | 2011-03-13 Thomas Koenig <tkoenig@gcc.gnu.org> | ||
4661 | 2 | |||
4662 | 3 | PR libfortran/48066 | ||
4663 | 4 | Backport from trunk | ||
4664 | 5 | * m4/ifunction.m4: If return array is empty, return. | ||
4665 | 6 | * m4/ifunction_logical.m4: Likewise. | ||
4666 | 7 | * generated/all_l16.c: Regenerated. | ||
4667 | 8 | * generated/all_l1.c: Regenerated. | ||
4668 | 9 | * generated/all_l2.c: Regenerated. | ||
4669 | 10 | * generated/all_l4.c: Regenerated. | ||
4670 | 11 | * generated/all_l8.c: Regenerated. | ||
4671 | 12 | * generated/any_l16.c: Regenerated. | ||
4672 | 13 | * generated/any_l1.c: Regenerated. | ||
4673 | 14 | * generated/any_l2.c: Regenerated. | ||
4674 | 15 | * generated/any_l4.c: Regenerated. | ||
4675 | 16 | * generated/any_l8.c: Regenerated. | ||
4676 | 17 | * generated/count_16_l.c: Regenerated. | ||
4677 | 18 | * generated/count_1_l.c: Regenerated. | ||
4678 | 19 | * generated/count_2_l.c: Regenerated. | ||
4679 | 20 | * generated/count_4_l.c: Regenerated. | ||
4680 | 21 | * generated/count_8_l.c: Regenerated. | ||
4681 | 22 | * generated/maxloc1_16_i16.c: Regenerated. | ||
4682 | 23 | * generated/maxloc1_16_i1.c: Regenerated. | ||
4683 | 24 | * generated/maxloc1_16_i2.c: Regenerated. | ||
4684 | 25 | * generated/maxloc1_16_i4.c: Regenerated. | ||
4685 | 26 | * generated/maxloc1_16_i8.c: Regenerated. | ||
4686 | 27 | * generated/maxloc1_16_r10.c: Regenerated. | ||
4687 | 28 | * generated/maxloc1_16_r16.c: Regenerated. | ||
4688 | 29 | * generated/maxloc1_16_r4.c: Regenerated. | ||
4689 | 30 | * generated/maxloc1_16_r8.c: Regenerated. | ||
4690 | 31 | * generated/maxloc1_4_i16.c: Regenerated. | ||
4691 | 32 | * generated/maxloc1_4_i1.c: Regenerated. | ||
4692 | 33 | * generated/maxloc1_4_i2.c: Regenerated. | ||
4693 | 34 | * generated/maxloc1_4_i4.c: Regenerated. | ||
4694 | 35 | * generated/maxloc1_4_i8.c: Regenerated. | ||
4695 | 36 | * generated/maxloc1_4_r10.c: Regenerated. | ||
4696 | 37 | * generated/maxloc1_4_r16.c: Regenerated. | ||
4697 | 38 | * generated/maxloc1_4_r4.c: Regenerated. | ||
4698 | 39 | * generated/maxloc1_4_r8.c: Regenerated. | ||
4699 | 40 | * generated/maxloc1_8_i16.c: Regenerated. | ||
4700 | 41 | * generated/maxloc1_8_i1.c: Regenerated. | ||
4701 | 42 | * generated/maxloc1_8_i2.c: Regenerated. | ||
4702 | 43 | * generated/maxloc1_8_i4.c: Regenerated. | ||
4703 | 44 | * generated/maxloc1_8_i8.c: Regenerated. | ||
4704 | 45 | * generated/maxloc1_8_r10.c: Regenerated. | ||
4705 | 46 | * generated/maxloc1_8_r16.c: Regenerated. | ||
4706 | 47 | * generated/maxloc1_8_r4.c: Regenerated. | ||
4707 | 48 | * generated/maxloc1_8_r8.c: Regenerated. | ||
4708 | 49 | * generated/maxval_i16.c: Regenerated. | ||
4709 | 50 | * generated/maxval_i1.c: Regenerated. | ||
4710 | 51 | * generated/maxval_i2.c: Regenerated. | ||
4711 | 52 | * generated/maxval_i4.c: Regenerated. | ||
4712 | 53 | * generated/maxval_i8.c: Regenerated. | ||
4713 | 54 | * generated/maxval_r10.c: Regenerated. | ||
4714 | 55 | * generated/maxval_r16.c: Regenerated. | ||
4715 | 56 | * generated/maxval_r4.c: Regenerated. | ||
4716 | 57 | * generated/maxval_r8.c: Regenerated. | ||
4717 | 58 | * generated/minloc1_16_i16.c: Regenerated. | ||
4718 | 59 | * generated/minloc1_16_i1.c: Regenerated. | ||
4719 | 60 | * generated/minloc1_16_i2.c: Regenerated. | ||
4720 | 61 | * generated/minloc1_16_i4.c: Regenerated. | ||
4721 | 62 | * generated/minloc1_16_i8.c: Regenerated. | ||
4722 | 63 | * generated/minloc1_16_r10.c: Regenerated. | ||
4723 | 64 | * generated/minloc1_16_r16.c: Regenerated. | ||
4724 | 65 | * generated/minloc1_16_r4.c: Regenerated. | ||
4725 | 66 | * generated/minloc1_16_r8.c: Regenerated. | ||
4726 | 67 | * generated/minloc1_4_i16.c: Regenerated. | ||
4727 | 68 | * generated/minloc1_4_i1.c: Regenerated. | ||
4728 | 69 | * generated/minloc1_4_i2.c: Regenerated. | ||
4729 | 70 | * generated/minloc1_4_i4.c: Regenerated. | ||
4730 | 71 | * generated/minloc1_4_i8.c: Regenerated. | ||
4731 | 72 | * generated/minloc1_4_r10.c: Regenerated. | ||
4732 | 73 | * generated/minloc1_4_r16.c: Regenerated. | ||
4733 | 74 | * generated/minloc1_4_r4.c: Regenerated. | ||
4734 | 75 | * generated/minloc1_4_r8.c: Regenerated. | ||
4735 | 76 | * generated/minloc1_8_i16.c: Regenerated. | ||
4736 | 77 | * generated/minloc1_8_i1.c: Regenerated. | ||
4737 | 78 | * generated/minloc1_8_i2.c: Regenerated. | ||
4738 | 79 | * generated/minloc1_8_i4.c: Regenerated. | ||
4739 | 80 | * generated/minloc1_8_i8.c: Regenerated. | ||
4740 | 81 | * generated/minloc1_8_r10.c: Regenerated. | ||
4741 | 82 | * generated/minloc1_8_r16.c: Regenerated. | ||
4742 | 83 | * generated/minloc1_8_r4.c: Regenerated. | ||
4743 | 84 | * generated/minloc1_8_r8.c: Regenerated. | ||
4744 | 85 | * generated/minval_i16.c: Regenerated. | ||
4745 | 86 | * generated/minval_i1.c: Regenerated. | ||
4746 | 87 | * generated/minval_i2.c: Regenerated. | ||
4747 | 88 | * generated/minval_i4.c: Regenerated. | ||
4748 | 89 | * generated/minval_i8.c: Regenerated. | ||
4749 | 90 | * generated/minval_r10.c: Regenerated. | ||
4750 | 91 | * generated/minval_r16.c: Regenerated. | ||
4751 | 92 | * generated/minval_r4.c: Regenerated. | ||
4752 | 93 | * generated/minval_r8.c: Regenerated. | ||
4753 | 94 | * generated/product_c10.c: Regenerated. | ||
4754 | 95 | * generated/product_c16.c: Regenerated. | ||
4755 | 96 | * generated/product_c4.c: Regenerated. | ||
4756 | 97 | * generated/product_c8.c: Regenerated. | ||
4757 | 98 | * generated/product_i16.c: Regenerated. | ||
4758 | 99 | * generated/product_i1.c: Regenerated. | ||
4759 | 100 | * generated/product_i2.c: Regenerated. | ||
4760 | 101 | * generated/product_i4.c: Regenerated. | ||
4761 | 102 | * generated/product_i8.c: Regenerated. | ||
4762 | 103 | * generated/product_r10.c: Regenerated. | ||
4763 | 104 | * generated/product_r16.c: Regenerated. | ||
4764 | 105 | * generated/product_r4.c: Regenerated. | ||
4765 | 106 | * generated/product_r8.c: Regenerated. | ||
4766 | 107 | * generated/sum_c10.c: Regenerated. | ||
4767 | 108 | * generated/sum_c16.c: Regenerated. | ||
4768 | 109 | * generated/sum_c4.c: Regenerated. | ||
4769 | 110 | * generated/sum_c8.c: Regenerated. | ||
4770 | 111 | * generated/sum_i16.c: Regenerated. | ||
4771 | 112 | * generated/sum_i1.c: Regenerated. | ||
4772 | 113 | * generated/sum_i2.c: Regenerated. | ||
4773 | 114 | * generated/sum_i4.c: Regenerated. | ||
4774 | 115 | * generated/sum_i8.c: Regenerated. | ||
4775 | 116 | * generated/sum_r10.c: Regenerated. | ||
4776 | 117 | * generated/sum_r16.c: Regenerated. | ||
4777 | 118 | * generated/sum_r4.c: Regenerated. | ||
4778 | 119 | * generated/sum_r8.c: Regenerated. | ||
4779 | 120 | |||
4780 | 121 | 2011-03-06 Jerry DeLisle <jvdelisle@gcc.gnu.org> | ||
4781 | 122 | |||
4782 | 123 | PR libgfortran/47778 | ||
4783 | 124 | * io/list_read.c (namelist_read): Intialize the error string buffere. | ||
4784 | 125 | If pprev_nl was used during the previous namelist read and the rank | ||
4785 | 126 | was zero, reset the pointer to NULL for the next namelist read. | ||
4786 | 127 | |||
4787 | 128 | 2011-03-04 Jakub Jelinek <jakub@redhat.com> | ||
4788 | 129 | |||
4789 | 130 | Backport from mainline | ||
4790 | 131 | PR fortran/47878 | ||
4791 | 132 | * io/transfer.c (read_sf): Call fbuf_getptr only at the end, | ||
4792 | 133 | and subtract n, dtp->u.p.sf_seen_eor and seen_comma from it. | ||
4793 | 134 | |||
4794 | 135 | 2011-03-04 Janne Blomqvist <jb@gcc.gnu.org> | ||
4795 | 136 | Jerry DeLisle <jvdelisle@gcc.gnu.org> | ||
4796 | 137 | |||
4797 | 138 | Backport from mainline | ||
4798 | 139 | PR libfortran/47694 | ||
4799 | 140 | * io/fbuf.h (fbuf_getptr): New inline function. | ||
4800 | 141 | * io/transfer.c (read_sf): Use fbuf_getptr and fbuf_getc to scan | ||
4801 | 142 | through the string instead of fbuf_read. | ||
4802 | 143 | |||
4803 | 144 | 2011-02-22 Tobias Burnus <burnus@net-b.de> | ||
4804 | 145 | Kai-Uwe Eckhardt <kuehro@gmx.de> | ||
4805 | 146 | |||
4806 | 147 | PR libfortran/47830 | ||
4807 | 148 | * intrinsics/c99_functions.c (roundl): Make C valid for | ||
4808 | 149 | HAVE_NEXTAFTERL. | ||
4809 | 150 | |||
4810 | 1 | 2010-12-16 Release Manager | 151 | 2010-12-16 Release Manager |
4811 | 2 | 152 | ||
4812 | 3 | * GCC 4.5.2 released. | 153 | * GCC 4.5.2 released. |
4813 | 4 | 154 | ||
4814 | === modified file 'libgfortran/generated/all_l1.c' | |||
4815 | --- libgfortran/generated/all_l1.c 2009-06-21 18:24:55 +0000 | |||
4816 | +++ libgfortran/generated/all_l1.c 2011-04-06 13:16:33 +0000 | |||
4817 | @@ -142,7 +142,7 @@ | |||
4818 | 142 | count[n] = 0; | 142 | count[n] = 0; |
4819 | 143 | dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); | 143 | dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); |
4820 | 144 | if (extent[n] <= 0) | 144 | if (extent[n] <= 0) |
4822 | 145 | len = 0; | 145 | return; |
4823 | 146 | } | 146 | } |
4824 | 147 | 147 | ||
4825 | 148 | base = array->data; | 148 | base = array->data; |
4826 | 149 | 149 | ||
4827 | === modified file 'libgfortran/generated/all_l16.c' | |||
4828 | --- libgfortran/generated/all_l16.c 2009-06-21 18:24:55 +0000 | |||
4829 | +++ libgfortran/generated/all_l16.c 2011-04-06 13:16:33 +0000 | |||
4830 | @@ -142,7 +142,7 @@ | |||
4831 | 142 | count[n] = 0; | 142 | count[n] = 0; |
4832 | 143 | dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); | 143 | dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); |
4833 | 144 | if (extent[n] <= 0) | 144 | if (extent[n] <= 0) |
4835 | 145 | len = 0; | 145 | return; |
4836 | 146 | } | 146 | } |
4837 | 147 | 147 | ||
4838 | 148 | base = array->data; | 148 | base = array->data; |
4839 | 149 | 149 | ||
4840 | === modified file 'libgfortran/generated/all_l2.c' | |||
4841 | --- libgfortran/generated/all_l2.c 2009-06-21 18:24:55 +0000 | |||
4842 | +++ libgfortran/generated/all_l2.c 2011-04-06 13:16:33 +0000 | |||
4843 | @@ -142,7 +142,7 @@ | |||
4844 | 142 | count[n] = 0; | 142 | count[n] = 0; |
4845 | 143 | dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); | 143 | dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); |
4846 | 144 | if (extent[n] <= 0) | 144 | if (extent[n] <= 0) |
4848 | 145 | len = 0; | 145 | return; |
4849 | 146 | } | 146 | } |
4850 | 147 | 147 | ||
4851 | 148 | base = array->data; | 148 | base = array->data; |
4852 | 149 | 149 | ||
4853 | === modified file 'libgfortran/generated/all_l4.c' | |||
4854 | --- libgfortran/generated/all_l4.c 2009-06-21 18:24:55 +0000 | |||
4855 | +++ libgfortran/generated/all_l4.c 2011-04-06 13:16:33 +0000 | |||
4856 | @@ -142,7 +142,7 @@ | |||
4857 | 142 | count[n] = 0; | 142 | count[n] = 0; |
4858 | 143 | dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); | 143 | dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); |
4859 | 144 | if (extent[n] <= 0) | 144 | if (extent[n] <= 0) |
4861 | 145 | len = 0; | 145 | return; |
4862 | 146 | } | 146 | } |
4863 | 147 | 147 | ||
4864 | 148 | base = array->data; | 148 | base = array->data; |
4865 | 149 | 149 | ||
4866 | === modified file 'libgfortran/generated/all_l8.c' | |||
4867 | --- libgfortran/generated/all_l8.c 2009-06-21 18:24:55 +0000 | |||
4868 | +++ libgfortran/generated/all_l8.c 2011-04-06 13:16:33 +0000 | |||
4869 | @@ -142,7 +142,7 @@ | |||
4870 | 142 | count[n] = 0; | 142 | count[n] = 0; |
4871 | 143 | dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); | 143 | dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); |
4872 | 144 | if (extent[n] <= 0) | 144 | if (extent[n] <= 0) |
4874 | 145 | len = 0; | 145 | return; |
4875 | 146 | } | 146 | } |
4876 | 147 | 147 | ||
4877 | 148 | base = array->data; | 148 | base = array->data; |
4878 | 149 | 149 | ||
4879 | === modified file 'libgfortran/generated/any_l1.c' | |||
4880 | --- libgfortran/generated/any_l1.c 2009-06-21 18:24:55 +0000 | |||
4881 | +++ libgfortran/generated/any_l1.c 2011-04-06 13:16:33 +0000 | |||
4882 | @@ -142,7 +142,7 @@ | |||
4883 | 142 | count[n] = 0; | 142 | count[n] = 0; |
4884 | 143 | dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); | 143 | dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); |
4885 | 144 | if (extent[n] <= 0) | 144 | if (extent[n] <= 0) |
4887 | 145 | len = 0; | 145 | return; |
4888 | 146 | } | 146 | } |
4889 | 147 | 147 | ||
4890 | 148 | base = array->data; | 148 | base = array->data; |
4891 | 149 | 149 | ||
4892 | === modified file 'libgfortran/generated/any_l16.c' | |||
4893 | --- libgfortran/generated/any_l16.c 2009-06-21 18:24:55 +0000 | |||
4894 | +++ libgfortran/generated/any_l16.c 2011-04-06 13:16:33 +0000 | |||
4895 | @@ -142,7 +142,7 @@ | |||
4896 | 142 | count[n] = 0; | 142 | count[n] = 0; |
4897 | 143 | dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); | 143 | dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); |
4898 | 144 | if (extent[n] <= 0) | 144 | if (extent[n] <= 0) |
4900 | 145 | len = 0; | 145 | return; |
4901 | 146 | } | 146 | } |
4902 | 147 | 147 | ||
4903 | 148 | base = array->data; | 148 | base = array->data; |
4904 | 149 | 149 | ||
4905 | === modified file 'libgfortran/generated/any_l2.c' | |||
4906 | --- libgfortran/generated/any_l2.c 2009-06-21 18:24:55 +0000 | |||
4907 | +++ libgfortran/generated/any_l2.c 2011-04-06 13:16:33 +0000 | |||
4908 | @@ -142,7 +142,7 @@ | |||
4909 | 142 | count[n] = 0; | 142 | count[n] = 0; |
4910 | 143 | dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); | 143 | dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); |
4911 | 144 | if (extent[n] <= 0) | 144 | if (extent[n] <= 0) |
4913 | 145 | len = 0; | 145 | return; |
4914 | 146 | } | 146 | } |
4915 | 147 | 147 | ||
4916 | 148 | base = array->data; | 148 | base = array->data; |
4917 | 149 | 149 | ||
4918 | === modified file 'libgfortran/generated/any_l4.c' | |||
4919 | --- libgfortran/generated/any_l4.c 2009-06-21 18:24:55 +0000 | |||
4920 | +++ libgfortran/generated/any_l4.c 2011-04-06 13:16:33 +0000 | |||
4921 | @@ -142,7 +142,7 @@ | |||
4922 | 142 | count[n] = 0; | 142 | count[n] = 0; |
4923 | 143 | dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); | 143 | dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); |
4924 | 144 | if (extent[n] <= 0) | 144 | if (extent[n] <= 0) |
4926 | 145 | len = 0; | 145 | return; |
4927 | 146 | } | 146 | } |
4928 | 147 | 147 | ||
4929 | 148 | base = array->data; | 148 | base = array->data; |
4930 | 149 | 149 | ||
4931 | === modified file 'libgfortran/generated/any_l8.c' | |||
4932 | --- libgfortran/generated/any_l8.c 2009-06-21 18:24:55 +0000 | |||
4933 | +++ libgfortran/generated/any_l8.c 2011-04-06 13:16:33 +0000 | |||
4934 | @@ -142,7 +142,7 @@ | |||
4935 | 142 | count[n] = 0; | 142 | count[n] = 0; |
4936 | 143 | dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); | 143 | dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); |
4937 | 144 | if (extent[n] <= 0) | 144 | if (extent[n] <= 0) |
4939 | 145 | len = 0; | 145 | return; |
4940 | 146 | } | 146 | } |
4941 | 147 | 147 | ||
4942 | 148 | base = array->data; | 148 | base = array->data; |
4943 | 149 | 149 | ||
4944 | === modified file 'libgfortran/generated/count_16_l.c' | |||
4945 | --- libgfortran/generated/count_16_l.c 2009-06-21 18:24:55 +0000 | |||
4946 | +++ libgfortran/generated/count_16_l.c 2011-04-06 13:16:33 +0000 | |||
4947 | @@ -142,7 +142,7 @@ | |||
4948 | 142 | count[n] = 0; | 142 | count[n] = 0; |
4949 | 143 | dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); | 143 | dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); |
4950 | 144 | if (extent[n] <= 0) | 144 | if (extent[n] <= 0) |
4952 | 145 | len = 0; | 145 | return; |
4953 | 146 | } | 146 | } |
4954 | 147 | 147 | ||
4955 | 148 | base = array->data; | 148 | base = array->data; |
4956 | 149 | 149 | ||
4957 | === modified file 'libgfortran/generated/count_1_l.c' | |||
4958 | --- libgfortran/generated/count_1_l.c 2009-06-21 18:24:55 +0000 | |||
4959 | +++ libgfortran/generated/count_1_l.c 2011-04-06 13:16:33 +0000 | |||
4960 | @@ -142,7 +142,7 @@ | |||
4961 | 142 | count[n] = 0; | 142 | count[n] = 0; |
4962 | 143 | dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); | 143 | dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); |
4963 | 144 | if (extent[n] <= 0) | 144 | if (extent[n] <= 0) |
4965 | 145 | len = 0; | 145 | return; |
4966 | 146 | } | 146 | } |
4967 | 147 | 147 | ||
4968 | 148 | base = array->data; | 148 | base = array->data; |
4969 | 149 | 149 | ||
4970 | === modified file 'libgfortran/generated/count_2_l.c' | |||
4971 | --- libgfortran/generated/count_2_l.c 2009-06-21 18:24:55 +0000 | |||
4972 | +++ libgfortran/generated/count_2_l.c 2011-04-06 13:16:33 +0000 | |||
4973 | @@ -142,7 +142,7 @@ | |||
4974 | 142 | count[n] = 0; | 142 | count[n] = 0; |
4975 | 143 | dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); | 143 | dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); |
4976 | 144 | if (extent[n] <= 0) | 144 | if (extent[n] <= 0) |
4978 | 145 | len = 0; | 145 | return; |
4979 | 146 | } | 146 | } |
4980 | 147 | 147 | ||
4981 | 148 | base = array->data; | 148 | base = array->data; |
4982 | 149 | 149 | ||
4983 | === modified file 'libgfortran/generated/count_4_l.c' | |||
4984 | --- libgfortran/generated/count_4_l.c 2009-06-21 18:24:55 +0000 | |||
4985 | +++ libgfortran/generated/count_4_l.c 2011-04-06 13:16:33 +0000 | |||
4986 | @@ -142,7 +142,7 @@ | |||
4987 | 142 | count[n] = 0; | 142 | count[n] = 0; |
4988 | 143 | dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); | 143 | dstride[n] = GFC_DESCRIPTOR_STRIDE(retarray,n); |
4989 | 144 | if (extent[n] <= 0) | 144 | if (extent[n] <= 0) |
4991 | 145 | len = 0; | 145 | return; |
4992 | 146 | } | 146 | } |
4993 | 147 | 147 | ||
4994 | 148 | base = array->data; | 148 | base = array->data; |
4995 | 149 | 149 | ||
4996 | === modified file 'libgfortran/generated/count_8_l.c' | |||
4997 | --- libgfortran/generated/count_8_l.c 2009-06-21 18:24:55 +0000 | |||
4998 | +++ libgfortran/generated/count_8_l.c 2011-04-06 13:16:33 +0000 | |||
4999 | @@ -142,7 +142,7 @@ | |||
5000 | 142 | count[n] = 0; | 142 | count[n] = 0; |
cbuild has taken a snapshot of this branch at r99490 and queued it for build.
The snapshot is available at: ex.seabright. co.nz/snapshots /gcc-linaro- 4.5+bzr99490~ ams-codesourcer y~4.5-merge- svn172013. tar.xdelta3. xz
http://
and will be built on the following builders:
a8-builder a9-builder i686 x86_64
You can track the build queue at: ex.seabright. co.nz/helpers/ scheduler
http://
cbuild-snapshot: gcc-linaro- 4.5+bzr99490~ ams-codesourcer y~4.5-merge- svn172013
cbuild-ancestor: lp:gcc-linaro+bzr99489
cbuild-state: check