summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog823
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/LANGUAGES2
-rw-r--r--gcc/Makefile.in307
-rw-r--r--gcc/ada/ChangeLog36
-rw-r--r--gcc/ada/gcc-interface/decl.c23
-rw-r--r--gcc/ada/gcc-interface/utils.c2
-rw-r--r--gcc/ada/gnatlink.adb137
-rw-r--r--gcc/ada/link.c34
-rw-r--r--gcc/ada/mlib-utl.adb117
-rw-r--r--gcc/alias.c59
-rw-r--r--gcc/auto-inc-dec.c2
-rw-r--r--gcc/bb-reorder.c4
-rw-r--r--gcc/builtins.c4
-rw-r--r--gcc/c-decl.c16
-rw-r--r--gcc/c-family/ChangeLog20
-rw-r--r--gcc/c-family/c-common.c2
-rw-r--r--gcc/c-family/c-common.h2
-rw-r--r--gcc/c-family/c-opts.c1
-rw-r--r--gcc/c-family/c.opt2
-rw-r--r--gcc/c-tree.h1
-rw-r--r--gcc/c-typeck.c12
-rw-r--r--gcc/calls.c26
-rw-r--r--gcc/cfgcleanup.c4
-rw-r--r--gcc/cfgexpand.c1
-rw-r--r--gcc/cfgrtl.c96
-rw-r--r--gcc/cgraph.c8
-rw-r--r--gcc/cgraph.h6
-rw-r--r--gcc/cgraphunit.c44
-rw-r--r--gcc/collect2-aix.h8
-rw-r--r--gcc/collect2.c4
-rw-r--r--gcc/combine.c3
-rw-r--r--gcc/common/config/ia64/ia64-common.c4
-rw-r--r--gcc/compare-elim.c2
-rw-r--r--gcc/config.gcc2
-rw-r--r--gcc/config.in15
-rw-r--r--gcc/config/alpha/alpha.c1
-rw-r--r--gcc/config/alpha/ev6.md4
-rw-r--r--gcc/config/alpha/vms.h2
-rw-r--r--gcc/config/arm/README-interworking2
-rw-r--r--gcc/config/arm/arm.c23
-rw-r--r--gcc/config/arm/iterators.md2
-rw-r--r--gcc/config/arm/t-arm2
-rw-r--r--gcc/config/arm/vxworks.h2
-rw-r--r--gcc/config/avr/avr.c6
-rw-r--r--gcc/config/avr/avr.h10
-rw-r--r--gcc/config/avr/avr.md2
-rw-r--r--gcc/config/avr/builtins.def2
-rw-r--r--gcc/config/avr/elf.h2
-rw-r--r--gcc/config/avr/t-avr2
-rw-r--r--gcc/config/bfin/bfin.c1
-rw-r--r--gcc/config/c6x/c6x.c4
-rw-r--r--gcc/config/cr16/cr16.c2
-rw-r--r--gcc/config/cr16/cr16.md2
-rw-r--r--gcc/config/cris/cris.h13
-rw-r--r--gcc/config/cris/cris.md10
-rw-r--r--gcc/config/cris/cris.opt4
-rw-r--r--gcc/config/darwin.c2
-rw-r--r--gcc/config/darwin.h8
-rw-r--r--gcc/config/darwin.opt2
-rw-r--r--gcc/config/epiphany/epiphany.c1
-rw-r--r--gcc/config/frv/frv.c1
-rw-r--r--gcc/config/i386/i386-c.c2
-rw-r--r--gcc/config/i386/i386.c54
-rw-r--r--gcc/config/ia64/ia64.c8
-rw-r--r--gcc/config/m32r/m32r.c1
-rw-r--r--gcc/config/m68k/cf.md2
-rw-r--r--gcc/config/mep/mep.c5
-rw-r--r--gcc/config/microblaze/microblaze.c3
-rw-r--r--gcc/config/microblaze/microblaze.h2
-rw-r--r--gcc/config/mips/mips.c3
-rw-r--r--gcc/config/mmix/mmix.c1
-rw-r--r--gcc/config/mmix/mmix.md8
-rw-r--r--gcc/config/mn10300/mn10300.c4
-rw-r--r--gcc/config/mn10300/mn10300.md4
-rw-r--r--gcc/config/pa/pa.c28
-rw-r--r--gcc/config/picochip/picochip.c1
-rw-r--r--gcc/config/picochip/picochip.h2
-rw-r--r--gcc/config/rs6000/a2.md2
-rw-r--r--gcc/config/rs6000/rs6000.c240
-rw-r--r--gcc/config/rs6000/rs6000.md13
-rw-r--r--gcc/config/rs6000/t-linux6411
-rw-r--r--gcc/config/rs6000/t-rs60002
-rw-r--r--gcc/config/rs6000/vector.md2
-rw-r--r--gcc/config/rx/rx.md2
-rw-r--r--gcc/config/rx/rx.opt2
-rw-r--r--gcc/config/s390/2097.md4
-rw-r--r--gcc/config/s390/s390.c4
-rw-r--r--gcc/config/s390/s390.h2
-rw-r--r--gcc/config/score/score.c1
-rw-r--r--gcc/config/sh/predicates.md19
-rw-r--r--gcc/config/sh/sh.c20
-rw-r--r--gcc/config/sh/sh.h18
-rw-r--r--gcc/config/sh/sh.md6
-rw-r--r--gcc/config/sh/sh.opt6
-rw-r--r--gcc/config/sh/sync.md537
-rw-r--r--gcc/config/sparc/sparc.c8
-rw-r--r--gcc/config/sparc/sync.md2
-rw-r--r--gcc/config/spu/spu.c7
-rw-r--r--gcc/config/spu/spu.md2
-rw-r--r--gcc/config/spu/t-spu-elf2
-rw-r--r--gcc/config/tilegx/tilegx.c2
-rw-r--r--gcc/config/tilepro/tilepro.c2
-rw-r--r--gcc/config/v850/v850.c1
-rw-r--r--gcc/config/vms/vms.c4
-rw-r--r--gcc/config/vxworks-dummy.h2
-rw-r--r--gcc/config/vxworks.h2
-rwxr-xr-xgcc/configure28
-rw-r--r--gcc/configure.ac12
-rw-r--r--gcc/cp/ChangeLog56
-rw-r--r--gcc/cp/call.c6
-rw-r--r--gcc/cp/decl.c3
-rw-r--r--gcc/cp/decl2.c5
-rw-r--r--gcc/cp/parser.c34
-rw-r--r--gcc/cp/semantics.c1
-rw-r--r--gcc/cp/tree.c52
-rw-r--r--gcc/cp/typeck.c9
-rw-r--r--gcc/cse.c7
-rw-r--r--gcc/cselib.c2
-rw-r--r--gcc/df-scan.c234
-rw-r--r--gcc/df.h2
-rw-r--r--gcc/doc/extend.texi33
-rw-r--r--gcc/doc/include/texinfo.tex2889
-rw-r--r--gcc/doc/install.texi4
-rw-r--r--gcc/doc/invoke.texi69
-rw-r--r--gcc/doc/md.texi10
-rw-r--r--gcc/doc/plugins.texi2
-rw-r--r--gcc/doc/rtl.texi2
-rw-r--r--gcc/doc/tm.texi4
-rw-r--r--gcc/doc/tm.texi.in2
-rw-r--r--gcc/dse.c6
-rw-r--r--gcc/dwarf2asm.c2
-rw-r--r--gcc/dwarf2out.c137
-rw-r--r--gcc/except.c1
-rw-r--r--gcc/except.h4
-rw-r--r--gcc/explow.c9
-rw-r--r--gcc/expmed.c6
-rw-r--r--gcc/expr.c77
-rw-r--r--gcc/fold-const.c23
-rw-r--r--gcc/fortran/ChangeLog32
-rw-r--r--gcc/fortran/decl.c23
-rw-r--r--gcc/fortran/expr.c6
-rw-r--r--gcc/fortran/frontend-passes.c6
-rw-r--r--gcc/fortran/match.c7
-rw-r--r--gcc/fortran/resolve.c32
-rw-r--r--gcc/fortran/trans-array.c20
-rw-r--r--gcc/fortran/trans-common.c2
-rw-r--r--gcc/fortran/trans-intrinsic.c4
-rw-r--r--gcc/fortran/trans-types.c2
-rw-r--r--gcc/fortran/trans.c14
-rw-r--r--gcc/function.c273
-rw-r--r--gcc/function.h16
-rw-r--r--gcc/gcc.c4
-rw-r--r--gcc/gcov.c11
-rw-r--r--gcc/gcse.c20
-rw-r--r--gcc/genautomata.c2
-rw-r--r--gcc/genemit.c1
-rw-r--r--gcc/gengtype-state.c4
-rw-r--r--gcc/gengtype.c6
-rw-r--r--gcc/genhooks.c2
-rw-r--r--gcc/gimple-fold.c13
-rw-r--r--gcc/gimple-pretty-print.c2
-rw-r--r--gcc/gimple.c37
-rw-r--r--gcc/gimple.h2
-rw-r--r--gcc/gimplify.c2
-rw-r--r--gcc/go/gofrontend/expressions.cc52
-rw-r--r--gcc/graphite-interchange.c2
-rw-r--r--gcc/graphite-sese-to-poly.c6
-rw-r--r--gcc/haifa-sched.c10
-rw-r--r--gcc/ifcvt.c2
-rw-r--r--gcc/input.c17
-rw-r--r--gcc/integrate.c360
-rw-r--r--gcc/integrate.h33
-rw-r--r--gcc/ipa-cp.c4
-rw-r--r--gcc/ipa-inline-analysis.c3
-rw-r--r--gcc/ipa-inline-transform.c2
-rw-r--r--gcc/ipa-inline.c4
-rw-r--r--gcc/ipa-pure-const.c4
-rw-r--r--gcc/ipa-ref.h2
-rw-r--r--gcc/ipa-reference.c4
-rw-r--r--gcc/ipa-utils.c2
-rw-r--r--gcc/ipa.c12
-rw-r--r--gcc/ira-build.c4
-rw-r--r--gcc/ira-color.c4
-rw-r--r--gcc/ira-costs.c12
-rw-r--r--gcc/ira-emit.c6
-rw-r--r--gcc/ira-int.h43
-rw-r--r--gcc/ira-lives.c20
-rw-r--r--gcc/ira.c333
-rw-r--r--gcc/ira.h6
-rw-r--r--gcc/langhooks.c1
-rw-r--r--gcc/loop-invariant.c2
-rw-r--r--gcc/lto-streamer.c2
-rw-r--r--gcc/lto-streamer.h4
-rw-r--r--gcc/lto-wrapper.c2
-rw-r--r--gcc/matrix-reorg.c1
-rw-r--r--gcc/mcf.c2
-rw-r--r--gcc/mode-switching.c6
-rw-r--r--gcc/modulo-sched.c2
-rw-r--r--gcc/output.h1
-rw-r--r--gcc/passes.c1
-rw-r--r--gcc/plugin.c2
-rw-r--r--gcc/postreload.c2
-rw-r--r--gcc/recog.c8
-rw-r--r--gcc/reginfo.c111
-rw-r--r--gcc/regs.h30
-rw-r--r--gcc/reload.h4
-rw-r--r--gcc/rtl.h10
-rw-r--r--gcc/sched-deps.c6
-rw-r--r--gcc/sel-sched-ir.c2
-rw-r--r--gcc/sel-sched-ir.h4
-rw-r--r--gcc/sel-sched.c6
-rw-r--r--gcc/sese.c2
-rw-r--r--gcc/simplify-rtx.c23
-rw-r--r--gcc/stmt.c135
-rw-r--r--gcc/stor-layout.c6
-rw-r--r--gcc/symtab.c6
-rw-r--r--gcc/target-hooks-macros.h2
-rw-r--r--gcc/target.def13
-rw-r--r--gcc/testsuite/ChangeLog214
-rw-r--r--gcc/testsuite/c-c++-common/array-lit.c12
-rw-r--r--gcc/testsuite/c-c++-common/restrict-2.c2
-rw-r--r--gcc/testsuite/c-c++-common/torture/pr53505.c42
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-default1.C22
-rw-r--r--gcc/testsuite/g++.dg/debug/pr53466.C39
-rw-r--r--gcc/testsuite/g++.dg/eh/goto2.C12
-rw-r--r--gcc/testsuite/g++.dg/ext/complit12.C10
-rw-r--r--gcc/testsuite/g++.dg/init/new33.C11
-rw-r--r--gcc/testsuite/g++.dg/init/new34.C11
-rw-r--r--gcc/testsuite/g++.dg/other/anon-union3.C25
-rw-r--r--gcc/testsuite/g++.dg/parse/crash60.C14
-rw-r--r--gcc/testsuite/g++.dg/torture/pr53161.C22
-rw-r--r--gcc/testsuite/g++.dg/tree-prof/pr53460.C25
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/stabilize1.C14
-rw-r--r--gcc/testsuite/g++.dg/warn/Wbraces3.C34
-rw-r--r--gcc/testsuite/g++.dg/warn/Wbraces4.C34
-rw-r--r--gcc/testsuite/g++.dg/warn/Wconversion-real-integer2.C2
-rw-r--r--gcc/testsuite/g++.dg/warn/Wdouble-promotion.C2
-rw-r--r--gcc/testsuite/g++.dg/warn/delete-array-1.C11
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr53519.c26
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr53465.c30
-rw-r--r--gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-1.c8
-rw-r--r--gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-2.c9
-rw-r--r--gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-3.c6
-rw-r--r--gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-4.c5
-rw-r--r--gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-5.c6
-rw-r--r--gcc/testsuite/gcc.dg/cpp/paste12-2.c11
-rw-r--r--gcc/testsuite/gcc.dg/cpp/paste12.c5
-rw-r--r--gcc/testsuite/gcc.dg/cpp/paste13.c5
-rw-r--r--gcc/testsuite/gcc.dg/cpp/paste14-2.c11
-rw-r--r--gcc/testsuite/gcc.dg/cpp/paste14.c5
-rw-r--r--gcc/testsuite/gcc.dg/cpp/paste18.c16
-rw-r--r--gcc/testsuite/gcc.dg/cpp/paste6.c5
-rw-r--r--gcc/testsuite/gcc.dg/cpp/paste8-2.c15
-rw-r--r--gcc/testsuite/gcc.dg/cpp/paste8.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/pragma-diagnostic-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/split-6.c53
-rw-r--r--gcc/testsuite/gcc.dg/stmt-expr-4.c22
-rw-r--r--gcc/testsuite/gcc.dg/tm/pr53008.c14
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr39074-2.c3
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr39074.c3
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr48493.c18
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr53501.c22
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr53516.c32
-rw-r--r--gcc/testsuite/gcc.dg/torture/pta-structcopy-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/alias-19.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ldist-pr45948-2.c17
-rw-r--r--gcc/testsuite/gcc.dg/vect/slp-perm-8.c6
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vrev.c105
-rw-r--r--gcc/testsuite/gcc.target/cris/asm-other.S15
-rw-r--r--gcc/testsuite/gcc.target/cris/asm-v10.S6
-rw-r--r--gcc/testsuite/gcc.target/cris/asm-v8.S6
-rw-r--r--gcc/testsuite/gcc.target/cris/inasm-other.c23
-rw-r--r--gcc/testsuite/gcc.target/cris/inasm-v10.c6
-rw-r--r--gcc/testsuite/gcc.target/cris/inasm-v8.c6
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/trap-1.c13
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/trap-2.c11
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/trap-3.c10
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/trap-v0.c11
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/trap-v3.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/large-frame.c10
-rw-r--r--gcc/testsuite/gcc.target/i386/shuf-concat.c13
-rw-r--r--gcc/testsuite/gcc.target/powerpc/lhs-1.c22
-rw-r--r--gcc/testsuite/gcc.target/powerpc/lhs-2.c21
-rw-r--r--gcc/testsuite/gcc.target/powerpc/lhs-3.c21
-rw-r--r--gcc/testsuite/gcc.target/powerpc/powerpc.exp2
-rw-r--r--gcc/testsuite/gcc.target/sh/pr51340-1.c13
-rw-r--r--gcc/testsuite/gcc.target/sh/pr51340-2.c12
-rw-r--r--gcc/testsuite/gcc.target/sh/pr51340-3.c12
-rw-r--r--gcc/testsuite/gfortran.dg/allocate_with_typespec_6.f9017
-rw-r--r--gcc/testsuite/gnat.dg/array21.adb16
-rw-r--r--gcc/testsuite/gnat.dg/lto14.adb7
-rw-r--r--gcc/testsuite/gnat.dg/renaming5.adb2
-rw-r--r--gcc/testsuite/lib/target-supports.exp3
-rw-r--r--gcc/toplev.c3
-rw-r--r--gcc/trans-mem.c8
-rw-r--r--gcc/tree-data-ref.c32
-rw-r--r--gcc/tree-dfa.c167
-rw-r--r--gcc/tree-diagnostic.c93
-rw-r--r--gcc/tree-eh.c8
-rw-r--r--gcc/tree-emutls.c1
-rw-r--r--gcc/tree-flow-inline.h2
-rw-r--r--gcc/tree-flow.h1
-rw-r--r--gcc/tree-inline.c55
-rw-r--r--gcc/tree-loop-distribution.c98
-rw-r--r--gcc/tree-mudflap.c4
-rw-r--r--gcc/tree-predcom.c2
-rw-r--r--gcc/tree-profile.c6
-rw-r--r--gcc/tree-sra.c16
-rw-r--r--gcc/tree-ssa-address.c2
-rw-r--r--gcc/tree-ssa-live.c124
-rw-r--r--gcc/tree-ssa-loop-ivopts.c4
-rw-r--r--gcc/tree-ssa-loop-niter.c2
-rw-r--r--gcc/tree-ssa-math-opts.c2
-rw-r--r--gcc/tree-ssa-operands.c1
-rw-r--r--gcc/tree-ssa-pre.c2
-rw-r--r--gcc/tree-ssa-propagate.c2
-rw-r--r--gcc/tree-ssa-reassoc.c6
-rw-r--r--gcc/tree-ssa-sccvn.c6
-rw-r--r--gcc/tree-ssa-structalias.c3
-rw-r--r--gcc/tree-ssa-ter.c2
-rw-r--r--gcc/tree-ssa-uninit.c4
-rw-r--r--gcc/tree-ssanames.c2
-rw-r--r--gcc/tree-switch-conversion.c1
-rw-r--r--gcc/tree-vect-data-refs.c30
-rw-r--r--gcc/tree-vect-generic.c2
-rw-r--r--gcc/tree-vect-slp.c2
-rw-r--r--gcc/tree-vrp.c17
-rw-r--r--gcc/tree.c24
-rw-r--r--gcc/tree.h44
-rw-r--r--gcc/varasm.c257
-rw-r--r--gcc/varpool.c11
332 files changed, 7056 insertions, 3918 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8b601c9bf73..68bb12a6a70 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,812 @@
+2012-05-31 Richard Guenther <rguenther@suse.de>
+
+ * tree-loop-distribution.c (stmt_has_scalar_dependences_outside_loop):
+ Use FOR_EACH_SSA_DEF_OPERAND.
+ (generate_builtin): Adjust.
+ (stmt_generated_in_another_partition): Remove.
+ (add_scalar_computations_to_partition): Likewise.
+ (rdg_build_partitions): Do not call
+ add_scalar_computations_to_partition.
+
+2012-05-31 Eric Botcazou <ebotcazou@adacore.com>
+
+ * tree-dfa.c (get_ref_base_and_extent): Compute the offset using
+ double ints throughout.
+ * tree-sra.c (build_user_friendly_ref_for_offset) <RECORD_TYPE>:
+ Check that the position of the field is representable as an integer.
+
+2012-05-31 Richard Guenther <rguenther@suse.de>
+
+ * tree-data-ref.c (dr_analyze_innermost): Properly convert
+ the MEM_REF offset to sizetype.
+
+2012-05-31 Georg-Johann Lay <avr@gjlay.de>
+
+ * doc/invoke.texi (AVR Options): Fix typos.
+
+2012-05-31 Hans-Peter Nilsson <hp@axis.com>
+
+ * config/cris/cris.h (CC1_SPEC): Pass through all -march=
+ and -mcpu= options.
+ (ASM_SPEC): Ditto, not just -march=v32, but translate non-v10,
+ non-v32 into --march=v0_v0_v10.
+
+2012-05-31 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * ira-int.h (target_ira_int): Rename x_move_cost to
+ x_ira_register_move_cost, x_may_move_in_cost to
+ x_ira_may_move_in_cost and x_may_move_out_cost to
+ x_ira_may_move_out_cost. Delete the old fields with
+ those names and also x_ira_max_register_move_cost,
+ x_ira_max_may_move_in_cost and x_ira_max_may_move_out_cost.
+ (move_cost, may_move_in_cost, may_move_out_cost)
+ (ira_max_register_move_cost, ira_max_may_move_in_cost)
+ (ira_max_may_move_out_cost): Delete.
+ * ira.c (init_move_cost): Rename to...
+ (ira_init_register_move_cost): ...this, deleting the old
+ function with that name. Apply above variable renamings.
+ Retain asserts for null fields.
+ (ira_init_once): Don't initialize register move costs here.
+ (free_register_move_costs): Apply above variable renamings.
+ Remove code for deleted fields.
+
+2012-05-31 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * ira.c (init_move_cost): Adjust choice of subclasses to match
+ the current ira_init_register_move_cost choice. Use
+ ira_class_subset_p instead of reg_class_subset_p.
+ (ira_init_register_move_cost): Assert that move_cost,
+ may_move_in_cost and may_move_out_cost already hold the desired
+ values for their ira_* equivalents. For the latter two,
+ ignore classes that can't store a register of the given mode.
+
+2012-05-31 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * ira.c (setup_allocno_and_important_classes): Use
+ ira_class_hard_regs_num to check whether a class has any
+ allocatable registers.
+ (ira_init_register_move_cost): Likewise.
+
+2012-05-31 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * ira.c (init_move_cost): Adjust local variable names to match
+ file conventions. Use ira_assert instead of gcc_assert.
+
+2012-05-31 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * regs.h (move_table, move_cost, may_move_in_cost, may_move_out_cost):
+ Move these definitions and associated target_globals fields to...
+ * ira-int.h: ...here.
+ * rtl.h (init_move_cost): Delete.
+ * reginfo.c (last_mode_for_init_move_cost, init_move_cost): Move to...
+ * ira.c: ...here, making the latter static.
+
+2012-05-31 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * ira-costs.c (copy_cost): Use ira_init_register_move_cost_if_necessary
+ and ira_register_move_cost instead of init_move_cost and move_cost.
+
+2012-05-31 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * ira.h (target_ira): Delete x_ira_available_class_regs.
+ (ira_available_class_regs): Delete.
+ * ira.c (setup_available_class_regs): Delete.
+ (setup_alloc_classes): Don't call it.
+ (setup_pressure_classes): Use ira_class_hard_regs_num instead of
+ ira_available_class_regs.
+ * haifa-sched.c (print_curr_reg_pressure, setup_insn_reg_pressure_info)
+ (model_spill_cost): Likewise.
+ * ira-build.c (low_pressure_loop_node_p): Likewise.
+ * ira-color.c (color_pass): Likewise.
+ * ira-emit.c (change_loop): Likewise.
+ * ira-lives.c (inc_register_pressure, dec_register_pressure)
+ (single_reg_class, ira_implicitly_set_insn_hard_regs)
+ (process_bb_node_lives): Likewise.
+ * loop-invariant.c (gain_for_invariant): Likewise.
+
+2012-05-30 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR target/52999
+ * config/pa/pa.c (TARGET_SECTION_TYPE_FLAGS): Define.
+ (pa_section_type_flags): New.
+ (pa_legitimate_constant_p): Revert previous change.
+
+2012-05-30 Steven Bosscher <steven@gcc.gnu.org>
+
+ * ira.c (allocate_initial_values): Make static.
+
+2012-05-30 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/i386.c (legitimize_tls_address) <TLS_MODEL_INITIAL_EXEC>:
+ Generate tls_initial_exec_64_sun only when !TARGET_X32.
+
+2012-05-30 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/53501
+ * fold-const.c (fold_binary_loc): Make sure to call
+ fold_plusminus_mult_expr with the original sign of operands.
+
+2012-05-30 Steven Bosscher <steven@gcc.gnu.org>
+
+ * Makefile.in: Fix many dependencies.
+ (DWARF2_H): Depend on dwarf2.def.
+ (RTL_ERROR_H): Depend on rtl-error.h.
+ (TREE_PRETTY_PRINT_H, GIMPLE_PRETTY_PRINT_H): New. Replace
+ all gimple-pretty-print.h and tree-pretty-print.h references.
+
+2012-05-30 Marc Glisse <marc.glisse@inria.fr>
+
+ * simplify-rtx.c (simplify_binary_operation_1): Optimize shuffle of
+ concatenations.
+
+2012-05-30 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/53522
+ * tree-emutls.c (gen_emutls_addr): Do not add globals to
+ referenced-vars.
+
+2012-05-30 Eric Botcazou <ebotcazou@adacore.com>
+
+ * explow.c (probe_stack_range): Restore simple control flow and stop
+ again when the probe cannot be generated if HAVE_check_stack.
+
+2012-05-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/53519
+ * combine.c (simplify_shift_const_1) <case NOT>: Use constm1_rtx
+ instead of GEN_INT (GET_MODE_MASK (mode)) as second operand of XOR.
+
+2012-05-30 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
+
+ * config/arm/arm.c (arm_evpc_neon_vrev): Adjust off by one error.
+
+2012-05-29 Jack Howarth <howarth@bromo.med.uc.edu>
+
+ PR debug/53453
+ * doc/tm.texi: Update.
+ * doc/tm.texi.in (SDB and DWARF) <TARGET_FORCE_AT_COMP_DIR>: Add @hook.
+ * target.def (force_at_comp_dir): New hook.
+ * config/darwin.h (TARGET_FORCE_AT_COMP_DIR): Define.
+ * dwarf2out.c (dwarf2out_finish): Check targetm.force_at_comp_dir.
+
+2012-05-29 Jack Howarth <howarth@bromo.med.uc.edu>
+
+ * config/darwin.h (STARTFILE_SPEC): Do not use -lbundle1.o when
+ Darwin >= 10.
+ (DARWIN_DYLIB1_SPEC): Do not use -ldylib1.10.5.o when Darwin >= 10.
+ (DARWIN_CRT1_SPEC): Use -lcrt1.10.6.o when Darwin >= 10.
+
+2012-05-29 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/51340
+ * config/sh/sh.c (sh_option_override): Set TARGET_FMAC if
+ flag_unsafe_math_optimizations is set.
+ * doc/invoke.texi (SH Options): Add -mno-fused-madd description.
+ Update description of -mfused-madd.
+
+2012-05-29 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/52941
+ * config/sh/predicates.md (atomic_arith_operand,
+ atomic_logical_operand): New predicates.
+ * config/sh/sh.c (sh_option_override): Check atomic options.
+ * config/sh/sh.h (TARGET_ANY_ATOMIC, UNSUPPORTED_ATOMIC_OPTIONS,
+ UNSUPPORTED_HARD_ATOMIC_CPU): New macros.
+ (DRIVER_SELF_SPECS): Use UNSUPPORTED_ATOMIC_OPTIONS and
+ UNSUPPORTED_HARD_ATOMIC_CPU.
+ * config/sh/sync.md: Update description comments.
+ (I12): New mode iterator.
+ (fetchop_predicate, fetchop_constraint): New code attributes.
+ (atomic_compare_and_swapsi_hard, atomic_compare_and_swap<mode>_hard,
+ atomic_exchangesi_hard, atomic_exchange<mode>_hard,
+ atomic_fetch_<fetchop_name>si_hard,
+ atomic_fetch_<fetchop_name><mode>_hard,
+ atomic_fetch_nandsi_hard, atomic_fetch_nand<mode>_hard,
+ atomic_<fetchop_name>_fetchsi_hard,
+ atomic_<fetchop_name>_fetch<mode>_hard,
+ atomic_nand_fetchsi_hard, atomic_nand_fetch<mode>_hard,
+ atomic_test_and_set_hard): New insns.
+ (atomic_compare_and_swap<mode>_soft, atomic_exchange<mode>_soft,
+ atomic_fetch_<fetchop_name><mode>_soft, atomic_fetch_nand<mode>_soft,
+ atomic_<fetchop_name>_fetch<mode>_soft, atomic_nand_fetch<mode>_soft,
+ atomic_test_and_set_soft): Use same formatting for the first line of
+ the asm block as in new insns above.
+ (atomic_compare_and_swap<mode>, atomic_exchange<mode>,
+ atomic_fetch_<fetchop_name><mode>, atomic_<fetchop_name>_fetch<mode>,
+ atomic_test_and_set): Integrate new *_hard insns into expanders.
+ * config/sh/sh.opt (mhard-atomic): New option.
+ * doc/invoke.texi (SH Options): Document it.
+
+2012-05-29 Meador Inge <meadori@codesourcery.com>
+
+ * c-decl.c (c_push_function_context): Always create a new language
+ function.
+ (c_pop_function_context): Clear the language function created in
+ c_push_function_context.
+
+2012-05-29 Matt Turner <mattst88@gmail.com>
+
+ * config/alpha/ev6.md: (define_bypass "ev6_fmul,ev6_fadd"): New.
+ (define_bypass "ev6_fcmov"): New.
+
+2012-05-29 Steven Bosscher <steven@gcc.gnu.org>
+
+ * integrate.c: Remove.
+ * integrate.h: Remove.
+ * Makefile.in: Remove make rules for integrate.c and INTEGRATE_H.
+ * config/arm/t-arm: Remove INTEGRATE_H dependency for target files.
+ * config/rs6000/t-rs6000: Likewise
+ * config/spu/t-spu-elf: Likewise.
+ * function.h (get_hard_reg_initial_val, has_hard_reg_initial_val,
+ get_hard_reg_initial_reg, emit_initial_value_sets): Move prototypes
+ from integrate.h to here.
+ (initial_value_entry): New prototype.
+ * reload.h (allocate_initial_values): Remove prototype.
+ * tree.h (set_decl_abstract_flags, set_decl_origin_self): Likewise.
+ * cse.c (fixed_base_plus_p): Don't handle virtual registers for
+ integrate.c.
+ * dwarf2out.c (set_decl_origin_self, set_block_origin_self,
+ set_decl_abstract_flags, set_block_abstract_flags): Move from
+ integrate.c to here, the only user.
+ * expmed.c (extract_fixed_bit_field): Remove outdated comment
+ about integrate.c.
+ * function.c: Don't include integrate.h.
+ (struct initial_value_pair, struct initial_value_struct,
+ get_hard_reg_initial_val, has_hard_reg_initial_val,
+ get_hard_reg_initial_reg, emit_initial_value_sets): Move from
+ integrate.c to here.
+ (initial_value_entry): New function.
+ * genemit.c (main): Don't print integrate.h include line.
+ * ira.c: Don't include integrate.h.
+ (allocate_initial_values): Move from integrate.c to here.
+ (ira): Update allocate_initial_values call.
+ * tree-inline.c: Don't include integrate.h.
+ (function_attribute_inlinable_p): Moved from integrate.c to here.
+ * cfgexpand.c: Don't include integrate.h.
+ * except.c: Likewise.
+ * langhooks.c: Likewise.
+ * passes.c: Likewise.
+ * toplev.c: Likewise.
+ * config/frv/frv.c: Likewise.
+ * config/pa/pa.c: Likewise.
+ * config/spu/spu.c: Likewise.
+ * config/epiphany/epiphany.c: Likewise.
+ * config/mep/mep.c: Likewise.
+ * config/score/score.c: Likewise.
+ * config/picochip/picochip.c: Likewise.
+ * config/sh/sh.c: Likewise.
+ * config/alpha/alpha.c: Likewise.
+ * config/microblaze/microblaze.c: Likewise.
+ * config/mips/mips.c: Likewise.
+ * config/v850/v850.c: Likewise.
+ * config/mmix/mmix.c: Likewise.
+ * config/bfin/bfin.c: Likewise.
+ * config/arm/arm.c: Likewise.
+ * config/s390/s390.c: Likewise.
+ * config/m32r/m32r.c: Likewise.
+ * config/rs6000/rs6000.c: Likewise.
+ * config/c6x/c6x.c: Include function.h instead of integrate.h.
+ * config/tilegx/tilegx.c: Likewise.
+ * config/tilepro/tilepro.c: Likewise.
+
+2012-05-29 Georg-Johann Lay <avr@gjlay.de>
+
+ * config/avr/t-avr (s-avr-mmcu-texi): Call
+ gen-avr-mmcu-texi$(build_exeext) via ./ and don't assume . is in PATH.
+
+2012-05-29 Michael Matz <matz@suse.de>
+
+ * rtl.h (assign_stack_temp, assign_stack_temp_for_type,
+ assign_temp): Remove 'keep' argument.
+ (mark_temp_addr_taken): Remove prototype.
+ * tree.h (expand_decl): Remove prototype.
+ * function.c (struct temp_slot): Remove addr_taken and keep member.
+ (assign_stack_temp_for_type) Don't initialize above, remove
+ keep argument.
+ (assign_stack_temp, assign_temp): Remove keep argument.
+ (mark_temp_addr_taken): Remove.
+ (preserve_temp_slots): Remove handling of addr_taken and keep members.
+ (free_temp_slots): Ditto.
+ * expr.c (expand_expr_real_1 <COMPOUND_LITERAL_EXPR>): Remove
+ dead code.
+ * stmt.c (expand_asm_operands): Remove dead code.
+ (expand_decl): Remove.
+ * c-decl.c (finish_struct): Don't call expand_decl.
+ * builtins.c (expand_builtin_cexpi): Adjust calls to assign_temp
+ and assign_stack_temp.
+ * calls.c (save_fixed_argument_area, initialize_argument_information,
+ expand_call, emit_library_call_value_1, store_one_arg): Ditto.
+ * expmed.c (extract_bit_field_1): Ditto.
+ * expr.c (emit_group_load_1, emit_group_store,
+ copy_blkmode_from_reg, emit_push_insn, expand_assignment,
+ store_field, expand_constructor, expand_cond_expr_using_cmove,
+ expand_expr_real_2, expand_expr_real_1): Ditto.
+ * stmt.c (expand_asm_operands, expand_return): Ditto.
+
+ * function.c (pop_temp_slots): Call free_temp_slots.
+ * calls.c (store_one_arg): Don't call preserve_temp_slots or
+ free_temp_slots.
+ * expr.c (expand_assignment): Don't call free_temp_slots.
+
+ * config/arm/arm.c (neon_expand_vector_init): Ditto.
+ * config/i386/i386.c (ix86_expand_vector_set): Ditto.
+ (ix86_expand_vector_extract): Ditto.
+ * config/ia64/ia64.c (spill_xfmode_rfmode_operand,
+ ia64_expand_movxf_movrf): Ditto.
+ * config/mips/mips.c (mips_expand_vi_general): Ditto.
+ * config/mmix/mmix.md (floatdisf2, floatunsdisf2, truncdfsf2,
+ extendsfdf2): Ditto.
+ * config/rs6000/rs6000.c (rs6000_expand_vector_init,
+ rs6000_expand_vector_set, rs6000_expand_vector_extract,
+ rs6000_allocate_stack_temp): Ditto.
+ * config/rs6000/rs6000.md (fix_trunctfsi2_fprs): Ditto.
+ * config/sparc/sparc.c (emit_soft_tfmode_libcall,
+ sparc_emit_float_lib_cmp, sparc_emit_float_lib_cmp,
+ sparc_expand_vector_init): Ditto.
+
+2012-05-29 Michael Matz <matz@suse.de>
+
+ * c-tree.h (c_expand_decl): Remove prototype.
+
+ * expr.c (expand_expr_real_1 <normal_inner_ref>): Don't allocate
+ a kept temp.
+ (expand_expr_real_1 <COMPOUND_LITERAL_EXPR>): Make unreachable.
+ * gimple-fold.c (canonicalize_constructor_val): Canonicalize
+ COMPOUND_LITERAL_EXPR.
+ * function.c (expand_function_start): Don't call expand_decl,
+ instead assert that we have RTL assigned.
+ * tree-ssa-live.c (remove_unused_locals): Clear
+ nonlocal_goto_save_area if its backing variable is removed.
+ * stmt.c (expand_asm_operands): Remove handling of non-lvalues
+ as mem inputs.
+ (expand_decl): Assert that this does nothing.
+ * calls.c (expand_call): Don't call mark_temp_addr_taken.
+
+2012-05-29 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53516
+ * tree-data-ref.c (stmt_with_adjacent_zero_store_dr_p): Reject
+ bitfield accesses.
+ * tree-vect-data-refs.c (vect_analyze_data_refs): Likewise.
+
+2012-05-29 Joseph Myers <joseph@codesourcery.com>
+
+ * LANGUAGES: Fix typos.
+ * Makefile.in: Fix typos.
+ * alias.c: Fix typos.
+ * auto-inc-dec.c: Fix typos.
+ * bb-reorder.c: Fix typos.
+ * cfgcleanup.c: Fix typos.
+ * cgraph.c: Fix typos.
+ * cgraph.h: Fix typos.
+ * cgraphunit.c: Fix typos.
+ * collect2-aix.h: Fix typos.
+ * collect2.c: Fix typos.
+ * compare-elim.c: Fix typos.
+ * config/alpha/vms.h: Fix typos.
+ * config/arm/README-interworking: Fix typos.
+ * config/arm/arm.c: Fix typos.
+ * config/arm/iterators.md: Fix typos.
+ * config/arm/vxworks.h: Fix typos.
+ * config/avr/avr.c: Fix typos.
+ * config/avr/avr.h: Fix typos.
+ * config/avr/avr.md: Fix typos.
+ * config/avr/builtins.def: Fix typos.
+ * config/c6x/c6x.c: Fix typos.
+ * config/cr16/cr16.c: Fix typos.
+ * config/cr16/cr16.md: Fix typos.
+ * config/cris/cris.md: Fix typos.
+ * config/darwin.c: Fix typos.
+ * config/darwin.opt: Fix typos.
+ * config/i386/i386-c.c: Fix typos.
+ * config/i386/i386.c: Fix typos.
+ * config/ia64/ia64.c: Fix typos.
+ * config/m68k/cf.md: Fix typos.
+ * config/mep/mep.c: Fix typos.
+ * config/microblaze/microblaze.c: Fix typos.
+ * config/microblaze/microblaze.h: Fix typos.
+ * config/mn10300/mn10300.c: Fix typos.
+ * config/mn10300/mn10300.md: Fix typos.
+ * config/pa/pa.c: Fix typos.
+ * config/picochip/picochip.h: Fix typos.
+ * config/rs6000/a2.md: Fix typos.
+ * config/rs6000/rs6000.c: Fix typos.
+ * config/rs6000/vector.md: Fix typos.
+ * config/rx/rx.md: Fix typos.
+ * config/rx/rx.opt: Fix typos.
+ * config/s390/2097.md: Fix typos.
+ * config/s390/s390.c: Fix typos.
+ * config/s390/s390.h: Fix typos.
+ * config/sh/sh.c: Fix typos.
+ * config/sh/sh.md: Fix typos.
+ * config/sparc/sync.md: Fix typos.
+ * config/spu/spu.c: Fix typos.
+ * config/spu/spu.md: Fix typos.
+ * config/vms/vms.c: Fix typos.
+ * config/vxworks-dummy.h: Fix typos.
+ * config/vxworks.h: Fix typos.
+ * cselib.c: Fix typos.
+ * df-scan.c: Fix typos.
+ * df.h: Fix typos.
+ * doc/extend.texi: Fix typos.
+ * doc/install.texi: Fix typos.
+ * doc/invoke.texi: Fix typos.
+ * doc/md.texi: Fix typos.
+ * doc/plugins.texi: Fix typos.
+ * doc/rtl.texi: Fix typos.
+ * dse.c: Fix typos.
+ * dwarf2asm.c: Fix typos.
+ * dwarf2out.c: Fix typos.
+ * except.h: Fix typos.
+ * expr.c: Fix typos.
+ * fold-const.c: Fix typos.
+ * gcc.c: Fix typos.
+ * gcse.c: Fix typos.
+ * genautomata.c: Fix typos.
+ * gengtype-state.c: Fix typos.
+ * gengtype.c: Fix typos.
+ * genhooks.c: Fix typos.
+ * gimple-fold.c: Fix typos.
+ * gimple-pretty-print.c: Fix typos.
+ * gimple.c: Fix typos.
+ * gimple.h: Fix typos.
+ * gimplify.c: Fix typos.
+ * graphite-interchange.c: Fix typos.
+ * graphite-sese-to-poly.c: Fix typos.
+ * ifcvt.c: Fix typos.
+ * input.c: Fix typos.
+ * ipa-cp.c: Fix typos.
+ * ipa-inline-analysis.c: Fix typos.
+ * ipa-inline-transform.c: Fix typos.
+ * ipa-inline.c: Fix typos.
+ * ipa-pure-const.c: Fix typos.
+ * ipa-ref.h: Fix typos.
+ * ipa-reference.c: Fix typos.
+ * ipa-utils.c: Fix typos.
+ * ipa.c: Fix typos.
+ * ira-emit.c: Fix typos.
+ * ira-lives.c: Fix typos.
+ * lto-streamer.c: Fix typos.
+ * lto-streamer.h: Fix typos.
+ * lto-wrapper.c: Fix typos.
+ * mcf.c: Fix typos.
+ * mode-switching.c: Fix typos.
+ * modulo-sched.c: Fix typos.
+ * plugin.c: Fix typos.
+ * postreload.c: Fix typos.
+ * sched-deps.c: Fix typos.
+ * sel-sched-ir.c: Fix typos.
+ * sel-sched-ir.h: Fix typos.
+ * sel-sched.c: Fix typos.
+ * sese.c: Fix typos.
+ * stor-layout.c: Fix typos.
+ * target-hooks-macros.h: Fix typos.
+ * target.def: Fix typos.
+ * trans-mem.c: Fix typos.
+ * tree-eh.c: Fix typos.
+ * tree-predcom.c: Fix typos.
+ * tree-sra.c: Fix typos.
+ * tree-ssa-address.c: Fix typos.
+ * tree-ssa-loop-ivopts.c: Fix typos.
+ * tree-ssa-loop-niter.c: Fix typos.
+ * tree-ssa-math-opts.c: Fix typos.
+ * tree-ssa-pre.c: Fix typos.
+ * tree-ssa-propagate.c: Fix typos.
+ * tree-ssa-reassoc.c: Fix typos.
+ * tree-ssa-sccvn.c: Fix typos.
+ * tree-ssa-ter.c: Fix typos.
+ * tree-ssa-uninit.c: Fix typos.
+ * tree-ssanames.c: Fix typos.
+ * tree-vect-generic.c: Fix typos.
+ * tree-vect-slp.c: Fix typos.
+ * tree.c: Fix typos.
+ * tree.h: Fix typos.
+ * varasm.c: Fix typos.
+ * varpool.c: Fix typos.
+
+2012-05-29 Joseph Myers <joseph@codesourcery.com>
+
+ * doc/include/texinfo.tex: Update to version 2012-05-16.16.
+
+2012-05-29 Richard Guenther <rguenther@suse.de>
+
+ * tree-dfa.c (find_vars_r): Do not call add_referenced_vars
+ for globals.
+ (add_referenced_var_1): Re-organize. Assert we are not
+ called for globals.
+ (remove_referenced_var): Likewise.
+ * varpool.c (add_new_static_var): Use create_tmp_var_raw.
+ * tree-mudflap.c (execute_mudflap_function_ops): Do not
+ call add_referenced_var on globals.
+ * matrix-reorg.c (transform_access_sites): Likewise.
+
+2012-05-29 Steven Bosscher <steven@gcc.gnu.org>
+
+ * alias.c (reg_known_value): Make this a VEC.
+ (reg_known_equiv_p): Make this an sbitmap.
+ (reg_known_value_size): Remove.
+ (get_reg_known_value, set_reg_known_value, get_reg_known_equiv_p,
+ set_reg_known_equiv_p): Update for reg_known_value and
+ reg_known_value_size data structure change.
+ (init_alias_analysis, end_alias_analysis): Likewise.
+
+2012-05-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/53510
+ * input.c (read_line): Use XRESIZEVEC instead of XNEWVEC
+ to avoid leaking memory. No need to handle memory allocation
+ failure. Double string_len on each reallocation instead of adding 2.
+ * gcov.c (read_line): Likewise.
+
+2012-05-29 Hans-Peter Nilsson <hp@axis.com>
+
+ * config/cris/cris.h (TARGET_HAS_BREAK, TARGET_TRAP_USING_BREAK8):
+ New macros.
+ * config/cris/cris.md ("trap"): Define, enabled for
+ TARGET_TRAP_USING_BREAK8.
+ * config/cris/cris.opt (mtrap-using-break8): New option.
+
+2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/25137
+ * doc/invoke.texi: Document -Wmissing-braces not enabled by -Wall
+ for C++.
+
+2012-05-28 Hans-Peter Nilsson <hp@axis.com>
+
+ * doc/md.texi (stack_protect_test): Remove negation of branch to label.
+ (Standard Names): Fix typos in documentation of atomic patterns.
+
+2012-05-27 Nathan Sidwell <nathan@acm.org>
+
+ * tree.c (build_constructor): Propagate TREE_SIDE_EFFECTS.
+
+2012-05-26 Jason Merrill <jason@redhat.com>
+
+ PR c++/53220
+ * c-typeck.c (array_to_pointer_conversion): Give -Wc++-compat warning
+ about array compound literals.
+
+2012-05-26 Eric Botcazou <ebotcazou@adacore.com>
+
+ * cfgcleanup.c (try_optimize_cfg): Do not delete forwarder blocks
+ if CLEANUP_NO_INSN_DEL.
+ * cfgrtl.c (unique_locus_on_edge_between_p): New function extracted
+ from cfg_layout_merge_blocks.
+ (emit_nop_for_unique_locus_between): New function.
+ (rtl_merge_blocks): Invoke emit_nop_for_unique_locus_between.
+ (cfg_layout_merge_blocks): Likewise.
+
+2012-05-26 Dimitrios Apostolou <jimis@gmx.net>
+ Paolo Bonzini <bonzini@gnu.org>
+
+ * df-scan.c (df_def_record_1): Assert a parallel must contain an
+ EXPR_LIST at this point. Receive the LOC and move its extraction...
+ (df_defs_record): ... here. Change if-else to a switch statement.
+ (df_find_hard_reg_defs, df_find_hard_reg_defs_1): New.
+ (df_get_call_refs): Changed defs_generated from bitmap to HARD_REG_SET
+ and compute it from df_find_hard_reg_defs(). Record DF_REF_BASE
+ DEFs in REGNO order. Use HARD_REG_SET instead of bitmap for
+ regs_invalidated_by_call.
+ (df_insn_refs_collect): Record DF_REF_REGULAR DEFs after
+ df_get_call_refs().
+
+2012-05-25 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR lto/52178
+ * tree-inline.c (remap_gimple_op_r): Fix handling of FIELD_DECL.
+ * tree.c (RETURN_TRUE_IF_VAR): Do not return true for PLACEHOLDER_EXPR.
+
+2012-05-25 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ * config/rs6000/t-linux64: Delete the 32-bit multilib that uses
+ software floating point emulation. No longer build the multilibs
+ with -mstrict-align.
+
+2012-05-25 Aldy Hernandez <aldyh@redhat.com>
+
+ PR middle-end/53008
+ * trans-mem.c (ipa_tm_create_version_alias): Output new_node if
+ accessed indirectly.
+ (ipa_tm_create_version): Same.
+
+2012-05-25 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/53474
+ * config/i386/i386.c (ix86_print_operand) <case 'O'>: Print '.' here.
+ <case 'C', case 'c', case 'F', case 'f'>: Print '.' only for C and c.
+
+2012-05-25 Alexander Ivchenko <alexander.ivchenko@intel.com>
+
+ PR target/53435
+ * config/i386/i386.c (ix86_expand_vec_perm): Use correct op.
+ (ix86_expand_vec_perm): Use int mode instead of float.
+ (expand_vec_perm_pshufb): Remove handling of useseless type
+ conversion.
+
+2012-05-25 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR ada/52362
+ * config.gcc (i[34567]86-*-mingw* | x86_64-*-mingw*): Set gas and
+ gnu_ld variables to yes.
+ * configure.ac (HAVE_GNU_LD): Move to after config.gcc inclusion.
+ (HAVE_GNU_AS): Likewise.
+ * config.in: Regenerate.
+ * configure: Likewise.
+
+2012-05-25 Tristan Gingold <gingold@adacore.com>
+
+ * config/i386/i386.c (struct ix86_frame): Remove unused frame field.
+ (ix86_compute_frame_layout): Fix type of stack_alignment_needed
+ and preferred_alignment.
+
+2012-05-25 Tristan Gingold <gingold@adacore.com>
+
+ * common/config/ia64/ia64-common.c (ia64_except_unwind_info): Fix typo.
+
+2012-05-25 Thomas Schwinge <thomas@codesourcery.com>
+
+ * fold-const.c (optimize_bit_field_compare): Abort early in the strict
+ volatile bitfields case.
+
+2012-05-24 Pat Haugen <pthaugen@us.ibm.com>
+
+ * config/rs6000/rs6000.c (rs6000_option_override_internal): Change
+ rs6000_sched_costly_dep default to true_store_to_load_dep_costly.
+ (adjacent_mem_locations): Move some code to and call...
+ (get_memref_parts): ...new function.
+ (mem_locations_overlap): New function.
+ (rs6000_adjust_priority): Adjust calls to is_load_insn/is_store_insn.
+ (is_mem_ref): Rename to...
+ (find_mem_ref): ...this. Return MEM rtx.
+ (get_store_dest): Remove function.
+ (is_load_insn1, is_load_insn, is_store_insn1, is_store_insn): Add
+ new parameter and adjust calls.
+ (rs6000_is_costly_dependence): Update calls for extra arg. Make sure
+ mem refs overlap for true_store_to_load_dep_costly.
+ (rs6000_sched_reorder2): Update calls for extra arg. Adjust args
+ passed to adjacent_mem_locations.
+ (is_costly_group): Walk resolved dependency list.
+ (force_new_group): Emit group ending nop for Power6/Power7.
+ * config/rs6000/rs6000.md (UNSPEC_GRP_END_NOP): New enum value.
+ (group_ending_nop): New define_insn.
+
+2012-05-24 Dodji Seketeli <dodji@redhat.com>
+
+ Make unwound macro expansion trace less redundant
+ * tree-diagnostic.c (maybe_unwind_expanded_macro_loc): Don't print
+ context of macro definition in the trace, when it's redundant.
+ Update comments.
+
+2012-05-24 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/53460
+ * tree-profile.c (tree_profiling): Cleanup the CFG if
+ execute_fixup_cfg requests it.
+
+2012-05-24 Richard Guenther <rguenther@suse.de>
+
+ * tree-flow.h (create_var_ann): Remove.
+ * tree-dfa.c (create_var_ann): Remove and inline into its
+ single caller ...
+ (add_referenced_var_1): ... here.
+ * varpool.c (add_new_static_var): Do not call add_referenced_var
+ for global vars.
+ * gimple-fold.c (canonicalize_constructor_val): Likewise.
+ * tree-switch-conversion.c (build_one_array): Likewise.
+ * tree-profile.c (gimple_gen_ic_profiler): Likewise.
+ * tree-flow-inline.h (gimple_referenced_vars): Guard against
+ NULL fn argument.
+ * tree-inline.c (remap_gimple_op_r): Likewise. Check
+ gimple_referenced_vars instead of gimple_in_ssa_p.
+ (copy_tree_body_r): Likewise.
+ (setup_one_parameter): Likewise.
+ (declare_return_variable): Likewise.
+ (tree_function_versioning): Likewise.
+
+2012-05-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/53465
+ * tree-vrp.c (extract_range_from_cond_expr): First copy_value_range
+ vr0 into *vr, then vrp_meet that.
+ (vrp_meet): If one vr type is VR_UNDEFINED, ensure the result doesn't
+ have any equivalences.
+ (vrp_visit_phi_node): Call copy_value_range instead of vrp_meet the
+ first time.
+
+2012-05-24 Jim MacArthur <jim.macarthur@arm.com>
+
+ * recog.c (reg_fits_class_p): Check both regno and regno + offset are
+ hard registers.
+ * regs.h (in_hard_reg_set_p): Assert that regno is a hard register and
+ check end_regno - 1 is a hard register.
+
+2012-05-24 Richard Guenther <rguenther@suse.de>
+
+ * varpool.c (add_new_static_var): Remove call to create_var_ann.
+ * tree-ssa-operands.c (create_vop_var): Likewise.
+
+2012-05-24 Richard Guenther <rguenther@suse.de>
+
+ PR bootstrap/53466
+ * tree-ssa-live.c (remove_unused_scope_block_p): Properly
+ handle globals.
+ (remove_unused_locals): Pass global_unused_vars to
+ remove_unused_scope_block_p. Restore code walking all
+ referenced vars and pruning them.
+
+2012-05-23 Jan Hubicka <jh@suse.cz>
+
+ * tree.h (alias_diag_flags): Remove.
+ (alias_pair): Remove emitted_diags.
+ (finish_aliases_1, finish_aliases_2, remove_unreachable_alias_pairs,
+ symbol_alias_set_t, symbol_alias_set_destroy,
+ symbol_alias_set_contains, propagate_aliases_backward): Remove.
+ * toplev.c (compile_file): Do not call finish_aliases_2
+ * cgraphunit.c (cgraph_process_new_functions): Do not call
+ finish_aliases_1.
+ (handle_alias_pairs): Output diagnostics about aliases to externals.
+ (assemble_thunks_and_aliases): Use do_assemble_alias.
+ (output_weakrefs): Likewise.
+ (finalize_compilation_unit): Do not call finish_aliases_1.
+ * ipa.c (symtab_remove_unreachable_nodes): De not call
+ remove_unreachable_alias_pairs.
+ * varasm.c (do_assemble_alias): Export.
+ (symbol_alias_set_create, symbol_alias_set_destroy,
+ symbol_alias_set_contains, symbol_alias_set_insert,
+ propagate_aliases_forward, propagate_aliases_backward,
+ propagate_aliases_backward, trivially_visible_alias,
+ trivially_defined_alias, remove_unreachable_alias_pairs,
+ finish_aliases_1, finish_aliases_2, assemble_alias): Remove.
+ * output.h (do_assemble_alias): Declare.
+ * varpool.c (varpool_remove_unreferenced_decls): Do not call
+ finish_aliases_1.
+
+2012-05-23 Martin Jambor <mjambor@suse.cz>
+
+ * ipa-inline-analysis.c (inline_merge_summary): Free operand_map.
+
+2012-05-23 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gimple.c (gimple_types_compatible_p_1) <ARRAY_TYPE>: Remove bogus
+ size handling.
+ (gimple_canonical_types_compatible_p) <ARRAY_TYPE>: Likewise.
+ (iterative_hash_gimple_type): Adjust comment.
+ (iterative_hash_canonical_type): Likewise. Hash the bounds of the
+ domain for an array type instead of the domain type itself.
+
+2012-05-23 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53438
+ * tree-sra.c (analyze_access_subtree): Correct bitfield exclusion.
+
+2012-05-23 Georg-Johann Lay <avr@gjlay.de>
+
+ PR target/53448
+ * config/avr/avr.h (ASM_OUTPUT_ALIGN): Don't inhibit .p2align 1.
+ * config/avr/elf.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Use
+ ASM_OUTPUT_ALIGN.
+
+2012-05-23 Richard Guenther <rguenther@suse.de>
+
+ * tree-dfa.c (add_referenced_var_1): Do not add global vars.
+ * tree-ssa-live.c (mark_all_vars_used_1): Handle global vars
+ via the global_unused_vars bitmap.
+ (remove_unused_locals): Handle global vars in local-decls via
+ a global_unused_vars bitmap instead of the used flag in the
+ var annotation. Simplify global variable handling and removal.
+
+2012-05-22 Jan Hubicka <jh@suse.cz>
+
+ PR middle-end/53426
+ * tree-ssa-structalias.c (create_variable_info_for): Skip constructors
+ from other partitions.
+
+2012-05-22 Jan Hubicka <jh@suse.cz>
+
+ PR middle-end/53161
+ * symtab.c (symtab_register_node): Fix ordering issue.
+
2012-05-22 Steven Drake <sbd@NetBSD.org>
* gcc.c (do_spec_1): Add %M spec token to output multilib_os_dir.
@@ -24,15 +833,13 @@
* lto-streamer-in.c (input_cfg): Likewise.
* tree-inline.c (initialize_cfun): Likewise.
* tree-into-ssa.c (rewrite_into_ssa): Likewise.
- * omp-low.c (expand_omp_taskreg): Likewise. Avoid switching
- cfun.
+ * omp-low.c (expand_omp_taskreg): Likewise. Avoid switching cfun.
* gimple.c (is_gimple_reg): Optimize the SSA_NAME case,
virtual operands are not registers.
2012-05-22 Richard Guenther <rguenther@suse.de>
- * tree-cfg.c (verify_gimple_assign_unary): Fix typo in previous
- commit.
+ * tree-cfg.c (verify_gimple_assign_unary): Fix typo in previous commit.
2012-05-22 Richard Guenther <rguenther@suse.de>
@@ -44,8 +851,7 @@
* tree-flow.h (add_referenced_var_1): Declare.
(add_referenced_var): Define.
- * tree-dfa.c (referenced_var_check_and_insert): Avoid one hash
- lookup.
+ * tree-dfa.c (referenced_var_check_and_insert): Avoid one hash lookup.
(add_referenced_var): Rename to ...
(add_referenced_var_1): ... this. Take struct function argument.
@@ -929,7 +1735,8 @@
* doc/options.texi (EnabledBy): Document
* opts.c: Include opts.h and options.h before tm.h.
(finish_options): Do not handle some sub-options here...
- (common_handle_option): ... instead call common_handle_option_auto here.
+ (common_handle_option): ... instead call common_handle_option_auto
+ here.
* optc-gen.awk: Handle EnabledBy.
* opth-gen.awk: Declare common_handle_option_auto.
* common.opt (Wuninitialized): Use EnabledBy. Delete Init.
@@ -2808,7 +3615,7 @@
is enabled.
(movdi_vfp_cortexa8): Likewise.
-2012-04-30 Ian Bolton <ian.bolton@arm.com>
+2012-04-30 Ian Bolton <ian.bolton@arm.com>
Sameera Deshpande <sameera.deshpande@arm.com>
Greta Yorsh <greta.yorsh@arm.com>
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index 1bb7abc8443..8e37708f2e6 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20120522
+20120531
diff --git a/gcc/LANGUAGES b/gcc/LANGUAGES
index 805e9b49cac..c1c48b37a41 100644
--- a/gcc/LANGUAGES
+++ b/gcc/LANGUAGES
@@ -3,7 +3,7 @@ Right now there is no documentation for the GCC tree -> rtl interfaces
Such documentation would be of great benefit to the project. Until such
time as we can formally start documenting the interface this file will
-serve as a repository for information on these interface and any incompatable
+serve as a repository for information on these interface and any incompatible
changes we've made.
2004-09-09:
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index db55834d755..0e3f6ef70d8 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -293,7 +293,7 @@ mkinstalldirs=$(SHELL) $(srcdir)/../mkinstalldirs
# write_entries_to_file - writes each entry in a list
# to the specified file. Entries are written in chunks of
-# $(write_entries_to_file_split) to accomodate systems with
+# $(write_entries_to_file_split) to accommodate systems with
# severe command-line-length limitations.
# Parameters:
# $(1): variable containing entries to iterate over
@@ -447,8 +447,8 @@ SPLAY_TREE_H= $(srcdir)/../include/splay-tree.h
FIBHEAP_H = $(srcdir)/../include/fibheap.h
PARTITION_H = $(srcdir)/../include/partition.h
MD5_H = $(srcdir)/../include/md5.h
-DWARF2_H = $(srcdir)/../include/dwarf2.h
-XREGEX_H = $(srcdir)/../include/xregex.h
+DWARF2_H = $(srcdir)/../include/dwarf2.h $(srcdir)/../include/dwarf2.def
+XREGEX_H = $(srcdir)/../include/xregex.h
FNMATCH_H = $(srcdir)/../include/fnmatch.h
# Linker plugin API headers
@@ -461,7 +461,7 @@ NATIVE_SYSTEM_HEADER_DIR = @NATIVE_SYSTEM_HEADER_DIR@
CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
# autoconf sets SYSTEM_HEADER_DIR to one of the above.
-# Purge it of unneccessary internal relative paths
+# Purge it of unnecessary internal relative paths
# to directories that might not exist yet.
# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
# Use single quotes here to avoid nested double- and backquotes, this
@@ -849,7 +849,7 @@ RTL_BASE_H = rtl.h rtl.def $(MACHMODE_H) reg-notes.def insn-notes.def \
$(HASHTAB_H)
FIXED_VALUE_H = fixed-value.h $(MACHMODE_H) double-int.h
RTL_H = $(RTL_BASE_H) genrtl.h vecir.h
-RTL_ERROR_H = $(RTL_H) $(DIAGNOSTIC_CORE_H)
+RTL_ERROR_H = rtl-error.h $(RTL_H) $(DIAGNOSTIC_CORE_H)
READ_MD_H = $(OBSTACK_H) $(HASHTAB_H) read-md.h
PARAMS_H = params.h params.def
BUILTINS_DEF = builtins.def sync-builtins.def omp-builtins.def \
@@ -884,7 +884,6 @@ SCHED_INT_H = sched-int.h $(INSN_ATTR_H) $(BASIC_BLOCK_H) $(RTL_H) $(DF_H) \
SEL_SCHED_IR_H = sel-sched-ir.h $(INSN_ATTR_H) $(BASIC_BLOCK_H) $(RTL_H) \
$(GGC_H) $(BITMAP_H) vecprim.h $(SCHED_INT_H) $(CFGLOOP_H) $(REGSET_H)
SEL_SCHED_DUMP_H = sel-sched-dump.h $(SEL_SCHED_IR_H)
-INTEGRATE_H = integrate.h
CFGLAYOUT_H = cfglayout.h $(BASIC_BLOCK_H)
CFGLOOP_H = cfgloop.h $(BASIC_BLOCK_H) $(RTL_H) vecprim.h double-int.h \
$(BITMAP_H) sbitmap.h
@@ -929,6 +928,8 @@ TREE_FLOW_H = tree-flow.h tree-flow-inline.h tree-ssa-operands.h \
TREE_SSA_LIVE_H = tree-ssa-live.h $(PARTITION_H) vecprim.h
SSAEXPAND_H = ssaexpand.h $(TREE_SSA_LIVE_H)
PRETTY_PRINT_H = pretty-print.h $(INPUT_H) $(OBSTACK_H)
+TREE_PRETTY_PRINT_H = tree-pretty-print.h $(PRETTY_PRINT_H)
+GIMPLE_PRETTY_PRINT_H = gimple-pretty-print.h $(TREE_PRETTY_PRINT_H)
DIAGNOSTIC_CORE_H = diagnostic-core.h $(INPUT_H) bversion.h diagnostic.def
DIAGNOSTIC_H = diagnostic.h $(DIAGNOSTIC_CORE_H) $(PRETTY_PRINT_H)
C_PRETTY_PRINT_H = c-family/c-pretty-print.h $(PRETTY_PRINT_H) \
@@ -942,7 +943,7 @@ DBGCNT_H = dbgcnt.h dbgcnt.def
EBITMAP_H = ebitmap.h sbitmap.h
LTO_STREAMER_H = lto-streamer.h $(LINKER_PLUGIN_API_H) $(TARGET_H) \
$(CGRAPH_H) $(VEC_H) vecprim.h $(TREE_H) $(GIMPLE_H) \
- $(GCOV_IO_H) $(DIAGNOSTIC_H)
+ $(GCOV_IO_H) $(DIAGNOSTIC_H) alloc-pool.h
DATA_STREAMER_H = data-streamer.h $(VEC_H) $(LTO_STREAMER_H)
GIMPLE_STREAMER_H = gimple-streamer.h $(LTO_STREAMER_H) $(BASIC_BLOCK_H) \
$(FUNCTION_H)
@@ -953,8 +954,8 @@ TREE_VECTORIZER_H = tree-vectorizer.h $(TREE_DATA_REF_H)
IPA_PROP_H = ipa-prop.h $(TREE_H) $(VEC_H) $(CGRAPH_H) $(GIMPLE_H) alloc-pool.h
GSTAB_H = gstab.h stab.def
BITMAP_H = bitmap.h $(HASHTAB_H) statistics.h
-GCC_PLUGIN_H = gcc-plugin.h highlev-plugin-common.h $(CONFIG_H) $(SYSTEM_H) \
- $(HASHTAB_H)
+GCC_PLUGIN_H = gcc-plugin.h highlev-plugin-common.h plugin.def \
+ $(CONFIG_H) $(SYSTEM_H) $(HASHTAB_H)
PLUGIN_H = plugin.h $(GCC_PLUGIN_H)
PLUGIN_VERSION_H = plugin-version.h configargs.h
LIBFUNCS_H = libfuncs.h $(HASHTAB_H)
@@ -1253,7 +1254,6 @@ OBJS = \
ree.o \
incpath.o \
init-regs.o \
- integrate.o \
internal-fn.o \
ipa-cp.o \
ipa-split.o \
@@ -1868,7 +1868,7 @@ c-decl.o : c-decl.c c-lang.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(C_TREE_H) $(GGC_H) $(TARGET_H) $(FLAGS_H) $(FUNCTION_H) \
output.h debug.h toplev.h intl.h $(TM_P_H) $(TREE_INLINE_H) \
$(TIMEVAR_H) $(OPTS_H) $(C_PRAGMA_H) gt-c-decl.h $(CGRAPH_H) \
- $(HASHTAB_H) $(LIBFUNCS_H) $(EXCEPT_H) $(LANGHOOKS_DEF_H) \
+ $(HASHTAB_H) $(LANGHOOKS_DEF_H) \
$(TREE_DUMP_H) $(C_COMMON_H) $(CPPLIB_H) $(DIAGNOSTIC_CORE_H) \
$(INPUT_H) langhooks.h pointer-set.h tree-iterator.h \
$(PLUGIN_H) c-family/c-ada-spec.h c-family/c-objc.h cilk.h
@@ -1886,7 +1886,7 @@ c-objc-common.o : c-objc-common.c c-objc-common.h \
$(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TREE_H) $(C_TREE_H) $(FLAGS_H) $(DIAGNOSTIC_H) \
langhooks.h $(GGC_H) $(C_PRETTY_PRINT_H) intl.h \
- tree-pretty-print.h
+ $(TREE_PRETTY_PRINT_H)
c-parser.o : c-parser.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(TREE_H) $(C_TREE_H) $(C_COMMON_H) $(C_PRAGMA_H) $(CPPLIB_H) \
@@ -1896,12 +1896,10 @@ c-parser.o : c-parser.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
c-family/c-objc.h cilk.h
c-typeck.o : c-typeck.c c-lang.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
- $(TREE_H) $(C_TREE_H) $(TARGET_H) $(FLAGS_H) intl.h output.h $(EXPR_H) \
+ $(TREE_H) $(C_TREE_H) $(TARGET_H) $(FLAGS_H) intl.h output.h \
langhooks.h tree-iterator.h $(BITMAP_H) $(GIMPLE_H) \
c-family/c-objc.h cilk.h
-
-
graph.o: graph.c $(SYSTEM_H) coretypes.h $(TM_H) toplev.h $(DIAGNOSTIC_CORE_H) $(FLAGS_H) output.h \
$(RTL_H) $(FUNCTION_H) hard-reg-set.h $(BASIC_BLOCK_H) graph.h $(OBSTACK_H) \
$(CONFIG_H) $(EMIT_RTL_H)
@@ -2042,7 +2040,7 @@ c-family/c-pragma.o: c-family/c-pragma.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
c-family/c-pretty-print.o : c-family/c-pretty-print.c $(C_PRETTY_PRINT_H) \
$(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
- $(DIAGNOSTIC_H) tree-iterator.h intl.h tree-pretty-print.h
+ $(DIAGNOSTIC_H) tree-iterator.h intl.h $(TREE_PRETTY_PRINT_H)
c-family/c-semantics.o : c-family/c-semantics.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(TREE_H) $(FLAGS_H) output.h \
@@ -2064,7 +2062,7 @@ default-c.o: config/default-c.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
# Files used by all variants of C and some other languages.
attribs.o : attribs.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
- $(FLAGS_H) toplev.h $(DIAGNOSTIC_CORE_H) output.h $(GGC_H) $(TM_P_H) \
+ $(FLAGS_H) $(DIAGNOSTIC_CORE_H) $(GGC_H) $(TM_P_H) \
$(TARGET_H) langhooks.h $(CPPLIB_H) $(PLUGIN_H)
incpath.o: incpath.c incpath.h $(CONFIG_H) $(SYSTEM_H) $(CPPLIB_H) \
@@ -2170,7 +2168,7 @@ trans-mem.o : trans-mem.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TREE_H) $(GIMPLE_H) $(TREE_FLOW_H) $(TREE_PASS_H) $(TREE_INLINE_H) \
$(DIAGNOSTIC_CORE_H) $(DEMANGLE_H) output.h $(TRANS_MEM_H) \
$(PARAMS_H) $(TARGET_H) langhooks.h \
- tree-pretty-print.h gimple-pretty-print.h $(CFGLOOP_H)
+ $(GIMPLE_PRETTY_PRINT_H) $(CFGLOOP_H)
ggc-common.o: ggc-common.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(GGC_H) $(HASHTAB_H) $(DIAGNOSTIC_CORE_H) $(PARAMS_H) hosthooks.h \
@@ -2193,8 +2191,7 @@ stringpool.o: stringpool.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
convert.o: convert.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(FLAGS_H) convert.h $(DIAGNOSTIC_CORE_H) langhooks.h
-double-int.o: double-int.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
- toplev.h $(TREE_H)
+double-int.o: double-int.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H)
# lto-compress.o needs $(ZLIBINC) added to the include flags.
CFLAGS-lto-compress.o += $(ZLIBINC)
@@ -2264,7 +2261,7 @@ lto-streamer.o: lto-streamer.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TREE_FLOW_H) $(DIAGNOSTIC_CORE_H) $(LTO_SYMTAB_H) toplev.h \
$(DIAGNOSTIC_CORE_H) $(STREAMER_HOOKS_H)
langhooks.o : langhooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
- $(TREE_H) toplev.h $(DIAGNOSTIC_CORE_H) $(TREE_INLINE_H) $(RTL_H) insn-config.h $(INTEGRATE_H) \
+ $(TREE_H) toplev.h $(DIAGNOSTIC_CORE_H) $(TREE_INLINE_H) $(RTL_H) insn-config.h \
langhooks.h $(TARGET_H) $(LANGHOOKS_DEF_H) $(FLAGS_H) $(GGC_H) $(DIAGNOSTIC_H) \
intl.h $(GIMPLE_H) $(CGRAPH_H) output.h tree-diagnostic.h
tree.o: tree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
@@ -2273,7 +2270,7 @@ tree.o: tree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
langhooks.h gt-tree.h $(TREE_INLINE_H) tree-iterator.h \
$(BASIC_BLOCK_H) $(TREE_FLOW_H) $(OBSTACK_H) pointer-set.h \
tree-pass.h $(LANGHOOKS_DEF_H) $(DIAGNOSTIC_H) $(CGRAPH_H) $(TIMEVAR_H) \
- $(EXCEPT_H) debug.h intl.h tree-diagnostic.h tree-pretty-print.h \
+ $(EXCEPT_H) debug.h intl.h tree-diagnostic.h $(TREE_PRETTY_PRINT_H) \
$(COMMON_TARGET_H)
tree-dump.o: tree-dump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) langhooks.h toplev.h $(SPLAY_TREE_H) $(TREE_DUMP_H) \
@@ -2283,11 +2280,11 @@ tree-inline.o : tree-inline.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(HASHTAB_H) langhooks.h $(TREE_INLINE_H) $(CGRAPH_H) \
intl.h $(FUNCTION_H) $(GIMPLE_H) \
debug.h $(DIAGNOSTIC_H) $(EXCEPT_H) $(TREE_FLOW_H) tree-iterator.h tree-mudflap.h \
- $(IPA_PROP_H) value-prof.h $(TREE_PASS_H) $(TARGET_H) $(INTEGRATE_H) \
- tree-pretty-print.h
+ $(IPA_PROP_H) value-prof.h $(TREE_PASS_H) $(TARGET_H) \
+ $(TREE_PRETTY_PRINT_H)
print-tree.o : print-tree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(GGC_H) langhooks.h tree-iterator.h \
- $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_PASS_H) gimple-pretty-print.h
+ $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_PASS_H) $(GIMPLE_PRETTY_PRINT_H)
stor-layout.o : stor-layout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(PARAMS_H) $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) output.h $(RTL_H) \
$(GGC_H) $(TM_P_H) $(TARGET_H) langhooks.h $(REGS_H) gt-stor-layout.h \
@@ -2298,7 +2295,7 @@ tree-ssa-tail-merge.o: tree-ssa-tail-merge.c \
$(TREE_H) $(TREE_FLOW_H) $(TREE_INLINE_H) \
$(GIMPLE_H) $(FUNCTION_H) \
$(TIMEVAR_H) tree-ssa-sccvn.h \
- $(CGRAPH_H) gimple-pretty-print.h tree-pretty-print.h $(PARAMS_H)
+ $(CGRAPH_H) $(GIMPLE_PRETTY_PRINT_H) $(PARAMS_H)
tree-ssa-structalias.o: tree-ssa-structalias.c \
$(SYSTEM_H) $(CONFIG_H) coretypes.h $(TM_H) $(GGC_H) $(OBSTACK_H) $(BITMAP_H) \
$(FLAGS_H) $(TM_P_H) $(BASIC_BLOCK_H) output.h \
@@ -2311,34 +2308,33 @@ tree-ssa-uninit.o : tree-ssa-uninit.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
$(TREE_DUMP_H) langhooks.h tree-pass.h $(BASIC_BLOCK_H) $(BITMAP_H) \
$(FLAGS_H) $(HASHTAB_H) pointer-set.h \
- $(GIMPLE_H) $(TREE_INLINE_H) gimple-pretty-print.h
+ $(GIMPLE_H) $(TREE_INLINE_H) $(GIMPLE_PRETTY_PRINT_H)
tree-ssa.o : tree-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(TM_P_H) $(EXPR_H) output.h $(DIAGNOSTIC_H) \
toplev.h $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
$(TREE_DUMP_H) langhooks.h $(TREE_PASS_H) $(BASIC_BLOCK_H) $(BITMAP_H) \
$(FLAGS_H) $(GGC_H) $(HASHTAB_H) pointer-set.h \
- $(GIMPLE_H) $(TREE_INLINE_H) $(TARGET_H) tree-pretty-print.h \
- gimple-pretty-print.h $(CFGLOOP_H)
+ $(GIMPLE_H) $(TREE_INLINE_H) $(TARGET_H) \
+ $(GIMPLE_PRETTY_PRINT_H) $(CFGLOOP_H)
tree-into-ssa.o : tree-into-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(TM_P_H) $(EXPR_H) output.h $(DIAGNOSTIC_H) \
$(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
langhooks.h domwalk.h $(TREE_PASS_H) $(PARAMS_H) $(BASIC_BLOCK_H) \
$(BITMAP_H) $(CFGLOOP_H) $(FLAGS_H) $(HASHTAB_H) \
- $(GIMPLE_H) $(TREE_INLINE_H) vecprim.h tree-pretty-print.h \
- gimple-pretty-print.h
+ $(GIMPLE_H) $(TREE_INLINE_H) vecprim.h \
+ $(GIMPLE_PRETTY_PRINT_H)
tree-ssa-ter.o : tree-ssa-ter.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
- $(TREE_SSA_LIVE_H) $(BITMAP_H) $(FLAGS_H) tree-pretty-print.h \
- gimple-pretty-print.h
+ $(TREE_SSA_LIVE_H) $(BITMAP_H) $(FLAGS_H) \
+ $(GIMPLE_PRETTY_PRINT_H)
tree-ssa-coalesce.o : tree-ssa-coalesce.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
$(TREE_SSA_LIVE_H) $(BITMAP_H) $(FLAGS_H) $(HASHTAB_H) \
- tree-pretty-print.h
+ $(TREE_PRETTY_PRINT_H)
tree-outof-ssa.o : tree-outof-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
$(TREE_PASS_H) $(TREE_SSA_LIVE_H) $(BASIC_BLOCK_H) $(BITMAP_H) $(GGC_H) \
- $(EXPR_H) $(SSAEXPAND_H) tree-pretty-print.h \
- gimple-pretty-print.h
+ $(EXPR_H) $(SSAEXPAND_H) $(GIMPLE_PRETTY_PRINT_H)
tree-ssa-dse.o : tree-ssa-dse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(GGC_H) $(TREE_H) $(RTL_H) $(TM_P_H) $(BASIC_BLOCK_H) \
$(TREE_FLOW_H) $(TREE_PASS_H) $(TREE_DUMP_H) domwalk.h $(FLAGS_H) \
@@ -2346,42 +2342,41 @@ tree-ssa-dse.o : tree-ssa-dse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
tree-ssa-forwprop.o : tree-ssa-forwprop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(TREE_H) $(TM_P_H) $(BASIC_BLOCK_H) \
$(TREE_FLOW_H) $(TREE_PASS_H) $(TREE_DUMP_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \
- langhooks.h $(FLAGS_H) $(GIMPLE_H) tree-pretty-print.h \
- gimple-pretty-print.h $(EXPR_H)
+ langhooks.h $(FLAGS_H) $(GIMPLE_H) $(GIMPLE_PRETTY_PRINT_H) $(EXPR_H)
tree-ssa-phiprop.o : tree-ssa-phiprop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(TREE_H) $(TM_P_H) $(BASIC_BLOCK_H) \
$(TREE_FLOW_H) $(TREE_PASS_H) $(TREE_DUMP_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \
- langhooks.h $(FLAGS_H) tree-pretty-print.h gimple-pretty-print.h
+ langhooks.h $(FLAGS_H) $(GIMPLE_PRETTY_PRINT_H)
tree-ssa-ifcombine.o : tree-ssa-ifcombine.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(TREE_H) $(BASIC_BLOCK_H) \
$(TREE_FLOW_H) $(TREE_PASS_H) $(TREE_DUMP_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \
- tree-pretty-print.h
+ $(TREE_PRETTY_PRINT_H)
tree-ssa-phiopt.o : tree-ssa-phiopt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(GGC_H) $(TREE_H) $(TM_P_H) $(BASIC_BLOCK_H) \
$(TREE_FLOW_H) $(TREE_PASS_H) $(TREE_DUMP_H) langhooks.h $(FLAGS_H) \
$(DIAGNOSTIC_H) $(TIMEVAR_H) pointer-set.h domwalk.h $(CFGLOOP_H) \
- $(TREE_DATA_REF_H) tree-pretty-print.h
+ $(TREE_DATA_REF_H) $(TREE_PRETTY_PRINT_H)
tree-nrv.o : tree-nrv.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(TREE_H) $(FUNCTION_H) $(BASIC_BLOCK_H) $(FLAGS_H) \
$(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TIMEVAR_H) $(TREE_DUMP_H) $(TREE_PASS_H) \
- langhooks.h tree-pretty-print.h
+ langhooks.h $(TREE_PRETTY_PRINT_H)
tree-ssa-copy.o : tree-ssa-copy.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h $(DIAGNOSTIC_H) \
$(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
$(BASIC_BLOCK_H) $(TREE_PASS_H) langhooks.h tree-ssa-propagate.h \
- $(FLAGS_H) $(CFGLOOP_H) tree-pretty-print.h gimple-pretty-print.h
+ $(FLAGS_H) $(CFGLOOP_H) $(GIMPLE_PRETTY_PRINT_H)
tree-ssa-propagate.o : tree-ssa-propagate.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(TM_P_H) $(EXPR_H) output.h \
$(DIAGNOSTIC_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
$(TREE_DUMP_H) $(BASIC_BLOCK_H) $(TREE_PASS_H) langhooks.h \
tree-ssa-propagate.h $(VEC_H) value-prof.h gt-tree-ssa-propagate.h $(FLAGS_H) \
- $(GIMPLE_H) gimple-pretty-print.h
+ $(GIMPLE_H) $(GIMPLE_PRETTY_PRINT_H)
tree-ssa-dom.o : tree-ssa-dom.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(TM_P_H) $(EXPR_H) output.h $(DIAGNOSTIC_H) \
$(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
$(BASIC_BLOCK_H) domwalk.h $(TREE_PASS_H) $(FLAGS_H) langhooks.h \
- tree-ssa-propagate.h $(CFGLOOP_H) $(PARAMS_H) tree-pretty-print.h \
- gimple-pretty-print.h
+ tree-ssa-propagate.h $(CFGLOOP_H) $(PARAMS_H) \
+ $(GIMPLE_PRETTY_PRINT_H)
tree-ssa-uncprop.o : tree-ssa-uncprop.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(TM_P_H) $(EXPR_H) output.h \
$(DIAGNOSTIC_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
@@ -2407,37 +2402,35 @@ domwalk.o : domwalk.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
tree-ssa-live.o : tree-ssa-live.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
$(TREE_SSA_LIVE_H) $(BITMAP_H) debug.h $(FLAGS_H) \
- tree-pretty-print.h gimple-pretty-print.h $(GIMPLE_H)
+ $(GIMPLE_PRETTY_PRINT_H) $(GIMPLE_H)
tree-ssa-copyrename.o : tree-ssa-copyrename.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(DIAGNOSTIC_H) $(FUNCTION_H) $(TIMEVAR_H) \
$(TREE_PASS_H) $(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_SSA_LIVE_H) \
$(BASIC_BLOCK_H) $(BITMAP_H) $(FLAGS_H) $(HASHTAB_H) langhooks.h \
- $(GIMPLE_H) $(TREE_INLINE_H) $(GIMPLE_H) tree-pretty-print.h
+ $(GIMPLE_H) $(TREE_INLINE_H) $(GIMPLE_H)
tree-ssa-pre.o : tree-ssa-pre.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(FIBHEAP_H) \
$(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) langhooks.h \
$(CFGLOOP_H) alloc-pool.h $(BASIC_BLOCK_H) $(BITMAP_H) $(HASHTAB_H) \
$(GIMPLE_H) $(TREE_INLINE_H) tree-iterator.h tree-ssa-sccvn.h $(PARAMS_H) \
- $(DBGCNT_H) tree-scalar-evolution.h tree-pretty-print.h \
- gimple-pretty-print.h
+ $(DBGCNT_H) tree-scalar-evolution.h $(GIMPLE_PRETTY_PRINT_H)
tree-ssa-sccvn.o : tree-ssa-sccvn.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(FIBHEAP_H) \
$(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) $(CFGLOOP_H) \
alloc-pool.h $(BASIC_BLOCK_H) $(BITMAP_H) langhooks.h $(HASHTAB_H) $(GIMPLE_H) \
$(TREE_INLINE_H) tree-iterator.h tree-ssa-propagate.h tree-ssa-sccvn.h \
- $(PARAMS_H) tree-pretty-print.h gimple-pretty-print.h gimple-fold.h
+ $(PARAMS_H) $(GIMPLE_PRETTY_PRINT_H) gimple-fold.h
tree-vrp.o : tree-vrp.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(TREE_FLOW_H) $(TREE_PASS_H) $(TREE_DUMP_H) $(DIAGNOSTIC_H) $(GGC_H) \
$(BASIC_BLOCK_H) tree-ssa-propagate.h $(FLAGS_H) $(TREE_DUMP_H) \
- $(CFGLOOP_H) $(SCEV_H) $(TIMEVAR_H) intl.h tree-pretty-print.h \
- gimple-pretty-print.h gimple-fold.h $(OPTABS_H) $(EXPR_H)
+ $(CFGLOOP_H) $(SCEV_H) $(TIMEVAR_H) intl.h \
+ $(GIMPLE_PRETTY_PRINT_H) gimple-fold.h $(OPTABS_H) $(EXPR_H)
tree-cfg.o : tree-cfg.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) $(FLAGS_H) output.h \
$(DIAGNOSTIC_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
$(TREE_DUMP_H) $(EXCEPT_H) langhooks.h $(CFGLOOP_H) $(TREE_PASS_H) \
$(CFGLAYOUT_H) $(BASIC_BLOCK_H) \
- value-prof.h tree-ssa-propagate.h $(TREE_INLINE_H) tree-pretty-print.h \
- gimple-pretty-print.h
+ value-prof.h tree-ssa-propagate.h $(TREE_INLINE_H) $(GIMPLE_PRETTY_PRINT_H)
tree-cfgcleanup.o : tree-cfgcleanup.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) $(FLAGS_H) output.h \
$(DIAGNOSTIC_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
@@ -2447,14 +2440,14 @@ tree-cfgcleanup.o : tree-cfgcleanup.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
tree-tailcall.o : tree-tailcall.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(TM_P_H) $(FUNCTION_H) $(TM_H) coretypes.h \
$(TREE_DUMP_H) $(DIAGNOSTIC_H) $(EXCEPT_H) $(TREE_PASS_H) $(FLAGS_H) langhooks.h \
- $(BASIC_BLOCK_H) $(DBGCNT_H) gimple-pretty-print.h $(TARGET_H) \
+ $(BASIC_BLOCK_H) $(DBGCNT_H) $(GIMPLE_PRETTY_PRINT_H) $(TARGET_H) \
$(COMMON_TARGET_H)
tree-ssa-sink.o : tree-ssa-sink.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \
$(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) alloc-pool.h \
$(BASIC_BLOCK_H) $(BITMAP_H) $(CFGLOOP_H) $(FIBHEAP_H) $(HASHTAB_H) \
langhooks.h $(GIMPLE_H) $(TREE_INLINE_H) tree-iterator.h \
- gimple-pretty-print.h
+ $(GIMPLE_PRETTY_PRINT_H)
tree-nested.o: tree-nested.c $(CONFIG_H) $(SYSTEM_H) $(TM_H) $(TREE_H) \
$(TM_P_H) $(FUNCTION_H) $(TREE_DUMP_H) $(TREE_INLINE_H) \
tree-iterator.h $(GIMPLE_H) $(CGRAPH_H) $(EXPR_H) langhooks.h \
@@ -2462,7 +2455,7 @@ tree-nested.o: tree-nested.c $(CONFIG_H) $(SYSTEM_H) $(TM_H) $(TREE_H) \
tree-if-conv.o: tree-if-conv.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(FLAGS_H) $(TIMEVAR_H) $(BASIC_BLOCK_H) $(TREE_FLOW_H) \
$(CFGLOOP_H) $(TREE_DATA_REF_H) $(TREE_PASS_H) $(DIAGNOSTIC_H) \
- $(TREE_DUMP_H) $(DBGCNT_H) tree-pretty-print.h gimple-pretty-print.h
+ $(TREE_DUMP_H) $(DBGCNT_H) $(GIMPLE_PRETTY_PRINT_H)
tree-iterator.o : tree-iterator.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
coretypes.h $(GGC_H) tree-iterator.h $(GIMPLE_H) gt-tree-iterator.h
tree-dfa.o : tree-dfa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
@@ -2470,12 +2463,11 @@ tree-dfa.o : tree-dfa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(TREE_INLINE_H) $(HASHTAB_H) pointer-set.h $(FLAGS_H) $(FUNCTION_H) \
$(TIMEVAR_H) convert.h $(TM_H) coretypes.h langhooks.h $(TREE_DUMP_H) \
$(TREE_PASS_H) $(PARAMS_H) $(CGRAPH_H) $(BASIC_BLOCK_H) $(GIMPLE_H) \
- tree-pretty-print.h
+ $(TREE_PRETTY_PRINT_H)
tree-ssa-operands.o : tree-ssa-operands.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) $(TREE_INLINE_H) \
$(FLAGS_H) $(FUNCTION_H) $(TM_H) $(TIMEVAR_H) $(TREE_PASS_H) \
- coretypes.h langhooks.h $(IPA_REFERENCE_H) tree-pretty-print.h \
- gimple-pretty-print.h
+ coretypes.h langhooks.h $(IPA_REFERENCE_H) $(GIMPLE_PRETTY_PRINT_H)
tree-eh.o : tree-eh.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(TM_H) $(FLAGS_H) $(FUNCTION_H) $(EXCEPT_H) langhooks.h \
$(GGC_H) $(TREE_PASS_H) coretypes.h $(TIMEVAR_H) pointer-set.h \
@@ -2495,17 +2487,17 @@ tree-ssa-address.o : tree-ssa-address.c $(TREE_FLOW_H) $(CONFIG_H) \
output.h $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
$(TREE_PASS_H) $(FLAGS_H) $(TREE_INLINE_H) $(RECOG_H) insn-config.h \
$(EXPR_H) gt-tree-ssa-address.h $(GGC_H) tree-affine.h $(TARGET_H) \
- tree-pretty-print.h
+ $(TREE_PRETTY_PRINT_H)
tree-ssa-loop-niter.o : tree-ssa-loop-niter.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) $(PARAMS_H) \
$(TREE_INLINE_H) output.h $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
$(DIAGNOSTIC_CORE_H) $(FLAGS_H) $(TREE_PASS_H) $(TREE_DATA_REF_H) \
- $(BASIC_BLOCK_H) $(GGC_H) intl.h tree-pretty-print.h gimple-pretty-print.h
+ $(BASIC_BLOCK_H) $(GGC_H) intl.h $(GIMPLE_PRETTY_PRINT_H)
tree-ssa-loop-ivcanon.o : tree-ssa-loop-ivcanon.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) $(PARAMS_H) \
$(TREE_INLINE_H) output.h $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
$(FLAGS_H) $(TREE_PASS_H) $(SCEV_H) $(BASIC_BLOCK_H) $(TARGET_H) \
- tree-pretty-print.h gimple-pretty-print.h
+ $(GIMPLE_PRETTY_PRINT_H)
tree-ssa-loop-ch.o : tree-ssa-loop-ch.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) $(TREE_INLINE_H) \
output.h $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
@@ -2516,22 +2508,22 @@ tree-ssa-loop-prefetch.o: tree-ssa-loop-prefetch.c $(TREE_FLOW_H) $(CONFIG_H) \
$(TREE_PASS_H) $(RECOG_H) insn-config.h $(HASHTAB_H) \
$(CFGLOOP_H) $(PARAMS_H) langhooks.h $(BASIC_BLOCK_H) \
$(DIAGNOSTIC_CORE_H) langhooks.h $(TREE_INLINE_H) $(TREE_DATA_REF_H) \
- $(OPTABS_H) tree-pretty-print.h
+ $(OPTABS_H) $(TREE_PRETTY_PRINT_H)
tree-predcom.o: tree-predcom.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(TM_P_H) \
$(CFGLOOP_H) $(TREE_FLOW_H) $(GGC_H) $(TREE_DATA_REF_H) \
$(PARAMS_H) $(DIAGNOSTIC_H) $(TREE_PASS_H) $(TM_H) coretypes.h \
- tree-affine.h $(TREE_INLINE_H) tree-pretty-print.h
+ tree-affine.h $(TREE_INLINE_H) $(TREE_PRETTY_PRINT_H)
tree-ssa-loop-ivopts.o : tree-ssa-loop-ivopts.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) $(EXPR_H) \
output.h $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
$(TREE_PASS_H) $(GGC_H) $(RECOG_H) insn-config.h $(HASHTAB_H) $(SCEV_H) \
$(CFGLOOP_H) $(PARAMS_H) langhooks.h $(BASIC_BLOCK_H) \
- tree-affine.h pointer-set.h $(TARGET_H) tree-pretty-print.h \
- gimple-pretty-print.h tree-ssa-propagate.h
+ tree-affine.h pointer-set.h $(TARGET_H) \
+ $(GIMPLE_PRETTY_PRINT_H) tree-ssa-propagate.h
tree-affine.o : tree-affine.c tree-affine.h $(CONFIG_H) pointer-set.h \
$(SYSTEM_H) $(TREE_H) $(GIMPLE_H) \
output.h $(DIAGNOSTIC_H) coretypes.h $(TREE_DUMP_H) $(FLAGS_H) \
- tree-pretty-print.h
+ $(TREE_PRETTY_PRINT_H)
tree-ssa-loop-manip.o : tree-ssa-loop-manip.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(BASIC_BLOCK_H) output.h $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) \
@@ -2541,25 +2533,24 @@ tree-ssa-loop-im.o : tree-ssa-loop-im.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) domwalk.h \
$(PARAMS_H) output.h $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
$(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) $(BASIC_BLOCK_H) \
- pointer-set.h tree-affine.h tree-ssa-propagate.h gimple-pretty-print.h \
- tree-pretty-print.h
+ pointer-set.h tree-affine.h tree-ssa-propagate.h $(GIMPLE_PRETTY_PRINT_H)
tree-ssa-math-opts.o : tree-ssa-math-opts.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(FLAGS_H) $(TREE_H) $(TREE_FLOW_H) $(TIMEVAR_H) \
$(TREE_PASS_H) alloc-pool.h $(BASIC_BLOCK_H) $(TARGET_H) \
- $(DIAGNOSTIC_H) $(RTL_H) $(EXPR_H) $(OPTABS_H) gimple-pretty-print.h
+ $(DIAGNOSTIC_H) $(RTL_H) $(EXPR_H) $(OPTABS_H) $(GIMPLE_PRETTY_PRINT_H)
tree-ssa-alias.o : tree-ssa-alias.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) $(TREE_INLINE_H) $(FLAGS_H) \
$(FUNCTION_H) $(TIMEVAR_H) convert.h $(TM_H) coretypes.h langhooks.h \
$(TREE_DUMP_H) $(TREE_PASS_H) $(PARAMS_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) \
$(GIMPLE_H) $(VEC_H) $(TARGET_H) \
vecprim.h pointer-set.h alloc-pool.h \
- tree-pretty-print.h
+ $(TREE_PRETTY_PRINT_H)
tree-ssa-reassoc.o : tree-ssa-reassoc.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \
$(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) \
tree-iterator.h $(BASIC_BLOCK_H) $(GIMPLE_H) $(TREE_INLINE_H) \
$(VEC_H) langhooks.h alloc-pool.h pointer-set.h $(CFGLOOP_H) \
- tree-pretty-print.h gimple-pretty-print.h $(DIAGNOSTIC_CORE_H)
+ $(GIMPLE_PRETTY_PRINT_H) $(DIAGNOSTIC_CORE_H)
tree-optimize.o : tree-optimize.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(TM_P_H) $(GGC_H) output.h \
$(DIAGNOSTIC_H) $(BASIC_BLOCK_H) $(FLAGS_H) $(TIMEVAR_H) $(TM_H) \
@@ -2569,11 +2560,11 @@ tree-optimize.o : tree-optimize.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(TREE_PASS_H) $(CFGLOOP_H) $(EXCEPT_H)
gimplify.o : gimplify.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(GIMPLE_H) \
- $(DIAGNOSTIC_H) $(GIMPLE_H) $(TREE_INLINE_H) langhooks.h \
+ $(DIAGNOSTIC_H) $(TREE_INLINE_H) langhooks.h \
$(LANGHOOKS_DEF_H) $(TREE_FLOW_H) $(CGRAPH_H) $(TIMEVAR_H) $(TM_H) \
coretypes.h $(EXCEPT_H) $(FLAGS_H) $(RTL_H) $(FUNCTION_H) $(EXPR_H) output.h \
$(GGC_H) gt-gimplify.h $(HASHTAB_H) $(TARGET_H) $(DIAGNOSTIC_CORE_H) $(OPTABS_H) \
- $(SPLAY_TREE_H) $(VEC_H) tree-iterator.h tree-pass.h tree-pretty-print.h
+ $(SPLAY_TREE_H) $(VEC_H) tree-iterator.h tree-pass.h $(TREE_PRETTY_PRINT_H)
gimple-iterator.o : gimple-iterator.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TREE_H) $(GIMPLE_H) $(TREE_FLOW_H) value-prof.h
gimple-fold.o : gimple-fold.c $(TREE_FLOW_H) $(CONFIG_H) \
@@ -2592,19 +2583,19 @@ omp-low.o : omp-low.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(TREE_PASS_H) $(GGC_H) $(EXCEPT_H) $(SPLAY_TREE_H) $(OPTABS_H) \
$(CFGLOOP_H) tree-iterator.h gt-omp-low.h
tree-browser.o : tree-browser.c tree-browser.def $(CONFIG_H) $(SYSTEM_H) \
- coretypes.h $(TREE_H) tree-pretty-print.h
+ coretypes.h $(TREE_H) $(TREE_PRETTY_PRINT_H)
omega.o : omega.c omega.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TREE_H) \
$(DIAGNOSTIC_CORE_H) $(TREE_PASS_H)
tree-chrec.o : tree-chrec.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
- tree-pretty-print.h $(CFGLOOP_H) $(TREE_FLOW_H) $(SCEV_H) $(TREE_PASS_H) \
+ $(TREE_PRETTY_PRINT_H) $(CFGLOOP_H) $(TREE_FLOW_H) $(SCEV_H) $(TREE_PASS_H) \
$(PARAMS_H)
tree-scalar-evolution.o : tree-scalar-evolution.c $(CONFIG_H) $(SYSTEM_H) \
- coretypes.h gimple-pretty-print.h $(TREE_FLOW_H) $(CFGLOOP_H) $(SCEV_H) \
+ coretypes.h $(GIMPLE_PRETTY_PRINT_H) $(TREE_FLOW_H) $(CFGLOOP_H) $(SCEV_H) \
$(TREE_PASS_H) $(PARAMS_H) gt-tree-scalar-evolution.h
tree-data-ref.o : tree-data-ref.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
- gimple-pretty-print.h $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
+ $(GIMPLE_PRETTY_PRINT_H) $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
$(TREE_PASS_H) langhooks.h tree-affine.h $(PARAMS_H)
-sese.o : sese.c sese.h $(CONFIG_H) $(SYSTEM_H) coretypes.h tree-pretty-print.h \
+sese.o : sese.c sese.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TREE_PRETTY_PRINT_H) \
$(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) tree-pass.h value-prof.h
graphite.o : graphite.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DIAGNOSTIC_CORE_H) \
$(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h \
@@ -2628,7 +2619,7 @@ graphite-interchange.o : graphite-interchange.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
sese.h graphite-ppl.h graphite-poly.h
graphite-poly.o : graphite-poly.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
- $(DIAGNOSTIC_CORE_H) $(TREE_FLOW_H) $(TREE_DUMP_H) gimple-pretty-print.h \
+ $(DIAGNOSTIC_CORE_H) $(TREE_FLOW_H) $(TREE_DUMP_H) $(GIMPLE_PRETTY_PRINT_H) \
$(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h graphite-ppl.h graphite-poly.h \
graphite-dependences.h graphite-cloog-util.h
graphite-ppl.o : graphite-ppl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
@@ -2643,50 +2634,47 @@ graphite-sese-to-poly.o : graphite-sese-to-poly.c $(CONFIG_H) \
tree-vect-loop.o: tree-vect-loop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(GGC_H) $(TREE_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) \
$(TREE_DUMP_H) $(CFGLOOP_H) $(CFGLAYOUT_H) $(EXPR_H) $(RECOG_H) $(OPTABS_H) \
- $(DIAGNOSTIC_CORE_H) $(SCEV_H) $(TREE_VECTORIZER_H) tree-pretty-print.h \
- gimple-pretty-print.h $(TARGET_H) $(TREE_DATA_REF_H)
+ $(DIAGNOSTIC_CORE_H) $(SCEV_H) $(TREE_VECTORIZER_H) \
+ $(GIMPLE_PRETTY_PRINT_H) $(TARGET_H) $(TREE_DATA_REF_H)
tree-vect-loop-manip.o: tree-vect-loop-manip.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(GGC_H) $(TREE_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) \
$(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(CFGLAYOUT_H) $(EXPR_H) $(DIAGNOSTIC_CORE_H) \
- $(SCEV_H) $(TREE_VECTORIZER_H) langhooks.h tree-pretty-print.h \
- gimple-pretty-print.h
+ $(SCEV_H) $(TREE_VECTORIZER_H) langhooks.h $(GIMPLE_PRETTY_PRINT_H)
tree-vect-patterns.o: tree-vect-patterns.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(GGC_H) $(TREE_H) $(TARGET_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) \
$(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(EXPR_H) $(OPTABS_H) $(PARAMS_H) \
$(TREE_DATA_REF_H) $(TREE_VECTORIZER_H) $(RECOG_H) $(DIAGNOSTIC_CORE_H) \
- gimple-pretty-print.h
+ $(GIMPLE_PRETTY_PRINT_H)
tree-vect-slp.o: tree-vect-slp.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(GGC_H) $(TREE_H) $(TARGET_H) $(BASIC_BLOCK_H) \
$(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(CFGLAYOUT_H) \
- $(EXPR_H) $(RECOG_H) $(OPTABS_H) $(TREE_VECTORIZER_H) tree-pretty-print.h \
- gimple-pretty-print.h $(TREE_DATA_REF_H) langhooks.h
+ $(EXPR_H) $(RECOG_H) $(OPTABS_H) $(TREE_VECTORIZER_H) \
+ $(GIMPLE_PRETTY_PRINT_H) $(TREE_DATA_REF_H) langhooks.h
tree-vect-stmts.o: tree-vect-stmts.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(GGC_H) $(TREE_H) $(TARGET_H) $(BASIC_BLOCK_H) \
$(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(CFGLAYOUT_H) \
$(EXPR_H) $(RECOG_H) $(OPTABS_H) $(DIAGNOSTIC_CORE_H) $(TREE_VECTORIZER_H) \
- langhooks.h tree-pretty-print.h gimple-pretty-print.h
+ langhooks.h $(GIMPLE_PRETTY_PRINT_H)
tree-vect-data-refs.o: tree-vect-data-refs.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(GGC_H) $(TREE_H) $(TARGET_H) $(BASIC_BLOCK_H) \
$(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) \
$(EXPR_H) $(OPTABS_H) $(SCEV_H) $(TREE_VECTORIZER_H) \
- $(DIAGNOSTIC_CORE_H) $(TM_P_H) \
- tree-pretty-print.h gimple-pretty-print.h
+ $(DIAGNOSTIC_CORE_H) $(TM_P_H) $(GIMPLE_PRETTY_PRINT_H)
tree-vectorizer.o: tree-vectorizer.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(GGC_H) $(TREE_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) \
$(CFGLOOP_H) $(TREE_PASS_H) $(TREE_VECTORIZER_H) $(TIMEVAR_H) \
- tree-pretty-print.h
+ $(TREE_PRETTY_PRINT_H)
tree-loop-distribution.o: tree-loop-distribution.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) $(TREE_PASS_H)
tree-parloops.o: tree-parloops.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
- $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) gimple-pretty-print.h \
+ $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) $(GIMPLE_PRETTY_PRINT_H) \
$(TREE_PASS_H) langhooks.h gt-tree-parloops.h $(TREE_VECTORIZER_H)
tree-stdarg.o: tree-stdarg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(FUNCTION_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_PASS_H) \
- tree-stdarg.h $(TARGET_H) langhooks.h gimple-pretty-print.h
+ tree-stdarg.h $(TARGET_H) langhooks.h $(GIMPLE_PRETTY_PRINT_H)
tree-object-size.o: tree-object-size.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(TREE_H) $(DIAGNOSTIC_CORE_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) \
- $(TREE_PASS_H) tree-ssa-propagate.h tree-pretty-print.h \
- gimple-pretty-print.h
+ $(TREE_PASS_H) tree-ssa-propagate.h $(GIMPLE_PRETTY_PRINT_H)
internal-fn.o : internal-fn.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(INTERNAL_FN_H) $(TREE_H) $(EXPR_H) $(OPTABS_H) $(GIMPLE_H)
gimple.o : gimple.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TREE_H) \
@@ -2696,8 +2684,7 @@ gimple.o : gimple.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TREE_H) \
gimple-pretty-print.o : gimple-pretty-print.c $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(DIAGNOSTIC_H) $(HASHTAB_H) $(TREE_FLOW_H) \
$(TM_H) coretypes.h $(TREE_PASS_H) $(GIMPLE_H) value-prof.h \
- $(TRANS_MEM_H) \
- tree-pretty-print.h gimple-pretty-print.h
+ $(TRANS_MEM_H) $(GIMPLE_PRETTY_PRINT_H)
tree-mudflap.o : $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(TREE_INLINE_H) \
$(GIMPLE_H) $(DIAGNOSTIC_H) $(DEMANGLE_H) $(HASHTAB_H) langhooks.h tree-mudflap.h \
$(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(CGRAPH_H) $(GGC_H) \
@@ -2710,7 +2697,7 @@ tree-nomudflap.o : $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(TREE_INLINE_H) \
tree-pretty-print.o : tree-pretty-print.c $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(DIAGNOSTIC_H) $(HASHTAB_H) $(TREE_FLOW_H) \
$(TM_H) coretypes.h tree-iterator.h $(SCEV_H) langhooks.h \
- $(TREE_PASS_H) value-prof.h output.h tree-pretty-print.h
+ $(TREE_PASS_H) value-prof.h output.h $(TREE_PRETTY_PRINT_H)
tree-diagnostic.o : tree-diagnostic.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TREE_H) $(DIAGNOSTIC_H) tree-diagnostic.h langhooks.h $(LANGHOOKS_DEF_H) \
$(VEC_H)
@@ -2756,10 +2743,10 @@ toplev.o : toplev.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
hard-reg-set.h $(BASIC_BLOCK_H) graph.h $(EXCEPT_H) $(REGS_H) $(TIMEVAR_H) \
value-prof.h $(PARAMS_H) $(TM_P_H) reload.h ira.h dwarf2asm.h $(TARGET_H) \
langhooks.h insn-flags.h $(CFGLAYOUT_H) $(CFGLOOP_H) hosthooks.h \
- $(CGRAPH_H) $(COVERAGE_H) alloc-pool.h $(GGC_H) $(INTEGRATE_H) \
+ $(CGRAPH_H) $(COVERAGE_H) alloc-pool.h $(GGC_H) \
$(OPTS_H) params.def tree-mudflap.h $(TREE_PASS_H) $(GIMPLE_H) \
tree-ssa-alias.h $(PLUGIN_H) realmpfr.h tree-diagnostic.h \
- tree-pretty-print.h opts-diagnostic.h $(COMMON_TARGET_H)
+ $(TREE_PRETTY_PRINT_H) opts-diagnostic.h $(COMMON_TARGET_H)
hwint.o : hwint.c $(CONFIG_H) $(SYSTEM_H) $(DIAGNOSTIC_CORE_H)
@@ -2771,7 +2758,7 @@ passes.o : passes.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(PARAMS_H) $(TM_P_H) reload.h dwarf2asm.h $(TARGET_H) \
langhooks.h insn-flags.h $(CFGLAYOUT_H) $(CFGLOOP_H) \
hosthooks.h $(CGRAPH_H) $(COVERAGE_H) $(TREE_PASS_H) $(TREE_DUMP_H) \
- $(GGC_H) $(INTEGRATE_H) $(CPPLIB_H) $(OPTS_H) $(TREE_FLOW_H) $(TREE_INLINE_H) \
+ $(GGC_H) $(CPPLIB_H) $(OPTS_H) $(TREE_FLOW_H) $(TREE_INLINE_H) \
gt-passes.h $(DF_H) $(PREDICT_H) $(LTO_HEADER_H) $(LTO_SECTION_OUT_H) \
$(PLUGIN_H) $(IPA_UTILS_H)
@@ -2792,7 +2779,7 @@ rtl.o : rtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
print-rtl.o : print-rtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(TREE_H) hard-reg-set.h $(BASIC_BLOCK_H) $(FLAGS_H) \
- $(BCONFIG_H) $(DIAGNOSTIC_H) cselib.h $(TREE_PASS_H) tree-pretty-print.h \
+ $(BCONFIG_H) $(DIAGNOSTIC_H) cselib.h $(TREE_PASS_H) $(TREE_PRETTY_PRINT_H) \
dwarf2out.h
rtlanal.o : rtlanal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) toplev.h $(DIAGNOSTIC_CORE_H) \
$(RTL_H) hard-reg-set.h $(TM_P_H) insn-config.h $(RECOG_H) \
@@ -2809,7 +2796,7 @@ function.o : function.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_ERROR_
$(TREE_H) $(CFGLAYOUT_H) $(GIMPLE_H) $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) \
$(OPTABS_H) $(LIBFUNCS_H) $(REGS_H) hard-reg-set.h insn-config.h $(RECOG_H) \
output.h $(EXCEPT_H) $(HASHTAB_H) $(GGC_H) $(TM_P_H) langhooks.h \
- gt-function.h $(TARGET_H) $(BASIC_BLOCK_H) $(INTEGRATE_H) $(PREDICT_H) \
+ gt-function.h $(TARGET_H) $(BASIC_BLOCK_H) $(PREDICT_H) \
$(TREE_PASS_H) $(DF_H) $(TIMEVAR_H) vecprim.h $(PARAMS_H) bb-reorder.h \
$(COMMON_TARGET_H)
statistics.o : statistics.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
@@ -2824,9 +2811,9 @@ except.o : except.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(FLAGS_H) $(EXCEPT_H) $(FUNCTION_H) $(EXPR_H) $(LIBFUNCS_H) \
langhooks.h insn-config.h hard-reg-set.h $(BASIC_BLOCK_H) output.h \
dwarf2asm.h dwarf2out.h toplev.h $(DIAGNOSTIC_CORE_H) $(HASHTAB_H) intl.h $(GGC_H) \
- gt-except.h $(CGRAPH_H) $(INTEGRATE_H) $(DIAGNOSTIC_H) $(DWARF2_H) \
+ gt-except.h $(CGRAPH_H) $(DIAGNOSTIC_H) $(DWARF2_H) \
$(TARGET_H) $(TM_P_H) $(TREE_PASS_H) $(TIMEVAR_H) $(TREE_FLOW_H) \
- tree-pretty-print.h sbitmap.h $(COMMON_TARGET_H) $(CFGLOOP_H)
+ $(TREE_PRETTY_PRINT_H) sbitmap.h $(COMMON_TARGET_H) $(CFGLOOP_H)
expr.o : expr.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(FLAGS_H) $(FUNCTION_H) $(REGS_H) $(EXPR_H) $(OPTABS_H) \
$(LIBFUNCS_H) $(INSN_ATTR_H) insn-config.h $(RECOG_H) output.h \
@@ -2834,12 +2821,13 @@ expr.o : expr.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
reload.h langhooks.h intl.h $(TM_P_H) $(TARGET_H) \
tree-iterator.h gt-expr.h $(MACHMODE_H) $(TIMEVAR_H) $(TREE_FLOW_H) \
$(TREE_PASS_H) $(DF_H) $(DIAGNOSTIC_H) vecprim.h $(SSAEXPAND_H) \
- $(PARAMS_H) $(COMMON_TARGET_H)
-dojump.o : dojump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
+ $(PARAMS_H) $(COMMON_TARGET_H) target-globals.h
+dojump.o : dojump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TM_P_H) \
+ $(RTL_H) $(TREE_H) \
$(FLAGS_H) $(FUNCTION_H) $(EXPR_H) $(OPTABS_H) $(INSN_ATTR_H) insn-config.h \
langhooks.h $(GGC_H) gt-dojump.h vecprim.h $(BASIC_BLOCK_H) output.h
-builtins.o : builtins.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
- $(TREE_H) $(GIMPLE_H) $(FLAGS_H) $(TARGET_H) $(FUNCTION_H) $(REGS_H) \
+builtins.o : builtins.c builtins.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+ $(RTL_H) $(TREE_H) $(GIMPLE_H) $(FLAGS_H) $(TARGET_H) $(FUNCTION_H) $(REGS_H) \
$(EXPR_H) $(OPTABS_H) insn-config.h $(RECOG_H) output.h typeclass.h \
hard-reg-set.h $(DIAGNOSTIC_CORE_H) hard-reg-set.h $(EXCEPT_H) cilk.h \
$(TM_P_H) $(PREDICT_H) $(LIBFUNCS_H) langhooks.h $(BASIC_BLOCK_H) \
@@ -2847,7 +2835,7 @@ builtins.o : builtins.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(DIAGNOSTIC_CORE_H) $(TREE_FLOW_H) value-prof.h
calls.o : calls.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(FLAGS_H) $(EXPR_H) $(OPTABS_H) langhooks.h $(TARGET_H) \
- $(LIBFUNCS_H) $(REGS_H) toplev.h $(DIAGNOSTIC_CORE_H) output.h \
+ $(LIBFUNCS_H) $(REGS_H) $(DIAGNOSTIC_CORE_H) output.h \
$(FUNCTION_H) $(TIMEVAR_H) $(TM_P_H) $(CGRAPH_H) $(EXCEPT_H) sbitmap.h \
$(DBGCNT_H) $(TREE_FLOW_H)
expmed.o : expmed.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
@@ -2857,7 +2845,7 @@ expmed.o : expmed.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_
explow.o : explow.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
$(FLAGS_H) hard-reg-set.h insn-config.h $(EXPR_H) $(OPTABS_H) $(RECOG_H) \
$(DIAGNOSTIC_CORE_H) $(EXCEPT_H) $(FUNCTION_H) $(GGC_H) $(TM_P_H) langhooks.h gt-explow.h \
- $(TARGET_H) $(COMMON_TARGET_H) output.h
+ $(TARGET_H) $(COMMON_TARGET_H) output.h $(LIBFUNCS_H)
optabs.o : optabs.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(FLAGS_H) insn-config.h $(EXPR_H) $(OPTABS_H) $(LIBFUNCS_H) \
$(RECOG_H) reload.h $(DIAGNOSTIC_CORE_H) $(GGC_H) $(TM_P_H) \
@@ -2879,10 +2867,11 @@ dwarf2out.o : dwarf2out.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(GGC_H) $(EXCEPT_H) dwarf2asm.h $(TM_P_H) langhooks.h $(HASHTAB_H) \
gt-dwarf2out.h $(TARGET_H) $(CGRAPH_H) $(MD5_H) $(INPUT_H) $(FUNCTION_H) \
$(GIMPLE_H) $(TREE_PASS_H) $(TREE_FLOW_H) $(CFGLAYOUT_H) \
- tree-pretty-print.h $(COMMON_TARGET_H) $(OPTS_H)
+ $(TREE_PRETTY_PRINT_H) $(COMMON_TARGET_H) $(OPTS_H)
dwarf2cfi.o : dwarf2cfi.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
- version.h $(RTL_H) $(FUNCTION_H) $(DWARF2_H) dwarf2asm.h dwarf2out.h \
- $(GGC_H) $(TM_P_H) $(TARGET_H) $(TREE_PASS_H) $(BASIC_BLOCK_H)
+ version.h $(RTL_H) $(EXPR_H) $(REGS_H) $(FUNCTION_H) output.h \
+ gt-dwarf2cfi.h debug.h $(DWARF2_H) dwarf2asm.h dwarf2out.h $(COMMON_TARGET_H) \
+ $(GGC_H) $(TM_P_H) $(TARGET_H) $(TREE_PASS_H) $(BASIC_BLOCK_H) $(EXCEPT_H)
dwarf2asm.o : dwarf2asm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(FLAGS_H) $(RTL_H) $(TREE_H) output.h dwarf2asm.h $(TM_P_H) $(GGC_H) \
gt-dwarf2asm.h $(DWARF2_H) $(SPLAY_TREE_H) $(TARGET_H)
@@ -2902,14 +2891,9 @@ real.o : real.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(DIAGNOSTIC_CORE_H) $(TM_P_H) $(REAL_H) dfp.h realmpfr.h
realmpfr.o : realmpfr.c realmpfr.h $(CONFIG_H) $(SYSTEM_H) $(REAL_H)
dfp.o : dfp.c dfp.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
- $(DIAGNOSTIC_CORE_H) $(TM_P_H) $(REAL_H) $(DECNUM_H)
+ $(TM_P_H) $(REAL_H) $(DECNUM_H)
fixed-value.o: fixed-value.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(REAL_H) $(DIAGNOSTIC_CORE_H)
-integrate.o : integrate.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
- $(RTL_H) $(TREE_H) $(FLAGS_H) debug.h $(INTEGRATE_H) insn-config.h \
- $(EXPR_H) $(REGS_H) intl.h $(FUNCTION_H) output.h $(RECOG_H) \
- $(EXCEPT_H) $(DIAGNOSTIC_CORE_H) $(PARAMS_H) $(TM_P_H) $(TARGET_H) langhooks.h \
- gt-integrate.h $(GGC_H) $(TREE_PASS_H) $(DF_H)
jump.o : jump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(FLAGS_H) hard-reg-set.h $(REGS_H) insn-config.h $(RECOG_H) $(EXPR_H) \
$(EXCEPT_H) $(FUNCTION_H) $(BASIC_BLOCK_H) $(TREE_PASS_H) \
@@ -2927,23 +2911,23 @@ cgraph.o : cgraph.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
gt-cgraph.h output.h intl.h $(BASIC_BLOCK_H) debug.h $(HASHTAB_H) \
$(TREE_INLINE_H) $(TREE_DUMP_H) $(TREE_FLOW_H) cif-code.def \
value-prof.h $(EXCEPT_H) $(IPA_UTILS_H) $(DIAGNOSTIC_CORE_H) \
- ipa-inline.h $(LTO_STREAMER_H) $(CFGLOOP_H)
+ ipa-inline.h $(LTO_STREAMER_H) $(CFGLOOP_H) $(GIMPLE_PRETTY_PRINT_H)
cgraphunit.o : cgraphunit.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) langhooks.h $(TREE_INLINE_H) toplev.h $(DIAGNOSTIC_CORE_H) $(FLAGS_H) $(GGC_H) \
$(TARGET_H) $(CGRAPH_H) intl.h pointer-set.h $(FUNCTION_H) $(GIMPLE_H) \
$(TREE_FLOW_H) $(TREE_PASS_H) debug.h $(DIAGNOSTIC_H) \
$(FIBHEAP_H) output.h $(PARAMS_H) $(RTL_H) $(TIMEVAR_H) $(IPA_PROP_H) \
gt-cgraphunit.h tree-iterator.h $(COVERAGE_H) $(TREE_DUMP_H) \
- tree-pretty-print.h gimple-pretty-print.h ipa-inline.h $(IPA_UTILS_H) \
- $(LTO_STREAMER_H) output.h $(REGSET_H) $(EXCEPT_H)
+ $(GIMPLE_PRETTY_PRINT_H) ipa-inline.h $(IPA_UTILS_H) \
+ $(LTO_STREAMER_H) output.h $(REGSET_H) $(EXCEPT_H) $(GCC_PLUGIN_H) plugin.h
cgraphclones.o : cgraphclones.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) langhooks.h $(TREE_INLINE_H) toplev.h $(DIAGNOSTIC_CORE_H) $(FLAGS_H) $(GGC_H) \
$(TARGET_H) $(CGRAPH_H) intl.h pointer-set.h $(FUNCTION_H) $(GIMPLE_H) \
$(TREE_FLOW_H) $(TREE_PASS_H) debug.h $(DIAGNOSTIC_H) \
$(FIBHEAP_H) output.h $(PARAMS_H) $(RTL_H) $(TIMEVAR_H) $(IPA_PROP_H) \
- gt-cgraphunit.h tree-iterator.h $(COVERAGE_H) $(TREE_DUMP_H) \
- tree-pretty-print.h gimple-pretty-print.h ipa-inline.h $(IPA_UTILS_H) \
- $(LTO_STREAMER_H) output.h $(REGSET_H) $(EXCEPT_H)
+ tree-iterator.h $(COVERAGE_H) $(TREE_DUMP_H) \
+ $(GIMPLE_PRETTY_PRINT_H) ipa-inline.h $(IPA_UTILS_H) \
+ $(LTO_STREAMER_H) output.h $(EXCEPT_H) $(GCC_PLUGIN_H) gt-cgraphclones.h
cgraphbuild.o : cgraphbuild.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) langhooks.h $(CGRAPH_H) intl.h pointer-set.h $(GIMPLE_H) \
$(TREE_FLOW_H) $(TREE_PASS_H) $(IPA_UTILS_H) $(EXCEPT_H) \
@@ -2959,7 +2943,7 @@ ipa-prop.o : ipa-prop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
langhooks.h $(GGC_H) $(TARGET_H) $(CGRAPH_H) $(IPA_PROP_H) $(DIAGNOSTIC_H) \
$(TREE_FLOW_H) $(TM_H) $(TREE_PASS_H) $(FLAGS_H) $(TREE_H) \
$(TREE_INLINE_H) $(GIMPLE_H) $(TIMEVAR_H) \
- tree-pretty-print.h gimple-pretty-print.h $(LTO_STREAMER_H) \
+ $(GIMPLE_PRETTY_PRINT_H) $(LTO_STREAMER_H) \
$(DATA_STREAMER_H) $(TREE_STREAMER_H)
ipa-ref.o : ipa-ref.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
langhooks.h $(GGC_H) $(TARGET_H) $(CGRAPH_H) $(TREE_H) $(TARGET_H) \
@@ -2967,11 +2951,11 @@ ipa-ref.o : ipa-ref.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
ipa-cp.o : ipa-cp.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TREE_H) $(TARGET_H) $(GIMPLE_H) $(CGRAPH_H) $(IPA_PROP_H) $(TREE_FLOW_H) \
$(TREE_PASS_H) $(FLAGS_H) $(TIMEVAR_H) $(DIAGNOSTIC_H) $(TREE_DUMP_H) \
- $(TREE_INLINE_H) $(FIBHEAP_H) $(PARAMS_H) tree-pretty-print.h ipa-inline.h
-ipa-split.o : ipa-split.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+ $(TREE_INLINE_H) $(FIBHEAP_H) $(PARAMS_H) $(TREE_PRETTY_PRINT_H) ipa-inline.h
+ipa-split.o : ipa-split.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TREE_H) $(TARGET_H) $(CGRAPH_H) $(IPA_PROP_H) $(TREE_FLOW_H) \
$(TREE_PASS_H) $(FLAGS_H) $(TIMEVAR_H) $(DIAGNOSTIC_H) $(TREE_DUMP_H) \
- $(TREE_INLINE_H) $(FIBHEAP_H) $(PARAMS_H)
+ $(TREE_INLINE_H) $(FIBHEAP_H) $(PARAMS_H) $(GIMPLE_PRETTY_PRINT_H) ipa-inline.h
matrix-reorg.o : matrix-reorg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(TREE_H) $(RTL_H) $(TREE_INLINE_H) $(TREE_FLOW_H) \
tree-flow-inline.h langhooks.h $(HASHTAB_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) $(GGC_H) \
@@ -2983,18 +2967,18 @@ ipa-inline.o : ipa-inline.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) langhooks.h $(TREE_INLINE_H) $(FLAGS_H) $(CGRAPH_H) intl.h \
$(DIAGNOSTIC_H) $(FIBHEAP_H) $(PARAMS_H) $(TIMEVAR_H) $(TREE_PASS_H) \
$(COVERAGE_H) $(GGC_H) $(TREE_FLOW_H) $(RTL_H) $(IPA_PROP_H) \
- $(EXCEPT_H) gimple-pretty-print.h ipa-inline.h $(TARGET_H) $(IPA_UTILS_H)
+ $(EXCEPT_H) $(GIMPLE_PRETTY_PRINT_H) ipa-inline.h $(TARGET_H) $(IPA_UTILS_H)
ipa-inline-analysis.o : ipa-inline-analysis.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) langhooks.h $(TREE_INLINE_H) $(FLAGS_H) $(CGRAPH_H) intl.h \
$(DIAGNOSTIC_H) $(PARAMS_H) $(TIMEVAR_H) $(TREE_PASS_H) \
$(HASHTAB_H) $(COVERAGE_H) $(GGC_H) $(TREE_FLOW_H) $(IPA_PROP_H) \
- gimple-pretty-print.h ipa-inline.h $(LTO_STREAMER_H) $(DATA_STREAMER_H) \
+ $(GIMPLE_PRETTY_PRINT_H) ipa-inline.h $(LTO_STREAMER_H) $(DATA_STREAMER_H) \
$(TREE_STREAMER_H)
ipa-inline-transform.o : ipa-inline-transform.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) langhooks.h $(TREE_INLINE_H) $(FLAGS_H) $(CGRAPH_H) intl.h \
- $(DIAGNOSTIC_H) $(PARAMS_H) $(TIMEVAR_H) $(TREE_PASS_H) \
+ $(TIMEVAR_H) $(TREE_PASS_H) \
$(HASHTAB_H) $(COVERAGE_H) $(GGC_H) $(TREE_FLOW_H) $(IPA_PROP_H) \
- gimple-pretty-print.h ipa-inline.h $(LTO_STREAMER_H) tree-pass.h
+ tree-pass.h
ipa-utils.o : ipa-utils.c $(IPA_UTILS_H) $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(TREE_H) $(TREE_FLOW_H) $(TREE_INLINE_H) langhooks.h \
pointer-set.h $(GGC_H) $(GIMPLE_H) $(SPLAY_TREE_H) \
@@ -3010,7 +2994,7 @@ ipa-pure-const.o : ipa-pure-const.c $(CONFIG_H) $(SYSTEM_H) \
pointer-set.h $(GGC_H) $(IPA_UTILS_H) $(TARGET_H) \
$(GIMPLE_H) $(CGRAPH_H) output.h $(FLAGS_H) $(TREE_PASS_H) $(TIMEVAR_H) \
$(DIAGNOSTIC_H) $(CFGLOOP_H) $(SCEV_H) $(LTO_STREAMER_H) \
- gimple-pretty-print.h $(DATA_STREAMER_H) $(TREE_STREAMER_H)
+ $(GIMPLE_PRETTY_PRINT_H) $(DATA_STREAMER_H) $(TREE_STREAMER_H)
coverage.o : coverage.c $(GCOV_IO_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(RTL_H) $(TREE_H) $(FLAGS_H) output.h $(REGS_H) $(EXPR_H) \
$(FUNCTION_H) $(BASIC_BLOCK_H) toplev.h $(DIAGNOSTIC_CORE_H) $(GGC_H) langhooks.h $(COVERAGE_H) \
@@ -3034,7 +3018,7 @@ dse.o : dse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(TM_P_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
$(RECOG_H) $(EXPR_H) $(DF_H) cselib.h $(DBGCNT_H) $(TIMEVAR_H) \
$(TREE_PASS_H) alloc-pool.h $(ALIAS_H) $(OPTABS_H) $(TARGET_H) \
- $(BITMAP_H) $(PARAMS_H)
+ $(BITMAP_H) $(PARAMS_H) $(TREE_FLOW_H)
fwprop.o : fwprop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(DIAGNOSTIC_CORE_H) insn-config.h $(RECOG_H) $(FLAGS_H) $(OBSTACK_H) $(BASIC_BLOCK_H) \
output.h $(DF_H) alloc-pool.h $(TIMEVAR_H) $(TREE_PASS_H) $(TARGET_H) \
@@ -3048,7 +3032,7 @@ ree.o : ree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(REGS_H) $(TREE_H) $(TM_P_H) insn-config.h $(INSN_ATTR_H) $(DIAGNOSTIC_CORE_H) \
$(TARGET_H) $(OPTABS_H) insn-codes.h rtlhooks-def.h $(PARAMS_H) $(CGRAPH_H)
cprop.o : cprop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
- $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h $(GGC_H) \
+ $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
$(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h toplev.h $(DIAGNOSTIC_CORE_H) \
$(TM_P_H) $(PARAMS_H) cselib.h $(EXCEPT_H) $(TREE_H) $(TIMEVAR_H) \
intl.h $(OBSTACK_H) $(TREE_PASS_H) $(DF_H) $(DBGCNT_H) $(TARGET_H) \
@@ -3077,32 +3061,31 @@ mode-switching.o : mode-switching.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
tree-ssa-dce.o : tree-ssa-dce.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
$(TREE_FLOW_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) \
coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) $(BASIC_BLOCK_H) \
- $(GGC_H) $(GIMPLE_H) $(CFGLOOP_H) $(SCEV_H) tree-pretty-print.h \
- gimple-pretty-print.h
+ $(GGC_H) $(GIMPLE_H) $(CFGLOOP_H) $(SCEV_H) $(GIMPLE_PRETTY_PRINT_H)
tree-call-cdce.o : tree-call-cdce.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
$(TREE_FLOW_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) \
coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) $(BASIC_BLOCK_H) \
- $(GIMPLE_H) gimple-pretty-print.h
+ $(GIMPLE_H) $(GIMPLE_PRETTY_PRINT_H)
tree-ssa-ccp.o : tree-ssa-ccp.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(TM_P_H) $(EXPR_H) output.h \
$(DIAGNOSTIC_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
$(TREE_DUMP_H) $(BASIC_BLOCK_H) $(TREE_PASS_H) langhooks.h $(PARAMS_H) \
tree-ssa-propagate.h value-prof.h $(FLAGS_H) $(TARGET_H) $(DIAGNOSTIC_CORE_H) \
- $(DBGCNT_H) tree-pretty-print.h gimple-pretty-print.h gimple-fold.h
+ $(DBGCNT_H) $(GIMPLE_PRETTY_PRINT_H) gimple-fold.h
tree-ssa-strlen.o : tree-ssa-strlen.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TREE_FLOW_H) $(TREE_PASS_H) domwalk.h alloc-pool.h tree-ssa-propagate.h \
- gimple-pretty-print.h $(PARAMS_H) $(EXPR_H)
+ $(GIMPLE_PRETTY_PRINT_H) $(PARAMS_H) $(EXPR_H)
tree-sra.o : tree-sra.c $(CONFIG_H) $(SYSTEM_H) coretypes.h alloc-pool.h \
$(TM_H) $(TREE_H) $(GIMPLE_H) $(CGRAPH_H) $(TREE_FLOW_H) \
$(IPA_PROP_H) $(DIAGNOSTIC_H) statistics.h $(TREE_DUMP_H) $(TIMEVAR_H) \
- $(PARAMS_H) $(TARGET_H) $(FLAGS_H) $(EXPR_H) tree-pretty-print.h \
- $(DBGCNT_H) $(TREE_INLINE_H) gimple-pretty-print.h
+ $(PARAMS_H) $(TARGET_H) $(FLAGS_H) $(EXPR_H) \
+ $(DBGCNT_H) $(TREE_INLINE_H) $(GIMPLE_PRETTY_PRINT_H)
tree-switch-conversion.o : tree-switch-conversion.c $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(TM_P_H) $(TREE_FLOW_H) $(DIAGNOSTIC_H) $(TREE_INLINE_H) \
$(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) $(GIMPLE_H) \
$(TREE_PASS_H) $(FLAGS_H) $(EXPR_H) $(BASIC_BLOCK_H) output.h \
$(GGC_H) $(OBSTACK_H) $(PARAMS_H) $(CPPLIB_H) $(PARAMS_H) \
- gimple-pretty-print.h langhooks.h
+ $(GIMPLE_PRETTY_PRINT_H) langhooks.h
tree-complex.o : tree-complex.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TREE_H) \
$(TM_H) $(FLAGS_H) $(TREE_FLOW_H) $(GIMPLE_H) \
tree-iterator.h $(TREE_PASS_H) tree-ssa-propagate.h $(DIAGNOSTIC_H)
@@ -3135,7 +3118,7 @@ var-tracking.o : var-tracking.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(BASIC_BLOCK_H) output.h sbitmap.h alloc-pool.h $(FIBHEAP_H) $(HASHTAB_H) \
$(REGS_H) $(EXPR_H) $(TIMEVAR_H) $(TREE_PASS_H) $(TREE_FLOW_H) \
cselib.h $(TARGET_H) $(DIAGNOSTIC_CORE_H) $(PARAMS_H) $(DIAGNOSTIC_H) pointer-set.h \
- $(RECOG_H) $(TM_P_H) tree-pretty-print.h
+ $(RECOG_H) $(TM_P_H) $(TREE_PRETTY_PRINT_H)
profile.o : profile.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(FLAGS_H) output.h $(REGS_H) $(EXPR_H) $(FUNCTION_H) $(BASIC_BLOCK_H) \
$(DIAGNOSTIC_CORE_H) $(COVERAGE_H) $(TREE_FLOW_H) value-prof.h cfghooks.h \
@@ -3151,7 +3134,7 @@ value-prof.o : value-prof.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RECOG_H) insn-config.h $(OPTABS_H) $(REGS_H) $(GGC_H) $(DIAGNOSTIC_H) \
$(TREE_H) $(COVERAGE_H) $(RTL_H) $(GCOV_IO_H) $(TREE_FLOW_H) \
tree-flow-inline.h $(TIMEVAR_H) $(TREE_PASS_H) $(DIAGNOSTIC_CORE_H) pointer-set.h \
- tree-pretty-print.h gimple-pretty-print.h
+ $(GIMPLE_PRETTY_PRINT_H)
loop-doloop.o : loop-doloop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(FLAGS_H) $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) $(TM_P_H) \
$(DIAGNOSTIC_CORE_H) $(CFGLOOP_H) output.h $(PARAMS_H) $(TARGET_H)
@@ -3171,8 +3154,8 @@ cfgexpand.o : cfgexpand.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TREE_DUMP_H) $(EXCEPT_H) langhooks.h $(TREE_PASS_H) $(RTL_H) \
$(DIAGNOSTIC_H) toplev.h $(DIAGNOSTIC_CORE_H) $(BASIC_BLOCK_H) $(FLAGS_H) debug.h $(PARAMS_H) \
value-prof.h $(TREE_INLINE_H) $(TARGET_H) $(SSAEXPAND_H) $(REGS_H) \
- tree-pretty-print.h gimple-pretty-print.h $(BITMAP_H) sbitmap.h \
- $(INSN_ATTR_H) $(INTEGRATE_H) $(CFGLOOP_H)
+ $(GIMPLE_PRETTY_PRINT_H) $(BITMAP_H) sbitmap.h \
+ $(INSN_ATTR_H) $(CFGLOOP_H)
cfgrtl.o : cfgrtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_ERROR_H) \
$(FLAGS_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h \
output.h $(FUNCTION_H) $(EXCEPT_H) $(TM_P_H) $(INSN_ATTR_H) \
@@ -3269,7 +3252,7 @@ caller-save.o : caller-save.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_
bt-load.o : bt-load.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(EXCEPT_H) \
$(RTL_H) hard-reg-set.h $(REGS_H) $(TM_P_H) $(FIBHEAP_H) output.h $(EXPR_H) \
$(TARGET_H) $(FLAGS_H) $(INSN_ATTR_H) $(FUNCTION_H) $(TREE_PASS_H) \
- toplev.h $(DIAGNOSTIC_CORE_H) $(DF_H) vecprim.h $(RECOG_H)
+ $(DIAGNOSTIC_CORE_H) $(DF_H) vecprim.h $(RECOG_H)
reorg.o : reorg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
conditions.h hard-reg-set.h $(BASIC_BLOCK_H) $(REGS_H) insn-config.h \
$(INSN_ATTR_H) $(EXCEPT_H) $(RECOG_H) $(FUNCTION_H) $(FLAGS_H) output.h \
@@ -3313,9 +3296,9 @@ ira-lives.o: ira-lives.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(DF_H) sparseset.h $(IRA_INT_H)
ira.o: ira.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(REGS_H) $(RTL_H) $(TM_P_H) $(TARGET_H) $(FLAGS_H) $(OBSTACK_H) \
- $(BITMAP_H) hard-reg-set.h $(BASIC_BLOCK_H) $(DBGCNT_H) \
+ $(BITMAP_H) hard-reg-set.h $(BASIC_BLOCK_H) $(DBGCNT_H) $(FUNCTION_H) \
$(EXPR_H) $(RECOG_H) $(PARAMS_H) $(TIMEVAR_H) $(TREE_PASS_H) output.h \
- $(EXCEPT_H) reload.h toplev.h $(DIAGNOSTIC_CORE_H) $(INTEGRATE_H) $(DF_H) $(GGC_H) $(IRA_INT_H)
+ $(EXCEPT_H) reload.h toplev.h $(DIAGNOSTIC_CORE_H) $(DF_H) $(GGC_H) $(IRA_INT_H)
regmove.o : regmove.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
insn-config.h $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H) \
$(RECOG_H) output.h $(REGS_H) hard-reg-set.h $(FLAGS_H) $(FUNCTION_H) \
@@ -3324,7 +3307,7 @@ regmove.o : regmove.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
combine-stack-adj.o : combine-stack-adj.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(RTL_H) insn-config.h $(TIMEVAR_H) $(TREE_PASS_H) \
$(RECOG_H) output.h $(REGS_H) hard-reg-set.h $(FLAGS_H) $(FUNCTION_H) \
- $(EXPR_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_CORE_H) $(TM_P_H) $(DF_H) $(EXCEPT_H) reload.h
+ $(EXPR_H) $(BASIC_BLOCK_H) $(TM_P_H) $(DF_H) $(EXCEPT_H) reload.h
compare-elim.o : compare-elim.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(RTL_H) $(TM_P_H) insn-config.h $(RECOG_H) $(FLAGS_H) \
$(BASIC_BLOCK_H) $(TREE_PASS_H) $(TARGET_H) $(DF_H) domwalk.h
@@ -3384,7 +3367,8 @@ final.o : final.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_ERROR_H) \
$(EXCEPT_H) debug.h xcoffout.h toplev.h $(DIAGNOSTIC_CORE_H) reload.h dwarf2out.h \
$(TREE_PASS_H) $(BASIC_BLOCK_H) $(TM_P_H) $(TARGET_H) $(EXPR_H) \
$(CFGLAYOUT_H) dbxout.h $(TIMEVAR_H) $(CGRAPH_H) $(COVERAGE_H) \
- $(DF_H) vecprim.h $(GGC_H) $(CFGLOOP_H) $(PARAMS_H) $(TREE_FLOW_H)
+ $(DF_H) vecprim.h $(GGC_H) $(CFGLOOP_H) $(PARAMS_H) $(TREE_FLOW_H) \
+ $(DWARF2_H) targhooks.h $(TREE_PRETTY_PRINT_H)
recog.o : recog.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_ERROR_H) \
$(FUNCTION_H) $(BASIC_BLOCK_H) $(REGS_H) $(RECOG_H) $(EXPR_H) \
$(FLAGS_H) insn-config.h $(INSN_ATTR_H) output.h reload.h \
@@ -3529,7 +3513,7 @@ insn-emit.o : insn-emit.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(TM_P_H) $(FUNCTION_H) $(EXPR_H) $(OPTABS_H) \
dfp.h $(FLAGS_H) output.h insn-config.h hard-reg-set.h $(RECOG_H) \
$(RESOURCE_H) reload.h $(DIAGNOSTIC_CORE_H) $(REGS_H) tm-constrs.h \
- $(GGC_H) $(BASIC_BLOCK_H) $(INTEGRATE_H) $(TARGET_H)
+ $(GGC_H) $(BASIC_BLOCK_H) $(TARGET_H)
insn-enums.o : insn-enums.c $(CONFIG_H) $(SYSTEM_H) insn-constants.h
insn-extract.o : insn-extract.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(RTL_H) $(DIAGNOSTIC_CORE_H) insn-config.h $(RECOG_H)
@@ -3765,7 +3749,7 @@ GTFILES = $(CPP_ID_DATA_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
$(srcdir)/expr.h \
$(srcdir)/function.c $(srcdir)/except.c \
$(srcdir)/gcse.c $(srcdir)/godump.c \
- $(srcdir)/integrate.c $(srcdir)/lists.c $(srcdir)/optabs.c \
+ $(srcdir)/lists.c $(srcdir)/optabs.c \
$(srcdir)/profile.c $(srcdir)/mcf.c \
$(srcdir)/reg-stack.c $(srcdir)/cfglayout.c $(srcdir)/cfglayout.h \
$(srcdir)/sdbout.c $(srcdir)/stor-layout.c \
@@ -4038,7 +4022,8 @@ PREPROCESSOR_DEFINES = \
CFLAGS-cppbuiltin.o += $(PREPROCESSOR_DEFINES) -DBASEVER=$(BASEVER_s)
cppbuiltin.o: cppbuiltin.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
- $(TREE_H) cppbuiltin.h Makefile
+ $(TARGET_H) $(TARGET_DEF) $(TREE_H) $(CPP_ID_DATA_H) \
+ cppbuiltin.h version.h Makefile
CFLAGS-cppdefault.o += $(PREPROCESSOR_DEFINES)
cppdefault.o: cppdefault.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
@@ -4610,7 +4595,7 @@ installdirs:
PLUGIN_HEADERS = $(TREE_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
toplev.h $(DIAGNOSTIC_CORE_H) $(BASIC_BLOCK_H) $(GIMPLE_H) $(TREE_PASS_H) $(GCC_PLUGIN_H) \
- $(GGC_H) $(TREE_DUMP_H) $(PRETTY_PRINT_H) $(OPTS_H) $(PARAMS_H) plugin.def \
+ $(GGC_H) $(TREE_DUMP_H) $(PRETTY_PRINT_H) $(OPTS_H) $(PARAMS_H) \
$(tm_file_list) $(tm_include_list) $(tm_p_file_list) $(tm_p_include_list) \
$(host_xm_file_list) $(host_xm_include_list) $(xm_include_list) \
intl.h $(PLUGIN_VERSION_H) $(DIAGNOSTIC_H) ${C_TREE_H} \
@@ -4619,7 +4604,7 @@ PLUGIN_HEADERS = $(TREE_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(EXCEPT_H) tree-ssa-sccvn.h real.h output.h $(IPA_UTILS_H) \
$(C_PRAGMA_H) $(CPPLIB_H) $(FUNCTION_H) \
cppdefault.h flags.h $(MD5_H) params.def params.h prefix.h tree-inline.h \
- gimple-pretty-print.h tree-pretty-print.h realmpfr.h \
+ $(GIMPLE_PRETTY_PRINT_H) realmpfr.h \
$(IPA_PROP_H) $(RTL_H) $(TM_P_H) $(CFGLOOP_H) $(EMIT_RTL_H) version.h
# generate the 'build fragment' b-header-vars
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 744f6eb89b9..e031f46d6e4 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,39 @@
+2012-05-29 Michael Matz <matz@suse.de>
+
+ * gcc-interface/utils.c (create_var_decl_1): Don't call expand_decl.
+
+2012-05-26 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/decl.c (variant_desc): Rename 'record' to 'new_type'.
+ (build_variant_list): Adjust to above renaming.
+ (gnat_to_gnu_entity) <E_Record_Subtype>: Likewise. Give a unique name
+ to the type of the variant containers.
+ (create_variant_part_from): Likewise. Give a unique name to the type
+ of the variant part.
+
+2012-05-25 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR ada/52362
+ * link.c (__gnat_object_file_option): Set to "-Wl,@" for GNU linker.
+ (__gnat_using_gnu_linker): Delete.
+ * gnatlink.adb (Gnatlink): Declare Object_File_Option_Ptr here...
+ Declare Object_File_Option string constant and Using_GNU_response_file
+ boolean constant.
+ (Process_Binder_File): ...instead of here. Delete Using_GNU_Linker,
+ Opening and Closing local variables. Do not handle the GNU linker
+ specially.
+ (Write_RF): New procedure to write into the response file. Escape some
+ characters if a GNU response file is used. Keep track of error status.
+ Invoke Write_RF to write into the response file. Delete the file only
+ if the link was successful.
+ * mlib-utl.adb: Do not `with' package System.
+ (Gcc): Likewise. Declare Object_File_Option string constant and
+ Using_GNU_response_file boolean constant.
+ (Write_RF): Take a string instead of address and length. Escape some
+ characters if a GNU response file is used.
+ Invoke Write_RF to write into the response file. Delete the file only
+ if the link was successful. Do not warn if it cannot be deleted.
+
2012-05-20 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (gnat_write_global_declarations): Put a name
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index 05c9b1a26f5..76c960fee4b 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -119,8 +119,8 @@ typedef struct variant_desc_d {
/* The value of the qualifier. */
tree qual;
- /* The record associated with this variant. */
- tree record;
+ /* The type of the variant after transformation. */
+ tree new_type;
} variant_desc;
DEF_VEC_O(variant_desc);
@@ -3318,11 +3318,16 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
{
tree old_variant = v->type;
tree new_variant = make_node (RECORD_TYPE);
+ tree suffix
+ = concat_name (DECL_NAME (gnu_variant_part),
+ IDENTIFIER_POINTER
+ (DECL_NAME (v->field)));
TYPE_NAME (new_variant)
- = DECL_NAME (TYPE_NAME (old_variant));
+ = concat_name (TYPE_NAME (gnu_type),
+ IDENTIFIER_POINTER (suffix));
copy_and_substitute_in_size (new_variant, old_variant,
gnu_subst_list);
- v->record = new_variant;
+ v->new_type = new_variant;
}
}
else
@@ -3426,7 +3431,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
if (selected_variant)
gnu_cont_type = gnu_type;
else
- gnu_cont_type = v->record;
+ gnu_cont_type = v->new_type;
}
else
/* The front-end may pass us "ghost" components if
@@ -7562,7 +7567,7 @@ build_variant_list (tree qual_union_type, VEC(subst_pair,heap) *subst_list,
v->type = variant_type;
v->field = gnu_field;
v->qual = qual;
- v->record = NULL_TREE;
+ v->new_type = NULL_TREE;
/* Recurse on the variant subpart of the variant, if any. */
variant_subpart = get_variant_part (variant_type);
@@ -8238,7 +8243,9 @@ create_variant_part_from (tree old_variant_part,
/* First create the type of the variant part from that of the old one. */
new_union_type = make_node (QUAL_UNION_TYPE);
- TYPE_NAME (new_union_type) = DECL_NAME (TYPE_NAME (old_union_type));
+ TYPE_NAME (new_union_type)
+ = concat_name (TYPE_NAME (record_type),
+ IDENTIFIER_POINTER (DECL_NAME (old_variant_part)));
/* If the position of the variant part is constant, subtract it from the
size of the type of the parent to get the new size. This manual CSE
@@ -8272,7 +8279,7 @@ create_variant_part_from (tree old_variant_part,
continue;
/* Retrieve the list of fields already added to the new variant. */
- new_variant = v->record;
+ new_variant = v->new_type;
field_list = TYPE_FIELDS (new_variant);
/* If the old variant had a variant subpart, we need to create a new
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index 36012a6ed91..58003084700 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -2227,8 +2227,6 @@ create_var_decl_1 (tree var_name, tree asm_name, tree type, tree var_init,
if (global_bindings_p ())
rest_of_decl_compilation (var_decl, true, 0);
}
- else
- expand_decl (var_decl);
return var_decl;
}
diff --git a/gcc/ada/gnatlink.adb b/gcc/ada/gnatlink.adb
index 09ce5bb0f5d..d6834ab5ae2 100644
--- a/gcc/ada/gnatlink.adb
+++ b/gcc/ada/gnatlink.adb
@@ -178,6 +178,19 @@ procedure Gnatlink is
-- Predicate indicating whether the linker has an option whereby the
-- names of object files can be passed to the linker in a file.
+ Object_File_Option_Ptr : Interfaces.C.Strings.chars_ptr;
+ pragma Import (C, Object_File_Option_Ptr, "__gnat_object_file_option");
+ -- Pointer to a string representing the linker option which specifies
+ -- the response file.
+
+ Object_File_Option : constant String := Value (Object_File_Option_Ptr);
+ -- The linker option which specifies the response file as a string
+
+ Using_GNU_response_file : constant Boolean :=
+ Object_File_Option'Length > 0
+ and then Object_File_Option (Object_File_Option'Last) = '@';
+ -- Whether a GNU response file is used
+
Object_List_File_Required : Boolean := False;
-- Set to True to force generation of a response file
@@ -760,28 +773,12 @@ procedure Gnatlink is
-- Pointer to string specifying the default extension for
-- object libraries, e.g. Unix uses ".a", VMS uses ".olb".
- Object_File_Option_Ptr : Interfaces.C.Strings.chars_ptr;
- pragma Import (C, Object_File_Option_Ptr, "__gnat_object_file_option");
- -- Pointer to a string representing the linker option which specifies
- -- the response file.
-
- Using_GNU_Linker : Boolean;
- for Using_GNU_Linker'Size use Character'Size;
- pragma Import (C, Using_GNU_Linker, "__gnat_using_gnu_linker");
- -- Predicate indicating whether this target uses the GNU linker. In
- -- this case we must output a GNU linker compatible response file.
-
Separate_Run_Path_Options : Boolean;
for Separate_Run_Path_Options'Size use Character'Size;
pragma Import
(C, Separate_Run_Path_Options, "__gnat_separate_run_path_options");
-- Whether separate rpath options should be emitted for each directory
- Opening : aliased constant String := """";
- Closing : aliased constant String := '"' & ASCII.LF;
- -- Needed to quote object paths in object list files when GNU linker
- -- is used.
-
procedure Get_Next_Line;
-- Read the next line from the binder file without the line
-- terminator.
@@ -804,6 +801,10 @@ procedure Gnatlink is
-- after Store_File_Context. The binder file context will be restored
-- with the data stored by the last Store_File_Context call.
+ procedure Write_RF (S : String);
+ -- Write a string to the response file and check if it was successful.
+ -- Fail the program if it was not successful (disk full).
+
-------------------
-- Get_Next_Line --
-------------------
@@ -897,6 +898,46 @@ procedure Gnatlink is
end if;
end Store_File_Context;
+ --------------
+ -- Write_RF --
+ --------------
+
+ procedure Write_RF (S : String) is
+ Success : Boolean := True;
+ begin
+ -- If a GNU response file is used, space and backslash need to be
+ -- escaped because they are interpreted as a string separator and
+ -- an escape character respectively by the underlying mechanism.
+ -- On the other hand, quote and double-quote are not escaped since
+ -- they are interpreted as string delimiters on both sides.
+
+ if Using_GNU_response_file then
+ for I in S'Range loop
+ if S (I) = ' ' or else S (I) = '\' then
+ if Write (Tname_FD, ASCII.BACK_SLASH'Address, 1) /= 1 then
+ Success := False;
+ end if;
+ end if;
+
+ if Write (Tname_FD, S (I)'Address, 1) /= 1 then
+ Success := False;
+ end if;
+ end loop;
+ else
+ if Write (Tname_FD, S'Address, S'Length) /= S'Length then
+ Success := False;
+ end if;
+ end if;
+
+ if Write (Tname_FD, ASCII.LF'Address, 1) /= 1 then
+ Success := False;
+ end if;
+
+ if not Success then
+ Exit_With_Error ("Error generating response file: disk full");
+ end if;
+ end Write_RF;
+
-- Start of processing for Process_Binder_File
begin
@@ -985,61 +1026,14 @@ procedure Gnatlink is
-- ??? Status of Write and Close operations should be checked, and
-- failure should occur if a status is wrong.
- -- If target is using the GNU linker we must add a special header
- -- and footer in the response file.
-
- -- The syntax is : INPUT (object1.o object2.o ... )
-
- -- Because the GNU linker does not like name with characters such
- -- as '!', we must put the object paths between double quotes.
-
- if Using_GNU_Linker then
- declare
- GNU_Header : aliased constant String := "INPUT (";
-
- begin
- Status := Write (Tname_FD, GNU_Header'Address,
- GNU_Header'Length);
- end;
- end if;
-
for J in Objs_Begin .. Objs_End loop
-
- -- Opening quote for GNU linker
-
- if Using_GNU_Linker then
- Status := Write (Tname_FD, Opening'Address, 1);
- end if;
-
- Status := Write (Tname_FD, Linker_Objects.Table (J).all'Address,
- Linker_Objects.Table (J).all'Length);
-
- -- Closing quote for GNU linker
-
- if Using_GNU_Linker then
- Status := Write (Tname_FD, Closing'Address, 2);
-
- else
- Status := Write (Tname_FD, ASCII.LF'Address, 1);
- end if;
+ Write_RF (Linker_Objects.Table (J).all);
Response_File_Objects.Increment_Last;
Response_File_Objects.Table (Response_File_Objects.Last) :=
Linker_Objects.Table (J);
end loop;
- -- Handle GNU linker response file footer
-
- if Using_GNU_Linker then
- declare
- GNU_Footer : aliased constant String := ")";
-
- begin
- Status := Write (Tname_FD, GNU_Footer'Address,
- GNU_Footer'Length);
- end;
- end if;
-
Close (Tname_FD, Closing_Status);
-- Add the special objects list file option together with the name
@@ -1047,7 +1041,7 @@ procedure Gnatlink is
-- file table.
Linker_Objects.Table (Objs_Begin) :=
- new String'(Value (Object_File_Option_Ptr) &
+ new String'(Object_File_Option &
Tname (Tname'First .. Tname'Last - 1));
-- The slots containing these object file names are then removed
@@ -2213,14 +2207,15 @@ begin
System.OS_Lib.Spawn (Linker_Path.all, Args, Success);
- -- Delete the temporary file used in conjunction with linking if
- -- one was created. See Process_Bind_File for details.
+ if Success then
+ -- Delete the temporary file used in conjunction with linking
+ -- if one was created. See Process_Bind_File for details.
- if Tname_FD /= Invalid_FD then
- Delete (Tname);
- end if;
+ if Tname_FD /= Invalid_FD then
+ Delete (Tname);
+ end if;
- if not Success then
+ else
Error_Msg ("error when calling " & Linker_Path.all);
Exit_Program (E_Fatal);
end if;
diff --git a/gcc/ada/link.c b/gcc/ada/link.c
index 88c48467a21..8a8e12033d7 100644
--- a/gcc/ada/link.c
+++ b/gcc/ada/link.c
@@ -72,38 +72,22 @@ extern "C" {
/* shared_libgcc_default gives the system dependent link method that */
/* be used by default for linking libgcc (shared or static) */
-/* using_gnu_linker is set to 1 when the GNU linker is used under this */
-/* target. */
-
/* separate_run_path_options is set to 1 when separate "rpath" arguments */
/* must be passed to the linker for each directory in the rpath. */
/* default_libgcc_subdir is the subdirectory name (from the installation */
/* root) where we may find a shared libgcc to use by default. */
-/* RESPONSE FILE & GNU LINKER */
-/* -------------------------- */
-/* objlist_file_supported and using_gnu_link used together tell gnatlink */
-/* to generate a GNU style response file. Note that object_file_option */
-/* must be set to "" in this case, since no option is required for a */
-/* response file to be passed to GNU ld. With a GNU linker we use the */
-/* linker script to implement the response file feature. Any file passed */
-/* in the GNU ld command line with an unknown extension is supposed to be */
-/* a linker script. Each linker script augment the current configuration. */
-/* The format of such response file is as follow : */
-/* INPUT (obj1.p obj2.o ...) */
-
#define SHARED 'H'
#define STATIC 'T'
#if defined (__WIN32)
-const char *__gnat_object_file_option = "";
+const char *__gnat_object_file_option = "-Wl,@";
const char *__gnat_run_path_option = "";
int __gnat_link_max = 30000;
unsigned char __gnat_objlist_file_supported = 1;
char __gnat_shared_libgnat_default = STATIC;
char __gnat_shared_libgcc_default = STATIC;
-unsigned char __gnat_using_gnu_linker = 1;
const char *__gnat_object_library_extension = ".a";
unsigned char __gnat_separate_run_path_options = 0;
const char *__gnat_default_libgcc_subdir = "lib";
@@ -115,19 +99,17 @@ int __gnat_link_max = 5000;
unsigned char __gnat_objlist_file_supported = 1;
char __gnat_shared_libgnat_default = STATIC;
char __gnat_shared_libgcc_default = STATIC;
-unsigned char __gnat_using_gnu_linker = 0;
const char *__gnat_object_library_extension = ".a";
unsigned char __gnat_separate_run_path_options = 0;
const char *__gnat_default_libgcc_subdir = "lib";
#elif defined (__FreeBSD__)
-const char *__gnat_object_file_option = "";
+const char *__gnat_object_file_option = "-Wl,@";
const char *__gnat_run_path_option = "-Wl,-rpath,";
char __gnat_shared_libgnat_default = STATIC;
char __gnat_shared_libgcc_default = STATIC;
int __gnat_link_max = 8192;
unsigned char __gnat_objlist_file_supported = 1;
-unsigned char __gnat_using_gnu_linker = 1;
const char *__gnat_object_library_extension = ".a";
unsigned char __gnat_separate_run_path_options = 0;
const char *__gnat_default_libgcc_subdir = "lib";
@@ -139,19 +121,17 @@ char __gnat_shared_libgnat_default = STATIC;
char __gnat_shared_libgcc_default = SHARED;
int __gnat_link_max = 262144;
unsigned char __gnat_objlist_file_supported = 1;
-unsigned char __gnat_using_gnu_linker = 0;
const char *__gnat_object_library_extension = ".a";
unsigned char __gnat_separate_run_path_options = 1;
const char *__gnat_default_libgcc_subdir = "lib";
#elif defined (linux) || defined(__GLIBC__)
-const char *__gnat_object_file_option = "";
+const char *__gnat_object_file_option = "-Wl,@";
const char *__gnat_run_path_option = "-Wl,-rpath,";
char __gnat_shared_libgnat_default = STATIC;
char __gnat_shared_libgcc_default = STATIC;
int __gnat_link_max = 8192;
unsigned char __gnat_objlist_file_supported = 1;
-unsigned char __gnat_using_gnu_linker = 1;
const char *__gnat_object_library_extension = ".a";
unsigned char __gnat_separate_run_path_options = 0;
#if defined (__x86_64)
@@ -174,7 +154,6 @@ char __gnat_shared_libgnat_default = STATIC;
char __gnat_shared_libgcc_default = STATIC;
int __gnat_link_max = 15000;
const unsigned char __gnat_objlist_file_supported = 1;
-unsigned char __gnat_using_gnu_linker = 0;
const char *__gnat_object_library_extension = ".a";
unsigned char __gnat_separate_run_path_options = 0;
const char *__gnat_default_libgcc_subdir = "lib";
@@ -183,13 +162,12 @@ const char *__gnat_default_libgcc_subdir = "lib";
/* These are the settings for all systems that use gnu ld. GNU style response
file is supported, the shared library default is STATIC. */
-const char *__gnat_object_file_option = "";
+const char *__gnat_object_file_option = "-Wl,@";
const char *__gnat_run_path_option = "";
char __gnat_shared_libgnat_default = STATIC;
char __gnat_shared_libgcc_default = STATIC;
int __gnat_link_max = 8192;
unsigned char __gnat_objlist_file_supported = 1;
-unsigned char __gnat_using_gnu_linker = 1;
const char *__gnat_object_library_extension = ".a";
unsigned char __gnat_separate_run_path_options = 0;
const char *__gnat_default_libgcc_subdir = "lib";
@@ -201,7 +179,6 @@ char __gnat_shared_libgnat_default = STATIC;
char __gnat_shared_libgcc_default = STATIC;
int __gnat_link_max = 2147483647;
unsigned char __gnat_objlist_file_supported = 0;
-unsigned char __gnat_using_gnu_linker = 0;
const char *__gnat_object_library_extension = ".olb";
unsigned char __gnat_separate_run_path_options = 0;
const char *__gnat_default_libgcc_subdir = "lib";
@@ -213,7 +190,6 @@ char __gnat_shared_libgnat_default = STATIC;
char __gnat_shared_libgcc_default = STATIC;
int __gnat_link_max = 2147483647;
unsigned char __gnat_objlist_file_supported = 0;
-unsigned char __gnat_using_gnu_linker = 0;
const char *__gnat_object_library_extension = ".a";
unsigned char __gnat_separate_run_path_options = 0;
#if defined (__sparc_v9__) || defined (__sparcv9)
@@ -231,7 +207,6 @@ char __gnat_shared_libgnat_default = STATIC;
char __gnat_shared_libgcc_default = STATIC;
int __gnat_link_max = 2147483647;
unsigned char __gnat_objlist_file_supported = 0;
-unsigned char __gnat_using_gnu_linker = 0;
const char *__gnat_object_library_extension = ".a";
unsigned char __gnat_separate_run_path_options = 0;
const char *__gnat_default_libgcc_subdir = "lib";
@@ -246,7 +221,6 @@ char __gnat_shared_libgnat_default = STATIC;
char __gnat_shared_libgcc_default = STATIC;
int __gnat_link_max = 2147483647;
unsigned char __gnat_objlist_file_supported = 0;
-unsigned char __gnat_using_gnu_linker = 0;
const char *__gnat_object_library_extension = ".a";
unsigned char __gnat_separate_run_path_options = 0;
const char *__gnat_default_libgcc_subdir = "lib";
diff --git a/gcc/ada/mlib-utl.adb b/gcc/ada/mlib-utl.adb
index 215fa5d6e8d..2e3f0c0c108 100644
--- a/gcc/ada/mlib-utl.adb
+++ b/gcc/ada/mlib-utl.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2002-2011, AdaCore --
+-- Copyright (C) 2002-2012, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -31,8 +31,6 @@ with Output; use Output;
with Interfaces.C.Strings; use Interfaces.C.Strings;
-with System;
-
package body MLib.Utl is
Adalib_Path : String_Access := null;
@@ -353,16 +351,13 @@ package body MLib.Utl is
-- Pointer to a string representing the linker option which specifies
-- the response file.
- Using_GNU_Linker : Boolean;
- for Using_GNU_Linker'Size use Character'Size;
- pragma Import (C, Using_GNU_Linker, "__gnat_using_gnu_linker");
- -- Predicate indicating whether this target uses the GNU linker. In
- -- this case we must output a GNU linker compatible response file.
+ Object_File_Option : constant String := Value (Object_File_Option_Ptr);
+ -- The linker option which specifies the response file as a string
- Opening : aliased constant String := """";
- Closing : aliased constant String := '"' & ASCII.LF;
- -- Needed to quote object paths in object list files when GNU linker
- -- is used.
+ Using_GNU_response_file : constant Boolean :=
+ Object_File_Option'Length > 0
+ and then Object_File_Option (Object_File_Option'Last) = '@';
+ -- Whether a GNU response file is used
Tname : String_Access;
Tname_FD : File_Descriptor := Invalid_FD;
@@ -390,7 +385,7 @@ package body MLib.Utl is
Position : Object_Position;
- procedure Write_RF (A : System.Address; N : Integer);
+ procedure Write_RF (S : String);
-- Write a string to the response file and check if it was successful.
-- Fail the program if it was not successful (disk full).
@@ -398,12 +393,38 @@ package body MLib.Utl is
-- Write_RF --
--------------
- procedure Write_RF (A : System.Address; N : Integer) is
- Status : Integer;
+ procedure Write_RF (S : String) is
+ Success : Boolean := True;
begin
- Status := Write (Tname_FD, A, N);
+ -- If a GNU response file is used, space and backslash need to be
+ -- escaped because they are interpreted as a string separator and
+ -- an escape character respectively by the underlying mechanism.
+ -- On the other hand, quote and double-quote are not escaped since
+ -- they are interpreted as string delimiters on both sides.
+
+ if Using_GNU_response_file then
+ for I in S'Range loop
+ if S (I) = ' ' or else S (I) = '\' then
+ if Write (Tname_FD, ASCII.BACK_SLASH'Address, 1) /= 1 then
+ Success := False;
+ end if;
+ end if;
- if Status /= N then
+ if Write (Tname_FD, S (I)'Address, 1) /= 1 then
+ Success := False;
+ end if;
+ end loop;
+ else
+ if Write (Tname_FD, S'Address, S'Length) /= S'Length then
+ Success := False;
+ end if;
+ end if;
+
+ if Write (Tname_FD, ASCII.LF'Address, 1) /= 1 then
+ Success := False;
+ end if;
+
+ if not Success then
Fail ("cannot generate response file to link library: disk full");
end if;
end Write_RF;
@@ -529,53 +550,10 @@ package body MLib.Utl is
Create_Temp_File (Tname_FD, Tname);
- -- If target is using the GNU linker we must add a special header
- -- and footer in the response file.
-
- -- The syntax is : INPUT (object1.o object2.o ... )
-
- -- Because the GNU linker does not like name with characters such
- -- as '!', we must put the object paths between double quotes.
-
- if Using_GNU_Linker then
- declare
- GNU_Header : aliased constant String := "INPUT (";
-
- begin
- Write_RF (GNU_Header'Address, GNU_Header'Length);
- end;
- end if;
-
for J in Objects'Range loop
- -- Opening quote for GNU linker
-
- if Using_GNU_Linker then
- Write_RF (Opening'Address, 1);
- end if;
-
- Write_RF (Objects (J).all'Address, Objects (J).all'Length);
-
- -- Closing quote for GNU linker
-
- if Using_GNU_Linker then
- Write_RF (Closing'Address, 2);
-
- else
- Write_RF (ASCII.LF'Address, 1);
- end if;
+ Write_RF (Objects (J).all);
end loop;
- -- Handle GNU linker response file footer
-
- if Using_GNU_Linker then
- declare
- GNU_Footer : aliased constant String := ")";
-
- begin
- Write_RF (GNU_Footer'Address, GNU_Footer'Length);
- end;
- end if;
-
Close (Tname_FD, Closing_Status);
if not Closing_Status then
@@ -583,8 +561,7 @@ package body MLib.Utl is
end if;
A := A + 1;
- Arguments (A) :=
- new String'(Value (Object_File_Option_Ptr) & Tname.all);
+ Arguments (A) := new String'(Object_File_Option & Tname.all);
else
A := A + Objects'Length;
@@ -596,17 +573,15 @@ package body MLib.Utl is
Spawn (Driver.all, Arguments (1 .. A), Success);
- if Tname /= null then
- Delete_File (Tname.all, Closing_Status);
+ if Success then
+ -- Delete the temporary file used in conjunction with linking
+ -- if one was created.
- if not Closing_Status then
- Write_Str ("warning: could not delete response file """);
- Write_Str (Tname.all);
- Write_Line (""" to link library");
+ if Tname_FD /= Invalid_FD then
+ Delete_File (Tname.all);
end if;
- end if;
- if not Success then
+ else
if Driver_Name = No_Name then
Fail (Gcc_Name.all & " execution error");
else
diff --git a/gcc/alias.c b/gcc/alias.c
index 00af340c372..2b89e587fe7 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -76,7 +76,7 @@ along with GCC; see the file COPYING3. If not see
The first two questions can be answered with a simple examination
of the type system. If structure X contains a field of type Y then
- a store thru a pointer to an X can overwrite any field that is
+ a store through a pointer to an X can overwrite any field that is
contained (recursively) in an X (unless we know that px1 != px2).
The last two of the questions can be solved in the same way as the
@@ -243,12 +243,9 @@ static GTY((deletable)) VEC(rtx,gc) *old_reg_base_value;
? VEC_index (rtx, reg_base_value, REGNO (X)) : 0)
/* Vector indexed by N giving the initial (unchanging) value known for
- pseudo-register N. This array is initialized in init_alias_analysis,
+ pseudo-register N. This vector is initialized in init_alias_analysis,
and does not change until end_alias_analysis is called. */
-static GTY((length("reg_known_value_size"))) rtx *reg_known_value;
-
-/* Indicates number of valid entries in reg_known_value. */
-static GTY(()) unsigned int reg_known_value_size;
+static GTY(()) VEC(rtx,gc) *reg_known_value;
/* Vector recording for each reg_known_value whether it is due to a
REG_EQUIV note. Future passes (viz., reload) may replace the
@@ -262,7 +259,7 @@ static GTY(()) unsigned int reg_known_value_size;
REG_EQUIV notes. One could argue that the REG_EQUIV notes are
wrong, but solving the problem in the scheduler will likely give
better code, so we do it here. */
-static bool *reg_known_equiv_p;
+static sbitmap reg_known_equiv_p;
/* True when scanning insns from the start of the rtl to the
NOTE_INSN_FUNCTION_BEG note. */
@@ -1362,8 +1359,8 @@ get_reg_known_value (unsigned int regno)
if (regno >= FIRST_PSEUDO_REGISTER)
{
regno -= FIRST_PSEUDO_REGISTER;
- if (regno < reg_known_value_size)
- return reg_known_value[regno];
+ if (regno < VEC_length (rtx, reg_known_value))
+ return VEC_index (rtx, reg_known_value, regno);
}
return NULL;
}
@@ -1376,8 +1373,8 @@ set_reg_known_value (unsigned int regno, rtx val)
if (regno >= FIRST_PSEUDO_REGISTER)
{
regno -= FIRST_PSEUDO_REGISTER;
- if (regno < reg_known_value_size)
- reg_known_value[regno] = val;
+ if (regno < VEC_length (rtx, reg_known_value))
+ VEC_replace (rtx, reg_known_value, regno, val);
}
}
@@ -1389,8 +1386,8 @@ get_reg_known_equiv_p (unsigned int regno)
if (regno >= FIRST_PSEUDO_REGISTER)
{
regno -= FIRST_PSEUDO_REGISTER;
- if (regno < reg_known_value_size)
- return reg_known_equiv_p[regno];
+ if (regno < VEC_length (rtx, reg_known_value))
+ return TEST_BIT (reg_known_equiv_p, regno);
}
return false;
}
@@ -1401,8 +1398,13 @@ set_reg_known_equiv_p (unsigned int regno, bool val)
if (regno >= FIRST_PSEUDO_REGISTER)
{
regno -= FIRST_PSEUDO_REGISTER;
- if (regno < reg_known_value_size)
- reg_known_equiv_p[regno] = val;
+ if (regno < VEC_length (rtx, reg_known_value))
+ {
+ if (val)
+ SET_BIT (reg_known_equiv_p, regno);
+ else
+ RESET_BIT (reg_known_equiv_p, regno);
+ }
}
}
@@ -2799,13 +2801,12 @@ init_alias_analysis (void)
int changed, pass;
int i;
unsigned int ui;
- rtx insn;
+ rtx insn, val;
timevar_push (TV_ALIAS_ANALYSIS);
- reg_known_value_size = maxreg - FIRST_PSEUDO_REGISTER;
- reg_known_value = ggc_alloc_cleared_vec_rtx (reg_known_value_size);
- reg_known_equiv_p = XCNEWVEC (bool, reg_known_value_size);
+ reg_known_value = VEC_alloc (rtx, gc, maxreg - FIRST_PSEUDO_REGISTER);
+ reg_known_equiv_p = sbitmap_alloc (maxreg - FIRST_PSEUDO_REGISTER);
/* If we have memory allocated from the previous run, use it. */
if (old_reg_base_value)
@@ -2931,13 +2932,13 @@ init_alias_analysis (void)
t = plus_constant (GET_MODE (src), t,
INTVAL (XEXP (src, 1)));
set_reg_known_value (regno, t);
- set_reg_known_equiv_p (regno, 0);
+ set_reg_known_equiv_p (regno, false);
}
else if (DF_REG_DEF_COUNT (regno) == 1
&& ! rtx_varies_p (src, 1))
{
set_reg_known_value (regno, src);
- set_reg_known_equiv_p (regno, 0);
+ set_reg_known_equiv_p (regno, false);
}
}
}
@@ -2964,9 +2965,12 @@ init_alias_analysis (void)
while (changed && ++pass < MAX_ALIAS_LOOP_PASSES);
/* Fill in the remaining entries. */
- for (i = 0; i < (int)reg_known_value_size; i++)
- if (reg_known_value[i] == 0)
- reg_known_value[i] = regno_reg_rtx[i + FIRST_PSEUDO_REGISTER];
+ FOR_EACH_VEC_ELT (rtx, reg_known_value, i, val)
+ {
+ int regno = i + FIRST_PSEUDO_REGISTER;
+ if (! val)
+ set_reg_known_value (regno, regno_reg_rtx[regno]);
+ }
/* Clean up. */
free (new_reg_base_value);
@@ -2989,11 +2993,8 @@ void
end_alias_analysis (void)
{
old_reg_base_value = reg_base_value;
- ggc_free (reg_known_value);
- reg_known_value = 0;
- reg_known_value_size = 0;
- free (reg_known_equiv_p);
- reg_known_equiv_p = 0;
+ VEC_free (rtx, gc, reg_known_value);
+ sbitmap_free (reg_known_equiv_p);
}
#include "gt-alias.h"
diff --git a/gcc/auto-inc-dec.c b/gcc/auto-inc-dec.c
index 1c9edf85925..86c5d62c561 100644
--- a/gcc/auto-inc-dec.c
+++ b/gcc/auto-inc-dec.c
@@ -495,7 +495,7 @@ attempt_change (rtx new_addr, rtx inc_reg)
return false;
}
- /* Jump thru a lot of hoops to keep the attributes up to date. We
+ /* Jump through a lot of hoops to keep the attributes up to date. We
do not want to call one of the change address variants that take
an offset even though we know the offset in many cases. These
assume you are changing where the address is pointing by the
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index 7f73b947e69..89431cc32c0 100644
--- a/gcc/bb-reorder.c
+++ b/gcc/bb-reorder.c
@@ -1524,7 +1524,7 @@ fix_up_fall_thru_edges (void)
/* We know the fall-thru edge crosses; if the cond
jump edge does NOT cross, and its destination is the
next block in the bb order, invert the jump
- (i.e. fix it so the fall thru does not cross and
+ (i.e. fix it so the fall through does not cross and
the cond jump does). */
if (!cond_jump_crosses
@@ -2251,7 +2251,7 @@ partition_hot_cold_basic_blocks (void)
/* Convert all crossing fall_thru edges to non-crossing fall
thrus to unconditional jumps (that jump to the original fall
- thru dest). */
+ through dest). */
fix_up_fall_thru_edges ();
/* If the architecture does not have conditional branches that can
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 22d918a3843..6b3ba414bdc 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -2651,8 +2651,8 @@ expand_builtin_cexpi (tree exp, rtx target)
else
gcc_unreachable ();
- op1 = assign_temp (TREE_TYPE (arg), 0, 1, 1);
- op2 = assign_temp (TREE_TYPE (arg), 0, 1, 1);
+ op1 = assign_temp (TREE_TYPE (arg), 1, 1);
+ op2 = assign_temp (TREE_TYPE (arg), 1, 1);
op1a = copy_addr_to_reg (XEXP (op1, 0));
op2a = copy_addr_to_reg (XEXP (op2, 0));
top1 = make_tree (build_pointer_type (TREE_TYPE (arg)), op1a);
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 00cd92c864b..050ee84eaba 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -7329,8 +7329,6 @@ finish_struct (location_t loc, tree t, tree fieldlist, tree attributes,
if (c_dialect_objc ())
objc_check_decl (decl);
rest_of_decl_compilation (decl, toplevel, 0);
- if (!toplevel)
- expand_decl (decl);
}
}
C_TYPE_INCOMPLETE_VARS (TYPE_MAIN_VARIANT (t)) = 0;
@@ -8591,11 +8589,9 @@ check_for_loop_decls (location_t loc, bool turn_off_iso_c99_error)
void
c_push_function_context (void)
{
- struct language_function *p = cfun->language;
- /* cfun->language might have been already allocated by the use of
- -Wunused-local-typedefs. In that case, just re-use it. */
- if (p == NULL)
- cfun->language = p = ggc_alloc_cleared_language_function ();
+ struct language_function *p;
+ p = ggc_alloc_language_function ();
+ cfun->language = p;
p->base.x_stmt_tree = c_stmt_tree;
c_stmt_tree.x_cur_stmt_list
@@ -8621,11 +8617,7 @@ c_pop_function_context (void)
pop_function_context ();
p = cfun->language;
- /* When -Wunused-local-typedefs is in effect, cfun->languages is
- used to store data throughout the life time of the current cfun,
- So don't deallocate it. */
- if (!warn_unused_local_typedefs)
- cfun->language = NULL;
+ cfun->language = NULL;
if (DECL_STRUCT_FUNCTION (current_function_decl) == 0
&& DECL_SAVED_TREE (current_function_decl) == NULL_TREE)
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index b71174d1863..14123313dce 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,23 @@
+2012-05-29 Joseph Myers <joseph@codesourcery.com>
+
+ * c-common.c: Fix typo.
+
+2012-05-29 Michael Matz <matz@suse.de>
+
+ * c-common.h (c_expand_decl): Remove prototype.
+
+2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
+ * c-opts.c (c_common_handle_option): Remove code handling
+ warn_missing_braces.
+
+2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/25137
+ * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
+ -Wmissing_braces.
+
2012-05-22 Dodji Seketeli <dodji@redhat.com>
PR c++/53322
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index e0e0eabe214..f6ee6d46512 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -3976,7 +3976,7 @@ pointer_int_sum (location_t loc, enum tree_code resultcode,
/* Replace the integer argument with a suitable product by the object size.
Do this multiplication as signed, then convert to the appropriate type
- for the pointer operation and disregard an overflow that occured only
+ for the pointer operation and disregard an overflow that occurred only
because of the sign-extension change in the latter conversion. */
{
tree t = build_binary_op (loc,
diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h
index b71e43a2cbd..d810b7d9895 100644
--- a/gcc/c-family/c-common.h
+++ b/gcc/c-family/c-common.h
@@ -553,8 +553,6 @@ extern tree build_array_notation_expr (location_t, tree, tree, enum tree_code,
location_t, tree, tree);
extern tree build_indirect_ref (location_t, tree, ref_operator);
-extern int c_expand_decl (tree);
-
extern int field_decl_cmp (const void *, const void *);
extern void resort_sorted_fields (void *, void *, gt_pointer_operator,
void *);
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
index c493c1096f3..2330c133292 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -370,7 +370,6 @@ c_common_handle_option (size_t scode, const char *arg, int value,
c_family_lang_mask, kind, loc,
handlers, global_dc);
warn_char_subscripts = value;
- warn_missing_braces = value;
warn_parentheses = value;
warn_return_type = value;
warn_sequence_point = value; /* Was C only. */
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index cc82684ea8a..00ae33c3880 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -479,7 +479,7 @@ C ObjC C++ ObjC++ Var(warn_main) Init(-1) Warning
Warn about suspicious declarations of \"main\"
Wmissing-braces
-C ObjC C++ ObjC++ Var(warn_missing_braces) Warning
+C ObjC C++ ObjC++ Var(warn_missing_braces) Warning LangEnabledBy(C ObjC,Wall)
Warn about possibly missing braces around initializers
Wmissing-declarations
diff --git a/gcc/c-tree.h b/gcc/c-tree.h
index fa78842fe87..7d313920d3c 100644
--- a/gcc/c-tree.h
+++ b/gcc/c-tree.h
@@ -535,7 +535,6 @@ extern void store_parm_decls (void);
extern void store_parm_decls_from (struct c_arg_info *);
extern tree xref_tag (enum tree_code, tree);
extern struct c_typespec parser_xref_tag (location_t, enum tree_code, tree);
-extern int c_expand_decl (tree);
extern struct c_parm *build_c_parm (struct c_declspecs *, tree,
struct c_declarator *);
extern struct c_declarator *build_attrs_declarator (tree,
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 5a628f39540..3b393d88ae2 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -1788,6 +1788,18 @@ array_to_pointer_conversion (location_t loc, tree exp)
if (TREE_CODE (exp) == INDIRECT_REF)
return convert (ptrtype, TREE_OPERAND (exp, 0));
+ /* In C++ array compound literals are temporary objects unless they are
+ const or appear in namespace scope, so they are destroyed too soon
+ to use them for much of anything (c++/53220). */
+ if (warn_cxx_compat && TREE_CODE (exp) == COMPOUND_LITERAL_EXPR)
+ {
+ tree decl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0);
+ if (!TREE_READONLY (decl) && !TREE_STATIC (decl))
+ warning_at (DECL_SOURCE_LOCATION (decl), OPT_Wc___compat,
+ "converting an array compound literal to a pointer "
+ "is ill-formed in C++");
+ }
+
adr = build_unary_op (loc, ADDR_EXPR, exp, 1);
return convert (ptrtype, adr);
}
diff --git a/gcc/calls.c b/gcc/calls.c
index 03c92168a24..d4bcd7b67d4 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -933,7 +933,7 @@ save_fixed_argument_area (int reg_parm_stack_space, rtx argblock, int *low_to_sa
set_mem_align (stack_area, PARM_BOUNDARY);
if (save_mode == BLKmode)
{
- save_area = assign_stack_temp (BLKmode, num_to_save, 0);
+ save_area = assign_stack_temp (BLKmode, num_to_save);
emit_block_move (validize_mem (save_area), stack_area,
GEN_INT (num_to_save), BLOCK_OP_CALL_PARM);
}
@@ -1258,7 +1258,7 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED,
set_mem_attributes (copy, type, 1);
}
else
- copy = assign_temp (type, 0, 1, 0);
+ copy = assign_temp (type, 1, 0);
store_expr (args[i].tree_value, copy, 0, false);
@@ -2404,9 +2404,7 @@ expand_call (tree exp, rtx target, int ignore)
/* For variable-sized objects, we must be called with a target
specified. If we were to allocate space on the stack here,
we would have no way of knowing when to free it. */
- rtx d = assign_temp (rettype, 0, 1, 1);
-
- mark_temp_addr_taken (d);
+ rtx d = assign_temp (rettype, 1, 1);
structure_value_addr = XEXP (d, 0);
target = 0;
}
@@ -3280,7 +3278,7 @@ expand_call (tree exp, rtx target, int ignore)
(TYPE_QUALS (rettype)
| TYPE_QUAL_CONST));
- target = assign_temp (nt, 0, 1, 1);
+ target = assign_temp (nt, 1, 1);
}
if (! rtx_equal_p (target, valreg))
@@ -3696,7 +3694,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
if (value != 0 && MEM_P (value))
mem_value = value;
else
- mem_value = assign_temp (tfom, 0, 1, 1);
+ mem_value = assign_temp (tfom, 1, 1);
#endif
/* This call returns a big structure. */
flags &= ~(ECF_CONST | ECF_PURE | ECF_LOOPING_CONST_OR_PURE);
@@ -3811,7 +3809,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
else
{
slot = assign_temp (lang_hooks.types.type_for_mode (mode, 0),
- 0, 1, 1);
+ 1, 1);
emit_move_insn (slot, val);
}
@@ -4035,8 +4033,8 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
{
argvec[argnum].save_area
= assign_stack_temp (BLKmode,
- argvec[argnum].locate.size.constant,
- 0);
+ argvec[argnum].locate.size.constant
+ );
emit_block_move (validize_mem (argvec[argnum].save_area),
stack_area,
@@ -4446,7 +4444,7 @@ store_one_arg (struct arg_data *arg, rtx argblock, int flags,
tree nt = build_qualified_type (ot, (TYPE_QUALS (ot)
| TYPE_QUAL_CONST));
- arg->save_area = assign_temp (nt, 0, 1, 1);
+ arg->save_area = assign_temp (nt, 1, 1);
preserve_temp_slots (arg->save_area);
emit_block_move (validize_mem (arg->save_area), stack_area,
GEN_INT (arg->locate.size.constant),
@@ -4723,11 +4721,7 @@ store_one_arg (struct arg_data *arg, rtx argblock, int flags,
be deferred during the rest of the arguments. */
NO_DEFER_POP;
- /* Free any temporary slots made in processing this argument. Show
- that we might have taken the address of something and pushed that
- as an operand. */
- preserve_temp_slots (NULL_RTX);
- free_temp_slots ();
+ /* Free any temporary slots made in processing this argument. */
pop_temp_slots ();
return sibcall_failure;
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
index e94e7e3fb41..23d36010458 100644
--- a/gcc/cfgcleanup.c
+++ b/gcc/cfgcleanup.c
@@ -62,7 +62,7 @@ along with GCC; see the file COPYING3. If not see
/* Set to true when we are running first pass of try_optimize_cfg loop. */
static bool first_pass;
-/* Set to true if crossjumps occured in the latest run of try_optimize_cfg. */
+/* Set to true if crossjumps occurred in the latest run of try_optimize_cfg. */
static bool crossjumps_occured;
/* Set to true if we couldn't run an optimization due to stale liveness
@@ -2644,7 +2644,7 @@ try_optimize_cfg (int mode)
}
/* If we fall through an empty block, we can remove it. */
- if (!(mode & CLEANUP_CFGLAYOUT)
+ if (!(mode & (CLEANUP_CFGLAYOUT | CLEANUP_NO_INSN_DEL))
&& single_pred_p (b)
&& (single_pred_edge (b)->flags & EDGE_FALLTHRU)
&& !LABEL_P (BB_HEAD (b))
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index c0fd6e1cd7b..156a07d11f9 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -49,7 +49,6 @@ along with GCC; see the file COPYING3. If not see
#include "sbitmap.h"
#include "cfgloop.h"
#include "regs.h" /* For reg_renumber. */
-#include "integrate.h" /* For emit_initial_value_sets. */
#include "insn-attr.h" /* For INSN_SCHEDULING. */
/* This variable holds information helping the rewriting of SSA trees
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index 4e1ec8644d1..3ee92d9a2aa 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -603,6 +603,56 @@ rtl_split_block (basic_block bb, void *insnp)
return new_bb;
}
+/* Return true if the single edge between blocks A and B is the only place
+ in RTL which holds some unique locus. */
+
+static bool
+unique_locus_on_edge_between_p (basic_block a, basic_block b)
+{
+ const int goto_locus = EDGE_SUCC (a, 0)->goto_locus;
+ rtx insn, end;
+
+ if (!goto_locus)
+ return false;
+
+ /* First scan block A backward. */
+ insn = BB_END (a);
+ end = PREV_INSN (BB_HEAD (a));
+ while (insn != end && (!NONDEBUG_INSN_P (insn) || INSN_LOCATOR (insn) == 0))
+ insn = PREV_INSN (insn);
+
+ if (insn != end && locator_eq (INSN_LOCATOR (insn), goto_locus))
+ return false;
+
+ /* Then scan block B forward. */
+ insn = BB_HEAD (b);
+ if (insn)
+ {
+ end = NEXT_INSN (BB_END (b));
+ while (insn != end && !NONDEBUG_INSN_P (insn))
+ insn = NEXT_INSN (insn);
+
+ if (insn != end && INSN_LOCATOR (insn) != 0
+ && locator_eq (INSN_LOCATOR (insn), goto_locus))
+ return false;
+ }
+
+ return true;
+}
+
+/* If the single edge between blocks A and B is the only place in RTL which
+ holds some unique locus, emit a nop with that locus between the blocks. */
+
+static void
+emit_nop_for_unique_locus_between (basic_block a, basic_block b)
+{
+ if (!unique_locus_on_edge_between_p (a, b))
+ return;
+
+ BB_END (a) = emit_insn_after_noloc (gen_nop (), BB_END (a), a);
+ INSN_LOCATOR (BB_END (a)) = EDGE_SUCC (a, 0)->goto_locus;
+}
+
/* Blocks A and B are to be merged into a single block A. The insns
are already contiguous. */
@@ -681,15 +731,25 @@ rtl_merge_blocks (basic_block a, basic_block b)
/* Delete everything marked above as well as crap that might be
hanging out between the two blocks. */
- BB_HEAD (b) = NULL;
+ BB_END (a) = a_end;
+ BB_HEAD (b) = b_empty ? NULL_RTX : b_head;
delete_insn_chain (del_first, del_last, true);
+ /* When not optimizing CFG and the edge is the only place in RTL which holds
+ some unique locus, emit a nop with that locus in between. */
+ if (!optimize)
+ {
+ emit_nop_for_unique_locus_between (a, b);
+ a_end = BB_END (a);
+ }
+
/* Reassociate the insns of B with A. */
if (!b_empty)
{
update_bb_for_insn_chain (a_end, b_debug_end, a);
- a_end = b_debug_end;
+ BB_END (a) = b_debug_end;
+ BB_HEAD (b) = NULL_RTX;
}
else if (b_end != b_debug_end)
{
@@ -701,11 +761,10 @@ rtl_merge_blocks (basic_block a, basic_block b)
reorder_insns_nobb (NEXT_INSN (a_end), PREV_INSN (b_debug_start),
b_debug_end);
update_bb_for_insn_chain (b_debug_start, b_debug_end, a);
- a_end = b_debug_end;
+ BB_END (a) = b_debug_end;
}
df_bb_delete (b->index);
- BB_END (a) = a_end;
/* If B was a forwarder block, propagate the locus on the edge. */
if (forwarder_p && !EDGE_SUCC (b, 0)->goto_locus)
@@ -2853,33 +2912,10 @@ cfg_layout_merge_blocks (basic_block a, basic_block b)
try_redirect_by_replacing_jump (EDGE_SUCC (a, 0), b, true);
gcc_assert (!JUMP_P (BB_END (a)));
- /* When not optimizing and the edge is the only place in RTL which holds
+ /* When not optimizing CFG and the edge is the only place in RTL which holds
some unique locus, emit a nop with that locus in between. */
- if (!optimize && EDGE_SUCC (a, 0)->goto_locus)
- {
- rtx insn = BB_END (a), end = PREV_INSN (BB_HEAD (a));
- int goto_locus = EDGE_SUCC (a, 0)->goto_locus;
-
- while (insn != end && (!INSN_P (insn) || INSN_LOCATOR (insn) == 0))
- insn = PREV_INSN (insn);
- if (insn != end && locator_eq (INSN_LOCATOR (insn), goto_locus))
- goto_locus = 0;
- else
- {
- insn = BB_HEAD (b);
- end = NEXT_INSN (BB_END (b));
- while (insn != end && !INSN_P (insn))
- insn = NEXT_INSN (insn);
- if (insn != end && INSN_LOCATOR (insn) != 0
- && locator_eq (INSN_LOCATOR (insn), goto_locus))
- goto_locus = 0;
- }
- if (goto_locus)
- {
- BB_END (a) = emit_insn_after_noloc (gen_nop (), BB_END (a), a);
- INSN_LOCATOR (BB_END (a)) = goto_locus;
- }
- }
+ if (!optimize)
+ emit_nop_for_unique_locus_between (a, b);
/* Possible line number notes should appear in between. */
if (BB_HEADER (b))
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 571435e85d9..cc80dad95e1 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -413,7 +413,7 @@ cgraph_get_create_node (tree decl)
}
/* Mark ALIAS as an alias to DECL. DECL_NODE is cgraph node representing
- the function body is associated with (not neccesarily cgraph_node (DECL). */
+ the function body is associated with (not necessarily cgraph_node (DECL). */
struct cgraph_node *
cgraph_create_function_alias (tree alias, tree decl)
@@ -1587,7 +1587,7 @@ cgraph_node_can_be_local_p (struct cgraph_node *node)
NULL, true));
}
-/* Call calback on NODE, thunks and aliases asociated to NODE.
+/* Call calback on NODE, thunks and aliases associated to NODE.
When INCLUDE_OVERWRITABLE is false, overwritable aliases and thunks are
skipped. */
@@ -1623,7 +1623,7 @@ cgraph_for_node_thunks_and_aliases (struct cgraph_node *node,
return false;
}
-/* Call calback on NODE and aliases asociated to NODE.
+/* Call calback on NODE and aliases associated to NODE.
When INCLUDE_OVERWRITABLE is false, overwritable aliases and thunks are
skipped. */
@@ -2093,7 +2093,7 @@ verify_edge_count_and_frequency (struct cgraph_edge *e)
if (gimple_has_body_p (e->caller->symbol.decl)
&& !e->caller->global.inlined_to
/* FIXME: Inline-analysis sets frequency to 0 when edge is optimized out.
- Remove this once edges are actualy removed from the function at that time. */
+ Remove this once edges are actually removed from the function at that time. */
&& (e->frequency
|| (inline_edge_summary_vec
&& ((VEC_length(inline_edge_summary_t, inline_edge_summary_vec)
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index d2d44a9e06a..0a4efd937c1 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -1187,7 +1187,7 @@ varpool_alias_aliased_node (struct varpool_node *n)
/* Given NODE, walk the alias chain to return the function NODE is alias of.
Walk through thunk, too.
- When AVAILABILITY is non-NULL, get minimal availablity in the chain. */
+ When AVAILABILITY is non-NULL, get minimal availability in the chain. */
static inline struct cgraph_node *
cgraph_function_node (struct cgraph_node *node, enum availability *availability)
@@ -1217,7 +1217,7 @@ cgraph_function_node (struct cgraph_node *node, enum availability *availability)
/* Given NODE, walk the alias chain to return the function NODE is alias of.
Do not walk through thunks.
- When AVAILABILITY is non-NULL, get minimal availablity in the chain. */
+ When AVAILABILITY is non-NULL, get minimal availability in the chain. */
static inline struct cgraph_node *
cgraph_function_or_thunk_node (struct cgraph_node *node, enum availability *availability)
@@ -1245,7 +1245,7 @@ cgraph_function_or_thunk_node (struct cgraph_node *node, enum availability *avai
/* Given NODE, walk the alias chain to return the function NODE is alias of.
Do not walk through thunks.
- When AVAILABILITY is non-NULL, get minimal availablity in the chain. */
+ When AVAILABILITY is non-NULL, get minimal availability in the chain. */
static inline struct varpool_node *
varpool_variable_node (struct varpool_node *node, enum availability *availability)
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 762831488d1..f405a05cbd0 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -51,7 +51,7 @@ along with GCC; see the file COPYING3. If not see
The symbol table is constructed starting from the trivially needed
symbols finalized by the frontend. Functions are lowered into
GIMPLE representation and callgraph/reference lists are constructed.
- Those are used to discover other neccesary functions and variables.
+ Those are used to discover other necessary functions and variables.
At the end the bodies of unreachable functions are removed.
@@ -220,7 +220,7 @@ static GTY (()) tree vtable_entry_type;
/* Determine if function DECL is trivially needed and should stay in the
compilation unit. This is used at the symbol table construction time
- and differs from later logic removing unnecesary functions that can
+ and differs from later logic removing unnecessary functions that can
take into account results of analysis, whole program info etc. */
static bool
@@ -293,7 +293,6 @@ cgraph_process_new_functions (void)
if (!cgraph_new_nodes)
return false;
- finish_aliases_1 ();
handle_alias_pairs ();
/* Note that this queue may grow as its being processed, as the new
functions may generate new ones. */
@@ -394,7 +393,7 @@ referred_to_p (symtab_node node)
{
struct ipa_ref *ref;
- /* See if there are any refrences at all. */
+ /* See if there are any references at all. */
if (ipa_ref_list_referring_iterate (&node->symbol.ref_list, 0, ref))
return true;
/* For functions check also calls. */
@@ -1082,6 +1081,18 @@ handle_alias_pairs (void)
= lookup_attribute ("weakref",
DECL_ATTRIBUTES (p->decl)) != NULL;
+ if (DECL_EXTERNAL (target_node->symbol.decl)
+ /* We use local aliases for C++ thunks to force the tailcall
+ to bind locally. This is a hack - to keep it working do
+ the following (which is not strictly correct). */
+ && (! TREE_CODE (target_node->symbol.decl) == FUNCTION_DECL
+ || ! DECL_VIRTUAL_P (target_node->symbol.decl))
+ && ! lookup_attribute ("weakref", DECL_ATTRIBUTES (p->decl)))
+ {
+ error ("%q+D aliased to external symbol %qE",
+ p->decl, p->target);
+ }
+
if (TREE_CODE (p->decl) == FUNCTION_DECL
&& target_node && symtab_function_p (target_node))
{
@@ -1199,6 +1210,7 @@ mark_functions_to_output (void)
end up not removing the body since we no longer have an
analyzed node pointing to it. */
&& !node->symbol.in_other_partition
+ && !node->clones
&& !DECL_EXTERNAL (decl))
{
dump_cgraph_node (stderr, node);
@@ -1536,7 +1548,7 @@ assemble_thunk (struct cgraph_node *node)
-/* Assemble thunks and aliases asociated to NODE. */
+/* Assemble thunks and aliases associated to NODE. */
static void
assemble_thunks_and_aliases (struct cgraph_node *node)
@@ -1566,8 +1578,8 @@ assemble_thunks_and_aliases (struct cgraph_node *node)
/* Force assemble_alias to really output the alias this time instead
of buffering it in same alias pairs. */
TREE_ASM_WRITTEN (alias->thunk.alias) = 1;
- assemble_alias (alias->symbol.decl,
- DECL_ASSEMBLER_NAME (alias->thunk.alias));
+ do_assemble_alias (alias->symbol.decl,
+ DECL_ASSEMBLER_NAME (alias->thunk.alias));
assemble_thunks_and_aliases (alias);
TREE_ASM_WRITTEN (alias->thunk.alias) = saved_written;
}
@@ -1905,7 +1917,7 @@ get_alias_symbol (tree decl)
/* Weakrefs may be associated to external decls and thus not output
- at expansion time. Emit all neccesary aliases. */
+ at expansion time. Emit all necessary aliases. */
static void
output_weakrefs (void)
@@ -1916,16 +1928,16 @@ output_weakrefs (void)
if (node->alias && DECL_EXTERNAL (node->symbol.decl)
&& !TREE_ASM_WRITTEN (node->symbol.decl)
&& lookup_attribute ("weakref", DECL_ATTRIBUTES (node->symbol.decl)))
- assemble_alias (node->symbol.decl,
- node->thunk.alias ? DECL_ASSEMBLER_NAME (node->thunk.alias)
- : get_alias_symbol (node->symbol.decl));
+ do_assemble_alias (node->symbol.decl,
+ node->thunk.alias ? DECL_ASSEMBLER_NAME (node->thunk.alias)
+ : get_alias_symbol (node->symbol.decl));
FOR_EACH_VARIABLE (vnode)
if (vnode->alias && DECL_EXTERNAL (vnode->symbol.decl)
&& !TREE_ASM_WRITTEN (vnode->symbol.decl)
&& lookup_attribute ("weakref", DECL_ATTRIBUTES (vnode->symbol.decl)))
- assemble_alias (vnode->symbol.decl,
- vnode->alias_of ? DECL_ASSEMBLER_NAME (vnode->alias_of)
- : get_alias_symbol (vnode->symbol.decl));
+ do_assemble_alias (vnode->symbol.decl,
+ vnode->alias_of ? DECL_ASSEMBLER_NAME (vnode->alias_of)
+ : get_alias_symbol (vnode->symbol.decl));
}
/* Initialize callgraph dump file. */
@@ -2009,7 +2021,6 @@ compile (void)
#endif
bitmap_obstack_release (NULL);
mark_functions_to_output ();
- output_weakrefs ();
cgraph_state = CGRAPH_STATE_EXPANSION;
if (!flag_toplevel_reorder)
@@ -2024,6 +2035,7 @@ compile (void)
cgraph_process_new_functions ();
cgraph_state = CGRAPH_STATE_FINISHED;
+ output_weakrefs ();
if (cgraph_dump_file)
{
@@ -2072,7 +2084,6 @@ finalize_compilation_unit (void)
finalize_size_functions ();
/* Mark alias targets necessary and emit diagnostics. */
- finish_aliases_1 ();
handle_alias_pairs ();
if (!quiet_flag)
@@ -2089,7 +2100,6 @@ finalize_compilation_unit (void)
cgraph_analyze_functions ();
/* Mark alias targets necessary and emit diagnostics. */
- finish_aliases_1 ();
handle_alias_pairs ();
/* Gimplify and lower thunks. */
diff --git a/gcc/collect2-aix.h b/gcc/collect2-aix.h
index 1ab313d0f34..203f42cbd3d 100644
--- a/gcc/collect2-aix.h
+++ b/gcc/collect2-aix.h
@@ -29,7 +29,7 @@ along with GCC; see the file COPYING3. If not see
Definitions adapted from bfd. (Fairly heavily adapted in some cases.)
------------------------------------------------------------------------- */
-/* Compatiblity types for bfd. */
+/* Compatibility types for bfd. */
typedef unsigned HOST_WIDE_INT bfd_vma;
/* The size of an archive's fl_magic field. */
@@ -135,7 +135,7 @@ struct external_filehdr_32
/* The number of entries in the symbol table. */
char f_nsyms[4];
- /* The size of the auxillary header. */
+ /* The size of the auxiliary header. */
char f_opthdr[2];
/* Flags. */
@@ -157,7 +157,7 @@ struct external_filehdr_64
/* The offset of the symbol table from the start of the file. */
char f_symptr[8];
- /* The size of the auxillary header. */
+ /* The size of the auxiliary header. */
char f_opthdr[2];
/* Flags. */
@@ -222,7 +222,7 @@ struct external_syment
/* The class of symbol (a C_* value). */
char n_sclass[1];
- /* The number of auxillary symbols attached to this entry. */
+ /* The number of auxiliary symbols attached to this entry. */
char n_numaux[1];
};
diff --git a/gcc/collect2.c b/gcc/collect2.c
index deed052af2f..9ee12c7a502 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -842,7 +842,7 @@ add_lto_object (struct lto_object_list *list, const char *name)
files contain LTO info. The linker command line LTO_LD_ARGV
represents the linker command that would produce a final executable
without the use of LTO. OBJECT_LST is a vector of object file names
- appearing in LTO_LD_ARGV that are to be considerd for link-time
+ appearing in LTO_LD_ARGV that are to be considered for link-time
recompilation, where OBJECT is a pointer to the last valid element.
(This awkward convention avoids an impedance mismatch with the
usage of similarly-named variables in main().) The elements of
@@ -2567,7 +2567,7 @@ scan_prog_file (const char *prog_name, scanpass which_pass,
/* LTO objects must be in a known format. This check prevents
us from accepting an archive containing LTO objects, which
- gcc cannnot currently handle. */
+ gcc cannot currently handle. */
if (which_pass == PASS_LTOINFO && !maybe_lto_object_file (prog_name))
return;
diff --git a/gcc/combine.c b/gcc/combine.c
index d23ecfcbccd..d6897a17958 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -10284,8 +10284,7 @@ simplify_shift_const_1 (enum rtx_code code, enum machine_mode result_mode,
break;
/* Make this fit the case below. */
- varop = gen_rtx_XOR (mode, XEXP (varop, 0),
- GEN_INT (GET_MODE_MASK (mode)));
+ varop = gen_rtx_XOR (mode, XEXP (varop, 0), constm1_rtx);
continue;
case IOR:
diff --git a/gcc/common/config/ia64/ia64-common.c b/gcc/common/config/ia64/ia64-common.c
index 11682532704..79aed6afc79 100644
--- a/gcc/common/config/ia64/ia64-common.c
+++ b/gcc/common/config/ia64/ia64-common.c
@@ -71,8 +71,8 @@ enum unwind_info_type
ia64_except_unwind_info (struct gcc_options *opts)
{
/* Honor the --enable-sjlj-exceptions configure switch. */
-#ifdef CONFIG_UNWIND_EXCEPTIONS
- if (CONFIG_UNWIND_EXCEPTIONS)
+#ifdef CONFIG_SJLJ_EXCEPTIONS
+ if (CONFIG_SJLJ_EXCEPTIONS)
return UI_SJLJ;
#endif
diff --git a/gcc/compare-elim.c b/gcc/compare-elim.c
index f11a7245caa..b021e8daf88 100644
--- a/gcc/compare-elim.c
+++ b/gcc/compare-elim.c
@@ -494,7 +494,7 @@ try_eliminate_compare (struct comparison *cmp)
{
rtx x, insn, bb_head, flags, in_a, cmp_src;
- /* We must have found an interesting "clobber" preceeding the compare. */
+ /* We must have found an interesting "clobber" preceding the compare. */
if (cmp->prev_clobber == NULL)
return false;
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 5d73470bebd..7ec184cd964 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1470,6 +1470,8 @@ i[34567]86-*-mingw* | x86_64-*-mingw*)
extra_objs="winnt.o winnt-stubs.o"
c_target_objs="${c_target_objs} msformat-c.o"
cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
+ gas=yes
+ gnu_ld=yes
default_use_cxa_atexit=yes
use_gcc_stdint=wrap
case ${enable_threads} in
diff --git a/gcc/config.in b/gcc/config.in
index 9eefc9787b0..7b12b4bd3c7 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -333,6 +333,12 @@
#endif
+/* Define if your assembler supports HLE prefixes. */
+#ifndef USED_FOR_TARGET
+#undef HAVE_AS_IX86_HLE
+#endif
+
+
/* Define if your assembler supports the .quad directive. */
#ifndef USED_FOR_TARGET
#undef HAVE_AS_IX86_QUAD
@@ -350,11 +356,6 @@
#undef HAVE_AS_IX86_SAHF
#endif
-/* Define if your assembler supports HLE prefixes. */
-#ifndef USED_FOR_TARGET
-#undef HAVE_AS_IX86_HLE
-#endif
-
/* Define if your assembler supports the swap suffix. */
#ifndef USED_FOR_TARGET
@@ -1096,7 +1097,7 @@
#endif
-/* Define if using GNU as. */
+/* Define to 1 if using GNU as. */
#ifndef USED_FOR_TARGET
#undef HAVE_GNU_AS
#endif
@@ -1108,7 +1109,7 @@
#endif
-/* Define if using GNU ld. */
+/* Define to 1 if using GNU ld. */
#ifndef USED_FOR_TARGET
#undef HAVE_GNU_LD
#endif
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 225c9ab3c54..6d15bf70cff 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -43,7 +43,6 @@ along with GCC; see the file COPYING3. If not see
#include "function.h"
#include "diagnostic-core.h"
#include "ggc.h"
-#include "integrate.h"
#include "tm_p.h"
#include "target.h"
#include "target-def.h"
diff --git a/gcc/config/alpha/ev6.md b/gcc/config/alpha/ev6.md
index adfe504bf8b..a16535a6450 100644
--- a/gcc/config/alpha/ev6.md
+++ b/gcc/config/alpha/ev6.md
@@ -147,11 +147,15 @@
(eq_attr "type" "fadd,fcpys,fbr"))
"ev6_fa")
+(define_bypass 6 "ev6_fmul,ev6_fadd" "ev6_fst,ev6_ftoi")
+
(define_insn_reservation "ev6_fcmov" 8
(and (eq_attr "tune" "ev6")
(eq_attr "type" "fcmov"))
"ev6_fa,nothing*3,ev6_fa")
+(define_bypass 10 "ev6_fcmov" "ev6_fst,ev6_ftoi")
+
(define_insn_reservation "ev6_fdivsf" 12
(and (eq_attr "tune" "ev6")
(and (eq_attr "type" "fdiv")
diff --git a/gcc/config/alpha/vms.h b/gcc/config/alpha/vms.h
index 6f90122fef3..03d9b9b229a 100644
--- a/gcc/config/alpha/vms.h
+++ b/gcc/config/alpha/vms.h
@@ -153,7 +153,7 @@ typedef struct {int num_args; enum avms_arg_type atypes[6];} avms_arg_info;
#define DEFAULT_PCC_STRUCT_RETURN 0
-/* Eventhough pointers are 64bits, only 32bit ever remain significant in code
+/* Even though pointers are 64bits, only 32bit ever remain significant in code
addresses. */
#define MASK_RETURN_ADDR \
(flag_vms_pointer_size == VMS_POINTER_SIZE_NONE \
diff --git a/gcc/config/arm/README-interworking b/gcc/config/arm/README-interworking
index 7f2eda83b49..cfa7f66e294 100644
--- a/gcc/config/arm/README-interworking
+++ b/gcc/config/arm/README-interworking
@@ -227,7 +227,7 @@ considerations when building programs and DLLs:
Switching between the ARM and Thumb instruction sets is accomplished
via the BX instruction which takes as an argument a register name.
-Control is transfered to the address held in this register (with the
+Control is transferred to the address held in this register (with the
bottom bit masked out), and if the bottom bit is set, then Thumb
instruction processing is enabled, otherwise ARM instruction
processing is enabled.
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 7a9819705e5..8a862275b5b 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -46,7 +46,6 @@
#include "ggc.h"
#include "except.h"
#include "c-family/c-pragma.h" /* ??? */
-#include "integrate.h"
#include "tm_p.h"
#include "target.h"
#include "target-def.h"
@@ -2588,7 +2587,7 @@ optimal_immediate_sequence (enum rtx_code code, unsigned HOST_WIDE_INT val,
int insns1, insns2;
struct four_ints tmp_sequence;
- /* If we aren't targetting ARM, the best place to start is always at
+ /* If we aren't targeting ARM, the best place to start is always at
the bottom, otherwise look more closely. */
if (TARGET_ARM)
{
@@ -8473,7 +8472,7 @@ cortex_a9_sched_adjust_cost (rtx insn, rtx link, rtx dep, int * cost)
&& reg_overlap_mentioned_p (SET_DEST (PATTERN (insn)),
SET_DEST (PATTERN (dep))))
{
- /* FMACS is a special case where the dependant
+ /* FMACS is a special case where the dependent
instruction can be issued 3 cycles before
the normal latency in case of an output
dependency. */
@@ -9459,7 +9458,7 @@ neon_expand_vector_init (rtx target, rtx vals)
/* Construct the vector in memory one field at a time
and load the whole vector. */
- mem = assign_stack_temp (mode, GET_MODE_SIZE (mode), 0);
+ mem = assign_stack_temp (mode, GET_MODE_SIZE (mode));
for (i = 0; i < n_elts; i++)
emit_move_insn (adjust_address_nv (mem, inner_mode,
i * GET_MODE_SIZE (inner_mode)),
@@ -16187,7 +16186,7 @@ arm_output_epilogue (rtx sibling)
now we have to use add/sub in those cases. However, the value
of that would be marginal, as both mov and add/sub are 32-bit
in ARM mode, and it would require extra conditionals
- in arm_expand_prologue to distingish ARM-apcs-frame case
+ in arm_expand_prologue to distinguish ARM-apcs-frame case
(where frame pointer is required to point at first register)
and ARM-non-apcs-frame. Therefore, such change is postponed
until real need arise. */
@@ -25638,10 +25637,18 @@ arm_evpc_neon_vrev (struct expand_vec_perm_d *d)
return false;
}
- for (i = 0; i < nelt; i += diff)
+ for (i = 0; i < nelt ; i += diff + 1)
for (j = 0; j <= diff; j += 1)
- if (d->perm[i + j] != i + diff - j)
- return false;
+ {
+ /* This is guaranteed to be true as the value of diff
+ is 7, 3, 1 and we should have enough elements in the
+ queue to generate this. Getting a vector mask with a
+ value of diff other than these values implies that
+ something is wrong by the time we get here. */
+ gcc_assert (i + j < nelt);
+ if (d->perm[i + j] != i + diff - j)
+ return false;
+ }
/* Success! */
if (d->testing_p)
diff --git a/gcc/config/arm/iterators.md b/gcc/config/arm/iterators.md
index 15672647e51..bb0d44e75e0 100644
--- a/gcc/config/arm/iterators.md
+++ b/gcc/config/arm/iterators.md
@@ -36,7 +36,7 @@
;; A list of integer modes that are less than a word
(define_mode_iterator NARROW [QI HI])
-;; A list of all the integer modes upto 64bit
+;; A list of all the integer modes up to 64bit
(define_mode_iterator QHSD [QI HI SI DI])
;; A list of the 32bit and 64bit integer modes
diff --git a/gcc/config/arm/t-arm b/gcc/config/arm/t-arm
index 1128d1904b0..2bc97a65dac 100644
--- a/gcc/config/arm/t-arm
+++ b/gcc/config/arm/t-arm
@@ -78,7 +78,7 @@ arm.o: $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
insn-config.h conditions.h output.h \
$(INSN_ATTR_H) $(FLAGS_H) reload.h $(FUNCTION_H) \
$(EXPR_H) $(OPTABS_H) $(RECOG_H) $(CGRAPH_H) \
- $(GGC_H) except.h $(C_PRAGMA_H) $(INTEGRATE_H) $(TM_P_H) \
+ $(GGC_H) except.h $(C_PRAGMA_H) $(TM_P_H) \
$(TARGET_H) $(TARGET_DEF_H) debug.h langhooks.h $(DF_H) \
intl.h libfuncs.h $(PARAMS_H) $(OPTS_H) $(srcdir)/config/arm/arm-cores.def \
$(srcdir)/config/arm/arm-arches.def $(srcdir)/config/arm/arm-fpus.def
diff --git a/gcc/config/arm/vxworks.h b/gcc/config/arm/vxworks.h
index 887691326e5..391c166336b 100644
--- a/gcc/config/arm/vxworks.h
+++ b/gcc/config/arm/vxworks.h
@@ -1,5 +1,5 @@
/* Definitions of target machine for GCC,
- for ARM with targetting the VXWorks run time environment.
+ for ARM with targeting the VXWorks run time environment.
Copyright (C) 1999, 2000, 2003, 2004, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c
index 38afc7abf93..208f650c9af 100644
--- a/gcc/config/avr/avr.c
+++ b/gcc/config/avr/avr.c
@@ -6840,7 +6840,7 @@ avr_progmem_p (tree decl, tree attributes)
/* Scan type TYP for pointer references to address space ASn.
Return ADDR_SPACE_GENERIC (i.e. 0) if all pointers targeting
the AS are also declared to be CONST.
- Otherwise, return the respective addres space, i.e. a value != 0. */
+ Otherwise, return the respective address space, i.e. a value != 0. */
static addr_space_t
avr_nonconst_pointer_addrspace (tree typ)
@@ -6884,7 +6884,7 @@ avr_nonconst_pointer_addrspace (tree typ)
}
-/* Sanity check NODE so that all pointers targeting non-generic addres spaces
+/* Sanity check NODE so that all pointers targeting non-generic address spaces
go along with CONST qualifier. Writing to these address spaces should
be detected and complained about as early as possible. */
@@ -9727,7 +9727,7 @@ avr_emit_movmemhi (rtx *xop)
/* FIXME: Register allocator does a bad job and might spill address
register(s) inside the loop leading to additional move instruction
to/from stack which could clobber tmp_reg. Thus, do *not* emit
- load and store as seperate insns. Instead, we perform the copy
+ load and store as separate insns. Instead, we perform the copy
by means of one monolithic insn. */
gcc_assert (TMP_REGNO == LPM_REGNO);
diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h
index dfbd071d192..54c127469e1 100644
--- a/gcc/config/avr/avr.h
+++ b/gcc/config/avr/avr.h
@@ -557,10 +557,10 @@ typedef struct avr_args {
#define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE) \
avr_output_addr_vec_elt(STREAM, VALUE)
-#define ASM_OUTPUT_ALIGN(STREAM, POWER) \
- do { \
- if ((POWER) > 1) \
- fprintf (STREAM, "\t.p2align\t%d\n", POWER); \
+#define ASM_OUTPUT_ALIGN(STREAM, POWER) \
+ do { \
+ if ((POWER) > 0) \
+ fprintf (STREAM, "\t.p2align\t%d\n", POWER); \
} while (0)
#define CASE_VECTOR_MODE HImode
@@ -713,7 +713,7 @@ struct GTY(()) machine_function
int attributes_checked_p;
};
-/* AVR does not round pushes, but the existance of this macro is
+/* AVR does not round pushes, but the existence of this macro is
required in order for pushes to be generated. */
#define PUSH_ROUNDING(X) (X)
diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md
index 3fe06da661c..2b1a83c607a 100644
--- a/gcc/config/avr/avr.md
+++ b/gcc/config/avr/avr.md
@@ -29,7 +29,7 @@
;; k Reverse branch condition.
;;..m..Constant Direct Data memory address.
;; i Print the SFR address quivalent of a CONST_INT or a CONST_INT
-;; RAM address. The resulting addres is suitable to be used in IN/OUT.
+;; RAM address. The resulting address is suitable to be used in IN/OUT.
;; o Displacement for (mem (plus (reg) (const_int))) operands.
;; p POST_INC or PRE_DEC address as a pointer (X, Y, Z)
;; r POST_INC or PRE_DEC address as a register (r26, r28, r30)
diff --git a/gcc/config/avr/builtins.def b/gcc/config/avr/builtins.def
index 24537052eb0..4b04ff1b367 100644
--- a/gcc/config/avr/builtins.def
+++ b/gcc/config/avr/builtins.def
@@ -38,7 +38,7 @@ DEF_BUILTIN ("__builtin_avr_cli", 0, AVR_BUILTIN_CLI, void_ftype_void, CODE_FO
DEF_BUILTIN ("__builtin_avr_wdr", 0, AVR_BUILTIN_WDR, void_ftype_void, CODE_FOR_wdr)
DEF_BUILTIN ("__builtin_avr_sleep", 0, AVR_BUILTIN_SLEEP, void_ftype_void, CODE_FOR_sleep)
-/* Mapped to respective instruction but might alse be folded away
+/* Mapped to respective instruction but might also be folded away
or emit as libgcc call if ISA does not provide the instruction. */
DEF_BUILTIN ("__builtin_avr_swap", 1, AVR_BUILTIN_SWAP, uchar_ftype_uchar, CODE_FOR_rotlqi3_4)
DEF_BUILTIN ("__builtin_avr_fmul", 2, AVR_BUILTIN_FMUL, uint_ftype_uchar_uchar, CODE_FOR_fmul)
diff --git a/gcc/config/avr/elf.h b/gcc/config/avr/elf.h
index 6d79dc38cb8..82a0969d3b0 100644
--- a/gcc/config/avr/elf.h
+++ b/gcc/config/avr/elf.h
@@ -35,7 +35,7 @@
/* Output alignment 2**1 for jump tables. */
#undef ASM_OUTPUT_BEFORE_CASE_LABEL
#define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE, PREFIX, NUM, TABLE) \
- fprintf (FILE, "\t.p2align\t1\n");
+ ASM_OUTPUT_ALIGN (FILE, 1);
/* Be conservative in crtstuff.c. */
#undef INIT_SECTION_ASM_OP
diff --git a/gcc/config/avr/t-avr b/gcc/config/avr/t-avr
index 24cdd92590a..20dc63a18f3 100644
--- a/gcc/config/avr/t-avr
+++ b/gcc/config/avr/t-avr
@@ -50,7 +50,7 @@ gen-avr-mmcu-texi$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-texi.c \
avr-devices.o: s-avr-mmcu-texi
s-avr-mmcu-texi: gen-avr-mmcu-texi$(build_exeext)
- $(RUN_GEN) $< | sed -e 's:\r::g' > avr-mmcu.texi
+ $(RUN_GEN) ./$< | sed -e 's:\r::g' > avr-mmcu.texi
@if cmp -s $(srcdir)/doc/avr-mmcu.texi avr-mmcu.texi; then \
$(STAMP) $@; \
else \
diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index 1342c568fd0..3cef847c952 100644
--- a/gcc/config/bfin/bfin.c
+++ b/gcc/config/bfin/bfin.c
@@ -44,7 +44,6 @@
#include "recog.h"
#include "optabs.h"
#include "ggc.h"
-#include "integrate.h"
#include "cgraph.h"
#include "langhooks.h"
#include "bfin-protos.h"
diff --git a/gcc/config/c6x/c6x.c b/gcc/config/c6x/c6x.c
index 8a368892bb2..978d0cba82b 100644
--- a/gcc/config/c6x/c6x.c
+++ b/gcc/config/c6x/c6x.c
@@ -40,7 +40,7 @@
#include "tm-preds.h"
#include "tm-constrs.h"
#include "df.h"
-#include "integrate.h"
+#include "function.h"
#include "diagnostic-core.h"
#include "cgraph.h"
#include "cfglayout.h"
@@ -3630,7 +3630,7 @@ typedef struct c6x_sched_context
/* The current scheduling state. */
static struct c6x_sched_context ss;
-/* The following variable value is DFA state before issueing the first insn
+/* The following variable value is DFA state before issuing the first insn
in the current clock cycle. This is used in c6x_variable_issue for
comparison with the state after issuing the last insn in a cycle. */
static state_t prev_cycle_state;
diff --git a/gcc/config/cr16/cr16.c b/gcc/config/cr16/cr16.c
index 852c808f571..df272600c8b 100644
--- a/gcc/config/cr16/cr16.c
+++ b/gcc/config/cr16/cr16.c
@@ -61,7 +61,7 @@
#define FUNC_IS_NORETURN_P(decl) (TREE_THIS_VOLATILE (decl))
/* Predicate that holds when we need to save registers even for 'noreturn'
- functions, to accomodate for unwinding. */
+ functions, to accommodate for unwinding. */
#define MUST_SAVE_REGS_P() \
(flag_unwind_tables || (flag_exceptions && !UI_SJLJ))
diff --git a/gcc/config/cr16/cr16.md b/gcc/config/cr16/cr16.md
index 5e4530c32ce..12072b46f0c 100644
--- a/gcc/config/cr16/cr16.md
+++ b/gcc/config/cr16/cr16.md
@@ -144,7 +144,7 @@
[(set_attr "length" "2")]
)
-;; Arithmetic Instuction Patterns
+;; Arithmetic Instruction Patterns
;; Addition-Subtraction "adddi3/subdi3" insns.
(define_insn "<plusminus_insn>di3"
diff --git a/gcc/config/cris/cris.h b/gcc/config/cris/cris.h
index ff0be0041f0..78fbe684078 100644
--- a/gcc/config/cris/cris.h
+++ b/gcc/config/cris/cris.h
@@ -156,11 +156,13 @@ extern int cris_cpu_version;
" -D__CRIS_arch_tune=" CRIS_DEFAULT_TUNE "}}}}}"\
CRIS_ARCH_CPP_DEFAULT
-/* Override previous definitions (linux.h). */
+/* Override previous definitions (../linux.h). */
#undef CC1_SPEC
#define CC1_SPEC \
"%{metrax4:-march=v3}\
%{metrax100:-march=v8}\
+ %{march=*:-march=%*}\
+ %{mcpu=*:-mcpu=%*}\
%(cc1_subtarget)"
/* For the cris-*-elf subtarget. */
@@ -190,7 +192,9 @@ extern int cris_cpu_version;
MAYBE_AS_NO_MUL_BUG_ABORT \
"%(asm_subtarget)\
%{march=*:%{mcpu=*:%edo not specify both -march=... and -mcpu=...}}\
- %{march=v32:--march=v32} %{mcpu=v32:--march=v32}"
+ %{march=v0|mcpu=v0|march=v3|mcpu=v3|march=v8|mcpu=v8:--march=v0_v10}\
+ %{march=v10|mcpu=v10:--march=v10}\
+ %{march=v32|mcpu=v32:--march=v32}"
/* For the cris-*-elf subtarget. */
#define CRIS_ASM_SUBTARGET_SPEC \
@@ -302,9 +306,14 @@ extern int cris_cpu_version;
#define TARGET_HAS_MUL_INSNS (cris_cpu_version >= CRIS_CPU_NG)
#define TARGET_HAS_LZ (cris_cpu_version >= CRIS_CPU_ETRAX4)
+#define TARGET_HAS_BREAK (cris_cpu_version >= CRIS_CPU_ETRAX4)
#define TARGET_HAS_SWAP (cris_cpu_version >= CRIS_CPU_SVINTO)
#define TARGET_V32 (cris_cpu_version >= CRIS_CPU_V32)
+/* The "break" instruction was introduced with ETRAX 4. */
+#define TARGET_TRAP_USING_BREAK8 \
+ (cris_trap_using_break8 == 2 ? TARGET_HAS_BREAK : cris_trap_using_break8)
+
/* Node: Storage Layout */
#define BITS_BIG_ENDIAN 0
diff --git a/gcc/config/cris/cris.md b/gcc/config/cris/cris.md
index b4ead76f38b..7d691f5a0b5 100644
--- a/gcc/config/cris/cris.md
+++ b/gcc/config/cris/cris.md
@@ -1530,7 +1530,7 @@
"movs<m> %1,%0"
[(set_attr "slottable" "yes,yes,no")])
-;; To do a byte->word extension, extend to dword, exept that the top half
+;; To do a byte->word extension, extend to dword, except that the top half
;; of the register will be clobbered. FIXME: Perhaps this is not needed.
(define_insn "extendqihi2"
@@ -3825,6 +3825,14 @@
""
"nop"
[(set_attr "cc" "none")])
+
+;; Same as the gdb trap breakpoint, will cause a SIGTRAP for
+;; cris-linux* and crisv32-linux*, as intended. Will work in
+;; freestanding environments with sufficient framework.
+(define_insn "trap"
+ [(trap_if (const_int 1) (const_int 8))]
+ "TARGET_TRAP_USING_BREAK8"
+ "break 8")
;; We need to stop accesses to the stack after the memory is
;; deallocated. Unfortunately, reorg doesn't look at naked clobbers,
diff --git a/gcc/config/cris/cris.opt b/gcc/config/cris/cris.opt
index dc4ab57f010..3c2e338ffee 100644
--- a/gcc/config/cris/cris.opt
+++ b/gcc/config/cris/cris.opt
@@ -175,6 +175,10 @@ Target Report RejectNegative Joined Var(cris_max_stackframe_str)
max-stackframe=
Target Report RejectNegative Joined Undocumented Var(cris_max_stackframe_str)
+mtrap-using-break8
+Target Report Var(cris_trap_using_break8) Init(2)
+Emit traps as \"break 8\", default for CRIS v3 and up. If disabled, calls to abort() are used.
+
; TARGET_SVINTO: Currently this just affects alignment. FIXME:
; Redundant with TARGET_ALIGN_BY_32, or put machine stuff here?
; This and the others below could just as well be variables and
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 10cbdc39a3f..6805cf1264e 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -3461,7 +3461,7 @@ darwin_function_section (tree decl, enum node_frequency freq,
/* Startup code should go to startup subsection unless it is
unlikely executed (this happens especially with function splitting
- where we can split away unnecesary parts of static constructors). */
+ where we can split away unnecessary parts of static constructors). */
if (startup && freq != NODE_FREQUENCY_UNLIKELY_EXECUTED)
return (weak)
? darwin_sections[text_startup_coal_section]
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index 3e6efd79061..5855778109d 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -356,7 +356,9 @@ extern GTY(()) int darwin_ms_struct;
%{!Zbundle:%{pg:%{static:-lgcrt0.o} \
%{!static:%{object:-lgcrt0.o} \
%{!object:%{preload:-lgcrt0.o} \
- %{!preload:-lgcrt1.o %(darwin_crt2)}}}} \
+ %{!preload:-lgcrt1.o \
+ %:version-compare(>= 10.8 mmacosx-version-min= -no_new_main) \
+ %(darwin_crt2)}}}} \
%{!pg:%{static:-lcrt0.o} \
%{!static:%{object:-lcrt0.o} \
%{!object:%{preload:-lcrt0.o} \
@@ -379,7 +381,7 @@ extern GTY(()) int darwin_ms_struct;
#define DARWIN_CRT1_SPEC \
"%:version-compare(!> 10.5 mmacosx-version-min= -lcrt1.o) \
%:version-compare(>< 10.5 10.6 mmacosx-version-min= -lcrt1.10.5.o) \
- %:version-compare(>= 10.6 mmacosx-version-min= -lcrt1.10.6.o) \
+ %:version-compare(>< 10.6 10.8 mmacosx-version-min= -lcrt1.10.6.o) \
%{fgnu-tm: -lcrttms.o}"
/* Default Darwin ASM_SPEC, very simple. */
@@ -414,6 +416,8 @@ extern GTY(()) int darwin_ms_struct;
#define TARGET_WANT_DEBUG_PUB_SECTIONS true
+#define TARGET_FORCE_AT_COMP_DIR true
+
/* When generating stabs debugging, use N_BINCL entries. */
#define DBX_USE_BINCL
diff --git a/gcc/config/darwin.opt b/gcc/config/darwin.opt
index 3fcd35f090d..23419f9b0b1 100644
--- a/gcc/config/darwin.opt
+++ b/gcc/config/darwin.opt
@@ -224,7 +224,7 @@ Generate code suitable for fast turn around debugging
; and cc1plus don't crash if no -mmacosx-version-min is passed. The
; driver will always pass a -mmacosx-version-min, so in normal use the
; Init is never used. Useful for setting the OS on which people
-; ususally debug.
+; usually debug.
mmacosx-version-min=
Target Joined Report Var(darwin_macosx_version_min) Init("10.6")
The earliest MacOS X version on which this program will run
diff --git a/gcc/config/epiphany/epiphany.c b/gcc/config/epiphany/epiphany.c
index f1a8db76353..aca296f0152 100644
--- a/gcc/config/epiphany/epiphany.c
+++ b/gcc/config/epiphany/epiphany.c
@@ -46,7 +46,6 @@ along with GCC; see the file COPYING3. If not see
#include "ggc.h"
#include "tm-constrs.h"
#include "tree-pass.h"
-#include "integrate.h"
/* Which cpu we're compiling for. */
int epiphany_cpu_type;
diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c
index ace9e437118..d7a111acbbb 100644
--- a/gcc/config/frv/frv.c
+++ b/gcc/config/frv/frv.c
@@ -46,7 +46,6 @@ along with GCC; see the file COPYING3. If not see
#include "target.h"
#include "target-def.h"
#include "targhooks.h"
-#include "integrate.h"
#include "langhooks.h"
#include "df.h"
diff --git a/gcc/config/i386/i386-c.c b/gcc/config/i386/i386-c.c
index 23427bf034f..0f78d8928ed 100644
--- a/gcc/config/i386/i386-c.c
+++ b/gcc/config/i386/i386-c.c
@@ -48,7 +48,7 @@ ix86_target_macros_internal (HOST_WIDE_INT isa_flag,
void (*def_or_undef) (cpp_reader *,
const char *))
{
- /* For some of the k6/pentium varients there weren't seperate ISA bits to
+ /* For some of the k6/pentium varients there weren't separate ISA bits to
identify which tune/arch flag was passed, so figure it out here. */
size_t arch_len = strlen (ix86_arch_string);
size_t tune_len = strlen (ix86_tune_string);
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 313b4ab2ebd..8de299216c5 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -2408,7 +2408,6 @@ struct ix86_frame
int va_arg_size;
int red_zone_size;
int outgoing_arguments_size;
- HOST_WIDE_INT frame;
/* The offsets relative to ARG_POINTER. */
HOST_WIDE_INT frame_pointer_offset;
@@ -8963,9 +8962,9 @@ ix86_builtin_setjmp_frame_value (void)
static void
ix86_compute_frame_layout (struct ix86_frame *frame)
{
- unsigned int stack_alignment_needed;
+ unsigned HOST_WIDE_INT stack_alignment_needed;
HOST_WIDE_INT offset;
- unsigned int preferred_alignment;
+ unsigned HOST_WIDE_INT preferred_alignment;
HOST_WIDE_INT size = get_frame_size ();
HOST_WIDE_INT to_allocate;
@@ -9198,7 +9197,7 @@ choose_baseaddr (HOST_WIDE_INT cfa_offset)
if (m->use_fast_prologue_epilogue)
{
/* Choose the base register most likely to allow the most scheduling
- opportunities. Generally FP is valid througout the function,
+ opportunities. Generally FP is valid throughout the function,
while DRAP must be reloaded within the epilogue. But choose either
over the SP due to increased encoding size. */
@@ -12823,13 +12822,13 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
case TLS_MODEL_INITIAL_EXEC:
if (TARGET_64BIT)
{
- if (TARGET_SUN_TLS)
+ if (TARGET_SUN_TLS && !TARGET_X32)
{
/* The Sun linker took the AMD64 TLS spec literally
and can only handle %rax as destination of the
initial executable code sequence. */
- dest = gen_reg_rtx (Pmode);
+ dest = gen_reg_rtx (DImode);
emit_insn (gen_tls_initial_exec_64_sun (dest, x));
return dest;
}
@@ -13944,8 +13943,8 @@ get_some_local_dynamic_name (void)
C -- print opcode suffix for set/cmov insn.
c -- like C, but print reversed condition
F,f -- likewise, but for floating-point.
- O -- if HAVE_AS_IX86_CMOV_SUN_SYNTAX, print the opcode suffix for
- the size of the current operand, otherwise nothing.
+ O -- if HAVE_AS_IX86_CMOV_SUN_SYNTAX, expand to "w.", "l." or "q.",
+ otherwise nothing
R -- print the prefix for register names.
z -- print the opcode suffix for the size of the current operand.
Z -- likewise, with special suffixes for x87 instructions.
@@ -14074,6 +14073,8 @@ ix86_print_operand (FILE *file, rtx x, int code)
("invalid operand size for operand code 'O'");
return;
}
+
+ putc ('.', file);
#endif
return;
@@ -14333,20 +14334,21 @@ ix86_print_operand (FILE *file, rtx x, int code)
}
return;
- case 'C':
- case 'c':
case 'F':
case 'f':
+#ifdef HAVE_AS_IX86_CMOV_SUN_SYNTAX
+ if (ASSEMBLER_DIALECT == ASM_ATT)
+ putc ('.', file);
+#endif
+
+ case 'C':
+ case 'c':
if (!COMPARISON_P (x))
{
output_operand_lossage ("operand is not a condition code, "
"invalid operand code '%c'", code);
return;
}
-#ifdef HAVE_AS_IX86_CMOV_SUN_SYNTAX
- if (ASSEMBLER_DIALECT == ASM_ATT)
- putc ('.', file);
-#endif
put_condition_code (GET_CODE (x), GET_MODE (XEXP (x, 0)),
code == 'c' || code == 'f',
code == 'F' || code == 'f',
@@ -19934,7 +19936,7 @@ ix86_expand_vec_perm (rtx operands[])
t1 = gen_reg_rtx (V8SImode);
t2 = gen_reg_rtx (V8SImode);
emit_insn (gen_avx2_permvarv8si (t1, op0, mask));
- emit_insn (gen_avx2_permvarv8si (t2, op0, mask));
+ emit_insn (gen_avx2_permvarv8si (t2, op1, mask));
goto merge_two;
}
return;
@@ -19967,10 +19969,10 @@ ix86_expand_vec_perm (rtx operands[])
case V4SFmode:
t1 = gen_reg_rtx (V8SFmode);
- t2 = gen_reg_rtx (V8SFmode);
- mask = gen_lowpart (V4SFmode, mask);
+ t2 = gen_reg_rtx (V8SImode);
+ mask = gen_lowpart (V4SImode, mask);
emit_insn (gen_avx_vec_concatv8sf (t1, op0, op1));
- emit_insn (gen_avx_vec_concatv8sf (t2, mask, mask));
+ emit_insn (gen_avx_vec_concatv8si (t2, mask, mask));
emit_insn (gen_avx2_permvarv8sf (t1, t1, t2));
emit_insn (gen_avx_vextractf128v8sf (target, t1, const0_rtx));
return;
@@ -33122,7 +33124,7 @@ ix86_count_insn (basic_block bb)
return min_prev_count;
}
-/* Pad short funtion to 4 instructions. */
+/* Pad short function to 4 instructions. */
static void
ix86_pad_short_function (void)
@@ -34420,7 +34422,7 @@ half:
}
else
{
- rtx mem = assign_stack_temp (mode, GET_MODE_SIZE (mode), false);
+ rtx mem = assign_stack_temp (mode, GET_MODE_SIZE (mode));
emit_move_insn (mem, target);
@@ -34637,7 +34639,7 @@ ix86_expand_vector_extract (bool mmx_ok, rtx target, rtx vec, int elt)
}
else
{
- rtx mem = assign_stack_temp (mode, GET_MODE_SIZE (mode), false);
+ rtx mem = assign_stack_temp (mode, GET_MODE_SIZE (mode));
emit_move_insn (mem, vec);
@@ -36487,12 +36489,6 @@ expand_vec_perm_pshufb (struct expand_vec_perm_d *d)
gen_rtvec_v (GET_MODE_NUNITS (vmode), rperm));
vperm = force_reg (vmode, vperm);
- if (vmode == V8SImode && d->vmode == V8SFmode)
- {
- vmode = V8SFmode;
- vperm = gen_lowpart (vmode, vperm);
- }
-
target = gen_lowpart (vmode, d->target);
op0 = gen_lowpart (vmode, d->op0);
if (d->one_operand_p)
@@ -36925,7 +36921,7 @@ expand_vec_perm_interleave2 (struct expand_vec_perm_d *d)
{
if (d->perm[0] / nelt2 == nonzero_halves[1])
{
- /* Attempt to increase the likelyhood that dfinal
+ /* Attempt to increase the likelihood that dfinal
shuffle will be intra-lane. */
char tmph = nonzero_halves[0];
nonzero_halves[0] = nonzero_halves[1];
@@ -39001,7 +38997,7 @@ fits_dispatch_window (rtx insn)
/* Make disp_cmp and disp_jcc get scheduled at the latest. These
instructions should be given the lowest priority in the
scheduling process in Haifa scheduler to make sure they will be
- scheduled in the same dispatch window as the refrence to them. */
+ scheduled in the same dispatch window as the reference to them. */
if (group == disp_jcc || group == disp_cmp)
return false;
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index 8fb5b40da73..e49ee2c74da 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -1585,13 +1585,13 @@ spill_xfmode_rfmode_operand (rtx in, int force, enum machine_mode mode)
&& GET_MODE (SUBREG_REG (in)) == TImode
&& GET_CODE (SUBREG_REG (in)) == REG)
{
- rtx memt = assign_stack_temp (TImode, 16, 0);
+ rtx memt = assign_stack_temp (TImode, 16);
emit_move_insn (memt, SUBREG_REG (in));
return adjust_address (memt, mode, 0);
}
else if (force && GET_CODE (in) == REG)
{
- rtx memx = assign_stack_temp (mode, 16, 0);
+ rtx memx = assign_stack_temp (mode, 16);
emit_move_insn (memx, in);
return memx;
}
@@ -1716,7 +1716,7 @@ ia64_expand_movxf_movrf (enum machine_mode mode, rtx operands[])
memt = adjust_address (in, TImode, 0);
else
{
- memt = assign_stack_temp (TImode, 16, 0);
+ memt = assign_stack_temp (TImode, 16);
memx = adjust_address (memt, mode, 0);
emit_move_insn (memx, in);
}
@@ -3454,7 +3454,7 @@ output_probe_stack_range (rtx reg1, rtx reg2)
Also any insns generated here should have RTX_FRAME_RELATED_P(insn) = 1
so that the debug info generation code can handle them properly.
- The register save area is layed out like so:
+ The register save area is laid out like so:
cfa+16
[ varargs spill area ]
[ fr register spill area ]
diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c
index b27a3a5bb89..a2ae35ae75e 100644
--- a/gcc/config/m32r/m32r.c
+++ b/gcc/config/m32r/m32r.c
@@ -36,7 +36,6 @@
#include "recog.h"
#include "diagnostic-core.h"
#include "ggc.h"
-#include "integrate.h"
#include "df.h"
#include "tm_p.h"
#include "target.h"
diff --git a/gcc/config/m68k/cf.md b/gcc/config/m68k/cf.md
index d6f1e92c3c9..96519dc9e4d 100644
--- a/gcc/config/m68k/cf.md
+++ b/gcc/config/m68k/cf.md
@@ -52,7 +52,7 @@
(define_cpu_unit "cf_dsoc,cf_agex" "cfv123_oep")
-;; A memory unit that is reffered to as 'certain hardware resources' in
+;; A memory unit that is referred to as 'certain hardware resources' in
;; ColdFire reference manuals. This unit remains occupied for two cycles
;; after last dsoc cycle of a store - hence there is a 2 cycle delay between
;; two consecutive stores.
diff --git a/gcc/config/mep/mep.c b/gcc/config/mep/mep.c
index edfff549e2a..8e6cc4d1a8c 100644
--- a/gcc/config/mep/mep.c
+++ b/gcc/config/mep/mep.c
@@ -45,7 +45,6 @@ along with GCC; see the file COPYING3. If not see
#include "tm_p.h"
#include "ggc.h"
#include "diagnostic-core.h"
-#include "integrate.h"
#include "target.h"
#include "target-def.h"
#include "langhooks.h"
@@ -3869,7 +3868,7 @@ static int prev_opcode = 0;
/* This isn't as optimal as it could be, because we don't know what
control register the STC opcode is storing in. We only need to add
- the nop if it's the relevent register, but we add it for irrelevent
+ the nop if it's the relevant register, but we add it for irrelevant
registers also. */
void
@@ -6993,7 +6992,7 @@ core_insn_p (rtx insn)
}
/* Mark coprocessor instructions that can be bundled together with
- the immediately preceeding core instruction. This is later used
+ the immediately preceding core instruction. This is later used
to emit the "+" that tells the assembler to create a VLIW insn.
For unbundled insns, the assembler will automatically add coprocessor
diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
index b170606bc75..8d08bc282ff 100644
--- a/gcc/config/microblaze/microblaze.c
+++ b/gcc/config/microblaze/microblaze.c
@@ -31,7 +31,6 @@
#include "conditions.h"
#include "insn-flags.h"
#include "insn-attr.h"
-#include "integrate.h"
#include "recog.h"
#include "tree.h"
#include "function.h"
@@ -190,7 +189,7 @@ enum reg_class microblaze_regno_to_class[] =
/* MicroBlaze specific machine attributes.
interrupt_handler - Interrupt handler attribute to add interrupt prologue
and epilogue and use appropriate interrupt return.
- save_volatiles - Similiar to interrupt handler, but use normal return. */
+ save_volatiles - Similar to interrupt handler, but use normal return. */
int interrupt_handler;
int save_volatiles;
diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
index 92f0f60f1ff..d17d8948335 100644
--- a/gcc/config/microblaze/microblaze.h
+++ b/gcc/config/microblaze/microblaze.h
@@ -546,7 +546,7 @@ typedef struct microblaze_args
#define FUNCTION_MODE SImode
-/* Mode should alwasy be SImode */
+/* Mode should always be SImode */
#define REGISTER_MOVE_COST(MODE, FROM, TO) \
( GR_REG_CLASS_P (FROM) && GR_REG_CLASS_P (TO) ? 2 \
: (FROM) == ST_REGS && GR_REG_CLASS_P (TO) ? 4 \
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 2e6c3001178..122bc98efa0 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -50,7 +50,6 @@ along with GCC; see the file COPYING3. If not see
#include "debug.h"
#include "target.h"
#include "target-def.h"
-#include "integrate.h"
#include "langhooks.h"
#include "cfglayout.h"
#include "sched-int.h"
@@ -17201,7 +17200,7 @@ static void
mips_expand_vi_general (enum machine_mode vmode, enum machine_mode imode,
unsigned nelt, unsigned nvar, rtx target, rtx vals)
{
- rtx mem = assign_stack_temp (vmode, GET_MODE_SIZE (vmode), 0);
+ rtx mem = assign_stack_temp (vmode, GET_MODE_SIZE (vmode));
unsigned int i, isize = GET_MODE_SIZE (imode);
if (nvar < nelt)
diff --git a/gcc/config/mmix/mmix.c b/gcc/config/mmix/mmix.c
index 8f801e6c7ca..3a99cb626af 100644
--- a/gcc/config/mmix/mmix.c
+++ b/gcc/config/mmix/mmix.c
@@ -41,7 +41,6 @@ along with GCC; see the file COPYING3. If not see
#include "dwarf2.h"
#include "debug.h"
#include "tm_p.h"
-#include "integrate.h"
#include "target.h"
#include "target-def.h"
#include "df.h"
diff --git a/gcc/config/mmix/mmix.md b/gcc/config/mmix/mmix.md
index dbd4c0f778d..1cd397a8a14 100644
--- a/gcc/config/mmix/mmix.md
+++ b/gcc/config/mmix/mmix.md
@@ -529,7 +529,7 @@ DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\;CSNN %0,$255,%2")
better way. */
stack_slot
= validize_mem (assign_stack_temp (SFmode,
- GET_MODE_SIZE (SFmode), 0));
+ GET_MODE_SIZE (SFmode)));
emit_insn (gen_floatdisf2 (stack_slot, operands[1]));
emit_move_insn (operands[0], stack_slot);
DONE;
@@ -563,7 +563,7 @@ DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\;CSNN %0,$255,%2")
way. */
stack_slot
= validize_mem (assign_stack_temp (SFmode,
- GET_MODE_SIZE (SFmode), 0));
+ GET_MODE_SIZE (SFmode)));
emit_insn (gen_floatunsdisf2 (stack_slot, operands[1]));
emit_move_insn (operands[0], stack_slot);
DONE;
@@ -645,7 +645,7 @@ DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\;CSNN %0,$255,%2")
way. */
stack_slot
= validize_mem (assign_stack_temp (SFmode,
- GET_MODE_SIZE (SFmode), 0));
+ GET_MODE_SIZE (SFmode)));
emit_insn (gen_truncdfsf2 (stack_slot, operands[1]));
emit_move_insn (operands[0], stack_slot);
DONE;
@@ -678,7 +678,7 @@ DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\;CSNN %0,$255,%2")
better way. */
stack_slot
= validize_mem (assign_stack_temp (SFmode,
- GET_MODE_SIZE (SFmode), 0));
+ GET_MODE_SIZE (SFmode)));
emit_move_insn (stack_slot, operands[1]);
emit_insn (gen_extendsfdf2 (operands[0], stack_slot));
DONE;
diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c
index 1554f94644c..5b9f0699469 100644
--- a/gcc/config/mn10300/mn10300.c
+++ b/gcc/config/mn10300/mn10300.c
@@ -2762,7 +2762,7 @@ mn10300_adjust_sched_cost (rtx insn, rtx link, rtx dep, int cost)
Chapter 3 of the MN103E Series Instruction Manual
where it says:
- "When the preceeding instruction is a CPU load or
+ "When the preceding instruction is a CPU load or
store instruction, a following FPU instruction
cannot be executed until the CPU completes the
latency period even though there are no register
@@ -2788,7 +2788,7 @@ mn10300_adjust_sched_cost (rtx insn, rtx link, rtx dep, int cost)
return cost;
/* XXX: Verify: The text of 1-7-4 implies that the restriction
- only applies when an INTEGER load/store preceeds an FPU
+ only applies when an INTEGER load/store precedes an FPU
instruction, but is this true ? For now we assume that it is. */
if (GET_MODE_CLASS (GET_MODE (SET_SRC (PATTERN (insn)))) != MODE_INT)
return cost;
diff --git a/gcc/config/mn10300/mn10300.md b/gcc/config/mn10300/mn10300.md
index 91378a79345..a1cbc7a9fd4 100644
--- a/gcc/config/mn10300/mn10300.md
+++ b/gcc/config/mn10300/mn10300.md
@@ -999,7 +999,7 @@
;; ??? Note that AM33 has a third multiply variant that puts the high part
;; into the MDRQ register, however this variant also constrains the inputs
;; to be in DATA_REGS and thus isn't as helpful as it might be considering
-;; the existance of the 4-operand multiply. Nor is there a set of divide
+;; the existence of the 4-operand multiply. Nor is there a set of divide
;; insns that use MDRQ. Given that there is an IMM->MDRQ insn, this would
;; have been very handy for starting udivmodsi4...
@@ -1808,7 +1808,7 @@
)
;; ----------------------------------------------------------------------
-;; MISCELANEOUS
+;; MISCELLANEOUS
;; ----------------------------------------------------------------------
;; Note the use of the (const_int 0) when generating the insn that matches
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 56c889db88c..02c00ba6a78 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -37,7 +37,6 @@ along with GCC; see the file COPYING3. If not see
#include "expr.h"
#include "optabs.h"
#include "reload.h"
-#include "integrate.h"
#include "function.h"
#include "diagnostic-core.h"
#include "ggc.h"
@@ -188,6 +187,7 @@ static enum machine_mode pa_c_mode_for_suffix (char);
static section *pa_function_section (tree, enum node_frequency, bool, bool);
static bool pa_cannot_force_const_mem (enum machine_mode, rtx);
static bool pa_legitimate_constant_p (enum machine_mode, rtx);
+static unsigned int pa_section_type_flags (tree, const char *, int);
/* The following extra sections are only used for SOM. */
static GTY(()) section *som_readonly_data_section;
@@ -383,6 +383,8 @@ static size_t n_deferred_plabels = 0;
#undef TARGET_LEGITIMATE_CONSTANT_P
#define TARGET_LEGITIMATE_CONSTANT_P pa_legitimate_constant_p
+#undef TARGET_SECTION_TYPE_FLAGS
+#define TARGET_SECTION_TYPE_FLAGS pa_section_type_flags
struct gcc_target targetm = TARGET_INITIALIZER;
@@ -5939,7 +5941,7 @@ pa_secondary_reload (bool in_p, rtx x, reg_class_t rclass_i,
}
/* Request a secondary reload with a general scratch register
- for everthing else. ??? Could symbolic operands be handled
+ for everything else. ??? Could symbolic operands be handled
directly when generating non-pic PA 2.0 code? */
sri->icode = (in_p
? direct_optab_handler (reload_in_optab, mode)
@@ -10340,7 +10342,29 @@ pa_legitimate_constant_p (enum machine_mode mode, rtx x)
&& !pa_cint_ok_for_move (INTVAL (x)))
return false;
+ if (function_label_operand (x, mode))
+ return false;
+
return true;
}
+/* Implement TARGET_SECTION_TYPE_FLAGS. */
+
+static unsigned int
+pa_section_type_flags (tree decl, const char *name, int reloc)
+{
+ unsigned int flags;
+
+ flags = default_section_type_flags (decl, name, reloc);
+
+ /* Function labels are placed in the constant pool. This can
+ cause a section conflict if decls are put in ".data.rel.ro"
+ or ".data.rel.ro.local" using the __attribute__ construct. */
+ if (strcmp (name, ".data.rel.ro") == 0
+ || strcmp (name, ".data.rel.ro.local") == 0)
+ flags |= SECTION_WRITE | SECTION_RELRO;
+
+ return flags;
+}
+
#include "gt-pa.h"
diff --git a/gcc/config/picochip/picochip.c b/gcc/config/picochip/picochip.c
index 57cbd157f41..2beddce8cc9 100644
--- a/gcc/config/picochip/picochip.c
+++ b/gcc/config/picochip/picochip.c
@@ -40,7 +40,6 @@ along with GCC; see the file COPYING3. If not, see
#include "function.h"
#include "output.h"
#include "basic-block.h"
-#include "integrate.h"
#include "diagnostic-core.h"
#include "ggc.h"
#include "hashtab.h"
diff --git a/gcc/config/picochip/picochip.h b/gcc/config/picochip/picochip.h
index abe6d6432b5..9eb7df94c01 100644
--- a/gcc/config/picochip/picochip.h
+++ b/gcc/config/picochip/picochip.h
@@ -221,7 +221,7 @@ extern enum picochip_dfa_type picochip_schedule_type;
#define CALL_USED_REGISTERS {1,1,1,1,1,1,0,0, 0,0,0,0,1,1,0,1, 1,1,1,1}
#define CALL_REALLY_USED_REGISTERS {1,1,1,1,1,1,0,0, 0,0,0,0,1,1,0,0, 0,1,0,0}
-/* Define the number of the picoChip link and condition psuedo registers. */
+/* Define the number of the picoChip link and condition pseudo registers. */
#define LINK_REGNUM 12
#define CC_REGNUM 17
#define ACC_REGNUM 16
diff --git a/gcc/config/rs6000/a2.md b/gcc/config/rs6000/a2.md
index 851d8949ff7..79fdf913de1 100644
--- a/gcc/config/rs6000/a2.md
+++ b/gcc/config/rs6000/a2.md
@@ -25,7 +25,7 @@
;; The multiplier pipeline.
(define_cpu_unit "mult" "ppca2")
-;; The auxillary processor unit (FP/vector unit).
+;; The auxiliary processor unit (FP/vector unit).
(define_cpu_unit "axu" "ppca2")
;; D.4.6
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index db6597edd36..f6cef090f1e 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -41,7 +41,6 @@
#include "function.h"
#include "output.h"
#include "basic-block.h"
-#include "integrate.h"
#include "diagnostic-core.h"
#include "toplev.h"
#include "ggc.h"
@@ -936,9 +935,8 @@ static int rs6000_debug_adjust_cost (rtx, rtx, rtx, int);
static bool is_microcoded_insn (rtx);
static bool is_nonpipeline_insn (rtx);
static bool is_cracked_insn (rtx);
-static bool is_load_insn (rtx);
-static rtx get_store_dest (rtx pat);
-static bool is_store_insn (rtx);
+static bool is_load_insn (rtx, rtx *);
+static bool is_store_insn (rtx, rtx *);
static bool set_to_load_agen (rtx,rtx);
static bool insn_terminates_group_p (rtx , enum group_termination);
static bool insn_must_be_first_in_group (rtx);
@@ -2078,7 +2076,7 @@ rs6000_init_hard_regno_mode_ok (bool global_init_p)
/* TODO add SPE and paired floating point vector support. */
- /* Register class constaints for the constraints that depend on compile
+ /* Register class constraints for the constraints that depend on compile
switches. */
if (TARGET_HARD_FLOAT && TARGET_FPRS)
rs6000_constraints[RS6000_CONSTRAINT_f] = FLOAT_REGS;
@@ -2329,7 +2327,7 @@ darwin_rs6000_override_options (void)
/* Unless the user (not the configurer) has explicitly overridden
it with -mcpu=G3 or -mno-altivec, then 10.5+ targets default to
- G4 unless targetting the kernel. */
+ G4 unless targeting the kernel. */
if (!flag_mkernel
&& !flag_apple_kext
&& strverscmp (darwin_macosx_version_min, "10.5") >= 0
@@ -2831,7 +2829,7 @@ rs6000_option_override_internal (bool global_init_p)
/* Handle -msched-costly-dep option. */
rs6000_sched_costly_dep
- = (rs6000_sched_groups ? store_to_load_dep_costly : no_dep_costly);
+ = (rs6000_sched_groups ? true_store_to_load_dep_costly : no_dep_costly);
if (rs6000_sched_costly_dep_str)
{
@@ -4577,7 +4575,7 @@ rs6000_expand_vector_init (rtx target, rtx vals)
of 64-bit items is not supported on Altivec. */
if (all_same && GET_MODE_SIZE (inner_mode) <= 4)
{
- mem = assign_stack_temp (mode, GET_MODE_SIZE (inner_mode), 0);
+ mem = assign_stack_temp (mode, GET_MODE_SIZE (inner_mode));
emit_move_insn (adjust_address_nv (mem, inner_mode, 0),
XVECEXP (vals, 0, 0));
x = gen_rtx_UNSPEC (VOIDmode,
@@ -4613,7 +4611,7 @@ rs6000_expand_vector_init (rtx target, rtx vals)
/* Construct the vector in memory one field at a time
and load the whole vector. */
- mem = assign_stack_temp (mode, GET_MODE_SIZE (mode), 0);
+ mem = assign_stack_temp (mode, GET_MODE_SIZE (mode));
for (i = 0; i < n_elts; i++)
emit_move_insn (adjust_address_nv (mem, inner_mode,
i * GET_MODE_SIZE (inner_mode)),
@@ -4642,7 +4640,7 @@ rs6000_expand_vector_set (rtx target, rtx val, int elt)
}
/* Load single variable value. */
- mem = assign_stack_temp (mode, GET_MODE_SIZE (inner_mode), 0);
+ mem = assign_stack_temp (mode, GET_MODE_SIZE (inner_mode));
emit_move_insn (adjust_address_nv (mem, inner_mode, 0), val);
x = gen_rtx_UNSPEC (VOIDmode,
gen_rtvec (1, const0_rtx), UNSPEC_LVE);
@@ -4697,7 +4695,7 @@ rs6000_expand_vector_extract (rtx target, rtx vec, int elt)
}
/* Allocate mode-sized buffer. */
- mem = assign_stack_temp (mode, GET_MODE_SIZE (mode), 0);
+ mem = assign_stack_temp (mode, GET_MODE_SIZE (mode));
emit_move_insn (mem, vec);
@@ -22786,49 +22784,78 @@ set_to_load_agen (rtx out_insn, rtx in_insn)
return false;
}
-/* The function returns true if the target storage location of
- out_insn is adjacent to the target storage location of in_insn */
-/* Return 1 if memory locations are adjacent. */
+/* Try to determine base/offset/size parts of the given MEM.
+ Return true if successful, false if all the values couldn't
+ be determined.
+
+ This function only looks for REG or REG+CONST address forms.
+ REG+REG address form will return false. */
static bool
-adjacent_mem_locations (rtx insn1, rtx insn2)
+get_memref_parts (rtx mem, rtx *base, HOST_WIDE_INT *offset,
+ HOST_WIDE_INT *size)
{
+ rtx addr_rtx;
+ if MEM_SIZE_KNOWN_P (mem)
+ *size = MEM_SIZE (mem);
+ else
+ return false;
- rtx a = get_store_dest (PATTERN (insn1));
- rtx b = get_store_dest (PATTERN (insn2));
+ if (GET_CODE (XEXP (mem, 0)) == PRE_MODIFY)
+ addr_rtx = XEXP (XEXP (mem, 0), 1);
+ else
+ addr_rtx = (XEXP (mem, 0));
- if ((GET_CODE (XEXP (a, 0)) == REG
- || (GET_CODE (XEXP (a, 0)) == PLUS
- && GET_CODE (XEXP (XEXP (a, 0), 1)) == CONST_INT))
- && (GET_CODE (XEXP (b, 0)) == REG
- || (GET_CODE (XEXP (b, 0)) == PLUS
- && GET_CODE (XEXP (XEXP (b, 0), 1)) == CONST_INT)))
+ if (GET_CODE (addr_rtx) == REG)
+ {
+ *base = addr_rtx;
+ *offset = 0;
+ }
+ else if (GET_CODE (addr_rtx) == PLUS
+ && CONST_INT_P (XEXP (addr_rtx, 1)))
{
- HOST_WIDE_INT val0 = 0, val1 = 0, val_diff;
- rtx reg0, reg1;
+ *base = XEXP (addr_rtx, 0);
+ *offset = INTVAL (XEXP (addr_rtx, 1));
+ }
+ else
+ return false;
- if (GET_CODE (XEXP (a, 0)) == PLUS)
- {
- reg0 = XEXP (XEXP (a, 0), 0);
- val0 = INTVAL (XEXP (XEXP (a, 0), 1));
- }
- else
- reg0 = XEXP (a, 0);
+ return true;
+}
- if (GET_CODE (XEXP (b, 0)) == PLUS)
- {
- reg1 = XEXP (XEXP (b, 0), 0);
- val1 = INTVAL (XEXP (XEXP (b, 0), 1));
- }
- else
- reg1 = XEXP (b, 0);
+/* The function returns true if the target storage location of
+ mem1 is adjacent to the target storage location of mem2 */
+/* Return 1 if memory locations are adjacent. */
- val_diff = val1 - val0;
+static bool
+adjacent_mem_locations (rtx mem1, rtx mem2)
+{
+ rtx reg1, reg2;
+ HOST_WIDE_INT off1, size1, off2, size2;
- return ((REGNO (reg0) == REGNO (reg1))
- && ((MEM_SIZE_KNOWN_P (a) && val_diff == MEM_SIZE (a))
- || (MEM_SIZE_KNOWN_P (b) && val_diff == -MEM_SIZE (b))));
- }
+ if (get_memref_parts (mem1, &reg1, &off1, &size1)
+ && get_memref_parts (mem2, &reg2, &off2, &size2))
+ return ((REGNO (reg1) == REGNO (reg2))
+ && ((off1 + size1 == off2)
+ || (off2 + size2 == off1)));
+
+ return false;
+}
+
+/* This function returns true if it can be determined that the two MEM
+ locations overlap by at least 1 byte based on base reg/offset/size. */
+
+static bool
+mem_locations_overlap (rtx mem1, rtx mem2)
+{
+ rtx reg1, reg2;
+ HOST_WIDE_INT off1, size1, off2, size2;
+
+ if (get_memref_parts (mem1, &reg1, &off1, &size1)
+ && get_memref_parts (mem2, &reg2, &off2, &size2))
+ return ((REGNO (reg1) == REGNO (reg2))
+ && (((off1 <= off2) && (off1 + size1 > off2))
+ || ((off2 <= off1) && (off2 + size2 > off1))));
return false;
}
@@ -22842,6 +22869,7 @@ adjacent_mem_locations (rtx insn1, rtx insn2)
static int
rs6000_adjust_priority (rtx insn ATTRIBUTE_UNUSED, int priority)
{
+ rtx load_mem, str_mem;
/* On machines (like the 750) which have asymmetric integer units,
where one integer unit can do multiply and divides and the other
can't, reduce the priority of multiply/divide so it is scheduled
@@ -22893,8 +22921,8 @@ rs6000_adjust_priority (rtx insn ATTRIBUTE_UNUSED, int priority)
}
if (rs6000_cpu == PROCESSOR_POWER6
- && ((load_store_pendulum == -2 && is_load_insn (insn))
- || (load_store_pendulum == 2 && is_store_insn (insn))))
+ && ((load_store_pendulum == -2 && is_load_insn (insn, &load_mem))
+ || (load_store_pendulum == 2 && is_store_insn (insn, &str_mem))))
/* Attach highest priority to insn if the scheduler has just issued two
stores and this instruction is a load, or two loads and this instruction
is a store. Power6 wants loads and stores scheduled alternately
@@ -23019,54 +23047,63 @@ rs6000_use_sched_lookahead_guard (rtx insn)
return 1;
}
-/* Determine is PAT refers to memory. */
+/* Determine if PAT refers to memory. If so, set MEM_REF to the MEM rtx
+ and return true. */
static bool
-is_mem_ref (rtx pat)
+find_mem_ref (rtx pat, rtx *mem_ref)
{
const char * fmt;
int i, j;
- bool ret = false;
/* stack_tie does not produce any real memory traffic. */
if (tie_operand (pat, VOIDmode))
return false;
if (GET_CODE (pat) == MEM)
- return true;
+ {
+ *mem_ref = pat;
+ return true;
+ }
/* Recursively process the pattern. */
fmt = GET_RTX_FORMAT (GET_CODE (pat));
- for (i = GET_RTX_LENGTH (GET_CODE (pat)) - 1; i >= 0 && !ret; i--)
+ for (i = GET_RTX_LENGTH (GET_CODE (pat)) - 1; i >= 0; i--)
{
if (fmt[i] == 'e')
- ret |= is_mem_ref (XEXP (pat, i));
+ {
+ if (find_mem_ref (XEXP (pat, i), mem_ref))
+ return true;
+ }
else if (fmt[i] == 'E')
for (j = XVECLEN (pat, i) - 1; j >= 0; j--)
- ret |= is_mem_ref (XVECEXP (pat, i, j));
+ {
+ if (find_mem_ref (XVECEXP (pat, i, j), mem_ref))
+ return true;
+ }
}
- return ret;
+ return false;
}
/* Determine if PAT is a PATTERN of a load insn. */
static bool
-is_load_insn1 (rtx pat)
+is_load_insn1 (rtx pat, rtx *load_mem)
{
if (!pat || pat == NULL_RTX)
return false;
if (GET_CODE (pat) == SET)
- return is_mem_ref (SET_SRC (pat));
+ return find_mem_ref (SET_SRC (pat), load_mem);
if (GET_CODE (pat) == PARALLEL)
{
int i;
for (i = 0; i < XVECLEN (pat, 0); i++)
- if (is_load_insn1 (XVECEXP (pat, 0, i)))
+ if (is_load_insn1 (XVECEXP (pat, 0, i), load_mem))
return true;
}
@@ -23076,7 +23113,7 @@ is_load_insn1 (rtx pat)
/* Determine if INSN loads from memory. */
static bool
-is_load_insn (rtx insn)
+is_load_insn (rtx insn, rtx *load_mem)
{
if (!insn || !INSN_P (insn))
return false;
@@ -23084,26 +23121,26 @@ is_load_insn (rtx insn)
if (GET_CODE (insn) == CALL_INSN)
return false;
- return is_load_insn1 (PATTERN (insn));
+ return is_load_insn1 (PATTERN (insn), load_mem);
}
/* Determine if PAT is a PATTERN of a store insn. */
static bool
-is_store_insn1 (rtx pat)
+is_store_insn1 (rtx pat, rtx *str_mem)
{
if (!pat || pat == NULL_RTX)
return false;
if (GET_CODE (pat) == SET)
- return is_mem_ref (SET_DEST (pat));
+ return find_mem_ref (SET_DEST (pat), str_mem);
if (GET_CODE (pat) == PARALLEL)
{
int i;
for (i = 0; i < XVECLEN (pat, 0); i++)
- if (is_store_insn1 (XVECEXP (pat, 0, i)))
+ if (is_store_insn1 (XVECEXP (pat, 0, i), str_mem))
return true;
}
@@ -23113,38 +23150,12 @@ is_store_insn1 (rtx pat)
/* Determine if INSN stores to memory. */
static bool
-is_store_insn (rtx insn)
+is_store_insn (rtx insn, rtx *str_mem)
{
if (!insn || !INSN_P (insn))
return false;
- return is_store_insn1 (PATTERN (insn));
-}
-
-/* Return the dest of a store insn. */
-
-static rtx
-get_store_dest (rtx pat)
-{
- gcc_assert (is_store_insn1 (pat));
-
- if (GET_CODE (pat) == SET)
- return SET_DEST (pat);
- else if (GET_CODE (pat) == PARALLEL)
- {
- int i;
-
- for (i = 0; i < XVECLEN (pat, 0); i++)
- {
- rtx inner_pat = XVECEXP (pat, 0, i);
- if (GET_CODE (inner_pat) == SET
- && is_mem_ref (SET_DEST (inner_pat)))
- return inner_pat;
- }
- }
- /* We shouldn't get here, because we should have either a simple
- store insn or a store with update which are covered above. */
- gcc_unreachable();
+ return is_store_insn1 (PATTERN (insn), str_mem);
}
/* Returns whether the dependence between INSN and NEXT is considered
@@ -23155,6 +23166,7 @@ rs6000_is_costly_dependence (dep_t dep, int cost, int distance)
{
rtx insn;
rtx next;
+ rtx load_mem, str_mem;
/* If the flag is not enabled - no dependence is considered costly;
allow all dependent insns in the same group.
@@ -23172,15 +23184,16 @@ rs6000_is_costly_dependence (dep_t dep, int cost, int distance)
next = DEP_CON (dep);
if (rs6000_sched_costly_dep == store_to_load_dep_costly
- && is_load_insn (next)
- && is_store_insn (insn))
+ && is_load_insn (next, &load_mem)
+ && is_store_insn (insn, &str_mem))
/* Prevent load after store in the same group. */
return true;
if (rs6000_sched_costly_dep == true_store_to_load_dep_costly
- && is_load_insn (next)
- && is_store_insn (insn)
- && DEP_TYPE (dep) == REG_DEP_TRUE)
+ && is_load_insn (next, &load_mem)
+ && is_store_insn (insn, &str_mem)
+ && DEP_TYPE (dep) == REG_DEP_TRUE
+ && mem_locations_overlap(str_mem, load_mem))
/* Prevent load after store in the same group if it is a true
dependence. */
return true;
@@ -23307,12 +23320,12 @@ rs6000_sched_reorder2 (FILE *dump, int sched_verbose, rtx *ready,
{
int pos;
int i;
- rtx tmp;
+ rtx tmp, load_mem, str_mem;
- if (is_store_insn (last_scheduled_insn))
+ if (is_store_insn (last_scheduled_insn, &str_mem))
/* Issuing a store, swing the load_store_pendulum to the left */
load_store_pendulum--;
- else if (is_load_insn (last_scheduled_insn))
+ else if (is_load_insn (last_scheduled_insn, &load_mem))
/* Issuing a load, swing the load_store_pendulum to the right */
load_store_pendulum++;
else
@@ -23331,7 +23344,7 @@ rs6000_sched_reorder2 (FILE *dump, int sched_verbose, rtx *ready,
while (pos >= 0)
{
- if (is_load_insn (ready[pos]))
+ if (is_load_insn (ready[pos], &load_mem))
{
/* Found a load. Move it to the head of the ready list,
and adjust it's priority so that it is more likely to
@@ -23357,7 +23370,7 @@ rs6000_sched_reorder2 (FILE *dump, int sched_verbose, rtx *ready,
while (pos >= 0)
{
- if (is_load_insn (ready[pos])
+ if (is_load_insn (ready[pos], &load_mem)
&& !sel_sched_p ()
&& INSN_PRIORITY_KNOWN (ready[pos]))
{
@@ -23384,15 +23397,16 @@ rs6000_sched_reorder2 (FILE *dump, int sched_verbose, rtx *ready,
while (pos >= 0)
{
- if (is_store_insn (ready[pos]))
+ if (is_store_insn (ready[pos], &str_mem))
{
+ rtx str_mem2;
/* Maintain the index of the first store found on the
list */
if (first_store_pos == -1)
first_store_pos = pos;
- if (is_store_insn (last_scheduled_insn)
- && adjacent_mem_locations (last_scheduled_insn,ready[pos]))
+ if (is_store_insn (last_scheduled_insn, &str_mem2)
+ && adjacent_mem_locations (str_mem, str_mem2))
{
/* Found an adjacent store. Move it to the head of the
ready list, and adjust it's priority so that it is
@@ -23436,7 +23450,7 @@ rs6000_sched_reorder2 (FILE *dump, int sched_verbose, rtx *ready,
while (pos >= 0)
{
- if (is_store_insn (ready[pos])
+ if (is_store_insn (ready[pos], &str_mem)
&& !sel_sched_p ()
&& INSN_PRIORITY_KNOWN (ready[pos]))
{
@@ -23720,7 +23734,7 @@ is_costly_group (rtx *group_insns, rtx next_insn)
if (!insn)
continue;
- FOR_EACH_DEP (insn, SD_LIST_FORW, sd_it, dep)
+ FOR_EACH_DEP (insn, SD_LIST_RES_FORW, sd_it, dep)
{
rtx next = DEP_CON (dep);
@@ -23784,12 +23798,20 @@ force_new_group (int sched_verbose, FILE *dump, rtx *group_insns,
if (can_issue_more && !is_branch_slot_insn (next_insn))
can_issue_more--;
- while (can_issue_more > 0)
+ /* Power6 and Power7 have special group ending nop. */
+ if (rs6000_cpu_attr == CPU_POWER6 || rs6000_cpu_attr == CPU_POWER7)
{
- nop = gen_nop ();
+ nop = gen_group_ending_nop ();
emit_insn_before (nop, next_insn);
- can_issue_more--;
+ can_issue_more = 0;
}
+ else
+ while (can_issue_more > 0)
+ {
+ nop = gen_nop ();
+ emit_insn_before (nop, next_insn);
+ can_issue_more--;
+ }
*group_end = true;
return 0;
@@ -27789,7 +27811,7 @@ rs6000_allocate_stack_temp (enum machine_mode mode,
bool offsettable_p,
bool reg_reg_p)
{
- rtx stack = assign_stack_temp (mode, GET_MODE_SIZE (mode), 0);
+ rtx stack = assign_stack_temp (mode, GET_MODE_SIZE (mode));
rtx addr = XEXP (stack, 0);
int strict_p = (reload_in_progress || reload_completed);
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index e852c3e5306..ba4acb69de7 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -126,6 +126,7 @@
UNSPEC_LFIWAX
UNSPEC_LFIWZX
UNSPEC_FCTIWUZ
+ UNSPEC_GRP_END_NOP
])
;;
@@ -10037,7 +10038,7 @@
operands[2] = gen_reg_rtx (DFmode);
operands[3] = gen_reg_rtx (DFmode);
operands[4] = gen_reg_rtx (DImode);
- operands[5] = assign_stack_temp (DImode, GET_MODE_SIZE (DImode), 0);
+ operands[5] = assign_stack_temp (DImode, GET_MODE_SIZE (DImode));
})
(define_insn_and_split "*fix_trunctfsi2_internal"
@@ -15594,6 +15595,16 @@
[(const_int 0)]
""
"{cror 0,0,0|nop}")
+
+(define_insn "group_ending_nop"
+ [(unspec [(const_int 0)] UNSPEC_GRP_END_NOP)]
+ ""
+ "*
+{
+ if (rs6000_cpu_attr == CPU_POWER6)
+ return \"ori 1,1,0\";
+ return \"ori 2,2,0\";
+}")
;; Define the subtract-one-and-jump insns, starting with the template
;; so loop.c knows what to generate.
diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64
index 6420431214d..fb1af5d8c46 100644
--- a/gcc/config/rs6000/t-linux64
+++ b/gcc/config/rs6000/t-linux64
@@ -26,10 +26,7 @@
# it doesn't tell anything about the 32bit libraries on those systems. Set
# MULTILIB_OSDIRNAMES according to what is found on the target.
-MULTILIB_OPTIONS = m64/m32 msoft-float
-MULTILIB_DIRNAMES = 64 32 nof
-MULTILIB_EXTRA_OPTS = fPIC mstrict-align
-MULTILIB_EXCEPTIONS = m64/msoft-float
-MULTILIB_EXCLUSIONS = m64/!m32/msoft-float
-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib) nof
-MULTILIB_MATCHES = $(MULTILIB_MATCHES_FLOAT)
+MULTILIB_OPTIONS = m64/m32
+MULTILIB_DIRNAMES = 64 32
+MULTILIB_EXTRA_OPTS = fPIC
+MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
diff --git a/gcc/config/rs6000/t-rs6000 b/gcc/config/rs6000/t-rs6000
index 5204f589d5d..3ca2732fabc 100644
--- a/gcc/config/rs6000/t-rs6000
+++ b/gcc/config/rs6000/t-rs6000
@@ -25,7 +25,7 @@ rs6000.o: $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(REGS_H) hard-reg-set.h \
real.h insn-config.h conditions.h insn-attr.h flags.h $(RECOG_H) \
$(OBSTACK_H) $(TREE_H) $(EXPR_H) $(OPTABS_H) except.h function.h \
- output.h $(BASIC_BLOCK_H) $(INTEGRATE_H) toplev.h $(GGC_H) $(HASHTAB_H) \
+ output.h $(BASIC_BLOCK_H) toplev.h $(GGC_H) $(HASHTAB_H) \
$(TM_P_H) $(TARGET_H) $(TARGET_DEF_H) langhooks.h reload.h gt-rs6000.h \
cfglayout.h cfgloop.h $(OPTS_H) $(COMMON_TARGET_H)
diff --git a/gcc/config/rs6000/vector.md b/gcc/config/rs6000/vector.md
index 6674054223b..87a52762a4d 100644
--- a/gcc/config/rs6000/vector.md
+++ b/gcc/config/rs6000/vector.md
@@ -172,7 +172,7 @@
-;; Reload patterns for vector operations. We may need an addtional base
+;; Reload patterns for vector operations. We may need an additional base
;; register to convert the reg+offset addressing to reg+reg for vector
;; registers and reg+reg or (reg+reg)&(-16) addressing to just an index
;; register for gpr registers.
diff --git a/gcc/config/rx/rx.md b/gcc/config/rx/rx.md
index 1ba603f4a6e..95ba051a486 100644
--- a/gcc/config/rx/rx.md
+++ b/gcc/config/rx/rx.md
@@ -408,7 +408,7 @@
;; Note - the following set of patterns do not use the "memory_operand"
;; predicate or an "m" constraint because we do not allow symbol_refs
-;; or label_refs as legitmate memory addresses. This matches the
+;; or label_refs as legitimate memory addresses. This matches the
;; behaviour of most of the RX instructions. Only the call/branch
;; instructions are allowed to refer to symbols/labels directly.
;; The call operands are in QImode because that is the value of
diff --git a/gcc/config/rx/rx.opt b/gcc/config/rx/rx.opt
index 308bf0c8ada..76c2f61c79b 100644
--- a/gcc/config/rx/rx.opt
+++ b/gcc/config/rx/rx.opt
@@ -87,7 +87,7 @@ Use the simulator runtime.
mas100-syntax
Target Mask(AS100_SYNTAX) Report
-Generate assembler output that is compatible with the Renesas AS100 assembler. This may restrict some of the compiler's capabilities. The default is to generate GAS compatable syntax.
+Generate assembler output that is compatible with the Renesas AS100 assembler. This may restrict some of the compiler's capabilities. The default is to generate GAS compatible syntax.
;---------------------------------------------------
diff --git a/gcc/config/s390/2097.md b/gcc/config/s390/2097.md
index 77c206ecdbc..333e1b26ff4 100644
--- a/gcc/config/s390/2097.md
+++ b/gcc/config/s390/2097.md
@@ -703,11 +703,11 @@
; Declaration for some pseudo-pipeline stages that reflect the
-; dispatch gap when issueing an INT/FXU/BFU-executed instruction after
+; dispatch gap when issuing an INT/FXU/BFU-executed instruction after
; an instruction executed by a different unit has been executed. The
; approach is that we pretend a pipelined execution of BFU operations
; with as many stages as the gap is long and request that none of
-; these stages is busy when issueing a FXU- or DFU-executed
+; these stages is busy when issuing a FXU- or DFU-executed
; instruction. Similar for FXU- and DFU-executed instructions.
; Declaration for FPU stages.
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index b338cd96136..bc0bf8a991a 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -42,7 +42,6 @@ along with GCC; see the file COPYING3. If not see
#include "reload.h"
#include "diagnostic-core.h"
#include "basic-block.h"
-#include "integrate.h"
#include "ggc.h"
#include "target.h"
#include "target-def.h"
@@ -9044,6 +9043,7 @@ s390_gimplify_va_arg (tree valist, tree type, gimple_seq *pre_p,
lab_false = create_artificial_label (UNKNOWN_LOCATION);
lab_over = create_artificial_label (UNKNOWN_LOCATION);
addr = create_tmp_var (ptr_type_node, "addr");
+ mark_sym_for_renaming (addr);
t = fold_convert (TREE_TYPE (reg), size_int (max_reg));
t = build2 (GT_EXPR, boolean_type_node, reg, t);
@@ -10533,7 +10533,7 @@ s390_z10_prevent_earlyload_conflicts (rtx *ready, int *nready_p)
}
/* This function is called via hook TARGET_SCHED_REORDER before
- issueing one insn from list READY which contains *NREADYP entries.
+ issuing one insn from list READY which contains *NREADYP entries.
For target z10 it reorders load instructions to avoid early load
conflicts in the floating point pipeline */
static int
diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h
index 99c09e8860e..f69b3174b00 100644
--- a/gcc/config/s390/s390.h
+++ b/gcc/config/s390/s390.h
@@ -762,7 +762,7 @@ do { \
/* This value is used in tree-sra to decide whether it might benefical
to split a struct move into several word-size moves. For S/390
only small values make sense here since struct moves are relatively
- cheap thanks to mvc so the small default value choosen for archs
+ cheap thanks to mvc so the small default value chosen for archs
with memmove patterns should be ok. But this value is multiplied
in tree-sra with UNITS_PER_WORD to make a decision so we adjust it
here to compensate for that factor since mvc costs exactly the same
diff --git a/gcc/config/score/score.c b/gcc/config/score/score.c
index 0af0fd50b82..9c68e19ed30 100644
--- a/gcc/config/score/score.c
+++ b/gcc/config/score/score.c
@@ -45,7 +45,6 @@
#include "debug.h"
#include "target.h"
#include "target-def.h"
-#include "integrate.h"
#include "langhooks.h"
#include "cfglayout.h"
#include "df.h"
diff --git a/gcc/config/sh/predicates.md b/gcc/config/sh/predicates.md
index c6d0d464f08..f75675ec096 100644
--- a/gcc/config/sh/predicates.md
+++ b/gcc/config/sh/predicates.md
@@ -879,3 +879,22 @@
}
return 0;
})
+
+;; The atomic_* operand predicates are used for the atomic patterns.
+;; Depending on the particular pattern some operands can be immediate
+;; values. Using these predicates avoids the usage of 'force_reg' in the
+;; expanders.
+(define_predicate "atomic_arith_operand"
+ (ior (match_code "subreg,reg")
+ (and (match_test "satisfies_constraint_I08 (op)")
+ (match_test "mode != QImode")
+ (match_test "mode != HImode")
+ (match_test "TARGET_SH4A_ARCH"))))
+
+(define_predicate "atomic_logical_operand"
+ (ior (match_code "subreg,reg")
+ (and (match_test "satisfies_constraint_K08 (op)")
+ (match_test "mode != QImode")
+ (match_test "mode != HImode")
+ (match_test "TARGET_SH4A_ARCH"))))
+
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 08ee5b436f5..20e67c63628 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -39,7 +39,6 @@ along with GCC; see the file COPYING3. If not see
#include "insn-attr.h"
#include "diagnostic-core.h"
#include "recog.h"
-#include "integrate.h"
#include "dwarf2.h"
#include "tm_p.h"
#include "target.h"
@@ -393,7 +392,7 @@ static const struct attribute_spec sh_attribute_table[] =
The insn that frees registers is most likely to be the insn with lowest
LUID (original insn order); but such an insn might be there in the stalled
queue (Q) instead of the ready queue (R). To solve this, we skip cycles
- upto a max of 8 cycles so that such insns may move from Q -> R.
+ up to a max of 8 cycles so that such insns may move from Q -> R.
The description of the hooks are as below:
@@ -877,12 +876,27 @@ sh_option_override (void)
align_functions = min_align;
}
+ /* Enable fmac insn for "a * b + c" SFmode calculations when -ffast-math
+ is enabled and -mno-fused-madd is not specified by the user.
+ The fmac insn can't be enabled by default due to the implied
+ FMA semantics. See also PR target/29100. */
+ if (global_options_set.x_TARGET_FMAC == 0 && flag_unsafe_math_optimizations)
+ TARGET_FMAC = 1;
+
if (sh_fixed_range_str)
sh_fix_range (sh_fixed_range_str);
/* This target defaults to strict volatile bitfields. */
if (flag_strict_volatile_bitfields < 0 && abi_version_at_least(2))
flag_strict_volatile_bitfields = 1;
+
+ /* Make sure that only one atomic mode is selected and that the selection
+ is valid for the current target CPU. */
+ if (TARGET_SOFT_ATOMIC && TARGET_HARD_ATOMIC)
+ error ("-msoft-atomic and -mhard-atomic cannot be used at the same time");
+ if (TARGET_HARD_ATOMIC && ! TARGET_SH4A_ARCH)
+ error ("-mhard-atomic is only available for SH4A targets");
+
}
/* Print the operand address in x to the stream. */
@@ -11478,7 +11492,7 @@ sh_expand_binop_v2sf (enum rtx_code code, rtx op0, rtx op1, rtx op2)
We could hold SFmode / SCmode values in XD registers, but that
would require a tertiary reload when reloading from / to memory,
and a secondary reload to reload from / to general regs; that
- seems to be a loosing proposition.
+ seems to be a losing proposition.
We want to allow TImode FP regs so that when V4SFmode is loaded as TImode,
it won't be ferried through GP registers first. */
diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h
index a6fac9484c2..b5f20f90558 100644
--- a/gcc/config/sh/sh.h
+++ b/gcc/config/sh/sh.h
@@ -172,6 +172,9 @@ do { \
(TARGET_SH1 && ! TARGET_SH2E && ! TARGET_SH5 \
&& ! (TARGET_HITACHI || sh_attr_renesas_p (FUN_DECL)))
+/* Nonzero if either soft or hard atomics are enabled. */
+#define TARGET_ANY_ATOMIC (TARGET_SOFT_ATOMIC | TARGET_HARD_ATOMIC)
+
#ifndef TARGET_CPU_DEFAULT
#define TARGET_CPU_DEFAULT SELECT_SH1
#define SUPPORT_SH1 1
@@ -433,7 +436,20 @@ do { \
"%{m2a*:%eSH2a does not support little-endian}}"
#endif
-#define DRIVER_SELF_SPECS UNSUPPORTED_SH2A
+#define UNSUPPORTED_ATOMIC_OPTIONS \
+"%{msoft-atomic:%{mhard-atomic:%e-msoft-atomic and -mhard-atomic cannot be \
+used at the same time}}"
+
+#if TARGET_CPU_DEFAULT & MASK_SH4A
+#define UNSUPPORTED_HARD_ATOMIC_CPU ""
+#else
+#define UNSUPPORTED_HARD_ATOMIC_CPU \
+"%{!m4a*:%{mhard-atomic:%e-mhard-atomic is only available for SH4A targets}}"
+#endif
+
+#undef DRIVER_SELF_SPECS
+#define DRIVER_SELF_SPECS UNSUPPORTED_SH2A, UNSUPPORTED_ATOMIC_OPTIONS,\
+ UNSUPPORTED_HARD_ATOMIC_CPU
#define ASSEMBLER_DIALECT assembler_dialect
diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md
index 7167b920641..99d4c625f23 100644
--- a/gcc/config/sh/sh.md
+++ b/gcc/config/sh/sh.md
@@ -577,7 +577,7 @@
(and (eq_attr "type" "cbranch")
(match_test "TARGET_SH2"))
;; SH2e has a hardware bug that pretty much prohibits the use of
- ;; annuled delay slots.
+ ;; annulled delay slots.
[(eq_attr "cond_delay_slot" "yes") (and (eq_attr "cond_delay_slot" "yes")
(not (eq_attr "cpu" "sh2e"))) (nil)])
@@ -631,7 +631,7 @@
[(set_attr "type" "mt_group")])
;; Test low QI subreg against zero.
-;; This avoids unecessary zero extension before the test.
+;; This avoids unnecessary zero extension before the test.
(define_insn "tstqi_t_zero"
[(set (reg:SI T_REG)
@@ -5470,7 +5470,7 @@ label:
;; selected to copy QImode regs. If one of them happens to be allocated
;; on the stack, reload will stick to movqi insn and generate wrong
;; displacement addressing because of the generic m alternatives.
-;; With the movqi_reg_reg being specified before movqi it will be intially
+;; With the movqi_reg_reg being specified before movqi it will be initially
;; picked to load/store regs. If the regs regs are on the stack reload will
;; try other insns and not stick to movqi_reg_reg.
;; The same applies to the movhi variants.
diff --git a/gcc/config/sh/sh.opt b/gcc/config/sh/sh.opt
index 3ab2c51be4a..6a78d04ed10 100644
--- a/gcc/config/sh/sh.opt
+++ b/gcc/config/sh/sh.opt
@@ -321,7 +321,11 @@ Follow Renesas (formerly Hitachi) / SuperH calling conventions
msoft-atomic
Target Report Var(TARGET_SOFT_ATOMIC)
-Use software atomic sequences supported by kernel
+Use gUSA software atomic sequences
+
+mhard-atomic
+Target Report Var(TARGET_HARD_ATOMIC)
+Use hardware atomic sequences
menable-tas
Target Report RejectNegative Var(TARGET_ENABLE_TAS)
diff --git a/gcc/config/sh/sync.md b/gcc/config/sh/sync.md
index 258e048f3c7..79cd765d87f 100644
--- a/gcc/config/sh/sync.md
+++ b/gcc/config/sh/sync.md
@@ -21,10 +21,42 @@
;;
;; Atomic integer operations for the Renesas / SuperH SH CPUs.
;;
+;; On SH CPUs atomic integer operations can be done either in 'software' or
+;; in 'hardware', where true hardware support was introduced with the SH4A.
+;; In addition to that all SH CPUs support the 'tas.b' instruction, which
+;; can be optionally used to implement the 'atomic_test_and_set' builtin.
+;;
+;; tas.b atomic_test_and_set (-menable-tas)
+;;
+;; Depending on the particular hardware configuration, usage of the 'tas.b'
+;; instruction might be undesired or even unsafe. Thus, it has to be
+;; enabled by the user explicitely. If it is not enabled, the
+;; 'atomic_test_and_set' builtin is implemented either with hardware or with
+;; software atomics, depending on which is enabled. It is also possible to
+;; enable the 'tas.b' instruction only, without enabling support for the
+;; other atomic operations.
+;;
+;;
+;; Hardware Atomics (-mhard-atomic, SH4A only)
+;;
+;; Hardware atomics implement all atomic operations using the 'movli.l' and
+;; 'movco.l' instructions that are availble on SH4A. On multi-core hardware
+;; configurations hardware atomics is the only safe mode.
+;; However, it can also be safely used on single-core configurations.
+;; Since these instructions operate on SImode memory only, QImode and HImode
+;; have to be emulated with SImode and subreg masking, which results in
+;; larger code.
+;;
+;;
+;; Software Atomics (-msoft-atomic)
+;;
;; On single-core systems there can only be one execution context running
;; at a given point in time. This allows the usage of rewindable atomic
;; sequences, which effectively emulate locked-load / conditional-store
-;; operations.
+;; operations. This requires complementary support in the interrupt /
+;; exception handling code (e.g. kernel) and does not work safely on multi-
+;; core configurations.
+;;
;; When an execution context is interrupted while it is an atomic
;; sequence, the interrupted context's PC is rewound to the beginning of
;; the atomic sequence by the interrupt / exception handling code, before
@@ -79,15 +111,16 @@
;; For correct operation the atomic sequences must not be rewound after
;; they have passed the write-back instruction.
;;
-;; The current implementation is limited to QImode, HImode and SImode
+;; The current atomic support is limited to QImode, HImode and SImode
;; atomic operations. DImode operations could also be implemented but
;; would require some ABI modifications to support multiple-instruction
;; write-back. This is because SH1/SH2/SH3/SH4 does not have a DImode
;; store instruction. DImode stores must be split into two SImode stores.
;;
-;; For some operations it would be possible to use insns with an immediate
-;; operand such as add #imm,Rn. However, since the original value before
-;; the operation also needs to be available, this is not so handy.
+;; On single-core SH4A CPUs software atomic aware interrupt / exception code
+;; is actually compatible with user code that utilizes hardware atomics.
+;; Since SImode hardware atomic sequences are more compact on SH4A they are
+;; always used, regardless of the selected atomic mode.
(define_c_enum "unspec" [
UNSPEC_ATOMIC
@@ -100,6 +133,7 @@
])
(define_mode_iterator I124 [QI HI SI])
+(define_mode_iterator I12 [QI HI])
(define_mode_attr i124suffix [(QI "b") (HI "w") (SI "l")])
(define_mode_attr i124extend_insn [(QI "exts.b") (HI "exts.w") (SI "mov")])
@@ -108,23 +142,42 @@
(define_code_attr fetchop_name
[(plus "add") (minus "sub") (ior "or") (xor "xor") (and "and")])
+(define_code_attr fetchop_predicate
+ [(plus "atomic_arith_operand") (minus "register_operand")
+ (ior "atomic_logical_operand") (xor "atomic_logical_operand")
+ (and "atomic_logical_operand")])
+
+(define_code_attr fetchop_constraint
+ [(plus "rI08") (minus "r") (ior "rK08") (xor "rK08") (and "rK08")])
+
+;;------------------------------------------------------------------------------
+;; comapre and swap
+
(define_expand "atomic_compare_and_swap<mode>"
[(match_operand:SI 0 "register_operand" "") ;; bool success output
(match_operand:I124 1 "register_operand" "") ;; oldval output
(match_operand:I124 2 "memory_operand" "") ;; memory
- (match_operand:I124 3 "register_operand" "") ;; expected input
- (match_operand:I124 4 "register_operand" "") ;; newval input
+ (match_operand:I124 3 "atomic_arith_operand" "") ;; expected input
+ (match_operand:I124 4 "atomic_arith_operand" "") ;; newval input
(match_operand:SI 5 "const_int_operand" "") ;; is_weak
(match_operand:SI 6 "const_int_operand" "") ;; success model
(match_operand:SI 7 "const_int_operand" "")] ;; failure model
- "TARGET_SOFT_ATOMIC && !TARGET_SHMEDIA"
+ "TARGET_ANY_ATOMIC && !TARGET_SHMEDIA"
{
- rtx addr;
+ rtx addr = force_reg (Pmode, XEXP (operands[2], 0));
+ rtx old_val = gen_lowpart (SImode, operands[1]);
+ rtx exp_val = operands[3];
+ rtx new_val = operands[4];
+ rtx atomic_insn;
+
+ if (TARGET_HARD_ATOMIC || (TARGET_SH4A_ARCH && <MODE>mode == SImode))
+ atomic_insn = gen_atomic_compare_and_swap<mode>_hard (old_val, addr,
+ exp_val, new_val);
+ else
+ atomic_insn = gen_atomic_compare_and_swap<mode>_soft (old_val, addr,
+ exp_val, new_val);
+ emit_insn (atomic_insn);
- addr = force_reg (Pmode, XEXP (operands[2], 0));
- emit_insn (gen_atomic_compare_and_swap<mode>_soft
- (gen_lowpart (SImode, operands[1]), addr, operands[3],
- operands[4]));
if (<MODE>mode == QImode)
emit_insn (gen_zero_extendqisi2 (gen_lowpart (SImode, operands[1]),
operands[1]));
@@ -135,6 +188,67 @@
DONE;
})
+(define_insn "atomic_compare_and_swapsi_hard"
+ [(set (match_operand:SI 0 "register_operand" "=&r")
+ (unspec_volatile:SI
+ [(mem:SI (match_operand:SI 1 "register_operand" "r"))
+ (match_operand:SI 2 "arith_operand" "rI08")
+ (match_operand:SI 3 "arith_operand" "rI08")]
+ UNSPECV_CMPXCHG_1))
+ (set (mem:SI (match_dup 1))
+ (unspec_volatile:SI [(const_int 0)] UNSPECV_CMPXCHG_2))
+ (set (reg:SI T_REG)
+ (unspec_volatile:SI [(const_int 0)] UNSPECV_CMPXCHG_3))
+ (clobber (reg:SI R0_REG))]
+ "TARGET_ANY_ATOMIC && TARGET_SH4A_ARCH"
+{
+ return "\r0: movli.l @%1,r0" "\n"
+ " cmp/eq %2,r0" "\n"
+ " bf{.|/}s 0f" "\n"
+ " mov r0,%0" "\n"
+ " mov %3,r0" "\n"
+ " movco.l r0,@%1" "\n"
+ " bf 0b" "\n"
+ "0:";
+}
+ [(set_attr "length" "14")])
+
+(define_insn "atomic_compare_and_swap<mode>_hard"
+ [(set (match_operand:SI 0 "register_operand" "=&r")
+ (unspec_volatile:SI
+ [(mem:I12 (match_operand:SI 1 "register_operand" "r"))
+ (match_operand:I12 2 "register_operand" "r")
+ (match_operand:I12 3 "register_operand" "r")]
+ UNSPECV_CMPXCHG_1))
+ (set (mem:I12 (match_dup 1))
+ (unspec_volatile:I12 [(const_int 0)] UNSPECV_CMPXCHG_2))
+ (set (reg:SI T_REG)
+ (unspec_volatile:SI [(const_int 0)] UNSPECV_CMPXCHG_3))
+ (clobber (reg:SI R0_REG))
+ (clobber (match_scratch:SI 4 "=&r"))
+ (clobber (match_scratch:SI 5 "=&r"))
+ (clobber (match_scratch:SI 6 "=1"))]
+ "TARGET_HARD_ATOMIC && TARGET_SH4A_ARCH"
+{
+ return "\r mov #-4,%5" "\n"
+ " <i124extend_insn> %2,%4" "\n"
+ " and %1,%5" "\n"
+ " xor %5,%1" "\n"
+ " add r15,%1" "\n"
+ " add #-4,%1" "\n"
+ "0: movli.l @%5,r0" "\n"
+ " mov.l r0,@-r15" "\n"
+ " mov.<i124suffix> @%1,%0" "\n"
+ " mov.<i124suffix> %3,@%1" "\n"
+ " cmp/eq %4,%0" "\n"
+ " bf{.|/}s 0f" "\n"
+ " mov.l @r15+,r0" "\n"
+ " movco.l r0,@%5" "\n"
+ " bf 0b" "\n"
+ "0:";
+}
+ [(set_attr "length" "30")])
+
(define_insn "atomic_compare_and_swap<mode>_soft"
[(set (match_operand:SI 0 "register_operand" "=&u")
(unspec_volatile:SI
@@ -151,7 +265,7 @@
(clobber (reg:SI R1_REG))]
"TARGET_SOFT_ATOMIC && !TARGET_SHMEDIA"
{
- return "mova 1f,r0" "\n"
+ return "\r mova 1f,r0" "\n"
" <i124extend_insn> %2,%4" "\n"
" .align 2" "\n"
" mov r15,r1" "\n"
@@ -164,16 +278,27 @@
}
[(set_attr "length" "20")])
+;;------------------------------------------------------------------------------
+;; read - write - return old value
+
(define_expand "atomic_exchange<mode>"
[(match_operand:I124 0 "register_operand" "") ;; oldval output
(match_operand:I124 1 "memory_operand" "") ;; memory
- (match_operand:I124 2 "register_operand" "") ;; newval input
+ (match_operand:I124 2 "atomic_arith_operand" "") ;; newval input
(match_operand:SI 3 "const_int_operand" "")] ;; memory model
- "TARGET_SOFT_ATOMIC && !TARGET_SHMEDIA"
+ "TARGET_ANY_ATOMIC && !TARGET_SHMEDIA"
{
rtx addr = force_reg (Pmode, XEXP (operands[1], 0));
- emit_insn (gen_atomic_exchange<mode>_soft
- (operands[0], addr, operands[2]));
+ rtx val = operands[2];
+ rtx atomic_insn;
+
+ if (TARGET_HARD_ATOMIC || (TARGET_SH4A_ARCH && <MODE>mode == SImode))
+ atomic_insn = gen_atomic_exchange<mode>_hard (operands[0], addr, val);
+ else
+ atomic_insn = gen_atomic_exchange<mode>_soft (operands[0], addr, val);
+
+ emit_insn (atomic_insn);
+
if (<MODE>mode == QImode)
emit_insn (gen_zero_extendqisi2 (gen_lowpart (SImode, operands[0]),
operands[0]));
@@ -183,6 +308,49 @@
DONE;
})
+(define_insn "atomic_exchangesi_hard"
+ [(set (match_operand:SI 0 "register_operand" "=&r")
+ (mem:SI (match_operand:SI 1 "register_operand" "r")))
+ (set (mem:SI (match_dup 1))
+ (unspec:SI
+ [(match_operand:SI 2 "arith_operand" "rI08")] UNSPEC_ATOMIC))
+ (clobber (reg:SI R0_REG))]
+ "TARGET_ANY_ATOMIC && TARGET_SH4A_ARCH"
+{
+ return "\r0: movli.l @%1,r0" "\n"
+ " mov r0,%0" "\n"
+ " mov %2,r0" "\n"
+ " movco.l r0,@%1" "\n"
+ " bf 0b";
+}
+ [(set_attr "length" "10")])
+
+(define_insn "atomic_exchange<mode>_hard"
+ [(set (match_operand:I12 0 "register_operand" "=&r")
+ (mem:I12 (match_operand:SI 1 "register_operand" "r")))
+ (set (mem:I12 (match_dup 1))
+ (unspec:I12
+ [(match_operand:I12 2 "register_operand" "r")] UNSPEC_ATOMIC))
+ (clobber (reg:SI R0_REG))
+ (clobber (match_scratch:SI 3 "=&r"))
+ (clobber (match_scratch:SI 4 "=1"))]
+ "TARGET_HARD_ATOMIC && TARGET_SH4A_ARCH"
+{
+ return "\r mov #-4,%3" "\n"
+ " and %1,%3" "\n"
+ " xor %3,%1" "\n"
+ " add r15,%1" "\n"
+ " add #-4,%1" "\n"
+ "0: movli.l @%3,r0" "\n"
+ " mov.l r0,@-r15" "\n"
+ " mov.<i124suffix> @%1,%0" "\n"
+ " mov.<i124suffix> %2,@%1" "\n"
+ " mov.l @r15+,r0" "\n"
+ " movco.l r0,@%3" "\n"
+ " bf 0b";
+}
+ [(set_attr "length" "24")])
+
(define_insn "atomic_exchange<mode>_soft"
[(set (match_operand:I124 0 "register_operand" "=&u")
(mem:I124 (match_operand:SI 1 "register_operand" "u")))
@@ -193,7 +361,7 @@
(clobber (reg:SI R1_REG))]
"TARGET_SOFT_ATOMIC && !TARGET_SHMEDIA"
{
- return "mova 1f,r0" "\n"
+ return "\r mova 1f,r0" "\n"
" .align 2" "\n"
" mov r15,r1" "\n"
" mov #(0f-1f),r15" "\n"
@@ -203,22 +371,32 @@
}
[(set_attr "length" "14")])
+;;------------------------------------------------------------------------------
+;; read - add|sub|or|and|xor|nand - write - return old value
+
(define_expand "atomic_fetch_<fetchop_name><mode>"
[(set (match_operand:I124 0 "register_operand" "")
(match_operand:I124 1 "memory_operand" ""))
(set (match_dup 1)
(unspec:I124
[(FETCHOP:I124 (match_dup 1)
- (match_operand:I124 2 "register_operand" ""))]
+ (match_operand:I124 2 "<fetchop_predicate>" ""))]
UNSPEC_ATOMIC))
(match_operand:SI 3 "const_int_operand" "")]
- "TARGET_SOFT_ATOMIC && !TARGET_SHMEDIA"
+ "TARGET_ANY_ATOMIC && !TARGET_SHMEDIA"
{
- rtx addr;
+ rtx addr = force_reg (Pmode, XEXP (operands[1], 0));
+ rtx atomic_insn;
+
+ if (TARGET_HARD_ATOMIC || (TARGET_SH4A_ARCH && <MODE>mode == SImode))
+ atomic_insn = gen_atomic_fetch_<fetchop_name><mode>_hard (operands[0], addr,
+ operands[2]);
+ else
+ atomic_insn = gen_atomic_fetch_<fetchop_name><mode>_soft (operands[0],
+ addr,
+ operands[2]);
+ emit_insn (atomic_insn);
- addr = force_reg (Pmode, XEXP (operands[1], 0));
- emit_insn (gen_atomic_fetch_<fetchop_name><mode>_soft
- (operands[0], addr, operands[2]));
if (<MODE>mode == QImode)
emit_insn (gen_zero_extendqisi2 (gen_lowpart (SImode, operands[0]),
operands[0]));
@@ -228,6 +406,55 @@
DONE;
})
+(define_insn "atomic_fetch_<fetchop_name>si_hard"
+ [(set (match_operand:SI 0 "register_operand" "=&r")
+ (mem:SI (match_operand:SI 1 "register_operand" "r")))
+ (set (mem:SI (match_dup 1))
+ (unspec:SI
+ [(FETCHOP:SI (mem:SI (match_dup 1))
+ (match_operand:SI 2 "<fetchop_predicate>" "<fetchop_constraint>"))]
+ UNSPEC_ATOMIC))
+ (clobber (reg:SI R0_REG))]
+ "TARGET_ANY_ATOMIC && TARGET_SH4A_ARCH"
+{
+ return "\r0: movli.l @%1,r0" "\n"
+ " mov r0,%0" "\n"
+ " <fetchop_name> %2,r0" "\n"
+ " movco.l r0,@%1" "\n"
+ " bf 0b";
+}
+ [(set_attr "length" "10")])
+
+(define_insn "atomic_fetch_<fetchop_name><mode>_hard"
+ [(set (match_operand:I12 0 "register_operand" "=&r")
+ (mem:I12 (match_operand:SI 1 "register_operand" "r")))
+ (set (mem:I12 (match_dup 1))
+ (unspec:I12
+ [(FETCHOP:I12 (mem:I12 (match_dup 1))
+ (match_operand:I12 2 "<fetchop_predicate>" "<fetchop_constraint>"))]
+ UNSPEC_ATOMIC))
+ (clobber (reg:SI R0_REG))
+ (clobber (match_scratch:SI 3 "=&r"))
+ (clobber (match_scratch:SI 4 "=1"))]
+ "TARGET_HARD_ATOMIC && TARGET_SH4A_ARCH"
+{
+ return "\r mov #-4,%3" "\n"
+ " and %1,%3" "\n"
+ " xor %3,%1" "\n"
+ " add r15,%1" "\n"
+ " add #-4,%1" "\n"
+ "0: movli.l @%3,r0" "\n"
+ " mov.l r0,@-r15" "\n"
+ " mov.<i124suffix> @%1,r0" "\n"
+ " mov r0,%0" "\n"
+ " <fetchop_name> %2,r0" "\n"
+ " mov.<i124suffix> r0,@%1" "\n"
+ " mov.l @r15+,r0" "\n"
+ " movco.l r0,@%3" "\n"
+ " bf 0b";
+}
+ [(set_attr "length" "28")])
+
(define_insn "atomic_fetch_<fetchop_name><mode>_soft"
[(set (match_operand:I124 0 "register_operand" "=&u")
(mem:I124 (match_operand:SI 1 "register_operand" "u")))
@@ -241,7 +468,7 @@
(clobber (reg:SI R1_REG))]
"TARGET_SOFT_ATOMIC && !TARGET_SHMEDIA"
{
- return "mova 1f,r0" "\n"
+ return "\r mova 1f,r0" "\n"
" .align 2" "\n"
" mov r15,r1" "\n"
" mov #(0f-1f),r15" "\n"
@@ -259,16 +486,23 @@
(set (match_dup 1)
(unspec:I124
[(not:I124 (and:I124 (match_dup 1)
- (match_operand:I124 2 "register_operand" "")))]
+ (match_operand:I124 2 "atomic_logical_operand" "")))]
UNSPEC_ATOMIC))
(match_operand:SI 3 "const_int_operand" "")]
- "TARGET_SOFT_ATOMIC && !TARGET_SHMEDIA"
+ "TARGET_ANY_ATOMIC && !TARGET_SHMEDIA"
{
- rtx addr;
+ rtx addr = force_reg (Pmode, XEXP (operands[1], 0));
+ rtx atomic_insn;
+
+ if (TARGET_HARD_ATOMIC || (TARGET_SH4A_ARCH && <MODE>mode == SImode))
+ atomic_insn = gen_atomic_fetch_nand<mode>_hard (operands[0], addr,
+ operands[2]);
+ else
+ atomic_insn = gen_atomic_fetch_nand<mode>_soft (operands[0], addr,
+ operands[2]);
+
+ emit_insn (atomic_insn);
- addr = force_reg (Pmode, XEXP (operands[1], 0));
- emit_insn (gen_atomic_fetch_nand<mode>_soft
- (operands[0], addr, operands[2]));
if (<MODE>mode == QImode)
emit_insn (gen_zero_extendqisi2 (gen_lowpart (SImode, operands[0]),
operands[0]));
@@ -278,6 +512,57 @@
DONE;
})
+(define_insn "atomic_fetch_nandsi_hard"
+ [(set (match_operand:SI 0 "register_operand" "=&r")
+ (mem:SI (match_operand:SI 1 "register_operand" "r")))
+ (set (mem:SI (match_dup 1))
+ (unspec:SI
+ [(not:SI (and:SI (mem:SI (match_dup 1))
+ (match_operand:SI 2 "logical_operand" "rK08")))]
+ UNSPEC_ATOMIC))
+ (clobber (reg:SI R0_REG))]
+ "TARGET_ANY_ATOMIC && TARGET_SH4A_ARCH"
+{
+ return "\r0: movli.l @%1,r0" "\n"
+ " mov r0,%0" "\n"
+ " and %2,r0" "\n"
+ " not r0,r0" "\n"
+ " movco.l r0,@%1" "\n"
+ " bf 0b";
+}
+ [(set_attr "length" "12")])
+
+(define_insn "atomic_fetch_nand<mode>_hard"
+ [(set (match_operand:I12 0 "register_operand" "=&r")
+ (mem:I12 (match_operand:SI 1 "register_operand" "r")))
+ (set (mem:I12 (match_dup 1))
+ (unspec:I12
+ [(not:I12 (and:I12 (mem:I12 (match_dup 1))
+ (match_operand:I12 2 "logical_operand" "rK08")))]
+ UNSPEC_ATOMIC))
+ (clobber (reg:SI R0_REG))
+ (clobber (match_scratch:SI 3 "=&r"))
+ (clobber (match_scratch:SI 4 "=1"))]
+ "TARGET_HARD_ATOMIC && TARGET_SH4A_ARCH"
+{
+ return "\r mov #-4,%3" "\n"
+ " and %1,%3" "\n"
+ " xor %3,%1" "\n"
+ " add r15,%1" "\n"
+ " add #-4,%1" "\n"
+ "0: movli.l @%3,r0" "\n"
+ " mov.l r0,@-r15" "\n"
+ " mov.<i124suffix> @%1,r0" "\n"
+ " mov r0,%0" "\n"
+ " and %2,r0" "\n"
+ " not r0,r0" "\n"
+ " mov.<i124suffix> r0,@%1" "\n"
+ " mov.l @r15+,r0" "\n"
+ " movco.l r0,@%3" "\n"
+ " bf 0b";
+}
+ [(set_attr "length" "30")])
+
(define_insn "atomic_fetch_nand<mode>_soft"
[(set (match_operand:I124 0 "register_operand" "=&u")
(mem:I124 (match_operand:SI 1 "register_operand" "u")))
@@ -291,7 +576,7 @@
(clobber (reg:SI R1_REG))]
"TARGET_SOFT_ATOMIC && !TARGET_SHMEDIA"
{
- return "mova 1f,r0" "\n"
+ return "\r mova 1f,r0" "\n"
" mov r15,r1" "\n"
" .align 2" "\n"
" mov #(0f-1f),r15" "\n"
@@ -304,23 +589,32 @@
}
[(set_attr "length" "20")])
+;;------------------------------------------------------------------------------
+;; read - add|sub|or|and|xor|nand - write - return new value
+
(define_expand "atomic_<fetchop_name>_fetch<mode>"
[(set (match_operand:I124 0 "register_operand" "")
(FETCHOP:I124
(match_operand:I124 1 "memory_operand" "")
- (match_operand:I124 2 "register_operand" "")))
+ (match_operand:I124 2 "<fetchop_predicate>" "")))
(set (match_dup 1)
(unspec:I124
[(FETCHOP:I124 (match_dup 1) (match_dup 2))]
UNSPEC_ATOMIC))
(match_operand:SI 3 "const_int_operand" "")]
- "TARGET_SOFT_ATOMIC && !TARGET_SHMEDIA"
+ "TARGET_ANY_ATOMIC && !TARGET_SHMEDIA"
{
- rtx addr;
+ rtx addr = force_reg (Pmode, XEXP (operands[1], 0));
+ rtx atomic_insn;
+
+ if (TARGET_HARD_ATOMIC || (TARGET_SH4A_ARCH && <MODE>mode == SImode))
+ atomic_insn = gen_atomic_<fetchop_name>_fetch<mode>_hard (operands[0], addr,
+ operands[2]);
+ else
+ atomic_insn = gen_atomic_<fetchop_name>_fetch<mode>_soft (operands[0], addr,
+ operands[2]);
+ emit_insn (atomic_insn);
- addr = force_reg (Pmode, XEXP (operands[1], 0));
- emit_insn (gen_atomic_<fetchop_name>_fetch<mode>_soft
- (operands[0], addr, operands[2]));
if (<MODE>mode == QImode)
emit_insn (gen_zero_extendqisi2 (gen_lowpart (SImode, operands[0]),
operands[0]));
@@ -330,6 +624,56 @@
DONE;
})
+(define_insn "atomic_<fetchop_name>_fetchsi_hard"
+ [(set (match_operand:SI 0 "register_operand" "=&z")
+ (FETCHOP:SI
+ (mem:SI (match_operand:SI 1 "register_operand" "r"))
+ (match_operand:SI 2 "<fetchop_predicate>" "<fetchop_constraint>")))
+ (set (mem:SI (match_dup 1))
+ (unspec:SI
+ [(FETCHOP:SI (mem:SI (match_dup 1)) (match_dup 2))]
+ UNSPEC_ATOMIC))]
+ "TARGET_ANY_ATOMIC && TARGET_SH4A_ARCH"
+{
+ return "\r0: movli.l @%1,%0" "\n"
+ " <fetchop_name> %2,%0" "\n"
+ " movco.l %0,@%1" "\n"
+ " bf 0b";
+}
+ [(set_attr "length" "8")])
+
+(define_insn "atomic_<fetchop_name>_fetch<mode>_hard"
+ [(set (match_operand:I12 0 "register_operand" "=&r")
+ (FETCHOP:I12
+ (mem:I12 (match_operand:SI 1 "register_operand" "r"))
+ (match_operand:I12 2 "<fetchop_predicate>" "<fetchop_constraint>")))
+ (set (mem:I12 (match_dup 1))
+ (unspec:I12
+ [(FETCHOP:I12 (mem:I12 (match_dup 1)) (match_dup 2))]
+ UNSPEC_ATOMIC))
+
+ (clobber (reg:SI R0_REG))
+ (clobber (match_scratch:SI 3 "=&r"))
+ (clobber (match_scratch:SI 4 "=1"))]
+ "TARGET_HARD_ATOMIC && TARGET_SH4A_ARCH"
+{
+ return "\r mov #-4,%3" "\n"
+ " and %1,%3" "\n"
+ " xor %3,%1" "\n"
+ " add r15,%1" "\n"
+ " add #-4,%1" "\n"
+ "0: movli.l @%3,r0" "\n"
+ " mov.l r0,@-r15" "\n"
+ " mov.<i124suffix> @%1,r0" "\n"
+ " <fetchop_name> %2,r0" "\n"
+ " mov.<i124suffix> r0,@%1" "\n"
+ " mov r0,%0" "\n"
+ " mov.l @r15+,r0" "\n"
+ " movco.l r0,@%3" "\n"
+ " bf 0b";
+}
+ [(set_attr "length" "28")])
+
(define_insn "atomic_<fetchop_name>_fetch<mode>_soft"
[(set (match_operand:I124 0 "register_operand" "=&u")
(FETCHOP:I124
@@ -343,7 +687,7 @@
(clobber (reg:SI R1_REG))]
"TARGET_SOFT_ATOMIC && !TARGET_SHMEDIA"
{
- return "mova 1f,r0" "\n"
+ return "\r mova 1f,r0" "\n"
" mov r15,r1" "\n"
" .align 2" "\n"
" mov #(0f-1f),r15" "\n"
@@ -358,19 +702,25 @@
[(set (match_operand:I124 0 "register_operand" "")
(not:I124 (and:I124
(match_operand:I124 1 "memory_operand" "")
- (match_operand:I124 2 "register_operand" ""))))
+ (match_operand:I124 2 "atomic_logical_operand" ""))))
(set (match_dup 1)
(unspec:I124
[(not:I124 (and:I124 (match_dup 1) (match_dup 2)))]
UNSPEC_ATOMIC))
(match_operand:SI 3 "const_int_operand" "")]
- "TARGET_SOFT_ATOMIC && !TARGET_SHMEDIA"
+ "TARGET_ANY_ATOMIC && !TARGET_SHMEDIA"
{
- rtx addr;
+ rtx addr = force_reg (Pmode, XEXP (operands[1], 0));
+ rtx atomic_insn;
+
+ if (TARGET_HARD_ATOMIC || (TARGET_SH4A_ARCH && <MODE>mode == SImode))
+ atomic_insn = gen_atomic_nand_fetch<mode>_hard (operands[0], addr,
+ operands[2]);
+ else
+ atomic_insn = gen_atomic_nand_fetch<mode>_soft (operands[0], addr,
+ operands[2]);
+ emit_insn (atomic_insn);
- addr = force_reg (Pmode, XEXP (operands[1], 0));
- emit_insn (gen_atomic_nand_fetch<mode>_soft
- (operands[0], addr, operands[2]));
if (<MODE>mode == QImode)
emit_insn (gen_zero_extendqisi2 (gen_lowpart (SImode, operands[0]),
operands[0]));
@@ -380,6 +730,54 @@
DONE;
})
+(define_insn "atomic_nand_fetchsi_hard"
+ [(set (match_operand:SI 0 "register_operand" "=&z")
+ (not:SI (and:SI (mem:SI (match_operand:SI 1 "register_operand" "r"))
+ (match_operand:SI 2 "logical_operand" "rK08"))))
+ (set (mem:SI (match_dup 1))
+ (unspec:SI
+ [(not:SI (and:SI (mem:SI (match_dup 1)) (match_dup 2)))]
+ UNSPEC_ATOMIC))]
+ "TARGET_ANY_ATOMIC && TARGET_SH4A_ARCH"
+{
+ return "\r0: movli.l @%1,%0" "\n"
+ " and %2,%0" "\n"
+ " not %0,%0" "\n"
+ " movco.l %0,@%1" "\n"
+ " bf 0b";
+}
+ [(set_attr "length" "10")])
+
+(define_insn "atomic_nand_fetch<mode>_hard"
+ [(set (match_operand:I12 0 "register_operand" "=&r")
+ (not:I12 (and:I12 (mem:I12 (match_operand:SI 1 "register_operand" "r"))
+ (match_operand:I12 2 "logical_operand" "rK08"))))
+ (set (mem:I12 (match_dup 1))
+ (unspec:I12
+ [(not:I12 (and:I12 (mem:I12 (match_dup 1)) (match_dup 2)))]
+ UNSPEC_ATOMIC))
+ (clobber (reg:SI R0_REG))
+ (clobber (match_scratch:SI 3 "=&r"))
+ (clobber (match_scratch:SI 4 "=1"))]
+ "TARGET_HARD_ATOMIC && TARGET_SH4A_ARCH"
+{
+ return "\r mov #-4,%3" "\n"
+ " and %1,%3" "\n"
+ " xor %3,%1" "\n"
+ " add r15,%1" "\n"
+ " add #-4,%1" "\n"
+ "0: movli.l @%3,r0" "\n"
+ " mov.l r0,@-r15" "\n"
+ " mov.<i124suffix> @%1,r0" "\n"
+ " and %2,r0" "\n"
+ " not r0,%0" "\n"
+ " mov.<i124suffix> %0,@%1" "\n"
+ " mov.l @r15+,r0" "\n"
+ " movco.l r0,@%3" "\n"
+ " bf 0b";
+}
+ [(set_attr "length" "28")])
+
(define_insn "atomic_nand_fetch<mode>_soft"
[(set (match_operand:I124 0 "register_operand" "=&u")
(not:I124 (and:I124
@@ -393,7 +791,7 @@
(clobber (reg:SI R1_REG))]
"TARGET_SOFT_ATOMIC && !TARGET_SHMEDIA"
{
- return "mova 1f,r0" "\n"
+ return "\r mova 1f,r0" "\n"
" .align 2" "\n"
" mov r15,r1" "\n"
" mov #(0f-1f),r15" "\n"
@@ -405,11 +803,14 @@
}
[(set_attr "length" "18")])
+;;------------------------------------------------------------------------------
+;; read - test against zero - or with 0x80 - write - return test result
+
(define_expand "atomic_test_and_set"
[(match_operand:SI 0 "register_operand" "") ;; bool result output
(match_operand:QI 1 "memory_operand" "") ;; memory
(match_operand:SI 2 "const_int_operand" "")] ;; model
- "(TARGET_SOFT_ATOMIC || TARGET_ENABLE_TAS) && !TARGET_SHMEDIA"
+ "(TARGET_ANY_ATOMIC || TARGET_ENABLE_TAS) && !TARGET_SHMEDIA"
{
rtx addr = force_reg (Pmode, XEXP (operands[1], 0));
@@ -417,11 +818,13 @@
emit_insn (gen_tasb (addr));
else
{
- rtx val;
-
- val = gen_int_mode (targetm.atomic_test_and_set_trueval, QImode);
+ rtx val = gen_int_mode (targetm.atomic_test_and_set_trueval, QImode);
val = force_reg (QImode, val);
- emit_insn (gen_atomic_test_and_set_soft (addr, val));
+
+ if (TARGET_HARD_ATOMIC)
+ emit_insn (gen_atomic_test_and_set_hard (addr, val));
+ else
+ emit_insn (gen_atomic_test_and_set_soft (addr, val));
}
/* The result of the test op is the inverse of what we are
@@ -452,7 +855,7 @@
(clobber (reg:SI R1_REG))]
"TARGET_SOFT_ATOMIC && !TARGET_ENABLE_TAS && !TARGET_SHMEDIA"
{
- return "mova 1f,r0" "\n"
+ return "\r mova 1f,r0" "\n"
" .align 2" "\n"
" mov r15,r1" "\n"
" mov #(0f-1f),r15" "\n"
@@ -463,3 +866,31 @@
}
[(set_attr "length" "16")])
+(define_insn "atomic_test_and_set_hard"
+ [(set (reg:SI T_REG)
+ (eq:SI (mem:QI (match_operand:SI 0 "register_operand" "r"))
+ (const_int 0)))
+ (set (mem:QI (match_dup 0))
+ (unspec:QI [(match_operand:QI 1 "register_operand" "r")] UNSPEC_ATOMIC))
+ (clobber (reg:SI R0_REG))
+ (clobber (match_scratch:SI 2 "=&r"))
+ (clobber (match_scratch:SI 3 "=&r"))
+ (clobber (match_scratch:SI 4 "=0"))]
+ "TARGET_HARD_ATOMIC && !TARGET_ENABLE_TAS && TARGET_SH4A_ARCH"
+{
+ return "\r mov #-4,%2" "\n"
+ " and %0,%2" "\n"
+ " xor %2,%0" "\n"
+ " add r15,%0" "\n"
+ " add #-4,%0" "\n"
+ "0: movli.l @%2,r0" "\n"
+ " mov.l r0,@-r15" "\n"
+ " mov.b @%0,%3" "\n"
+ " mov.b %1,@%0" "\n"
+ " mov.l @r15+,r0" "\n"
+ " movco.l r0,@%2" "\n"
+ " bf 0b" "\n"
+ " tst %3,%3";
+}
+ [(set_attr "length" "26")])
+
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 4cb381e60e9..54fce8f6ddb 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -2738,7 +2738,7 @@ emit_soft_tfmode_libcall (const char *func_name, int nargs, rtx *operands)
}
else
{
- this_slot = assign_stack_temp (TFmode, GET_MODE_SIZE (TFmode), 0);
+ this_slot = assign_stack_temp (TFmode, GET_MODE_SIZE (TFmode));
/* Operand 0 is the return value. We'll copy it out later. */
if (i > 0)
@@ -7431,7 +7431,7 @@ sparc_emit_float_lib_cmp (rtx x, rtx y, enum rtx_code comparison)
}
else
{
- slot0 = assign_stack_temp (TFmode, GET_MODE_SIZE(TFmode), 0);
+ slot0 = assign_stack_temp (TFmode, GET_MODE_SIZE(TFmode));
emit_move_insn (slot0, x);
}
@@ -7444,7 +7444,7 @@ sparc_emit_float_lib_cmp (rtx x, rtx y, enum rtx_code comparison)
}
else
{
- slot1 = assign_stack_temp (TFmode, GET_MODE_SIZE(TFmode), 0);
+ slot1 = assign_stack_temp (TFmode, GET_MODE_SIZE(TFmode));
emit_move_insn (slot1, y);
}
@@ -11631,7 +11631,7 @@ sparc_expand_vector_init (rtx target, rtx vals)
}
}
- mem = assign_stack_temp (mode, GET_MODE_SIZE (mode), 0);
+ mem = assign_stack_temp (mode, GET_MODE_SIZE (mode));
for (i = 0; i < n_elts; i++)
emit_move_insn (adjust_address_nv (mem, inner_mode,
i * GET_MODE_SIZE (inner_mode)),
diff --git a/gcc/config/sparc/sync.md b/gcc/config/sparc/sync.md
index d07d572c614..d11f6636490 100644
--- a/gcc/config/sparc/sync.md
+++ b/gcc/config/sparc/sync.md
@@ -45,7 +45,7 @@
})
;; A compiler-only memory barrier. Generic code, when checking for the
-;; existance of various named patterns, uses asm("":::"memory") when we
+;; existence of various named patterns, uses asm("":::"memory") when we
;; don't need an actual instruction. Here, it's easiest to pretend that
;; membar 0 is such a barrier. Further, this gives us a nice hook to
;; ignore all such barriers on Sparc V7.
diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c
index dc5ca45dd57..b81bf5e8f2d 100644
--- a/gcc/config/spu/spu.c
+++ b/gcc/config/spu/spu.c
@@ -35,7 +35,6 @@
#include "function.h"
#include "output.h"
#include "basic-block.h"
-#include "integrate.h"
#include "diagnostic-core.h"
#include "ggc.h"
#include "hashtab.h"
@@ -2870,7 +2869,7 @@ spu_machine_dependent_reorg (void)
prop = prev;
/* If this is the JOIN block of a simple IF-THEN then
- propogate the hint to the HEADER block. */
+ propagate the hint to the HEADER block. */
else if (prev && prev2
&& EDGE_COUNT (bb->preds) == 2
&& EDGE_COUNT (prev->preds) == 1
@@ -3124,7 +3123,7 @@ spu_sched_variable_issue (FILE *file ATTRIBUTE_UNUSED,
prev_priority = INSN_PRIORITY (insn);
}
- /* Always try issueing more insns. spu_sched_reorder will decide
+ /* Always try issuing more insns. spu_sched_reorder will decide
when the cycle should be advanced. */
return 1;
}
@@ -3231,7 +3230,7 @@ spu_sched_reorder (FILE *file ATTRIBUTE_UNUSED, int verbose ATTRIBUTE_UNUSED,
used to effect it. */
if (in_spu_reorg && spu_dual_nops < 10)
{
- /* When we are at an even address and we are not issueing nops to
+ /* When we are at an even address and we are not issuing nops to
improve scheduling then we need to advance the cycle. */
if ((spu_sched_length & 7) == 0 && prev_clock_var == clock
&& (spu_dual_nops == 0
diff --git a/gcc/config/spu/spu.md b/gcc/config/spu/spu.md
index 3178a6df593..03ed4575591 100644
--- a/gcc/config/spu/spu.md
+++ b/gcc/config/spu/spu.md
@@ -4209,7 +4209,7 @@ selb\t%0,%4,%0,%3"
""
{ spu_expand_prologue (); DONE; })
-;; "blockage" is only emited in epilogue. This is what it took to
+;; "blockage" is only emitted in epilogue. This is what it took to
;; make "basic block reordering" work with the insns sequence
;; generated by the spu_expand_epilogue (taken from mips.md)
diff --git a/gcc/config/spu/t-spu-elf b/gcc/config/spu/t-spu-elf
index 50c8d0353f5..84fbbb28ad2 100644
--- a/gcc/config/spu/t-spu-elf
+++ b/gcc/config/spu/t-spu-elf
@@ -22,7 +22,7 @@ spu.o: $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(REGS_H) hard-reg-set.h \
real.h insn-config.h conditions.h insn-attr.h flags.h $(RECOG_H) \
$(OBSTACK_H) $(TREE_H) $(EXPR_H) $(OPTABS_H) except.h function.h \
- output.h $(BASIC_BLOCK_H) $(INTEGRATE_H) $(GGC_H) $(HASHTAB_H) \
+ output.h $(BASIC_BLOCK_H) $(GGC_H) $(HASHTAB_H) \
$(TM_P_H) $(TARGET_H) $(TARGET_DEF_H) langhooks.h reload.h cfglayout.h \
$(srcdir)/config/spu/spu-protos.h \
$(srcdir)/config/spu/spu-builtins.def
diff --git a/gcc/config/tilegx/tilegx.c b/gcc/config/tilegx/tilegx.c
index a23e193ee3a..7ca4eb68be4 100644
--- a/gcc/config/tilegx/tilegx.c
+++ b/gcc/config/tilegx/tilegx.c
@@ -37,7 +37,7 @@
#include "tm-constrs.h"
#include "target.h"
#include "target-def.h"
-#include "integrate.h"
+#include "function.h"
#include "dwarf2.h"
#include "timevar.h"
#include "gimple.h"
diff --git a/gcc/config/tilepro/tilepro.c b/gcc/config/tilepro/tilepro.c
index 2b18b4f6622..ce28d9e8221 100644
--- a/gcc/config/tilepro/tilepro.c
+++ b/gcc/config/tilepro/tilepro.c
@@ -38,7 +38,7 @@
#include "tm-constrs.h"
#include "target.h"
#include "target-def.h"
-#include "integrate.h"
+#include "function.h"
#include "dwarf2.h"
#include "timevar.h"
#include "gimple.h"
diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c
index e2a72b0b3d5..186327da7ac 100644
--- a/gcc/config/v850/v850.c
+++ b/gcc/config/v850/v850.c
@@ -37,7 +37,6 @@
#include "function.h"
#include "diagnostic-core.h"
#include "ggc.h"
-#include "integrate.h"
#include "tm_p.h"
#include "target.h"
#include "target-def.h"
diff --git a/gcc/config/vms/vms.c b/gcc/config/vms/vms.c
index d4ebd18730b..d23e8a8456a 100644
--- a/gcc/config/vms/vms.c
+++ b/gcc/config/vms/vms.c
@@ -99,12 +99,12 @@ static const struct vms_crtl_name vms_crtl_names[] =
#define NBR_CRTL_NAMES (sizeof (vms_crtl_names) / sizeof (*vms_crtl_names))
-/* List of aliased identifiers. They must be persistant accross gc. */
+/* List of aliased identifiers. They must be persistent across gc. */
static GTY(()) VEC(tree,gc) *aliases_id;
/* Add a CRTL translation. This simply use the transparent alias
- mechanism, which is platform independant and works with the
+ mechanism, which is platform independent and works with the
#pragma extern_prefix (which set the assembler name). */
static void
diff --git a/gcc/config/vxworks-dummy.h b/gcc/config/vxworks-dummy.h
index e3ea6ad6a98..e2ea7fa4d64 100644
--- a/gcc/config/vxworks-dummy.h
+++ b/gcc/config/vxworks-dummy.h
@@ -22,7 +22,7 @@ a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
-/* True if we're targetting VxWorks. */
+/* True if we're targeting VxWorks. */
#ifndef TARGET_VXWORKS
#define TARGET_VXWORKS 0
#endif
diff --git a/gcc/config/vxworks.h b/gcc/config/vxworks.h
index 04ee945d650..000de3604f6 100644
--- a/gcc/config/vxworks.h
+++ b/gcc/config/vxworks.h
@@ -20,7 +20,7 @@ You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
-/* Assert that we are targetting VxWorks. */
+/* Assert that we are targeting VxWorks. */
#undef TARGET_VXWORKS
#define TARGET_VXWORKS 1
diff --git a/gcc/configure b/gcc/configure
index db2021ca2d4..1cd61344511 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -3393,13 +3393,6 @@ _ACEOF
fi
-gnu_ld=`if test x"$gnu_ld_flag" = x"yes"; then echo 1; else echo 0; fi`
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_GNU_LD $gnu_ld
-_ACEOF
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a default linker was specified" >&5
$as_echo_n "checking whether a default linker was specified... " >&6; }
if test x"${DEFAULT_LINKER+set}" = x"set"; then
@@ -3458,13 +3451,6 @@ _ACEOF
fi
-gnu_as=`if test x"$gas_flag" = x"yes"; then echo 1; else echo 0; fi`
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_GNU_AS $gnu_as
-_ACEOF
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a default assembler was specified" >&5
$as_echo_n "checking whether a default assembler was specified... " >&6; }
if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
@@ -11165,6 +11151,20 @@ $as_echo "#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1" >>confdefs.h
fi
+gnu_ld_bool=`if test x"$gnu_ld" = x"yes"; then echo 1; else echo 0; fi`
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_GNU_LD $gnu_ld_bool
+_ACEOF
+
+
+gnu_as_bool=`if test x"$gas" = x"yes"; then echo 1; else echo 0; fi`
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_GNU_AS $gnu_as_bool
+_ACEOF
+
+
count=a
for f in $host_xm_file; do
count=${count}x
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 6b793c4b205..a3a40389a3c 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -213,9 +213,6 @@ if test x"${DEFAULT_LINKER+set}" = x"set"; then
[Define to enable the use of a default linker.])
fi
-gnu_ld=`if test x"$gnu_ld_flag" = x"yes"; then echo 1; else echo 0; fi`
-AC_DEFINE_UNQUOTED(HAVE_GNU_LD, $gnu_ld, [Define if using GNU ld.])
-
AC_MSG_CHECKING([whether a default linker was specified])
if test x"${DEFAULT_LINKER+set}" = x"set"; then
if test x"$gnu_ld_flag" = x"no"; then
@@ -256,9 +253,6 @@ if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
[Define to enable the use of a default assembler.])
fi
-gnu_as=`if test x"$gas_flag" = x"yes"; then echo 1; else echo 0; fi`
-AC_DEFINE_UNQUOTED(HAVE_GNU_AS, $gnu_as, [Define if using GNU as.])
-
AC_MSG_CHECKING([whether a default assembler was specified])
if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
if test x"$gas_flag" = x"no"; then
@@ -1328,6 +1322,12 @@ if test x$use_long_long_for_widest_fast_int = xyes; then
efficiently supported by the host hardware.])
fi
+gnu_ld_bool=`if test x"$gnu_ld" = x"yes"; then echo 1; else echo 0; fi`
+AC_DEFINE_UNQUOTED(HAVE_GNU_LD, $gnu_ld_bool, [Define to 1 if using GNU ld.])
+
+gnu_as_bool=`if test x"$gas" = x"yes"; then echo 1; else echo 0; fi`
+AC_DEFINE_UNQUOTED(HAVE_GNU_AS, $gnu_as_bool, [Define to 1 if using GNU as.])
+
count=a
for f in $host_xm_file; do
count=${count}x
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 391407fb9da..2dcdb770ea3 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,59 @@
+2012-05-30 Jason Merrill <jason@redhat.com>
+
+ PR c++/53356
+ * tree.c (stabilize_init): Handle stabilizing a TARGET_EXPR
+ representing a bitwise copy of a glvalue.
+
+ * tree.c (stabilize_expr): Tweak logic.
+
+ PR c++/53356
+ * tree.c (stabilize_init): Side effects make the init unstable.
+
+2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53503
+ * semantics.c (potential_constant_expression_1): Handle LTGT_EXPR.
+
+2012-05-26 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53491
+ * tree.c (stabilize_expr): Handle exp of void type.
+
+2012-05-26 Jason Merrill <jason@redhat.com>
+
+ PR c++/53220
+ * call.c (convert_like_real) [ck_list]: Take array address directly.
+ * typeck.c (decay_conversion): Reject decay of an array compound
+ literal.
+
+2012-05-25 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/32054
+ * parser.c (cp_parser_member_declaration): A storage class is not
+ allowed in a declaration of an anonymous aggregate in a class scope.
+
+2012-05-24 Uros Bizjak <ubizjak@gmail.com>
+
+ PR obj-c++/53441
+ * decl.c (grokdeclarator): Check that current_class_type is non-NULL
+ before calling constructor_name_p.
+
+2012-05-24 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/32080
+ * parser.c (cp_parser_ctor_initializer_opt_and_function_body,
+ cp_parser_function_body): Add a bool parameter, true when parsing
+ a function-try-block.
+ (cp_parser_function_try_block): Pass true to the above.
+ (cp_parser_function_definition_after_declarator,
+ cp_parser_function_transaction): Adjust.
+
+2012-05-23 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/29185
+ * decl2.c (delete_sanity): Extend 'deleting array' warning to
+ any array type.
+
2012-05-21 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51184
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 29fb195f131..4c99068587c 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -5868,11 +5868,15 @@ convert_like_real (conversion *convs, tree expr, tree fn, int argnum,
(elttype, cp_type_quals (elttype) | TYPE_QUAL_CONST);
array = build_array_of_n_type (elttype, len);
array = finish_compound_literal (array, new_ctor, complain);
+ /* Take the address explicitly rather than via decay_conversion
+ to avoid the error about taking the address of a temporary. */
+ array = cp_build_addr_expr (array, complain);
+ array = cp_convert (build_pointer_type (elttype), array);
/* Build up the initializer_list object. */
totype = complete_type (totype);
field = next_initializable_field (TYPE_FIELDS (totype));
- CONSTRUCTOR_APPEND_ELT (vec, field, decay_conversion (array, complain));
+ CONSTRUCTOR_APPEND_ELT (vec, field, array);
field = next_initializable_field (DECL_CHAIN (field));
CONSTRUCTOR_APPEND_ELT (vec, field, size_int (len));
new_ctor = build_constructor (totype, vec);
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 85f5c4b9e05..4d02f547719 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -9912,7 +9912,8 @@ grokdeclarator (const cp_declarator *declarator,
clones. */
DECL_ABSTRACT (decl) = 1;
}
- else if (constructor_name_p (unqualified_id, current_class_type))
+ else if (current_class_type
+ && constructor_name_p (unqualified_id, current_class_type))
permerror (input_location, "ISO C++ forbids nested type %qD with same name "
"as enclosing class",
unqualified_id);
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 34d26bcad23..b6fb623b794 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -438,9 +438,8 @@ delete_sanity (tree exp, tree size, bool doing_vec, int use_global_delete,
}
/* An array can't have been allocated by new, so complain. */
- if (TREE_CODE (exp) == VAR_DECL
- && TREE_CODE (TREE_TYPE (exp)) == ARRAY_TYPE)
- warning (0, "deleting array %q#D", exp);
+ if (TREE_CODE (TREE_TYPE (exp)) == ARRAY_TYPE)
+ warning (0, "deleting array %q#E", exp);
t = build_expr_type_conversion (WANT_POINTER, exp, true);
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index c99020f36d6..f2275023a26 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -2028,7 +2028,7 @@ static cp_parameter_declarator *cp_parser_parameter_declaration
static tree cp_parser_default_argument
(cp_parser *, bool);
static void cp_parser_function_body
- (cp_parser *);
+ (cp_parser *, bool);
static tree cp_parser_initializer
(cp_parser *, bool *, bool *);
static tree cp_parser_initializer_clause
@@ -2039,7 +2039,7 @@ static VEC(constructor_elt,gc) *cp_parser_initializer_list
(cp_parser *, bool *);
static bool cp_parser_ctor_initializer_opt_and_function_body
- (cp_parser *);
+ (cp_parser *, bool);
/* Classes [gram.class] */
@@ -18004,16 +18004,18 @@ cp_parser_default_argument (cp_parser *parser, bool template_parm_p)
compound_statement */
static void
-cp_parser_function_body (cp_parser *parser)
+cp_parser_function_body (cp_parser *parser, bool in_function_try_block)
{
- cp_parser_compound_statement (parser, NULL, false, true);
+ cp_parser_compound_statement (parser, NULL, in_function_try_block, true);
}
/* Parse a ctor-initializer-opt followed by a function-body. Return
- true if a ctor-initializer was present. */
+ true if a ctor-initializer was present. When IN_FUNCTION_TRY_BLOCK
+ is true we are parsing a function-try-block. */
static bool
-cp_parser_ctor_initializer_opt_and_function_body (cp_parser *parser)
+cp_parser_ctor_initializer_opt_and_function_body (cp_parser *parser,
+ bool in_function_try_block)
{
tree body, list;
bool ctor_initializer_p;
@@ -18040,7 +18042,7 @@ cp_parser_ctor_initializer_opt_and_function_body (cp_parser *parser)
last = STATEMENT_LIST_TAIL (list)->stmt;
}
/* Parse the function-body. */
- cp_parser_function_body (parser);
+ cp_parser_function_body (parser, in_function_try_block);
if (check_body_p)
check_constexpr_ctor_body (last, list);
/* Finish the function body. */
@@ -19519,6 +19521,12 @@ cp_parser_member_declaration (cp_parser* parser)
particular type), as opposed to a nested class. */
else if (ANON_AGGR_TYPE_P (type))
{
+ /* C++11 9.5/6. */
+ if (decl_specifiers.storage_class != sc_none)
+ error_at (decl_spec_token_start->location,
+ "a storage class on an anonymous aggregate "
+ "in class scope is not allowed");
+
/* Remove constructors and such from TYPE, now that we
know it is an anonymous aggregate. */
fixup_anonymous_aggr (type);
@@ -20318,8 +20326,8 @@ cp_parser_function_try_block (cp_parser* parser)
/* Let the rest of the front end know where we are. */
try_block = begin_function_try_block (&compound_stmt);
/* Parse the function-body. */
- ctor_initializer_p
- = cp_parser_ctor_initializer_opt_and_function_body (parser);
+ ctor_initializer_p = cp_parser_ctor_initializer_opt_and_function_body
+ (parser, /*in_function_try_block=*/true);
/* We're done with the `try' part. */
finish_function_try_block (try_block);
/* Parse the handlers. */
@@ -21666,8 +21674,8 @@ cp_parser_function_definition_after_declarator (cp_parser* parser,
else if (cp_lexer_next_token_is_keyword (parser->lexer, RID_TRY))
ctor_initializer_p = cp_parser_function_try_block (parser);
else
- ctor_initializer_p
- = cp_parser_ctor_initializer_opt_and_function_body (parser);
+ ctor_initializer_p = cp_parser_ctor_initializer_opt_and_function_body
+ (parser, /*in_function_try_block=*/false);
finish_lambda_scope ();
@@ -27843,8 +27851,8 @@ cp_parser_function_transaction (cp_parser *parser, enum rid keyword)
if (cp_lexer_next_token_is_keyword (parser->lexer, RID_TRY))
ctor_initializer_p = cp_parser_function_try_block (parser);
else
- ctor_initializer_p
- = cp_parser_ctor_initializer_opt_and_function_body (parser);
+ ctor_initializer_p = cp_parser_ctor_initializer_opt_and_function_body
+ (parser, /*in_function_try_block=*/false);
parser->in_transaction = old_in;
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index a2f8f0ece89..5bc0ee2a4a4 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -8545,6 +8545,7 @@ potential_constant_expression_1 (tree t, bool want_rval, tsubst_flags_t flags)
case UNGT_EXPR:
case UNGE_EXPR:
case UNEQ_EXPR:
+ case LTGT_EXPR:
case RANGE_EXPR:
case COMPLEX_EXPR:
want_rval = true;
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index c7223fb3c98..df98bc3b00c 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -3285,6 +3285,11 @@ stabilize_expr (tree exp, tree* initp)
if (!TREE_SIDE_EFFECTS (exp))
init_expr = NULL_TREE;
+ else if (VOID_TYPE_P (TREE_TYPE (exp)))
+ {
+ init_expr = exp;
+ exp = void_zero_node;
+ }
/* There are no expressions with REFERENCE_TYPE, but there can be call
arguments with such a type; just treat it as a pointer. */
else if (TREE_CODE (TREE_TYPE (exp)) == REFERENCE_TYPE
@@ -3388,7 +3393,7 @@ stabilize_aggr_init (tree call, tree *initp)
takes care not to introduce additional temporaries.
Returns TRUE iff the expression was successfully pre-evaluated,
- i.e., if INIT is now side-effect free, except for, possible, a
+ i.e., if INIT is now side-effect free, except for, possibly, a
single call to a constructor. */
bool
@@ -3401,21 +3406,37 @@ stabilize_init (tree init, tree *initp)
if (t == error_mark_node || processing_template_decl)
return true;
- if (TREE_CODE (t) == INIT_EXPR
- && TREE_CODE (TREE_OPERAND (t, 1)) != TARGET_EXPR
- && TREE_CODE (TREE_OPERAND (t, 1)) != CONSTRUCTOR
- && TREE_CODE (TREE_OPERAND (t, 1)) != AGGR_INIT_EXPR)
- {
- TREE_OPERAND (t, 1) = stabilize_expr (TREE_OPERAND (t, 1), initp);
- return true;
- }
-
if (TREE_CODE (t) == INIT_EXPR)
t = TREE_OPERAND (t, 1);
if (TREE_CODE (t) == TARGET_EXPR)
t = TARGET_EXPR_INITIAL (t);
- if (TREE_CODE (t) == COMPOUND_EXPR)
- t = expr_last (t);
+
+ /* If the RHS can be stabilized without breaking copy elision, stabilize
+ it. We specifically don't stabilize class prvalues here because that
+ would mean an extra copy, but they might be stabilized below. */
+ if (TREE_CODE (init) == INIT_EXPR
+ && TREE_CODE (t) != CONSTRUCTOR
+ && TREE_CODE (t) != AGGR_INIT_EXPR
+ && (SCALAR_TYPE_P (TREE_TYPE (t))
+ || lvalue_or_rvalue_with_address_p (t)))
+ {
+ TREE_OPERAND (init, 1) = stabilize_expr (t, initp);
+ return true;
+ }
+
+ if (TREE_CODE (t) == COMPOUND_EXPR
+ && TREE_CODE (init) == INIT_EXPR)
+ {
+ tree last = expr_last (t);
+ /* Handle stabilizing the EMPTY_CLASS_EXPR pattern. */
+ if (!TREE_SIDE_EFFECTS (last))
+ {
+ *initp = t;
+ TREE_OPERAND (init, 1) = last;
+ return true;
+ }
+ }
+
if (TREE_CODE (t) == CONSTRUCTOR)
{
/* Aggregate initialization: stabilize each of the field
@@ -3438,11 +3459,6 @@ stabilize_init (tree init, tree *initp)
return good;
}
- /* If the initializer is a COND_EXPR, we can't preevaluate
- anything. */
- if (TREE_CODE (t) == COND_EXPR)
- return false;
-
if (TREE_CODE (t) == CALL_EXPR)
{
stabilize_call (t, initp);
@@ -3457,7 +3473,7 @@ stabilize_init (tree init, tree *initp)
/* The initialization is being performed via a bitwise copy -- and
the item copied may have side effects. */
- return TREE_SIDE_EFFECTS (init);
+ return !TREE_SIDE_EFFECTS (init);
}
/* Like "fold", but should be used whenever we might be processing the
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index e67d1b12c25..0a322e3356b 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -1887,6 +1887,15 @@ decay_conversion (tree exp, tsubst_flags_t complain)
return error_mark_node;
}
+ /* Don't let an array compound literal decay to a pointer. It can
+ still be used to initialize an array or bind to a reference. */
+ if (TREE_CODE (exp) == TARGET_EXPR)
+ {
+ if (complain & tf_error)
+ error_at (loc, "taking address of temporary array");
+ return error_mark_node;
+ }
+
ptrtype = build_pointer_type (TREE_TYPE (type));
if (TREE_CODE (exp) == VAR_DECL)
diff --git a/gcc/cse.c b/gcc/cse.c
index 9f4e97932ed..c36ed74d6e6 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -622,9 +622,7 @@ static enum machine_mode cse_cc_succs (basic_block, basic_block, rtx, rtx,
static const struct rtl_hooks cse_rtl_hooks = RTL_HOOKS_INITIALIZER;
-/* Nonzero if X has the form (PLUS frame-pointer integer). We check for
- virtual regs here because the simplify_*_operation routines are called
- by integrate.c, which is called before virtual register instantiation. */
+/* Nonzero if X has the form (PLUS frame-pointer integer). */
static bool
fixed_base_plus_p (rtx x)
@@ -636,9 +634,6 @@ fixed_base_plus_p (rtx x)
return true;
if (x == arg_pointer_rtx && fixed_regs[ARG_POINTER_REGNUM])
return true;
- if (REGNO (x) >= FIRST_VIRTUAL_REGISTER
- && REGNO (x) <= LAST_VIRTUAL_REGISTER)
- return true;
return false;
case PLUS:
diff --git a/gcc/cselib.c b/gcc/cselib.c
index a8c66b8dee9..11c5652a74e 100644
--- a/gcc/cselib.c
+++ b/gcc/cselib.c
@@ -1374,7 +1374,7 @@ cselib_lookup_mem (rtx x, int create)
return mem_elt;
}
-/* Search thru the possible substitutions in P. We prefer a non reg
+/* Search through the possible substitutions in P. We prefer a non reg
substitution because this allows us to expand the tree further. If
we find, just a reg, take the lowest regno. There may be several
non-reg results, we just take the first one because they will all
diff --git a/gcc/df-scan.c b/gcc/df-scan.c
index 730742acac5..c5e733404e1 100644
--- a/gcc/df-scan.c
+++ b/gcc/df-scan.c
@@ -111,7 +111,7 @@ static void df_ref_record (enum df_ref_class, struct df_collection_rec *,
rtx, rtx *,
basic_block, struct df_insn_info *,
enum df_ref_type, int ref_flags);
-static void df_def_record_1 (struct df_collection_rec *, rtx,
+static void df_def_record_1 (struct df_collection_rec *, rtx *,
basic_block, struct df_insn_info *,
int ref_flags);
static void df_defs_record (struct df_collection_rec *, rtx,
@@ -2917,40 +2917,27 @@ df_read_modify_subreg_p (rtx x)
}
-/* Process all the registers defined in the rtx, X.
- Autoincrement/decrement definitions will be picked up by
- df_uses_record. */
+/* Process all the registers defined in the rtx pointed by LOC.
+ Autoincrement/decrement definitions will be picked up by df_uses_record.
+ Any change here has to be matched in df_find_hard_reg_defs_1. */
static void
df_def_record_1 (struct df_collection_rec *collection_rec,
- rtx x, basic_block bb, struct df_insn_info *insn_info,
+ rtx *loc, basic_block bb, struct df_insn_info *insn_info,
int flags)
{
- rtx *loc;
- rtx dst;
-
- /* We may recursively call ourselves on EXPR_LIST when dealing with PARALLEL
- construct. */
- if (GET_CODE (x) == EXPR_LIST || GET_CODE (x) == CLOBBER)
- loc = &XEXP (x, 0);
- else
- loc = &SET_DEST (x);
- dst = *loc;
+ rtx dst = *loc;
/* It is legal to have a set destination be a parallel. */
if (GET_CODE (dst) == PARALLEL)
{
int i;
-
for (i = XVECLEN (dst, 0) - 1; i >= 0; i--)
{
rtx temp = XVECEXP (dst, 0, i);
- if (GET_CODE (temp) == EXPR_LIST || GET_CODE (temp) == CLOBBER
- || GET_CODE (temp) == SET)
- df_def_record_1 (collection_rec,
- temp, bb, insn_info,
- GET_CODE (temp) == CLOBBER
- ? flags | DF_REF_MUST_CLOBBER : flags);
+ gcc_assert (GET_CODE (temp) == EXPR_LIST);
+ df_def_record_1 (collection_rec, &XEXP (temp, 0),
+ bb, insn_info, flags);
}
return;
}
@@ -2996,7 +2983,8 @@ df_def_record_1 (struct df_collection_rec *collection_rec,
}
-/* Process all the registers defined in the pattern rtx, X. */
+/* Process all the registers defined in the pattern rtx, X. Any change
+ here has to be matched in df_find_hard_reg_defs. */
static void
df_defs_record (struct df_collection_rec *collection_rec,
@@ -3004,26 +2992,99 @@ df_defs_record (struct df_collection_rec *collection_rec,
int flags)
{
RTX_CODE code = GET_CODE (x);
+ int i;
- if (code == SET || code == CLOBBER)
- {
- /* Mark the single def within the pattern. */
- int clobber_flags = flags;
- clobber_flags |= (code == CLOBBER) ? DF_REF_MUST_CLOBBER : 0;
- df_def_record_1 (collection_rec, x, bb, insn_info, clobber_flags);
- }
- else if (code == COND_EXEC)
+ switch (code)
{
+ case SET:
+ df_def_record_1 (collection_rec, &SET_DEST (x), bb, insn_info, flags);
+ break;
+
+ case CLOBBER:
+ flags |= DF_REF_MUST_CLOBBER;
+ df_def_record_1 (collection_rec, &XEXP (x, 0), bb, insn_info, flags);
+ break;
+
+ case COND_EXEC:
df_defs_record (collection_rec, COND_EXEC_CODE (x),
bb, insn_info, DF_REF_CONDITIONAL);
+ break;
+
+ case PARALLEL:
+ for (i = 0; i < XVECLEN (x, 0); i++)
+ df_defs_record (collection_rec, XVECEXP (x, 0, i),
+ bb, insn_info, flags);
+ break;
+ default:
+ /* No DEFs to record in other cases */
+ break;
}
- else if (code == PARALLEL)
+}
+
+/* Set bits in *DEFS for hard registers found in the rtx DST, which is the
+ destination of a set or clobber. This has to match the logic in
+ df_defs_record_1. */
+
+static void
+df_find_hard_reg_defs_1 (rtx dst, HARD_REG_SET *defs)
+{
+ /* It is legal to have a set destination be a parallel. */
+ if (GET_CODE (dst) == PARALLEL)
{
int i;
+ for (i = XVECLEN (dst, 0) - 1; i >= 0; i--)
+ {
+ rtx temp = XVECEXP (dst, 0, i);
+ gcc_assert (GET_CODE (temp) == EXPR_LIST);
+ df_find_hard_reg_defs_1 (XEXP (temp, 0), defs);
+ }
+ return;
+ }
+
+ if (GET_CODE (dst) == STRICT_LOW_PART)
+ dst = XEXP (dst, 0);
+
+ if (GET_CODE (dst) == ZERO_EXTRACT)
+ dst = XEXP (dst, 0);
+
+ /* At this point if we do not have a reg or a subreg, just return. */
+ if (REG_P (dst) && HARD_REGISTER_P (dst))
+ SET_HARD_REG_BIT (*defs, REGNO (dst));
+ else if (GET_CODE (dst) == SUBREG
+ && REG_P (SUBREG_REG (dst)) && HARD_REGISTER_P (dst))
+ SET_HARD_REG_BIT (*defs, REGNO (SUBREG_REG (dst)));
+}
+
+/* Set bits in *DEFS for hard registers defined in the pattern X. This
+ has to match the logic in df_defs_record. */
- /* Mark the multiple defs within the pattern. */
- for (i = XVECLEN (x, 0) - 1; i >= 0; i--)
- df_defs_record (collection_rec, XVECEXP (x, 0, i), bb, insn_info, flags);
+static void
+df_find_hard_reg_defs (rtx x, HARD_REG_SET *defs)
+{
+ RTX_CODE code = GET_CODE (x);
+ int i;
+
+ switch (code)
+ {
+ case SET:
+ df_find_hard_reg_defs_1 (SET_DEST (x), defs);
+ break;
+
+ case CLOBBER:
+ df_find_hard_reg_defs_1 (XEXP (x, 0), defs);
+ break;
+
+ case COND_EXEC:
+ df_find_hard_reg_defs (COND_EXEC_CODE (x), defs);
+ break;
+
+ case PARALLEL:
+ for (i = 0; i < XVECLEN (x, 0); i++)
+ df_find_hard_reg_defs (XVECEXP (x, 0, i), defs);
+ break;
+ default:
+ /* No DEFs to record in other cases */
+ break;
}
}
@@ -3310,29 +3371,56 @@ df_get_conditional_uses (struct df_collection_rec *collection_rec)
}
-/* Get call's extra defs and uses. */
+/* Get call's extra defs and uses (track caller-saved registers). */
static void
-df_get_call_refs (struct df_collection_rec * collection_rec,
+df_get_call_refs (struct df_collection_rec *collection_rec,
basic_block bb,
struct df_insn_info *insn_info,
int flags)
{
rtx note;
- bitmap_iterator bi;
- unsigned int ui;
bool is_sibling_call;
unsigned int i;
- df_ref def;
- bitmap_head defs_generated;
+ HARD_REG_SET defs_generated;
- bitmap_initialize (&defs_generated, &df_bitmap_obstack);
+ CLEAR_HARD_REG_SET (defs_generated);
+ df_find_hard_reg_defs (PATTERN (insn_info->insn), &defs_generated);
+ is_sibling_call = SIBLING_CALL_P (insn_info->insn);
- /* Do not generate clobbers for registers that are the result of the
- call. This causes ordering problems in the chain building code
- depending on which def is seen first. */
- FOR_EACH_VEC_ELT (df_ref, collection_rec->def_vec, i, def)
- bitmap_set_bit (&defs_generated, DF_REF_REGNO (def));
+ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
+ {
+ if (i == STACK_POINTER_REGNUM)
+ /* The stack ptr is used (honorarily) by a CALL insn. */
+ df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[i],
+ NULL, bb, insn_info, DF_REF_REG_USE,
+ DF_REF_CALL_STACK_USAGE | flags);
+ else if (global_regs[i])
+ {
+ /* Calls to const functions cannot access any global registers and
+ calls to pure functions cannot set them. All other calls may
+ reference any of the global registers, so they are recorded as
+ used. */
+ if (!RTL_CONST_CALL_P (insn_info->insn))
+ {
+ df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[i],
+ NULL, bb, insn_info, DF_REF_REG_USE, flags);
+ if (!RTL_PURE_CALL_P (insn_info->insn))
+ df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[i],
+ NULL, bb, insn_info, DF_REF_REG_DEF, flags);
+ }
+ }
+ else if (TEST_HARD_REG_BIT (regs_invalidated_by_call, i)
+ /* no clobbers for regs that are the result of the call */
+ && !TEST_HARD_REG_BIT (defs_generated, i)
+ && (!is_sibling_call
+ || !bitmap_bit_p (df->exit_block_uses, i)
+ || refers_to_regno_p (i, i+1,
+ crtl->return_rtx, NULL)))
+ df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[i],
+ NULL, bb, insn_info, DF_REF_REG_DEF,
+ DF_REF_MAY_CLOBBER | flags);
+ }
/* Record the registers used to pass arguments, and explicitly
noted as clobbered. */
@@ -3347,7 +3435,7 @@ df_get_call_refs (struct df_collection_rec * collection_rec,
if (REG_P (XEXP (XEXP (note, 0), 0)))
{
unsigned int regno = REGNO (XEXP (XEXP (note, 0), 0));
- if (!bitmap_bit_p (&defs_generated, regno))
+ if (!TEST_HARD_REG_BIT (defs_generated, regno))
df_defs_record (collection_rec, XEXP (note, 0), bb,
insn_info, flags);
}
@@ -3357,40 +3445,6 @@ df_get_call_refs (struct df_collection_rec * collection_rec,
}
}
- /* The stack ptr is used (honorarily) by a CALL insn. */
- df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[STACK_POINTER_REGNUM],
- NULL, bb, insn_info, DF_REF_REG_USE,
- DF_REF_CALL_STACK_USAGE | flags);
-
- /* Calls to const functions cannot access any global registers and calls to
- pure functions cannot set them. All other calls may reference any of the
- global registers, so they are recorded as used. */
- if (!RTL_CONST_CALL_P (insn_info->insn))
- for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
- if (global_regs[i])
- {
- df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[i],
- NULL, bb, insn_info, DF_REF_REG_USE, flags);
- if (!RTL_PURE_CALL_P (insn_info->insn))
- df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[i],
- NULL, bb, insn_info, DF_REF_REG_DEF, flags);
- }
-
- is_sibling_call = SIBLING_CALL_P (insn_info->insn);
- EXECUTE_IF_SET_IN_BITMAP (regs_invalidated_by_call_regset, 0, ui, bi)
- {
- if (!global_regs[ui]
- && (!bitmap_bit_p (&defs_generated, ui))
- && (!is_sibling_call
- || !bitmap_bit_p (df->exit_block_uses, ui)
- || refers_to_regno_p (ui, ui+1,
- crtl->return_rtx, NULL)))
- df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[ui],
- NULL, bb, insn_info, DF_REF_REG_DEF,
- DF_REF_MAY_CLOBBER | flags);
- }
-
- bitmap_clear (&defs_generated);
return;
}
@@ -3400,7 +3454,7 @@ df_get_call_refs (struct df_collection_rec * collection_rec,
and reg chains. */
static void
-df_insn_refs_collect (struct df_collection_rec* collection_rec,
+df_insn_refs_collect (struct df_collection_rec *collection_rec,
basic_block bb, struct df_insn_info *insn_info)
{
rtx note;
@@ -3412,9 +3466,6 @@ df_insn_refs_collect (struct df_collection_rec* collection_rec,
VEC_truncate (df_ref, collection_rec->eq_use_vec, 0);
VEC_truncate (df_mw_hardreg_ptr, collection_rec->mw_vec, 0);
- /* Record register defs. */
- df_defs_record (collection_rec, PATTERN (insn_info->insn), bb, insn_info, 0);
-
/* Process REG_EQUIV/REG_EQUAL notes. */
for (note = REG_NOTES (insn_info->insn); note;
note = XEXP (note, 1))
@@ -3445,10 +3496,17 @@ df_insn_refs_collect (struct df_collection_rec* collection_rec,
}
}
+ /* For CALL_INSNs, first record DF_REF_BASE register defs, as well as
+ uses from CALL_INSN_FUNCTION_USAGE. */
if (CALL_P (insn_info->insn))
df_get_call_refs (collection_rec, bb, insn_info,
(is_cond_exec) ? DF_REF_CONDITIONAL : 0);
+ /* Record other defs. These should be mostly for DF_REF_REGULAR, so
+ that a qsort on the defs is unnecessary in most cases. */
+ df_defs_record (collection_rec,
+ PATTERN (insn_info->insn), bb, insn_info, 0);
+
/* Record the register uses. */
df_uses_record (collection_rec,
&PATTERN (insn_info->insn), DF_REF_REG_USE, bb, insn_info, 0);
@@ -3676,7 +3734,7 @@ df_get_eh_block_artificial_uses (bitmap eh_block_artificial_uses)
{
bitmap_clear (eh_block_artificial_uses);
- /* The following code (down thru the arg_pointer setting APPEARS
+ /* The following code (down through the arg_pointer setting APPEARS
to be necessary because there is nothing that actually
describes what the exception handling code may actually need
to keep alive. */
@@ -4481,7 +4539,7 @@ df_scan_verify (void)
/* Verification is a 4 step process. */
- /* (1) All of the refs are marked by going thru the reg chains. */
+ /* (1) All of the refs are marked by going through the reg chains. */
for (i = 0; i < DF_REG_SIZE (df); i++)
{
gcc_assert (df_reg_chain_mark (DF_REG_DEF_CHAIN (i), i, true, false)
diff --git a/gcc/df.h b/gcc/df.h
index c0fabb9e2b7..1b4882d1d16 100644
--- a/gcc/df.h
+++ b/gcc/df.h
@@ -367,7 +367,7 @@ struct df_base_ref
when FUDs are added. */
struct df_insn_info *insn_info;
/* For each regno, there are three chains of refs, one for the uses,
- the eq_uses and the defs. These chains go thru the refs
+ the eq_uses and the defs. These chains go through the refs
themselves rather than using an external structure. */
union df_ref_d *next_reg; /* Next ref with same regno and type. */
union df_ref_d *prev_reg; /* Prev ref with same regno and type. */
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index d9efab92101..a60d6da0c20 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -1759,7 +1759,8 @@ ISO C99 supports compound literals. A compound literal looks like
a cast containing an initializer. Its value is an object of the
type specified in the cast, containing the elements specified in
the initializer; it is an lvalue. As an extension, GCC supports
-compound literals in C90 mode and in C++.
+compound literals in C90 mode and in C++, though the semantics are
+somewhat different in C++.
Usually, the specified type is a structure. Assume that
@code{struct foo} and @code{structure} are declared as shown:
@@ -1785,8 +1786,9 @@ This is equivalent to writing the following:
@}
@end smallexample
-You can also construct an array. If all the elements of the compound literal
-are (made up of) simple constant expressions, suitable for use in
+You can also construct an array, though this is dangerous in C++, as
+explained below. If all the elements of the compound literal are
+(made up of) simple constant expressions, suitable for use in
initializers of objects of static storage duration, then the compound
literal can be coerced to a pointer to its first element and used in
such an initializer, as shown here:
@@ -1822,6 +1824,25 @@ static int y[] = @{1, 2, 3@};
static int z[] = @{1, 0, 0@};
@end smallexample
+In C, a compound literal designates an unnamed object with static or
+automatic storage duration. In C++, a compound literal designates a
+temporary object, which only lives until the end of its
+full-expression. As a result, well-defined C code that takes the
+address of a subobject of a compound literal can be undefined in C++.
+For instance, if the array compound literal example above appeared
+inside a function, any subsequent use of @samp{foo} in C++ has
+undefined behavior because the lifetime of the array ends after the
+declaration of @samp{foo}. As a result, the C++ compiler now rejects
+the conversion of a temporary array to a pointer.
+
+As an optimization, the C++ compiler sometimes gives array compound
+literals longer lifetimes: when the array either appears outside a
+function or has const-qualified type. If @samp{foo} and its
+initializer had elements of @samp{char *const} type rather than
+@samp{char *}, or if @samp{foo} were a global variable, the array
+would have static storage duration. But it is probably safest just to
+avoid the use of array compound literals in code compiled as C++.
+
@node Designated Inits
@section Designated Initializers
@cindex initializers with labeled elements
@@ -3715,7 +3736,7 @@ the PowerPC V2.05 architecture.
@cindex @code{target("dlmzb")} attribute
Generate code that uses (does not use) the string-search @samp{dlmzb}
instruction on the IBM 405, 440, 464 and 476 processors. This instruction is
-generated by default when targetting those processors.
+generated by default when targeting those processors.
@item fprnd
@itemx no-fprnd
@@ -3754,7 +3775,7 @@ other processors that support the extended PowerPC V2.05 architecture.
@cindex @code{target("mulhw")} attribute
Generate code that uses (does not use) the half-word multiply and
multiply-accumulate instructions on the IBM 405, 440, 464 and 476 processors.
-These instructions are generated by default when targetting those
+These instructions are generated by default when targeting those
processors.
@item multiple
@@ -9537,7 +9558,7 @@ else
@end deftypefn
@deftypefn {Built-in Function} int __builtin_cpu_supports (const char *@var{feature})
-This function returns a postive integer if the runtime cpu supports @var{feature}
+This function returns a positive integer if the runtime cpu supports @var{feature}
and returns @code{0} otherwise. The following features can be detected:
@table @samp
diff --git a/gcc/doc/include/texinfo.tex b/gcc/doc/include/texinfo.tex
index e4f38dd4964..0f3a0960c03 100644
--- a/gcc/doc/include/texinfo.tex
+++ b/gcc/doc/include/texinfo.tex
@@ -1,13 +1,13 @@
% texinfo.tex -- TeX macros to handle Texinfo files.
-%
+%
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2008-03-17.10}
+\def\texinfoversion{2012-05-16.16}
%
-% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
+% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-% 2007, 2008 Free Software Foundation, Inc.
+% 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
%
% This texinfo.tex file is free software: you can redistribute it and/or
% modify it under the terms of the GNU General Public License as
@@ -28,9 +28,9 @@
%
% Please try the latest version of texinfo.tex before submitting bug
% reports; you can get the latest version from:
-% http://www.gnu.org/software/texinfo/ (the Texinfo home page), or
-% ftp://tug.org/tex/texinfo.tex
-% (and all CTAN mirrors, see http://www.ctan.org).
+% http://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or
+% http://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or
+% http://www.gnu.org/software/texinfo/ (the Texinfo home page)
% The texinfo.tex in any given distribution could well be out
% of date, so if that's what you're using, please check.
%
@@ -65,7 +65,6 @@
\everyjob{\message{[Texinfo version \texinfoversion]}%
\catcode`+=\active \catcode`\_=\active}
-
\chardef\other=12
% We never want plain's \outer definition of \+ in Texinfo.
@@ -93,11 +92,13 @@
\let\ptexnewwrite\newwrite
\let\ptexnoindent=\noindent
\let\ptexplus=+
+\let\ptexraggedright=\raggedright
\let\ptexrbrace=\}
\let\ptexslash=\/
\let\ptexstar=\*
\let\ptext=\t
\let\ptextop=\top
+{\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode
% If this character appears in an error message or help string, it
% starts a new line in the output.
@@ -115,10 +116,11 @@
% Set up fixed words for English if not already set.
\ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi
\ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi
+\ifx\putworderror\undefined \gdef\putworderror{error}\fi
\ifx\putwordfile\undefined \gdef\putwordfile{file}\fi
\ifx\putwordin\undefined \gdef\putwordin{in}\fi
-\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi
-\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi
+\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi
+\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi
\ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi
\ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi
\ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi
@@ -157,15 +159,18 @@
\def\spaceisspace{\catcode`\ =\spacecat}
% sometimes characters are active, so we need control sequences.
+\chardef\ampChar = `\&
\chardef\colonChar = `\:
\chardef\commaChar = `\,
\chardef\dashChar = `\-
\chardef\dotChar = `\.
\chardef\exclamChar= `\!
+\chardef\hashChar = `\#
\chardef\lquoteChar= `\`
\chardef\questChar = `\?
\chardef\rquoteChar= `\'
\chardef\semiChar = `\;
+\chardef\slashChar = `\/
\chardef\underChar = `\_
% Ignore a token.
@@ -196,36 +201,7 @@
% that mark overfull boxes (in case you have decided
% that the text looks ok even though it passes the margin).
%
-\def\finalout{\overfullrule=0pt}
-
-% @| inserts a changebar to the left of the current line. It should
-% surround any changed text. This approach does *not* work if the
-% change spans more than two lines of output. To handle that, we would
-% have adopt a much more difficult approach (putting marks into the main
-% vertical list for the beginning and end of each change).
-%
-\def\|{%
- % \vadjust can only be used in horizontal mode.
- \leavevmode
- %
- % Append this vertical mode material after the current line in the output.
- \vadjust{%
- % We want to insert a rule with the height and depth of the current
- % leading; that is exactly what \strutbox is supposed to record.
- \vskip-\baselineskip
- %
- % \vadjust-items are inserted at the left edge of the type. So
- % the \llap here moves out into the left-hand margin.
- \llap{%
- %
- % For a thicker or thinner bar, change the `1pt'.
- \vrule height\baselineskip width1pt
- %
- % This is the space between the bar and the text.
- \hskip 12pt
- }%
- }%
-}
+\def\finalout{\overfullrule=0pt }
% Sometimes it is convenient to have everything in the transcript file
% and nothing on the terminal. We don't just call \tracingall here,
@@ -243,7 +219,7 @@
\tracingmacros2
\tracingrestores1
\showboxbreadth\maxdimen \showboxdepth\maxdimen
- \ifx\eTeXversion\undefined\else % etex gives us more logging
+ \ifx\eTeXversion\thisisundefined\else % etex gives us more logging
\tracingscantokens1
\tracingifs1
\tracinggroups1
@@ -254,6 +230,13 @@
\errorcontextlines16
}%
+% @errormsg{MSG}. Do the index-like expansions on MSG, but if things
+% aren't perfect, it's not the end of the world, being an error message,
+% after all.
+%
+\def\errormsg{\begingroup \indexnofonts \doerrormsg}
+\def\doerrormsg#1{\errmessage{#1}}
+
% add check for \lastpenalty to plain's definitions. If the last thing
% we did was a \nobreak, we don't want to insert more space.
%
@@ -264,7 +247,6 @@
\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
\removelastskip\penalty-200\bigskip\fi\fi}
-% For @cropmarks command.
% Do @cropmarks to get crop marks.
%
\newif\ifcropmarks
@@ -355,7 +337,7 @@
% We don't want .vr (or whatever) entries like this:
% \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}}
% "\acronym" won't work when it's read back in;
- % it needs to be
+ % it needs to be
% {\code {{\tt \backslashcurfont }acronym}
\shipout\vbox{%
% Do this early so pdf references go to the beginning of the page.
@@ -461,7 +443,7 @@
\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
-% Each occurence of `\^^M' or `<space>\^^M' is replaced by a single space.
+% Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space.
%
% \argremovec might leave us with trailing space, e.g.,
% @end itemize @c foo
@@ -486,7 +468,7 @@
% to get _exactly_ the rest of the line, we had to prevent such situation.
% We prepended an \empty token at the very beginning and we expand it now,
% just before passing the control to \argtorun.
-% (Similarily, we have to think about #3 of \argcheckspacesY above: it is
+% (Similarly, we have to think about #3 of \argcheckspacesY above: it is
% either the null string, or it ends with \^^M---thus there is no danger
% that a pair of braces would be stripped.
%
@@ -543,12 +525,12 @@
% used to check whether the current environment is the one expected.
%
% Non-false conditionals (@iftex, @ifset) don't fit into this, so they
-% are not treated as enviroments; they don't open a group. (The
+% are not treated as environments; they don't open a group. (The
% implementation of @end takes care not to call \endgroup in this
% special case.)
-% At runtime, environments start with this:
+% At run-time, environments start with this:
\def\startenvironment#1{\begingroup\def\thisenv{#1}}
% initialize
\let\thisenv\empty
@@ -566,7 +548,7 @@
\fi
}
-% Evironment mismatch, #1 expected:
+% Environment mismatch, #1 expected:
\def\badenverr{%
\errhelp = \EMsimple
\errmessage{This command can appear only \inenvironment\temp,
@@ -574,7 +556,7 @@
}
\def\inenvironment#1{%
\ifx#1\empty
- out of any environment%
+ outside of any environment%
\else
in environment \expandafter\string#1%
\fi
@@ -586,7 +568,7 @@
\parseargdef\end{%
\if 1\csname iscond.#1\endcsname
\else
- % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03
+ % The general wording of \badenverr may not be ideal.
\expandafter\checkenv\csname#1\endcsname
\csname E#1\endcsname
\endgroup
@@ -596,85 +578,6 @@
\newhelp\EMsimple{Press RETURN to continue.}
-%% Simple single-character @ commands
-
-% @@ prints an @
-% Kludge this until the fonts are right (grr).
-\def\@{{\tt\char64}}
-
-% This is turned off because it was never documented
-% and you can use @w{...} around a quote to suppress ligatures.
-%% Define @` and @' to be the same as ` and '
-%% but suppressing ligatures.
-%\def\`{{`}}
-%\def\'{{'}}
-
-% Used to generate quoted braces.
-\def\mylbrace {{\tt\char123}}
-\def\myrbrace {{\tt\char125}}
-\let\{=\mylbrace
-\let\}=\myrbrace
-\begingroup
- % Definitions to produce \{ and \} commands for indices,
- % and @{ and @} for the aux/toc files.
- \catcode`\{ = \other \catcode`\} = \other
- \catcode`\[ = 1 \catcode`\] = 2
- \catcode`\! = 0 \catcode`\\ = \other
- !gdef!lbracecmd[\{]%
- !gdef!rbracecmd[\}]%
- !gdef!lbraceatcmd[@{]%
- !gdef!rbraceatcmd[@}]%
-!endgroup
-
-% @comma{} to avoid , parsing problems.
-\let\comma = ,
-
-% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
-% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
-\let\, = \c
-\let\dotaccent = \.
-\def\ringaccent#1{{\accent23 #1}}
-\let\tieaccent = \t
-\let\ubaraccent = \b
-\let\udotaccent = \d
-
-% Other special characters: @questiondown @exclamdown @ordf @ordm
-% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
-\def\questiondown{?`}
-\def\exclamdown{!`}
-\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}}
-\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}}
-
-% Dotless i and dotless j, used for accents.
-\def\imacro{i}
-\def\jmacro{j}
-\def\dotless#1{%
- \def\temp{#1}%
- \ifx\temp\imacro \ptexi
- \else\ifx\temp\jmacro \j
- \else \errmessage{@dotless can be used only with i or j}%
- \fi\fi
-}
-
-% The \TeX{} logo, as in plain, but resetting the spacing so that a
-% period following counts as ending a sentence. (Idea found in latex.)
-%
-\edef\TeX{\TeX \spacefactor=1000 }
-
-% @LaTeX{} logo. Not quite the same results as the definition in
-% latex.ltx, since we use a different font for the raised A; it's most
-% convenient for us to use an explicitly smaller font, rather than using
-% the \scriptstyle font (since we don't reset \scriptstyle and
-% \scriptscriptstyle).
-%
-\def\LaTeX{%
- L\kern-.36em
- {\setbox0=\hbox{T}%
- \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}%
- \kern-.15em
- \TeX
-}
-
% Be sure we're in horizontal mode when doing a tie, since we make space
% equivalent to this in @example-like environments. Otherwise, a space
% at the beginning of a line will start with \penalty -- and
@@ -706,7 +609,7 @@
\def\?{?\spacefactor=\endofsentencespacefactor\space}
% @frenchspacing on|off says whether to put extra space after punctuation.
-%
+%
\def\onword{on}
\def\offword{off}
%
@@ -716,7 +619,7 @@
\else\ifx\temp\offword \plainnonfrenchspacing
\else
\errhelp = \EMsimple
- \errmessage{Unknown @frenchspacing option `\temp', must be on/off}%
+ \errmessage{Unknown @frenchspacing option `\temp', must be on|off}%
\fi\fi
}
@@ -798,15 +701,6 @@ where each line of input produces a line of output.}
\newdimen\mil \mil=0.001in
-% Old definition--didn't work.
-%\parseargdef\need{\par %
-%% This method tries to make TeX break the page naturally
-%% if the depth of the box does not fit.
-%{\baselineskip=0pt%
-%\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak
-%\prevdepth=-1000pt
-%}}
-
\parseargdef\need{%
% Ensure vertical mode, so we don't make a big box in the middle of a
% paragraph.
@@ -870,7 +764,7 @@ where each line of input produces a line of output.}
% @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current
% paragraph. For more general purposes, use the \margin insertion
-% class. WHICH is `l' or `r'.
+% class. WHICH is `l' or `r'. Not documented, written for gawk manual.
%
\newskip\inmarginspacing \inmarginspacing=1cm
\def\strutdepth{\dp\strutbox}
@@ -917,6 +811,36 @@ where each line of input produces a line of output.}
\temp
}
+% @| inserts a changebar to the left of the current line. It should
+% surround any changed text. This approach does *not* work if the
+% change spans more than two lines of output. To handle that, we would
+% have adopt a much more difficult approach (putting marks into the main
+% vertical list for the beginning and end of each change). This command
+% is not documented, not supported, and doesn't work.
+%
+\def\|{%
+ % \vadjust can only be used in horizontal mode.
+ \leavevmode
+ %
+ % Append this vertical mode material after the current line in the output.
+ \vadjust{%
+ % We want to insert a rule with the height and depth of the current
+ % leading; that is exactly what \strutbox is supposed to record.
+ \vskip-\baselineskip
+ %
+ % \vadjust-items are inserted at the left edge of the type. So
+ % the \llap here moves out into the left-hand margin.
+ \llap{%
+ %
+ % For a thicker or thinner bar, change the `1pt'.
+ \vrule height\baselineskip width1pt
+ %
+ % This is the space between the bar and the text.
+ \hskip 12pt
+ }%
+ }%
+}
+
% @include FILE -- \input text of FILE.
%
\def\include{\parseargusing\filenamecatcodes\includezzz}
@@ -924,8 +848,10 @@ where each line of input produces a line of output.}
\pushthisfilestack
\def\thisfile{#1}%
{%
- \makevalueexpandable % we want to expand any @value in FILE.
+ \makevalueexpandable % we want to expand any @value in FILE.
\turnoffactive % and allow special characters in the expansion
+ \indexnofonts % Allow `@@' and other weird things in file names.
+ \wlog{texinfo.tex: doing @include of #1^^J}%
\edef\temp{\noexpand\input #1 }%
%
% This trickery is to read FILE outside of a group, in case it makes
@@ -944,6 +870,8 @@ where each line of input produces a line of output.}
\catcode`>=\other
\catcode`+=\other
\catcode`-=\other
+ \catcode`\`=\other
+ \catcode`\'=\other
}
\def\pushthisfilestack{%
@@ -959,7 +887,7 @@ where each line of input produces a line of output.}
\def\popthisfilestack{\errthisfilestackempty}
\def\errthisfilestackempty{\errmessage{Internal error:
the stack of filenames is empty.}}
-
+%
\def\thisfile{}
% @center line
@@ -967,36 +895,46 @@ where each line of input produces a line of output.}
%
\parseargdef\center{%
\ifhmode
- \let\next\centerH
+ \let\centersub\centerH
\else
- \let\next\centerV
+ \let\centersub\centerV
\fi
- \next{\hfil \ignorespaces#1\unskip \hfil}%
+ \centersub{\hfil \ignorespaces#1\unskip \hfil}%
+ \let\centersub\relax % don't let the definition persist, just in case
}
-\def\centerH#1{%
- {%
- \hfil\break
- \advance\hsize by -\leftskip
- \advance\hsize by -\rightskip
- \line{#1}%
- \break
- }%
+\def\centerH#1{{%
+ \hfil\break
+ \advance\hsize by -\leftskip
+ \advance\hsize by -\rightskip
+ \line{#1}%
+ \break
+}}
+%
+\newcount\centerpenalty
+\def\centerV#1{%
+ % The idea here is the same as in \startdefun, \cartouche, etc.: if
+ % @center is the first thing after a section heading, we need to wipe
+ % out the negative parskip inserted by \sectionheading, but still
+ % prevent a page break here.
+ \centerpenalty = \lastpenalty
+ \ifnum\centerpenalty>10000 \vskip\parskip \fi
+ \ifnum\centerpenalty>9999 \penalty\centerpenalty \fi
+ \line{\kern\leftskip #1\kern\rightskip}%
}
-\def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}}
% @sp n outputs n lines of vertical space
-
+%
\parseargdef\sp{\vskip #1\baselineskip}
% @comment ...line which is ignored...
% @c is the same as @comment
% @ignore ... @end ignore is another way to write a comment
-
+%
\def\comment{\begingroup \catcode`\^^M=\other%
\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
\commentxxx}
{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}}
-
+%
\let\c=\comment
% @paragraphindent NCHARS
@@ -1089,95 +1027,6 @@ where each line of input produces a line of output.}
}
-% @asis just yields its argument. Used with @table, for example.
-%
-\def\asis#1{#1}
-
-% @math outputs its argument in math mode.
-%
-% One complication: _ usually means subscripts, but it could also mean
-% an actual _ character, as in @math{@var{some_variable} + 1}. So make
-% _ active, and distinguish by seeing if the current family is \slfam,
-% which is what @var uses.
-{
- \catcode`\_ = \active
- \gdef\mathunderscore{%
- \catcode`\_=\active
- \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
- }
-}
-% Another complication: we want \\ (and @\) to output a \ character.
-% FYI, plain.tex uses \\ as a temporary control sequence (why?), but
-% this is not advertised and we don't care. Texinfo does not
-% otherwise define @\.
-%
-% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
-\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
-%
-\def\math{%
- \tex
- \mathunderscore
- \let\\ = \mathbackslash
- \mathactive
- $\finishmath
-}
-\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex.
-
-% Some active characters (such as <) are spaced differently in math.
-% We have to reset their definitions in case the @math was an argument
-% to a command which sets the catcodes (such as @item or @section).
-%
-{
- \catcode`^ = \active
- \catcode`< = \active
- \catcode`> = \active
- \catcode`+ = \active
- \gdef\mathactive{%
- \let^ = \ptexhat
- \let< = \ptexless
- \let> = \ptexgtr
- \let+ = \ptexplus
- }
-}
-
-% @bullet and @minus need the same treatment as @math, just above.
-\def\bullet{$\ptexbullet$}
-\def\minus{$-$}
-
-% @dots{} outputs an ellipsis using the current font.
-% We do .5em per period so that it has the same spacing in the cm
-% typewriter fonts as three actual period characters; on the other hand,
-% in other typewriter fonts three periods are wider than 1.5em. So do
-% whichever is larger.
-%
-\def\dots{%
- \leavevmode
- \setbox0=\hbox{...}% get width of three periods
- \ifdim\wd0 > 1.5em
- \dimen0 = \wd0
- \else
- \dimen0 = 1.5em
- \fi
- \hbox to \dimen0{%
- \hskip 0pt plus.25fil
- .\hskip 0pt plus1fil
- .\hskip 0pt plus1fil
- .\hskip 0pt plus.5fil
- }%
-}
-
-% @enddots{} is an end-of-sentence ellipsis.
-%
-\def\enddots{%
- \dots
- \spacefactor=\endofsentencespacefactor
-}
-
-% @comma{} is so commas can be inserted into text without messing up
-% Texinfo's parsing.
-%
-\let\comma = ,
-
% @refill is a no-op.
\let\refill=\relax
@@ -1242,9 +1091,8 @@ where each line of input produces a line of output.}
\newif\ifpdfmakepagedest
% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
-% can be set). So we test for \relax and 0 as well as \undefined,
-% borrowed from ifpdf.sty.
-\ifx\pdfoutput\undefined
+% can be set). So we test for \relax and 0 as well as being undefined.
+\ifx\pdfoutput\thisisundefined
\else
\ifx\pdfoutput\relax
\else
@@ -1259,50 +1107,24 @@ where each line of input produces a line of output.}
% for display in the outlines, and in other places. Thus, we have to
% double any backslashes. Otherwise, a name like "\node" will be
% interpreted as a newline (\n), followed by o, d, e. Not good.
-% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html
-% (and related messages, the final outcome is that it is up to the TeX
-% user to double the backslashes and otherwise make the string valid, so
-% that's what we do).
-
-% double active backslashes.
%
-{\catcode`\@=0 \catcode`\\=\active
- @gdef@activebackslashdouble{%
- @catcode`@\=@active
- @let\=@doublebackslash}
-}
-
-% To handle parens, we must adopt a different approach, since parens are
-% not active characters. hyperref.dtx (which has the same problem as
-% us) handles it with this amazing macro to replace tokens, with minor
-% changes for Texinfo. It is included here under the GPL by permission
-% from the author, Heiko Oberdiek.
-%
-% #1 is the tokens to replace.
-% #2 is the replacement.
-% #3 is the control sequence with the string.
-%
-\def\HyPsdSubst#1#2#3{%
- \def\HyPsdReplace##1#1##2\END{%
- ##1%
- \ifx\\##2\\%
- \else
- #2%
- \HyReturnAfterFi{%
- \HyPsdReplace##2\END
- }%
- \fi
- }%
- \xdef#3{\expandafter\HyPsdReplace#3#1\END}%
-}
-\long\def\HyReturnAfterFi#1\fi{\fi#1}
-
-% #1 is a control sequence in which to do the replacements.
-\def\backslashparens#1{%
- \xdef#1{#1}% redefine it as its expansion; the definition is simply
- % \lastnode when called from \setref -> \pdfmkdest.
- \HyPsdSubst{(}{\realbackslash(}{#1}%
- \HyPsdSubst{)}{\realbackslash)}{#1}%
+% See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and
+% related messages. The final outcome is that it is up to the TeX user
+% to double the backslashes and otherwise make the string valid, so
+% that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to
+% do this reliably, so we use it.
+
+% #1 is a control sequence in which to do the replacements,
+% which we \xdef.
+\def\txiescapepdf#1{%
+ \ifx\pdfescapestring\relax
+ % No primitive available; should we give a warning or log?
+ % Many times it won't matter.
+ \else
+ % The expandable \pdfescapestring primitive escapes parentheses,
+ % backslashes, and other special chars.
+ \xdef#1{\pdfescapestring{#1}}%
+ \fi
}
\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images
@@ -1312,11 +1134,17 @@ output) for that.)}
\ifpdf
%
- % Color manipulation macros based on pdfcolor.tex.
- \def\cmykDarkRed{0.28 1 1 0.35}
- \def\cmykBlack{0 0 0 1}
+ % Color manipulation macros based on pdfcolor.tex,
+ % except using rgb instead of cmyk; the latter is said to render as a
+ % very dark gray on-screen and a very dark halftone in print, instead
+ % of actual black.
+ \def\rgbDarkRed{0.50 0.09 0.12}
+ \def\rgbBlack{0 0 0}
+ %
+ % k sets the color for filling (usual text, etc.);
+ % K sets the color for stroking (thin rules, e.g., normal _'s).
+ \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}}
%
- \def\pdfsetcolor#1{\pdfliteral{#1 k}}
% Set color, and create a mark which defines \thiscolor accordingly,
% so that \makeheadline knows which color to restore.
\def\setcolor#1{%
@@ -1325,7 +1153,7 @@ output) for that.)}
\pdfsetcolor{#1}%
}
%
- \def\maincolor{\cmykBlack}
+ \def\maincolor{\rgbBlack}
\pdfsetcolor{\maincolor}
\edef\thiscolor{\maincolor}
\def\lastcolordefs{}
@@ -1355,42 +1183,47 @@ output) for that.)}
%
% #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
\def\dopdfimage#1#2#3{%
- \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
- \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
+ \def\pdfimagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
+ \def\pdfimageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
%
- % pdftex (and the PDF format) support .png, .jpg, .pdf (among
- % others). Let's try in that order.
+ % pdftex (and the PDF format) support .pdf, .png, .jpg (among
+ % others). Let's try in that order, PDF first since if
+ % someone has a scalable image, presumably better to use that than a
+ % bitmap.
\let\pdfimgext=\empty
\begingroup
- \openin 1 #1.png \ifeof 1
- \openin 1 #1.jpg \ifeof 1
- \openin 1 #1.jpeg \ifeof 1
- \openin 1 #1.JPG \ifeof 1
- \openin 1 #1.pdf \ifeof 1
- \errhelp = \nopdfimagehelp
- \errmessage{Could not find image file #1 for pdf}%
- \else \gdef\pdfimgext{pdf}%
+ \openin 1 #1.pdf \ifeof 1
+ \openin 1 #1.PDF \ifeof 1
+ \openin 1 #1.png \ifeof 1
+ \openin 1 #1.jpg \ifeof 1
+ \openin 1 #1.jpeg \ifeof 1
+ \openin 1 #1.JPG \ifeof 1
+ \errhelp = \nopdfimagehelp
+ \errmessage{Could not find image file #1 for pdf}%
+ \else \gdef\pdfimgext{JPG}%
+ \fi
+ \else \gdef\pdfimgext{jpeg}%
\fi
- \else \gdef\pdfimgext{JPG}%
+ \else \gdef\pdfimgext{jpg}%
\fi
- \else \gdef\pdfimgext{jpeg}%
+ \else \gdef\pdfimgext{png}%
\fi
- \else \gdef\pdfimgext{jpg}%
+ \else \gdef\pdfimgext{PDF}%
\fi
- \else \gdef\pdfimgext{png}%
+ \else \gdef\pdfimgext{pdf}%
\fi
\closein 1
\endgroup
%
- % without \immediate, pdftex seg faults when the same image is
+ % without \immediate, ancient pdftex seg faults when the same image is
% included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
\ifnum\pdftexversion < 14
\immediate\pdfimage
\else
\immediate\pdfximage
\fi
- \ifdim \wd0 >0pt width \imagewidth \fi
- \ifdim \wd2 >0pt height \imageheight \fi
+ \ifdim \wd0 >0pt width \pdfimagewidth \fi
+ \ifdim \wd2 >0pt height \pdfimageheight \fi
\ifnum\pdftexversion<13
#1.\pdfimgext
\else
@@ -1405,10 +1238,9 @@ output) for that.)}
% such as \, aren't expanded when present in a section title.
\indexnofonts
\turnoffactive
- \activebackslashdouble
\makevalueexpandable
\def\pdfdestname{#1}%
- \backslashparens\pdfdestname
+ \txiescapepdf\pdfdestname
\safewhatsit{\pdfdest name{\pdfdestname} xyz}%
}}
%
@@ -1417,8 +1249,8 @@ output) for that.)}
%
% by default, use a color that is dark enough to print on paper as
% nearly black, but still distinguishable for online viewing.
- \def\urlcolor{\cmykDarkRed}
- \def\linkcolor{\cmykDarkRed}
+ \def\urlcolor{\rgbDarkRed}
+ \def\linkcolor{\rgbDarkRed}
\def\endlink{\setcolor{\maincolor}\pdfendlink}
%
% Adding outlines to PDF; macros for calculating structure of outlines
@@ -1440,29 +1272,24 @@ output) for that.)}
% page number. We could generate a destination for the section
% text in the case where a section has no node, but it doesn't
% seem worth the trouble, since most documents are normally structured.
- \def\pdfoutlinedest{#3}%
+ \edef\pdfoutlinedest{#3}%
\ifx\pdfoutlinedest\empty
\def\pdfoutlinedest{#4}%
\else
- % Doubled backslashes in the name.
- {\activebackslashdouble \xdef\pdfoutlinedest{#3}%
- \backslashparens\pdfoutlinedest}%
+ \txiescapepdf\pdfoutlinedest
\fi
%
- % Also double the backslashes in the display string.
- {\activebackslashdouble \xdef\pdfoutlinetext{#1}%
- \backslashparens\pdfoutlinetext}%
+ % Also escape PDF chars in the display string.
+ \edef\pdfoutlinetext{#1}%
+ \txiescapepdf\pdfoutlinetext
%
\pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}%
}
%
\def\pdfmakeoutlines{%
\begingroup
- % Thanh's hack / proper braces in bookmarks
- \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace
- \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
- %
% Read toc silently, to get counts of subentries for \pdfoutline.
+ \def\partentry##1##2##3##4{}% ignore parts in the outlines
\def\numchapentry##1##2##3##4{%
\def\thischapnum{##2}%
\def\thissecnum{0}%
@@ -1516,25 +1343,41 @@ output) for that.)}
% Latin 2 (0xea) gets translated to a | character. Info from
% Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100.
%
- % xx to do this right, we have to translate 8-bit characters to
- % their "best" equivalent, based on the @documentencoding. Right
- % now, I guess we'll just let the pdf reader have its way.
+ % TODO this right, we have to translate 8-bit characters to
+ % their "best" equivalent, based on the @documentencoding. Too
+ % much work for too little return. Just use the ASCII equivalents
+ % we use for the index sort strings.
+ %
\indexnofonts
\setupdatafile
+ % We can have normal brace characters in the PDF outlines, unlike
+ % Texinfo index files. So set that up.
+ \def\{{\lbracecharliteral}%
+ \def\}{\rbracecharliteral}%
\catcode`\\=\active \otherbackslash
\input \tocreadfilename
\endgroup
}
+ {\catcode`[=1 \catcode`]=2
+ \catcode`{=\other \catcode`}=\other
+ \gdef\lbracecharliteral[{]%
+ \gdef\rbracecharliteral[}]%
+ ]
%
\def\skipspaces#1{\def\PP{#1}\def\D{|}%
\ifx\PP\D\let\nextsp\relax
\else\let\nextsp\skipspaces
- \ifx\p\space\else\addtokens{\filename}{\PP}%
- \advance\filenamelength by 1
- \fi
+ \addtokens{\filename}{\PP}%
+ \advance\filenamelength by 1
\fi
\nextsp}
- \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax}
+ \def\getfilename#1{%
+ \filenamelength=0
+ % If we don't expand the argument now, \skipspaces will get
+ % snagged on things like "@value{foo}".
+ \edef\temp{#1}%
+ \expandafter\skipspaces\temp|\relax
+ }
\ifnum\pdftexversion < 14
\let \startlink \pdfannotlink
\else
@@ -1547,11 +1390,15 @@ output) for that.)}
% tried to figure out what each command should do in the context
% of @url. for now, just make @/ a no-op, that's the only one
% people have actually reported a problem with.
- %
+ %
\normalturnoffactive
\def\@{@}%
\let\/=\empty
\makevalueexpandable
+ % do we want to go so far as to use \indexnofonts instead of just
+ % special-casing \var here?
+ \def\var##1{##1}%
+ %
\leavevmode\setcolor{\urlcolor}%
\startlink attr{/Border [0 0 0]}%
user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
@@ -1582,6 +1429,7 @@ output) for that.)}
\setcolor{\linkcolor}#1\endlink}
\def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
\else
+ % non-pdf mode
\let\pdfmkdest = \gobble
\let\pdfurl = \gobble
\let\endlink = \relax
@@ -1612,6 +1460,10 @@ output) for that.)}
\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
\def\tt{\fam=\ttfam \setfontstyle{tt}}
+% Unfortunately, we have to override this for titles and the like, since
+% in those cases "rm" is bold. Sigh.
+\def\rmisbold{\rm\def\curfontstyle{bf}}
+
% Texinfo sort of supports the sans serif font style, which plain TeX does not.
% So we set up a \sf.
\newfam\sffam
@@ -1622,9 +1474,6 @@ output) for that.)}
\def\ttsl{\setfontstyle{ttsl}}
-% Default leading.
-\newdimen\textleading \textleading = 13.2pt
-
% Set the baselineskip to #1, and the lineskip and strut size
% correspondingly. There is no deep meaning behind these magic numbers
% used as factors; they just match (closely enough) what Knuth defined.
@@ -1636,6 +1485,7 @@ output) for that.)}
% can get a sort of poor man's double spacing by redefining this.
\def\baselinefactor{1}
%
+\newdimen\textleading
\def\setleading#1{%
\dimen0 = #1\relax
\normalbaselineskip = \baselinefactor\dimen0
@@ -1657,7 +1507,7 @@ output) for that.)}
% if we are producing pdf, and we have \pdffontattr, then define cmaps.
% (\pdffontattr was introduced many years ago, but people still run
% older pdftex's; it's easy to conditionalize, so we do.)
-\ifpdf \ifx\pdffontattr\undefined \else
+\ifpdf \ifx\pdffontattr\thisisundefined \else
\begingroup
\catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
\catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
@@ -1908,28 +1758,34 @@ end
\fi\fi
-% Set the font macro #1 to the font named #2, adding on the
-% specified font prefix (normally `cm').
+% Set the font macro #1 to the font named \fontprefix#2.
% #3 is the font's design size, #4 is a scale factor, #5 is the CMap
-% encoding (currently only OT1, OT1IT and OT1TT are allowed, pass
-% empty to omit).
+% encoding (only OT1, OT1IT and OT1TT are allowed, or empty to omit).
+% Example:
+% #1 = \textrm
+% #2 = \rmshape
+% #3 = 10
+% #4 = \mainmagstep
+% #5 = OT1
+%
\def\setfont#1#2#3#4#5{%
\font#1=\fontprefix#2#3 scaled #4
\csname cmap#5\endcsname#1%
}
% This is what gets called when #5 of \setfont is empty.
\let\cmap\gobble
-% emacs-page end of cmaps
+%
+% (end of cmaps)
% Use cm as the default font prefix.
% To specify the font prefix, you must define \fontprefix
% before you read in texinfo.tex.
-\ifx\fontprefix\undefined
+\ifx\fontprefix\thisisundefined
\def\fontprefix{cm}
\fi
% Support font families that don't use the same naming scheme as CM.
\def\rmshape{r}
-\def\rmbshape{bx} %where the normal face is bold
+\def\rmbshape{bx} % where the normal face is bold
\def\bfshape{b}
\def\bxshape{bx}
\def\ttshape{tt}
@@ -1944,9 +1800,8 @@ end
\def\scshape{csc}
\def\scbshape{csc}
-% Definitions for a main text size of 11pt. This is the default in
-% Texinfo.
-%
+% Definitions for a main text size of 11pt. (The default in Texinfo.)
+%
\def\definetextfontsizexi{%
% Text fonts (11.2pt, magstep1).
\def\textnominalsize{11pt}
@@ -2009,8 +1864,6 @@ end
\setfont\titlesc\scbshape{10}{\magstep4}{OT1}
\font\titlei=cmmi12 scaled \magstep3
\font\titlesy=cmsy10 scaled \magstep4
-\def\authorrm{\secrm}
-\def\authortt{\sectt}
\def\titleecsize{2074}
% Chapter (and unnumbered) fonts (17.28pt).
@@ -2069,17 +1922,17 @@ end
\font\reducedsy=cmsy10
\def\reducedecsize{1000}
-% reset the current fonts
-\textfonts
+\textleading = 13.2pt % line spacing for 11pt CM
+\textfonts % reset the current fonts
\rm
-} % end of 11pt text font size definitions
+} % end of 11pt text font size definitions, \definetextfontsizexi
% Definitions to make the main text be 10pt Computer Modern, with
% section, chapter, etc., sizes following suit. This is for the GNU
% Press printing of the Emacs 22 manual. Maybe other manuals in the
% future. Used with @smallbook, which sets the leading to 12pt.
-%
+%
\def\definetextfontsizex{%
% Text fonts (10pt).
\def\textnominalsize{10pt}
@@ -2142,8 +1995,6 @@ end
\setfont\titlesc\scbshape{10}{\magstep4}{OT1}
\font\titlei=cmmi12 scaled \magstep3
\font\titlesy=cmsy10 scaled \magstep4
-\def\authorrm{\secrm}
-\def\authortt{\sectt}
\def\titleecsize{2074}
% Chapter fonts (14.4pt).
@@ -2170,7 +2021,7 @@ end
\setfont\secsf\sfbshape{12}{1000}{OT1}
\let\secbf\secrm
\setfont\secsc\scbshape{10}{\magstep1}{OT1}
-\font\seci=cmmi12
+\font\seci=cmmi12
\font\secsy=cmsy10 scaled \magstep1
\def\sececsize{1200}
@@ -2202,29 +2053,28 @@ end
\font\reducedsy=cmsy9
\def\reducedecsize{0900}
-% reduce space between paragraphs
-\divide\parskip by 2
-
-% reset the current fonts
-\textfonts
+\divide\parskip by 2 % reduce space between paragraphs
+\textleading = 12pt % line spacing for 10pt CM
+\textfonts % reset the current fonts
\rm
-} % end of 10pt text font size definitions
+} % end of 10pt text font size definitions, \definetextfontsizex
% We provide the user-level command
% @fonttextsize 10
% (or 11) to redefine the text font size. pt is assumed.
-%
-\def\xword{10}
+%
\def\xiword{11}
+\def\xword{10}
+\def\xwordpt{10pt}
%
\parseargdef\fonttextsize{%
\def\textsizearg{#1}%
- \wlog{doing @fonttextsize \textsizearg}%
+ %\wlog{doing @fonttextsize \textsizearg}%
%
% Set \globaldefs so that documents can use this inside @tex, since
% makeinfo 4.8 does not support it, but we need it nonetheless.
- %
+ %
\begingroup \globaldefs=1
\ifx\textsizearg\xword \definetextfontsizex
\else \ifx\textsizearg\xiword \definetextfontsizexi
@@ -2274,8 +2124,8 @@ end
\let\tenttsl=\titlettsl
\def\curfontsize{title}%
\def\lsize{chap}\def\lllsize{subsec}%
- \resetmathfonts \setleading{25pt}}
-\def\titlefont#1{{\titlefonts\rm #1}}
+ \resetmathfonts \setleading{27pt}}
+\def\titlefont#1{{\titlefonts\rmisbold #1}}
\def\chapfonts{%
\let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
\let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
@@ -2326,6 +2176,16 @@ end
\def\lsize{smaller}\def\lllsize{smaller}%
\resetmathfonts \setleading{9.5pt}}
+% Fonts for short table of contents.
+\setfont\shortcontrm\rmshape{12}{1000}{OT1}
+\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12
+\setfont\shortcontsl\slshape{12}{1000}{OT1}
+\setfont\shortconttt\ttshape{12}{1000}{OT1TT}
+
+% Define these just so they can be easily changed for other fonts.
+\def\angleleft{$\langle$}
+\def\angleright{$\rangle$}
+
% Set the fonts to use with the @small... environments.
\let\smallexamplefonts = \smallfonts
@@ -2339,53 +2199,215 @@ end
%
% By the way, for comparison, here's what fits with @example (10pt):
% 8.5x11=71 smallbook=60 a4=75 a5=58
-%
-% I wish the USA used A4 paper.
% --karl, 24jan03.
-
% Set up the default fonts, so we can use them for creating boxes.
%
\definetextfontsizexi
-% Define these so they can be easily changed for other fonts.
-\def\angleleft{$\langle$}
-\def\angleright{$\rangle$}
+
+\message{markup,}
+
+% Check if we are currently using a typewriter font. Since all the
+% Computer Modern typewriter fonts have zero interword stretch (and
+% shrink), and it is reasonable to expect all typewriter fonts to have
+% this property, we can check that font parameter.
+%
+\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
+
+% Markup style infrastructure. \defmarkupstylesetup\INITMACRO will
+% define and register \INITMACRO to be called on markup style changes.
+% \INITMACRO can check \currentmarkupstyle for the innermost
+% style and the set of \ifmarkupSTYLE switches for all styles
+% currently in effect.
+\newif\ifmarkupvar
+\newif\ifmarkupsamp
+\newif\ifmarkupkey
+%\newif\ifmarkupfile % @file == @samp.
+%\newif\ifmarkupoption % @option == @samp.
+\newif\ifmarkupcode
+\newif\ifmarkupkbd
+%\newif\ifmarkupenv % @env == @code.
+%\newif\ifmarkupcommand % @command == @code.
+\newif\ifmarkuptex % @tex (and part of @math, for now).
+\newif\ifmarkupexample
+\newif\ifmarkupverb
+\newif\ifmarkupverbatim
+
+\let\currentmarkupstyle\empty
+
+\def\setupmarkupstyle#1{%
+ \csname markup#1true\endcsname
+ \def\currentmarkupstyle{#1}%
+ \markupstylesetup
+}
+
+\let\markupstylesetup\empty
+
+\def\defmarkupstylesetup#1{%
+ \expandafter\def\expandafter\markupstylesetup
+ \expandafter{\markupstylesetup #1}%
+ \def#1%
+}
+
+% Markup style setup for left and right quotes.
+\defmarkupstylesetup\markupsetuplq{%
+ \expandafter\let\expandafter \temp
+ \csname markupsetuplq\currentmarkupstyle\endcsname
+ \ifx\temp\relax \markupsetuplqdefault \else \temp \fi
+}
+
+\defmarkupstylesetup\markupsetuprq{%
+ \expandafter\let\expandafter \temp
+ \csname markupsetuprq\currentmarkupstyle\endcsname
+ \ifx\temp\relax \markupsetuprqdefault \else \temp \fi
+}
+
+{
+\catcode`\'=\active
+\catcode`\`=\active
+
+\gdef\markupsetuplqdefault{\let`\lq}
+\gdef\markupsetuprqdefault{\let'\rq}
+
+\gdef\markupsetcodequoteleft{\let`\codequoteleft}
+\gdef\markupsetcodequoteright{\let'\codequoteright}
+
+\gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft}
+}
+
+\let\markupsetuplqcode \markupsetcodequoteleft
+\let\markupsetuprqcode \markupsetcodequoteright
+%
+\let\markupsetuplqexample \markupsetcodequoteleft
+\let\markupsetuprqexample \markupsetcodequoteright
+%
+\let\markupsetuplqsamp \markupsetcodequoteleft
+\let\markupsetuprqsamp \markupsetcodequoteright
+%
+\let\markupsetuplqverb \markupsetcodequoteleft
+\let\markupsetuprqverb \markupsetcodequoteright
+%
+\let\markupsetuplqverbatim \markupsetcodequoteleft
+\let\markupsetuprqverbatim \markupsetcodequoteright
+
+\let\markupsetuplqkbd \markupsetnoligaturesquoteleft
+
+% Allow an option to not use regular directed right quote/apostrophe
+% (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
+% The undirected quote is ugly, so don't make it the default, but it
+% works for pasting with more pdf viewers (at least evince), the
+% lilypond developers report. xpdf does work with the regular 0x27.
+%
+\def\codequoteright{%
+ \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
+ \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
+ '%
+ \else \char'15 \fi
+ \else \char'15 \fi
+}
+%
+% and a similar option for the left quote char vs. a grave accent.
+% Modern fonts display ASCII 0x60 as a grave accent, so some people like
+% the code environments to do likewise.
+%
+\def\codequoteleft{%
+ \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax
+ \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
+ % [Knuth] pp. 380,381,391
+ % \relax disables Spanish ligatures ?` and !` of \tt font.
+ \relax`%
+ \else \char'22 \fi
+ \else \char'22 \fi
+}
+
+% Commands to set the quote options.
+%
+\parseargdef\codequoteundirected{%
+ \def\temp{#1}%
+ \ifx\temp\onword
+ \expandafter\let\csname SETtxicodequoteundirected\endcsname
+ = t%
+ \else\ifx\temp\offword
+ \expandafter\let\csname SETtxicodequoteundirected\endcsname
+ = \relax
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}%
+ \fi\fi
+}
+%
+\parseargdef\codequotebacktick{%
+ \def\temp{#1}%
+ \ifx\temp\onword
+ \expandafter\let\csname SETtxicodequotebacktick\endcsname
+ = t%
+ \else\ifx\temp\offword
+ \expandafter\let\csname SETtxicodequotebacktick\endcsname
+ = \relax
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}%
+ \fi\fi
+}
+
+% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
+\def\noligaturesquoteleft{\relax\lq}
% Count depth in font-changes, for error checks
\newcount\fontdepth \fontdepth=0
-% Fonts for short table of contents.
-\setfont\shortcontrm\rmshape{12}{1000}{OT1}
-\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12
-\setfont\shortcontsl\slshape{12}{1000}{OT1}
-\setfont\shortconttt\ttshape{12}{1000}{OT1TT}
+% Font commands.
-%% Add scribe-like font environments, plus @l for inline lisp (usually sans
-%% serif) and @ii for TeX italic
+% #1 is the font command (\sl or \it), #2 is the text to slant.
+% If we are in a monospaced environment, however, 1) always use \ttsl,
+% and 2) do not add an italic correction.
+\def\dosmartslant#1#2{%
+ \ifusingtt
+ {{\ttsl #2}\let\next=\relax}%
+ {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}%
+ \next
+}
+\def\smartslanted{\dosmartslant\sl}
+\def\smartitalic{\dosmartslant\it}
-% \smartitalic{ARG} outputs arg in italics, followed by an italic correction
-% unless the following character is such as not to need one.
-\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else
- \ptexslash\fi\fi\fi}
-\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx}
-\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx}
+% Output an italic correction unless \next (presumed to be the following
+% character) is such as not to need one.
+\def\smartitaliccorrection{%
+ \ifx\next,%
+ \else\ifx\next-%
+ \else\ifx\next.%
+ \else\ptexslash
+ \fi\fi\fi
+ \aftersmartic
+}
-% like \smartslanted except unconditionally uses \ttsl.
+% like \smartslanted except unconditionally uses \ttsl, and no ic.
% @var is set to this for defun arguments.
-\def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx}
+\def\ttslanted#1{{\ttsl #1}}
-% like \smartslanted except unconditionally use \sl. We never want
+% @cite is like \smartslanted except unconditionally use \sl. We never want
% ttsl for book titles, do we?
-\def\cite#1{{\sl #1}\futurelet\next\smartitalicx}
+\def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection}
+
+\def\aftersmartic{}
+\def\var#1{%
+ \let\saveaftersmartic = \aftersmartic
+ \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}%
+ \smartslanted{#1}%
+}
\let\i=\smartitalic
\let\slanted=\smartslanted
-\let\var=\smartslanted
\let\dfn=\smartslanted
\let\emph=\smartitalic
-% @b, explicit bold.
+% Explicit font changes: @r, @sc, undocumented @ii.
+\def\r#1{{\rm #1}} % roman font
+\def\sc#1{{\smallcaps#1}} % smallcaps font
+\def\ii#1{{\it #1}} % italic font
+
+% @b, explicit bold. Also @strong.
\def\b#1{{\bf #1}}
\let\strong=\b
@@ -2417,22 +2439,35 @@ end
\catcode`@=\other
\def\endofsentencespacefactor{3000}% default
+% @t, explicit typewriter.
\def\t#1{%
{\tt \rawbackslash \plainfrenchspacing #1}%
\null
}
-\def\samp#1{`\tclose{#1}'\null}
-\setfont\keyrm\rmshape{8}{1000}{OT1}
-\font\keysy=cmsy9
-\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
- \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
- \vbox{\hrule\kern-0.4pt
- \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
- \kern-0.4pt\hrule}%
- \kern-.06em\raise0.4pt\hbox{\angleright}}}}
-\def\key #1{{\nohyphenation \uppercase{#1}}\null}
-% The old definition, with no lozenge:
-%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
+
+% @samp.
+\def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}}
+
+% definition of @key that produces a lozenge. Doesn't adjust to text size.
+%\setfont\keyrm\rmshape{8}{1000}{OT1}
+%\font\keysy=cmsy9
+%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
+% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
+% \vbox{\hrule\kern-0.4pt
+% \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
+% \kern-0.4pt\hrule}%
+% \kern-.06em\raise0.4pt\hbox{\angleright}}}}
+
+% definition of @key with no lozenge. If the current font is already
+% monospace, don't change it; that way, we respect @kbdinputstyle. But
+% if it isn't monospace, then use \tt.
+%
+\def\key#1{{\setupmarkupstyle{key}%
+ \nohyphenation
+ \ifmonospace\else\tt\fi
+ #1}\null}
+
+% ctrl is no longer a Texinfo command.
\def\ctrl #1{{\tt \rawbackslash \hat}#1}
% @file, @option are the same as @samp.
@@ -2459,7 +2494,7 @@ end
\plainfrenchspacing
#1%
}%
- \null
+ \null % reset spacefactor to 1000
}
% We *must* turn on hyphenation at `-' and `_' in @code.
@@ -2474,11 +2509,11 @@ end
{
\catcode`\-=\active \catcode`\_=\active
\catcode`\'=\active \catcode`\`=\active
+ \global\let'=\rq \global\let`=\lq % default definitions
%
\global\def\code{\begingroup
- \catcode\rquoteChar=\active \catcode\lquoteChar=\active
- \let'\codequoteright \let`\codequoteleft
- %
+ \setupmarkupstyle{code}%
+ % The following should really be moved into \setupmarkupstyle handlers.
\catcode\dashChar=\active \catcode\underChar=\active
\ifallowcodebreaks
\let-\codedash
@@ -2491,6 +2526,8 @@ end
}
}
+\def\codex #1{\tclose{#1}\endgroup}
+
\def\realdash{-}
\def\codedash{-\discretionary{}{}{}}
\def\codeunder{%
@@ -2504,13 +2541,12 @@ end
\discretionary{}{}{}}%
{\_}%
}
-\def\codex #1{\tclose{#1}\endgroup}
% An additional complication: the above will allow breaks after, e.g.,
% each of the four underscores in __typeof__. This is undesirable in
% some manuals, especially if they don't have long identifiers in
% general. @allowcodebreaks provides a way to control this.
-%
+%
\newif\ifallowcodebreaks \allowcodebreakstrue
\def\keywordtrue{true}
@@ -2524,62 +2560,18 @@ end
\allowcodebreaksfalse
\else
\errhelp = \EMsimple
- \errmessage{Unknown @allowcodebreaks option `\txiarg'}%
+ \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}%
\fi\fi
}
-% @kbd is like @code, except that if the argument is just one @key command,
-% then @kbd has no effect.
-
-% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
-% `example' (@kbd uses ttsl only inside of @example and friends),
-% or `code' (@kbd uses normal tty font always).
-\parseargdef\kbdinputstyle{%
- \def\txiarg{#1}%
- \ifx\txiarg\worddistinct
- \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
- \else\ifx\txiarg\wordexample
- \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
- \else\ifx\txiarg\wordcode
- \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
- \else
- \errhelp = \EMsimple
- \errmessage{Unknown @kbdinputstyle option `\txiarg'}%
- \fi\fi\fi
-}
-\def\worddistinct{distinct}
-\def\wordexample{example}
-\def\wordcode{code}
-
-% Default is `distinct.'
-\kbdinputstyle distinct
-
-\def\xkey{\key}
-\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
-\ifx\one\xkey\ifx\threex\three \key{#2}%
-\else{\tclose{\kbdfont\look}}\fi
-\else{\tclose{\kbdfont\look}}\fi}
-
-% For @indicateurl, @env, @command quotes seem unnecessary, so use \code.
-\let\indicateurl=\code
-\let\env=\code
-\let\command=\code
-
-% @clicksequence{File @click{} Open ...}
-\def\clicksequence#1{\begingroup #1\endgroup}
-
-% @clickstyle @arrow (by default)
-\parseargdef\clickstyle{\def\click{#1}}
-\def\click{\arrow}
-
% @uref (abbreviation for `urlref') takes an optional (comma-separated)
% second argument specifying the text to display and an optional third
% arg as text to display instead of (rather than in addition to) the url
-% itself. First (mandatory) arg is the url. Perhaps eventually put in
-% a hypertex \special here.
-%
-\def\uref#1{\douref #1,,,\finish}
-\def\douref#1,#2,#3,#4\finish{\begingroup
+% itself. First (mandatory) arg is the url.
+% (This \urefnobreak definition isn't used now, leaving it for a while
+% for comparison.)
+\def\urefnobreak#1{\dourefnobreak #1,,,\finish}
+\def\dourefnobreak#1,#2,#3,#4\finish{\begingroup
\unsepspaces
\pdfurl{#1}%
\setbox0 = \hbox{\ignorespaces #3}%
@@ -2600,6 +2592,103 @@ end
\endlink
\endgroup}
+% This \urefbreak definition is the active one.
+\def\urefbreak{\begingroup \urefcatcodes \dourefbreak}
+\let\uref=\urefbreak
+\def\dourefbreak#1{\urefbreakfinish #1,,,\finish}
+\def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example
+ \unsepspaces
+ \pdfurl{#1}%
+ \setbox0 = \hbox{\ignorespaces #3}%
+ \ifdim\wd0 > 0pt
+ \unhbox0 % third arg given, show only that
+ \else
+ \setbox0 = \hbox{\ignorespaces #2}%
+ \ifdim\wd0 > 0pt
+ \ifpdf
+ \unhbox0 % PDF: 2nd arg given, show only it
+ \else
+ \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url
+ \fi
+ \else
+ \urefcode{#1}% only url given, so show it
+ \fi
+ \fi
+ \endlink
+\endgroup}
+
+% Allow line breaks around only a few characters (only).
+\def\urefcatcodes{%
+ \catcode\ampChar=\active \catcode\dotChar=\active
+ \catcode\hashChar=\active \catcode\questChar=\active
+ \catcode\slashChar=\active
+}
+{
+ \urefcatcodes
+ %
+ \global\def\urefcode{\begingroup
+ \setupmarkupstyle{code}%
+ \urefcatcodes
+ \let&\urefcodeamp
+ \let.\urefcodedot
+ \let#\urefcodehash
+ \let?\urefcodequest
+ \let/\urefcodeslash
+ \codex
+ }
+ %
+ % By default, they are just regular characters.
+ \global\def&{\normalamp}
+ \global\def.{\normaldot}
+ \global\def#{\normalhash}
+ \global\def?{\normalquest}
+ \global\def/{\normalslash}
+}
+
+% we put a little stretch before and after the breakable chars, to help
+% line breaking of long url's. The unequal skips make look better in
+% cmtt at least, especially for dots.
+\def\urefprestretch{\urefprebreak \hskip0pt plus.13em }
+\def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em }
+%
+\def\urefcodeamp{\urefprestretch \&\urefpoststretch}
+\def\urefcodedot{\urefprestretch .\urefpoststretch}
+\def\urefcodehash{\urefprestretch \#\urefpoststretch}
+\def\urefcodequest{\urefprestretch ?\urefpoststretch}
+\def\urefcodeslash{\futurelet\next\urefcodeslashfinish}
+{
+ \catcode`\/=\active
+ \global\def\urefcodeslashfinish{%
+ \urefprestretch \slashChar
+ % Allow line break only after the final / in a sequence of
+ % slashes, to avoid line break between the slashes in http://.
+ \ifx\next/\else \urefpoststretch \fi
+ }
+}
+
+% One more complication: by default we'll break after the special
+% characters, but some people like to break before the special chars, so
+% allow that. Also allow no breaking at all, for manual control.
+%
+\parseargdef\urefbreakstyle{%
+ \def\txiarg{#1}%
+ \ifx\txiarg\wordnone
+ \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak}
+ \else\ifx\txiarg\wordbefore
+ \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak}
+ \else\ifx\txiarg\wordafter
+ \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak}
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @urefbreakstyle setting `\txiarg'}%
+ \fi\fi\fi
+}
+\def\wordafter{after}
+\def\wordbefore{before}
+\def\wordnone{none}
+
+\urefbreakstyle after
+
% @url synonym for @uref, since that's how everyone uses it.
%
\let\url=\uref
@@ -2621,34 +2710,65 @@ end
\let\email=\uref
\fi
-% Check if we are currently using a typewriter font. Since all the
-% Computer Modern typewriter fonts have zero interword stretch (and
-% shrink), and it is reasonable to expect all typewriter fonts to have
-% this property, we can check that font parameter.
-%
-\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
+% @kbd is like @code, except that if the argument is just one @key command,
+% then @kbd has no effect.
+\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}}
+
+% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
+% `example' (@kbd uses ttsl only inside of @example and friends),
+% or `code' (@kbd uses normal tty font always).
+\parseargdef\kbdinputstyle{%
+ \def\txiarg{#1}%
+ \ifx\txiarg\worddistinct
+ \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
+ \else\ifx\txiarg\wordexample
+ \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
+ \else\ifx\txiarg\wordcode
+ \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @kbdinputstyle setting `\txiarg'}%
+ \fi\fi\fi
+}
+\def\worddistinct{distinct}
+\def\wordexample{example}
+\def\wordcode{code}
+
+% Default is `distinct'.
+\kbdinputstyle distinct
+
+\def\xkey{\key}
+\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
+\ifx\one\xkey\ifx\threex\three \key{#2}%
+\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
+\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi}
+
+% For @indicateurl, @env, @command quotes seem unnecessary, so use \code.
+\let\indicateurl=\code
+\let\env=\code
+\let\command=\code
+
+% @clicksequence{File @click{} Open ...}
+\def\clicksequence#1{\begingroup #1\endgroup}
+
+% @clickstyle @arrow (by default)
+\parseargdef\clickstyle{\def\click{#1}}
+\def\click{\arrow}
% Typeset a dimension, e.g., `in' or `pt'. The only reason for the
% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
%
\def\dmn#1{\thinspace #1}
-\def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par}
-
% @l was never documented to mean ``switch to the Lisp font'',
% and it is not used as such in any manual I can find. We need it for
% Polish suppressed-l. --karl, 22sep96.
%\def\l#1{{\li #1}\null}
-% Explicit font changes: @r, @sc, undocumented @ii.
-\def\r#1{{\rm #1}} % roman font
-\def\sc#1{{\smallcaps#1}} % smallcaps font
-\def\ii#1{{\it #1}} % italic font
-
% @acronym for "FBI", "NATO", and the like.
% We print this one point size smaller, since it's intended for
% all-uppercase.
-%
+%
\def\acronym#1{\doacronym #1,,\finish}
\def\doacronym#1,#2,#3\finish{%
{\selectfonts\lsize #1}%
@@ -2656,11 +2776,12 @@ end
\ifx\temp\empty \else
\space ({\unsepspaces \ignorespaces \temp \unskip})%
\fi
+ \null % reset \spacefactor=1000
}
% @abbr for "Comput. J." and the like.
% No font change, but don't do end-of-sentence spacing.
-%
+%
\def\abbr#1{\doabbr #1,,\finish}
\def\doabbr#1,#2,#3\finish{%
{\plainfrenchspacing #1}%
@@ -2668,7 +2789,254 @@ end
\ifx\temp\empty \else
\space ({\unsepspaces \ignorespaces \temp \unskip})%
\fi
+ \null % reset \spacefactor=1000
+}
+
+% @asis just yields its argument. Used with @table, for example.
+%
+\def\asis#1{#1}
+
+% @math outputs its argument in math mode.
+%
+% One complication: _ usually means subscripts, but it could also mean
+% an actual _ character, as in @math{@var{some_variable} + 1}. So make
+% _ active, and distinguish by seeing if the current family is \slfam,
+% which is what @var uses.
+{
+ \catcode`\_ = \active
+ \gdef\mathunderscore{%
+ \catcode`\_=\active
+ \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
+ }
+}
+% Another complication: we want \\ (and @\) to output a math (or tt) \.
+% FYI, plain.tex uses \\ as a temporary control sequence (for no
+% particular reason), but this is not advertised and we don't care.
+%
+% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
+\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
+%
+\def\math{%
+ \tex
+ \mathunderscore
+ \let\\ = \mathbackslash
+ \mathactive
+ % make the texinfo accent commands work in math mode
+ \let\"=\ddot
+ \let\'=\acute
+ \let\==\bar
+ \let\^=\hat
+ \let\`=\grave
+ \let\u=\breve
+ \let\v=\check
+ \let\~=\tilde
+ \let\dotaccent=\dot
+ $\finishmath
}
+\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex.
+
+% Some active characters (such as <) are spaced differently in math.
+% We have to reset their definitions in case the @math was an argument
+% to a command which sets the catcodes (such as @item or @section).
+%
+{
+ \catcode`^ = \active
+ \catcode`< = \active
+ \catcode`> = \active
+ \catcode`+ = \active
+ \catcode`' = \active
+ \gdef\mathactive{%
+ \let^ = \ptexhat
+ \let< = \ptexless
+ \let> = \ptexgtr
+ \let+ = \ptexplus
+ \let' = \ptexquoteright
+ }
+}
+
+% @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}.
+% Ignore unless FMTNAME == tex; then it is like @iftex and @tex,
+% except specified as a normal braced arg, so no newlines to worry about.
+%
+\def\outfmtnametex{tex}
+%
+\long\def\inlinefmt#1{\doinlinefmt #1,\finish}
+\long\def\doinlinefmt#1,#2,\finish{%
+ \def\inlinefmtname{#1}%
+ \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi
+}
+% For raw, must switch into @tex before parsing the argument, to avoid
+% setting catcodes prematurely. Doing it this way means that, for
+% example, @inlineraw{html, foo{bar} gets a parse error instead of being
+% ignored. But this isn't important because if people want a literal
+% *right* brace they would have to use a command anyway, so they may as
+% well use a command to get a left brace too. We could re-use the
+% delimiter character idea from \verb, but it seems like overkill.
+%
+\long\def\inlineraw{\tex \doinlineraw}
+\long\def\doinlineraw#1{\doinlinerawtwo #1,\finish}
+\def\doinlinerawtwo#1,#2,\finish{%
+ \def\inlinerawname{#1}%
+ \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi
+ \endgroup % close group opened by \tex.
+}
+
+
+\message{glyphs,}
+% and logos.
+
+% @@ prints an @, as does @atchar{}.
+\def\@{\char64 }
+\let\atchar=\@
+
+% @{ @} @lbracechar{} @rbracechar{} all generate brace characters.
+% Unless we're in typewriter, use \ecfont because the CM text fonts do
+% not have braces, and we don't want to switch into math.
+\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}}
+\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}}
+\let\{=\mylbrace \let\lbracechar=\{
+\let\}=\myrbrace \let\rbracechar=\}
+\begingroup
+ % Definitions to produce \{ and \} commands for indices,
+ % and @{ and @} for the aux/toc files.
+ \catcode`\{ = \other \catcode`\} = \other
+ \catcode`\[ = 1 \catcode`\] = 2
+ \catcode`\! = 0 \catcode`\\ = \other
+ !gdef!lbracecmd[\{]%
+ !gdef!rbracecmd[\}]%
+ !gdef!lbraceatcmd[@{]%
+ !gdef!rbraceatcmd[@}]%
+!endgroup
+
+% @comma{} to avoid , parsing problems.
+\let\comma = ,
+
+% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
+% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
+\let\, = \ptexc
+\let\dotaccent = \ptexdot
+\def\ringaccent#1{{\accent23 #1}}
+\let\tieaccent = \ptext
+\let\ubaraccent = \ptexb
+\let\udotaccent = \d
+
+% Other special characters: @questiondown @exclamdown @ordf @ordm
+% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
+\def\questiondown{?`}
+\def\exclamdown{!`}
+\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}}
+\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}}
+
+% Dotless i and dotless j, used for accents.
+\def\imacro{i}
+\def\jmacro{j}
+\def\dotless#1{%
+ \def\temp{#1}%
+ \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
+ \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
+ \else \errmessage{@dotless can be used only with i or j}%
+ \fi\fi
+}
+
+% The \TeX{} logo, as in plain, but resetting the spacing so that a
+% period following counts as ending a sentence. (Idea found in latex.)
+%
+\edef\TeX{\TeX \spacefactor=1000 }
+
+% @LaTeX{} logo. Not quite the same results as the definition in
+% latex.ltx, since we use a different font for the raised A; it's most
+% convenient for us to use an explicitly smaller font, rather than using
+% the \scriptstyle font (since we don't reset \scriptstyle and
+% \scriptscriptstyle).
+%
+\def\LaTeX{%
+ L\kern-.36em
+ {\setbox0=\hbox{T}%
+ \vbox to \ht0{\hbox{%
+ \ifx\textnominalsize\xwordpt
+ % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX.
+ % Revert to plain's \scriptsize, which is 7pt.
+ \count255=\the\fam $\fam\count255 \scriptstyle A$%
+ \else
+ % For 11pt, we can use our lllsize.
+ \selectfonts\lllsize A%
+ \fi
+ }%
+ \vss
+ }}%
+ \kern-.15em
+ \TeX
+}
+
+% Some math mode symbols.
+\def\bullet{$\ptexbullet$}
+\def\geq{\ifmmode \ge\else $\ge$\fi}
+\def\leq{\ifmmode \le\else $\le$\fi}
+\def\minus{\ifmmode -\else $-$\fi}
+
+% @dots{} outputs an ellipsis using the current font.
+% We do .5em per period so that it has the same spacing in the cm
+% typewriter fonts as three actual period characters; on the other hand,
+% in other typewriter fonts three periods are wider than 1.5em. So do
+% whichever is larger.
+%
+\def\dots{%
+ \leavevmode
+ \setbox0=\hbox{...}% get width of three periods
+ \ifdim\wd0 > 1.5em
+ \dimen0 = \wd0
+ \else
+ \dimen0 = 1.5em
+ \fi
+ \hbox to \dimen0{%
+ \hskip 0pt plus.25fil
+ .\hskip 0pt plus1fil
+ .\hskip 0pt plus1fil
+ .\hskip 0pt plus.5fil
+ }%
+}
+
+% @enddots{} is an end-of-sentence ellipsis.
+%
+\def\enddots{%
+ \dots
+ \spacefactor=\endofsentencespacefactor
+}
+
+% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
+%
+% Since these characters are used in examples, they should be an even number of
+% \tt widths. Each \tt character is 1en, so two makes it 1em.
+%
+\def\point{$\star$}
+\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}}
+\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
+\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}}
+\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
+\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}}
+
+% The @error{} command.
+% Adapted from the TeXbook's \boxit.
+%
+\newbox\errorbox
+%
+{\tentt \global\dimen0 = 3em}% Width of the box.
+\dimen2 = .55pt % Thickness of rules
+% The text. (`r' is open on the right, `e' somewhat less so on the left.)
+\setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt}
+%
+\setbox\errorbox=\hbox to \dimen0{\hfil
+ \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
+ \advance\hsize by -2\dimen2 % Rules.
+ \vbox{%
+ \hrule height\dimen2
+ \hbox{\vrule width\dimen2 \kern3pt % Space to left of text.
+ \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
+ \kern3pt\vrule width\dimen2}% Space to right.
+ \hrule height\dimen2}
+ \hfil}
+%
+\def\error{\leavevmode\lower.7ex\copy\errorbox}
% @pounds{} is a sterling sign, which Knuth put in the CM italic font.
%
@@ -2679,52 +3047,59 @@ end
% Theiling, which support regular, slanted, bold and bold slanted (and
% "outlined" (blackboard board, sort of) versions, which we don't need).
% It is available from http://www.ctan.org/tex-archive/fonts/eurosym.
-%
+%
% Although only regular is the truly official Euro symbol, we ignore
% that. The Euro is designed to be slightly taller than the regular
% font height.
-%
+%
% feymr - regular
% feymo - slanted
% feybr - bold
% feybo - bold slanted
-%
+%
% There is no good (free) typewriter version, to my knowledge.
% A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide.
% Hmm.
-%
+%
% Also doesn't work in math. Do we need to do math with euro symbols?
% Hope not.
-%
-%
+%
+%
\def\euro{{\eurofont e}}
\def\eurofont{%
% We set the font at each command, rather than predefining it in
% \textfonts and the other font-switching commands, so that
% installations which never need the symbol don't have to have the
% font installed.
- %
+ %
% There is only one designed size (nominal 10pt), so we always scale
% that to the current nominal size.
- %
+ %
% By the way, simply using "at 1em" works for cmr10 and the like, but
% does not work for cmbx10 and other extended/shrunken fonts.
- %
+ %
\def\eurosize{\csname\curfontsize nominalsize\endcsname}%
%
- \ifx\curfontstyle\bfstylename
+ \ifx\curfontstyle\bfstylename
% bold:
\font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize
- \else
+ \else
% regular:
\font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize
\fi
\thiseurofont
}
-% Hacks for glyphs from the EC fonts similar to \euro. We don't
-% use \let for the aliases, because sometimes we redefine the original
-% macro, and the alias should reflect the redefinition.
+% Glyphs from the EC fonts. We don't use \let for the aliases, because
+% sometimes we redefine the original macro, and the alias should reflect
+% the redefinition.
+%
+% Use LaTeX names for the Icelandic letters.
+\def\DH{{\ecfont \char"D0}} % Eth
+\def\dh{{\ecfont \char"F0}} % eth
+\def\TH{{\ecfont \char"DE}} % Thorn
+\def\th{{\ecfont \char"FE}} % thorn
+%
\def\guillemetleft{{\ecfont \char"13}}
\def\guillemotleft{\guillemetleft}
\def\guillemetright{{\ecfont \char"14}}
@@ -2734,8 +3109,36 @@ end
\def\quotedblbase{{\ecfont \char"12}}
\def\quotesinglbase{{\ecfont \char"0D}}
%
+% This positioning is not perfect (see the ogonek LaTeX package), but
+% we have the precomposed glyphs for the most common cases. We put the
+% tests to use those glyphs in the single \ogonek macro so we have fewer
+% dummy definitions to worry about for index entries, etc.
+%
+% ogonek is also used with other letters in Lithuanian (IOU), but using
+% the precomposed glyphs for those is not so easy since they aren't in
+% the same EC font.
+\def\ogonek#1{{%
+ \def\temp{#1}%
+ \ifx\temp\macrocharA\Aogonek
+ \else\ifx\temp\macrochara\aogonek
+ \else\ifx\temp\macrocharE\Eogonek
+ \else\ifx\temp\macrochare\eogonek
+ \else
+ \ecfont \setbox0=\hbox{#1}%
+ \ifdim\ht0=1ex\accent"0C #1%
+ \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}%
+ \fi
+ \fi\fi\fi\fi
+ }%
+}
+\def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A}
+\def\aogonek{{\ecfont \char"A1}}\def\macrochara{a}
+\def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E}
+\def\eogonek{{\ecfont \char"A6}}\def\macrochare{e}
+%
+% Use the ec* fonts (cm-super in outline format) for non-CM glyphs.
\def\ecfont{%
- % We can't distinguish serif/sanserif and italic/slanted, but this
+ % We can't distinguish serif/sans and italic/slanted, but this
% is used for crude hacks anyway (like adding French and German
% quotes to documents typeset with CM, where we lose kerning), so
% hopefully nobody will notice/care.
@@ -2768,8 +3171,8 @@ end
% Laurent Siebenmann reports \Orb undefined with:
% Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38
% so we'll define it if necessary.
-%
-\ifx\Orb\undefined
+%
+\ifx\Orb\thisisundefined
\def\Orb{\mathhexbox20D}
\fi
@@ -2797,8 +3200,9 @@ end
\newif\ifsetshortcontentsaftertitlepage
\let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue
-\parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}%
- \endgroup\page\hbox{}\page}
+\parseargdef\shorttitlepage{%
+ \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}%
+ \endgroup\page\hbox{}\page}
\envdef\titlepage{%
% Open one extra group, as we want to close it in the middle of \Etitlepage.
@@ -2858,17 +3262,14 @@ end
\finishedtitlepagetrue
}
-%%% Macros to be used within @titlepage:
+% Macros to be used within @titlepage:
\let\subtitlerm=\tenrm
\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
-\def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines
- \let\tt=\authortt}
-
\parseargdef\title{%
\checkenv\titlepage
- \leftline{\titlefonts\rm #1}
+ \leftline{\titlefonts\rmisbold #1}
% print a rule at the page bottom also.
\finishedtitlepagefalse
\vskip4pt \hrule height 4pt width \hsize \vskip4pt
@@ -2889,12 +3290,12 @@ end
\else
\checkenv\titlepage
\ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
- {\authorfont \leftline{#1}}%
+ {\secfonts\rmisbold \leftline{#1}}%
\fi
}
-%%% Set up page headings and footings.
+% Set up page headings and footings.
\let\thispage=\folio
@@ -2988,10 +3389,14 @@ end
\def\headings #1 {\csname HEADINGS#1\endcsname}
-\def\HEADINGSoff{%
-\global\evenheadline={\hfil} \global\evenfootline={\hfil}
-\global\oddheadline={\hfil} \global\oddfootline={\hfil}}
-\HEADINGSoff
+\def\headingsoff{% non-global headings elimination
+ \evenheadline={\hfil}\evenfootline={\hfil}%
+ \oddheadline={\hfil}\oddfootline={\hfil}%
+}
+
+\def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting
+\HEADINGSoff % it's the default
+
% When we turn headings on, set the page number to 1.
% For double-sided printing, put current file name in lower left corner,
% chapter name on inside top of right hand pages, document
@@ -3042,7 +3447,7 @@ end
% This produces Day Month Year style of output.
% Only define if not already defined, in case a txi-??.tex file has set
% up a different format (e.g., txi-cs.tex does this).
-\ifx\today\undefined
+\ifx\today\thisisundefined
\def\today{%
\number\day\space
\ifcase\month
@@ -3103,7 +3508,7 @@ end
\begingroup
\advance\leftskip by-\tableindent
\advance\hsize by\tableindent
- \advance\rightskip by0pt plus1fil
+ \advance\rightskip by0pt plus1fil\relax
\leavevmode\unhbox0\par
\endgroup
%
@@ -3117,7 +3522,7 @@ end
% cause the example and the item to crash together. So we use this
% bizarre value of 10001 as a signal to \aboveenvbreak to insert
% \parskip glue after all. Section titles are handled this way also.
- %
+ %
\penalty 10001
\endgroup
\itemxneedsnegativevskipfalse
@@ -3211,9 +3616,18 @@ end
\parindent=0pt
\parskip=\smallskipamount
\ifdim\parskip=0pt \parskip=2pt \fi
+ %
+ % Try typesetting the item mark that if the document erroneously says
+ % something like @itemize @samp (intending @table), there's an error
+ % right away at the @itemize. It's not the best error message in the
+ % world, but it's better than leaving it to the @item. This means if
+ % the user wants an empty mark, they have to say @w{} not just @w.
\def\itemcontents{#1}%
+ \setbox0 = \hbox{\itemcontents}%
+ %
% @itemize with no arg is equivalent to @itemize @bullet.
\ifx\itemcontents\empty\def\itemcontents{\bullet}\fi
+ %
\let\item=\itemizeitem
}
@@ -3234,6 +3648,7 @@ end
\ifnum\lastpenalty<10000 \parskip=0in \fi
\noindent
\hbox to 0pt{\hss \itemcontents \kern\itemmargin}%
+ %
\vadjust{\penalty 1200}}% not good to break after first line of item.
\flushcr
}
@@ -3455,12 +3870,19 @@ end
%
% @headitem starts a heading row, which we typeset in bold.
% Assignments have to be global since we are inside the implicit group
-% of an alignment entry. Note that \everycr resets \everytab.
-\def\headitem{\checkenv\multitable \crcr \global\everytab={\bf}\the\everytab}%
+% of an alignment entry. \everycr resets \everytab so we don't have to
+% undo it ourselves.
+\def\headitemfont{\b}% for people to use in the template row; not changeable
+\def\headitem{%
+ \checkenv\multitable
+ \crcr
+ \global\everytab={\bf}% can't use \headitemfont since the parsing differs
+ \the\everytab % for the first item
+}%
%
% A \tab used to include \hskip1sp. But then the space in a template
% line is not enough. That is bad. So let's go back to just `&' until
-% we encounter the problem it was intended to solve again.
+% we again encounter the problem the 1sp was intended to solve.
% --karl, nathan@acm.org, 20apr99.
\def\tab{\checkenv\multitable &\the\everytab}%
@@ -3572,18 +3994,18 @@ end
\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
\global\advance\multitablelinespace by-\ht0
\fi
-%% Test to see if parskip is larger than space between lines of
-%% table. If not, do nothing.
-%% If so, set to same dimension as multitablelinespace.
+% Test to see if parskip is larger than space between lines of
+% table. If not, do nothing.
+% If so, set to same dimension as multitablelinespace.
\ifdim\multitableparskip>\multitablelinespace
\global\multitableparskip=\multitablelinespace
-\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
- %% than skip between lines in the table.
+\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller
+ % than skip between lines in the table.
\fi%
\ifdim\multitableparskip=0pt
\global\multitableparskip=\multitablelinespace
-\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
- %% than skip between lines in the table.
+\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller
+ % than skip between lines in the table.
\fi}
@@ -3859,11 +4281,11 @@ end
\def\dosynindex#1#2#3{%
% Only do \closeout if we haven't already done it, else we'll end up
% closing the target index.
- \expandafter \ifx\csname donesynindex#2\endcsname \undefined
+ \expandafter \ifx\csname donesynindex#2\endcsname \relax
% The \closeout helps reduce unnecessary open files; the limit on the
% Acorn RISC OS is a mere 16 files.
\expandafter\closeout\csname#2indfile\endcsname
- \expandafter\let\csname\donesynindex#2\endcsname = 1
+ \expandafter\let\csname donesynindex#2\endcsname = 1
\fi
% redefine \fooindfile:
\expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname
@@ -3898,11 +4320,14 @@ end
\def\@{@}% change to @@ when we switch to @ as escape char in index files.
\def\ {\realbackslash\space }%
%
- % Need these in case \tex is in effect and \{ is a \delimiter again.
- % But can't use \lbracecmd and \rbracecmd because texindex assumes
- % braces and backslashes are used only as delimiters.
- \let\{ = \mylbrace
- \let\} = \myrbrace
+ % Need these unexpandable (because we define \tt as a dummy)
+ % definitions when @{ or @} appear in index entry text. Also, more
+ % complicated, when \tex is in effect and \{ is a \delimiter again.
+ % We can't use \lbracecmd and \rbracecmd because texindex assumes
+ % braces and backslashes are used only as delimiters. Perhaps we
+ % should define @lbrace and @rbrace commands a la @comma.
+ \def\{{{\tt\char123}}%
+ \def\}{{\tt\char125}}%
%
% I don't entirely understand this, but when an index entry is
% generated from a macro call, the \endinput which \scanmacro inserts
@@ -3913,7 +4338,7 @@ end
% processing continues to some further point. On the other hand, it
% seems \endinput does not hurt in the printed index arg, since that
% is still getting written without apparent harm.
- %
+ %
% Sample source (mac-idx3.tex, reported by Graham Percival to
% help-texinfo, 22may06):
% @macro funindex {WORD}
@@ -3921,12 +4346,12 @@ end
% @end macro
% ...
% @funindex commtest
- %
+ %
% The above is not enough to reproduce the bug, but it gives the flavor.
- %
+ %
% Sample whatsit resulting:
% .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}}
- %
+ %
% So:
\let\endinput = \empty
%
@@ -3955,7 +4380,7 @@ end
\def\commondummies{%
%
% \definedummyword defines \#1 as \string\#1\space, thus effectively
- % preventing its expansion. This is used only for control% words,
+ % preventing its expansion. This is used only for control words,
% not control letters, because the \space would be incorrect for
% control characters, but is needed to separate the control word
% from whatever follows.
@@ -3974,23 +4399,28 @@ end
\commondummiesnofonts
%
\definedummyletter\_%
+ \definedummyletter\-%
%
% Non-English letters.
\definedummyword\AA
\definedummyword\AE
+ \definedummyword\DH
\definedummyword\L
- \definedummyword\OE
\definedummyword\O
+ \definedummyword\OE
+ \definedummyword\TH
\definedummyword\aa
\definedummyword\ae
+ \definedummyword\dh
+ \definedummyword\exclamdown
\definedummyword\l
- \definedummyword\oe
\definedummyword\o
- \definedummyword\ss
- \definedummyword\exclamdown
- \definedummyword\questiondown
+ \definedummyword\oe
\definedummyword\ordf
\definedummyword\ordm
+ \definedummyword\questiondown
+ \definedummyword\ss
+ \definedummyword\th
%
% Although these internal commands shouldn't show up, sometimes they do.
\definedummyword\bf
@@ -4006,21 +4436,27 @@ end
\definedummyword\TeX
%
% Assorted special characters.
+ \definedummyword\arrow
\definedummyword\bullet
\definedummyword\comma
\definedummyword\copyright
\definedummyword\registeredsymbol
\definedummyword\dots
\definedummyword\enddots
+ \definedummyword\entrybreak
\definedummyword\equiv
\definedummyword\error
\definedummyword\euro
+ \definedummyword\expansion
+ \definedummyword\geq
\definedummyword\guillemetleft
\definedummyword\guillemetright
\definedummyword\guilsinglleft
\definedummyword\guilsinglright
- \definedummyword\expansion
+ \definedummyword\lbracechar
+ \definedummyword\leq
\definedummyword\minus
+ \definedummyword\ogonek
\definedummyword\pounds
\definedummyword\point
\definedummyword\print
@@ -4030,6 +4466,7 @@ end
\definedummyword\quoteleft
\definedummyword\quoteright
\definedummyword\quotesinglbase
+ \definedummyword\rbracechar
\definedummyword\result
\definedummyword\textdegree
%
@@ -4064,6 +4501,7 @@ end
\definedummyword\v
\definedummyword\H
\definedummyword\dotaccent
+ \definedummyword\ogonek
\definedummyword\ringaccent
\definedummyword\tieaccent
\definedummyword\ubaraccent
@@ -4074,18 +4512,27 @@ end
\definedummyword\b
\definedummyword\i
\definedummyword\r
+ \definedummyword\sansserif
\definedummyword\sc
+ \definedummyword\slanted
\definedummyword\t
%
% Commands that take arguments.
+ \definedummyword\abbr
\definedummyword\acronym
+ \definedummyword\anchor
\definedummyword\cite
\definedummyword\code
\definedummyword\command
\definedummyword\dfn
+ \definedummyword\dmn
+ \definedummyword\email
\definedummyword\emph
\definedummyword\env
\definedummyword\file
+ \definedummyword\image
+ \definedummyword\indicateurl
+ \definedummyword\inforef
\definedummyword\kbd
\definedummyword\key
\definedummyword\math
@@ -4113,7 +4560,7 @@ end
\def\definedummyaccent##1{\let##1\asis}%
% We can just ignore other control letters.
\def\definedummyletter##1{\let##1\empty}%
- % Hopefully, all control words can become @asis.
+ % All control words become @asis by default; overrides below.
\let\definedummyword\definedummyaccent
%
\commondummiesnofonts
@@ -4125,48 +4572,63 @@ end
%
\def\ { }%
\def\@{@}%
- % how to handle braces?
\def\_{\normalunderscore}%
+ \def\-{}% @- shouldn't affect sorting
+ %
+ % Unfortunately, texindex is not prepared to handle braces in the
+ % content at all. So for index sorting, we map @{ and @} to strings
+ % starting with |, since that ASCII character is between ASCII { and }.
+ \def\{{|a}%
+ \def\lbracechar{|a}%
+ %
+ \def\}{|b}%
+ \def\rbracechar{|b}%
%
% Non-English letters.
\def\AA{AA}%
\def\AE{AE}%
+ \def\DH{DZZ}%
\def\L{L}%
\def\OE{OE}%
\def\O{O}%
+ \def\TH{ZZZ}%
\def\aa{aa}%
\def\ae{ae}%
+ \def\dh{dzz}%
+ \def\exclamdown{!}%
\def\l{l}%
\def\oe{oe}%
- \def\o{o}%
- \def\ss{ss}%
- \def\exclamdown{!}%
- \def\questiondown{?}%
\def\ordf{a}%
\def\ordm{o}%
+ \def\o{o}%
+ \def\questiondown{?}%
+ \def\ss{ss}%
+ \def\th{zzz}%
%
\def\LaTeX{LaTeX}%
\def\TeX{TeX}%
%
% Assorted special characters.
% (The following {} will end up in the sort string, but that's ok.)
+ \def\arrow{->}%
\def\bullet{bullet}%
\def\comma{,}%
\def\copyright{copyright}%
- \def\registeredsymbol{R}%
\def\dots{...}%
\def\enddots{...}%
\def\equiv{==}%
\def\error{error}%
\def\euro{euro}%
+ \def\expansion{==>}%
+ \def\geq{>=}%
\def\guillemetleft{<<}%
\def\guillemetright{>>}%
\def\guilsinglleft{<}%
\def\guilsinglright{>}%
- \def\expansion{==>}%
+ \def\leq{<=}%
\def\minus{-}%
- \def\pounds{pounds}%
\def\point{.}%
+ \def\pounds{pounds}%
\def\print{-|}%
\def\quotedblbase{"}%
\def\quotedblleft{"}%
@@ -4174,22 +4636,31 @@ end
\def\quoteleft{`}%
\def\quoteright{'}%
\def\quotesinglbase{,}%
+ \def\registeredsymbol{R}%
\def\result{=>}%
- \def\textdegree{degrees}%
+ \def\textdegree{o}%
+ %
+ \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax
+ \else \indexlquoteignore \fi
%
% We need to get rid of all macros, leaving only the arguments (if present).
% Of course this is not nearly correct, but it is the best we can do for now.
% makeinfo does not expand macros in the argument to @deffn, which ends up
% writing an index entry, and texindex isn't prepared for an index sort entry
% that starts with \.
- %
+ %
% Since macro invocations are followed by braces, we can just redefine them
% to take a single TeX argument. The case of a macro invocation that
% goes to end-of-line is not handled.
- %
+ %
\macrolist
}
+% Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us
+% ignore left quotes in the sort term.
+{\catcode`\`=\active
+ \gdef\indexlquoteignore{\let`=\empty}}
+
\let\indexbackslash=0 %overridden during \printindex.
\let\SETmarginindex=\relax % put index entries in margin (undocumented)?
@@ -4287,10 +4758,9 @@ end
%
% ..., ready, GO:
%
-\def\safewhatsit#1{%
-\ifhmode
+\def\safewhatsit#1{\ifhmode
#1%
-\else
+ \else
% \lastskip and \lastpenalty cannot both be nonzero simultaneously.
\whatsitskip = \lastskip
\edef\lastskipmacro{\the\lastskip}%
@@ -4314,7 +4784,6 @@ end
% to re-insert the same penalty (values >10000 are used for various
% signals); since we just inserted a non-discardable item, any
% following glue (such as a \parskip) would be a breakpoint. For example:
- %
% @deffn deffn-whatever
% @vindex index-whatever
% Description.
@@ -4327,8 +4796,7 @@ end
% (the whatsit from the \write), so we must insert a \nobreak.
\nobreak\vskip\whatsitskip
\fi
-\fi
-}
+\fi}
% The index entry written in the file actually looks like
% \entry {sortstring}{page}{topic}
@@ -4444,10 +4912,9 @@ end
%
% A straightforward implementation would start like this:
% \def\entry#1#2{...
-% But this frozes the catcodes in the argument, and can cause problems to
+% But this freezes the catcodes in the argument, and can cause problems to
% @code, which sets - active. This problem was fixed by a kludge---
% ``-'' was active throughout whole index, but this isn't really right.
-%
% The right solution is to prevent \entry from swallowing the whole text.
% --kasal, 21nov03
\def\entry{%
@@ -4484,10 +4951,17 @@ end
% columns.
\vskip 0pt plus1pt
%
+ % When reading the text of entry, convert explicit line breaks
+ % from @* into spaces. The user might give these in long section
+ % titles, for instance.
+ \def\*{\unskip\space\ignorespaces}%
+ \def\entrybreak{\hfil\break}%
+ %
% Swallow the left brace of the text (first parameter):
\afterassignment\doentry
\let\temp =
}
+\def\entrybreak{\unskip\space\ignorespaces}%
\def\doentry{%
\bgroup % Instead of the swallowed brace.
\noindent
@@ -4720,7 +5194,22 @@ end
\message{sectioning,}
% Chapters, sections, etc.
-% \unnumberedno is an oxymoron, of course. But we count the unnumbered
+% Let's start with @part.
+\outer\parseargdef\part{\partzzz{#1}}
+\def\partzzz#1{%
+ \chapoddpage
+ \null
+ \vskip.3\vsize % move it down on the page a bit
+ \begingroup
+ \noindent \titlefonts\rmisbold #1\par % the text
+ \let\lastnode=\empty % no node to associate with
+ \writetocentry{part}{#1}{}% but put it in the toc
+ \headingsoff % no headline or footline on the part page
+ \chapoddpage
+ \endgroup
+}
+
+% \unnumberedno is an oxymoron. But we count the unnumbered
% sections so that we can refer to them unambiguously in the pdf
% outlines by their "section number". We avoid collisions with chapter
% numbers by starting them at 10000. (If a document ever has 10000
@@ -4799,8 +5288,8 @@ end
\chardef\maxseclevel = 3
%
% A numbered section within an unnumbered changes to unnumbered too.
-% To achive this, remember the "biggest" unnum. sec. we are currently in:
-\chardef\unmlevel = \maxseclevel
+% To achieve this, remember the "biggest" unnum. sec. we are currently in:
+\chardef\unnlevel = \maxseclevel
%
% Trace whether the current chapter is an appendix or not:
% \chapheadtype is "N" or "A", unnumbered chapters are ignored.
@@ -4825,8 +5314,8 @@ end
% The heading type:
\def\headtype{#1}%
\if \headtype U%
- \ifnum \absseclevel < \unmlevel
- \chardef\unmlevel = \absseclevel
+ \ifnum \absseclevel < \unnlevel
+ \chardef\unnlevel = \absseclevel
\fi
\else
% Check for appendix sections:
@@ -4838,10 +5327,10 @@ end
\fi\fi
\fi
% Check for numbered within unnumbered:
- \ifnum \absseclevel > \unmlevel
+ \ifnum \absseclevel > \unnlevel
\def\headtype{U}%
\else
- \chardef\unmlevel = 3
+ \chardef\unnlevel = 3
\fi
\fi
% Now print the heading:
@@ -4895,7 +5384,9 @@ end
\gdef\chaplevelprefix{\the\chapno.}%
\resetallfloatnos
%
- \message{\putwordChapter\space \the\chapno}%
+ % \putwordChapter can contain complex things in translations.
+ \toks0=\expandafter{\putwordChapter}%
+ \message{\the\toks0 \space \the\chapno}%
%
% Write the actual heading.
\chapmacro{#1}{Ynumbered}{\the\chapno}%
@@ -4906,15 +5397,17 @@ end
\global\let\subsubsection = \numberedsubsubsec
}
-\outer\parseargdef\appendix{\apphead0{#1}} % normally apphead0 calls appendixzzz
+\outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz
+%
\def\appendixzzz#1{%
\global\secno=0 \global\subsecno=0 \global\subsubsecno=0
\global\advance\appendixno by 1
\gdef\chaplevelprefix{\appendixletter.}%
\resetallfloatnos
%
- \def\appendixnum{\putwordAppendix\space \appendixletter}%
- \message{\appendixnum}%
+ % \putwordAppendix can contain complex things in translations.
+ \toks0=\expandafter{\putwordAppendix}%
+ \message{\the\toks0 \space \appendixletter}%
%
\chapmacro{#1}{Yappendix}{\appendixletter}%
%
@@ -4923,7 +5416,8 @@ end
\global\let\subsubsection = \appendixsubsubsec
}
-\outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz
+% normally unnmhead0 calls unnumberedzzz:
+\outer\parseargdef\unnumbered{\unnmhead0{#1}}
\def\unnumberedzzz#1{%
\global\secno=0 \global\subsecno=0 \global\subsubsecno=0
\global\advance\unnumberedno by 1
@@ -4967,40 +5461,47 @@ end
\let\top\unnumbered
% Sections.
+%
\outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz
\def\seczzz#1{%
\global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
\sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}%
}
-\outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz
+% normally calls appendixsectionzzz:
+\outer\parseargdef\appendixsection{\apphead1{#1}}
\def\appendixsectionzzz#1{%
\global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
\sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}%
}
\let\appendixsec\appendixsection
-\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz
+% normally calls unnumberedseczzz:
+\outer\parseargdef\unnumberedsec{\unnmhead1{#1}}
\def\unnumberedseczzz#1{%
\global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
\sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}%
}
% Subsections.
-\outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz
+%
+% normally calls numberedsubseczzz:
+\outer\parseargdef\numberedsubsec{\numhead2{#1}}
\def\numberedsubseczzz#1{%
\global\subsubsecno=0 \global\advance\subsecno by 1
\sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}%
}
-\outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz
+% normally calls appendixsubseczzz:
+\outer\parseargdef\appendixsubsec{\apphead2{#1}}
\def\appendixsubseczzz#1{%
\global\subsubsecno=0 \global\advance\subsecno by 1
\sectionheading{#1}{subsec}{Yappendix}%
{\appendixletter.\the\secno.\the\subsecno}%
}
-\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz
+% normally calls unnumberedsubseczzz:
+\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}}
\def\unnumberedsubseczzz#1{%
\global\subsubsecno=0 \global\advance\subsecno by 1
\sectionheading{#1}{subsec}{Ynothing}%
@@ -5008,21 +5509,25 @@ end
}
% Subsubsections.
-\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz
+%
+% normally numberedsubsubseczzz:
+\outer\parseargdef\numberedsubsubsec{\numhead3{#1}}
\def\numberedsubsubseczzz#1{%
\global\advance\subsubsecno by 1
\sectionheading{#1}{subsubsec}{Ynumbered}%
{\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}%
}
-\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz
+% normally appendixsubsubseczzz:
+\outer\parseargdef\appendixsubsubsec{\apphead3{#1}}
\def\appendixsubsubseczzz#1{%
\global\advance\subsubsecno by 1
\sectionheading{#1}{subsubsec}{Yappendix}%
{\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}%
}
-\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz
+% normally unnumberedsubsubseczzz:
+\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}}
\def\unnumberedsubsubseczzz#1{%
\global\advance\subsubsecno by 1
\sectionheading{#1}{subsubsec}{Ynothing}%
@@ -5046,7 +5551,6 @@ end
% 3) Likewise, headings look best if no \parindent is used, and
% if justification is not attempted. Hence \raggedright.
-
\def\majorheading{%
{\advance\chapheadingskip by 10pt \chapbreak }%
\parsearg\chapheadingzzz
@@ -5055,8 +5559,8 @@ end
\def\chapheading{\chapbreak \parsearg\chapheadingzzz}
\def\chapheadingzzz#1{%
{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt\raggedright
- \rm #1\hfill}}%
+ \parindent=0pt\ptexraggedright
+ \rmisbold #1\hfill}}%
\bigskip \par\penalty 200\relax
\suppressfirstparagraphindent
}
@@ -5073,14 +5577,13 @@ end
% (including whitespace, linebreaking, etc. around it),
% given all the information in convenient, parsed form.
-%%% Args are the skip and penalty (usually negative)
+% Args are the skip and penalty (usually negative)
\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
-%%% Define plain chapter starts, and page on/off switching for it
% Parameter controlling skip before chapter headings (if needed)
-
\newskip\chapheadingskip
+% Define plain chapter starts, and page on/off switching for it.
\def\chapbreak{\dobreak \chapheadingskip {-4000}}
\def\chappager{\par\vfill\supereject}
% Because \domark is called before \chapoddpage, the filler page will
@@ -5090,9 +5593,8 @@ end
\chappager
\ifodd\pageno \else
\begingroup
- \evenheadline={\hfil}\evenfootline={\hfil}%
- \oddheadline={\hfil}\oddfootline={\hfil}%
- \hbox to 0pt{}%
+ \headingsoff
+ \null
\chappager
\endgroup
\fi
@@ -5148,7 +5650,10 @@ end
\xdef\lastchapterdefs{%
\gdef\noexpand\thischaptername{\the\toks0}%
\gdef\noexpand\thischapternum{\appendixletter}%
- \gdef\noexpand\thischapter{\putwordAppendix{} \noexpand\thischapternum:
+ % \noexpand\putwordAppendix avoids expanding indigestible
+ % commands in some of the translations.
+ \gdef\noexpand\thischapter{\noexpand\putwordAppendix{}
+ \noexpand\thischapternum:
\noexpand\thischaptername}%
}%
\else
@@ -5156,7 +5661,10 @@ end
\xdef\lastchapterdefs{%
\gdef\noexpand\thischaptername{\the\toks0}%
\gdef\noexpand\thischapternum{\the\chapno}%
- \gdef\noexpand\thischapter{\putwordChapter{} \noexpand\thischapternum:
+ % \noexpand\putwordChapter avoids expanding indigestible
+ % commands in some of the translations.
+ \gdef\noexpand\thischapter{\noexpand\putwordChapter{}
+ \noexpand\thischapternum:
\noexpand\thischaptername}%
}%
\fi\fi\fi
@@ -5175,7 +5683,7 @@ end
\domark
%
{%
- \chapfonts \rm
+ \chapfonts \rmisbold
%
% Have to define \lastsection before calling \donoderef, because the
% xref code eventually uses it. On the other hand, it has to be called
@@ -5212,7 +5720,7 @@ end
%
% Typeset the actual heading.
\nobreak % Avoid page breaks at the interline glue.
- \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
+ \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright
\hangindent=\wd0 \centerparametersmaybe
\unhbox0 #1\par}%
}%
@@ -5236,8 +5744,8 @@ end
%
\def\unnchfopen #1{%
\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt\raggedright
- \rm #1\hfill}}\bigskip \par\nobreak
+ \parindent=0pt\ptexraggedright
+ \rmisbold #1\hfill}}\bigskip \par\nobreak
}
\def\chfopen #1#2{\chapoddpage {\chapfonts
\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
@@ -5246,7 +5754,7 @@ end
\def\centerchfopen #1{%
\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
\parindent=0pt
- \hfill {\rm #1}\hfill}}\bigskip \par\nobreak
+ \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak
}
\def\CHAPFopen{%
\global\let\chapmacro=\chfopen
@@ -5278,8 +5786,10 @@ end
%
\def\sectionheading#1#2#3#4{%
{%
+ \checkenv{}% should not be in an environment.
+ %
% Switch to the right set of fonts.
- \csname #2fonts\endcsname \rm
+ \csname #2fonts\endcsname \rmisbold
%
\def\sectionlevel{#2}%
\def\temptype{#3}%
@@ -5299,7 +5809,10 @@ end
\xdef\lastsectiondefs{%
\gdef\noexpand\thissectionname{\the\toks0}%
\gdef\noexpand\thissectionnum{#4}%
- \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum:
+ % \noexpand\putwordSection avoids expanding indigestible
+ % commands in some of the translations.
+ \gdef\noexpand\thissection{\noexpand\putwordSection{}
+ \noexpand\thissectionnum:
\noexpand\thissectionname}%
}%
\fi
@@ -5309,12 +5822,20 @@ end
\xdef\lastsectiondefs{%
\gdef\noexpand\thissectionname{\the\toks0}%
\gdef\noexpand\thissectionnum{#4}%
- \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum:
+ % \noexpand\putwordSection avoids expanding indigestible
+ % commands in some of the translations.
+ \gdef\noexpand\thissection{\noexpand\putwordSection{}
+ \noexpand\thissectionnum:
\noexpand\thissectionname}%
}%
\fi
\fi\fi\fi
%
+ % Go into vertical mode. Usually we'll already be there, but we
+ % don't want the following whatsit to end up in a preceding paragraph
+ % if the document didn't happen to have a blank line.
+ \par
+ %
% Output the mark. Pass it through \safewhatsit, to take care of
% the preceding space.
\safewhatsit\domark
@@ -5364,7 +5885,7 @@ end
\nobreak
%
% Output the actual section heading.
- \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
+ \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright
\hangindent=\wd0 % zero if no section number
\unhbox0 #1}%
}%
@@ -5378,15 +5899,15 @@ end
%
% We'll almost certainly start a paragraph next, so don't let that
% glue accumulate. (Not a breakpoint because it's preceded by a
- % discardable item.)
+ % discardable item.) However, when a paragraph is not started next
+ % (\startdefun, \cartouche, \center, etc.), this needs to be wiped out
+ % or the negative glue will cause weirdly wrong output, typically
+ % obscuring the section heading with something else.
\vskip-\parskip
- %
- % This is purely so the last item on the list is a known \penalty >
- % 10000. This is so \startdefun can avoid allowing breakpoints after
- % section headings. Otherwise, it would insert a valid breakpoint between:
- %
- % @section sec-whatever
- % @deffn def-whatever
+ %
+ % This is so the last item on the main vertical list is a known
+ % \penalty > 10000, so \startdefun, etc., can recognize the situation
+ % and do the needful.
\penalty 10001
}
@@ -5442,7 +5963,7 @@ end
% These characters do not print properly in the Computer Modern roman
% fonts, so we must take special care. This is more or less redundant
% with the Texinfo input format setup at the end of this file.
-%
+%
\def\activecatcodes{%
\catcode`\"=\active
\catcode`\$=\active
@@ -5492,7 +6013,7 @@ end
% redefined for the two-volume lispref. We always output on
% \jobname.toc even if this is redefined.
-%
+%
\def\tocreadfilename{\jobname.toc}
% Normal (long) toc.
@@ -5518,6 +6039,7 @@ end
\def\summarycontents{%
\startcontents{\putwordShortTOC}%
%
+ \let\partentry = \shortpartentry
\let\numchapentry = \shortchapentry
\let\appentry = \shortchapentry
\let\unnchapentry = \shortunnchapentry
@@ -5573,6 +6095,19 @@ end
% The last argument is the page number.
% The arguments in between are the chapter number, section number, ...
+% Parts, in the main contents. Replace the part number, which doesn't
+% exist, with an empty box. Let's hope all the numbers have the same width.
+% Also ignore the page number, which is conventionally not printed.
+\def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}}
+\def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}}
+%
+% Parts, in the short toc.
+\def\shortpartentry#1#2#3#4{%
+ \penalty-300
+ \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip
+ \shortchapentry{{\bf #1}}{\numeralbox}{}{}%
+}
+
% Chapters, in the main contents.
\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}}
%
@@ -5662,46 +6197,12 @@ end
\message{environments,}
% @foo ... @end foo.
-% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
-%
-% Since these characters are used in examples, they should be an even number of
-% \tt widths. Each \tt character is 1en, so two makes it 1em.
-%
-\def\point{$\star$}
-\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}}
-\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
-\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}}
-\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
-\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}}
-
-% The @error{} command.
-% Adapted from the TeXbook's \boxit.
-%
-\newbox\errorbox
-%
-{\tentt \global\dimen0 = 3em}% Width of the box.
-\dimen2 = .55pt % Thickness of rules
-% The text. (`r' is open on the right, `e' somewhat less so on the left.)
-\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt}
-%
-\setbox\errorbox=\hbox to \dimen0{\hfil
- \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
- \advance\hsize by -2\dimen2 % Rules.
- \vbox{%
- \hrule height\dimen2
- \hbox{\vrule width\dimen2 \kern3pt % Space to left of text.
- \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
- \kern3pt\vrule width\dimen2}% Space to right.
- \hrule height\dimen2}
- \hfil}
-%
-\def\error{\leavevmode\lower.7ex\copy\errorbox}
-
-% @tex ... @end tex escapes into raw Tex temporarily.
+% @tex ... @end tex escapes into raw TeX temporarily.
% One exception: @ is still an escape character, so that @end tex works.
-% But \@ or @@ will get a plain tex @ character.
+% But \@ or @@ will get a plain @ character.
\envdef\tex{%
+ \setupmarkupstyle{tex}%
\catcode `\\=0 \catcode `\{=1 \catcode `\}=2
\catcode `\$=3 \catcode `\&=4 \catcode `\#=6
\catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie
@@ -5711,8 +6212,14 @@ end
\catcode `\|=\other
\catcode `\<=\other
\catcode `\>=\other
+ \catcode`\`=\other
+ \catcode`\'=\other
\escapechar=`\\
%
+ % ' is active in math mode (mathcode"8000). So reset it, and all our
+ % other math active characters (just in case), to plain's definitions.
+ \mathactive
+ %
\let\b=\ptexb
\let\bullet=\ptexbullet
\let\c=\ptexc
@@ -5816,6 +6323,12 @@ end
\normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
% Flag to tell @lisp, etc., not to narrow margin.
\let\nonarrowing = t%
+ %
+ % If this cartouche directly follows a sectioning command, we need the
+ % \parskip glue (backspaced over by default) or the cartouche can
+ % collide with the section heading.
+ \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi
+ %
\vbox\bgroup
\baselineskip=0pt\parskip=0pt\lineskip=0pt
\carttop
@@ -5829,7 +6342,7 @@ end
\lineskip=\normlskip
\parskip=\normpskip
\vskip -\parskip
- \comment % For explanation, see the end of \def\group.
+ \comment % For explanation, see the end of def\group.
}
\def\Ecartouche{%
\ifhmode\par\fi
@@ -5846,6 +6359,7 @@ end
% This macro is called at the beginning of all the @example variants,
% inside a group.
+\newdimen\nonfillparindent
\def\nonfillstart{%
\aboveenvbreak
\hfuzz = 12pt % Don't be fussy
@@ -5853,7 +6367,12 @@ end
\let\par = \lisppar % don't ignore blank lines
\obeylines % each line of input is a line of output
\parskip = 0pt
+ % Turn off paragraph indentation but redefine \indent to emulate
+ % the normal \indent.
+ \nonfillparindent=\parindent
\parindent = 0pt
+ \let\indent\nonfillindent
+ %
\emergencystretch = 0pt % don't try to avoid overfull boxes
\ifx\nonarrowing\relax
\advance \leftskip by \lispnarrowing
@@ -5864,6 +6383,24 @@ end
\let\exdent=\nofillexdent
}
+\begingroup
+\obeyspaces
+% We want to swallow spaces (but not other tokens) after the fake
+% @indent in our nonfill-environments, where spaces are normally
+% active and set to @tie, resulting in them not being ignored after
+% @indent.
+\gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}%
+\gdef\nonfillindentcheck{%
+\ifx\temp %
+\expandafter\nonfillindentgobble%
+\else%
+\leavevmode\nonfillindentbox%
+\fi%
+}%
+\endgroup
+\def\nonfillindentgobble#1{\nonfillindent}
+\def\nonfillindentbox{\hbox to \nonfillparindent{\hss}}
+
% If you want all examples etc. small: @set dispenvsize small.
% If you want even small examples the full size: @set dispenvsize nosmall.
% This affects the following displayed environments:
@@ -5891,41 +6428,42 @@ end
}
% We often define two environments, @foo and @smallfoo.
-% Let's do it by one command:
-\def\makedispenv #1#2{
- \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}
- \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}
+% Let's do it in one command. #1 is the env name, #2 the definition.
+\def\makedispenvdef#1#2{%
+ \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}%
+ \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}%
\expandafter\let\csname E#1\endcsname \afterenvbreak
\expandafter\let\csname Esmall#1\endcsname \afterenvbreak
}
-% Define two synonyms:
-\def\maketwodispenvs #1#2#3{
- \makedispenv{#1}{#3}
- \makedispenv{#2}{#3}
+% Define two environment synonyms (#1 and #2) for an environment.
+\def\maketwodispenvdef#1#2#3{%
+ \makedispenvdef{#1}{#3}%
+ \makedispenvdef{#2}{#3}%
}
-
-% @lisp: indented, narrowed, typewriter font; @example: same as @lisp.
+%
+% @lisp: indented, narrowed, typewriter font;
+% @example: same as @lisp.
%
% @smallexample and @smalllisp: use smaller fonts.
% Originally contributed by Pavel@xerox.
%
-\maketwodispenvs {lisp}{example}{%
+\maketwodispenvdef{lisp}{example}{%
\nonfillstart
- \tt\quoteexpand
+ \tt\setupmarkupstyle{example}%
\let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
- \gobble % eat return
+ \gobble % eat return
}
% @display/@smalldisplay: same as @lisp except keep current font.
%
-\makedispenv {display}{%
+\makedispenvdef{display}{%
\nonfillstart
\gobble
}
% @format/@smallformat: same as @display except don't narrow margins.
%
-\makedispenv{format}{%
+\makedispenvdef{format}{%
\let\nonarrowing = t%
\nonfillstart
\gobble
@@ -5944,18 +6482,44 @@ end
\envdef\flushright{%
\let\nonarrowing = t%
\nonfillstart
- \advance\leftskip by 0pt plus 1fill
+ \advance\leftskip by 0pt plus 1fill\relax
\gobble
}
\let\Eflushright = \afterenvbreak
+% @raggedright does more-or-less normal line breaking but no right
+% justification. From plain.tex.
+\envdef\raggedright{%
+ \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax
+}
+\let\Eraggedright\par
+
+\envdef\raggedleft{%
+ \parindent=0pt \leftskip0pt plus2em
+ \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
+ \hbadness=10000 % Last line will usually be underfull, so turn off
+ % badness reporting.
+}
+\let\Eraggedleft\par
+
+\envdef\raggedcenter{%
+ \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em
+ \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
+ \hbadness=10000 % Last line will usually be underfull, so turn off
+ % badness reporting.
+}
+\let\Eraggedcenter\par
+
+
% @quotation does normal linebreaking (hence we can't use \nonfillstart)
% and narrows the margins. We keep \parskip nonzero in general, since
% we're doing normal filling. So, when using \aboveenvbreak and
% \afterenvbreak, temporarily make \parskip 0.
%
-\envdef\quotation{%
+\makedispenvdef{quotation}{\quotationstart}
+%
+\def\quotationstart{%
{\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
\parindent=0pt
%
@@ -5975,12 +6539,13 @@ end
%
\def\Equotation{%
\par
- \ifx\quotationauthor\undefined\else
+ \ifx\quotationauthor\thisisundefined\else
% indent a bit.
\leftline{\kern 2\leftskip \sl ---\quotationauthor}%
\fi
{\parskip=0pt \afterenvbreak}%
}
+\def\Esmallquotation{\Equotation}
% If we're given an argument, typeset it in bold with a colon after.
\def\quotationlabel#1{%
@@ -6005,18 +6570,16 @@ end
\do\ \do\\\do\{\do\}\do\$\do\&%
\do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~%
\do\<\do\>\do\|\do\@\do+\do\"%
+ % Don't do the quotes -- if we do, @set txicodequoteundirected and
+ % @set txicodequotebacktick will not have effect on @verb and
+ % @verbatim, and ?` and !` ligatures won't get disabled.
+ %\do\`\do\'%
}
%
% [Knuth] p. 380
\def\uncatcodespecials{%
\def\do##1{\catcode`##1=\other}\dospecials}
%
-% [Knuth] pp. 380,381,391
-% Disable Spanish ligatures ?` and !` of \tt font
-\begingroup
- \catcode`\`=\active\gdef`{\relax\lq}
-\endgroup
-%
% Setup for the @verb command.
%
% Eight spaces for a tab
@@ -6028,7 +6591,7 @@ end
\def\setupverb{%
\tt % easiest (and conventionally used) font for verbatim
\def\par{\leavevmode\endgraf}%
- \catcode`\`=\active
+ \setupmarkupstyle{verb}%
\tabeightspaces
% Respect line breaks,
% print special symbols as themselves, and
@@ -6039,73 +6602,46 @@ end
% Setup for the @verbatim environment
%
-% Real tab expansion
+% Real tab expansion.
\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
%
-\def\starttabbox{\setbox0=\hbox\bgroup}
-
-% Allow an option to not replace quotes with a regular directed right
-% quote/apostrophe (char 0x27), but instead use the undirected quote
-% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it
-% the default, but it works for pasting with more pdf viewers (at least
-% evince), the lilypond developers report. xpdf does work with the
-% regular 0x27.
-%
-\def\codequoteright{%
- \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
- \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
- '%
- \else \char'15 \fi
- \else \char'15 \fi
-}
-%
-% and a similar option for the left quote char vs. a grave accent.
-% Modern fonts display ASCII 0x60 as a grave accent, so some people like
-% the code environments to do likewise.
-%
-\def\codequoteleft{%
- \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax
- \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
- `%
- \else \char'22 \fi
- \else \char'22 \fi
-}
+% We typeset each line of the verbatim in an \hbox, so we can handle
+% tabs. The \global is in case the verbatim line starts with an accent,
+% or some other command that starts with a begin-group. Otherwise, the
+% entire \verbbox would disappear at the corresponding end-group, before
+% it is typeset. Meanwhile, we can't have nested verbatim commands
+% (can we?), so the \global won't be overwriting itself.
+\newbox\verbbox
+\def\starttabbox{\global\setbox\verbbox=\hbox\bgroup}
%
\begingroup
\catcode`\^^I=\active
\gdef\tabexpand{%
\catcode`\^^I=\active
\def^^I{\leavevmode\egroup
- \dimen0=\wd0 % the width so far, or since the previous tab
- \divide\dimen0 by\tabw
- \multiply\dimen0 by\tabw % compute previous multiple of \tabw
- \advance\dimen0 by\tabw % advance to next multiple of \tabw
- \wd0=\dimen0 \box0 \starttabbox
+ \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab
+ \divide\dimen\verbbox by\tabw
+ \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw
+ \advance\dimen\verbbox by\tabw % advance to next multiple of \tabw
+ \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox
}%
}
- \catcode`\'=\active
- \gdef\rquoteexpand{\catcode\rquoteChar=\active \def'{\codequoteright}}%
- %
- \catcode`\`=\active
- \gdef\lquoteexpand{\catcode\lquoteChar=\active \def`{\codequoteleft}}%
- %
- \gdef\quoteexpand{\rquoteexpand \lquoteexpand}%
\endgroup
% start the verbatim environment.
\def\setupverbatim{%
\let\nonarrowing = t%
\nonfillstart
- % Easiest (and conventionally used) font for verbatim
- \tt
- \def\par{\leavevmode\egroup\box0\endgraf}%
- \catcode`\`=\active
+ \tt % easiest (and conventionally used) font for verbatim
+ % The \leavevmode here is for blank lines. Otherwise, we would
+ % never \starttabox and the \egroup would end verbatim mode.
+ \def\par{\leavevmode\egroup\box\verbbox\endgraf}%
\tabexpand
- \quoteexpand
+ \setupmarkupstyle{verbatim}%
% Respect line breaks,
% print special symbols as themselves, and
- % make each space count
- % must do in this order:
+ % make each space count.
+ % Must do in this order:
\obeylines \uncatcodespecials \sepspaces
\everypar{\starttabbox}%
}
@@ -6161,6 +6697,8 @@ end
{%
\makevalueexpandable
\setupverbatim
+ \indexnofonts % Allow `@@' and other weird things in file names.
+ \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}%
\input #1
\afterenvbreak
}%
@@ -6210,7 +6748,7 @@ end
% commands also insert a nobreak penalty, and we don't want to allow
% a break between a section heading and a defun.
%
- % As a minor refinement, we avoid "club" headers by signalling
+ % As a further refinement, we avoid "club" headers by signalling
% with penalty of 10003 after the very first @deffn in the
% sequence (see above), and penalty of 10002 after any following
% @def command.
@@ -6247,7 +6785,7 @@ end
#1#2 \endheader
% common ending:
\interlinepenalty = 10000
- \advance\rightskip by 0pt plus 1fil
+ \advance\rightskip by 0pt plus 1fil\relax
\endgraf
\nobreak\vskip -\parskip
\penalty\defunpenalty % signal to \startdefun and \dodefunx
@@ -6260,7 +6798,7 @@ end
\def\Edefun{\endgraf\medbreak}
% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn;
-% the only thing remainnig is to define \deffnheader.
+% the only thing remaining is to define \deffnheader.
%
\def\makedefun#1{%
\expandafter\let\csname E#1\endcsname = \Edefun
@@ -6277,13 +6815,36 @@ end
\def\domakedefun#1#2#3{%
\envdef#1{%
\startdefun
+ \doingtypefnfalse % distinguish typed functions from all else
\parseargusing\activeparens{\printdefunline#3}%
}%
\def#2{\dodefunx#1}%
\def#3%
}
-%%% Untyped functions:
+\newif\ifdoingtypefn % doing typed function?
+\newif\ifrettypeownline % typeset return type on its own line?
+
+% @deftypefnnewline on|off says whether the return type of typed functions
+% are printed on their own line. This affects @deftypefn, @deftypefun,
+% @deftypeop, and @deftypemethod.
+%
+\parseargdef\deftypefnnewline{%
+ \def\temp{#1}%
+ \ifx\temp\onword
+ \expandafter\let\csname SETtxideftypefnnl\endcsname
+ = \empty
+ \else\ifx\temp\offword
+ \expandafter\let\csname SETtxideftypefnnl\endcsname
+ = \relax
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @txideftypefnnl value `\temp',
+ must be on|off}%
+ \fi\fi
+}
+
+% Untyped functions:
% @deffn category name args
\makedefun{deffn}{\deffngeneral{}}
@@ -6302,7 +6863,7 @@ end
\defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}%
}
-%%% Typed functions:
+% Typed functions:
% @deftypefn category type name args
\makedefun{deftypefn}{\deftypefngeneral{}}
@@ -6317,10 +6878,11 @@ end
%
\def\deftypefngeneral#1#2 #3 #4 #5\endheader{%
\dosubind{fn}{\code{#4}}{#1}%
+ \doingtypefntrue
\defname{#2}{#3}{#4}\defunargs{#5\unskip}%
}
-%%% Typed variables:
+% Typed variables:
% @deftypevr category type var args
\makedefun{deftypevr}{\deftypecvgeneral{}}
@@ -6338,7 +6900,7 @@ end
\defname{#2}{#3}{#4}\defunargs{#5\unskip}%
}
-%%% Untyped variables:
+% Untyped variables:
% @defvr category var args
\makedefun{defvr}#1 {\deftypevrheader{#1} {} }
@@ -6349,7 +6911,8 @@ end
% \defcvof {category of}class var args
\def\defcvof#1#2 {\deftypecvof{#1}#2 {} }
-%%% Type:
+% Types:
+
% @deftp category name args
\makedefun{deftp}#1 #2 #3\endheader{%
\doind{tp}{\code{#2}}%
@@ -6377,25 +6940,49 @@ end
% We are followed by (but not passed) the arguments, if any.
%
\def\defname#1#2#3{%
+ \par
% Get the values of \leftskip and \rightskip as they were outside the @def...
\advance\leftskip by -\defbodyindent
%
- % How we'll format the type name. Putting it in brackets helps
+ % Determine if we are typesetting the return type of a typed function
+ % on a line by itself.
+ \rettypeownlinefalse
+ \ifdoingtypefn % doing a typed function specifically?
+ % then check user option for putting return type on its own line:
+ \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else
+ \rettypeownlinetrue
+ \fi
+ \fi
+ %
+ % How we'll format the category name. Putting it in brackets helps
% distinguish it from the body text that may end up on the next line
% just below it.
\def\temp{#1}%
\setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi}
%
- % Figure out line sizes for the paragraph shape.
+ % Figure out line sizes for the paragraph shape. We'll always have at
+ % least two.
+ \tempnum = 2
+ %
% The first line needs space for \box0; but if \rightskip is nonzero,
% we need only space for the part of \box0 which exceeds it:
\dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip
+ %
+ % If doing a return type on its own line, we'll have another line.
+ \ifrettypeownline
+ \advance\tempnum by 1
+ \def\maybeshapeline{0in \hsize}%
+ \else
+ \def\maybeshapeline{}%
+ \fi
+ %
% The continuations:
\dimen2=\hsize \advance\dimen2 by -\defargsindent
- % (plain.tex says that \dimen1 should be used only as global.)
- \parshape 2 0in \dimen0 \defargsindent \dimen2
%
- % Put the type name to the right margin.
+ % The final paragraph shape:
+ \parshape \tempnum 0in \dimen0 \maybeshapeline \defargsindent \dimen2
+ %
+ % Put the category name at the right margin.
\noindent
\hbox to 0pt{%
\hfil\box0 \kern-\hsize
@@ -6417,8 +7004,16 @@ end
% . this still does not fix the ?` and !` ligatures, but so far no
% one has made identifiers using them :).
\df \tt
- \def\temp{#2}% return value type
- \ifx\temp\empty\else \tclose{\temp} \fi
+ \def\temp{#2}% text of the return type
+ \ifx\temp\empty\else
+ \tclose{\temp}% typeset the return type
+ \ifrettypeownline
+ % put return type on its own line; prohibit line break following:
+ \hfil\vadjust{\nobreak}\break
+ \else
+ \space % type on same line, so just followed by a space
+ \fi
+ \fi % no return type
#3% output function name
}%
{\rm\enskip}% hskip 0.5 em of \tenrm
@@ -6439,7 +7034,7 @@ end
%
% On the other hand, if an argument has two dashes (for instance), we
% want a way to get ttsl. Let's try @var for that.
- \let\var=\ttslanted
+ \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}%
#1%
\sl\hyphenchar\font=45
}
@@ -6536,7 +7131,7 @@ end
% To do this right we need a feature of e-TeX, \scantokens,
% which we arrange to emulate with a temporary file in ordinary TeX.
-\ifx\eTeXversion\undefined
+\ifx\eTeXversion\thisisundefined
\newwrite\macscribble
\def\scantokens#1{%
\toks0={#1}%
@@ -6547,25 +7142,30 @@ end
}
\fi
-\def\scanmacro#1{%
- \begingroup
- \newlinechar`\^^M
- \let\xeatspaces\eatspaces
- % Undo catcode changes of \startcontents and \doprintindex
- % When called from @insertcopying or (short)caption, we need active
- % backslash to get it printed correctly. Previously, we had
- % \catcode`\\=\other instead. We'll see whether a problem appears
- % with macro expansion. --kasal, 19aug04
- \catcode`\@=0 \catcode`\\=\active \escapechar=`\@
- % ... and \example
- \spaceisspace
- %
- % Append \endinput to make sure that TeX does not see the ending newline.
- % I've verified that it is necessary both for e-TeX and for ordinary TeX
- % --kasal, 29nov03
- \scantokens{#1\endinput}%
- \endgroup
-}
+\def\scanmacro#1{\begingroup
+ \newlinechar`\^^M
+ \let\xeatspaces\eatspaces
+ %
+ % Undo catcode changes of \startcontents and \doprintindex
+ % When called from @insertcopying or (short)caption, we need active
+ % backslash to get it printed correctly. Previously, we had
+ % \catcode`\\=\other instead. We'll see whether a problem appears
+ % with macro expansion. --kasal, 19aug04
+ \catcode`\@=0 \catcode`\\=\active \escapechar=`\@
+ %
+ % ... and for \example:
+ \spaceisspace
+ %
+ % The \empty here causes a following catcode 5 newline to be eaten as
+ % part of reading whitespace after a control sequence. It does not
+ % eat a catcode 13 newline. There's no good way to handle the two
+ % cases (untried: maybe e-TeX's \everyeof could help, though plain TeX
+ % would then have different behavior). See the Macro Details node in
+ % the manual for the workaround we recommend for macros and
+ % line-oriented commands.
+ %
+ \scantokens{#1\empty}%
+\endgroup}
\def\scanexp#1{%
\edef\temp{\noexpand\scanmacro{#1}}%
@@ -6593,7 +7193,7 @@ end
% This does \let #1 = #2, with \csnames; that is,
% \let \csname#1\endcsname = \csname#2\endcsname
% (except of course we have to play expansion games).
-%
+%
\def\cslet#1#2{%
\expandafter\let
\csname#1\expandafter\endcsname
@@ -6619,17 +7219,18 @@ end
% Macro bodies are absorbed as an argument in a context where
% all characters are catcode 10, 11 or 12, except \ which is active
-% (as in normal texinfo). It is necessary to change the definition of \.
-
+% (as in normal texinfo). It is necessary to change the definition of \
+% to recognize macro arguments; this is the job of \mbodybackslash.
+%
% Non-ASCII encodings make 8-bit characters active, so un-activate
% them to avoid their expansion. Must do this non-globally, to
% confine the change to the current group.
-
+%
% It's necessary to have hard CRs when the macro is executed. This is
-% done by making ^^M (\endlinechar) catcode 12 when reading the macro
+% done by making ^^M (\endlinechar) catcode 12 when reading the macro
% body, and then making it the \newlinechar in \scanmacro.
-
-\def\scanctxt{%
+%
+\def\scanctxt{% used as subroutine
\catcode`\"=\other
\catcode`\+=\other
\catcode`\<=\other
@@ -6642,13 +7243,13 @@ end
\ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi
}
-\def\scanargctxt{%
+\def\scanargctxt{% used for copying and captions, not macros.
\scanctxt
\catcode`\\=\other
\catcode`\^^M=\other
}
-\def\macrobodyctxt{%
+\def\macrobodyctxt{% used for @macro definitions
\scanctxt
\catcode`\{=\other
\catcode`\}=\other
@@ -6656,32 +7257,56 @@ end
\usembodybackslash
}
-\def\macroargctxt{%
+\def\macroargctxt{% used when scanning invocations
\scanctxt
- \catcode`\\=\other
+ \catcode`\\=0
}
+% why catcode 0 for \ in the above? To recognize \\ \{ \} as "escapes"
+% for the single characters \ { }. Thus, we end up with the "commands"
+% that would be written @\ @{ @} in a Texinfo document.
+%
+% We already have @{ and @}. For @\, we define it here, and only for
+% this purpose, to produce a typewriter backslash (so, the @\ that we
+% define for @math can't be used with @macro calls):
+%
+\def\\{\normalbackslash}%
+%
+% We would like to do this for \, too, since that is what makeinfo does.
+% But it is not possible, because Texinfo already has a command @, for a
+% cedilla accent. Documents must use @comma{} instead.
+%
+% \anythingelse will almost certainly be an error of some kind.
+
% \mbodybackslash is the definition of \ in @macro bodies.
% It maps \foo\ => \csname macarg.foo\endcsname => #N
% where N is the macro parameter number.
% We define \csname macarg.\endcsname to be \realbackslash, so
% \\ in macro replacement text gets you a backslash.
-
+%
{\catcode`@=0 @catcode`@\=@active
@gdef@usembodybackslash{@let\=@mbodybackslash}
@gdef@mbodybackslash#1\{@csname macarg.#1@endcsname}
}
\expandafter\def\csname macarg.\endcsname{\realbackslash}
+\def\margbackslash#1{\char`\#1 }
+
\def\macro{\recursivefalse\parsearg\macroxxx}
\def\rmacro{\recursivetrue\parsearg\macroxxx}
\def\macroxxx#1{%
- \getargs{#1}% now \macname is the macname and \argl the arglist
+ \getargs{#1}% now \macname is the macname and \argl the arglist
\ifx\argl\empty % no arguments
- \paramno=0%
+ \paramno=0\relax
\else
\expandafter\parsemargdef \argl;%
+ \if\paramno>256\relax
+ \ifx\eTeXversion\thisisundefined
+ \errhelp = \EMsimple
+ \errmessage{You need eTeX to compile a file with macros with more than 256 arguments}
+ \fi
+ \fi
\fi
\if1\csname ismacro.\the\macname\endcsname
\message{Warning: redefining \the\macname}%
@@ -6728,46 +7353,269 @@ end
% an opening brace, and that opening brace is not consumed.
\def\getargs#1{\getargsxxx#1{}}
\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
-\def\getmacname #1 #2\relax{\macname={#1}}
+\def\getmacname#1 #2\relax{\macname={#1}}
\def\getmacargs#1{\def\argl{#1}}
+% For macro processing make @ a letter so that we can make Texinfo private macro names.
+\edef\texiatcatcode{\the\catcode`\@}
+\catcode `@=11\relax
+
% Parse the optional {params} list. Set up \paramno and \paramlist
-% so \defmacro knows what to do. Define \macarg.blah for each blah
-% in the params list, to be ##N where N is the position in that list.
+% so \defmacro knows what to do. Define \macarg.BLAH for each BLAH
+% in the params list to some hook where the argument si to be expanded. If
+% there are less than 10 arguments that hook is to be replaced by ##N where N
+% is the position in that list, that is to say the macro arguments are to be
+% defined `a la TeX in the macro body.
+%
% That gets used by \mbodybackslash (above).
-
+%
% We need to get `macro parameter char #' into several definitions.
-% The technique used is stolen from LaTeX: let \hash be something
+% The technique used is stolen from LaTeX: let \hash be something
% unexpandable, insert that wherever you need a #, and then redefine
% it to # just before using the token list produced.
%
% The same technique is used to protect \eatspaces till just before
% the macro is used.
-
-\def\parsemargdef#1;{\paramno=0\def\paramlist{}%
- \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,}
+%
+% If there are 10 or more arguments, a different technique is used, where the
+% hook remains in the body, and when macro is to be expanded the body is
+% processed again to replace the arguments.
+%
+% In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the
+% argument N value and then \edef the body (nothing else will expand because of
+% the catcode regime underwhich the body was input).
+%
+% If you compile with TeX (not eTeX), and you have macros with 10 or more
+% arguments, you need that no macro has more than 256 arguments, otherwise an
+% error is produced.
+\def\parsemargdef#1;{%
+ \paramno=0\def\paramlist{}%
+ \let\hash\relax
+ \let\xeatspaces\relax
+ \parsemargdefxxx#1,;,%
+ % In case that there are 10 or more arguments we parse again the arguments
+ % list to set new definitions for the \macarg.BLAH macros corresponding to
+ % each BLAH argument. It was anyhow needed to parse already once this list
+ % in order to count the arguments, and as macros with at most 9 arguments
+ % are by far more frequent than macro with 10 or more arguments, defining
+ % twice the \macarg.BLAH macros does not cost too much processing power.
+ \ifnum\paramno<10\relax\else
+ \paramno0\relax
+ \parsemmanyargdef@@#1,;,% 10 or more arguments
+ \fi
+}
\def\parsemargdefxxx#1,{%
\if#1;\let\next=\relax
\else \let\next=\parsemargdefxxx
- \advance\paramno by 1%
+ \advance\paramno by 1
\expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
{\xeatspaces{\hash\the\paramno}}%
\edef\paramlist{\paramlist\hash\the\paramno,}%
\fi\next}
+\def\parsemmanyargdef@@#1,{%
+ \if#1;\let\next=\relax
+ \else
+ \let\next=\parsemmanyargdef@@
+ \edef\tempb{\eatspaces{#1}}%
+ \expandafter\def\expandafter\tempa
+ \expandafter{\csname macarg.\tempb\endcsname}%
+ % Note that we need some extra \noexpand\noexpand, this is because we
+ % don't want \the to be expanded in the \parsermacbody as it uses an
+ % \xdef .
+ \expandafter\edef\tempa
+ {\noexpand\noexpand\noexpand\the\toks\the\paramno}%
+ \advance\paramno by 1\relax
+ \fi\next}
+
% These two commands read recursive and nonrecursive macro bodies.
% (They're different since rec and nonrec macros end differently.)
+%
+\catcode `\@\texiatcatcode
\long\def\parsemacbody#1@end macro%
{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
\long\def\parsermacbody#1@end rmacro%
{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
+\catcode `\@=11\relax
+
+\let\endargs@\relax
+\let\nil@\relax
+\def\nilm@{\nil@}%
+\long\def\nillm@{\nil@}%
+
+% This macro is expanded during the Texinfo macro expansion, not during its
+% definition. It gets all the arguments values and assigns them to macros
+% macarg.ARGNAME
+%
+% #1 is the macro name
+% #2 is the list of argument names
+% #3 is the list of argument values
+\def\getargvals@#1#2#3{%
+ \def\macargdeflist@{}%
+ \def\saveparamlist@{#2}% Need to keep a copy for parameter expansion.
+ \def\paramlist{#2,\nil@}%
+ \def\macroname{#1}%
+ \begingroup
+ \macroargctxt
+ \def\argvaluelist{#3,\nil@}%
+ \def\@tempa{#3}%
+ \ifx\@tempa\empty
+ \setemptyargvalues@
+ \else
+ \getargvals@@
+ \fi
+}
+
+%
+\def\getargvals@@{%
+ \ifx\paramlist\nilm@
+ % Some sanity check needed here that \argvaluelist is also empty.
+ \ifx\argvaluelist\nillm@
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Too many arguments in macro `\macroname'!}%
+ \fi
+ \let\next\macargexpandinbody@
+ \else
+ \ifx\argvaluelist\nillm@
+ % No more arguments values passed to macro. Set remaining named-arg
+ % macros to empty.
+ \let\next\setemptyargvalues@
+ \else
+ % pop current arg name into \@tempb
+ \def\@tempa##1{\pop@{\@tempb}{\paramlist}##1\endargs@}%
+ \expandafter\@tempa\expandafter{\paramlist}%
+ % pop current argument value into \@tempc
+ \def\@tempa##1{\longpop@{\@tempc}{\argvaluelist}##1\endargs@}%
+ \expandafter\@tempa\expandafter{\argvaluelist}%
+ % Here \@tempb is the current arg name and \@tempc is the current arg value.
+ % First place the new argument macro definition into \@tempd
+ \expandafter\macname\expandafter{\@tempc}%
+ \expandafter\let\csname macarg.\@tempb\endcsname\relax
+ \expandafter\def\expandafter\@tempe\expandafter{%
+ \csname macarg.\@tempb\endcsname}%
+ \edef\@tempd{\long\def\@tempe{\the\macname}}%
+ \push@\@tempd\macargdeflist@
+ \let\next\getargvals@@
+ \fi
+ \fi
+ \next
+}
+
+\def\push@#1#2{%
+ \expandafter\expandafter\expandafter\def
+ \expandafter\expandafter\expandafter#2%
+ \expandafter\expandafter\expandafter{%
+ \expandafter#1#2}%
+}
+
+% Replace arguments by their values in the macro body, and place the result
+% in macro \@tempa
+\def\macvalstoargs@{%
+ % To do this we use the property that token registers that are \the'ed
+ % within an \edef expand only once. So we are going to place all argument
+ % values into respective token registers.
+ %
+ % First we save the token context, and initialize argument numbering.
+ \begingroup
+ \paramno0\relax
+ % Then, for each argument number #N, we place the corresponding argument
+ % value into a new token list register \toks#N
+ \expandafter\putargsintokens@\saveparamlist@,;,%
+ % Then, we expand the body so that argument are replaced by their
+ % values. The trick for values not to be expanded themselves is that they
+ % are within tokens and that tokens expand only once in an \edef .
+ \edef\@tempc{\csname mac.\macroname .body\endcsname}%
+ % Now we restore the token stack pointer to free the token list registers
+ % which we have used, but we make sure that expanded body is saved after
+ % group.
+ \expandafter
+ \endgroup
+ \expandafter\def\expandafter\@tempa\expandafter{\@tempc}%
+ }
-% This defines the macro itself. There are six cases: recursive and
-% nonrecursive macros of zero, one, and many arguments.
+\def\macargexpandinbody@{%
+ %% Define the named-macro outside of this group and then close this group.
+ \expandafter
+ \endgroup
+ \macargdeflist@
+ % First the replace in body the macro arguments by their values, the result
+ % is in \@tempa .
+ \macvalstoargs@
+ % Then we point at the \norecurse or \gobble (for recursive) macro value
+ % with \@tempb .
+ \expandafter\let\expandafter\@tempb\csname mac.\macroname .recurse\endcsname
+ % Depending on whether it is recursive or not, we need some tailing
+ % \egroup .
+ \ifx\@tempb\gobble
+ \let\@tempc\relax
+ \else
+ \let\@tempc\egroup
+ \fi
+ % And now we do the real job:
+ \edef\@tempd{\noexpand\@tempb{\macroname}\noexpand\scanmacro{\@tempa}\@tempc}%
+ \@tempd
+}
+
+\def\putargsintokens@#1,{%
+ \if#1;\let\next\relax
+ \else
+ \let\next\putargsintokens@
+ % First we allocate the new token list register, and give it a temporary
+ % alias \@tempb .
+ \toksdef\@tempb\the\paramno
+ % Then we place the argument value into that token list register.
+ \expandafter\let\expandafter\@tempa\csname macarg.#1\endcsname
+ \expandafter\@tempb\expandafter{\@tempa}%
+ \advance\paramno by 1\relax
+ \fi
+ \next
+}
+
+% Save the token stack pointer into macro #1
+\def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}}
+% Restore the token stack pointer from number in macro #1
+\def\texirestoretoksstackpoint#1{\expandafter\mathchardef\expandafter\@cclvi#1\relax}
+% newtoks that can be used non \outer .
+\def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi}
+
+% Tailing missing arguments are set to empty
+\def\setemptyargvalues@{%
+ \ifx\paramlist\nilm@
+ \let\next\macargexpandinbody@
+ \else
+ \expandafter\setemptyargvaluesparser@\paramlist\endargs@
+ \let\next\setemptyargvalues@
+ \fi
+ \next
+}
+
+\def\setemptyargvaluesparser@#1,#2\endargs@{%
+ \expandafter\def\expandafter\@tempa\expandafter{%
+ \expandafter\def\csname macarg.#1\endcsname{}}%
+ \push@\@tempa\macargdeflist@
+ \def\paramlist{#2}%
+}
+
+% #1 is the element target macro
+% #2 is the list macro
+% #3,#4\endargs@ is the list value
+\def\pop@#1#2#3,#4\endargs@{%
+ \def#1{#3}%
+ \def#2{#4}%
+}
+\long\def\longpop@#1#2#3,#4\endargs@{%
+ \long\def#1{#3}%
+ \long\def#2{#4}%
+}
+
+% This defines a Texinfo @macro. There are eight cases: recursive and
+% nonrecursive macros of zero, one, up to nine, and many arguments.
% Much magic with \expandafter here.
% \xdef is used so that macro definitions will survive the file
% they're defined in; @include reads the file inside a group.
+%
\def\defmacro{%
\let\hash=##% convert placeholders to macro parameter chars
\ifrecursive
@@ -6782,17 +7630,25 @@ end
\expandafter\noexpand\csname\the\macname xxx\endcsname}%
\expandafter\xdef\csname\the\macname xxx\endcsname##1{%
\egroup\noexpand\scanmacro{\temp}}%
- \else % many
- \expandafter\xdef\csname\the\macname\endcsname{%
- \bgroup\noexpand\macroargctxt
- \noexpand\csname\the\macname xx\endcsname}%
- \expandafter\xdef\csname\the\macname xx\endcsname##1{%
- \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
- \expandafter\expandafter
- \expandafter\xdef
- \expandafter\expandafter
- \csname\the\macname xxx\endcsname
- \paramlist{\egroup\noexpand\scanmacro{\temp}}%
+ \else
+ \ifnum\paramno<10\relax % at most 9
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \bgroup\noexpand\macroargctxt
+ \noexpand\csname\the\macname xx\endcsname}%
+ \expandafter\xdef\csname\the\macname xx\endcsname##1{%
+ \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
+ \expandafter\expandafter
+ \expandafter\xdef
+ \expandafter\expandafter
+ \csname\the\macname xxx\endcsname
+ \paramlist{\egroup\noexpand\scanmacro{\temp}}%
+ \else % 10 or more
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \noexpand\getargvals@{\the\macname}{\argl}%
+ }%
+ \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp
+ \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble
+ \fi
\fi
\else
\ifcase\paramno
@@ -6809,29 +7665,40 @@ end
\egroup
\noexpand\norecurse{\the\macname}%
\noexpand\scanmacro{\temp}\egroup}%
- \else % many
- \expandafter\xdef\csname\the\macname\endcsname{%
- \bgroup\noexpand\macroargctxt
- \expandafter\noexpand\csname\the\macname xx\endcsname}%
- \expandafter\xdef\csname\the\macname xx\endcsname##1{%
- \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
- \expandafter\expandafter
- \expandafter\xdef
- \expandafter\expandafter
- \csname\the\macname xxx\endcsname
- \paramlist{%
- \egroup
- \noexpand\norecurse{\the\macname}%
- \noexpand\scanmacro{\temp}\egroup}%
+ \else % at most 9
+ \ifnum\paramno<10\relax
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \bgroup\noexpand\macroargctxt
+ \expandafter\noexpand\csname\the\macname xx\endcsname}%
+ \expandafter\xdef\csname\the\macname xx\endcsname##1{%
+ \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
+ \expandafter\expandafter
+ \expandafter\xdef
+ \expandafter\expandafter
+ \csname\the\macname xxx\endcsname
+ \paramlist{%
+ \egroup
+ \noexpand\norecurse{\the\macname}%
+ \noexpand\scanmacro{\temp}\egroup}%
+ \else % 10 or more:
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \noexpand\getargvals@{\the\macname}{\argl}%
+ }%
+ \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp
+ \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse
+ \fi
\fi
\fi}
+\catcode `\@\texiatcatcode\relax
+
\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
% \braceorline decides whether the next nonwhitespace character is a
% {. If so it reads up to the closing }, if not, it reads the whole
% line. Whatever was read is then fed to the next control sequence
-% as an argument (by \parsebrace or \parsearg)
+% as an argument (by \parsebrace or \parsearg).
+%
\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
\def\braceorlinexxx{%
\ifx\nchar\bgroup\else
@@ -6841,7 +7708,8 @@ end
% @alias.
% We need some trickery to remove the optional spaces around the equal
-% sign. Just make them active and then expand them all to nothing.
+% sign. Make them active and then expand them all to nothing.
+%
\def\alias{\parseargusing\obeyspaces\aliasxxx}
\def\aliasxxx #1{\aliasyyy#1\relax}
\def\aliasyyy #1=#2\relax{%
@@ -6862,7 +7730,8 @@ end
% @inforef is relatively simple.
\def\inforef #1{\inforefzzz #1,,,,**}
-\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
+\def\inforefzzz #1,#2,#3,#4**{%
+ \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
node \samp{\ignorespaces#1{}}}
% @node's only job in TeX is to define \lastnode, which is used in
@@ -6923,11 +7792,32 @@ end
\toks0 = \expandafter{\lastsection}%
\immediate \writexrdef{title}{\the\toks0 }%
\immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc.
- \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, during \shipout
+ \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout
}%
\fi
}
+% @xrefautosectiontitle on|off says whether @section(ing) names are used
+% automatically in xrefs, if the third arg is not explicitly specified.
+% This was provided as a "secret" @set xref-automatic-section-title
+% variable, now it's official.
+%
+\parseargdef\xrefautomaticsectiontitle{%
+ \def\temp{#1}%
+ \ifx\temp\onword
+ \expandafter\let\csname SETxref-automatic-section-title\endcsname
+ = \empty
+ \else\ifx\temp\offword
+ \expandafter\let\csname SETxref-automatic-section-title\endcsname
+ = \relax
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @xrefautomaticsectiontitle value `\temp',
+ must be on|off}%
+ \fi\fi
+}
+
+%
% @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is
% the node name, #2 the name of the Info cross-reference, #3 the printed
% node name, #4 the name of the Info file, #5 the name of the printed
@@ -6936,26 +7826,41 @@ end
\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}
\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
\def\ref#1{\xrefX[#1,,,,,,,]}
+%
+\newbox\toprefbox
+\newbox\printedrefnamebox
+\newbox\infofilenamebox
+\newbox\printedmanualbox
+%
\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
\unsepspaces
- \def\printedmanual{\ignorespaces #5}%
+ %
+ % Get args without leading/trailing spaces.
\def\printedrefname{\ignorespaces #3}%
- \setbox1=\hbox{\printedmanual\unskip}%
- \setbox0=\hbox{\printedrefname\unskip}%
- \ifdim \wd0 = 0pt
+ \setbox\printedrefnamebox = \hbox{\printedrefname\unskip}%
+ %
+ \def\infofilename{\ignorespaces #4}%
+ \setbox\infofilenamebox = \hbox{\infofilename\unskip}%
+ %
+ \def\printedmanual{\ignorespaces #5}%
+ \setbox\printedmanualbox = \hbox{\printedmanual\unskip}%
+ %
+ % If the printed reference name (arg #3) was not explicitly given in
+ % the @xref, figure out what we want to use.
+ \ifdim \wd\printedrefnamebox = 0pt
% No printed node name was explicitly given.
- \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax
- % Use the node name inside the square brackets.
+ \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax
+ % Not auto section-title: use node name inside the square brackets.
\def\printedrefname{\ignorespaces #1}%
\else
- % Use the actual chapter/section title appear inside
- % the square brackets. Use the real section title if we have it.
- \ifdim \wd1 > 0pt
- % It is in another manual, so we don't have it.
+ % Auto section-title: use chapter/section title inside
+ % the square brackets if we have it.
+ \ifdim \wd\printedmanualbox > 0pt
+ % It is in another manual, so we don't have it; use node name.
\def\printedrefname{\ignorespaces #1}%
\else
\ifhavexrefs
- % We know the real title if we have the xref values.
+ % We (should) know the real title if we have the xref values.
\def\printedrefname{\refx{#1-title}{}}%
\else
% Otherwise just copy the Info node name.
@@ -6969,13 +7874,20 @@ end
\ifpdf
{\indexnofonts
\turnoffactive
+ \makevalueexpandable
% This expands tokens, so do it after making catcode changes, so _
- % etc. don't get their TeX definitions.
+ % etc. don't get their TeX definitions. This ignores all spaces in
+ % #4, including (wrongly) those in the middle of the filename.
\getfilename{#4}%
%
- % See comments at \activebackslashdouble.
- {\activebackslashdouble \xdef\pdfxrefdest{#1}%
- \backslashparens\pdfxrefdest}%
+ % This (wrongly) does not take account of leading or trailing
+ % spaces in #1, which should be ignored.
+ \edef\pdfxrefdest{#1}%
+ \ifx\pdfxrefdest\empty
+ \def\pdfxrefdest{Top}% no empty targets
+ \else
+ \txiescapepdf\pdfxrefdest % escape PDF special chars
+ \fi
%
\leavevmode
\startlink attr{/Border [0 0 0]}%
@@ -7002,29 +7914,42 @@ end
\iffloat\Xthisreftitle
% If the user specified the print name (third arg) to the ref,
% print it instead of our usual "Figure 1.2".
- \ifdim\wd0 = 0pt
+ \ifdim\wd\printedrefnamebox = 0pt
\refx{#1-snt}{}%
\else
\printedrefname
\fi
%
- % if the user also gave the printed manual name (fifth arg), append
+ % If the user also gave the printed manual name (fifth arg), append
% "in MANUALNAME".
- \ifdim \wd1 > 0pt
+ \ifdim \wd\printedmanualbox > 0pt
\space \putwordin{} \cite{\printedmanual}%
\fi
\else
% node/anchor (non-float) references.
+ %
+ % If we use \unhbox to print the node names, TeX does not insert
+ % empty discretionaries after hyphens, which means that it will not
+ % find a line break at a hyphen in a node names. Since some manuals
+ % are best written with fairly long node names, containing hyphens,
+ % this is a loss. Therefore, we give the text of the node name
+ % again, so it is as if TeX is seeing it for the first time.
+ %
+ \ifdim \wd\printedmanualbox > 0pt
+ % Cross-manual reference with a printed manual name.
+ %
+ \crossmanualxref{\cite{\printedmanual\unskip}}%
+ %
+ \else\ifdim \wd\infofilenamebox > 0pt
+ % Cross-manual reference with only an info filename (arg 4), no
+ % printed manual name (arg 5). This is essentially the same as
+ % the case above; we output the filename, since we have nothing else.
+ %
+ \crossmanualxref{\code{\infofilename\unskip}}%
%
- % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not
- % insert empty discretionaries after hyphens, which means that it will
- % not find a line break at a hyphen in a node names. Since some manuals
- % are best written with fairly long node names, containing hyphens, this
- % is a loss. Therefore, we give the text of the node name again, so it
- % is as if TeX is seeing it for the first time.
- \ifdim \wd1 > 0pt
- \putwordSection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}%
\else
+ % Reference within this manual.
+ %
% _ (for example) has to be the character _ for the purposes of the
% control sequence corresponding to the node, but it has to expand
% into the usual \leavevmode...\vrule stuff for purposes of
@@ -7036,7 +7961,7 @@ end
\setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
\ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
}%
- % output the `[mynode]' via a macro so it can be overridden.
+ % output the `[mynode]' via the macro below so it can be overridden.
\xrefprintnodename\printedrefname
%
% But we always want a comma and a space:
@@ -7044,11 +7969,37 @@ end
%
% output the `page 3'.
\turnoffactive \putwordpage\tie\refx{#1-pg}{}%
- \fi
+ \fi\fi
\fi
\endlink
\endgroup}
+% Output a cross-manual xref to #1. Used just above (twice).
+%
+% Only include the text "Section ``foo'' in" if the foo is neither
+% missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply
+% "see The Foo Manual", the idea being to refer to the whole manual.
+%
+% But, this being TeX, we can't easily compare our node name against the
+% string "Top" while ignoring the possible spaces before and after in
+% the input. By adding the arbitrary 7sp below, we make it much less
+% likely that a real node name would have the same width as "Top" (e.g.,
+% in a monospaced font). Hopefully it will never happen in practice.
+%
+% For the same basic reason, we retypeset the "Top" at every
+% reference, since the current font is indeterminate.
+%
+\def\crossmanualxref#1{%
+ \setbox\toprefbox = \hbox{Top\kern7sp}%
+ \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}%
+ \ifdim \wd2 > 7sp % nonempty?
+ \ifdim \wd2 = \wd\toprefbox \else % same as Top?
+ \putwordSection{} ``\printedrefname'' \putwordin{}\space
+ \fi
+ \fi
+ #1%
+}
+
% This macro is called from \xrefX for the `[nodename]' part of xref
% output. It's a separate macro only so it can be changed more easily,
% since square brackets don't work well in some documents. Particularly
@@ -7099,7 +8050,8 @@ end
\angleleft un\-de\-fined\angleright
\iflinks
\ifhavexrefs
- \message{\linenumber Undefined cross reference `#1'.}%
+ {\toks0 = {#1}% avoid expansion of possibly-complex value
+ \message{\linenumber Undefined cross reference `\the\toks0'.}}%
\else
\ifwarnedxrefs\else
\global\warnedxrefstrue
@@ -7263,7 +8215,7 @@ end
% space to prevent strange expansion errors.)
\def\supereject{\par\penalty -20000\footnoteno =0 }
-% @footnotestyle is meaningful for info output only.
+% @footnotestyle is meaningful for Info output only.
\let\footnotestyle=\comment
{\catcode `\@=11
@@ -7326,6 +8278,8 @@ end
% expands into a box, it must come within the paragraph, lest it
% provide a place where TeX can split the footnote.
\footstrut
+ %
+ % Invoke rest of plain TeX footnote routine.
\futurelet\next\fo@t
}
}%end \catcode `\@=11
@@ -7333,7 +8287,7 @@ end
% In case a @footnote appears in a vbox, save the footnote text and create
% the real \insert just after the vbox finished. Otherwise, the insertion
% would be lost.
-% Similarily, if a @footnote appears inside an alignment, save the footnote
+% Similarly, if a @footnote appears inside an alignment, save the footnote
% text to a box and make the \insert when a row of the table is finished.
% And the same can be done for other insert classes. --kasal, 16nov03.
@@ -7413,7 +8367,7 @@ end
it from ftp://tug.org/tex/epsf.tex.}
%
\def\image#1{%
- \ifx\epsfbox\undefined
+ \ifx\epsfbox\thisisundefined
\ifwarnednoepsf \else
\errhelp = \noepsfhelp
\errmessage{epsf.tex not found, images will be ignored}%
@@ -7429,7 +8383,7 @@ end
% #2 is (optional) width, #3 is (optional) height.
% #4 is (ignored optional) html alt text.
% #5 is (ignored optional) extension.
-% #6 is just the usual extra ignored arg for parsing this stuff.
+% #6 is just the usual extra ignored arg for parsing stuff.
\newif\ifimagevmode
\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
\catcode`\^^M = 5 % in case we're inside an example
@@ -7437,15 +8391,30 @@ end
% If the image is by itself, center it.
\ifvmode
\imagevmodetrue
- \nobreak\bigskip
+ \else \ifx\centersub\centerV
+ % for @center @image, we need a vbox so we can have our vertical space
+ \imagevmodetrue
+ \vbox\bgroup % vbox has better behavior than vtop herev
+ \fi\fi
+ %
+ \ifimagevmode
+ \nobreak\medskip
% Usually we'll have text after the image which will insert
% \parskip glue, so insert it here too to equalize the space
% above and below.
\nobreak\vskip\parskip
\nobreak
- \line\bgroup
\fi
%
+ % Leave vertical mode so that indentation from an enclosing
+ % environment such as @quotation is respected.
+ % However, if we're at the top level, we don't want the
+ % normal paragraph indentation.
+ % On the other hand, if we are in the case of @center @image, we don't
+ % want to start a paragraph, which will create a hsize-width box and
+ % eradicate the centering.
+ \ifx\centersub\centerV\else \noindent \fi
+ %
% Output the image.
\ifpdf
\dopdfimage{#1}{#2}{#3}%
@@ -7456,7 +8425,10 @@ end
\epsfbox{#1.eps}%
\fi
%
- \ifimagevmode \egroup \bigbreak \fi % space after the image
+ \ifimagevmode
+ \medskip % space after a standalone image
+ \fi
+ \ifx\centersub\centerV \egroup \fi
\endgroup}
@@ -7728,10 +8700,9 @@ end
\message{localization,}
-% @documentlanguage is usually given very early, just after
-% @setfilename. If done too late, it may not override everything
-% properly. Single argument is the language (de) or locale (de_DE)
-% abbreviation. It would be nice if we could set up a hyphenation file.
+% For single-language documents, @documentlanguage is usually given very
+% early, just after @documentencoding. Single argument is the language
+% (de) or locale (de_DE) abbreviation.
%
{
\catcode`\_ = \active
@@ -7744,31 +8715,60 @@ end
\ifeof 1
\documentlanguagetrywithoutunderscore{#1_\finish}%
\else
+ \globaldefs = 1 % everything in the txi-LL files needs to persist
\input txi-#1.tex
\fi
\closein 1
- \endgroup
+ \endgroup % end raw TeX
\endgroup}
-}
%
% If they passed de_DE, and txi-de_DE.tex doesn't exist,
% try txi-de.tex.
-%
-\def\documentlanguagetrywithoutunderscore#1_#2\finish{%
+%
+\gdef\documentlanguagetrywithoutunderscore#1_#2\finish{%
\openin 1 txi-#1.tex
\ifeof 1
\errhelp = \nolanghelp
\errmessage{Cannot read language file txi-#1.tex}%
\else
+ \globaldefs = 1 % everything in the txi-LL files needs to persist
\input txi-#1.tex
\fi
\closein 1
}
+}% end of special _ catcode
%
\newhelp\nolanghelp{The given language definition file cannot be found or
-is empty. Maybe you need to install it? In the current directory
-should work if nowhere else does.}
+is empty. Maybe you need to install it? Putting it in the current
+directory should work if nowhere else does.}
+
+% This macro is called from txi-??.tex files; the first argument is the
+% \language name to set (without the "\lang@" prefix), the second and
+% third args are \{left,right}hyphenmin.
+%
+% The language names to pass are determined when the format is built.
+% See the etex.log file created at that time, e.g.,
+% /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log.
+%
+% With TeX Live 2008, etex now includes hyphenation patterns for all
+% available languages. This means we can support hyphenation in
+% Texinfo, at least to some extent. (This still doesn't solve the
+% accented characters problem.)
+%
+\catcode`@=11
+\def\txisetlanguage#1#2#3{%
+ % do not set the language if the name is undefined in the current TeX.
+ \expandafter\ifx\csname lang@#1\endcsname \relax
+ \message{no patterns for #1}%
+ \else
+ \global\language = \csname lang@#1\endcsname
+ \fi
+ % but there is no harm in adjusting the hyphenmin values regardless.
+ \global\lefthyphenmin = #2\relax
+ \global\righthyphenmin = #3\relax
+}
+% Helpers for encodings.
% Set the catcode of characters 128 through 255 to the specified number.
%
\def\setnonasciicharscatcode#1{%
@@ -7809,7 +8809,7 @@ should work if nowhere else does.}
\setnonasciicharscatcode\active
\lattwochardefs
%
- \else \ifx \declaredencoding \latone
+ \else \ifx \declaredencoding \latone
\setnonasciicharscatcode\active
\latonechardefs
%
@@ -7821,7 +8821,7 @@ should work if nowhere else does.}
\setnonasciicharscatcode\active
\utfeightchardefs
%
- \else
+ \else
\message{Unknown document encoding #1, ignoring.}%
%
\fi % utfeight
@@ -7833,7 +8833,7 @@ should work if nowhere else does.}
% A message to be logged when using a character that isn't available
% the default font encoding (OT1).
-%
+%
\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}}
% Take account of \c (plain) vs. \, (Texinfo) difference.
@@ -7846,21 +8846,21 @@ should work if nowhere else does.}
%
% Latin1 (ISO-8859-1) character definitions.
\def\latonechardefs{%
- \gdef^^a0{~}
+ \gdef^^a0{\tie}
\gdef^^a1{\exclamdown}
- \gdef^^a2{\missingcharmsg{CENT SIGN}}
+ \gdef^^a2{\missingcharmsg{CENT SIGN}}
\gdef^^a3{{\pounds}}
\gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
\gdef^^a5{\missingcharmsg{YEN SIGN}}
- \gdef^^a6{\missingcharmsg{BROKEN BAR}}
+ \gdef^^a6{\missingcharmsg{BROKEN BAR}}
\gdef^^a7{\S}
- \gdef^^a8{\"{}}
- \gdef^^a9{\copyright}
+ \gdef^^a8{\"{}}
+ \gdef^^a9{\copyright}
\gdef^^aa{\ordf}
- \gdef^^ab{\missingcharmsg{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}}
+ \gdef^^ab{\guillemetleft}
\gdef^^ac{$\lnot$}
- \gdef^^ad{\-}
- \gdef^^ae{\registeredsymbol}
+ \gdef^^ad{\-}
+ \gdef^^ae{\registeredsymbol}
\gdef^^af{\={}}
%
\gdef^^b0{\textdegree}
@@ -7876,7 +8876,7 @@ should work if nowhere else does.}
\gdef^^b9{$^1$}
\gdef^^ba{\ordm}
%
- \gdef^^bb{\missingcharmsg{RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK}}
+ \gdef^^bb{\guillemetright}
\gdef^^bc{$1\over4$}
\gdef^^bd{$1\over2$}
\gdef^^be{$3\over4$}
@@ -7887,7 +8887,7 @@ should work if nowhere else does.}
\gdef^^c2{\^A}
\gdef^^c3{\~A}
\gdef^^c4{\"A}
- \gdef^^c5{\ringaccent A}
+ \gdef^^c5{\ringaccent A}
\gdef^^c6{\AE}
\gdef^^c7{\cedilla C}
\gdef^^c8{\`E}
@@ -7899,7 +8899,7 @@ should work if nowhere else does.}
\gdef^^ce{\^I}
\gdef^^cf{\"I}
%
- \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER ETH}}
+ \gdef^^d0{\DH}
\gdef^^d1{\~N}
\gdef^^d2{\`O}
\gdef^^d3{\'O}
@@ -7913,7 +8913,7 @@ should work if nowhere else does.}
\gdef^^db{\^U}
\gdef^^dc{\"U}
\gdef^^dd{\'Y}
- \gdef^^de{\missingcharmsg{LATIN CAPITAL LETTER THORN}}
+ \gdef^^de{\TH}
\gdef^^df{\ss}
%
\gdef^^e0{\`a}
@@ -7933,7 +8933,7 @@ should work if nowhere else does.}
\gdef^^ee{\^{\dotless i}}
\gdef^^ef{\"{\dotless i}}
%
- \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER ETH}}
+ \gdef^^f0{\dh}
\gdef^^f1{\~n}
\gdef^^f2{\`o}
\gdef^^f3{\'o}
@@ -7947,7 +8947,7 @@ should work if nowhere else does.}
\gdef^^fb{\^u}
\gdef^^fc{\"u}
\gdef^^fd{\'y}
- \gdef^^fe{\missingcharmsg{LATIN SMALL LETTER THORN}}
+ \gdef^^fe{\th}
\gdef^^ff{\"y}
}
@@ -7968,8 +8968,8 @@ should work if nowhere else does.}
% Latin2 (ISO-8859-2) character definitions.
\def\lattwochardefs{%
- \gdef^^a0{~}
- \gdef^^a1{\missingcharmsg{LATIN CAPITAL LETTER A WITH OGONEK}}
+ \gdef^^a0{\tie}
+ \gdef^^a1{\ogonek{A}}
\gdef^^a2{\u{}}
\gdef^^a3{\L}
\gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
@@ -7986,8 +8986,8 @@ should work if nowhere else does.}
\gdef^^af{\dotaccent Z}
%
\gdef^^b0{\textdegree}
- \gdef^^b1{\missingcharmsg{LATIN SMALL LETTER A WITH OGONEK}}
- \gdef^^b2{\missingcharmsg{OGONEK}}
+ \gdef^^b1{\ogonek{a}}
+ \gdef^^b2{\ogonek{ }}
\gdef^^b3{\l}
\gdef^^b4{\'{}}
\gdef^^b5{\v l}
@@ -8012,14 +9012,14 @@ should work if nowhere else does.}
\gdef^^c7{\cedilla C}
\gdef^^c8{\v C}
\gdef^^c9{\'E}
- \gdef^^ca{\missingcharmsg{LATIN CAPITAL LETTER E WITH OGONEK}}
+ \gdef^^ca{\ogonek{E}}
\gdef^^cb{\"E}
\gdef^^cc{\v E}
\gdef^^cd{\'I}
\gdef^^ce{\^I}
\gdef^^cf{\v D}
%
- \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER D WITH STROKE}}
+ \gdef^^d0{\DH}
\gdef^^d1{\'N}
\gdef^^d2{\v N}
\gdef^^d3{\'O}
@@ -8028,7 +9028,7 @@ should work if nowhere else does.}
\gdef^^d6{\"O}
\gdef^^d7{$\times$}
\gdef^^d8{\v R}
- \gdef^^d9{\ringaccent U}
+ \gdef^^d9{\ringaccent U}
\gdef^^da{\'U}
\gdef^^db{\H U}
\gdef^^dc{\"U}
@@ -8046,14 +9046,14 @@ should work if nowhere else does.}
\gdef^^e7{\cedilla c}
\gdef^^e8{\v c}
\gdef^^e9{\'e}
- \gdef^^ea{\missingcharmsg{LATIN SMALL LETTER E WITH OGONEK}}
+ \gdef^^ea{\ogonek{e}}
\gdef^^eb{\"e}
\gdef^^ec{\v e}
- \gdef^^ed{\'\i}
- \gdef^^ee{\^\i}
+ \gdef^^ed{\'{\dotless{i}}}
+ \gdef^^ee{\^{\dotless{i}}}
\gdef^^ef{\v d}
%
- \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER D WITH STROKE}}
+ \gdef^^f0{\dh}
\gdef^^f1{\'n}
\gdef^^f2{\v n}
\gdef^^f3{\'o}
@@ -8072,11 +9072,11 @@ should work if nowhere else does.}
}
% UTF-8 character definitions.
-%
+%
% This code to support UTF-8 is based on LaTeX's utf8.def, with some
% changes for Texinfo conventions. It is included here under the GPL by
% permission from Frank Mittelbach and the LaTeX team.
-%
+%
\newcount\countUTFx
\newcount\countUTFy
\newcount\countUTFz
@@ -8141,7 +9141,7 @@ should work if nowhere else does.}
\gdef\DeclareUnicodeCharacter#1#2{%
\countUTFz = "#1\relax
- \wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}%
+ %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}%
\begingroup
\parseXMLCharref
\def\UTFviiiTwoOctets##1##2{%
@@ -8226,6 +9226,7 @@ should work if nowhere else does.}
\DeclareUnicodeCharacter{00CE}{\^I}
\DeclareUnicodeCharacter{00CF}{\"I}
+ \DeclareUnicodeCharacter{00D0}{\DH}
\DeclareUnicodeCharacter{00D1}{\~N}
\DeclareUnicodeCharacter{00D2}{\`O}
\DeclareUnicodeCharacter{00D3}{\'O}
@@ -8238,6 +9239,7 @@ should work if nowhere else does.}
\DeclareUnicodeCharacter{00DB}{\^U}
\DeclareUnicodeCharacter{00DC}{\"U}
\DeclareUnicodeCharacter{00DD}{\'Y}
+ \DeclareUnicodeCharacter{00DE}{\TH}
\DeclareUnicodeCharacter{00DF}{\ss}
\DeclareUnicodeCharacter{00E0}{\`a}
@@ -8257,6 +9259,7 @@ should work if nowhere else does.}
\DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}}
\DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}}
+ \DeclareUnicodeCharacter{00F0}{\dh}
\DeclareUnicodeCharacter{00F1}{\~n}
\DeclareUnicodeCharacter{00F2}{\`o}
\DeclareUnicodeCharacter{00F3}{\'o}
@@ -8269,16 +9272,21 @@ should work if nowhere else does.}
\DeclareUnicodeCharacter{00FB}{\^u}
\DeclareUnicodeCharacter{00FC}{\"u}
\DeclareUnicodeCharacter{00FD}{\'y}
+ \DeclareUnicodeCharacter{00FE}{\th}
\DeclareUnicodeCharacter{00FF}{\"y}
\DeclareUnicodeCharacter{0100}{\=A}
\DeclareUnicodeCharacter{0101}{\=a}
\DeclareUnicodeCharacter{0102}{\u{A}}
\DeclareUnicodeCharacter{0103}{\u{a}}
+ \DeclareUnicodeCharacter{0104}{\ogonek{A}}
+ \DeclareUnicodeCharacter{0105}{\ogonek{a}}
\DeclareUnicodeCharacter{0106}{\'C}
\DeclareUnicodeCharacter{0107}{\'c}
\DeclareUnicodeCharacter{0108}{\^C}
\DeclareUnicodeCharacter{0109}{\^c}
+ \DeclareUnicodeCharacter{0118}{\ogonek{E}}
+ \DeclareUnicodeCharacter{0119}{\ogonek{e}}
\DeclareUnicodeCharacter{010A}{\dotaccent{C}}
\DeclareUnicodeCharacter{010B}{\dotaccent{c}}
\DeclareUnicodeCharacter{010C}{\v{C}}
@@ -8426,6 +9434,8 @@ should work if nowhere else does.}
\DeclareUnicodeCharacter{0233}{\=y}
\DeclareUnicodeCharacter{0237}{\dotless{j}}
+ \DeclareUnicodeCharacter{02DB}{\ogonek{ }}
+
\DeclareUnicodeCharacter{1E02}{\dotaccent{B}}
\DeclareUnicodeCharacter{1E03}{\dotaccent{b}}
\DeclareUnicodeCharacter{1E04}{\udotaccent{B}}
@@ -8599,8 +9609,8 @@ should work if nowhere else does.}
% Prevent underfull vbox error messages.
\vbadness = 10000
-% Don't be so finicky about underfull hboxes, either.
-\hbadness = 2000
+% Don't be very finicky about underfull hboxes, either.
+\hbadness = 6666
% Following George Bush, get rid of widows and orphans.
\widowpenalty=10000
@@ -8807,25 +9817,21 @@ should work if nowhere else does.}
\message{and turning on texinfo input format.}
+\def^^L{\par} % remove \outer, so ^L can appear in an @comment
+
+% DEL is a comment character, in case @c does not suffice.
+\catcode`\^^? = 14
+
% Define macros to output various characters with catcode for normal text.
-\catcode`\"=\other
-\catcode`\~=\other
-\catcode`\^=\other
-\catcode`\_=\other
-\catcode`\|=\other
-\catcode`\<=\other
-\catcode`\>=\other
-\catcode`\+=\other
-\catcode`\$=\other
-\def\normaldoublequote{"}
-\def\normaltilde{~}
-\def\normalcaret{^}
-\def\normalunderscore{_}
-\def\normalverticalbar{|}
-\def\normalless{<}
-\def\normalgreater{>}
-\def\normalplus{+}
-\def\normaldollar{$}%$ font-lock fix
+\catcode`\"=\other \def\normaldoublequote{"}
+\catcode`\$=\other \def\normaldollar{$}%$ font-lock fix
+\catcode`\+=\other \def\normalplus{+}
+\catcode`\<=\other \def\normalless{<}
+\catcode`\>=\other \def\normalgreater{>}
+\catcode`\^=\other \def\normalcaret{^}
+\catcode`\_=\other \def\normalunderscore{_}
+\catcode`\|=\other \def\normalverticalbar{|}
+\catcode`\~=\other \def\normaltilde{~}
% This macro is used to make a character print one way in \tt
% (where it can probably be output as-is), and another way in other fonts,
@@ -8903,31 +9909,43 @@ should work if nowhere else does.}
% In texinfo, backslash is an active character; it prints the backslash
% in fixed width font.
-\catcode`\\=\active
-@def@normalbackslash{{@tt@backslashcurfont}}
+\catcode`\\=\active % @ for escape char from now on.
+
+% The story here is that in math mode, the \char of \backslashcurfont
+% ends up printing the roman \ from the math symbol font (because \char
+% in math mode uses the \mathcode, and plain.tex sets
+% \mathcode`\\="026E). It seems better for @backslashchar{} to always
+% print a typewriter backslash, hence we use an explicit \mathchar,
+% which is the decimal equivalent of "715c (class 7, e.g., use \fam;
+% ignored family value; char position "5C). We can't use " for the
+% usual hex value because it has already been made active.
+@def@normalbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}}
+@let@backslashchar = @normalbackslash % @backslashchar{} is for user documents.
+
% On startup, @fixbackslash assigns:
% @let \ = @normalbackslash
-
% \rawbackslash defines an active \ to do \backslashcurfont.
% \otherbackslash defines an active \ to be a literal `\' character with
-% catcode other.
+% catcode other. We switch back and forth between these.
@gdef@rawbackslash{@let\=@backslashcurfont}
@gdef@otherbackslash{@let\=@realbackslash}
% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
% the literal character `\'.
-%
+%
@def@normalturnoffactive{%
- @let\=@normalbackslash
@let"=@normaldoublequote
- @let~=@normaltilde
+ @let$=@normaldollar %$ font-lock fix
+ @let+=@normalplus
+ @let<=@normalless
+ @let>=@normalgreater
+ @let\=@normalbackslash
@let^=@normalcaret
@let_=@normalunderscore
@let|=@normalverticalbar
- @let<=@normalless
- @let>=@normalgreater
- @let+=@normalplus
- @let$=@normaldollar %$ font-lock fix
+ @let~=@normaltilde
+ @markupsetuplqdefault
+ @markupsetuprqdefault
@unsepspaces
}
@@ -8957,11 +9975,28 @@ should work if nowhere else does.}
% Say @foo, not \foo, in error messages.
@escapechar = `@@
-% These look ok in all fonts, so just make them not special.
-@catcode`@& = @other
-@catcode`@# = @other
-@catcode`@% = @other
+% These (along with & and #) are made active for url-breaking, so need
+% active definitions as the normal characters.
+@def@normaldot{.}
+@def@normalquest{?}
+@def@normalslash{/}
+% These look ok in all fonts, so just make them not special.
+% @hashchar{} gets its own user-level command, because of #line.
+@catcode`@& = @other @def@normalamp{&}
+@catcode`@# = @other @def@normalhash{#}
+@catcode`@% = @other @def@normalpercent{%}
+
+@let @hashchar = @normalhash
+
+@c Finally, make ` and ' active, so that txicodequoteundirected and
+@c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we
+@c don't make ` and ' active, @code will not get them as active chars.
+@c Do this last of all since we use ` in the previous @catcode assignments.
+@catcode`@'=@active
+@catcode`@`=@active
+@markupsetuplqdefault
+@markupsetuprqdefault
@c Local variables:
@c eval: (add-hook 'write-file-hooks 'time-stamp)
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index dced7a9f74c..7b5cf1acb4e 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -305,9 +305,9 @@ systems' @command{tar} programs will also work, only try GNU
@item Perl version 5.6.1 (or later)
-Necessary when targetting Darwin, building @samp{libstdc++},
+Necessary when targeting Darwin, building @samp{libstdc++},
and not using @option{--disable-symvers}.
-Necessary when targetting Solaris 2 with Sun @command{ld} and not using
+Necessary when targeting Solaris 2 with Sun @command{ld} and not using
@option{--disable-symvers}. The bundled @command{perl} in Solaris@tie{}8
and up works.
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 4c5c79fce33..94441f85e43 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -884,9 +884,9 @@ See RS/6000 and PowerPC Options.
-mprefergot -musermode -multcost=@var{number} -mdiv=@var{strategy} @gol
-mdivsi3_libfunc=@var{name} -mfixed-range=@var{register-range} @gol
-mindexed-addressing -mgettrcost=@var{number} -mpt-fixed @gol
--maccumulate-outgoing-args -minvalid-symbols -msoft-atomic @gol
--mbranch-cost=@var{num} -mcbranchdi -mcmpeqdi -mfused-madd -mpretend-cmove @gol
--menable-tas}
+-maccumulate-outgoing-args -minvalid-symbols -msoft-atomic -mhard-atomic @gol
+-mbranch-cost=@var{num} -mcbranchdi -mcmpeqdi -mfused-madd -mno-fused-madd @gol
+-mpretend-cmove -menable-tas}
@emph{Solaris 2 Options}
@gccoptlist{-mimpure-text -mno-impure-text @gol
@@ -3090,7 +3090,7 @@ Options} and @ref{Objective-C and Objective-C++ Dialect Options}.
-Wformat @gol
-Wmain @r{(only for C/ObjC and unless} @option{-ffreestanding}@r{)} @gol
-Wmaybe-uninitialized @gol
--Wmissing-braces @gol
+-Wmissing-braces @r{(only for C/ObjC)} @gol
-Wnonnull @gol
-Wparentheses @gol
-Wpointer-sign @gol
@@ -3401,7 +3401,8 @@ or @option{-Wpedantic}.
@opindex Wno-missing-braces
Warn if an aggregate or union initializer is not fully bracketed. In
the following example, the initializer for @samp{a} is not fully
-bracketed, but that for @samp{b} is fully bracketed.
+bracketed, but that for @samp{b} is fully bracketed. This warning is
+enabled by @option{-Wall} in C.
@smallexample
int a[2][2] = @{ 0, 1, 2, 3 @};
@@ -11170,26 +11171,26 @@ points to.
@item
The startup code from libgcc never sets @code{EIND}.
-Notice that startup code is a blend of code from libgcc and AVR-Libc.
-For the impact of AVR-Libc on @code{EIND}, see the
-@w{@uref{http://nongnu.org/avr-libc/user-manual,AVR-Libc user manual}}.
+Notice that startup code is a blend of code from libgcc and AVR-LibC.
+For the impact of AVR-LibC on @code{EIND}, see the
+@w{@uref{http://nongnu.org/avr-libc/user-manual,AVR-LibC user manual}}.
@item
It is legitimate for user-specific startup code to set up @code{EIND}
early, for example by means of initialization code located in
section @code{.init3}. Such code runs prior to general startup code
that initializes RAM and calls constructors, but after the bit
-of startup code from AVR-Libc that sets @code{EIND} to the segment
+of startup code from AVR-LibC that sets @code{EIND} to the segment
where the vector table is located.
@example
#include <avr/io.h>
static void
-__attribute__ ((section (".init3"), naked, used, no_instrument_function))
+__attribute__((section(".init3"),naked,used,no_instrument_function))
init3_set_eind (void)
@{
- __asm volatile ("ldi r24, pm_hh8(__trampolines_start)" "\n\t"
- "out %i0, r24" :: "n" (&EIND) : "r24", "memory");
+ __asm volatile ("ldi r24,pm_hh8(__trampolines_start)\n\t"
+ "out %i0,r24" :: "n" (&EIND) : "r24","memory");
@}
@end example
@@ -15375,7 +15376,7 @@ Equivalent to @option{-march=mips64r2}.
@itemx -mno-mips16
@opindex mips16
@opindex mno-mips16
-Generate (do not generate) MIPS16 code. If GCC is targetting a
+Generate (do not generate) MIPS16 code. If GCC is targeting a
MIPS32 or MIPS64 architecture, it makes use of the MIPS16e ASE@.
MIPS16 code generation can also be controlled on a per-function basis
@@ -16928,7 +16929,7 @@ Generate code that tries to avoid (not avoid) the use of indexed load
or store instructions. These instructions can incur a performance
penalty on Power6 processors in certain situations, such as when
stepping through large arrays that cross a 16M boundary. This option
-is enabled by default when targetting Power6 and disabled otherwise.
+is enabled by default when targeting Power6 and disabled otherwise.
@item -mfused-madd
@itemx -mno-fused-madd
@@ -16947,7 +16948,7 @@ mapped to @option{-ffp-contract=off}.
@opindex mno-mulhw
Generate code that uses (does not use) the half-word multiply and
multiply-accumulate instructions on the IBM 405, 440, 464 and 476 processors.
-These instructions are generated by default when targetting those
+These instructions are generated by default when targeting those
processors.
@item -mdlmzb
@@ -16956,7 +16957,7 @@ processors.
@opindex mno-dlmzb
Generate code that uses (does not use) the string-search @samp{dlmzb}
instruction on the IBM 405, 440, 464 and 476 processors. This instruction is
-generated by default when targetting those processors.
+generated by default when targeting those processors.
@item -mno-bit-align
@itemx -mbit-align
@@ -18053,10 +18054,22 @@ which is incompatible with the SH ABI@.
Generate GNU/Linux compatible gUSA software atomic sequences for the atomic
built-in functions. The generated atomic sequences require support from the
interrupt / exception handling code of the system and are only suitable for
-single-core systems. They will not perform correctly on multi-core systems.
+single-core systems. They will not operate correctly on multi-core systems.
This option is enabled by default when the target is @code{sh-*-linux*}.
+When the target is SH4A, this option will also partially utilize the hardware
+atomic instructions @code{movli.l} and @code{movco.l} to create more
+efficient code.
For details on the atomic built-in functions see @ref{__atomic Builtins}.
+@item -mhard-atomic
+@opindex hard-atomic
+Generate hardware atomic sequences for the atomic built-in functions. This
+is only available on SH4A and is suitable for multi-core systems. Code
+compiled with this option will also be compatible with gUSA aware
+interrupt / exception handling systems. In contrast to the
+@option{-msoft-atomic} option this will only use the instructions
+@code{movli.l} and @code{movco.l} to create atomic sequences.
+
@item -menable-tas
@opindex menable-tas
Generate the @code{tas.b} opcode for @code{__atomic_test_and_set}.
@@ -18237,11 +18250,17 @@ Emit the @code{cmpeqdi_t} instruction pattern even when @option{-mcbranchdi}
is in effect.
@item -mfused-madd
+@itemx -mno-fused-madd
@opindex mfused-madd
-Allow the usage of the @code{fmac} instruction (floating-point
-multiply-accumulate) if the processor type supports it. Enabling this
-option might generate code that produces different numeric floating-point
-results compared to strict IEEE 754 arithmetic.
+@opindex mno-fused-madd
+If the processor type supports it, setting @code{-mfused-madd} will allow the
+usage of the @code{fmac} instruction (floating-point multiply-accumulate) for
+regular calculations. Enabling this option might generate faster code but also
+produce different numeric floating-point results compared to strict IEEE 754
+arithmetic. @code{-mfused-madd} is enabled by default by option
+@option{-funsafe-math-optimizations}. Setting @code{-mno-fused-madd} will
+disallow the usage of the @code{fmac} instruction for regular calculations
+even if @option{-funsafe-math-optimizations} is in effect.
@item -mpretend-cmove
@opindex mpretend-cmove
@@ -18505,7 +18524,7 @@ Visual Instruction Set extensions. The default is @option{-mno-vis}.
@opindex mno-vis2
With @option{-mvis2}, GCC generates code that takes advantage of
version 2.0 of the UltraSPARC Visual Instruction Set extensions. The
-default is @option{-mvis2} when targetting a cpu that supports such
+default is @option{-mvis2} when targeting a cpu that supports such
instructions, such as UltraSPARC-III and later. Setting @option{-mvis2}
also sets @option{-mvis}.
@@ -18515,7 +18534,7 @@ also sets @option{-mvis}.
@opindex mno-vis3
With @option{-mvis3}, GCC generates code that takes advantage of
version 3.0 of the UltraSPARC Visual Instruction Set extensions. The
-default is @option{-mvis3} when targetting a cpu that supports such
+default is @option{-mvis3} when targeting a cpu that supports such
instructions, such as niagara-3 and later. Setting @option{-mvis3}
also sets @option{-mvis2} and @option{-mvis}.
@@ -18525,7 +18544,7 @@ also sets @option{-mvis2} and @option{-mvis}.
@opindex mno-popc
With @option{-mpopc}, GCC generates code that takes advantage of the UltraSPARC
population count instruction. The default is @option{-mpopc}
-when targetting a cpu that supports such instructions, such as Niagara-2 and
+when targeting a cpu that supports such instructions, such as Niagara-2 and
later.
@item -mfmaf
@@ -18534,7 +18553,7 @@ later.
@opindex mno-fmaf
With @option{-mfmaf}, GCC generates code that takes advantage of the UltraSPARC
Fused Multiply-Add Floating-point extensions. The default is @option{-mfmaf}
-when targetting a cpu that supports such instructions, such as Niagara-3 and
+when targeting a cpu that supports such instructions, such as Niagara-3 and
later.
@item -mfix-at697f
diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi
index a64d8c28452..ac642b4b43f 100644
--- a/gcc/doc/md.texi
+++ b/gcc/doc/md.texi
@@ -5683,7 +5683,7 @@ built-in setjmp that isn't needed at the site of a nonlocal goto. You
will not normally need to define this pattern. A typical reason why you
might need this pattern is if some value, such as a pointer to a global
table, must be restored. It takes one argument, which is the label
-to which builtin_longjmp transfered control; this pattern may be emitted
+to which builtin_longjmp transferred control; this pattern may be emitted
at a small offset from that label.
@cindex @code{builtin_longjmp} instruction pattern
@@ -5885,7 +5885,7 @@ from a compare-and-swap operation, if defined.
@itemx @samp{sync_old_ior@var{mode}}, @samp{sync_old_and@var{mode}}
@itemx @samp{sync_old_xor@var{mode}}, @samp{sync_old_nand@var{mode}}
-These patterns are emit code for an atomic operation on memory,
+These patterns emit code for an atomic operation on memory,
and return the value that the memory contained before the operation.
Operand 0 is the result value, operand 1 is the memory on which the
atomic operation is performed, and operand 2 is the second operand
@@ -6037,7 +6037,7 @@ performed. Operand 1 is the second operand to the binary operator.
Operand 2 is the memory model to be used by the operation.
If these patterns are not defined, attempts will be made to use legacy
-@code{sync} patterns, or equivilent patterns which return a result. If
+@code{sync} patterns, or equivalent patterns which return a result. If
none of these are available a compare-and-swap loop will be used.
@cindex @code{atomic_fetch_add@var{mode}} instruction pattern
@@ -6079,7 +6079,7 @@ performed. Operand 2 is the second operand to the binary operator.
Operand 3 is the memory model to be used by the operation.
If these patterns are not defined, attempts will be made to use legacy
-@code{sync} patterns, or equivilent patterns which return the result before
+@code{sync} patterns, or equivalent patterns which return the result before
the operation followed by the arithmetic operation required to produce the
result. If none of these are available a compare-and-swap loop will be
used.
@@ -6136,7 +6136,7 @@ If this pattern is not defined, then a plain move pattern is generated.
This pattern, if defined, compares a @code{ptr_mode} value from the
memory in operand 1 with the memory in operand 0 without leaving the
value in a register afterward and branches to operand 2 if the values
-weren't equal.
+were equal.
If this pattern is not defined, then a plain compare pattern and
conditional branch pattern is used.
diff --git a/gcc/doc/plugins.texi b/gcc/doc/plugins.texi
index 398ebf0c536..039c480351f 100644
--- a/gcc/doc/plugins.texi
+++ b/gcc/doc/plugins.texi
@@ -276,7 +276,7 @@ the start or end of the GCC garbage collection.
Some plugins may need to have GGC mark additional data. This can be
done by registering a callback (called with a null @code{gcc_data})
for the @code{PLUGIN_GGC_MARKING} event. Such callbacks can call the
-@code{ggc_set_mark} routine, preferably thru the @code{ggc_mark} macro
+@code{ggc_set_mark} routine, preferably through the @code{ggc_mark} macro
(and conversely, these routines should usually not be used in plugins
outside of the @code{PLUGIN_GGC_MARKING} event).
diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi
index 3f8c094bfa0..07c480d6a7c 100644
--- a/gcc/doc/rtl.texi
+++ b/gcc/doc/rtl.texi
@@ -775,7 +775,7 @@ Read-only in this context means never modified during the lifetime of the
program, not necessarily in ROM or in write-disabled pages. A common
example of the later is a shared library's global offset table. This
table is initialized by the runtime loader, so the memory is technically
-writable, but after control is transfered from the runtime loader to the
+writable, but after control is transferred from the runtime loader to the
application, this memory will never be subsequently modified.
Stored in the @code{unchanging} field and printed as @samp{/u}.
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index f7b2838efd8..aeccc79f39f 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -9493,6 +9493,10 @@ tables, and hence is desirable if it works.
True if the @code{.debug_pubtypes} and @code{.debug_pubnames} sections should be emitted. These sections are not used on most platforms, and in particular GDB does not use them.
@end deftypevr
+@deftypevr {Target Hook} bool TARGET_FORCE_AT_COMP_DIR
+True if the @code{DW_AT_comp_dir} attribute should be emitted for each compilation unit. This attribute is required for the darwin linker to emit debug information.
+@end deftypevr
+
@deftypevr {Target Hook} bool TARGET_DELAY_SCHED2
True if sched2 is not to be run at its normal place. This usually means it will be run as part of machine-specific reorg.
@end deftypevr
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index a54b2298f4b..31dedad8a22 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -9392,6 +9392,8 @@ tables, and hence is desirable if it works.
@hook TARGET_WANT_DEBUG_PUB_SECTIONS
+@hook TARGET_FORCE_AT_COMP_DIR
+
@hook TARGET_DELAY_SCHED2
@hook TARGET_DELAY_VARTRACK
diff --git a/gcc/dse.c b/gcc/dse.c
index 6bc48c8efe1..06c71d74b1a 100644
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -95,7 +95,7 @@ along with GCC; see the file COPYING3. If not see
5) Delete the insns that the global analysis has indicated are
unnecessary.
- 6) Delete insns that store the same value as preceeding store
+ 6) Delete insns that store the same value as preceding store
where the earlier store couldn't be eliminated.
7) Cleanup.
@@ -388,7 +388,7 @@ struct insn_info
struct insn_info * prev_insn;
/* The linked list of insns that are in consideration for removal in
- the forwards pass thru the basic block. This pointer may be
+ the forwards pass through the basic block. This pointer may be
trash as it is not cleared when a wild read occurs. The only
time it is guaranteed to be correct is when the traversal starts
at active_local_stores. */
@@ -457,7 +457,7 @@ struct bb_info
being processed. While it contains info for all of the
registers, only the hard registers are actually examined. It is used
to assure that shift and/or add sequences that are inserted do not
- accidently clobber live hard regs. */
+ accidentally clobber live hard regs. */
bitmap regs_live;
};
diff --git a/gcc/dwarf2asm.c b/gcc/dwarf2asm.c
index fe305d3ed4e..ca3d7ffb694 100644
--- a/gcc/dwarf2asm.c
+++ b/gcc/dwarf2asm.c
@@ -161,7 +161,7 @@ dw2_asm_output_vms_delta (int size ATTRIBUTE_UNUSED,
va_start (ap, comment);
#ifndef ASM_OUTPUT_DWARF_VMS_DELTA
- /* VMS Delta is only special on ia64-vms, but this funtion also gets
+ /* VMS Delta is only special on ia64-vms, but this function also gets
called on alpha-vms so it has to do something sane. */
dw2_asm_output_delta (size, lab1, lab2, comment);
#else
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 71520dfaf51..5882e8f5663 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -4502,7 +4502,7 @@ adjust_piece_list (rtx *dest, rtx *src, rtx *inner,
if (copy)
{
- /* First copy all nodes preceeding the current bitpos. */
+ /* First copy all nodes preceding the current bitpos. */
while (src != inner)
{
*dest = decl_piece_node (*decl_piece_varloc_ptr (*src),
@@ -12684,7 +12684,7 @@ add_loc_descr_to_each (dw_loc_list_ref list, dw_loc_descr_ref ref)
/* Given two lists RET and LIST
produce location list that is result of adding expression in LIST
- to expression in RET on each possition in program.
+ to expression in RET on each position in program.
Might be destructive on both RET and LIST.
TODO: We handle only simple cases of RET or LIST having at most one
@@ -16410,6 +16410,135 @@ gen_type_die_for_member (tree type, tree member, dw_die_ref context_die)
pop_decl_scope ();
}
}
+
+/* Forward declare these functions, because they are mutually recursive
+ with their set_block_* pairing functions. */
+static void set_decl_origin_self (tree);
+static void set_decl_abstract_flags (tree, int);
+
+/* Given a pointer to some BLOCK node, if the BLOCK_ABSTRACT_ORIGIN for the
+ given BLOCK node is NULL, set the BLOCK_ABSTRACT_ORIGIN for the node so
+ that it points to the node itself, thus indicating that the node is its
+ own (abstract) origin. Additionally, if the BLOCK_ABSTRACT_ORIGIN for
+ the given node is NULL, recursively descend the decl/block tree which
+ it is the root of, and for each other ..._DECL or BLOCK node contained
+ therein whose DECL_ABSTRACT_ORIGINs or BLOCK_ABSTRACT_ORIGINs are also
+ still NULL, set *their* DECL_ABSTRACT_ORIGIN or BLOCK_ABSTRACT_ORIGIN
+ values to point to themselves. */
+
+static void
+set_block_origin_self (tree stmt)
+{
+ if (BLOCK_ABSTRACT_ORIGIN (stmt) == NULL_TREE)
+ {
+ BLOCK_ABSTRACT_ORIGIN (stmt) = stmt;
+
+ {
+ tree local_decl;
+
+ for (local_decl = BLOCK_VARS (stmt);
+ local_decl != NULL_TREE;
+ local_decl = DECL_CHAIN (local_decl))
+ if (! DECL_EXTERNAL (local_decl))
+ set_decl_origin_self (local_decl); /* Potential recursion. */
+ }
+
+ {
+ tree subblock;
+
+ for (subblock = BLOCK_SUBBLOCKS (stmt);
+ subblock != NULL_TREE;
+ subblock = BLOCK_CHAIN (subblock))
+ set_block_origin_self (subblock); /* Recurse. */
+ }
+ }
+}
+
+/* Given a pointer to some ..._DECL node, if the DECL_ABSTRACT_ORIGIN for
+ the given ..._DECL node is NULL, set the DECL_ABSTRACT_ORIGIN for the
+ node to so that it points to the node itself, thus indicating that the
+ node represents its own (abstract) origin. Additionally, if the
+ DECL_ABSTRACT_ORIGIN for the given node is NULL, recursively descend
+ the decl/block tree of which the given node is the root of, and for
+ each other ..._DECL or BLOCK node contained therein whose
+ DECL_ABSTRACT_ORIGINs or BLOCK_ABSTRACT_ORIGINs are also still NULL,
+ set *their* DECL_ABSTRACT_ORIGIN or BLOCK_ABSTRACT_ORIGIN values to
+ point to themselves. */
+
+static void
+set_decl_origin_self (tree decl)
+{
+ if (DECL_ABSTRACT_ORIGIN (decl) == NULL_TREE)
+ {
+ DECL_ABSTRACT_ORIGIN (decl) = decl;
+ if (TREE_CODE (decl) == FUNCTION_DECL)
+ {
+ tree arg;
+
+ for (arg = DECL_ARGUMENTS (decl); arg; arg = DECL_CHAIN (arg))
+ DECL_ABSTRACT_ORIGIN (arg) = arg;
+ if (DECL_INITIAL (decl) != NULL_TREE
+ && DECL_INITIAL (decl) != error_mark_node)
+ set_block_origin_self (DECL_INITIAL (decl));
+ }
+ }
+}
+
+/* Given a pointer to some BLOCK node, and a boolean value to set the
+ "abstract" flags to, set that value into the BLOCK_ABSTRACT flag for
+ the given block, and for all local decls and all local sub-blocks
+ (recursively) which are contained therein. */
+
+static void
+set_block_abstract_flags (tree stmt, int setting)
+{
+ tree local_decl;
+ tree subblock;
+ unsigned int i;
+
+ BLOCK_ABSTRACT (stmt) = setting;
+
+ for (local_decl = BLOCK_VARS (stmt);
+ local_decl != NULL_TREE;
+ local_decl = DECL_CHAIN (local_decl))
+ if (! DECL_EXTERNAL (local_decl))
+ set_decl_abstract_flags (local_decl, setting);
+
+ for (i = 0; i < BLOCK_NUM_NONLOCALIZED_VARS (stmt); i++)
+ {
+ local_decl = BLOCK_NONLOCALIZED_VAR (stmt, i);
+ if ((TREE_CODE (local_decl) == VAR_DECL && !TREE_STATIC (local_decl))
+ || TREE_CODE (local_decl) == PARM_DECL)
+ set_decl_abstract_flags (local_decl, setting);
+ }
+
+ for (subblock = BLOCK_SUBBLOCKS (stmt);
+ subblock != NULL_TREE;
+ subblock = BLOCK_CHAIN (subblock))
+ set_block_abstract_flags (subblock, setting);
+}
+
+/* Given a pointer to some ..._DECL node, and a boolean value to set the
+ "abstract" flags to, set that value into the DECL_ABSTRACT flag for the
+ given decl, and (in the case where the decl is a FUNCTION_DECL) also
+ set the abstract flags for all of the parameters, local vars, local
+ blocks and sub-blocks (recursively) to the same setting. */
+
+static void
+set_decl_abstract_flags (tree decl, int setting)
+{
+ DECL_ABSTRACT (decl) = setting;
+ if (TREE_CODE (decl) == FUNCTION_DECL)
+ {
+ tree arg;
+
+ for (arg = DECL_ARGUMENTS (decl); arg; arg = DECL_CHAIN (arg))
+ DECL_ABSTRACT (arg) = setting;
+ if (DECL_INITIAL (decl) != NULL_TREE
+ && DECL_INITIAL (decl) != error_mark_node)
+ set_block_abstract_flags (DECL_INITIAL (decl), setting);
+ }
+}
/* Generate the DWARF2 info for the "abstract" instance of a function which we
may later generate inlined and/or out-of-line instances of. */
@@ -19998,7 +20127,7 @@ dwarf2out_source_line (unsigned int line, const char *filename,
/* Recall that this end-of-prologue indication is *not* the same thing
as the end_prologue debug hook. The NOTE_INSN_PROLOGUE_END note,
to which the hook corresponds, follows the last insn that was
- emitted by gen_prologue. What we need is to preceed the first insn
+ emitted by gen_prologue. What we need is to precede the first insn
that had been emitted after NOTE_INSN_FUNCTION_BEG, i.e. the first
insn that corresponds to something the user wrote. These may be
very different locations once scheduling is enabled. */
@@ -21958,7 +22087,7 @@ dwarf2out_finish (const char *filename)
/* Add the name for the main input file now. We delayed this from
dwarf2out_init to avoid complications with PCH. */
add_name_attribute (comp_unit_die (), remap_debug_filename (filename));
- if (!IS_ABSOLUTE_PATH (filename))
+ if (!IS_ABSOLUTE_PATH (filename) || targetm.force_at_comp_dir)
add_comp_dir_attribute (comp_unit_die ());
else if (get_AT (comp_unit_die (), DW_AT_comp_dir) == NULL)
{
diff --git a/gcc/except.c b/gcc/except.c
index 158ca20745a..aae8aa0e091 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -123,7 +123,6 @@ along with GCC; see the file COPYING3. If not see
#include "libfuncs.h"
#include "insn-config.h"
#include "except.h"
-#include "integrate.h"
#include "hard-reg-set.h"
#include "basic-block.h"
#include "output.h"
diff --git a/gcc/except.h b/gcc/except.h
index e161493b5aa..5b3939e0fc4 100644
--- a/gcc/except.h
+++ b/gcc/except.h
@@ -46,7 +46,7 @@ enum eh_region_type
/* TRY regions implement catching an exception. The list of types associated
with the attached catch handlers is examined in order by the runtime and
- control is transfered to the appropriate handler. Note that a NULL type
+ control is transferred to the appropriate handler. Note that a NULL type
list is a catch-all handler, and that it will catch *all* exceptions
including those originating from a different language. */
ERT_TRY,
@@ -80,7 +80,7 @@ struct GTY(()) eh_landing_pad_d
/* The region with which this landing pad is associated. */
struct eh_region_d *region;
- /* At the gimple level, the location to which control will be transfered
+ /* At the gimple level, the location to which control will be transferred
for this landing pad. There can be both EH and normal edges into the
block containing the post-landing-pad label. */
tree post_landing_pad;
diff --git a/gcc/explow.c b/gcc/explow.c
index 5513a123e3d..be8bf3e1f0e 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -1579,12 +1579,11 @@ probe_stack_range (HOST_WIDE_INT first, rtx size)
size, first)));
emit_library_call (stack_check_libfunc, LCT_NORMAL, VOIDmode, 1, addr,
Pmode);
- return;
}
/* Next see if we have an insn to check the stack. */
#ifdef HAVE_check_stack
- if (HAVE_check_stack)
+ else if (HAVE_check_stack)
{
struct expand_operand ops[1];
rtx addr = memory_address (Pmode,
@@ -1592,10 +1591,10 @@ probe_stack_range (HOST_WIDE_INT first, rtx size)
stack_pointer_rtx,
plus_constant (Pmode,
size, first)));
-
+ bool success;
create_input_operand (&ops[0], addr, Pmode);
- if (maybe_expand_insn (CODE_FOR_check_stack, 1, ops))
- return;
+ success = maybe_expand_insn (CODE_FOR_check_stack, 1, ops);
+ gcc_assert (success);
}
#endif
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 45b150efc3e..96056b4e862 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -1351,7 +1351,7 @@ extract_bit_field_1 (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
else
{
rtx mem = assign_stack_temp (GET_MODE (op0),
- GET_MODE_SIZE (GET_MODE (op0)), 0);
+ GET_MODE_SIZE (GET_MODE (op0)));
emit_move_insn (mem, op0);
op0 = adjust_address (mem, BLKmode, 0);
}
@@ -1865,9 +1865,9 @@ extract_fixed_bit_field (enum machine_mode tmode, rtx op0,
/* If the field does not already start at the lsb,
shift it so it does. */
/* Maybe propagate the target for the shift. */
- /* But not if we will return it--could confuse integrate.c. */
rtx subtarget = (target != 0 && REG_P (target) ? target : 0);
- if (tmode != mode) subtarget = 0;
+ if (tmode != mode)
+ subtarget = 0;
op0 = expand_shift (RSHIFT_EXPR, mode, op0, bitpos, subtarget, 1);
}
/* Convert the value to the desired mode. */
diff --git a/gcc/expr.c b/gcc/expr.c
index 7c27c746d30..93f8a50449d 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -1615,7 +1615,7 @@ emit_group_load_1 (rtx *tmps, rtx dst, rtx orig_src, tree type, int ssize)
{
enum machine_mode imode = int_mode_for_mode (GET_MODE (orig_src));
if (imode == BLKmode)
- src = assign_stack_temp (GET_MODE (orig_src), ssize, 0);
+ src = assign_stack_temp (GET_MODE (orig_src), ssize);
else
src = gen_reg_rtx (imode);
if (imode != BLKmode)
@@ -1717,7 +1717,7 @@ emit_group_load_1 (rtx *tmps, rtx dst, rtx orig_src, tree type, int ssize)
rtx mem;
gcc_assert (!bytepos);
- mem = assign_stack_temp (GET_MODE (src), slen, 0);
+ mem = assign_stack_temp (GET_MODE (src), slen);
emit_move_insn (mem, src);
tmps[i] = extract_bit_field (mem, bytelen * BITS_PER_UNIT,
0, 1, false, NULL_RTX, mode, mode);
@@ -1732,7 +1732,7 @@ emit_group_load_1 (rtx *tmps, rtx dst, rtx orig_src, tree type, int ssize)
int slen = GET_MODE_SIZE (GET_MODE (src));
rtx mem;
- mem = assign_stack_temp (GET_MODE (src), slen, 0);
+ mem = assign_stack_temp (GET_MODE (src), slen);
emit_move_insn (mem, src);
tmps[i] = adjust_address (mem, mode, (int) bytepos);
}
@@ -1883,7 +1883,7 @@ emit_group_store (rtx orig_dst, rtx src, tree type ATTRIBUTE_UNUSED, int ssize)
{
enum machine_mode imode = int_mode_for_mode (GET_MODE (orig_dst));
if (imode == BLKmode)
- dst = assign_stack_temp (GET_MODE (orig_dst), ssize, 0);
+ dst = assign_stack_temp (GET_MODE (orig_dst), ssize);
else
dst = gen_reg_rtx (imode);
emit_group_store (dst, src, type, ssize);
@@ -1933,7 +1933,7 @@ emit_group_store (rtx orig_dst, rtx src, tree type ATTRIBUTE_UNUSED, int ssize)
it. Allocate a temporary, and split this into a store/load to/from
the temporary. */
- temp = assign_stack_temp (GET_MODE (dst), ssize, 0);
+ temp = assign_stack_temp (GET_MODE (dst), ssize);
emit_group_store (temp, src, type, ssize);
emit_group_load (dst, temp, type, ssize);
return;
@@ -2028,8 +2028,7 @@ emit_group_store (rtx orig_dst, rtx src, tree type ATTRIBUTE_UNUSED, int ssize)
>= GET_MODE_ALIGNMENT (tmp_mode))
{
dest = assign_stack_temp (dest_mode,
- GET_MODE_SIZE (dest_mode),
- 0);
+ GET_MODE_SIZE (dest_mode));
emit_move_insn (adjust_address (dest,
tmp_mode,
bytepos),
@@ -2039,8 +2038,7 @@ emit_group_store (rtx orig_dst, rtx src, tree type ATTRIBUTE_UNUSED, int ssize)
else
{
dest = assign_stack_temp (tmp_mode,
- GET_MODE_SIZE (tmp_mode),
- 0);
+ GET_MODE_SIZE (tmp_mode));
emit_move_insn (dest, tmps[i]);
dst = adjust_address (dest, dest_mode, bytepos);
}
@@ -2108,7 +2106,7 @@ copy_blkmode_from_reg (rtx tgtblk, rtx srcreg, tree type)
tgtblk = assign_temp (build_qualified_type (type,
(TYPE_QUALS (type)
| TYPE_QUAL_CONST)),
- 0, 1, 1);
+ 1, 1);
preserve_temp_slots (tgtblk);
}
@@ -4030,7 +4028,7 @@ emit_push_insn (rtx x, enum machine_mode mode, tree type, rtx size,
size = GEN_INT (GET_MODE_SIZE (mode));
if (!MEM_P (xinner))
{
- temp = assign_temp (type, 0, 1, 1);
+ temp = assign_temp (type, 1, 1);
emit_move_insn (temp, xinner);
xinner = temp;
}
@@ -4782,8 +4780,7 @@ expand_assignment (tree to, tree from, bool nontemporal)
else
{
rtx temp = assign_stack_temp (GET_MODE (to_rtx),
- GET_MODE_SIZE (GET_MODE (to_rtx)),
- 0);
+ GET_MODE_SIZE (GET_MODE (to_rtx)));
write_complex_part (temp, XEXP (to_rtx, 0), false);
write_complex_part (temp, XEXP (to_rtx, 1), true);
result = store_field (temp, bitsize, bitpos,
@@ -4839,7 +4836,6 @@ expand_assignment (tree to, tree from, bool nontemporal)
if (result)
preserve_temp_slots (result);
- free_temp_slots ();
pop_temp_slots ();
return;
}
@@ -4887,7 +4883,6 @@ expand_assignment (tree to, tree from, bool nontemporal)
emit_move_insn (to_rtx, value);
}
preserve_temp_slots (to_rtx);
- free_temp_slots ();
pop_temp_slots ();
return;
}
@@ -4914,7 +4909,6 @@ expand_assignment (tree to, tree from, bool nontemporal)
emit_move_insn (to_rtx, temp);
preserve_temp_slots (to_rtx);
- free_temp_slots ();
pop_temp_slots ();
return;
}
@@ -4944,7 +4938,6 @@ expand_assignment (tree to, tree from, bool nontemporal)
TYPE_MODE (sizetype));
preserve_temp_slots (to_rtx);
- free_temp_slots ();
pop_temp_slots ();
return;
}
@@ -4954,7 +4947,6 @@ expand_assignment (tree to, tree from, bool nontemporal)
push_temp_slots ();
result = store_expr (from, to_rtx, 0, nontemporal);
preserve_temp_slots (result);
- free_temp_slots ();
pop_temp_slots ();
return;
}
@@ -6314,7 +6306,7 @@ store_field (rtx target, HOST_WIDE_INT bitsize, HOST_WIDE_INT bitpos,
if (mode == BLKmode
&& (REG_P (target) || GET_CODE (target) == SUBREG))
{
- rtx object = assign_temp (type, 0, 1, 1);
+ rtx object = assign_temp (type, 1, 1);
rtx blk_object = adjust_address (object, BLKmode, 0);
if (bitsize != (HOST_WIDE_INT) GET_MODE_BITSIZE (GET_MODE (target)))
@@ -7384,7 +7376,7 @@ highest_pow2_factor_for_target (const_tree target, const_tree exp)
}
#ifdef HAVE_conditional_move
-/* Convert the tree comparision code TCODE to the rtl one where the
+/* Convert the tree comparison code TCODE to the rtl one where the
signedness is UNSIGNEDP. */
static enum rtx_code
@@ -7778,7 +7770,7 @@ expand_constructor (tree exp, rtx target, enum expand_modifier modifier,
= assign_temp (build_qualified_type (type, (TYPE_QUALS (type)
| (TREE_READONLY (exp)
* TYPE_QUAL_CONST))),
- 0, TREE_ADDRESSABLE (exp), 1);
+ TREE_ADDRESSABLE (exp), 1);
}
store_constructor (exp, target, 0, int_expr_size (exp));
@@ -7902,7 +7894,7 @@ expand_cond_expr_using_cmove (tree treeop0 ATTRIBUTE_UNUSED,
int unsignedp = TYPE_UNSIGNED (type);
enum machine_mode mode = TYPE_MODE (type);
- temp = assign_temp (type, 0, 0, 1);
+ temp = assign_temp (type, 0, 1);
/* If we cannot do a conditional move on the mode, try doing it
with the promoted mode. */
@@ -8060,7 +8052,7 @@ expand_expr_real_2 (sepops ops, rtx target, enum machine_mode tmode,
if (TYPE_MODE (type) != BLKmode)
target = gen_reg_rtx (TYPE_MODE (type));
else
- target = assign_temp (type, 0, 1, 1);
+ target = assign_temp (type, 1, 1);
}
if (MEM_P (target))
@@ -9047,7 +9039,7 @@ expand_expr_real_2 (sepops ops, rtx target, enum machine_mode tmode,
&& !MEM_P (original_target))
temp = original_target;
else
- temp = assign_temp (type, 0, 0, 1);
+ temp = assign_temp (type, 0, 1);
do_pending_stack_adjust ();
NO_DEFER_POP;
@@ -9301,7 +9293,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
/* This is the case of an array whose size is to be determined
from its initializer, while the initializer is still being parsed.
- See expand_decl. */
+ ??? We aren't parsing while expanding anymore. */
if (MEM_P (decl_rtl) && REG_P (XEXP (decl_rtl, 0)))
temp = validize_mem (decl_rtl);
@@ -9607,8 +9599,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
else
{
temp = assign_stack_temp (DECL_MODE (base),
- GET_MODE_SIZE (DECL_MODE (base)),
- 0);
+ GET_MODE_SIZE (DECL_MODE (base)));
store_expr (base, temp, 0, false);
temp = adjust_address (temp, BLKmode, offset);
set_mem_size (temp, int_size_in_bytes (TREE_TYPE (exp)));
@@ -9966,7 +9957,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
tree nt = build_qualified_type (TREE_TYPE (tem),
(TYPE_QUALS (TREE_TYPE (tem))
| TYPE_QUAL_CONST));
- memloc = assign_temp (nt, 1, 1, 1);
+ memloc = assign_temp (nt, 1, 1);
emit_move_insn (memloc, op0);
op0 = memloc;
mem_attrs_from_type = true;
@@ -10073,7 +10064,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
if (ext_mode == BLKmode)
{
if (target == 0)
- target = assign_temp (type, 0, 1, 1);
+ target = assign_temp (type, 1, 1);
if (bitsize == 0)
return target;
@@ -10129,7 +10120,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
new_rtx = assign_stack_temp_for_type (ext_mode,
GET_MODE_BITSIZE (ext_mode),
- 0, type);
+ type);
emit_move_insn (new_rtx, op0);
op0 = copy_rtx (new_rtx);
PUT_MODE (op0, BLKmode);
@@ -10321,7 +10312,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
target
= assign_stack_temp_for_type
(TYPE_MODE (inner_type),
- GET_MODE_SIZE (TYPE_MODE (inner_type)), 0, inner_type);
+ GET_MODE_SIZE (TYPE_MODE (inner_type)), inner_type);
emit_move_insn (target, op0);
op0 = target;
@@ -10368,7 +10359,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
= MAX (int_size_in_bytes (inner_type),
(HOST_WIDE_INT) GET_MODE_SIZE (mode));
rtx new_rtx
- = assign_stack_temp_for_type (mode, temp_size, 0, type);
+ = assign_stack_temp_for_type (mode, temp_size, type);
rtx new_with_op0_mode
= adjust_address (new_rtx, GET_MODE (op0), 0);
@@ -10469,6 +10460,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
case POSTDECREMENT_EXPR:
case LOOP_EXPR:
case EXIT_EXPR:
+ case COMPOUND_LITERAL_EXPR:
/* Lowered by gimplify.c. */
gcc_unreachable ();
@@ -10483,27 +10475,6 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
return expand_expr_real (treeop0, original_target, tmode,
modifier, alt_rtl);
- case COMPOUND_LITERAL_EXPR:
- {
- /* Initialize the anonymous variable declared in the compound
- literal, then return the variable. */
- tree decl = COMPOUND_LITERAL_EXPR_DECL (exp);
-
- /* Create RTL for this variable. */
- if (!DECL_RTL_SET_P (decl))
- {
- if (DECL_HARD_REGISTER (decl))
- /* The user specified an assembler name for this variable.
- Set that up now. */
- rest_of_decl_compilation (decl, 0, 0);
- else
- expand_decl (decl);
- }
-
- return expand_expr_real (decl, original_target, tmode,
- modifier, alt_rtl);
- }
-
default:
return expand_expr_real_2 (&ops, target, tmode, modifier);
}
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 20b07d0ad81..64a0d7fd29a 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -2567,7 +2567,7 @@ operand_equal_p (const_tree arg0, const_tree arg1, unsigned int flags)
return OP_SAME (0);
case TARGET_MEM_REF:
- /* Require equal extra operands and then fall thru to MEM_REF
+ /* Require equal extra operands and then fall through to MEM_REF
handling of the two common operands. */
if (!OP_SAME_WITH_NULL (2)
|| !OP_SAME_WITH_NULL (3)
@@ -3346,6 +3346,11 @@ optimize_bit_field_compare (location_t loc, enum tree_code code,
tree mask;
tree offset;
+ /* In the strict volatile bitfields case, doing code changes here may prevent
+ other optimizations, in particular in a SLOW_BYTE_ACCESS setting. */
+ if (flag_strict_volatile_bitfields > 0)
+ return 0;
+
/* Get all the information about the extractions being done. If the bit size
if the same as the size of the underlying object, we aren't doing an
extraction at all and so can do nothing. We also don't want to
@@ -10040,12 +10045,12 @@ fold_binary_loc (location_t loc,
/* Handle (A1 * C1) + (A2 * C2) with A1, A2 or C1, C2 being the
same or one. Make sure type is not saturating.
fold_plusminus_mult_expr will re-associate. */
- if ((TREE_CODE (arg0) == MULT_EXPR
- || TREE_CODE (arg1) == MULT_EXPR)
+ if ((TREE_CODE (op0) == MULT_EXPR
+ || TREE_CODE (op1) == MULT_EXPR)
&& !TYPE_SATURATING (type)
&& (!FLOAT_TYPE_P (type) || flag_associative_math))
{
- tree tem = fold_plusminus_mult_expr (loc, code, type, arg0, arg1);
+ tree tem = fold_plusminus_mult_expr (loc, code, type, op0, op1);
if (tem)
return tem;
}
@@ -10663,12 +10668,12 @@ fold_binary_loc (location_t loc,
/* Handle (A1 * C1) - (A2 * C2) with A1, A2 or C1, C2 being the
same or one. Make sure type is not saturating.
fold_plusminus_mult_expr will re-associate. */
- if ((TREE_CODE (arg0) == MULT_EXPR
- || TREE_CODE (arg1) == MULT_EXPR)
+ if ((TREE_CODE (op0) == MULT_EXPR
+ || TREE_CODE (op1) == MULT_EXPR)
&& !TYPE_SATURATING (type)
&& (!FLOAT_TYPE_P (type) || flag_associative_math))
{
- tree tem = fold_plusminus_mult_expr (loc, code, type, arg0, arg1);
+ tree tem = fold_plusminus_mult_expr (loc, code, type, op0, op1);
if (tem)
return tem;
}
@@ -12013,7 +12018,7 @@ fold_binary_loc (location_t loc,
}
}
- /* Fall thru */
+ /* Fall through */
case FLOOR_DIV_EXPR:
/* Simplify A / (B << N) where A and B are positive and B is
@@ -12056,7 +12061,7 @@ fold_binary_loc (location_t loc,
&& code == FLOOR_DIV_EXPR)
return fold_build2_loc (loc, TRUNC_DIV_EXPR, type, op0, op1);
- /* Fall thru */
+ /* Fall through */
case ROUND_DIV_EXPR:
case CEIL_DIV_EXPR:
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 38bff786afa..39a37211db1 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,35 @@
+2012-05-31 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/53521
+ * trans.c (gfc_deallocate_scalar_with_status): Properly
+ handle the case size == 0.
+
+2012-05-30 Tobias Burnus <burnus@net-b.de>
+
+ PR c/53502
+ * decl.c (match_attr_spec): Remove "typedef".
+
+2012-05-30 Tobias Burnus <burnus@net-b.de>
+
+ * decl.c: Fix comment typos.
+ * expr.c: Ditto.
+ * frontend-passes.c: Ditto.
+ * match.c: Ditto.
+ * resolve.c: Ditto.
+ * trans-array.c: Ditto.
+ * trans-common.c: Ditto.
+ * trans-intrinsic.c: Ditto.
+ * trans-types.c: Ditto.
+
+2012-05-23 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/51055
+ PR fortran/45170
+ * match.c (gfc_match_allocate): Set length_from_typespec
+ for characters.
+ * resolve.c (resolve_charlen): If set, don't check whether
+ the len is a specification expression.
+
2012-05-22 Tobias Burnus <burnus@net-b.de>
PR fortran/53389
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index e166bc916b1..a760331eeba 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -586,7 +586,7 @@ cleanup:
/************************ Declaration statements *********************/
-/* Auxilliary function to merge DIMENSION and CODIMENSION array specs. */
+/* Auxiliary function to merge DIMENSION and CODIMENSION array specs. */
static void
merge_array_spec (gfc_array_spec *from, gfc_array_spec *to, bool copy)
@@ -1715,7 +1715,7 @@ match_pointer_init (gfc_expr **init, int procptr)
return MATCH_ERROR;
}
- /* Match NULL() initilization. */
+ /* Match NULL() initialization. */
m = gfc_match_null (init);
if (m != MATCH_NO)
return m;
@@ -2235,7 +2235,7 @@ kind_expr:
C interoperable kind (and store the fact). */
if (e->ts.is_c_interop == 1)
{
- /* Mark this as c interoperable if being declared with one
+ /* Mark this as C interoperable if being declared with one
of the named constants from iso_c_binding. */
ts->is_c_interop = e->ts.is_iso_c;
ts->f90_type = e->ts.f90_type;
@@ -2533,10 +2533,10 @@ done:
ts->kind = kind == 0 ? gfc_default_character_kind : kind;
ts->deferred = deferred;
- /* We have to know if it was a c interoperable kind so we can
+ /* We have to know if it was a C interoperable kind so we can
do accurate type checking of bind(c) procs, etc. */
if (kind != 0)
- /* Mark this as c interoperable if being declared with one
+ /* Mark this as C interoperable if being declared with one
of the named constants from iso_c_binding. */
ts->is_c_interop = is_iso_c;
else if (len != NULL)
@@ -2766,7 +2766,7 @@ gfc_match_decl_type_spec (gfc_typespec *ts, int implicit_flag)
/* Search for the name but allow the components to be defined later. If
type = -1, this typespec has been seen in a function declaration but
the type could not be accessed at that point. The actual derived type is
- stored in a symtree with the first letter of the name captialized; the
+ stored in a symtree with the first letter of the name capitalized; the
symtree with the all lower-case name contains the associated
generic function. */
dt_name = gfc_get_string ("%c%s",
@@ -3200,7 +3200,7 @@ gfc_match_import (void)
if (sym->attr.generic && (sym = gfc_find_dt_in_generic (sym)))
{
/* The actual derived type is stored in a symtree with the first
- letter of the name captialized; the symtree with the all
+ letter of the name capitalized; the symtree with the all
lower-case name contains the associated generic function. */
st = gfc_new_symtree (&gfc_current_ns->sym_root,
gfc_get_string ("%c%s",
@@ -3264,7 +3264,7 @@ static match
match_attr_spec (void)
{
/* Modifiers that can exist in a type statement. */
- typedef enum
+ enum
{ GFC_DECL_BEGIN = 0,
DECL_ALLOCATABLE = GFC_DECL_BEGIN, DECL_DIMENSION, DECL_EXTERNAL,
DECL_IN, DECL_OUT, DECL_INOUT, DECL_INTRINSIC, DECL_OPTIONAL,
@@ -3272,8 +3272,7 @@ match_attr_spec (void)
DECL_PUBLIC, DECL_SAVE, DECL_TARGET, DECL_VALUE, DECL_VOLATILE,
DECL_IS_BIND_C, DECL_CODIMENSION, DECL_ASYNCHRONOUS, DECL_CONTIGUOUS,
DECL_NONE, GFC_DECL_END /* Sentinel */
- }
- decl_types;
+ };
/* GFC_DECL_END is the sentinel, index starts at 0. */
#define NUM_DECL GFC_DECL_END
@@ -3844,7 +3843,7 @@ set_binding_label (const char **dest_label, const char *sym_name,
}
if (curr_binding_label)
- /* Binding label given; store in temp holder til have sym. */
+ /* Binding label given; store in temp holder till have sym. */
*dest_label = curr_binding_label;
else
{
@@ -7864,7 +7863,7 @@ match_binding_attributes (gfc_typebound_proc* ba, bool generic, bool ppc)
bool seen_ptr = false;
match m = MATCH_YES;
- /* Intialize to defaults. Do so even before the MATCH_NO check so that in
+ /* Initialize to defaults. Do so even before the MATCH_NO check so that in
this case the defaults are in there. */
ba->access = ACCESS_UNKNOWN;
ba->pass_arg = NULL;
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index 93d5df65455..bde62d58741 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -711,7 +711,7 @@ gfc_copy_shape (mpz_t *shape, int rank)
/* Copy a shape array excluding dimension N, where N is an integer
- constant expression. Dimensions are numbered in fortran style --
+ constant expression. Dimensions are numbered in Fortran style --
starting with ONE.
So, if the original shape array contains R elements
@@ -4405,7 +4405,7 @@ gfc_has_ultimate_pointer (gfc_expr *e)
/* Check whether an expression is "simply contiguous", cf. F2008, 6.5.4.
Note: A scalar is not regarded as "simply contiguous" by the standard.
- if bool is not strict, some futher checks are done - for instance,
+ if bool is not strict, some further checks are done - for instance,
a "(::1)" is accepted. */
bool
@@ -4482,7 +4482,7 @@ gfc_is_simply_contiguous (gfc_expr *expr, bool strict)
return false;
/* Following the standard, "(::1)" or - if known at compile time -
- "(lbound:ubound)" are not simply contigous; if strict
+ "(lbound:ubound)" are not simply contiguous; if strict
is false, they are regarded as simply contiguous. */
if (ar->stride[i] && (strict || ar->stride[i]->expr_type != EXPR_CONSTANT
|| ar->stride[i]->ts.type != BT_INTEGER
diff --git a/gcc/fortran/frontend-passes.c b/gcc/fortran/frontend-passes.c
index 5361d86c543..40ca0745a1f 100644
--- a/gcc/fortran/frontend-passes.c
+++ b/gcc/fortran/frontend-passes.c
@@ -243,7 +243,7 @@ cfe_register_funcs (gfc_expr **e, int *walk_subtrees ATTRIBUTE_UNUSED,
}
/* Returns a new expression (a variable) to be used in place of the old one,
- with an an assignment statement before the current statement to set
+ with an assignment statement before the current statement to set
the value of the variable. Creates a new BLOCK for the statement if
that hasn't already been done and puts the statement, plus the
newly created variables, in that block. */
@@ -806,7 +806,7 @@ optimize_op (gfc_expr *e)
{
gfc_intrinsic_op op = e->value.op.op;
- /* Only use new-style comparisions. */
+ /* Only use new-style comparisons. */
switch(op)
{
case INTRINSIC_EQ_OS:
@@ -931,7 +931,7 @@ optimize_comparison (gfc_expr *e, gfc_intrinsic_op op)
}
else if (e->expr_type == EXPR_FUNCTION)
{
- /* One of the lexical comparision functions. */
+ /* One of the lexical comparison functions. */
firstarg = e->value.function.actual;
secondarg = firstarg->next;
op1 = firstarg->expr;
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c
index 3d119180a73..29b6428ab92 100644
--- a/gcc/fortran/match.c
+++ b/gcc/fortran/match.c
@@ -597,7 +597,7 @@ gfc_match_name_C (const char **buffer)
c = gfc_next_char_literal (INSTRING_WARN);
/* If the user put nothing expect spaces between the quotes, it is valid
- and simply means there is no name= specifier and the name is the fortran
+ and simply means there is no name= specifier and the name is the Fortran
symbol name, all lowercase. */
if (c == '"' || c == '\'')
{
@@ -3466,6 +3466,9 @@ gfc_match_allocate (void)
"type parameter", &old_locus);
goto cleanup;
}
+
+ if (ts.type == BT_CHARACTER)
+ ts.u.cl->length_from_typespec = true;
}
else
{
@@ -5363,7 +5366,7 @@ gfc_match_select_type (void)
array, which can have a reference, from other expressions that
have references, such as derived type components, and are not
allowed by the standard.
- TODO; see is it is sufficent to exclude component and substring
+ TODO; see is it is sufficient to exclude component and substring
references. */
class_array = expr1->expr_type == EXPR_VARIABLE
&& expr1->ts.type != BT_UNKNOWN
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 9814c14753a..3627b714a07 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -1401,7 +1401,7 @@ count_specific_procs (gfc_expr *e)
/* See if a call to sym could possibly be a not allowed RECURSION because of
- a missing RECURIVE declaration. This means that either sym is the current
+ a missing RECURSIVE declaration. This means that either sym is the current
context itself, or sym is the parent of a contained procedure calling its
non-RECURSIVE containing procedure.
This also works if sym is an ENTRY. */
@@ -5684,7 +5684,7 @@ resolve_typebound_static (gfc_expr* e, gfc_symtree** target,
derived = e->value.compcall.base_object->ts.u.derived;
st = NULL;
- /* If necessary, go throught the inheritance chain. */
+ /* If necessary, go through the inheritance chain. */
while (!st && derived)
{
/* Look for the typebound procedure 'name'. */
@@ -6879,7 +6879,7 @@ resolve_allocate_expr (gfc_expr *e, gfc_code *code)
gfc_component *c;
gfc_try t;
- /* Mark the ultimost array component as being in allocate to allow DIMEN_STAR
+ /* Mark the utmost array component as being in allocate to allow DIMEN_STAR
checking of coarrays. */
for (ref = e->ref; ref; ref = ref->next)
if (ref->next == NULL)
@@ -7130,7 +7130,7 @@ resolve_allocate_expr (gfc_expr *e, gfc_code *code)
if (dimension == 0 && codimension == 0)
goto success;
- /* Make sure the last reference node is an array specifiction. */
+ /* Make sure the last reference node is an array specification. */
if (!ref2 || ref2->type != REF_ARRAY || ref2->u.ar.type == AR_FULL
|| (dimension && ref2->u.ar.dimen == 0))
@@ -8200,7 +8200,7 @@ resolve_select_type (gfc_code *code, gfc_namespace *old_ns)
/* Chain in the new list only if it is marked as dangling. Otherwise
there is a CASE label overlap and this is already used. Just ignore,
- the error is diagonsed elsewhere. */
+ the error is diagnosed elsewhere. */
if (st->n.sym->assoc->dangling)
{
new_st->ext.block.assoc = st->n.sym->assoc;
@@ -9366,7 +9366,7 @@ resolve_code (gfc_code *code, gfc_namespace *ns)
case EXEC_OMP_WORKSHARE:
omp_workshare_save = omp_workshare_flag;
omp_workshare_flag = 1;
- /* FALLTHROUGH */
+ /* FALL THROUGH */
default:
gfc_resolve_blocks (code->block, ns);
break;
@@ -9945,12 +9945,24 @@ resolve_charlen (gfc_charlen *cl)
cl->resolved = 1;
- specification_expr = 1;
- if (resolve_index_expr (cl->length) == FAILURE)
+ if (cl->length_from_typespec)
{
- specification_expr = 0;
- return FAILURE;
+ if (gfc_resolve_expr (cl->length) == FAILURE)
+ return FAILURE;
+
+ if (gfc_simplify_expr (cl->length, 0) == FAILURE)
+ return FAILURE;
+ }
+ else
+ {
+ specification_expr = 1;
+
+ if (resolve_index_expr (cl->length) == FAILURE)
+ {
+ specification_expr = 0;
+ return FAILURE;
+ }
}
/* "If the character length parameter value evaluates to a negative
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index 02bb38d41e4..253446215d3 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -37,7 +37,7 @@ along with GCC; see the file COPYING3. If not see
descriptors and data pointers are also translated.
If the expression is an assignment, we must then resolve any dependencies.
- In fortran all the rhs values of an assignment must be evaluated before
+ In Fortran all the rhs values of an assignment must be evaluated before
any assignments take place. This can require a temporary array to store the
values. We also require a temporary when we are passing array expressions
or vector subscripts as procedure parameters.
@@ -973,7 +973,7 @@ get_array_ref_dim_for_loop_dim (gfc_ss *ss, int loop_dim)
'eltype' == NULL signals that the temporary should be a class object.
The 'initial' expression is used to obtain the size of the dynamic
- type; otehrwise the allocation and initialisation proceeds as for any
+ type; otherwise the allocation and initialisation proceeds as for any
other expression
PRE, POST, INITIAL, DYNAMIC and DEALLOC are as for
@@ -1754,7 +1754,7 @@ gfc_trans_array_constructor_value (stmtblock_t * pblock, tree type,
tmp = build1_v (LABEL_EXPR, exit_label);
gfc_add_expr_to_block (&implied_do_block, tmp);
- /* Finishe the implied-do loop. */
+ /* Finish the implied-do loop. */
tmp = gfc_finish_block(&implied_do_block);
gfc_add_expr_to_block(pblock, tmp);
@@ -1765,7 +1765,7 @@ gfc_trans_array_constructor_value (stmtblock_t * pblock, tree type,
}
-/* A catch-all to obtain the string length for anything that is not a
+/* A catch-all to obtain the string length for anything that is not
a substring of non-constant length, a constant, array or variable. */
static void
@@ -4323,7 +4323,7 @@ temporary:
/* Browse through each array's information from the scalarizer and set the loop
bounds according to the "best" one (per dimension), i.e. the one which
- provides the most information (constant bounds, shape, etc). */
+ provides the most information (constant bounds, shape, etc.). */
static void
set_loop_bounds (gfc_loopinfo *loop)
@@ -4367,7 +4367,7 @@ set_loop_bounds (gfc_loopinfo *loop)
}
else
{
- /* Silence unitialized warnings. */
+ /* Silence uninitialized warnings. */
specinfo = NULL;
spec_dim = 0;
}
@@ -4906,7 +4906,7 @@ gfc_array_init_size (tree descriptor, int rank, int corank, tree * poffset,
}
/* The stride is the number of elements in the array, so multiply by the
- size of an element to get the total size. Obviously, if there ia a
+ size of an element to get the total size. Obviously, if there is a
SOURCE expression (expr3) we must use its element size. */
if (expr3_elem_size != NULL_TREE)
tmp = expr3_elem_size;
@@ -6382,7 +6382,7 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss)
/* A transformational function return value will be a temporary
array descriptor. We still need to go through the scalarizer
- to create the descriptor. Elemental functions ar handled as
+ to create the descriptor. Elemental functions are handled as
arbitrary expressions, i.e. copy to a temporary. */
if (se->direct_byref)
@@ -7423,7 +7423,7 @@ structure_alloc_comps (gfc_symbol * der_type, tree decl,
case DEALLOCATE_ALLOC_COMP:
/* gfc_deallocate_scalar_with_status calls gfc_deallocate_alloc_comp
- (ie. this function) so generate all the calls and suppress the
+ (i.e. this function) so generate all the calls and suppress the
recursion from here, if necessary. */
called_dealloc_with_status = false;
gfc_init_block (&tmpblock);
@@ -8455,7 +8455,7 @@ gfc_reverse_ss (gfc_ss * ss)
}
-/* Given an expression refering to a procedure, return the symbol of its
+/* Given an expression referring to a procedure, return the symbol of its
interface. We can't get the procedure symbol directly as we have to handle
the case of (deferred) type-bound procedures. */
diff --git a/gcc/fortran/trans-common.c b/gcc/fortran/trans-common.c
index ce7114fb88d..695c4f52356 100644
--- a/gcc/fortran/trans-common.c
+++ b/gcc/fortran/trans-common.c
@@ -86,7 +86,7 @@ along with GCC; see the file COPYING3. If not see
Each segment is described by a chain of segment_info structures. Each
segment_info structure describes the extents of a single variable within
the segment. This list is maintained in the order the elements are
- positioned withing the segment. If two elements have the same starting
+ positioned within the segment. If two elements have the same starting
offset the smaller will come first. If they also have the same size their
ordering is undefined.
diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c
index bfbebf3269b..04d6caab183 100644
--- a/gcc/fortran/trans-intrinsic.c
+++ b/gcc/fortran/trans-intrinsic.c
@@ -43,7 +43,7 @@ along with GCC; see the file COPYING3. If not see
/* Only for gfc_trans_assign and gfc_trans_pointer_assign. */
#include "trans-stmt.h"
-/* This maps fortran intrinsic math functions to external library or GCC
+/* This maps Fortran intrinsic math functions to external library or GCC
builtin functions. */
typedef struct GTY(()) gfc_intrinsic_map_t {
/* The explicit enum is required to work around inadequacies in the
@@ -1579,7 +1579,7 @@ conv_intrinsic_cobound (gfc_se * se, gfc_expr * expr)
}
- /* Substract 1 to get to zero based and add dimensions. */
+ /* Subtract 1 to get to zero based and add dimensions. */
switch (arg->expr->rank)
{
case 0:
diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c
index 21a94fd6f06..aa50e3d0b21 100644
--- a/gcc/fortran/trans-types.c
+++ b/gcc/fortran/trans-types.c
@@ -1957,7 +1957,7 @@ gfc_nonrestricted_type (tree t)
{
tree ret = t;
- /* If the type isn't layed out yet, don't copy it. If something
+ /* If the type isn't laid out yet, don't copy it. If something
needs it for real it should wait until the type got finished. */
if (!TYPE_SIZE (t))
return t;
diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c
index 5d6e6ef5190..3313be92df8 100644
--- a/gcc/fortran/trans.c
+++ b/gcc/fortran/trans.c
@@ -1130,15 +1130,12 @@ internal_realloc (void *mem, size_t size)
if (!res && size != 0)
_gfortran_os_error ("Allocation would exceed memory limit");
- if (size == 0)
- return NULL;
-
return res;
} */
tree
gfc_call_realloc (stmtblock_t * block, tree mem, tree size)
{
- tree msg, res, nonzero, zero, null_result, tmp;
+ tree msg, res, nonzero, null_result, tmp;
tree type = TREE_TYPE (mem);
size = gfc_evaluate_now (size, block);
@@ -1169,15 +1166,6 @@ gfc_call_realloc (stmtblock_t * block, tree mem, tree size)
build_empty_stmt (input_location));
gfc_add_expr_to_block (block, tmp);
- /* if (size == 0) then the result is NULL. */
- tmp = fold_build2_loc (input_location, MODIFY_EXPR, type, res,
- build_int_cst (type, 0));
- zero = fold_build1_loc (input_location, TRUTH_NOT_EXPR, boolean_type_node,
- nonzero);
- tmp = fold_build3_loc (input_location, COND_EXPR, void_type_node, zero, tmp,
- build_empty_stmt (input_location));
- gfc_add_expr_to_block (block, tmp);
-
return res;
}
diff --git a/gcc/function.c b/gcc/function.c
index 89fd3773b74..1d6b7a84e43 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -54,7 +54,6 @@ along with GCC; see the file COPYING3. If not see
#include "hashtab.h"
#include "ggc.h"
#include "tm_p.h"
-#include "integrate.h"
#include "langhooks.h"
#include "target.h"
#include "common/common-target.h"
@@ -527,7 +526,6 @@ assign_stack_local (enum machine_mode mode, HOST_WIDE_INT size, int align)
return assign_stack_local_1 (mode, size, align, ASLK_RECORD_PAD);
}
-
/* In order to evaluate some expressions, such as function calls returning
structures in memory, we need to temporarily allocate stack locations.
We record each allocated temporary in the following structure.
@@ -540,11 +538,7 @@ assign_stack_local (enum machine_mode mode, HOST_WIDE_INT size, int align)
result could be in a temporary, we preserve it if we can determine which
one it is in. If we cannot determine which temporary may contain the
result, all temporaries are preserved. A temporary is preserved by
- pretending it was allocated at the previous nesting level.
-
- Automatic variables are also assigned temporary slots, at the nesting
- level where they are defined. They are marked a "kept" so that
- free_temp_slots will not free them. */
+ pretending it was allocated at the previous nesting level. */
struct GTY(()) temp_slot {
/* Points to next temporary slot. */
@@ -564,12 +558,8 @@ struct GTY(()) temp_slot {
unsigned int align;
/* Nonzero if this temporary is currently in use. */
char in_use;
- /* Nonzero if this temporary has its address taken. */
- char addr_taken;
/* Nesting level at which this slot is being used. */
int level;
- /* Nonzero if this should survive a call to free_temp_slots. */
- int keep;
/* The offset of the slot from the frame_pointer, including extra space
for alignment. This info is for combine_temp_slots. */
HOST_WIDE_INT base_offset;
@@ -775,17 +765,11 @@ find_temp_slot_from_address (rtx x)
SIZE is the size in units of the space required. We do no rounding here
since assign_stack_local will do any required rounding.
- KEEP is 1 if this slot is to be retained after a call to
- free_temp_slots. Automatic variables for a block are allocated
- with this flag. KEEP values of 2 or 3 were needed respectively
- for variables whose lifetime is controlled by CLEANUP_POINT_EXPRs
- or for SAVE_EXPRs, but they are now unused.
-
TYPE is the type that will be used for the stack slot. */
rtx
assign_stack_temp_for_type (enum machine_mode mode, HOST_WIDE_INT size,
- int keep, tree type)
+ tree type)
{
unsigned int align;
struct temp_slot *p, *best_p = 0, *selected = NULL, **pp;
@@ -795,9 +779,6 @@ assign_stack_temp_for_type (enum machine_mode mode, HOST_WIDE_INT size,
of a variable size. */
gcc_assert (size != -1);
- /* These are now unused. */
- gcc_assert (keep <= 1);
-
align = get_stack_local_alignment (type, mode);
/* Try to find an available, already-allocated temporary of the proper
@@ -846,7 +827,7 @@ assign_stack_temp_for_type (enum machine_mode mode, HOST_WIDE_INT size,
if (best_p->size - rounded_size >= alignment)
{
p = ggc_alloc_temp_slot ();
- p->in_use = p->addr_taken = 0;
+ p->in_use = 0;
p->size = best_p->size - rounded_size;
p->base_offset = best_p->base_offset + rounded_size;
p->full_size = best_p->full_size - rounded_size;
@@ -918,10 +899,8 @@ assign_stack_temp_for_type (enum machine_mode mode, HOST_WIDE_INT size,
p = selected;
p->in_use = 1;
- p->addr_taken = 0;
p->type = type;
p->level = temp_slot_level;
- p->keep = keep;
pp = temp_slots_at_level (p->level);
insert_slot_to_list (p, pp);
@@ -946,26 +925,25 @@ assign_stack_temp_for_type (enum machine_mode mode, HOST_WIDE_INT size,
}
/* Allocate a temporary stack slot and record it for possible later
- reuse. First three arguments are same as in preceding function. */
+ reuse. First two arguments are same as in preceding function. */
rtx
-assign_stack_temp (enum machine_mode mode, HOST_WIDE_INT size, int keep)
+assign_stack_temp (enum machine_mode mode, HOST_WIDE_INT size)
{
- return assign_stack_temp_for_type (mode, size, keep, NULL_TREE);
+ return assign_stack_temp_for_type (mode, size, NULL_TREE);
}
/* Assign a temporary.
If TYPE_OR_DECL is a decl, then we are doing it on behalf of the decl
and so that should be used in error messages. In either case, we
allocate of the given type.
- KEEP is as for assign_stack_temp.
MEMORY_REQUIRED is 1 if the result must be addressable stack memory;
it is 0 if a register is OK.
DONT_PROMOTE is 1 if we should not promote values in register
to wider modes. */
rtx
-assign_temp (tree type_or_decl, int keep, int memory_required,
+assign_temp (tree type_or_decl, int memory_required,
int dont_promote ATTRIBUTE_UNUSED)
{
tree type, decl;
@@ -1011,7 +989,7 @@ assign_temp (tree type_or_decl, int keep, int memory_required,
size = 1;
}
- tmp = assign_stack_temp_for_type (mode, size, keep, type);
+ tmp = assign_stack_temp_for_type (mode, size, type);
return tmp;
}
@@ -1139,32 +1117,10 @@ update_temp_slot_address (rtx old_rtx, rtx new_rtx)
insert_temp_slot_address (new_rtx, p);
}
-/* If X could be a reference to a temporary slot, mark the fact that its
- address was taken. */
-
-void
-mark_temp_addr_taken (rtx x)
-{
- struct temp_slot *p;
-
- if (x == 0)
- return;
-
- /* If X is not in memory or is at a constant address, it cannot be in
- a temporary slot. */
- if (!MEM_P (x) || CONSTANT_P (XEXP (x, 0)))
- return;
-
- p = find_temp_slot_from_address (XEXP (x, 0));
- if (p != 0)
- p->addr_taken = 1;
-}
-
/* If X could be a reference to a temporary slot, mark that slot as
belonging to the to one level higher than the current level. If X
matched one of our slots, just mark that one. Otherwise, we can't
- easily predict which it is, so upgrade all of them. Kept slots
- need not be touched.
+ easily predict which it is, so upgrade all of them.
This is called when an ({...}) construct occurs and a statement
returns a value in memory. */
@@ -1174,43 +1130,18 @@ preserve_temp_slots (rtx x)
{
struct temp_slot *p = 0, *next;
- /* If there is no result, we still might have some objects whose address
- were taken, so we need to make sure they stay around. */
if (x == 0)
- {
- for (p = *temp_slots_at_level (temp_slot_level); p; p = next)
- {
- next = p->next;
-
- if (p->addr_taken)
- move_slot_to_level (p, temp_slot_level - 1);
- }
-
- return;
- }
+ return;
/* If X is a register that is being used as a pointer, see if we have
- a temporary slot we know it points to. To be consistent with
- the code below, we really should preserve all non-kept slots
- if we can't find a match, but that seems to be much too costly. */
+ a temporary slot we know it points to. */
if (REG_P (x) && REG_POINTER (x))
p = find_temp_slot_from_address (x);
/* If X is not in memory or is at a constant address, it cannot be in
- a temporary slot, but it can contain something whose address was
- taken. */
+ a temporary slot. */
if (p == 0 && (!MEM_P (x) || CONSTANT_P (XEXP (x, 0))))
- {
- for (p = *temp_slots_at_level (temp_slot_level); p; p = next)
- {
- next = p->next;
-
- if (p->addr_taken)
- move_slot_to_level (p, temp_slot_level - 1);
- }
-
- return;
- }
+ return;
/* First see if we can find a match. */
if (p == 0)
@@ -1218,23 +1149,8 @@ preserve_temp_slots (rtx x)
if (p != 0)
{
- /* Move everything at our level whose address was taken to our new
- level in case we used its address. */
- struct temp_slot *q;
-
if (p->level == temp_slot_level)
- {
- for (q = *temp_slots_at_level (temp_slot_level); q; q = next)
- {
- next = q->next;
-
- if (p != q && q->addr_taken)
- move_slot_to_level (q, temp_slot_level - 1);
- }
-
- move_slot_to_level (p, temp_slot_level - 1);
- p->addr_taken = 0;
- }
+ move_slot_to_level (p, temp_slot_level - 1);
return;
}
@@ -1242,9 +1158,7 @@ preserve_temp_slots (rtx x)
for (p = *temp_slots_at_level (temp_slot_level); p; p = next)
{
next = p->next;
-
- if (!p->keep)
- move_slot_to_level (p, temp_slot_level - 1);
+ move_slot_to_level (p, temp_slot_level - 1);
}
}
@@ -1260,12 +1174,8 @@ free_temp_slots (void)
for (p = *temp_slots_at_level (temp_slot_level); p; p = next)
{
next = p->next;
-
- if (!p->keep)
- {
- make_slot_available (p);
- some_available = true;
- }
+ make_slot_available (p);
+ some_available = true;
}
if (some_available)
@@ -1289,22 +1199,7 @@ push_temp_slots (void)
void
pop_temp_slots (void)
{
- struct temp_slot *p, *next;
- bool some_available = false;
-
- for (p = *temp_slots_at_level (temp_slot_level); p; p = next)
- {
- next = p->next;
- make_slot_available (p);
- some_available = true;
- }
-
- if (some_available)
- {
- remove_unused_temp_slot_addresses ();
- combine_temp_slots ();
- }
-
+ free_temp_slots ();
temp_slot_level--;
}
@@ -1328,6 +1223,133 @@ init_temp_slots (void)
htab_empty (temp_slot_address_table);
}
+/* Functions and data structures to keep track of the values hard regs
+ had at the start of the function. */
+
+/* Private type used by get_hard_reg_initial_reg, get_hard_reg_initial_val,
+ and has_hard_reg_initial_val.. */
+typedef struct GTY(()) initial_value_pair {
+ rtx hard_reg;
+ rtx pseudo;
+} initial_value_pair;
+/* ??? This could be a VEC but there is currently no way to define an
+ opaque VEC type. This could be worked around by defining struct
+ initial_value_pair in function.h. */
+typedef struct GTY(()) initial_value_struct {
+ int num_entries;
+ int max_entries;
+ initial_value_pair * GTY ((length ("%h.num_entries"))) entries;
+} initial_value_struct;
+
+/* If a pseudo represents an initial hard reg (or expression), return
+ it, else return NULL_RTX. */
+
+rtx
+get_hard_reg_initial_reg (rtx reg)
+{
+ struct initial_value_struct *ivs = crtl->hard_reg_initial_vals;
+ int i;
+
+ if (ivs == 0)
+ return NULL_RTX;
+
+ for (i = 0; i < ivs->num_entries; i++)
+ if (rtx_equal_p (ivs->entries[i].pseudo, reg))
+ return ivs->entries[i].hard_reg;
+
+ return NULL_RTX;
+}
+
+/* Make sure that there's a pseudo register of mode MODE that stores the
+ initial value of hard register REGNO. Return an rtx for such a pseudo. */
+
+rtx
+get_hard_reg_initial_val (enum machine_mode mode, unsigned int regno)
+{
+ struct initial_value_struct *ivs;
+ rtx rv;
+
+ rv = has_hard_reg_initial_val (mode, regno);
+ if (rv)
+ return rv;
+
+ ivs = crtl->hard_reg_initial_vals;
+ if (ivs == 0)
+ {
+ ivs = ggc_alloc_initial_value_struct ();
+ ivs->num_entries = 0;
+ ivs->max_entries = 5;
+ ivs->entries = ggc_alloc_vec_initial_value_pair (5);
+ crtl->hard_reg_initial_vals = ivs;
+ }
+
+ if (ivs->num_entries >= ivs->max_entries)
+ {
+ ivs->max_entries += 5;
+ ivs->entries = GGC_RESIZEVEC (initial_value_pair, ivs->entries,
+ ivs->max_entries);
+ }
+
+ ivs->entries[ivs->num_entries].hard_reg = gen_rtx_REG (mode, regno);
+ ivs->entries[ivs->num_entries].pseudo = gen_reg_rtx (mode);
+
+ return ivs->entries[ivs->num_entries++].pseudo;
+}
+
+/* See if get_hard_reg_initial_val has been used to create a pseudo
+ for the initial value of hard register REGNO in mode MODE. Return
+ the associated pseudo if so, otherwise return NULL. */
+
+rtx
+has_hard_reg_initial_val (enum machine_mode mode, unsigned int regno)
+{
+ struct initial_value_struct *ivs;
+ int i;
+
+ ivs = crtl->hard_reg_initial_vals;
+ if (ivs != 0)
+ for (i = 0; i < ivs->num_entries; i++)
+ if (GET_MODE (ivs->entries[i].hard_reg) == mode
+ && REGNO (ivs->entries[i].hard_reg) == regno)
+ return ivs->entries[i].pseudo;
+
+ return NULL_RTX;
+}
+
+unsigned int
+emit_initial_value_sets (void)
+{
+ struct initial_value_struct *ivs = crtl->hard_reg_initial_vals;
+ int i;
+ rtx seq;
+
+ if (ivs == 0)
+ return 0;
+
+ start_sequence ();
+ for (i = 0; i < ivs->num_entries; i++)
+ emit_move_insn (ivs->entries[i].pseudo, ivs->entries[i].hard_reg);
+ seq = get_insns ();
+ end_sequence ();
+
+ emit_insn_at_entry (seq);
+ return 0;
+}
+
+/* Return the hardreg-pseudoreg initial values pair entry I and
+ TRUE if I is a valid entry, or FALSE if I is not a valid entry. */
+bool
+initial_value_entry (int i, rtx *hreg, rtx *preg)
+{
+ struct initial_value_struct *ivs = crtl->hard_reg_initial_vals;
+ if (!ivs || i >= ivs->num_entries)
+ return false;
+
+ *hreg = ivs->entries[i].hard_reg;
+ *preg = ivs->entries[i].pseudo;
+ return true;
+}
+
/* These routines are responsible for converting virtual register references
to the actual hard register references once RTL generation is complete.
@@ -4791,11 +4813,8 @@ expand_function_start (tree subr)
tree t_save;
rtx r_save;
- /* ??? We need to do this save early. Unfortunately here is
- before the frame variable gets declared. Help out... */
tree var = TREE_OPERAND (cfun->nonlocal_goto_save_area, 0);
- if (!DECL_RTL_SET_P (var))
- expand_decl (var);
+ gcc_assert (DECL_RTL_SET_P (var));
t_save = build4 (ARRAY_REF,
TREE_TYPE (TREE_TYPE (cfun->nonlocal_goto_save_area)),
diff --git a/gcc/function.h b/gcc/function.h
index 05848677298..8e55fa3abf3 100644
--- a/gcc/function.h
+++ b/gcc/function.h
@@ -264,8 +264,11 @@ struct GTY(()) rtl_data {
the hard register containing the result. */
rtx return_rtx;
- /* Opaque pointer used by get_hard_reg_initial_val and
- has_hard_reg_initial_val (see integrate.[hc]). */
+ /* Vector of initial-value pairs. Each pair consists of a pseudo
+ register of approprite mode that stores the initial value a hard
+ register REGNO, and that hard register itself. */
+ /* ??? This could be a VEC but there is currently no way to define an
+ opaque VEC type. */
struct initial_value_struct *hard_reg_initial_vals;
/* A variable living at the top of the frame that holds a known value.
@@ -732,7 +735,6 @@ void types_used_by_var_decl_insert (tree type, tree var_decl);
referenced by the global variable. */
extern GTY(()) VEC(tree,gc) *types_used_by_cur_var_decl;
-
/* cfun shouldn't be set directly; use one of these functions instead. */
extern void set_cfun (struct function *new_cfun);
extern void push_cfun (struct function *new_cfun);
@@ -804,6 +806,14 @@ extern int get_last_funcdef_no (void);
extern bool requires_stack_frame_p (rtx, HARD_REG_SET, HARD_REG_SET);
#endif
+extern rtx get_hard_reg_initial_val (enum machine_mode, unsigned int);
+extern rtx has_hard_reg_initial_val (enum machine_mode, unsigned int);
+extern rtx get_hard_reg_initial_reg (rtx);
+extern bool initial_value_entry (int i, rtx *, rtx *);
+
+/* Called from gimple_expand_cfg. */
+extern unsigned int emit_initial_value_sets (void);
+
/* In predict.c */
extern bool optimize_function_for_size_p (struct function *);
extern bool optimize_function_for_speed_p (struct function *);
diff --git a/gcc/gcc.c b/gcc/gcc.c
index d1ef922e051..eb3b220d10a 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -8071,7 +8071,7 @@ include_spec_function (int argc, const char **argv)
}
/* %:find-file spec function. This function replaces its argument by
- the file found thru find_file, that is the -print-file-name gcc
+ the file found through find_file, that is the -print-file-name gcc
program option. */
static const char *
find_file_spec_function (int argc, const char **argv)
@@ -8087,7 +8087,7 @@ find_file_spec_function (int argc, const char **argv)
/* %:find-plugindir spec function. This function replaces its argument
- by the -iplugindir=<dir> option. `dir' is found thru find_file, that
+ by the -iplugindir=<dir> option. `dir' is found through find_file, that
is the -print-file-name gcc program option. */
static const char *
find_plugindir_spec_function (int argc, const char **argv ATTRIBUTE_UNUSED)
diff --git a/gcc/gcov.c b/gcc/gcov.c
index 97071115be5..d4823991d14 100644
--- a/gcc/gcov.c
+++ b/gcc/gcov.c
@@ -2219,15 +2219,8 @@ read_line (FILE *file)
return string;
}
pos += len;
- ptr = XNEWVEC (char, string_len * 2);
- if (ptr)
- {
- memcpy (ptr, string, pos);
- string = ptr;
- string_len += 2;
- }
- else
- pos = 0;
+ string = XRESIZEVEC (char, string, string_len * 2);
+ string_len *= 2;
}
return pos ? string : NULL;
diff --git a/gcc/gcse.c b/gcc/gcse.c
index a050ff5ba6b..d07ee86f488 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -2906,7 +2906,7 @@ hoist_expr_reaches_here_p (basic_block expr_bb, int expr_index, basic_block bb,
return (pred == NULL);
}
-/* Find occurence in BB. */
+/* Find occurrence in BB. */
static struct occr *
find_occr_in_bb (struct occr *occr, basic_block bb)
@@ -2990,11 +2990,11 @@ hoist_code (void)
{
/* Current expression. */
struct expr *expr = index_map[i];
- /* Number of occurences of EXPR that can be hoisted to BB. */
+ /* Number of occurrences of EXPR that can be hoisted to BB. */
int hoistable = 0;
- /* Basic blocks that have occurences reachable from BB. */
+ /* Basic blocks that have occurrences reachable from BB. */
bitmap_head _from_bbs, *from_bbs = &_from_bbs;
- /* Occurences reachable from BB. */
+ /* Occurrences reachable from BB. */
VEC (occr_t, heap) *occrs_to_hoist = NULL;
/* We want to insert the expression into BB only once, so
note when we've inserted it. */
@@ -3004,14 +3004,14 @@ hoist_code (void)
bitmap_initialize (from_bbs, 0);
/* If an expression is computed in BB and is available at end of
- BB, hoist all occurences dominated by BB to BB. */
+ BB, hoist all occurrences dominated by BB to BB. */
if (TEST_BIT (comp[bb->index], i))
{
occr = find_occr_in_bb (expr->antic_occr, bb);
if (occr)
{
- /* An occurence might've been already deleted
+ /* An occurrence might've been already deleted
while processing a dominator of BB. */
if (!occr->deleted_p)
{
@@ -3042,7 +3042,7 @@ hoist_code (void)
occr = find_occr_in_bb (expr->antic_occr, dominated);
gcc_assert (occr);
- /* An occurence might've been already deleted
+ /* An occurrence might've been already deleted
while processing a dominator of BB. */
if (occr->deleted_p)
continue;
@@ -3084,7 +3084,7 @@ hoist_code (void)
if (hoistable > 1 && dbg_cnt (hoist_insn))
{
/* If (hoistable != VEC_length), then there is
- an occurence of EXPR in BB itself. Don't waste
+ an occurrence of EXPR in BB itself. Don't waste
time looking for LCA in this case. */
if ((unsigned) hoistable
== VEC_length (occr_t, occrs_to_hoist))
@@ -3094,7 +3094,7 @@ hoist_code (void)
lca = nearest_common_dominator_for_set (CDI_DOMINATORS,
from_bbs);
if (lca != bb)
- /* Punt, it's better to hoist these occurences to
+ /* Punt, it's better to hoist these occurrences to
LCA. */
VEC_free (occr_t, heap, occrs_to_hoist);
}
@@ -3105,7 +3105,7 @@ hoist_code (void)
insn_inserted_p = 0;
- /* Walk through occurences of I'th expressions we want
+ /* Walk through occurrences of I'th expressions we want
to hoist to BB and make the transformations. */
FOR_EACH_VEC_ELT (occr_t, occrs_to_hoist, j, occr)
{
diff --git a/gcc/genautomata.c b/gcc/genautomata.c
index 434b42e0ed3..9f9e066b119 100644
--- a/gcc/genautomata.c
+++ b/gcc/genautomata.c
@@ -2390,7 +2390,7 @@ add_presence_absence (unit_set_el_t dest_list,
/* The function inserts BYPASS in the list of bypasses of the
corresponding output insn. The order of bypasses in the list is
- decribed in a comment for member `bypass_list' (see above). If
+ described in a comment for member `bypass_list' (see above). If
there is already the same bypass in the list the function reports
this and does nothing. */
static void
diff --git a/gcc/genemit.c b/gcc/genemit.c
index 91025e24d88..eefe4978d43 100644
--- a/gcc/genemit.c
+++ b/gcc/genemit.c
@@ -809,7 +809,6 @@ from the machine description file `md'. */\n\n");
printf ("#include \"tm-constrs.h\"\n");
printf ("#include \"ggc.h\"\n");
printf ("#include \"basic-block.h\"\n");
- printf ("#include \"integrate.h\"\n");
printf ("#include \"target.h\"\n\n");
printf ("#define FAIL return (end_sequence (), _val)\n");
printf ("#define DONE return (_val = get_insns (), end_sequence (), _val)\n\n");
diff --git a/gcc/gengtype-state.c b/gcc/gengtype-state.c
index d265f487031..d7ea9b48d94 100644
--- a/gcc/gengtype-state.c
+++ b/gcc/gengtype-state.c
@@ -65,7 +65,7 @@ type_lineloc (const_type_p ty)
}
/* The state file has simplistic lispy lexical tokens. Its lexer gives
- a linked list of struct state_token_st, thru the peek_state_token
+ a linked list of struct state_token_st, through the peek_state_token
function. Lexical tokens are consumed with next_state_tokens. */
@@ -818,7 +818,7 @@ write_state_lang_struct_type (type_p current)
type_p hty = NULL;
const char *homoname = 0;
write_state_struct_union_type (current, "lang_struct");
- /* lang_struct-ures are particularily tricky, since their
+ /* lang_struct-ures are particularly tricky, since their
u.s.lang_struct field gives a list of homonymous struct-s or
union-s! */
DBGPRINTF ("lang_struct @ %p #%d", (void *) current, current->state_number);
diff --git a/gcc/gengtype.c b/gcc/gengtype.c
index 8e1b42e4527..c379eb06c7b 100644
--- a/gcc/gengtype.c
+++ b/gcc/gengtype.c
@@ -159,7 +159,7 @@ static outf_p *base_files;
#if ENABLE_CHECKING
/* Utility debugging function, printing the various type counts within
- a list of types. Called thru the DBGPRINT_COUNT_TYPE macro. */
+ a list of types. Called through the DBGPRINT_COUNT_TYPE macro. */
void
dbgprint_count_type_at (const char *fil, int lin, const char *msg, type_p t)
{
@@ -1828,7 +1828,7 @@ struct file_rule_st files_rules[] = {
/* Source *.c files are using get_file_gtfilename to compute their
output_name and get_file_basename to compute their for_name
- thru the source_dot_c_frul action. */
+ through the source_dot_c_frul action. */
{ DIR_PREFIX_REGEX "([[:alnum:]_-]*)\\.c$",
REG_EXTENDED, NULL_REGEX, "gt-$3.h", "$3.c", source_dot_c_frul},
/* Common header files get "gtype-desc.c" as their output_name,
@@ -2004,7 +2004,7 @@ get_output_file_with_visibility (input_file *inpf)
/* Try each rule in sequence in files_rules until one is triggered. */
{
int rulix = 0;
- DBGPRINTF ("passing input file @ %p named %s thru the files_rules",
+ DBGPRINTF ("passing input file @ %p named %s through the files_rules",
(void*) inpf, inpfname);
for (; files_rules[rulix].frul_srcexpr != NULL; rulix++)
diff --git a/gcc/genhooks.c b/gcc/genhooks.c
index 789744ce228..fc48e45161c 100644
--- a/gcc/genhooks.c
+++ b/gcc/genhooks.c
@@ -91,7 +91,7 @@ s_hook_eq_p (const void *p1, const void *p2)
}
/* Read the documentation file with name IN_FNAME, perform substitutions
- to incorporate informtion from hook_array, and emit the result on stdout.
+ to incorporate information from hook_array, and emit the result on stdout.
Hooks defined with DEFHOOK / DEFHOOKPOD are emitted at the place of a
matching @hook in the input file; if there is no matching @hook, the
hook is emitted after the hook that precedes it in target.def .
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c
index 6b4d987e025..b2bd3378802 100644
--- a/gcc/gimple-fold.c
+++ b/gcc/gimple-fold.c
@@ -94,7 +94,7 @@ can_refer_decl_in_current_unit_p (tree decl, tree from_decl)
produced.
As observed in PR20991 for already optimized out comdat virtual functions
- it may be tempting to not neccesarily give up because the copy will be
+ it may be tempting to not necessarily give up because the copy will be
output elsewhere when corresponding vtable is output.
This is however not possible - ABI specify that COMDATs are output in
units where they are used and when the other unit was compiled with LTO
@@ -154,6 +154,12 @@ canonicalize_constructor_val (tree cval, tree from_decl)
if (TREE_CODE (cval) == ADDR_EXPR)
{
tree base = get_base_address (TREE_OPERAND (cval, 0));
+ if (!base && TREE_CODE (TREE_OPERAND (cval, 0)) == COMPOUND_LITERAL_EXPR)
+ {
+ base = COMPOUND_LITERAL_EXPR_DECL (TREE_OPERAND (cval, 0));
+ if (base)
+ TREE_OPERAND (cval, 0) = base;
+ }
if (!base)
return NULL_TREE;
@@ -164,7 +170,8 @@ canonicalize_constructor_val (tree cval, tree from_decl)
if (TREE_CODE (base) == VAR_DECL)
{
TREE_ADDRESSABLE (base) = 1;
- if (cfun && gimple_referenced_vars (cfun))
+ if (cfun && gimple_referenced_vars (cfun)
+ && !is_global_var (base))
add_referenced_var (base);
}
else if (TREE_CODE (base) == FUNCTION_DECL)
@@ -1053,7 +1060,7 @@ gimple_extract_devirt_binfo_from_cst (tree cst)
type = TREE_TYPE (fld);
offset -= pos;
}
- /* Artifical sub-objects are ancestors, we do not want to use them for
+ /* Artificial sub-objects are ancestors, we do not want to use them for
devirtualization, at least not here. */
if (last_artificial)
return NULL_TREE;
diff --git a/gcc/gimple-pretty-print.c b/gcc/gimple-pretty-print.c
index 2e3cb0ca872..a80ae90a6f0 100644
--- a/gcc/gimple-pretty-print.c
+++ b/gcc/gimple-pretty-print.c
@@ -156,7 +156,7 @@ debug_gimple_seq (gimple_seq seq)
/* A simple helper to pretty-print some of the gimple tuples in the printf
- style. The format modifiers are preceeded by '%' and are:
+ style. The format modifiers are preceded by '%' and are:
'G' - outputs a string corresponding to the code of the given gimple,
'S' - outputs a gimple_seq with indent of spc + 2,
'T' - outputs the tree t,
diff --git a/gcc/gimple.c b/gcc/gimple.c
index 25179380b82..01790c06e1a 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -3341,7 +3341,7 @@ gtc_visit (tree t1, tree t2,
|| FIXED_POINT_TYPE_P (t1))
return true;
- /* For other types fall thru to more complex checks. */
+ /* For other types fall through to more complex checks. */
}
/* If the types have been previously registered and found equal
@@ -3463,13 +3463,6 @@ gimple_types_compatible_p_1 (tree t1, tree t2, type_pair_t p,
goto same_types;
else if (i1 == NULL_TREE || i2 == NULL_TREE)
goto different_types;
- /* If for a complete array type the possibly gimplified sizes
- are different the types are different. */
- else if (((TYPE_SIZE (i1) != NULL) ^ (TYPE_SIZE (i2) != NULL))
- || (TYPE_SIZE (i1)
- && TYPE_SIZE (i2)
- && !operand_equal_p (TYPE_SIZE (i1), TYPE_SIZE (i2), 0)))
- goto different_types;
else
{
tree min1 = TYPE_MIN_VALUE (i1);
@@ -3770,7 +3763,7 @@ gimple_types_compatible_p (tree t1, tree t2)
|| FIXED_POINT_TYPE_P (t1))
return true;
- /* For other types fall thru to more complex checks. */
+ /* For other types fall through to more complex checks. */
}
/* If the types have been previously registered and found equal
@@ -3980,9 +3973,8 @@ iterative_hash_gimple_type (tree type, hashval_t val,
v = iterative_hash_hashval_t (TYPE_STRING_FLAG (type), v);
}
- /* For array types hash their domain and the string flag. */
- if (TREE_CODE (type) == ARRAY_TYPE
- && TYPE_DOMAIN (type))
+ /* For array types hash the domain and the string flag. */
+ if (TREE_CODE (type) == ARRAY_TYPE && TYPE_DOMAIN (type))
{
v = iterative_hash_hashval_t (TYPE_STRING_FLAG (type), v);
v = visit (TYPE_DOMAIN (type), state, v,
@@ -4209,16 +4201,20 @@ iterative_hash_canonical_type (tree type, hashval_t val)
v = iterative_hash_hashval_t (TREE_CODE (TREE_TYPE (type)), v);
}
- /* For integer types hash the types min/max values and the string flag. */
+ /* For integer types hash only the string flag. */
if (TREE_CODE (type) == INTEGER_TYPE)
v = iterative_hash_hashval_t (TYPE_STRING_FLAG (type), v);
- /* For array types hash their domain and the string flag. */
- if (TREE_CODE (type) == ARRAY_TYPE
- && TYPE_DOMAIN (type))
+ /* For array types hash the domain bounds and the string flag. */
+ if (TREE_CODE (type) == ARRAY_TYPE && TYPE_DOMAIN (type))
{
v = iterative_hash_hashval_t (TYPE_STRING_FLAG (type), v);
- v = iterative_hash_canonical_type (TYPE_DOMAIN (type), v);
+ /* OMP lowering can introduce error_mark_node in place of
+ random local decls in types. */
+ if (TYPE_MIN_VALUE (TYPE_DOMAIN (type)) != error_mark_node)
+ v = iterative_hash_expr (TYPE_MIN_VALUE (TYPE_DOMAIN (type)), v);
+ if (TYPE_MAX_VALUE (TYPE_DOMAIN (type)) != error_mark_node)
+ v = iterative_hash_expr (TYPE_MAX_VALUE (TYPE_DOMAIN (type)), v);
}
/* Recurse for aggregates with a single element type. */
@@ -4486,13 +4482,6 @@ gimple_canonical_types_compatible_p (tree t1, tree t2)
return true;
else if (i1 == NULL_TREE || i2 == NULL_TREE)
return false;
- /* If for a complete array type the possibly gimplified sizes
- are different the types are different. */
- else if (((TYPE_SIZE (i1) != NULL) ^ (TYPE_SIZE (i2) != NULL))
- || (TYPE_SIZE (i1)
- && TYPE_SIZE (i2)
- && !operand_equal_p (TYPE_SIZE (i1), TYPE_SIZE (i2), 0)))
- return false;
else
{
tree min1 = TYPE_MIN_VALUE (i1);
diff --git a/gcc/gimple.h b/gcc/gimple.h
index 801a5badfa2..0259f47bbb8 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -4806,7 +4806,7 @@ gimple_return_set_retval (gimple gs, tree retval)
}
-/* Returns true when the gimple statment STMT is any of the OpenMP types. */
+/* Returns true when the gimple statement STMT is any of the OpenMP types. */
#define CASE_GIMPLE_OMP \
case GIMPLE_OMP_PARALLEL: \
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index e62ac20f04c..f36d6575f13 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -2859,7 +2859,7 @@ shortcut_cond_r (tree pred, tree *true_label_p, tree *false_label_p,
/* Given a conditional expression EXPR with short-circuit boolean
predicates using TRUTH_ANDIF_EXPR or TRUTH_ORIF_EXPR, break the
- predicate appart into the equivalent sequence of conditionals. */
+ predicate apart into the equivalent sequence of conditionals. */
static tree
shortcut_cond_expr (tree expr)
diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc
index 15851504f69..f9c80b3aeff 100644
--- a/gcc/go/gofrontend/expressions.cc
+++ b/gcc/go/gofrontend/expressions.cc
@@ -1312,30 +1312,18 @@ Func_expression::do_get_tree(Translate_context* context)
&& TREE_CODE(TREE_OPERAND(fnaddr, 0)) == FUNCTION_DECL);
TREE_ADDRESSABLE(TREE_OPERAND(fnaddr, 0)) = 1;
- // For a normal non-nested function call, that is all we have to do.
- if (!this->function_->is_function()
- || this->function_->func_value()->enclosing() == NULL)
- {
- go_assert(this->closure_ == NULL);
- return fnaddr;
- }
+ // If there is no closure, that is all have to do.
+ if (this->closure_ == NULL)
+ return fnaddr;
- // For a nested function call, we have to always allocate a
- // trampoline. If we don't always allocate, then closures will not
- // be reliably distinct.
- Expression* closure = this->closure_;
- tree closure_tree;
- if (closure == NULL)
- closure_tree = null_pointer_node;
- else
- {
- // Get the value of the closure. This will be a pointer to
- // space allocated on the heap.
- closure_tree = closure->get_tree(context);
- if (closure_tree == error_mark_node)
- return error_mark_node;
- go_assert(POINTER_TYPE_P(TREE_TYPE(closure_tree)));
- }
+ go_assert(this->function_->func_value()->enclosing() != NULL);
+
+ // Get the value of the closure. This will be a pointer to space
+ // allocated on the heap.
+ tree closure_tree = this->closure_->get_tree(context);
+ if (closure_tree == error_mark_node)
+ return error_mark_node;
+ go_assert(POINTER_TYPE_P(TREE_TYPE(closure_tree)));
// Now we need to build some code on the heap. This code will load
// the static chain pointer with the closure and then jump to the
@@ -4487,9 +4475,8 @@ Binary_expression::eval_constant(Operator op, Numeric_constant* left_nc,
case OPERATOR_LE:
case OPERATOR_GT:
case OPERATOR_GE:
- // These return boolean values and as such must be handled
- // elsewhere.
- go_unreachable();
+ // These return boolean values, not numeric.
+ return false;
default:
break;
}
@@ -5316,24 +5303,13 @@ Binary_expression::operand_address(Statement_inserter* inserter,
bool
Binary_expression::do_numeric_constant_value(Numeric_constant* nc) const
{
- Operator op = this->op_;
-
- if (op == OPERATOR_EQEQ
- || op == OPERATOR_NOTEQ
- || op == OPERATOR_LT
- || op == OPERATOR_LE
- || op == OPERATOR_GT
- || op == OPERATOR_GE)
- return false;
-
Numeric_constant left_nc;
if (!this->left_->numeric_constant_value(&left_nc))
return false;
Numeric_constant right_nc;
if (!this->right_->numeric_constant_value(&right_nc))
return false;
-
- return Binary_expression::eval_constant(op, &left_nc, &right_nc,
+ return Binary_expression::eval_constant(this->op_, &left_nc, &right_nc,
this->location(), nc);
}
diff --git a/gcc/graphite-interchange.c b/gcc/graphite-interchange.c
index cb4d32cc0d2..ae3262a6a61 100644
--- a/gcc/graphite-interchange.c
+++ b/gcc/graphite-interchange.c
@@ -144,7 +144,7 @@ build_partial_difference (ppl_Pointset_Powerset_C_Polyhedron_t *p,
This means that all the time dimensions are equal except for
time_depth, where the constraint is t_{depth} = t'_{depth} + 1
- step. More to this: we should be carefull not to add equalities
+ step. More to this: we should be careful not to add equalities
to the 'coupled' dimensions, which happens when the one dimension
is stripmined dimension, and the other dimension corresponds
to the point loop inside stripmined dimension. */
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index cdabd738dc6..555100fc5c4 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -1223,7 +1223,7 @@ add_condition_to_domain (ppl_Pointset_Powerset_C_Polyhedron_t ps, gimple stmt,
ppl_delete_Linear_Expression (right);
}
-/* Add conditional statement STMT to pbb. CODE is used as the comparision
+/* Add conditional statement STMT to pbb. CODE is used as the comparison
operator. This allows us to invert the condition or to handle
inequalities. */
@@ -2840,7 +2840,7 @@ follow_inital_value_to_phi (tree arg, tree lhs)
}
-/* Return the argument of the loop PHI that is the inital value coming
+/* Return the argument of the loop PHI that is the initial value coming
from outside the loop. */
static edge
@@ -2860,7 +2860,7 @@ edge_initial_value_for_loop_phi (gimple phi)
return NULL;
}
-/* Return the argument of the loop PHI that is the inital value coming
+/* Return the argument of the loop PHI that is the initial value coming
from outside the loop. */
static tree
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index 869159c036f..8aac1e3d96a 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -1085,7 +1085,7 @@ print_curr_reg_pressure (void)
gcc_assert (curr_reg_pressure[cl] >= 0);
fprintf (sched_dump, " %s:%d(%d)", reg_class_names[cl],
curr_reg_pressure[cl],
- curr_reg_pressure[cl] - ira_available_class_regs[cl]);
+ curr_reg_pressure[cl] - ira_class_hard_regs_num[cl]);
}
fprintf (sched_dump, "\n");
}
@@ -1634,9 +1634,9 @@ setup_insn_reg_pressure_info (rtx insn)
cl = ira_pressure_classes[i];
gcc_assert (curr_reg_pressure[cl] >= 0);
change = (int) pressure_info[i].set_increase - death[cl];
- before = MAX (0, max_reg_pressure[i] - ira_available_class_regs[cl]);
+ before = MAX (0, max_reg_pressure[i] - ira_class_hard_regs_num[cl]);
after = MAX (0, max_reg_pressure[i] + change
- - ira_available_class_regs[cl]);
+ - ira_class_hard_regs_num[cl]);
hard_regno = ira_class_hard_regs[cl][0];
gcc_assert (hard_regno >= 0);
mode = reg_raw_mode[hard_regno];
@@ -2227,7 +2227,7 @@ model_recompute (rtx insn)
/* Return the cost of increasing the pressure in class CL from FROM to TO.
Here we use the very simplistic cost model that every register above
- ira_available_class_regs[CL] has a spill cost of 1. We could use other
+ ira_class_hard_regs_num[CL] has a spill cost of 1. We could use other
measures instead, such as one based on MEMORY_MOVE_COST. However:
(1) In order for an instruction to be scheduled, the higher cost
@@ -2251,7 +2251,7 @@ model_recompute (rtx insn)
static int
model_spill_cost (int cl, int from, int to)
{
- from = MAX (from, ira_available_class_regs[cl]);
+ from = MAX (from, ira_class_hard_regs_num[cl]);
return MAX (to, from) - from;
}
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index 6f2101ef80b..adeb214a5e4 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -3877,7 +3877,7 @@ find_if_case_1 (basic_block test_bb, edge then_edge, edge else_edge)
/* We can avoid creating a new basic block if then_bb is immediately
followed by else_bb, i.e. deleting then_bb allows test_bb to fall
- thru to else_bb. */
+ through to else_bb. */
if (then_bb->next_bb == else_bb
&& then_bb->prev_bb == test_bb
diff --git a/gcc/input.c b/gcc/input.c
index 5f14489753f..52dde0bc97e 100644
--- a/gcc/input.c
+++ b/gcc/input.c
@@ -1,5 +1,5 @@
/* Data and functions related to line maps and input files.
- Copyright (C) 2004, 2007, 2008, 2009, 2010, 2011
+ Copyright (C) 2004, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
This file is part of GCC.
@@ -105,15 +105,8 @@ read_line (FILE *file)
return string;
}
pos += len;
- ptr = XNEWVEC (char, string_len * 2);
- if (ptr)
- {
- memcpy (ptr, string, pos);
- string = ptr;
- string_len += 2;
- }
- else
- pos = 0;
+ string = XRESIZEVEC (char, string, string_len * 2);
+ string_len *= 2;
}
return pos ? string : NULL;
@@ -124,7 +117,7 @@ read_line (FILE *file)
the null character. */
const char *
-location_get_source_line(expanded_location xloc)
+location_get_source_line (expanded_location xloc)
{
const char *buffer;
int lines = 1;
@@ -162,7 +155,7 @@ expand_location_to_spelling_point (source_location loc)
return expand_location_1 (loc, /*expansion_piont_p=*/false);
}
-/* If LOCATION is in a sytem header and if it's a virtual location for
+/* If LOCATION is in a system header and if it's a virtual location for
a token coming from the expansion of a macro M, unwind it to the
location of the expansion point of M. Otherwise, just return
LOCATION.
diff --git a/gcc/integrate.c b/gcc/integrate.c
deleted file mode 100644
index 53c5d78cf6e..00000000000
--- a/gcc/integrate.c
+++ /dev/null
@@ -1,360 +0,0 @@
-/* Procedure integration for GCC.
- Copyright (C) 1988, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
- Free Software Foundation, Inc.
- Contributed by Michael Tiemann (tiemann@cygnus.com)
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 3, or (at your option) any later
-version.
-
-GCC is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING3. If not see
-<http://www.gnu.org/licenses/>. */
-
-#include "config.h"
-#include "system.h"
-#include "coretypes.h"
-#include "tm.h"
-
-#include "rtl.h"
-#include "tree.h"
-#include "tm_p.h"
-#include "regs.h"
-#include "flags.h"
-#include "debug.h"
-#include "insn-config.h"
-#include "expr.h"
-#include "output.h"
-#include "recog.h"
-/* For reg_equivs. */
-#include "reload.h"
-#include "integrate.h"
-#include "except.h"
-#include "function.h"
-#include "diagnostic-core.h"
-#include "intl.h"
-#include "params.h"
-#include "ggc.h"
-#include "target.h"
-#include "langhooks.h"
-#include "tree-pass.h"
-#include "df.h"
-
-/* Round to the next highest integer that meets the alignment. */
-#define CEIL_ROUND(VALUE,ALIGN) (((VALUE) + (ALIGN) - 1) & ~((ALIGN)- 1))
-
-
-/* Private type used by {get/has}_hard_reg_initial_val. */
-typedef struct GTY(()) initial_value_pair {
- rtx hard_reg;
- rtx pseudo;
-} initial_value_pair;
-typedef struct GTY(()) initial_value_struct {
- int num_entries;
- int max_entries;
- initial_value_pair * GTY ((length ("%h.num_entries"))) entries;
-} initial_value_struct;
-
-static void set_block_origin_self (tree);
-static void set_block_abstract_flags (tree, int);
-
-
-/* Return false if the function FNDECL cannot be inlined on account of its
- attributes, true otherwise. */
-bool
-function_attribute_inlinable_p (const_tree fndecl)
-{
- if (targetm.attribute_table)
- {
- const_tree a;
-
- for (a = DECL_ATTRIBUTES (fndecl); a; a = TREE_CHAIN (a))
- {
- const_tree name = TREE_PURPOSE (a);
- int i;
-
- for (i = 0; targetm.attribute_table[i].name != NULL; i++)
- if (is_attribute_p (targetm.attribute_table[i].name, name))
- return targetm.function_attribute_inlinable_p (fndecl);
- }
- }
-
- return true;
-}
-
-/* Given a pointer to some BLOCK node, if the BLOCK_ABSTRACT_ORIGIN for the
- given BLOCK node is NULL, set the BLOCK_ABSTRACT_ORIGIN for the node so
- that it points to the node itself, thus indicating that the node is its
- own (abstract) origin. Additionally, if the BLOCK_ABSTRACT_ORIGIN for
- the given node is NULL, recursively descend the decl/block tree which
- it is the root of, and for each other ..._DECL or BLOCK node contained
- therein whose DECL_ABSTRACT_ORIGINs or BLOCK_ABSTRACT_ORIGINs are also
- still NULL, set *their* DECL_ABSTRACT_ORIGIN or BLOCK_ABSTRACT_ORIGIN
- values to point to themselves. */
-
-static void
-set_block_origin_self (tree stmt)
-{
- if (BLOCK_ABSTRACT_ORIGIN (stmt) == NULL_TREE)
- {
- BLOCK_ABSTRACT_ORIGIN (stmt) = stmt;
-
- {
- tree local_decl;
-
- for (local_decl = BLOCK_VARS (stmt);
- local_decl != NULL_TREE;
- local_decl = DECL_CHAIN (local_decl))
- if (! DECL_EXTERNAL (local_decl))
- set_decl_origin_self (local_decl); /* Potential recursion. */
- }
-
- {
- tree subblock;
-
- for (subblock = BLOCK_SUBBLOCKS (stmt);
- subblock != NULL_TREE;
- subblock = BLOCK_CHAIN (subblock))
- set_block_origin_self (subblock); /* Recurse. */
- }
- }
-}
-
-/* Given a pointer to some ..._DECL node, if the DECL_ABSTRACT_ORIGIN for
- the given ..._DECL node is NULL, set the DECL_ABSTRACT_ORIGIN for the
- node to so that it points to the node itself, thus indicating that the
- node represents its own (abstract) origin. Additionally, if the
- DECL_ABSTRACT_ORIGIN for the given node is NULL, recursively descend
- the decl/block tree of which the given node is the root of, and for
- each other ..._DECL or BLOCK node contained therein whose
- DECL_ABSTRACT_ORIGINs or BLOCK_ABSTRACT_ORIGINs are also still NULL,
- set *their* DECL_ABSTRACT_ORIGIN or BLOCK_ABSTRACT_ORIGIN values to
- point to themselves. */
-
-void
-set_decl_origin_self (tree decl)
-{
- if (DECL_ABSTRACT_ORIGIN (decl) == NULL_TREE)
- {
- DECL_ABSTRACT_ORIGIN (decl) = decl;
- if (TREE_CODE (decl) == FUNCTION_DECL)
- {
- tree arg;
-
- for (arg = DECL_ARGUMENTS (decl); arg; arg = DECL_CHAIN (arg))
- DECL_ABSTRACT_ORIGIN (arg) = arg;
- if (DECL_INITIAL (decl) != NULL_TREE
- && DECL_INITIAL (decl) != error_mark_node)
- set_block_origin_self (DECL_INITIAL (decl));
- }
- }
-}
-
-/* Given a pointer to some BLOCK node, and a boolean value to set the
- "abstract" flags to, set that value into the BLOCK_ABSTRACT flag for
- the given block, and for all local decls and all local sub-blocks
- (recursively) which are contained therein. */
-
-static void
-set_block_abstract_flags (tree stmt, int setting)
-{
- tree local_decl;
- tree subblock;
- unsigned int i;
-
- BLOCK_ABSTRACT (stmt) = setting;
-
- for (local_decl = BLOCK_VARS (stmt);
- local_decl != NULL_TREE;
- local_decl = DECL_CHAIN (local_decl))
- if (! DECL_EXTERNAL (local_decl))
- set_decl_abstract_flags (local_decl, setting);
-
- for (i = 0; i < BLOCK_NUM_NONLOCALIZED_VARS (stmt); i++)
- {
- local_decl = BLOCK_NONLOCALIZED_VAR (stmt, i);
- if ((TREE_CODE (local_decl) == VAR_DECL && !TREE_STATIC (local_decl))
- || TREE_CODE (local_decl) == PARM_DECL)
- set_decl_abstract_flags (local_decl, setting);
- }
-
- for (subblock = BLOCK_SUBBLOCKS (stmt);
- subblock != NULL_TREE;
- subblock = BLOCK_CHAIN (subblock))
- set_block_abstract_flags (subblock, setting);
-}
-
-/* Given a pointer to some ..._DECL node, and a boolean value to set the
- "abstract" flags to, set that value into the DECL_ABSTRACT flag for the
- given decl, and (in the case where the decl is a FUNCTION_DECL) also
- set the abstract flags for all of the parameters, local vars, local
- blocks and sub-blocks (recursively) to the same setting. */
-
-void
-set_decl_abstract_flags (tree decl, int setting)
-{
- DECL_ABSTRACT (decl) = setting;
- if (TREE_CODE (decl) == FUNCTION_DECL)
- {
- tree arg;
-
- for (arg = DECL_ARGUMENTS (decl); arg; arg = DECL_CHAIN (arg))
- DECL_ABSTRACT (arg) = setting;
- if (DECL_INITIAL (decl) != NULL_TREE
- && DECL_INITIAL (decl) != error_mark_node)
- set_block_abstract_flags (DECL_INITIAL (decl), setting);
- }
-}
-
-/* Functions to keep track of the values hard regs had at the start of
- the function. */
-
-rtx
-get_hard_reg_initial_reg (rtx reg)
-{
- struct initial_value_struct *ivs = crtl->hard_reg_initial_vals;
- int i;
-
- if (ivs == 0)
- return NULL_RTX;
-
- for (i = 0; i < ivs->num_entries; i++)
- if (rtx_equal_p (ivs->entries[i].pseudo, reg))
- return ivs->entries[i].hard_reg;
-
- return NULL_RTX;
-}
-
-/* Make sure that there's a pseudo register of mode MODE that stores the
- initial value of hard register REGNO. Return an rtx for such a pseudo. */
-
-rtx
-get_hard_reg_initial_val (enum machine_mode mode, unsigned int regno)
-{
- struct initial_value_struct *ivs;
- rtx rv;
-
- rv = has_hard_reg_initial_val (mode, regno);
- if (rv)
- return rv;
-
- ivs = crtl->hard_reg_initial_vals;
- if (ivs == 0)
- {
- ivs = ggc_alloc_initial_value_struct ();
- ivs->num_entries = 0;
- ivs->max_entries = 5;
- ivs->entries = ggc_alloc_vec_initial_value_pair (5);
- crtl->hard_reg_initial_vals = ivs;
- }
-
- if (ivs->num_entries >= ivs->max_entries)
- {
- ivs->max_entries += 5;
- ivs->entries = GGC_RESIZEVEC (initial_value_pair, ivs->entries,
- ivs->max_entries);
- }
-
- ivs->entries[ivs->num_entries].hard_reg = gen_rtx_REG (mode, regno);
- ivs->entries[ivs->num_entries].pseudo = gen_reg_rtx (mode);
-
- return ivs->entries[ivs->num_entries++].pseudo;
-}
-
-/* See if get_hard_reg_initial_val has been used to create a pseudo
- for the initial value of hard register REGNO in mode MODE. Return
- the associated pseudo if so, otherwise return NULL. */
-
-rtx
-has_hard_reg_initial_val (enum machine_mode mode, unsigned int regno)
-{
- struct initial_value_struct *ivs;
- int i;
-
- ivs = crtl->hard_reg_initial_vals;
- if (ivs != 0)
- for (i = 0; i < ivs->num_entries; i++)
- if (GET_MODE (ivs->entries[i].hard_reg) == mode
- && REGNO (ivs->entries[i].hard_reg) == regno)
- return ivs->entries[i].pseudo;
-
- return NULL_RTX;
-}
-
-unsigned int
-emit_initial_value_sets (void)
-{
- struct initial_value_struct *ivs = crtl->hard_reg_initial_vals;
- int i;
- rtx seq;
-
- if (ivs == 0)
- return 0;
-
- start_sequence ();
- for (i = 0; i < ivs->num_entries; i++)
- emit_move_insn (ivs->entries[i].pseudo, ivs->entries[i].hard_reg);
- seq = get_insns ();
- end_sequence ();
-
- emit_insn_at_entry (seq);
- return 0;
-}
-
-/* If the backend knows where to allocate pseudos for hard
- register initial values, register these allocations now. */
-void
-allocate_initial_values (VEC (reg_equivs_t, gc) *reg_equivs)
-{
- if (targetm.allocate_initial_value)
- {
- struct initial_value_struct *ivs = crtl->hard_reg_initial_vals;
- int i;
-
- if (ivs == 0)
- return;
-
- for (i = 0; i < ivs->num_entries; i++)
- {
- int regno = REGNO (ivs->entries[i].pseudo);
- rtx x = targetm.allocate_initial_value (ivs->entries[i].hard_reg);
-
- if (x && REG_N_SETS (REGNO (ivs->entries[i].pseudo)) <= 1)
- {
- if (MEM_P (x))
- reg_equiv_memory_loc (regno) = x;
- else
- {
- basic_block bb;
- int new_regno;
-
- gcc_assert (REG_P (x));
- new_regno = REGNO (x);
- reg_renumber[regno] = new_regno;
- /* Poke the regno right into regno_reg_rtx so that even
- fixed regs are accepted. */
- SET_REGNO (ivs->entries[i].pseudo, new_regno);
- /* Update global register liveness information. */
- FOR_EACH_BB (bb)
- {
- if (REGNO_REG_SET_P(df_get_live_in (bb), regno))
- SET_REGNO_REG_SET (df_get_live_in (bb), new_regno);
- if (REGNO_REG_SET_P(df_get_live_out (bb), regno))
- SET_REGNO_REG_SET (df_get_live_out (bb), new_regno);
- }
- }
- }
- }
- }
-}
-
-#include "gt-integrate.h"
diff --git a/gcc/integrate.h b/gcc/integrate.h
deleted file mode 100644
index e32a92abff3..00000000000
--- a/gcc/integrate.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Function integration definitions for GCC
- Copyright (C) 1990, 1995, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
- 2007, 2008, 2010 Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 3, or (at your option) any later
-version.
-
-GCC is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING3. If not see
-<http://www.gnu.org/licenses/>. */
-
-extern rtx get_hard_reg_initial_val (enum machine_mode, unsigned int);
-extern rtx has_hard_reg_initial_val (enum machine_mode, unsigned int);
-/* If a pseudo represents an initial hard reg (or expression), return
- it, else return NULL_RTX. */
-extern rtx get_hard_reg_initial_reg (rtx);
-/* Called from rest_of_compilation. */
-extern unsigned int emit_initial_value_sets (void);
-
-/* Check whether there's any attribute in a function declaration that
- makes the function uninlinable. Returns false if it finds any,
- true otherwise. */
-extern bool function_attribute_inlinable_p (const_tree);
-
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index 533398b4f7b..4539d46ab73 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -82,7 +82,7 @@ along with GCC; see the file COPYING3. If not see
for each strongly connected component (SCC), we propagate constants
according to previously computed jump functions. We also record what known
values depend on other known values and estimate local effects. Finally, we
- propagate cumulative information about these effects from dependant values
+ propagate cumulative information about these effects from dependent values
to those on which they depend.
Second, we again traverse the call graph in the same topological order and
@@ -1588,7 +1588,7 @@ safe_add (int a, int b)
/* Propagate the estimated effects of individual values along the topological
- from the dependant values to those they depend on. */
+ from the dependent values to those they depend on. */
static void
propagate_effects (void)
diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c
index 5a199a661c2..294f12313f6 100644
--- a/gcc/ipa-inline-analysis.c
+++ b/gcc/ipa-inline-analysis.c
@@ -2013,7 +2013,7 @@ estimate_function_body_sizes (struct cgraph_node *node, bool early)
p = true_predicate ();
/* We account everything but the calls. Calls have their own
- size/time info attached to cgraph edges. This is neccesary
+ size/time info attached to cgraph edges. This is necessary
in order to make the cost disappear after inlining. */
if (!is_gimple_call (stmt))
{
@@ -2699,6 +2699,7 @@ inline_merge_summary (struct cgraph_edge *edge)
edge_set_predicate (edge, &true_p);
/* Similarly remove param summaries. */
VEC_free (inline_param_summary_t, heap, es->param);
+ VEC_free (int, heap, operand_map);
info->time = (info->time + INLINE_TIME_SCALE / 2) / INLINE_TIME_SCALE;
info->size = (info->size + INLINE_SIZE_SCALE / 2) / INLINE_SIZE_SCALE;
diff --git a/gcc/ipa-inline-transform.c b/gcc/ipa-inline-transform.c
index 1c77e86723a..27b5458ad24 100644
--- a/gcc/ipa-inline-transform.c
+++ b/gcc/ipa-inline-transform.c
@@ -264,7 +264,7 @@ inline_call (struct cgraph_edge *e, bool update_original,
This is done before inline plan is applied to NODE when there are
still some inline clones if it.
- This is neccesary because inline decisions are not really transitive
+ This is necessary because inline decisions are not really transitive
and the other inline clones may have different bodies. */
static struct cgraph_node *
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index cb6b559378e..0e430f7f676 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -783,7 +783,7 @@ edge_badness (struct cgraph_edge *edge, bool dump)
edge_growth
badness = -goodness
- The fraction is upside down, becuase on edge counts and time beneits
+ The fraction is upside down, because on edge counts and time beneits
the bounds are known. Edge growth is essentially unlimited. */
else if (max_count)
@@ -1375,7 +1375,7 @@ inline_small_functions (void)
continue;
/* Be sure that caches are maintained consistent.
- We can not make this ENABLE_CHECKING only because it cause differnt
+ We can not make this ENABLE_CHECKING only because it cause different
updates of the fibheap queue. */
cached_badness = edge_badness (edge, false);
reset_edge_growth_cache (edge);
diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c
index 29b4c177b28..445ee792688 100644
--- a/gcc/ipa-pure-const.c
+++ b/gcc/ipa-pure-const.c
@@ -1109,7 +1109,7 @@ propagate_pure_const (void)
ipa_print_order(dump_file, "reduced", order, order_pos);
}
- /* Propagate the local information thru the call graph to produce
+ /* Propagate the local information through the call graph to produce
the global information. All the nodes within a cycle will have
the same info so we collapse cycles first. Then we can do the
propagation in one pass from the leaves to the roots. */
@@ -1381,7 +1381,7 @@ propagate_nothrow (void)
ipa_print_order (dump_file, "reduced for nothrow", order, order_pos);
}
- /* Propagate the local information thru the call graph to produce
+ /* Propagate the local information through the call graph to produce
the global information. All the nodes within a cycle will have
the same info so we collapse cycles first. Then we can do the
propagation in one pass from the leaves to the roots. */
diff --git a/gcc/ipa-ref.h b/gcc/ipa-ref.h
index 96750ba50f6..99273c50fb1 100644
--- a/gcc/ipa-ref.h
+++ b/gcc/ipa-ref.h
@@ -58,7 +58,7 @@ struct GTY(()) ipa_ref_list
{
/* Store actual references in references vector. */
VEC(ipa_ref_t,gc) *references;
- /* Refering is vector of pointers to references. It must not live in GGC space
+ /* Referring is vector of pointers to references. It must not live in GGC space
or GGC will try to mark middle of references vectors. */
VEC(ipa_ref_ptr,heap) * GTY((skip)) referring;
};
diff --git a/gcc/ipa-reference.c b/gcc/ipa-reference.c
index 45fb232ae8b..5a3d1e55ab9 100644
--- a/gcc/ipa-reference.c
+++ b/gcc/ipa-reference.c
@@ -615,7 +615,7 @@ propagate (void)
ipa_discover_readonly_nonaddressable_vars ();
generate_summary ();
- /* Now we know what vars are realy statics; prune out those that aren't. */
+ /* Now we know what vars are really statics; prune out those that aren't. */
FOR_EACH_VARIABLE (vnode)
if (vnode->symbol.externally_visible
|| TREE_ADDRESSABLE (vnode->symbol.decl)
@@ -637,7 +637,7 @@ propagate (void)
bitmap_and_into (node_l->statics_written, all_module_statics);
}
- /* Propagate the local information thru the call graph to produce
+ /* Propagate the local information through the call graph to produce
the global information. All the nodes within a cycle will have
the same info so we collapse cycles first. Then we can do the
propagation in one pass from the leaves to the roots. */
diff --git a/gcc/ipa-utils.c b/gcc/ipa-utils.c
index e22977a0707..7cbf3ac11f4 100644
--- a/gcc/ipa-utils.c
+++ b/gcc/ipa-utils.c
@@ -325,7 +325,7 @@ ipa_reverse_postorder (struct cgraph_node **order)
/* Given a memory reference T, will return the variable at the bottom
- of the access. Unlike get_base_address, this will recurse thru
+ of the access. Unlike get_base_address, this will recurse through
INDIRECT_REFS. */
tree
diff --git a/gcc/ipa.c b/gcc/ipa.c
index 6e3e685d0ab..d624a3fdea8 100644
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -455,10 +455,6 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
FOR_EACH_DEFINED_FUNCTION (node)
cgraph_propagate_frequency (node);
- /* Reclaim alias pairs for functions that have disappeared from the
- call graph. */
- remove_unreachable_alias_pairs ();
-
return changed;
}
@@ -688,7 +684,7 @@ varpool_externally_visible_p (struct varpool_node *vnode, bool aliased)
if (vnode->symbol.resolution == LDPR_PREVAILING_DEF_IRONLY)
return false;
- /* As a special case, the COMDAT virutal tables can be unshared.
+ /* As a special case, the COMDAT virtual tables can be unshared.
In LTO mode turn vtables into static variables. The variable is readonly,
so this does not enable more optimization, but referring static var
is faster for dynamic linking. Also this match logic hidding vtables
@@ -796,7 +792,7 @@ function_and_variable_visibility (bool whole_program)
/* C++ FE on lack of COMDAT support create local COMDAT functions
(that ought to be shared but can not due to object format
- limitations). It is neccesary to keep the flag to make rest of C++ FE
+ limitations). It is necessary to keep the flag to make rest of C++ FE
happy. Clear the flag here to avoid confusion in middle-end. */
if (DECL_COMDAT (node->symbol.decl) && !TREE_PUBLIC (node->symbol.decl))
DECL_COMDAT (node->symbol.decl) = 0;
@@ -979,7 +975,7 @@ gate_whole_program_function_and_variable_visibility (void)
return !flag_ltrans;
}
-/* Bring functionss local at LTO time whith -fwhole-program. */
+/* Bring functionss local at LTO time with -fwhole-program. */
static unsigned int
whole_program_function_and_variable_visibility (void)
@@ -1355,7 +1351,7 @@ build_cdtor_fns (void)
/* Look for constructors and destructors and produce function calling them.
This is needed for targets not supporting ctors or dtors, but we perform the
- transformation also at linktime to merge possibly numberous
+ transformation also at linktime to merge possibly numerous
constructors/destructors into single function to improve code locality and
reduce size. */
diff --git a/gcc/ira-build.c b/gcc/ira-build.c
index 2edab52b1e5..b3fe5d0652f 100644
--- a/gcc/ira-build.c
+++ b/gcc/ira-build.c
@@ -1829,8 +1829,8 @@ low_pressure_loop_node_p (ira_loop_tree_node_t node)
for (i = 0; i < ira_pressure_classes_num; i++)
{
pclass = ira_pressure_classes[i];
- if (node->reg_pressure[pclass] > ira_available_class_regs[pclass]
- && ira_available_class_regs[pclass] > 1)
+ if (node->reg_pressure[pclass] > ira_class_hard_regs_num[pclass]
+ && ira_class_hard_regs_num[pclass] > 1)
return false;
}
return true;
diff --git a/gcc/ira-color.c b/gcc/ira-color.c
index 300c3b8f922..ea933be9990 100644
--- a/gcc/ira-color.c
+++ b/gcc/ira-color.c
@@ -2766,7 +2766,7 @@ color_pass (ira_loop_tree_node_t loop_tree_node)
pclass = ira_pressure_class_translate[rclass];
if (flag_ira_region == IRA_REGION_MIXED
&& (loop_tree_node->reg_pressure[pclass]
- <= ira_available_class_regs[pclass]))
+ <= ira_class_hard_regs_num[pclass]))
{
mode = ALLOCNO_MODE (a);
hard_regno = ALLOCNO_HARD_REGNO (a);
@@ -2819,7 +2819,7 @@ color_pass (ira_loop_tree_node_t loop_tree_node)
ALLOCNO_NUM (subloop_allocno)));
if ((flag_ira_region == IRA_REGION_MIXED)
&& (loop_tree_node->reg_pressure[pclass]
- <= ira_available_class_regs[pclass]))
+ <= ira_class_hard_regs_num[pclass]))
{
if (! ALLOCNO_ASSIGNED_P (subloop_allocno))
{
diff --git a/gcc/ira-costs.c b/gcc/ira-costs.c
index 5d061942f83..62c8b7042f5 100644
--- a/gcc/ira-costs.c
+++ b/gcc/ira-costs.c
@@ -359,9 +359,8 @@ copy_cost (rtx x, enum machine_mode mode, reg_class_t rclass, bool to_p,
if (secondary_class != NO_REGS)
{
- if (!move_cost[mode])
- init_move_cost (mode);
- return (move_cost[mode][(int) secondary_class][(int) rclass]
+ ira_init_register_move_cost_if_necessary (mode);
+ return (ira_register_move_cost[mode][(int) secondary_class][(int) rclass]
+ sri.extra_cost
+ copy_cost (x, mode, secondary_class, to_p, &sri));
}
@@ -374,10 +373,11 @@ copy_cost (rtx x, enum machine_mode mode, reg_class_t rclass, bool to_p,
+ ira_memory_move_cost[mode][(int) rclass][to_p != 0];
else if (REG_P (x))
{
- if (!move_cost[mode])
- init_move_cost (mode);
+ reg_class_t x_class = REGNO_REG_CLASS (REGNO (x));
+
+ ira_init_register_move_cost_if_necessary (mode);
return (sri.extra_cost
- + move_cost[mode][REGNO_REG_CLASS (REGNO (x))][(int) rclass]);
+ + ira_register_move_cost[mode][(int) x_class][(int) rclass]);
}
else
/* If this is a constant, we may eventually want to call rtx_cost
diff --git a/gcc/ira-emit.c b/gcc/ira-emit.c
index 4523a8d41d9..adde4dfb039 100644
--- a/gcc/ira-emit.c
+++ b/gcc/ira-emit.c
@@ -160,7 +160,7 @@ create_new_allocno (int regno, ira_loop_tree_node_t loop_tree_node)
typedef struct move *move_t;
/* The structure represents an allocno move. Both allocnos have the
- same origional regno but different allocation. */
+ same original regno but different allocation. */
struct move
{
/* The allocnos involved in the move. */
@@ -446,7 +446,7 @@ setup_entered_from_non_parent_p (void)
}
/* Return TRUE if move of SRC_ALLOCNO (assigned to hard register) to
- DEST_ALLOCNO (assigned to memory) can be removed beacuse it does
+ DEST_ALLOCNO (assigned to memory) can be removed because it does
not change value of the destination. One possible reason for this
is the situation when SRC_ALLOCNO is not modified in the
corresponding loop. */
@@ -606,7 +606,7 @@ change_loop (ira_loop_tree_node_t node)
== ALLOCNO_HARD_REGNO (parent_allocno))
&& (ALLOCNO_HARD_REGNO (allocno) < 0
|| (parent->reg_pressure[pclass] + 1
- <= ira_available_class_regs[pclass])
+ <= ira_class_hard_regs_num[pclass])
|| TEST_HARD_REG_BIT (ira_prohibited_mode_move_regs
[ALLOCNO_MODE (allocno)],
ALLOCNO_HARD_REGNO (allocno))
diff --git a/gcc/ira-int.h b/gcc/ira-int.h
index 02bec132614..1fd285dacf7 100644
--- a/gcc/ira-int.h
+++ b/gcc/ira-int.h
@@ -75,6 +75,8 @@ DEF_VEC_ALLOC_P(ira_copy_t, heap);
/* Typedef for pointer to the subsequent structure. */
typedef struct ira_loop_tree_node *ira_loop_tree_node_t;
+typedef unsigned short move_table[N_REG_CLASSES];
+
/* In general case, IRA is a regional allocator. The regions are
nested and form a tree. Currently regions are natural loops. The
following structure describes loop tree node (representing basic
@@ -767,35 +769,24 @@ struct target_ira_int {
HARD_REG_SET (x_ira_reg_mode_hard_regset
[FIRST_PSEUDO_REGISTER][NUM_MACHINE_MODES]);
- /* Array based on TARGET_REGISTER_MOVE_COST. Don't use
- ira_register_move_cost directly. Use function of
- ira_get_may_move_cost instead. */
+ /* Maximum cost of moving from a register in one class to a register
+ in another class. Based on TARGET_REGISTER_MOVE_COST. */
move_table *x_ira_register_move_cost[MAX_MACHINE_MODE];
- /* Array analogs of the macros MEMORY_MOVE_COST and
- REGISTER_MOVE_COST but they contain maximal cost not minimal as
- the previous two ones do. */
- short int x_ira_max_memory_move_cost[MAX_MACHINE_MODE][N_REG_CLASSES][2];
- move_table *x_ira_max_register_move_cost[MAX_MACHINE_MODE];
-
- /* Similar to may_move_in_cost but it is calculated in IRA instead of
- regclass. Another difference we take only available hard registers
- into account to figure out that one register class is a subset of
- the another one. Don't use it directly. Use function of
- ira_get_may_move_cost instead. */
+ /* Similar, but here we don't have to move if the first index is a
+ subset of the second so in that case the cost is zero. */
move_table *x_ira_may_move_in_cost[MAX_MACHINE_MODE];
- /* Similar to may_move_out_cost but it is calculated in IRA instead of
- regclass. Another difference we take only available hard registers
- into account to figure out that one register class is a subset of
- the another one. Don't use it directly. Use function of
- ira_get_may_move_cost instead. */
+ /* Similar, but here we don't have to move if the first index is a
+ superset of the second so in that case the cost is zero. */
move_table *x_ira_may_move_out_cost[MAX_MACHINE_MODE];
-/* Similar to ira_may_move_in_cost and ira_may_move_out_cost but they
- return maximal cost. */
- move_table *x_ira_max_may_move_in_cost[MAX_MACHINE_MODE];
- move_table *x_ira_max_may_move_out_cost[MAX_MACHINE_MODE];
+ /* Keep track of the last mode we initialized move costs for. */
+ int x_last_mode_for_init_move_cost;
+
+ /* Array analog of the macro MEMORY_MOVE_COST but they contain maximal
+ cost not minimal. */
+ short int x_ira_max_memory_move_cost[MAX_MACHINE_MODE][N_REG_CLASSES][2];
/* Map class->true if class is a possible allocno class, false
otherwise. */
@@ -892,16 +883,10 @@ extern struct target_ira_int *this_target_ira_int;
(this_target_ira_int->x_ira_register_move_cost)
#define ira_max_memory_move_cost \
(this_target_ira_int->x_ira_max_memory_move_cost)
-#define ira_max_register_move_cost \
- (this_target_ira_int->x_ira_max_register_move_cost)
#define ira_may_move_in_cost \
(this_target_ira_int->x_ira_may_move_in_cost)
#define ira_may_move_out_cost \
(this_target_ira_int->x_ira_may_move_out_cost)
-#define ira_max_may_move_in_cost \
- (this_target_ira_int->x_ira_max_may_move_in_cost)
-#define ira_max_may_move_out_cost \
- (this_target_ira_int->x_ira_max_may_move_out_cost)
#define ira_reg_allocno_class_p \
(this_target_ira_int->x_ira_reg_allocno_class_p)
#define ira_reg_pressure_class_p \
diff --git a/gcc/ira-lives.c b/gcc/ira-lives.c
index ad451f5b3f9..5eb13c1425d 100644
--- a/gcc/ira-lives.c
+++ b/gcc/ira-lives.c
@@ -192,7 +192,7 @@ inc_register_pressure (enum reg_class pclass, int n)
continue;
curr_reg_pressure[cl] += n;
if (high_pressure_start_point[cl] < 0
- && (curr_reg_pressure[cl] > ira_available_class_regs[cl]))
+ && (curr_reg_pressure[cl] > ira_class_hard_regs_num[cl]))
high_pressure_start_point[cl] = curr_point;
if (curr_bb_node->reg_pressure[cl] < curr_reg_pressure[cl])
curr_bb_node->reg_pressure[cl] = curr_reg_pressure[cl];
@@ -221,7 +221,7 @@ dec_register_pressure (enum reg_class pclass, int nregs)
curr_reg_pressure[cl] -= nregs;
ira_assert (curr_reg_pressure[cl] >= 0);
if (high_pressure_start_point[cl] >= 0
- && curr_reg_pressure[cl] <= ira_available_class_regs[cl])
+ && curr_reg_pressure[cl] <= ira_class_hard_regs_num[cl])
set_p = true;
}
if (set_p)
@@ -235,7 +235,7 @@ dec_register_pressure (enum reg_class pclass, int nregs)
if (! ira_reg_pressure_class_p[cl])
continue;
if (high_pressure_start_point[cl] >= 0
- && curr_reg_pressure[cl] <= ira_available_class_regs[cl])
+ && curr_reg_pressure[cl] <= ira_class_hard_regs_num[cl])
high_pressure_start_point[cl] = -1;
}
}
@@ -528,7 +528,7 @@ mark_ref_dead (df_ref def)
/* If REG is a pseudo or a subreg of it, and the class of its allocno
intersects CL, make a conflict with pseudo DREG. ORIG_DREG is the
- rtx actually accessed, it may be indentical to DREG or a subreg of it.
+ rtx actually accessed, it may be identical to DREG or a subreg of it.
Advance the current program point before making the conflict if
ADVANCE_P. Return TRUE if we will need to advance the current
program point. */
@@ -562,7 +562,7 @@ make_pseudo_conflict (rtx reg, enum reg_class cl, rtx dreg, rtx orig_dreg,
/* Check and make if necessary conflicts for pseudo DREG of class
DEF_CL of the current insn with input operand USE of class USE_CL.
- ORIG_DREG is the rtx actually accessed, it may be indentical to
+ ORIG_DREG is the rtx actually accessed, it may be identical to
DREG or a subreg of it. Advance the current program point before
making the conflict if ADVANCE_P. Return TRUE if we will need to
advance the current program point. */
@@ -851,7 +851,7 @@ single_reg_class (const char *constraints, rtx op, rtx equiv_const)
? GENERAL_REGS
: REG_CLASS_FROM_CONSTRAINT (c, constraints));
if ((cl != NO_REGS && next_cl != cl)
- || (ira_available_class_regs[next_cl]
+ || (ira_class_hard_regs_num[next_cl]
> ira_reg_class_max_nregs[next_cl][GET_MODE (op)]))
return NO_REGS;
cl = next_cl;
@@ -864,7 +864,7 @@ single_reg_class (const char *constraints, rtx op, rtx equiv_const)
recog_data.operand[c - '0'], NULL_RTX);
if ((cl != NO_REGS && next_cl != cl)
|| next_cl == NO_REGS
- || (ira_available_class_regs[next_cl]
+ || (ira_class_hard_regs_num[next_cl]
> ira_reg_class_max_nregs[next_cl][GET_MODE (op)]))
return NO_REGS;
cl = next_cl;
@@ -943,8 +943,8 @@ ira_implicitly_set_insn_hard_regs (HARD_REG_SET *set)
if (cl != NO_REGS
/* There is no register pressure problem if all of the
regs in this class are fixed. */
- && ira_available_class_regs[cl] != 0
- && (ira_available_class_regs[cl]
+ && ira_class_hard_regs_num[cl] != 0
+ && (ira_class_hard_regs_num[cl]
<= ira_reg_class_max_nregs[cl][mode]))
IOR_HARD_REG_SET (*set, reg_class_contents[cl]);
break;
@@ -1170,7 +1170,7 @@ process_bb_node_lives (ira_loop_tree_node_t loop_tree_node)
if (curr_bb_node->reg_pressure[cl] < curr_reg_pressure[cl])
curr_bb_node->reg_pressure[cl] = curr_reg_pressure[cl];
ira_assert (curr_reg_pressure[cl]
- <= ira_available_class_regs[cl]);
+ <= ira_class_hard_regs_num[cl]);
}
}
EXECUTE_IF_SET_IN_BITMAP (reg_live_out, FIRST_PSEUDO_REGISTER, j, bi)
diff --git a/gcc/ira.c b/gcc/ira.c
index 1809e0da83a..81c5180b7d0 100644
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -380,7 +380,7 @@ along with GCC; see the file COPYING3. If not see
#include "except.h"
#include "reload.h"
#include "diagnostic-core.h"
-#include "integrate.h"
+#include "function.h"
#include "ggc.h"
#include "ira-int.h"
#include "dce.h"
@@ -423,6 +423,8 @@ HARD_REG_SET eliminable_regset;
/* Temporary hard reg set used for a different calculation. */
static HARD_REG_SET temp_hard_regset;
+#define last_mode_for_init_move_cost \
+ (this_target_ira_int->x_last_mode_for_init_move_cost)
/* The function sets up the map IRA_REG_MODE_HARD_REGSET. */
@@ -490,23 +492,6 @@ setup_class_hard_regs (void)
}
}
-/* Set up IRA_AVAILABLE_CLASS_REGS. */
-static void
-setup_available_class_regs (void)
-{
- int i, j;
-
- memset (ira_available_class_regs, 0, sizeof (ira_available_class_regs));
- for (i = 0; i < N_REG_CLASSES; i++)
- {
- COPY_HARD_REG_SET (temp_hard_regset, reg_class_contents[i]);
- AND_COMPL_HARD_REG_SET (temp_hard_regset, no_unit_alloc_regs);
- for (j = 0; j < FIRST_PSEUDO_REGISTER; j++)
- if (TEST_HARD_REG_BIT (temp_hard_regset, j))
- ira_available_class_regs[i]++;
- }
-}
-
/* Set up global variables defining info about hard registers for the
allocation. These depend on USE_HARD_FRAME_P whose TRUE value means
that we can use the hard frame pointer for the allocation. */
@@ -520,7 +505,6 @@ setup_alloc_regs (bool use_hard_frame_p)
if (! use_hard_frame_p)
SET_HARD_REG_BIT (no_unit_alloc_regs, HARD_FRAME_POINTER_REGNUM);
setup_class_hard_regs ();
- setup_available_class_regs ();
}
@@ -799,9 +783,9 @@ setup_pressure_classes (void)
n = 0;
for (cl = 0; cl < N_REG_CLASSES; cl++)
{
- if (ira_available_class_regs[cl] == 0)
+ if (ira_class_hard_regs_num[cl] == 0)
continue;
- if (ira_available_class_regs[cl] != 1
+ if (ira_class_hard_regs_num[cl] != 1
/* A register class without subclasses may contain a few
hard registers and movement between them is costly
(e.g. SPARC FPCC registers). We still should consider it
@@ -986,39 +970,32 @@ setup_allocno_and_important_classes (void)
registers. */
ira_allocno_classes_num = 0;
for (i = 0; (cl = classes[i]) != LIM_REG_CLASSES; i++)
- {
- COPY_HARD_REG_SET (temp_hard_regset, reg_class_contents[cl]);
- AND_COMPL_HARD_REG_SET (temp_hard_regset, no_unit_alloc_regs);
- if (hard_reg_set_empty_p (temp_hard_regset))
- continue;
+ if (ira_class_hard_regs_num[cl] > 0)
ira_allocno_classes[ira_allocno_classes_num++] = (enum reg_class) cl;
- }
ira_important_classes_num = 0;
/* Add non-allocno classes containing to non-empty set of
allocatable hard regs. */
for (cl = 0; cl < N_REG_CLASSES; cl++)
- {
- COPY_HARD_REG_SET (temp_hard_regset, reg_class_contents[cl]);
- AND_COMPL_HARD_REG_SET (temp_hard_regset, no_unit_alloc_regs);
- if (! hard_reg_set_empty_p (temp_hard_regset))
- {
- set_p = false;
- for (j = 0; j < ira_allocno_classes_num; j++)
- {
- COPY_HARD_REG_SET (temp_hard_regset2,
- reg_class_contents[ira_allocno_classes[j]]);
- AND_COMPL_HARD_REG_SET (temp_hard_regset2, no_unit_alloc_regs);
- if ((enum reg_class) cl == ira_allocno_classes[j])
- break;
- else if (hard_reg_set_subset_p (temp_hard_regset,
- temp_hard_regset2))
- set_p = true;
- }
- if (set_p && j >= ira_allocno_classes_num)
- ira_important_classes[ira_important_classes_num++]
- = (enum reg_class) cl;
- }
- }
+ if (ira_class_hard_regs_num[cl] > 0)
+ {
+ COPY_HARD_REG_SET (temp_hard_regset, reg_class_contents[cl]);
+ AND_COMPL_HARD_REG_SET (temp_hard_regset, no_unit_alloc_regs);
+ set_p = false;
+ for (j = 0; j < ira_allocno_classes_num; j++)
+ {
+ COPY_HARD_REG_SET (temp_hard_regset2,
+ reg_class_contents[ira_allocno_classes[j]]);
+ AND_COMPL_HARD_REG_SET (temp_hard_regset2, no_unit_alloc_regs);
+ if ((enum reg_class) cl == ira_allocno_classes[j])
+ break;
+ else if (hard_reg_set_subset_p (temp_hard_regset,
+ temp_hard_regset2))
+ set_p = true;
+ }
+ if (set_p && j >= ira_allocno_classes_num)
+ ira_important_classes[ira_important_classes_num++]
+ = (enum reg_class) cl;
+ }
/* Now add allocno classes to the important classes. */
for (j = 0; j < ira_allocno_classes_num; j++)
ira_important_classes[ira_important_classes_num++]
@@ -1473,100 +1450,103 @@ clarify_prohibited_class_mode_regs (void)
}
}
}
-
-
-/* Allocate and initialize IRA_REGISTER_MOVE_COST,
- IRA_MAX_REGISTER_MOVE_COST, IRA_MAY_MOVE_IN_COST,
- IRA_MAY_MOVE_OUT_COST, IRA_MAX_MAY_MOVE_IN_COST, and
- IRA_MAX_MAY_MOVE_OUT_COST for MODE if it is not done yet. */
+/* Allocate and initialize IRA_REGISTER_MOVE_COST, IRA_MAY_MOVE_IN_COST
+ and IRA_MAY_MOVE_OUT_COST for MODE. */
void
ira_init_register_move_cost (enum machine_mode mode)
{
- int cl1, cl2, cl3;
+ static unsigned short last_move_cost[N_REG_CLASSES][N_REG_CLASSES];
+ bool all_match = true;
+ unsigned int cl1, cl2;
ira_assert (ira_register_move_cost[mode] == NULL
- && ira_max_register_move_cost[mode] == NULL
&& ira_may_move_in_cost[mode] == NULL
- && ira_may_move_out_cost[mode] == NULL
- && ira_max_may_move_in_cost[mode] == NULL
- && ira_max_may_move_out_cost[mode] == NULL);
- if (move_cost[mode] == NULL)
- init_move_cost (mode);
- ira_register_move_cost[mode] = move_cost[mode];
- /* Don't use ira_allocate because the tables exist out of scope of a
- IRA call. */
- ira_max_register_move_cost[mode]
- = (move_table *) xmalloc (sizeof (move_table) * N_REG_CLASSES);
- memcpy (ira_max_register_move_cost[mode], ira_register_move_cost[mode],
- sizeof (move_table) * N_REG_CLASSES);
+ && ira_may_move_out_cost[mode] == NULL);
+ ira_assert (have_regs_of_mode[mode]);
for (cl1 = 0; cl1 < N_REG_CLASSES; cl1++)
- {
- /* Some subclasses are to small to have enough registers to hold
- a value of MODE. Just ignore them. */
- if (ira_reg_class_max_nregs[cl1][mode] > ira_available_class_regs[cl1])
- continue;
- COPY_HARD_REG_SET (temp_hard_regset, reg_class_contents[cl1]);
- AND_COMPL_HARD_REG_SET (temp_hard_regset, no_unit_alloc_regs);
- if (hard_reg_set_empty_p (temp_hard_regset))
- continue;
+ if (contains_reg_of_mode[cl1][mode])
for (cl2 = 0; cl2 < N_REG_CLASSES; cl2++)
- if (hard_reg_set_subset_p (reg_class_contents[cl1],
- reg_class_contents[cl2]))
- for (cl3 = 0; cl3 < N_REG_CLASSES; cl3++)
+ {
+ int cost;
+ if (!contains_reg_of_mode[cl2][mode])
+ cost = 65535;
+ else
{
- if (ira_max_register_move_cost[mode][cl2][cl3]
- < ira_register_move_cost[mode][cl1][cl3])
- ira_max_register_move_cost[mode][cl2][cl3]
- = ira_register_move_cost[mode][cl1][cl3];
- if (ira_max_register_move_cost[mode][cl3][cl2]
- < ira_register_move_cost[mode][cl3][cl1])
- ira_max_register_move_cost[mode][cl3][cl2]
- = ira_register_move_cost[mode][cl3][cl1];
+ cost = register_move_cost (mode, (enum reg_class) cl1,
+ (enum reg_class) cl2);
+ ira_assert (cost < 65535);
}
+ all_match &= (last_move_cost[cl1][cl2] == cost);
+ last_move_cost[cl1][cl2] = cost;
+ }
+ if (all_match && last_mode_for_init_move_cost != -1)
+ {
+ ira_register_move_cost[mode]
+ = ira_register_move_cost[last_mode_for_init_move_cost];
+ ira_may_move_in_cost[mode]
+ = ira_may_move_in_cost[last_mode_for_init_move_cost];
+ ira_may_move_out_cost[mode]
+ = ira_may_move_out_cost[last_mode_for_init_move_cost];
+ return;
}
- ira_may_move_in_cost[mode]
- = (move_table *) xmalloc (sizeof (move_table) * N_REG_CLASSES);
- memcpy (ira_may_move_in_cost[mode], may_move_in_cost[mode],
- sizeof (move_table) * N_REG_CLASSES);
- ira_may_move_out_cost[mode]
- = (move_table *) xmalloc (sizeof (move_table) * N_REG_CLASSES);
- memcpy (ira_may_move_out_cost[mode], may_move_out_cost[mode],
- sizeof (move_table) * N_REG_CLASSES);
- ira_max_may_move_in_cost[mode]
- = (move_table *) xmalloc (sizeof (move_table) * N_REG_CLASSES);
- memcpy (ira_max_may_move_in_cost[mode], ira_max_register_move_cost[mode],
- sizeof (move_table) * N_REG_CLASSES);
- ira_max_may_move_out_cost[mode]
- = (move_table *) xmalloc (sizeof (move_table) * N_REG_CLASSES);
- memcpy (ira_max_may_move_out_cost[mode], ira_max_register_move_cost[mode],
- sizeof (move_table) * N_REG_CLASSES);
+ last_mode_for_init_move_cost = mode;
+ ira_register_move_cost[mode] = XNEWVEC (move_table, N_REG_CLASSES);
+ ira_may_move_in_cost[mode] = XNEWVEC (move_table, N_REG_CLASSES);
+ ira_may_move_out_cost[mode] = XNEWVEC (move_table, N_REG_CLASSES);
for (cl1 = 0; cl1 < N_REG_CLASSES; cl1++)
- {
+ if (contains_reg_of_mode[cl1][mode])
for (cl2 = 0; cl2 < N_REG_CLASSES; cl2++)
{
- COPY_HARD_REG_SET (temp_hard_regset, reg_class_contents[cl2]);
- AND_COMPL_HARD_REG_SET (temp_hard_regset, no_unit_alloc_regs);
- if (hard_reg_set_empty_p (temp_hard_regset))
- continue;
- if (ira_class_subset_p[cl1][cl2])
- ira_may_move_in_cost[mode][cl1][cl2] = 0;
- if (ira_class_subset_p[cl2][cl1])
- ira_may_move_out_cost[mode][cl1][cl2] = 0;
- if (ira_class_subset_p[cl1][cl2])
- ira_max_may_move_in_cost[mode][cl1][cl2] = 0;
- if (ira_class_subset_p[cl2][cl1])
- ira_max_may_move_out_cost[mode][cl1][cl2] = 0;
- ira_register_move_cost[mode][cl1][cl2]
- = ira_max_register_move_cost[mode][cl1][cl2];
- ira_may_move_in_cost[mode][cl1][cl2]
- = ira_max_may_move_in_cost[mode][cl1][cl2];
- ira_may_move_out_cost[mode][cl1][cl2]
- = ira_max_may_move_out_cost[mode][cl1][cl2];
+ int cost;
+ enum reg_class *p1, *p2;
+
+ if (last_move_cost[cl1][cl2] == 65535)
+ {
+ ira_register_move_cost[mode][cl1][cl2] = 65535;
+ ira_may_move_in_cost[mode][cl1][cl2] = 65535;
+ ira_may_move_out_cost[mode][cl1][cl2] = 65535;
+ }
+ else
+ {
+ cost = last_move_cost[cl1][cl2];
+
+ for (p2 = &reg_class_subclasses[cl2][0];
+ *p2 != LIM_REG_CLASSES; p2++)
+ if (ira_class_hard_regs_num[*p2] > 0
+ && (ira_reg_class_max_nregs[*p2][mode]
+ <= ira_class_hard_regs_num[*p2]))
+ cost = MAX (cost, ira_register_move_cost[mode][cl1][*p2]);
+
+ for (p1 = &reg_class_subclasses[cl1][0];
+ *p1 != LIM_REG_CLASSES; p1++)
+ if (ira_class_hard_regs_num[*p1] > 0
+ && (ira_reg_class_max_nregs[*p1][mode]
+ <= ira_class_hard_regs_num[*p1]))
+ cost = MAX (cost, ira_register_move_cost[mode][*p1][cl2]);
+
+ ira_assert (cost <= 65535);
+ ira_register_move_cost[mode][cl1][cl2] = cost;
+
+ if (ira_class_subset_p[cl1][cl2])
+ ira_may_move_in_cost[mode][cl1][cl2] = 0;
+ else
+ ira_may_move_in_cost[mode][cl1][cl2] = cost;
+
+ if (ira_class_subset_p[cl2][cl1])
+ ira_may_move_out_cost[mode][cl1][cl2] = 0;
+ else
+ ira_may_move_out_cost[mode][cl1][cl2] = cost;
+ }
+ }
+ else
+ for (cl2 = 0; cl2 < N_REG_CLASSES; cl2++)
+ {
+ ira_register_move_cost[mode][cl1][cl2] = 65535;
+ ira_may_move_in_cost[mode][cl1][cl2] = 65535;
+ ira_may_move_out_cost[mode][cl1][cl2] = 65535;
}
- }
}
-
/* This is called once during compiler work. It sets up
@@ -1575,42 +1555,37 @@ ira_init_register_move_cost (enum machine_mode mode)
void
ira_init_once (void)
{
- int mode;
-
- for (mode = 0; mode < MAX_MACHINE_MODE; mode++)
- {
- ira_register_move_cost[mode] = NULL;
- ira_max_register_move_cost[mode] = NULL;
- ira_may_move_in_cost[mode] = NULL;
- ira_may_move_out_cost[mode] = NULL;
- ira_max_may_move_in_cost[mode] = NULL;
- ira_max_may_move_out_cost[mode] = NULL;
- }
ira_init_costs_once ();
}
-/* Free ira_max_register_move_cost, ira_may_move_in_cost,
- ira_may_move_out_cost, ira_max_may_move_in_cost, and
- ira_max_may_move_out_cost for each mode. */
+/* Free ira_max_register_move_cost, ira_may_move_in_cost and
+ ira_may_move_out_cost for each mode. */
static void
free_register_move_costs (void)
{
- int mode;
+ int mode, i;
+ /* Reset move_cost and friends, making sure we only free shared
+ table entries once. */
for (mode = 0; mode < MAX_MACHINE_MODE; mode++)
- {
- free (ira_max_register_move_cost[mode]);
- free (ira_may_move_in_cost[mode]);
- free (ira_may_move_out_cost[mode]);
- free (ira_max_may_move_in_cost[mode]);
- free (ira_max_may_move_out_cost[mode]);
- ira_register_move_cost[mode] = NULL;
- ira_max_register_move_cost[mode] = NULL;
- ira_may_move_in_cost[mode] = NULL;
- ira_may_move_out_cost[mode] = NULL;
- ira_max_may_move_in_cost[mode] = NULL;
- ira_max_may_move_out_cost[mode] = NULL;
- }
+ if (ira_register_move_cost[mode])
+ {
+ for (i = 0;
+ i < mode && (ira_register_move_cost[i]
+ != ira_register_move_cost[mode]);
+ i++)
+ ;
+ if (i == mode)
+ {
+ free (ira_register_move_cost[mode]);
+ free (ira_may_move_in_cost[mode]);
+ free (ira_may_move_out_cost[mode]);
+ }
+ }
+ memset (ira_register_move_cost, 0, sizeof ira_register_move_cost);
+ memset (ira_may_move_in_cost, 0, sizeof ira_may_move_in_cost);
+ memset (ira_may_move_out_cost, 0, sizeof ira_may_move_out_cost);
+ last_mode_for_init_move_cost = -1;
}
/* This is called every time when register related information is
@@ -4034,7 +4009,55 @@ move_unallocated_pseudos (void)
}
}
+/* If the backend knows where to allocate pseudos for hard
+ register initial values, register these allocations now. */
+static void
+allocate_initial_values (void)
+{
+ if (targetm.allocate_initial_value)
+ {
+ rtx hreg, preg, x;
+ int i, regno;
+
+ for (i = 0; HARD_REGISTER_NUM_P (i); i++)
+ {
+ if (! initial_value_entry (i, &hreg, &preg))
+ break;
+ x = targetm.allocate_initial_value (hreg);
+ regno = REGNO (preg);
+ if (x && REG_N_SETS (regno) <= 1)
+ {
+ if (MEM_P (x))
+ reg_equiv_memory_loc (regno) = x;
+ else
+ {
+ basic_block bb;
+ int new_regno;
+
+ gcc_assert (REG_P (x));
+ new_regno = REGNO (x);
+ reg_renumber[regno] = new_regno;
+ /* Poke the regno right into regno_reg_rtx so that even
+ fixed regs are accepted. */
+ SET_REGNO (preg, new_regno);
+ /* Update global register liveness information. */
+ FOR_EACH_BB (bb)
+ {
+ if (REGNO_REG_SET_P(df_get_live_in (bb), regno))
+ SET_REGNO_REG_SET (df_get_live_in (bb), new_regno);
+ if (REGNO_REG_SET_P(df_get_live_out (bb), regno))
+ SET_REGNO_REG_SET (df_get_live_out (bb), new_regno);
+ }
+ }
+ }
+ }
+
+ gcc_checking_assert (! initial_value_entry (FIRST_PSEUDO_REGISTER,
+ &hreg, &preg));
+ }
+}
+
/* All natural loops. */
struct loops ira_loops;
@@ -4239,7 +4262,7 @@ ira (FILE *f)
memset (ira_spilled_reg_stack_slots, 0,
max_regno * sizeof (struct ira_spilled_reg_stack_slot));
}
- allocate_initial_values (reg_equivs);
+ allocate_initial_values ();
/* See comment for find_moveable_pseudos call. */
if (ira_conflicts_p)
diff --git a/gcc/ira.h b/gcc/ira.h
index 60518ecb313..d53db4e0cee 100644
--- a/gcc/ira.h
+++ b/gcc/ira.h
@@ -25,10 +25,6 @@ along with GCC; see the file COPYING3. If not see
extern bool ira_conflicts_p;
struct target_ira {
- /* Number of given class hard registers available for the register
- allocation for given classes. */
- int x_ira_available_class_regs[N_REG_CLASSES];
-
/* Map: hard register number -> allocno class it belongs to. If the
corresponding class is NO_REGS, the hard register is not available
for allocation. */
@@ -95,8 +91,6 @@ extern struct target_ira *this_target_ira;
#define this_target_ira (&default_target_ira)
#endif
-#define ira_available_class_regs \
- (this_target_ira->x_ira_available_class_regs)
#define ira_hard_regno_allocno_class \
(this_target_ira->x_ira_hard_regno_allocno_class)
#define ira_allocno_classes_num \
diff --git a/gcc/langhooks.c b/gcc/langhooks.c
index abadba5b36e..5e8afbfa6ab 100644
--- a/gcc/langhooks.c
+++ b/gcc/langhooks.c
@@ -30,7 +30,6 @@ along with GCC; see the file COPYING3. If not see
#include "gimple.h"
#include "rtl.h"
#include "insn-config.h"
-#include "integrate.h"
#include "flags.h"
#include "langhooks.h"
#include "target.h"
diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c
index b69254b2daa..34295a01586 100644
--- a/gcc/loop-invariant.c
+++ b/gcc/loop-invariant.c
@@ -1210,7 +1210,7 @@ gain_for_invariant (struct invariant *inv, unsigned *regs_needed,
+ (int) regs_needed[pressure_class]
+ LOOP_DATA (curr_loop)->max_reg_pressure[pressure_class]
+ IRA_LOOP_RESERVED_REGS
- > ira_available_class_regs[pressure_class])
+ > ira_class_hard_regs_num[pressure_class])
break;
}
if (i < ira_pressure_classes_num)
diff --git a/gcc/lto-streamer.c b/gcc/lto-streamer.c
index e3ccb79d813..7649a78052a 100644
--- a/gcc/lto-streamer.c
+++ b/gcc/lto-streamer.c
@@ -39,7 +39,7 @@ along with GCC; see the file COPYING3. If not see
/* Statistics gathered during LTO, WPA and LTRANS. */
struct lto_stats_d lto_stats;
-/* LTO uses bitmaps with different life-times. So use a seperate
+/* LTO uses bitmaps with different life-times. So use a separate
obstack for all LTO bitmaps. */
static bitmap_obstack lto_obstack;
static bool lto_obstack_initialized;
diff --git a/gcc/lto-streamer.h b/gcc/lto-streamer.h
index 5c2f4eaac06..5c7bdd281d3 100644
--- a/gcc/lto-streamer.h
+++ b/gcc/lto-streamer.h
@@ -300,7 +300,7 @@ typedef const char* (lto_get_section_data_f) (struct lto_file_decl_data *,
/* Return the data found from the above call. The first three
parameters are the same as above. The fourth parameter is the data
- itself and the fifth is the lenght of the data. */
+ itself and the fifth is the length of the data. */
typedef void (lto_free_section_data_f) (struct lto_file_decl_data *,
enum lto_section_type,
const char *,
@@ -987,7 +987,7 @@ lto_init_tree_ref_encoder (struct lto_tree_ref_encoder *encoder,
}
-/* Destory an lto_tree_ref_encoder ENCODER by freeing its contents. The
+/* Destroy an lto_tree_ref_encoder ENCODER by freeing its contents. The
memory used by ENCODER is not freed by this function. */
static inline void
lto_destroy_tree_ref_encoder (struct lto_tree_ref_encoder *encoder)
diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
index b656db251fa..1f4d2128d94 100644
--- a/gcc/lto-wrapper.c
+++ b/gcc/lto-wrapper.c
@@ -727,7 +727,7 @@ run_gcc (unsigned argc, char *argv[])
obstack_ptr_grow (&argv_obstack, "-fwpa");
}
- /* Append the input objects and possible preceeding arguments. */
+ /* Append the input objects and possible preceding arguments. */
for (i = 1; i < argc; ++i)
obstack_ptr_grow (&argv_obstack, argv[i]);
obstack_ptr_grow (&argv_obstack, NULL);
diff --git a/gcc/matrix-reorg.c b/gcc/matrix-reorg.c
index 72a6a71af05..8395dd2beae 100644
--- a/gcc/matrix-reorg.c
+++ b/gcc/matrix-reorg.c
@@ -1914,7 +1914,6 @@ transform_access_sites (void **slot, void *data ATTRIBUTE_UNUSED)
num_elements =
fold_build2 (MULT_EXPR, sizetype, fold_convert (sizetype, acc_info->index),
fold_convert (sizetype, d_size));
- add_referenced_var (d_size);
gsi = gsi_for_stmt (acc_info->stmt);
tmp1 = force_gimple_operand_gsi (&gsi, num_elements, true,
NULL, true, GSI_SAME_STMT);
diff --git a/gcc/mcf.c b/gcc/mcf.c
index af993fba057..6a09244fa98 100644
--- a/gcc/mcf.c
+++ b/gcc/mcf.c
@@ -1385,7 +1385,7 @@ sum_edge_counts (VEC (edge, gc) *to_edges)
}
-/* Main routine. Smoothes the intial assigned basic block and edge counts using
+/* Main routine. Smoothes the initial assigned basic block and edge counts using
a minimum cost flow algorithm, to ensure that the flow consistency rule is
obeyed: sum of outgoing edges = sum of incoming edges for each basic
block. */
diff --git a/gcc/mode-switching.c b/gcc/mode-switching.c
index 7ea241cea7b..d03430aef82 100644
--- a/gcc/mode-switching.c
+++ b/gcc/mode-switching.c
@@ -445,7 +445,7 @@ optimize_mode_switching (void)
int i, j;
int n_entities;
int max_num_modes = 0;
- bool emited ATTRIBUTE_UNUSED = false;
+ bool emitted ATTRIBUTE_UNUSED = false;
basic_block post_entry ATTRIBUTE_UNUSED, pre_exit ATTRIBUTE_UNUSED;
for (e = N_ENTITIES - 1, n_entities = 0; e >= 0; e--)
@@ -704,7 +704,7 @@ optimize_mode_switching (void)
/* Insert MODE_SET only if it is nonempty. */
if (mode_set != NULL_RTX)
{
- emited = true;
+ emitted = true;
if (NOTE_INSN_BASIC_BLOCK_P (ptr->insn_ptr))
emit_insn_after (mode_set, ptr->insn_ptr);
else
@@ -731,7 +731,7 @@ optimize_mode_switching (void)
#if defined (MODE_ENTRY) && defined (MODE_EXIT)
cleanup_cfg (CLEANUP_NO_INSN_DEL);
#else
- if (!need_commit && !emited)
+ if (!need_commit && !emitted)
return 0;
#endif
diff --git a/gcc/modulo-sched.c b/gcc/modulo-sched.c
index b1b1af33b26..3dc87294bb6 100644
--- a/gcc/modulo-sched.c
+++ b/gcc/modulo-sched.c
@@ -322,7 +322,7 @@ ps_rtl_insn (partial_schedule_ptr ps, int id)
return ps_reg_move (ps, id)->insn;
}
-/* Partial schedule instruction ID, which belongs to PS, occured in
+/* Partial schedule instruction ID, which belongs to PS, occurred in
the original (unscheduled) loop. Return the first instruction
in the loop that was associated with ps_rtl_insn (PS, ID).
If the instruction had some notes before it, this is the first
diff --git a/gcc/output.h b/gcc/output.h
index f58a4e934d1..0cc0a0dcfa1 100644
--- a/gcc/output.h
+++ b/gcc/output.h
@@ -187,6 +187,7 @@ extern int decode_reg_name (const char *);
extern int decode_reg_name_and_count (const char *, int *);
extern void assemble_alias (tree, tree);
+extern void do_assemble_alias (tree, tree);
extern void default_assemble_visibility (tree, int);
diff --git a/gcc/passes.c b/gcc/passes.c
index c57e08aa2fa..391da25d384 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -54,7 +54,6 @@ along with GCC; see the file COPYING3. If not see
#include "params.h"
#include "reload.h"
#include "dwarf2asm.h"
-#include "integrate.h"
#include "debug.h"
#include "target.h"
#include "langhooks.h"
diff --git a/gcc/plugin.c b/gcc/plugin.c
index 63d1cae4ede..1f56fa2f38b 100644
--- a/gcc/plugin.c
+++ b/gcc/plugin.c
@@ -865,7 +865,7 @@ get_event_last (void)
/* Retrieve the default plugin directory. The gcc driver should have passed
- it as -iplugindir <dir> to the cc1 program, and it is queriable thru the
+ it as -iplugindir <dir> to the cc1 program, and it is queriable through the
-print-file-name=plugin option to gcc. */
const char*
default_plugin_dir_name (void)
diff --git a/gcc/postreload.c b/gcc/postreload.c
index 7f333063e19..e1ec874dd6a 100644
--- a/gcc/postreload.c
+++ b/gcc/postreload.c
@@ -683,7 +683,7 @@ struct reg_use
/* Points to the memory reference enclosing the use, if any, NULL_RTX
otherwise. */
rtx containing_mem;
- /* Location of the register withing INSN. */
+ /* Location of the register within INSN. */
rtx *usep;
/* The reverse uid of the insn. */
int ruid;
diff --git a/gcc/recog.c b/gcc/recog.c
index c5725d2abdf..d6645942cc7 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -2792,14 +2792,16 @@ bool
reg_fits_class_p (const_rtx operand, reg_class_t cl, int offset,
enum machine_mode mode)
{
- int regno = REGNO (operand);
+ unsigned int regno = REGNO (operand);
if (cl == NO_REGS)
return false;
+ /* Regno must not be a pseudo register. Offset may be negative. */
return (HARD_REGISTER_NUM_P (regno)
- && in_hard_reg_set_p (reg_class_contents[(int) cl],
- mode, regno + offset));
+ && HARD_REGISTER_NUM_P (regno + offset)
+ && in_hard_reg_set_p (reg_class_contents[(int) cl], mode,
+ regno + offset));
}
/* Split single instruction. Helper function for split_all_insns and
diff --git a/gcc/reginfo.c b/gcc/reginfo.c
index f3a08f523c2..4fa0d04ce9c 100644
--- a/gcc/reginfo.c
+++ b/gcc/reginfo.c
@@ -122,9 +122,6 @@ static const char *const initial_reg_names[] = REGISTER_NAMES;
/* Array containing all of the register class names. */
const char * reg_class_names[] = REG_CLASS_NAMES;
-#define last_mode_for_init_move_cost \
- (this_target_regs->x_last_mode_for_init_move_cost)
-
/* No more global register variables may be declared; true once
reginfo has been initialized. */
static int no_global_reg_vars = 0;
@@ -197,95 +194,6 @@ init_reg_sets (void)
SET_HARD_REG_SET (operand_reg_set);
}
-/* Initialize may_move_cost and friends for mode M. */
-void
-init_move_cost (enum machine_mode m)
-{
- static unsigned short last_move_cost[N_REG_CLASSES][N_REG_CLASSES];
- bool all_match = true;
- unsigned int i, j;
-
- gcc_assert (have_regs_of_mode[m]);
- for (i = 0; i < N_REG_CLASSES; i++)
- if (contains_reg_of_mode[i][m])
- for (j = 0; j < N_REG_CLASSES; j++)
- {
- int cost;
- if (!contains_reg_of_mode[j][m])
- cost = 65535;
- else
- {
- cost = register_move_cost (m, (enum reg_class) i,
- (enum reg_class) j);
- gcc_assert (cost < 65535);
- }
- all_match &= (last_move_cost[i][j] == cost);
- last_move_cost[i][j] = cost;
- }
- if (all_match && last_mode_for_init_move_cost != -1)
- {
- move_cost[m] = move_cost[last_mode_for_init_move_cost];
- may_move_in_cost[m] = may_move_in_cost[last_mode_for_init_move_cost];
- may_move_out_cost[m] = may_move_out_cost[last_mode_for_init_move_cost];
- return;
- }
- last_mode_for_init_move_cost = m;
- move_cost[m] = (move_table *)xmalloc (sizeof (move_table)
- * N_REG_CLASSES);
- may_move_in_cost[m] = (move_table *)xmalloc (sizeof (move_table)
- * N_REG_CLASSES);
- may_move_out_cost[m] = (move_table *)xmalloc (sizeof (move_table)
- * N_REG_CLASSES);
- for (i = 0; i < N_REG_CLASSES; i++)
- if (contains_reg_of_mode[i][m])
- for (j = 0; j < N_REG_CLASSES; j++)
- {
- int cost;
- enum reg_class *p1, *p2;
-
- if (last_move_cost[i][j] == 65535)
- {
- move_cost[m][i][j] = 65535;
- may_move_in_cost[m][i][j] = 65535;
- may_move_out_cost[m][i][j] = 65535;
- }
- else
- {
- cost = last_move_cost[i][j];
-
- for (p2 = &reg_class_subclasses[j][0];
- *p2 != LIM_REG_CLASSES; p2++)
- if (*p2 != i && contains_reg_of_mode[*p2][m])
- cost = MAX (cost, move_cost[m][i][*p2]);
-
- for (p1 = &reg_class_subclasses[i][0];
- *p1 != LIM_REG_CLASSES; p1++)
- if (*p1 != j && contains_reg_of_mode[*p1][m])
- cost = MAX (cost, move_cost[m][*p1][j]);
-
- gcc_assert (cost <= 65535);
- move_cost[m][i][j] = cost;
-
- if (reg_class_subset_p ((enum reg_class) i, (enum reg_class) j))
- may_move_in_cost[m][i][j] = 0;
- else
- may_move_in_cost[m][i][j] = cost;
-
- if (reg_class_subset_p ((enum reg_class) j, (enum reg_class) i))
- may_move_out_cost[m][i][j] = 0;
- else
- may_move_out_cost[m][i][j] = cost;
- }
- }
- else
- for (j = 0; j < N_REG_CLASSES; j++)
- {
- move_cost[m][i][j] = 65535;
- may_move_in_cost[m][i][j] = 65535;
- may_move_out_cost[m][i][j] = 65535;
- }
-}
-
/* We need to save copies of some of the register information which
can be munged by command-line switches so we can restore it during
subsequent back-end reinitialization. */
@@ -575,25 +483,6 @@ init_reg_sets_1 (void)
have_regs_of_mode [m] = 1;
}
}
-
- /* Reset move_cost and friends, making sure we only free shared
- table entries once. */
- for (i = 0; i < MAX_MACHINE_MODE; i++)
- if (move_cost[i])
- {
- for (j = 0; j < i && move_cost[i] != move_cost[j]; j++)
- ;
- if (i == j)
- {
- free (move_cost[i]);
- free (may_move_in_cost[i]);
- free (may_move_out_cost[i]);
- }
- }
- memset (move_cost, 0, sizeof move_cost);
- memset (may_move_in_cost, 0, sizeof may_move_in_cost);
- memset (may_move_out_cost, 0, sizeof may_move_out_cost);
- last_mode_for_init_move_cost = -1;
}
/* Compute the table of register modes.
diff --git a/gcc/regs.h b/gcc/regs.h
index 328b839ffac..24f410c6b07 100644
--- a/gcc/regs.h
+++ b/gcc/regs.h
@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "machmode.h"
#include "hard-reg-set.h"
+#include "rtl.h"
#define REG_BYTES(R) mode_size[(int) GET_MODE (R)]
@@ -239,8 +240,6 @@ extern int caller_save_needed;
#define HARD_REGNO_CALL_PART_CLOBBERED(REGNO, MODE) 0
#endif
-typedef unsigned short move_table[N_REG_CLASSES];
-
/* Target-dependent globals. */
struct target_regs {
/* For each starting hard register, the number of consecutive hard
@@ -260,21 +259,6 @@ struct target_regs {
/* 1 if the corresponding class contains a register of the given mode. */
char x_contains_reg_of_mode[N_REG_CLASSES][MAX_MACHINE_MODE];
- /* Maximum cost of moving from a register in one class to a register
- in another class. Based on TARGET_REGISTER_MOVE_COST. */
- move_table *x_move_cost[MAX_MACHINE_MODE];
-
- /* Similar, but here we don't have to move if the first index is a
- subset of the second so in that case the cost is zero. */
- move_table *x_may_move_in_cost[MAX_MACHINE_MODE];
-
- /* Similar, but here we don't have to move if the first index is a
- superset of the second so in that case the cost is zero. */
- move_table *x_may_move_out_cost[MAX_MACHINE_MODE];
-
- /* Keep track of the last mode we initialized move costs for. */
- int x_last_mode_for_init_move_cost;
-
/* Record for each mode whether we can move a register directly to or
from an object of that mode in memory. If we can't, we won't try
to use that mode directly when accessing a field of that mode. */
@@ -300,12 +284,6 @@ extern struct target_regs *this_target_regs;
(this_target_regs->x_have_regs_of_mode)
#define contains_reg_of_mode \
(this_target_regs->x_contains_reg_of_mode)
-#define move_cost \
- (this_target_regs->x_move_cost)
-#define may_move_in_cost \
- (this_target_regs->x_may_move_in_cost)
-#define may_move_out_cost \
- (this_target_regs->x_may_move_out_cost)
#define direct_load \
(this_target_regs->x_direct_load)
#define direct_store \
@@ -367,10 +345,16 @@ in_hard_reg_set_p (const HARD_REG_SET regs, enum machine_mode mode,
{
unsigned int end_regno;
+ gcc_assert (HARD_REGISTER_NUM_P (regno));
+
if (!TEST_HARD_REG_BIT (regs, regno))
return false;
end_regno = end_hard_regno (mode, regno);
+
+ if (!HARD_REGISTER_NUM_P (end_regno - 1))
+ return false;
+
while (++regno < end_regno)
if (!TEST_HARD_REG_BIT (regs, regno))
return false;
diff --git a/gcc/reload.h b/gcc/reload.h
index f747099abed..29d15ea75ae 100644
--- a/gcc/reload.h
+++ b/gcc/reload.h
@@ -460,9 +460,5 @@ extern void debug_reload (void);
reloading to/from a register that is wider than a word. */
extern rtx reload_adjust_reg_for_mode (rtx, enum machine_mode);
-/* Ideally this function would be in ira.c or reload, but due to dependencies
- on integrate.h, it's part of integrate.c. */
-extern void allocate_initial_values (VEC (reg_equivs_t, gc) *);
-
/* Allocate or grow the reg_equiv tables, initializing new entries to 0. */
extern void grow_reg_equivs (void);
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 6f7aabc32c2..1d71971335a 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1730,10 +1730,9 @@ extern rtx assign_stack_local (enum machine_mode, HOST_WIDE_INT, int);
#define ASLK_REDUCE_ALIGN 1
#define ASLK_RECORD_PAD 2
extern rtx assign_stack_local_1 (enum machine_mode, HOST_WIDE_INT, int, int);
-extern rtx assign_stack_temp (enum machine_mode, HOST_WIDE_INT, int);
-extern rtx assign_stack_temp_for_type (enum machine_mode,
- HOST_WIDE_INT, int, tree);
-extern rtx assign_temp (tree, int, int, int);
+extern rtx assign_stack_temp (enum machine_mode, HOST_WIDE_INT);
+extern rtx assign_stack_temp_for_type (enum machine_mode, HOST_WIDE_INT, tree);
+extern rtx assign_temp (tree, int, int);
/* In emit-rtl.c */
extern rtx emit_insn_before (rtx, rtx);
@@ -2045,8 +2044,6 @@ extern rtx remove_free_EXPR_LIST_node (rtx *);
/* reginfo.c */
-/* Initialize may_move_cost and friends for mode M. */
-extern void init_move_cost (enum machine_mode);
/* Resize reg info. */
extern bool resize_reg_info (void);
/* Free up register info memory. */
@@ -2498,7 +2495,6 @@ extern void print_inline_rtx (FILE *, const_rtx, int);
extern void reposition_prologue_and_epilogue_notes (void);
extern int prologue_epilogue_contains (const_rtx);
extern int sibcall_epilogue_contains (const_rtx);
-extern void mark_temp_addr_taken (rtx);
extern void update_temp_slot_address (rtx, rtx);
extern void maybe_copy_prologue_epilogue_insn (rtx, rtx);
extern void set_return_jump_label (rtx);
diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c
index fece83ec393..b92ba9b9334 100644
--- a/gcc/sched-deps.c
+++ b/gcc/sched-deps.c
@@ -1583,8 +1583,8 @@ add_dependence_list_and_free (struct deps_desc *deps, rtx insn, rtx *listp,
}
}
-/* Remove all occurences of INSN from LIST. Return the number of
- occurences removed. */
+/* Remove all occurrences of INSN from LIST. Return the number of
+ occurrences removed. */
static int
remove_from_dependence_list (rtx insn, rtx* listp)
@@ -2798,7 +2798,7 @@ sched_analyze_insn (struct deps_desc *deps, rtx x, rtx insn)
&& code == SET);
if (may_trap_p (x))
- /* Avoid moving trapping instructions accross function calls that might
+ /* Avoid moving trapping instructions across function calls that might
not always return. */
add_dependence_list (insn, deps->last_function_call_may_noreturn,
1, REG_DEP_ANTI);
diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c
index c53d2e1a8e9..23f99f42e19 100644
--- a/gcc/sel-sched-ir.c
+++ b/gcc/sel-sched-ir.c
@@ -5044,7 +5044,7 @@ find_place_to_insert_bb (basic_block bb, int rgn)
break;
}
- /* We skipped the right block, so we increase i. We accomodate
+ /* We skipped the right block, so we increase i. We accommodate
it for increasing by step later, so we decrease i. */
return (i + 1) - 1;
}
diff --git a/gcc/sel-sched-ir.h b/gcc/sel-sched-ir.h
index c454887f16a..20035527597 100644
--- a/gcc/sel-sched-ir.h
+++ b/gcc/sel-sched-ir.h
@@ -874,7 +874,7 @@ typedef struct
{
/* For each bb header this field contains a set of live registers.
For all other insns this field has a NULL.
- We also need to know LV sets for the instructions, that are immediatly
+ We also need to know LV sets for the instructions, that are immediately
after the border of the region. */
regset lv_set;
@@ -987,7 +987,7 @@ typedef struct
short flags;
/* When flags include SUCCS_ALL, this will be set to the exact type
- of the sucessor we're traversing now. */
+ of the successor we're traversing now. */
short current_flags;
/* If skip to loop exits, save here information about loop exits. */
diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c
index 6fef60ea0ac..cfecd6bc148 100644
--- a/gcc/sel-sched.c
+++ b/gcc/sel-sched.c
@@ -285,7 +285,7 @@ struct rtx_search_arg
/* What we are searching for. */
rtx x;
- /* The occurence counter. */
+ /* The occurrence counter. */
int n;
};
@@ -733,7 +733,7 @@ can_substitute_through_p (insn_t insn, ds_t ds)
return false;
}
-/* Substitute all occurences of INSN's destination in EXPR' vinsn with INSN's
+/* Substitute all occurrences of INSN's destination in EXPR' vinsn with INSN's
source (if INSN is eligible for substitution). Returns TRUE if
substitution was actually performed, FALSE otherwise. Substitution might
be not performed because it's either EXPR' vinsn doesn't contain INSN's
@@ -4138,7 +4138,7 @@ invoke_reorder_hooks (fence_t fence)
return issue_more;
}
-/* Return an EXPR correponding to INDEX element of ready list, if
+/* Return an EXPR corresponding to INDEX element of ready list, if
FOLLOW_READY_ELEMENT is true (i.e., an expr of
ready_element (&ready, INDEX) will be returned), and to INDEX element of
ready.vec otherwise. */
diff --git a/gcc/sese.c b/gcc/sese.c
index 492667e26e6..d664403a52c 100644
--- a/gcc/sese.c
+++ b/gcc/sese.c
@@ -133,7 +133,7 @@ eq_ivtype_map_elts (const void *e1, const void *e2)
-/* Record LOOP as occuring in REGION. */
+/* Record LOOP as occurring in REGION. */
static void
sese_record_loop (sese region, loop_p loop)
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 6b0d56ed3ea..6b645fe027c 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -1,7 +1,7 @@
/* RTL simplification functions for GNU compiler.
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
- 2011 Free Software Foundation, Inc.
+ 2011, 2012 Free Software Foundation, Inc.
This file is part of GCC.
@@ -3242,6 +3242,27 @@ simplify_binary_operation_1 (enum rtx_code code, enum machine_mode mode,
return gen_rtx_CONST_VECTOR (mode, v);
}
+
+ /* If we build {a,b} then permute it, build the result directly. */
+ if (XVECLEN (trueop1, 0) == 2
+ && CONST_INT_P (XVECEXP (trueop1, 0, 0))
+ && CONST_INT_P (XVECEXP (trueop1, 0, 1))
+ && GET_CODE (trueop0) == VEC_CONCAT
+ && GET_CODE (XEXP (trueop0, 0)) == VEC_CONCAT
+ && GET_MODE (XEXP (trueop0, 0)) == mode
+ && GET_CODE (XEXP (trueop0, 1)) == VEC_CONCAT
+ && GET_MODE (XEXP (trueop0, 1)) == mode)
+ {
+ unsigned int i0 = INTVAL (XVECEXP (trueop1, 0, 0));
+ unsigned int i1 = INTVAL (XVECEXP (trueop1, 0, 1));
+ rtx subop0, subop1;
+
+ gcc_assert (i0 < 4 && i1 < 4);
+ subop0 = XEXP (XEXP (trueop0, i0 / 2), i0 % 2);
+ subop1 = XEXP (XEXP (trueop0, i1 / 2), i1 % 2);
+
+ return simplify_gen_binary (VEC_CONCAT, mode, subop0, subop1);
+ }
}
if (XVECLEN (trueop1, 0) == 1
diff --git a/gcc/stmt.c b/gcc/stmt.c
index dd34890d462..4ad4d0f1e59 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -827,7 +827,7 @@ expand_asm_operands (tree string, tree outputs, tree inputs,
}
else
{
- op = assign_temp (type, 0, 0, 1);
+ op = assign_temp (type, 0, 1);
op = validize_mem (op);
if (!MEM_P (op) && TREE_CODE (TREE_VALUE (tail)) == SSA_NAME)
set_reg_attrs_for_decl_rtl (SSA_NAME_VAR (TREE_VALUE (tail)), op);
@@ -910,31 +910,7 @@ expand_asm_operands (tree string, tree outputs, tree inputs,
at this point. Ignore it: clearly this *is* a memory. */
}
else
- {
- warning (0, "use of memory input without lvalue in "
- "asm operand %d is deprecated", i + noutputs);
-
- if (CONSTANT_P (op))
- {
- rtx mem = force_const_mem (TYPE_MODE (type), op);
- if (mem)
- op = validize_mem (mem);
- else
- op = force_reg (TYPE_MODE (type), op);
- }
- if (REG_P (op)
- || GET_CODE (op) == SUBREG
- || GET_CODE (op) == CONCAT)
- {
- tree qual_type = build_qualified_type (type,
- (TYPE_QUALS (type)
- | TYPE_QUAL_CONST));
- rtx memloc = assign_temp (qual_type, 1, 1, 1);
- memloc = validize_mem (memloc);
- emit_move_insn (memloc, op);
- op = memloc;
- }
- }
+ gcc_unreachable ();
}
generating_concat_p = old_generating_concat_p;
@@ -1603,7 +1579,7 @@ expand_return (tree retval)
tree ot = TREE_TYPE (DECL_RESULT (current_function_decl));
tree nt = build_qualified_type (ot, TYPE_QUALS (ot) | TYPE_QUAL_CONST);
- val = assign_temp (nt, 0, 0, 1);
+ val = assign_temp (nt, 0, 1);
val = expand_expr (retval_rhs, val, GET_MODE (val), EXPAND_NORMAL);
val = force_not_mem (val);
/* Return the calculated value. */
@@ -1689,111 +1665,6 @@ expand_nl_goto_receiver (void)
emit_insn (gen_blockage ());
}
-/* Generate RTL for the automatic variable declaration DECL.
- (Other kinds of declarations are simply ignored if seen here.) */
-
-void
-expand_decl (tree decl)
-{
- tree type;
-
- type = TREE_TYPE (decl);
-
- /* For a CONST_DECL, set mode, alignment, and sizes from those of the
- type in case this node is used in a reference. */
- if (TREE_CODE (decl) == CONST_DECL)
- {
- DECL_MODE (decl) = TYPE_MODE (type);
- DECL_ALIGN (decl) = TYPE_ALIGN (type);
- DECL_SIZE (decl) = TYPE_SIZE (type);
- DECL_SIZE_UNIT (decl) = TYPE_SIZE_UNIT (type);
- return;
- }
-
- /* Otherwise, only automatic variables need any expansion done. Static and
- external variables, and external functions, will be handled by
- `assemble_variable' (called from finish_decl). TYPE_DECL requires
- nothing. PARM_DECLs are handled in `assign_parms'. */
- if (TREE_CODE (decl) != VAR_DECL)
- return;
-
- if (TREE_STATIC (decl) || DECL_EXTERNAL (decl))
- return;
-
- /* Create the RTL representation for the variable. */
-
- if (type == error_mark_node)
- SET_DECL_RTL (decl, gen_rtx_MEM (BLKmode, const0_rtx));
-
- else if (DECL_SIZE (decl) == 0)
- {
- /* Variable with incomplete type. */
- rtx x;
- if (DECL_INITIAL (decl) == 0)
- /* Error message was already done; now avoid a crash. */
- x = gen_rtx_MEM (BLKmode, const0_rtx);
- else
- /* An initializer is going to decide the size of this array.
- Until we know the size, represent its address with a reg. */
- x = gen_rtx_MEM (BLKmode, gen_reg_rtx (Pmode));
-
- set_mem_attributes (x, decl, 1);
- SET_DECL_RTL (decl, x);
- }
- else if (use_register_for_decl (decl))
- {
- /* Automatic variable that can go in a register. */
- enum machine_mode reg_mode = promote_decl_mode (decl, NULL);
-
- SET_DECL_RTL (decl, gen_reg_rtx (reg_mode));
-
- /* Note if the object is a user variable. */
- if (!DECL_ARTIFICIAL (decl))
- mark_user_reg (DECL_RTL (decl));
-
- if (POINTER_TYPE_P (type))
- mark_reg_pointer (DECL_RTL (decl),
- TYPE_ALIGN (TREE_TYPE (TREE_TYPE (decl))));
- }
-
- else
- {
- rtx oldaddr = 0;
- rtx addr;
- rtx x;
-
- /* Variable-sized decls are dealt with in the gimplifier. */
- gcc_assert (TREE_CODE (DECL_SIZE_UNIT (decl)) == INTEGER_CST);
-
- /* If we previously made RTL for this decl, it must be an array
- whose size was determined by the initializer.
- The old address was a register; set that register now
- to the proper address. */
- if (DECL_RTL_SET_P (decl))
- {
- gcc_assert (MEM_P (DECL_RTL (decl)));
- gcc_assert (REG_P (XEXP (DECL_RTL (decl), 0)));
- oldaddr = XEXP (DECL_RTL (decl), 0);
- }
-
- /* Set alignment we actually gave this decl. */
- DECL_ALIGN (decl) = (DECL_MODE (decl) == BLKmode ? BIGGEST_ALIGNMENT
- : GET_MODE_BITSIZE (DECL_MODE (decl)));
- DECL_USER_ALIGN (decl) = 0;
-
- x = assign_temp (decl, 1, 1, 1);
- set_mem_attributes (x, decl, 1);
- SET_DECL_RTL (decl, x);
-
- if (oldaddr)
- {
- addr = force_operand (XEXP (DECL_RTL (decl), 0), oldaddr);
- if (addr != oldaddr)
- emit_move_insn (oldaddr, addr);
- }
- }
-}
-
/* Emit code to save the current value of stack. */
rtx
expand_stack_save (void)
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index a592bda5c23..34ec7ea8c48 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -1799,7 +1799,7 @@ finish_bitfield_representative (tree repr, tree field)
if (nextf)
{
tree maxsize;
- /* If there was an error, the field may be not layed out
+ /* If there was an error, the field may be not laid out
correctly. Don't bother to do anything. */
if (TREE_TYPE (nextf) == error_mark_node)
return;
@@ -1880,7 +1880,7 @@ finish_bitfield_representative (tree repr, tree field)
}
/* Compute and set FIELD_DECLs for the underlying objects we should
- use for bitfield access for the structure layed out with RLI. */
+ use for bitfield access for the structure laid out with RLI. */
static void
finish_bitfield_layout (record_layout_info rli)
@@ -2231,7 +2231,7 @@ layout_type (tree type)
}
/* If we arrived at a length of zero ignore any overflow
- that occured as part of the calculation. There exists
+ that occurred as part of the calculation. There exists
an association of the plus one where that overflow would
not happen. */
if (integer_zerop (length)
diff --git a/gcc/symtab.c b/gcc/symtab.c
index 1d9fdd88108..665ceae41e0 100644
--- a/gcc/symtab.c
+++ b/gcc/symtab.c
@@ -177,11 +177,13 @@ symtab_register_node (symtab_node node)
if (*slot == NULL)
*slot = node;
- insert_to_assembler_name_hash (node);
+ ipa_empty_ref_list (&node->symbol.ref_list);
node->symbol.order = symtab_order++;
- ipa_empty_ref_list (&node->symbol.ref_list);
+ /* Be sure to do this last; C++ FE might create new nodes via
+ DECL_ASSEMBLER_NAME langhook! */
+ insert_to_assembler_name_hash (node);
}
/* Make NODE to be the one symtab hash is pointing to. Used when reshaping tree
diff --git a/gcc/target-hooks-macros.h b/gcc/target-hooks-macros.h
index 3ef5ae39122..56cddac7c89 100644
--- a/gcc/target-hooks-macros.h
+++ b/gcc/target-hooks-macros.h
@@ -60,7 +60,7 @@
In both these cases, leave the DOC string empty, i.e. "".
Sometimes, for some historic reason the function declaration
has to be documented differently
- than what it is. In that case, use DEFHOOK_UNDOC to supress auto-generation
+ than what it is. In that case, use DEFHOOK_UNDOC to suppress auto-generation
of documentation. DEFHOOK_UNDOC takes a DOC string which it ignores, so
you can put GPLed documentation string there if you have hopes that you
can clear the declaration & documentation for GFDL distribution later,
diff --git a/gcc/target.def b/gcc/target.def
index f5023542409..3463600f99a 100644
--- a/gcc/target.def
+++ b/gcc/target.def
@@ -678,11 +678,11 @@ DEFHOOK
of INSN on CPU that are not described in DFA.
READY_TRY and N_READY represent the current state of search in the
optimization space. The target can filter out instructions that
- should not be tried after issueing INSN by setting corresponding
+ should not be tried after issuing INSN by setting corresponding
elements in READY_TRY to non-zero.
INSN is the instruction being evaluated.
PREV_DATA is a pointer to target-specific data corresponding
- to a state before issueing INSN. */
+ to a state before issuing INSN. */
DEFHOOK
(first_cycle_multipass_issue,
"",
@@ -696,7 +696,7 @@ DEFHOOK
described in DFA.
READY_TRY and N_READY represent the current state of search in the
optimization space. The target can filter out instructions that
- should not be tried after issueing INSN by setting corresponding
+ should not be tried after issuing INSN by setting corresponding
elements in READY_TRY to non-zero. */
DEFHOOK
(first_cycle_multipass_backtrack,
@@ -2749,6 +2749,13 @@ DEFHOOKPOD
bool, false)
DEFHOOKPOD
+(force_at_comp_dir,
+ "True if the @code{DW_AT_comp_dir} attribute should be emitted for each \
+ compilation unit. This attribute is required for the darwin linker \
+ to emit debug information.",
+ bool, false)
+
+DEFHOOKPOD
(delay_sched2, "True if sched2 is not to be run at its normal place. \
This usually means it will be run as part of machine-specific reorg.",
bool, false)
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 21f448daa52..29ed833df4c 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,217 @@
+2012-05-31 Richard Guenther <rguenther@suse.de>
+
+ * gcc.dg/tree-ssa/ldist-pr45948-2.c: New testcase copy of
+ ldist-pr45948.c with disabled SCCP.
+
+2012-05-31 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/48493
+ * gcc.dg/torture/pr48493.c: New testcase.
+
+2012-05-31 Greta Yorsh <Greta.Yorsh@arm.com>
+
+ * lib/target-supports.exp (check_effective_target_vect_char_mult): Add
+ arm32 to targets.
+ * gcc.dg/vect/slp-perm-8.c (main): Prevent vectorization
+ of the initialization loop.
+ (dg-final): Adjust the expected number of vectorized loops depending
+ on vect_char_mult target selector.
+
+2012-05-31 Hans-Peter Nilsson <hp@axis.com>
+
+ * gcc.target/cris/asm-v8.S, gcc.target/cris/asm-v10.S,
+ gcc.target/cris/asm-other.S, gcc.target/cris/inasm-v8.c,
+ gcc.target/cris/inasm-v10.c, gcc.target/cris/inasm-other.c:
+ New tests.
+
+2012-05-30 Jason Merrill <jason@redhat.com>
+
+ PR c++/53356
+ * g++.dg/init/new34.C: New.
+ * g++.dg/tree-ssa/stabilize1.C: New.
+
+2012-05-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/53356
+ * g++.dg/init/new33.C: New test.
+
+2012-05-30 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/53501
+ * gcc.dg/torture/pr53501.c: New testcase.
+ * c-c++-common/restrict-2.c: Adjust.
+
+2012-05-30 Alan Modra <amodra@gmail.com>
+
+ * gcc.target/powerpc/powerpc.exp: Load torture-options.exp, call
+ torture-finish.
+
+2012-05-30 Marc Glisse <marc.glisse@inria.fr>
+
+ * gcc.target/i386/shuf-concat.c: New test.
+
+2012-05-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/53519
+ * gcc.c-torture/compile/pr53519.c: New test.
+
+2012-05-30 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
+
+ * gcc.target/arm/neon-vrev.c: New.
+
+2012-05-29 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/51340
+ * gcc.target/sh/pr51340-1.c: New.
+ * gcc.target/sh/pr51340-2.c: New.
+ * gcc.target/sh/pr51340-3.c: New.
+
+2012-05-29 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53516
+ * gcc.dg/torture/pr53516.c: New testcase.
+
+2012-05-29 Dodji Seketeli <dodji@redhat.com>
+
+ PR preprocessor/53229
+ * gcc.dg/cpp/paste6.c: Force to run without
+ -ftrack-macro-expansion.
+ * gcc.dg/cpp/paste8.c: Likewise.
+ * gcc.dg/cpp/paste8-2.c: New test, like paste8.c but run with
+ -ftrack-macro-expansion.
+ * gcc.dg/cpp/paste12.c: Force to run without
+ -ftrack-macro-expansion.
+ * gcc.dg/cpp/paste12-2.c: New test, like paste12.c but run with
+ -ftrack-macro-expansion.
+ * gcc.dg/cpp/paste13.c: Likewise.
+ * gcc.dg/cpp/paste14.c: Likewise.
+ * gcc.dg/cpp/paste14-2.c: New test, like paste14.c but run with
+ -ftrack-macro-expansion.
+ * gcc.dg/cpp/paste18.c: New test.
+
+2012-05-29 Hans-Peter Nilsson <hp@axis.com>
+
+ * gcc.target/cris/torture/trap-1.c,
+ gcc.target/cris/torture/trap-2.c,
+ gcc.target/cris/torture/trap-3.c,
+ gcc.target/cris/torture/trap-v0.c,
+ gcc.target/cris/torture/trap-v3.c: New tests.
+
+2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/25137
+ * g++.dg/warn/Wbraces3.C: New.
+ * g++.dg/warn/Wbraces4.C: Likewise.
+
+2012-05-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/53505
+ * c-c++-common/torture/pr53505.c: New test.
+
+2012-05-27 Nathan Sidwell <nathan@acm.org>
+
+ * gcc.dg/stmt-expr-4.c: New.
+
+2012-05-26 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53491
+ * g++.dg/parse/crash60.C: New.
+
+2012-05-26 Jason Merrill <jason@redhat.com>
+
+ PR c++/53220
+ * c-c++-common/array-lit.c: New.
+ * g++.dg/ext/complit12.C: #if 0 out decay-to-pointer test.
+
+2012-05-26 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR ada/50294
+ * gnat.dg/array21.adb: New test.
+
+2012-05-26 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/renaming5.adb: Adjust dg-final directive.
+
+2012-05-25 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/32054
+ * g++.dg/other/anon-union3.C: New.
+
+2012-05-25 Ian Lance Taylor <iant@google.com>
+
+ * gcc.dg/split-6.c: New test.
+
+2012-05-25 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/lto14.adb: New test.
+
+2012-05-25 Tristan Gingold <gingold@adacore.com>
+
+ * gcc.target/i386/large-frame.c: New.
+
+2012-05-24 Pat Haugen <pthaugen@us.ibm.com>
+ * gcc.target/powerpc/lhs-1.c: New.
+ * gcc.target/powerpc/lhs-2.c: New.
+ * gcc.target/powerpc/lhs-3.c: New.
+
+2012-05-24 Dodji Seketeli <dodji@redhat.com>
+
+ Make unwound macro expansion trace less redundant
+ * gcc.dg/cpp/macro-exp-tracking-1.c: Adjust.
+ * gcc.dg/cpp/macro-exp-tracking-2.c: Likewise.
+ * gcc.dg/cpp/macro-exp-tracking-3.c: Likewise.
+ * gcc.dg/cpp/macro-exp-tracking-4.c: Likewise.
+ * gcc.dg/cpp/macro-exp-tracking-5.c: Likewise.
+ * gcc.dg/cpp/pragma-diagnostic-2.c: Likewise.
+
+2012-05-24 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53464
+ * g++.dg/cpp0x/constexpr-default1.C: New.
+
+2012-05-24 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/32080
+ * g++.dg/eh/goto2.C: New.
+
+2012-05-24 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/53460
+ * g++.dg/tree-prof/pr53460.C: New testcase.
+
+2012-05-24 Richard Guenther <rguenther@suse.de>
+
+ PR bootstrap/53466
+ * g++.dg/debug/pr53466.C: New testcase.
+
+2012-05-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/53465
+ * gcc.c-torture/execute/pr53465.c: New test.
+
+2012-05-23 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/51055
+ PR fortran/45170
+ * gfortran.dg/allocate_with_typespec_6.f90: New.
+
+2012-05-23 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/29185
+ * g++.dg/warn/delete-array-1.C: New.
+
+2012-05-23 Richard Guenther <rguenther@suse.de>
+
+ * gcc.dg/torture/pr39074-2.c: Adjust.
+ * gcc.dg/torture/pr39074.c: Likewise.
+ * gcc.dg/torture/pta-structcopy-1.c: Likewise.
+ * gcc.dg/tree-ssa/alias-19.c: Likewise.
+
+2012-05-22 Jan Hubicka <jh@suse.cz>
+
+ PR middle-end/53161
+ * g++.dg/torture/pr53161.C: New testcase.
+
2012-05-22 Tobias Burnus <burnus@net-b.de>
PR fortran/53389
diff --git a/gcc/testsuite/c-c++-common/array-lit.c b/gcc/testsuite/c-c++-common/array-lit.c
new file mode 100644
index 00000000000..6505c2091b4
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/array-lit.c
@@ -0,0 +1,12 @@
+/* { dg-options "-std=c99 -Wc++-compat -Werror" { target c } } */
+/* { dg-prune-output "treated as errors" } */
+#include <stdio.h>
+
+int main()
+{
+ for (int *p = (int[]){ 1, 2, 3, 0 }; /* { dg-error "array" } */
+ *p; ++p) {
+ printf("%d\n", *p);
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/restrict-2.c b/gcc/testsuite/c-c++-common/restrict-2.c
index 3f71b77b9ce..42ed398f670 100644
--- a/gcc/testsuite/c-c++-common/restrict-2.c
+++ b/gcc/testsuite/c-c++-common/restrict-2.c
@@ -10,5 +10,5 @@ void foo (float * __restrict__ a, float * __restrict__ b, int n, int j)
/* We should move the RHS of the store out of the loop. */
-/* { dg-final { scan-tree-dump-times "Moving statement" 11 "lim1" } } */
+/* { dg-final { scan-tree-dump-times "Moving statement" 10 "lim1" } } */
/* { dg-final { cleanup-tree-dump "lim1" } } */
diff --git a/gcc/testsuite/c-c++-common/torture/pr53505.c b/gcc/testsuite/c-c++-common/torture/pr53505.c
new file mode 100644
index 00000000000..922711025ca
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/torture/pr53505.c
@@ -0,0 +1,42 @@
+/* PR tree-optimization/53505 */
+/* { dg-do run } */
+
+#include <stdbool.h>
+
+struct A
+{
+ unsigned int a;
+ unsigned char c1, c2;
+ bool b1 : 1;
+ bool b2 : 1;
+ bool b3 : 1;
+};
+
+void
+foo (const struct A *x, int y)
+{
+ int s = 0, i;
+ for (i = 0; i < y; ++i)
+ {
+ const struct A a = x[i];
+ s += a.b1 ? 1 : 0;
+ }
+ if (s != 0)
+ __builtin_abort ();
+}
+
+int
+main ()
+{
+ struct A x[100];
+ int i;
+ __builtin_memset (x, -1, sizeof (x));
+ for (i = 0; i < 100; i++)
+ {
+ x[i].b1 = false;
+ x[i].b2 = false;
+ x[i].b3 = false;
+ }
+ foo (x, 100);
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-default1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-default1.C
new file mode 100644
index 00000000000..68d50b61b12
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-default1.C
@@ -0,0 +1,22 @@
+// PR c++/53464
+// { dg-do compile { target c++11 } }
+
+template <int value>
+struct bar
+{
+ static constexpr int get()
+ {
+ return value;
+ }
+};
+
+template <typename A, int value = A::get()>
+struct foo
+{
+};
+
+int main()
+{
+ typedef foo<bar<0>> type;
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/debug/pr53466.C b/gcc/testsuite/g++.dg/debug/pr53466.C
new file mode 100644
index 00000000000..ecd88bcd187
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/pr53466.C
@@ -0,0 +1,39 @@
+// { dg-do compile }
+// { dg-options "-foptimize-sibling-calls -fcompare-debug" }
+
+typedef union gimple_statement_d *gimple;
+typedef gimple gimple_seq_node;
+typedef struct {
+ gimple_seq_node ptr;
+ void *seq;
+ void *bb;
+} gimple_stmt_iterator;
+struct gimple_statement_base {
+ gimple next;
+};
+union gimple_statement_d {
+ struct gimple_statement_base gsbase;
+};
+static inline gimple_stmt_iterator gsi_start_1 (gimple stmt)
+{
+ gimple_stmt_iterator i;
+ i.ptr = stmt;
+ return i;
+}
+bool gimple_may_fallthru (gimple);
+static bool gimple_try_catch_may_fallthru (gimple stmt)
+{
+ gimple_stmt_iterator i = gsi_start_1 (stmt);
+ for (; i.ptr; i.ptr = i.ptr->gsbase.next)
+ {
+ if (gimple_may_fallthru (i.ptr))
+ return true;
+ }
+}
+bool gimple_stmt_may_fallthru (gimple stmt, bool x)
+{
+ if (x)
+ return gimple_may_fallthru (stmt);
+ else
+ return gimple_try_catch_may_fallthru (stmt);
+}
diff --git a/gcc/testsuite/g++.dg/eh/goto2.C b/gcc/testsuite/g++.dg/eh/goto2.C
new file mode 100644
index 00000000000..de06d50b6e3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/goto2.C
@@ -0,0 +1,12 @@
+// PR c++/32080
+
+void f()
+try
+ {
+ goto l2; // { dg-error "from here" }
+ l1: ; // { dg-error "jump to label 'l1'" }
+ } catch (...)
+ {
+ l2: ; // { dg-error "jump to label 'l2'|enters catch block" }
+ goto l1; // { dg-error "from here|enters try block" }
+ }
diff --git a/gcc/testsuite/g++.dg/ext/complit12.C b/gcc/testsuite/g++.dg/ext/complit12.C
index 29c9af1864f..5c6a731f9ac 100644
--- a/gcc/testsuite/g++.dg/ext/complit12.C
+++ b/gcc/testsuite/g++.dg/ext/complit12.C
@@ -53,12 +53,14 @@ int main ()
T t;
if (c != 11)
return 5;
- MA ma = bar ((M[2]) { M(), M() }, m);
- if (c != 12)
- return 7;
M mm[2] = ((M[2]) { f(M()), f(M()) });
- if (c != 14)
+ if (c != 13)
return 8;
+#if 0
+ MA ma = bar ((M[2]) { M(), M() }, m);
+ if (c != 14)
+ return 7;
+#endif
}
if (c != 0)
return 6;
diff --git a/gcc/testsuite/g++.dg/init/new33.C b/gcc/testsuite/g++.dg/init/new33.C
new file mode 100644
index 00000000000..18da79e7e9a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/new33.C
@@ -0,0 +1,11 @@
+// PR c++/53356
+// { dg-do compile }
+
+struct A {};
+struct B { operator const A & () const; };
+struct C { operator const A & () const; C (); };
+struct D { operator const A & () const; D (); ~D (); };
+
+A *foo () { return new A (B ()); }
+A *bar () { return new A (C ()); }
+A *baz () { return new A (D ()); }
diff --git a/gcc/testsuite/g++.dg/init/new34.C b/gcc/testsuite/g++.dg/init/new34.C
new file mode 100644
index 00000000000..9e67eb34174
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/new34.C
@@ -0,0 +1,11 @@
+// PR c++/53356
+
+struct A { A(); ~A(); };
+
+struct B {
+ operator const A () const;
+};
+
+A* cause_ICE() {
+ return new A((A(),A()));
+}
diff --git a/gcc/testsuite/g++.dg/other/anon-union3.C b/gcc/testsuite/g++.dg/other/anon-union3.C
new file mode 100644
index 00000000000..e65ee948a3b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/anon-union3.C
@@ -0,0 +1,25 @@
+// PR c++/32054
+
+class C
+{
+ auto union // { dg-error "storage class" "" { target c++98 } }
+ {
+ int a;
+ }; // { dg-error "multiple|specified" "" { target c++11 } }
+ register union // { dg-error "storage class" }
+ {
+ int b;
+ };
+ static union // { dg-error "storage class" }
+ {
+ int c;
+ };
+ extern union // { dg-error "storage class" }
+ {
+ int d;
+ };
+ mutable union // { dg-error "storage class" }
+ {
+ int e;
+ };
+};
diff --git a/gcc/testsuite/g++.dg/parse/crash60.C b/gcc/testsuite/g++.dg/parse/crash60.C
new file mode 100644
index 00000000000..e515396771e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/crash60.C
@@ -0,0 +1,14 @@
+// PR c++/53491
+
+struct M
+{
+ void pop();
+};
+
+void foo()
+{
+ int result = 0;
+ M m;
+
+ result += m.pop(); // { dg-error "invalid operands|in evaluation" }
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr53161.C b/gcc/testsuite/g++.dg/torture/pr53161.C
new file mode 100644
index 00000000000..766f2942b3d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr53161.C
@@ -0,0 +1,22 @@
+/* { dg-options "-std=c++11" } */
+void gg();
+static __typeof(gg) __gthrw_gg __attribute__((__weakref__("gg")));
+
+template<typename R,typename... A>
+struct data {
+ template<typename Y,typename X>
+ data(Y& y,R(X::*f)(A...));
+};
+
+template<typename Y,typename X,typename R,typename... A>
+data<R,A...> make_data(Y& y,R(X::*f)(A...)) {
+ return data<R,A...>(y,f);
+}
+
+void global(data<void>);
+
+struct test {
+ void bar() {}
+ void doit() { global(make_data(*this,&test::bar)); }
+};
+
diff --git a/gcc/testsuite/g++.dg/tree-prof/pr53460.C b/gcc/testsuite/g++.dg/tree-prof/pr53460.C
new file mode 100644
index 00000000000..ed05e0b9924
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-prof/pr53460.C
@@ -0,0 +1,25 @@
+// { dg-options "-O" }
+
+template<typename T> class OwnPtr {
+public:
+ ~OwnPtr();
+};
+template<class T> class GlyphMetricsMap {
+public:
+ GlyphMetricsMap() { }
+ OwnPtr<int> m_pages;
+};
+class SimpleFontData {
+public:
+ void boundsForGlyph() const;
+};
+inline __attribute__((__always_inline__))
+void SimpleFontData::boundsForGlyph() const
+{
+ new GlyphMetricsMap<int>;
+}
+void offsetToMiddleOfGlyph(const SimpleFontData* fontData)
+{
+ fontData->boundsForGlyph();
+}
+int main() {}
diff --git a/gcc/testsuite/g++.dg/tree-ssa/stabilize1.C b/gcc/testsuite/g++.dg/tree-ssa/stabilize1.C
new file mode 100644
index 00000000000..2fe723c3aae
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/stabilize1.C
@@ -0,0 +1,14 @@
+// PR c++/53356
+// { dg-options "-fdump-tree-gimple" }
+// { dg-final { scan-tree-dump-not "= 0" "gimple" } }
+// { dg-final { cleanup-tree-dump "gimple" } }
+
+class A {};
+
+struct B {
+ operator const A &() const;
+};
+
+A* cause_ICE() {
+ return new A(B());
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wbraces3.C b/gcc/testsuite/g++.dg/warn/Wbraces3.C
new file mode 100644
index 00000000000..f1aea98c444
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wbraces3.C
@@ -0,0 +1,34 @@
+// PR c++/25137
+// { dg-options "-Wall" }
+
+struct S { int s[3]; };
+S s1 = { 1, 1, 1 };
+
+struct S1 { int s[3]; };
+struct S2 { struct S1 a; };
+S2 s21 = { 1, 1, 1 };
+
+struct S3 { int s[3]; };
+struct S4 { struct S3 a; int b; };
+S4 s41 = { 1, 1, 1, 1 };
+
+struct S5 { int s[3]; };
+struct S6 { struct S5 a; int b; };
+S6 s61 = { { 1, 1, 1 }, 1 };
+
+struct S7 { int s[3]; };
+struct S8 { int a; struct S7 b; };
+S8 s81 = { 1, { 1, 1, 1 } };
+
+struct S9 { int s[2]; };
+struct S10 { struct S9 a; struct S9 b; };
+S10 s101 = { { 1, 1 }, 1, 1 };
+
+struct S11 { int s[2]; };
+struct S12 { struct S11 a; struct S11 b; };
+S12 s121 = { { 1, 1 }, { 1, 1 } };
+
+struct S13 { int i; };
+struct S14 { struct S13 a; };
+struct S15 { struct S14 b; };
+S15 s151 = { 1 };
diff --git a/gcc/testsuite/g++.dg/warn/Wbraces4.C b/gcc/testsuite/g++.dg/warn/Wbraces4.C
new file mode 100644
index 00000000000..7d77959f767
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wbraces4.C
@@ -0,0 +1,34 @@
+// PR c++/25137
+// { dg-options "-Wmissing-braces" }
+
+struct S { int s[3]; };
+S s1 = { 1, 1, 1 }; // { dg-warning "missing braces" }
+
+struct S1 { int s[3]; };
+struct S2 { struct S1 a; };
+S2 s21 = { 1, 1, 1 }; // { dg-warning "missing braces" }
+
+struct S3 { int s[3]; };
+struct S4 { struct S3 a; int b; };
+S4 s41 = { 1, 1, 1, 1 }; // { dg-warning "missing braces" }
+
+struct S5 { int s[3]; };
+struct S6 { struct S5 a; int b; };
+S6 s61 = { { 1, 1, 1 }, 1 }; // { dg-warning "missing braces" }
+
+struct S7 { int s[3]; };
+struct S8 { int a; struct S7 b; };
+S8 s81 = { 1, { 1, 1, 1 } }; // { dg-warning "missing braces" }
+
+struct S9 { int s[2]; };
+struct S10 { struct S9 a; struct S9 b; };
+S10 s101 = { { 1, 1 }, 1, 1 }; // { dg-warning "missing braces" }
+
+struct S11 { int s[2]; };
+struct S12 { struct S11 a; struct S11 b; };
+S12 s121 = { { 1, 1 }, { 1, 1 } }; // { dg-warning "missing braces" }
+
+struct S13 { int i; };
+struct S14 { struct S13 a; };
+struct S15 { struct S14 b; };
+S15 s151 = { 1 }; // { dg-warning "missing braces" }
diff --git a/gcc/testsuite/g++.dg/warn/Wconversion-real-integer2.C b/gcc/testsuite/g++.dg/warn/Wconversion-real-integer2.C
index 29130f1836f..6a95b0e3a8c 100644
--- a/gcc/testsuite/g++.dg/warn/Wconversion-real-integer2.C
+++ b/gcc/testsuite/g++.dg/warn/Wconversion-real-integer2.C
@@ -29,5 +29,5 @@ float vfloat;
void h (void)
{
- vfloat = INT_MAX; // { dg-message "expanded from here" }
+ vfloat = INT_MAX; // { dg-message "in expansion of macro 'INT_MAX'" }
}
diff --git a/gcc/testsuite/g++.dg/warn/Wdouble-promotion.C b/gcc/testsuite/g++.dg/warn/Wdouble-promotion.C
index 98d2eeda79e..afd9a20147e 100644
--- a/gcc/testsuite/g++.dg/warn/Wdouble-promotion.C
+++ b/gcc/testsuite/g++.dg/warn/Wdouble-promotion.C
@@ -36,7 +36,7 @@ usual_arithmetic_conversions(void)
local_cf = cf + 1.0; /* { dg-warning "implicit" } */
local_cf = cf - d; /* { dg-warning "implicit" } */
- local_cf = cf + 1.0 * ID; /* { dg-message "expanded from here" } */
+ local_cf = cf + 1.0 * ID; /* { dg-message "in expansion of macro 'ID'" } */
local_cf = cf - cd; /* { dg-warning "implicit" } */
local_f = i ? f : d; /* { dg-warning "implicit" } */
diff --git a/gcc/testsuite/g++.dg/warn/delete-array-1.C b/gcc/testsuite/g++.dg/warn/delete-array-1.C
new file mode 100644
index 00000000000..c3af71323ac
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/delete-array-1.C
@@ -0,0 +1,11 @@
+// PR c++/29185
+
+int a [1];
+struct S { int a [1]; } s;
+
+void foo (S *p)
+{
+ delete a; // { dg-warning "deleting array" }
+ delete s.a; // { dg-warning "deleting array" }
+ delete p->a; // { dg-warning "deleting array" }
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr53519.c b/gcc/testsuite/gcc.c-torture/compile/pr53519.c
new file mode 100644
index 00000000000..3adadcb2c0e
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr53519.c
@@ -0,0 +1,26 @@
+/* PR rtl-optimization/53519 */
+
+int a, b, c, d, e;
+
+short int
+foo (short int x)
+{
+ return a == 0 ? x : 0;
+}
+
+short int
+bar (int x, int y)
+{
+ return x + y;
+}
+
+void
+baz (void)
+{
+ if (!e)
+ {
+ int f = foo (65535 ^ b);
+ if (bar (!6L <= ~f, ~e) == c)
+ d = 0;
+ }
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr53465.c b/gcc/testsuite/gcc.c-torture/execute/pr53465.c
new file mode 100644
index 00000000000..6a31719b872
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr53465.c
@@ -0,0 +1,30 @@
+/* PR tree-optimization/53465 */
+
+extern void abort ();
+
+static const int a[] = { 1, 2 };
+
+void
+foo (const int *x, int y)
+{
+ int i;
+ int b = 0;
+ int c;
+ for (i = 0; i < y; i++)
+ {
+ int d = x[i];
+ if (d == 0)
+ break;
+ if (b && d <= c)
+ abort ();
+ c = d;
+ b = 1;
+ }
+}
+
+int
+main ()
+{
+ foo (a, 2);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-1.c b/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-1.c
index d975c8cee97..28ef7955c9b 100644
--- a/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-1.c
+++ b/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-1.c
@@ -6,16 +6,14 @@
#define OPERATE(OPRD1, OPRT, OPRD2) \
do \
{ \
- OPRD1 OPRT OPRD2; /* { dg-message "expansion" }*/ \
+ OPRD1 OPRT OPRD2; /* { dg-message "definition" }*/ \
} while (0)
#define SHIFTL(A,B) \
- OPERATE (A,<<,B) /* { dg-message "expanded|expansion" } */
+ OPERATE (A,<<,B) /* { dg-error "invalid operands" } */
void
foo ()
{
- SHIFTL (0.1,0.2); /* { dg-message "expanded" } */
+ SHIFTL (0.1,0.2); /* { dg-message "in expansion of macro \[^\n\r\]SHIFTL" } */
}
-
-/* { dg-error "invalid operands" "" { target *-*-* } 13 } */
diff --git a/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-2.c b/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-2.c
index 684af4c7507..2367765ccef 100644
--- a/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-2.c
+++ b/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-2.c
@@ -4,18 +4,17 @@
*/
#define OPERATE(OPRD1, OPRT, OPRD2) \
- OPRD1 OPRT OPRD2; /* { dg-message "expansion" } */
+ OPRD1 OPRT OPRD2; /* { dg-message "in definition of macro 'OPERATE'" } */
#define SHIFTL(A,B) \
- OPERATE (A,<<,B) /* { dg-message "expanded|expansion" } */
+ OPERATE (A,<<,B) /* { dg-message "invalid operands to binary <<" } */
#define MULT(A) \
- SHIFTL (A,1) /* { dg-message "expanded|expansion" } */
+ SHIFTL (A,1) /* { dg-message "in expansion of macro 'SHIFTL'" } */
void
foo ()
{
- MULT (1.0); /* { dg-message "expanded" } */
+ MULT (1.0); /* { dg-message "in expansion of macro 'MULT'" } */
}
-/* { dg-error "invalid operands to binary <<" "" { target *-*-* } { 10 } } */
diff --git a/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-3.c b/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-3.c
index 119053ef9fb..b47726d6b4b 100644
--- a/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-3.c
+++ b/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-3.c
@@ -3,12 +3,10 @@
{ dg-do compile }
*/
-#define SQUARE(A) A * A /* { dg-message "expansion" } */
+#define SQUARE(A) A * A /* { dg-message "in definition of macro 'SQUARE'" } */
void
foo()
{
- SQUARE (1 << 0.1); /* { dg-message "expanded" } */
+ SQUARE (1 << 0.1); /* { dg-error "16:invalid operands to binary <<" } */
}
-
-/* { dg-error "16:invalid operands to binary <<" "" {target *-*-* } { 11 } } */
diff --git a/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-4.c b/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-4.c
index 1f9fe6ad26c..401b846cc3e 100644
--- a/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-4.c
+++ b/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-4.c
@@ -3,12 +3,11 @@
{ dg-do compile }
*/
-#define SQUARE(A) A * A /* { dg-message "expansion" } */
+#define SQUARE(A) A * A /* { dg-message "in definition of macro 'SQUARE'" } */
void
foo()
{
- SQUARE (1 << 0.1); /* { dg-message "expanded" } */
+ SQUARE (1 << 0.1); /* { dg-message "13:invalid operands to binary <<" } */
}
-/* { dg-error "13:invalid operands to binary <<" "" { target *-*-* } { 11 } } */
diff --git a/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-5.c b/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-5.c
index 79336608569..abe456ceb6c 100644
--- a/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-5.c
+++ b/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-5.c
@@ -3,16 +3,16 @@
{ dg-do compile }
*/
-#define PASTED var ## iable /* { dg-error "undeclared" } */
+#define PASTED var ## iable /* { dg-error "'variable' undeclared" } */
#define call_foo(p1, p2) \
foo (p1, \
- p2); /* { dg-message "in expansion of macro" } */
+ p2); /* { dg-message "in definition of macro 'call_foo'" } */
void foo(int, char);
void
bar()
{
- call_foo(1,PASTED); /* { dg-message "expanded from here" } */
+ call_foo(1,PASTED); /* { dg-message "in expansion of macro 'PASTED'" } */
}
diff --git a/gcc/testsuite/gcc.dg/cpp/paste12-2.c b/gcc/testsuite/gcc.dg/cpp/paste12-2.c
new file mode 100644
index 00000000000..6e2e4f1057d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/paste12-2.c
@@ -0,0 +1,11 @@
+/*
+ { dg-options "-ftrack-macro-expansion=2" }
+ { dg-do preprocess }
+ */
+
+/* Test correct diagnostics when pasting in #include.
+ Source: PR preprocessor/6780. */
+
+#define inc2(a,b) <##a.b> /* { dg-error "pasting \"<\" and \"stdio\" does not" } */
+#define INC(X) inc2(X,h)
+#include INC(stdio)
diff --git a/gcc/testsuite/gcc.dg/cpp/paste12.c b/gcc/testsuite/gcc.dg/cpp/paste12.c
index e61ec51433c..3e0f7b95922 100644
--- a/gcc/testsuite/gcc.dg/cpp/paste12.c
+++ b/gcc/testsuite/gcc.dg/cpp/paste12.c
@@ -1,4 +1,7 @@
-/* { dg-do preprocess } */
+/*
+ { dg-options "-ftrack-macro-expansion=0" }
+ { dg-do preprocess }
+*/
/* Test correct diagnostics when pasting in #include.
Source: PR preprocessor/6780. */
diff --git a/gcc/testsuite/gcc.dg/cpp/paste13.c b/gcc/testsuite/gcc.dg/cpp/paste13.c
index 62c72d44993..f0f4fd894e2 100644
--- a/gcc/testsuite/gcc.dg/cpp/paste13.c
+++ b/gcc/testsuite/gcc.dg/cpp/paste13.c
@@ -1,6 +1,9 @@
/* Copyright (C) 2000 Free Software Foundation, Inc. */
-/* { dg-do preprocess } */
+/*
+ { dg-options "-ftrack-macro-expansion=0" }
+ { dg-do preprocess }
+*/
/* This used to be recognized as a comment when lexing after pasting
spellings. Neil Booth, 9 Oct 2002. */
diff --git a/gcc/testsuite/gcc.dg/cpp/paste14-2.c b/gcc/testsuite/gcc.dg/cpp/paste14-2.c
new file mode 100644
index 00000000000..3b23ada3d21
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/paste14-2.c
@@ -0,0 +1,11 @@
+/* PR preprocessor/28709 */
+/*
+ { dg-options "-ftrack-macro-expansion=2" }
+ { dg-do preprocess }
+*/
+
+#define foo - ## >> /* { dg-error "pasting \"-\" and \">>\"" } */
+foo
+#define bar = ## == /* { dg-error "pasting \"=\" and \"==\"" } */
+bar
+
diff --git a/gcc/testsuite/gcc.dg/cpp/paste14.c b/gcc/testsuite/gcc.dg/cpp/paste14.c
index ec243c2326f..043d5e5804f 100644
--- a/gcc/testsuite/gcc.dg/cpp/paste14.c
+++ b/gcc/testsuite/gcc.dg/cpp/paste14.c
@@ -1,5 +1,8 @@
/* PR preprocessor/28709 */
-/* { dg-do preprocess } */
+/*
+ { dg-options "-ftrack-macro-expansion=0" }
+ { dg-do preprocess }
+*/
#define foo - ## >>
foo /* { dg-error "pasting \"-\" and \">>\"" } */
diff --git a/gcc/testsuite/gcc.dg/cpp/paste18.c b/gcc/testsuite/gcc.dg/cpp/paste18.c
new file mode 100644
index 00000000000..2888144cb3b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/paste18.c
@@ -0,0 +1,16 @@
+/*
+ { dg-options "-ftrack-macro-expansion=2" }
+ { dg-do compile }
+ */
+
+struct x {
+ int i;
+};
+struct x x;
+
+#define TEST(X) x.##X /* { dg-error "pasting\[^\n\r\]*does not give\[^\n\r\]*token" } */
+
+void foo (void)
+{
+ TEST(i) = 0;
+}
diff --git a/gcc/testsuite/gcc.dg/cpp/paste6.c b/gcc/testsuite/gcc.dg/cpp/paste6.c
index ac9ae3901b3..a4e70e45025 100644
--- a/gcc/testsuite/gcc.dg/cpp/paste6.c
+++ b/gcc/testsuite/gcc.dg/cpp/paste6.c
@@ -2,7 +2,10 @@
actual arguments. Original bug exposed by Linux kernel. Problem
reported by Jakub Jelinek <jakub@redhat.com>. */
-/* { dg-do compile } */
+/*
+ { dg-options "-ftrack-macro-expansion=0" }
+ { dg-do compile }
+*/
extern int foo(int x);
diff --git a/gcc/testsuite/gcc.dg/cpp/paste8-2.c b/gcc/testsuite/gcc.dg/cpp/paste8-2.c
new file mode 100644
index 00000000000..c037e99e6fa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/paste8-2.c
@@ -0,0 +1,15 @@
+/* { dg-do preprocess } */
+/* { dg-options "-ftrack-macro-expansion=2" } */
+
+int foo(int, ...);
+
+#define a(x, y...) foo(x, ##y)
+a(1)
+a(1, 2, 3)
+#define b(x, y, z...) foo(x, ##y) /* { dg-error "valid preprocessing token" } */
+b(1, 2, 3)
+#define c(x, y, z...) foo(x, ##z)
+c(1, 2)
+c(1, 2, 3)
+#define d(x) fo(##x) /* { dg-error "valid preprocessing token" } */
+d(1)
diff --git a/gcc/testsuite/gcc.dg/cpp/paste8.c b/gcc/testsuite/gcc.dg/cpp/paste8.c
index ab017797868..db1416c120e 100644
--- a/gcc/testsuite/gcc.dg/cpp/paste8.c
+++ b/gcc/testsuite/gcc.dg/cpp/paste8.c
@@ -1,5 +1,5 @@
/* { dg-do preprocess } */
-/* { dg-options "" } */
+/* { dg-options "-ftrack-macro-expansion=0" } */
int foo(int, ...);
diff --git a/gcc/testsuite/gcc.dg/cpp/pragma-diagnostic-2.c b/gcc/testsuite/gcc.dg/cpp/pragma-diagnostic-2.c
index 57f3f01939a..38fc77c47ba 100644
--- a/gcc/testsuite/gcc.dg/cpp/pragma-diagnostic-2.c
+++ b/gcc/testsuite/gcc.dg/cpp/pragma-diagnostic-2.c
@@ -24,5 +24,5 @@ g (void)
void
h (void)
{
- CODE_WITH_WARNING; /* { dg-message "expanded" } */
+ CODE_WITH_WARNING; /* { dg-message "in expansion of macro 'CODE_WITH_WARNING'" } */
}
diff --git a/gcc/testsuite/gcc.dg/split-6.c b/gcc/testsuite/gcc.dg/split-6.c
new file mode 100644
index 00000000000..b32cf8de20a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/split-6.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-require-effective-target split_stack } */
+/* { dg-options "-fsplit-stack" } */
+
+/* This test is like split-3.c, but tests with a smaller stack frame,
+ since that uses a different prologue. */
+
+#include <stdarg.h>
+#include <stdlib.h>
+
+/* Use a noinline function to ensure that the buffer is not removed
+ from the stack. */
+static void use_buffer (char *buf) __attribute__ ((noinline));
+static void
+use_buffer (char *buf)
+{
+ buf[0] = '\0';
+}
+
+/* When using gold, the call to abort will force a stack split. */
+
+static void
+down (int i, ...)
+{
+ char buf[1];
+ va_list ap;
+
+ va_start (ap, i);
+ if (va_arg (ap, int) != 1
+ || va_arg (ap, int) != 2
+ || va_arg (ap, int) != 3
+ || va_arg (ap, int) != 4
+ || va_arg (ap, int) != 5
+ || va_arg (ap, int) != 6
+ || va_arg (ap, int) != 7
+ || va_arg (ap, int) != 8
+ || va_arg (ap, int) != 9
+ || va_arg (ap, int) != 10)
+ abort ();
+
+ if (i > 0)
+ {
+ use_buffer (buf);
+ down (i - 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
+ }
+}
+
+int
+main (void)
+{
+ down (1000, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/stmt-expr-4.c b/gcc/testsuite/gcc.dg/stmt-expr-4.c
new file mode 100644
index 00000000000..d6d01633d3b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/stmt-expr-4.c
@@ -0,0 +1,22 @@
+
+/* { dg-options "-O2 -std=gnu99" } */
+/* Internal compiler error in iterative_hash_expr */
+
+struct tree_string
+{
+ char str[1];
+};
+
+union tree_node
+{
+ struct tree_string string;
+};
+
+char *Foo (union tree_node * num_string)
+{
+ char *str = ((union {const char * _q; char * _nq;})
+ ((const char *)(({ __typeof (num_string) const __t
+ = num_string; __t; })
+ ->string.str)))._nq;
+ return str;
+}
diff --git a/gcc/testsuite/gcc.dg/tm/pr53008.c b/gcc/testsuite/gcc.dg/tm/pr53008.c
new file mode 100644
index 00000000000..1374d76faff
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tm/pr53008.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-fgnu-tm -O" } */
+
+void __attribute__((transaction_safe)) (*fn)(void);
+
+static void __attribute__((transaction_safe))
+foo(void)
+{
+}
+
+void set_fn(void)
+{
+ fn = foo;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr39074-2.c b/gcc/testsuite/gcc.dg/torture/pr39074-2.c
index 2278c23ef8f..d18930a4d6e 100644
--- a/gcc/testsuite/gcc.dg/torture/pr39074-2.c
+++ b/gcc/testsuite/gcc.dg/torture/pr39074-2.c
@@ -30,5 +30,6 @@ int main()
return 0;
}
-/* { dg-final { scan-tree-dump "y.._., points-to vars: { i }" "alias" } } */
+/* { dg-final { scan-tree-dump "y.._. = { i }" "alias" } } */
+/* { dg-final { scan-tree-dump "y.._., points-to vars: { D..... }" "alias" } } */
/* { dg-final { cleanup-tree-dump "alias" } } */
diff --git a/gcc/testsuite/gcc.dg/torture/pr39074.c b/gcc/testsuite/gcc.dg/torture/pr39074.c
index 89c4ac6ca9f..5d46f3120d1 100644
--- a/gcc/testsuite/gcc.dg/torture/pr39074.c
+++ b/gcc/testsuite/gcc.dg/torture/pr39074.c
@@ -29,5 +29,6 @@ int main()
return 0;
}
-/* { dg-final { scan-tree-dump "y.._., points-to vars: { i }" "alias" } } */
+/* { dg-final { scan-tree-dump "y.._. = { i }" "alias" } } */
+/* { dg-final { scan-tree-dump "y.._., points-to vars: { D..... }" "alias" } } */
/* { dg-final { cleanup-tree-dump "alias" } } */
diff --git a/gcc/testsuite/gcc.dg/torture/pr48493.c b/gcc/testsuite/gcc.dg/torture/pr48493.c
new file mode 100644
index 00000000000..ddb61f2e067
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr48493.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+
+typedef long long T __attribute__((may_alias, aligned (1)));
+
+struct S
+{
+ _Complex float d __attribute__((aligned (8)));
+};
+
+void bar (struct S);
+
+void
+f1 (T x)
+{
+ struct S s;
+ *(T *) ((char *) &s.d + 1) = x;
+ bar (s);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr53501.c b/gcc/testsuite/gcc.dg/torture/pr53501.c
new file mode 100644
index 00000000000..36e3ae61e8f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr53501.c
@@ -0,0 +1,22 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+int e[100], n, here;
+
+void __attribute__((noinline))
+foo(void)
+{
+ int i, k = 0;
+ for (i = 0; i < n; ++i) { e[k] = 10; ++k; e[k] = 10; ++k; }
+ for (i = 0; i < k; ++i) here = 1;
+ if (here != 1)
+ abort ();
+}
+
+int main(void)
+{
+ n = 10;
+ foo();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr53516.c b/gcc/testsuite/gcc.dg/torture/pr53516.c
new file mode 100644
index 00000000000..7f8094d19cd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr53516.c
@@ -0,0 +1,32 @@
+/* { dg-do run } */
+/* { dg-options "-ftree-vectorize -ftree-loop-distribute-patterns" } */
+
+extern void abort (void);
+
+struct Foo
+{
+ char a : 1;
+ char b : 7;
+};
+
+struct Foo x[256];
+int y[256];
+
+void __attribute__((noinline,noclone)) bar (int n)
+{
+ int i;
+ for (i = 0; i < n; ++i)
+ {
+ x[i].a = 0;
+ y[i] = 3;
+ }
+}
+
+int main()
+{
+ x[5].b = 7;
+ bar (256);
+ if (x[5].b != 7)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pta-structcopy-1.c b/gcc/testsuite/gcc.dg/torture/pta-structcopy-1.c
index 97e8946da54..4846dd69879 100644
--- a/gcc/testsuite/gcc.dg/torture/pta-structcopy-1.c
+++ b/gcc/testsuite/gcc.dg/torture/pta-structcopy-1.c
@@ -31,5 +31,6 @@ int main()
return 0;
}
-/* { dg-final { scan-tree-dump "points-to vars: { i }" "ealias" } } */
+/* { dg-final { scan-tree-dump "y.* = { i }" "ealias" } } */
+/* { dg-final { scan-tree-dump "y.*, points-to vars: { D..... }" "ealias" } } */
/* { dg-final { cleanup-tree-dump "ealias" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/alias-19.c b/gcc/testsuite/gcc.dg/tree-ssa/alias-19.c
index 7b3689049ac..63a4eee0fe6 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/alias-19.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/alias-19.c
@@ -26,5 +26,5 @@ int main()
}
/* { dg-final { scan-tree-dump "q_. = { a b }" "alias" } } */
-/* { dg-final { scan-tree-dump "q_., points-to vars: { a b }" "alias" } } */
+/* { dg-final { scan-tree-dump "q_., points-to vars: { D..... b }" "alias" } } */
/* { dg-final { cleanup-tree-dump "alias" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ldist-pr45948-2.c b/gcc/testsuite/gcc.dg/tree-ssa/ldist-pr45948-2.c
new file mode 100644
index 00000000000..aecb49f1c6b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ldist-pr45948-2.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-loop-distribution -fno-tree-scev-cprop" } */
+
+extern void bar(int);
+
+void
+foo (int i, int n)
+{
+ int a[30];
+ int b[30];
+ for (; i < n; i++)
+ a[i] = b[i] = 0;
+
+ while (1)
+ if (b[0])
+ bar (a[i - 1]);
+}
diff --git a/gcc/testsuite/gcc.dg/vect/slp-perm-8.c b/gcc/testsuite/gcc.dg/vect/slp-perm-8.c
index d211ef943b3..c4854d544b0 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-perm-8.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-perm-8.c
@@ -32,8 +32,7 @@ int main (int argc, const char* argv[])
{
input[i] = i;
output[i] = 0;
- if (input[i] > 256)
- abort ();
+ __asm__ volatile ("");
}
for (i = 0; i < N / 3; i++)
@@ -52,7 +51,8 @@ int main (int argc, const char* argv[])
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_perm_byte } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target { vect_perm_byte && vect_char_mult } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_perm_byte && {! vect_char_mult } } } } } */
/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_perm_byte } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon-vrev.c b/gcc/testsuite/gcc.target/arm/neon-vrev.c
new file mode 100644
index 00000000000..10f41bc32bb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vrev.c
@@ -0,0 +1,105 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+#include <arm_neon.h>
+
+uint16x4_t
+tst_vrev642_u16 (uint16x4_t __a)
+{
+ uint16x4_t __rv;
+ uint16x4_t __mask1 = { 3, 2, 1, 0};
+ return __builtin_shuffle ( __a, __mask1) ;
+}
+
+uint16x8_t
+tst_vrev64q2_u16 (uint16x8_t __a)
+{
+ uint16x8_t __rv;
+ uint16x8_t __mask1 = {3, 2, 1, 0, 7, 6, 5, 4 };
+ return __builtin_shuffle ( __a, __mask1) ;
+}
+
+uint8x8_t
+tst_vrev642_u8 (uint8x8_t __a)
+{
+ uint8x8_t __rv;
+ uint8x8_t __mask1 = { 7, 6, 5, 4, 3, 2, 1, 0};
+ return __builtin_shuffle ( __a, __mask1) ;
+}
+
+uint8x16_t
+tst_vrev64q2_u8 (uint8x16_t __a)
+{
+ uint8x16_t __rv;
+ uint8x16_t __mask1 = {7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8};
+ return __builtin_shuffle ( __a, __mask1) ;
+
+}
+
+uint32x2_t
+tst_vrev642_u32 (uint32x2_t __a)
+{
+ uint32x2_t __rv;
+ uint32x2_t __mask1 = {1, 0};
+ return __builtin_shuffle ( __a, __mask1) ;
+
+}
+
+uint32x4_t
+tst_vrev64q2_u32 (uint32x4_t __a)
+{
+ uint32x4_t __rv;
+ uint32x4_t __mask1 = {1, 0, 3, 2};
+ return __builtin_shuffle ( __a, __mask1) ;
+}
+
+uint16x4_t
+tst_vrev322_u16 (uint16x4_t __a)
+{
+ uint16x4_t __mask1 = { 1, 0, 3, 2 };
+ return __builtin_shuffle (__a, __mask1);
+}
+
+uint16x8_t
+tst_vrev32q2_u16 (uint16x8_t __a)
+{
+ uint16x8_t __mask1 = { 1, 0, 3, 2, 5, 4, 7, 6 };
+ return __builtin_shuffle (__a, __mask1);
+}
+
+uint8x8_t
+tst_vrev322_u8 (uint8x8_t __a)
+{
+ uint8x8_t __mask1 = { 3, 2, 1, 0, 7, 6, 5, 4};
+ return __builtin_shuffle (__a, __mask1);
+}
+
+uint8x16_t
+tst_vrev32q2_u8 (uint8x16_t __a)
+{
+ uint8x16_t __mask1 = { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12};
+ return __builtin_shuffle (__a, __mask1);
+}
+
+uint8x8_t
+tst_vrev162_u8 (uint8x8_t __a)
+{
+ uint8x8_t __mask = { 1, 0, 3, 2, 5, 4, 7, 6};
+ return __builtin_shuffle (__a, __mask);
+}
+
+uint8x16_t
+tst_vrev16q2_u8 (uint8x16_t __a)
+{
+ uint8x16_t __mask = { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14};
+ return __builtin_shuffle (__a, __mask);
+}
+
+/* { dg-final {scan-assembler-times "vrev32\.16\\t" 2} } */
+/* { dg-final {scan-assembler-times "vrev32\.8\\t" 2} } */
+/* { dg-final {scan-assembler-times "vrev16\.8\\t" 2} } */
+/* { dg-final {scan-assembler-times "vrev64\.8\\t" 2} } */
+/* { dg-final {scan-assembler-times "vrev64\.32\\t" 2} } */
+/* { dg-final {scan-assembler-times "vrev64\.16\\t" 2} } */
diff --git a/gcc/testsuite/gcc.target/cris/asm-other.S b/gcc/testsuite/gcc.target/cris/asm-other.S
new file mode 100644
index 00000000000..4fe7ebfc41c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/asm-other.S
@@ -0,0 +1,15 @@
+/* { dg-do assemble } */
+/* { dg-options "-DOTHER_ISA=0 -march=v0" { target crisv32-*-* } } */
+/* { dg-options "-DOTHER_ISA=32 -march=v32" { target cris-*-* } } */
+
+/* Make sure we can assemble for the "other" variant, with the twist
+ that the gcc option -march=v0 isn't valid for the assembler. */
+ .text
+#if OTHER_ISA == 32
+ addoq 42,$r1,$acr
+#else
+0:
+ move.d [$r2=$r0+42],$r1
+ bwf 0b
+ nop
+#endif
diff --git a/gcc/testsuite/gcc.target/cris/asm-v10.S b/gcc/testsuite/gcc.target/cris/asm-v10.S
new file mode 100644
index 00000000000..c85ebe293bc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/asm-v10.S
@@ -0,0 +1,6 @@
+/* { dg-do assemble } */
+/* { dg-options "-DOTHER_ISA=10 -march=v10" } */
+
+/* Check that -march=v10 is also recognized. */
+
+#include "asm-other.S"
diff --git a/gcc/testsuite/gcc.target/cris/asm-v8.S b/gcc/testsuite/gcc.target/cris/asm-v8.S
new file mode 100644
index 00000000000..3fba3188454
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/asm-v8.S
@@ -0,0 +1,6 @@
+/* { dg-do assemble } */
+/* { dg-options "-DOTHER_ISA=8 -march=v8" } */
+
+/* Check that -march=v8 is also recognized. */
+
+#include "asm-other.S"
diff --git a/gcc/testsuite/gcc.target/cris/inasm-other.c b/gcc/testsuite/gcc.target/cris/inasm-other.c
new file mode 100644
index 00000000000..c1c043f56d3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/inasm-other.c
@@ -0,0 +1,23 @@
+/* { dg-do assemble } */
+/* { dg-options "-DOTHER_ISA=0 -march=v0" { target crisv32-*-* } } */
+/* { dg-options "-DOTHER_ISA=32 -march=v32" { target cris-*-* } } */
+
+/* Make sure we can (generate code and) assemble for the "other"
+ variant, with the twist that the gcc option -march=v0 isn't
+ valid for the assembler. We don't check that the generated code
+ is for the other variant; other tests cover that already, but they
+ don't *assemble* the result. We can't trust the prologue and
+ epilogue to contain incompatible insns (they actually deliberately
+ don't, usually and it'd be brittle to tweak the function signature
+ to make it so), so we force some with inline asm. */
+
+void f(void)
+{
+#if OTHER_ISA == 32
+ asm volatile ("addoq 42,$r11,$acr");
+#else
+ asm volatile ("0: move.d [$r12=$sp+42],$r10\n\t"
+ "bwf 0b\n\t"
+ "nop");
+#endif
+}
diff --git a/gcc/testsuite/gcc.target/cris/inasm-v10.c b/gcc/testsuite/gcc.target/cris/inasm-v10.c
new file mode 100644
index 00000000000..75379b3c8c2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/inasm-v10.c
@@ -0,0 +1,6 @@
+/* { dg-do assemble } */
+/* { dg-options "-DOTHER_ISA=10 -march=v10" } */
+
+/* Check that -march=v10 is also recognized. */
+
+#include "inasm-other.c"
diff --git a/gcc/testsuite/gcc.target/cris/inasm-v8.c b/gcc/testsuite/gcc.target/cris/inasm-v8.c
new file mode 100644
index 00000000000..b2fb3053c40
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/inasm-v8.c
@@ -0,0 +1,6 @@
+/* { dg-do assemble } */
+/* { dg-options "-DOTHER_ISA=8 -march=v8" } */
+
+/* Check that -march=v8 is also recognized. */
+
+#include "inasm-other.c"
diff --git a/gcc/testsuite/gcc.target/cris/torture/trap-1.c b/gcc/testsuite/gcc.target/cris/torture/trap-1.c
new file mode 100644
index 00000000000..48363fbb3f0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/trap-1.c
@@ -0,0 +1,13 @@
+/* Check that "break 8" defaults according to CPU version. */
+/* { dg-do compile } */
+/* { dg-skip-if "" { "*-*-*" } { "-march*" } { "" } } */
+/* { dg-final { scan-assembler "break 8" { target { ! cris-*-elf } } } } */
+/* { dg-final { scan-assembler-not "bsr" { target { ! cris-*-elf } } } } */
+/* { dg-final { scan-assembler-not "jsr" { target { ! cris-*-elf } } } } */
+/* { dg-final { scan-assembler-not "break\[ \t\]" { target cris-*-elf } } } */
+/* { dg-final { scan-assembler "\[jb\]sr \[_\]\?abort" { target cris-*-elf } } } */
+
+void do_trap (void)
+{
+ __builtin_trap ();
+}
diff --git a/gcc/testsuite/gcc.target/cris/torture/trap-2.c b/gcc/testsuite/gcc.target/cris/torture/trap-2.c
new file mode 100644
index 00000000000..155d5fe4273
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/trap-2.c
@@ -0,0 +1,11 @@
+/* As trap-1.c but forcing on. */
+/* { dg-do compile } */
+/* { dg-options "-mtrap-using-break8" } */
+/* { dg-final { scan-assembler "break 8" } } */
+/* { dg-final { scan-assembler-not "bsr" } } */
+/* { dg-final { scan-assembler-not "jsr" } } */
+
+void do_trap (void)
+{
+ __builtin_trap ();
+}
diff --git a/gcc/testsuite/gcc.target/cris/torture/trap-3.c b/gcc/testsuite/gcc.target/cris/torture/trap-3.c
new file mode 100644
index 00000000000..dfa092445ec
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/trap-3.c
@@ -0,0 +1,10 @@
+/* Like trap-1.c and trap-2.c but force calls to abort. */
+/* { dg-do compile } */
+/* { dg-options "-mno-trap-using-break8" } */
+/* { dg-final { scan-assembler-not "break\[ \t\]" } } */
+/* { dg-final { scan-assembler "\[jb\]sr \[_\]\?abort" } } */
+
+void do_trap (void)
+{
+ __builtin_trap ();
+}
diff --git a/gcc/testsuite/gcc.target/cris/torture/trap-v0.c b/gcc/testsuite/gcc.target/cris/torture/trap-v0.c
new file mode 100644
index 00000000000..084fb28d40b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/trap-v0.c
@@ -0,0 +1,11 @@
+/* As trap-1.c but with CPU version specified, excluding. */
+/* { dg-do compile } */
+/* { dg-skip-if "" { "*-*-*" } { "-march=*" } { "" } } */
+/* { dg-options "-march=v0" } */
+/* { dg-final { scan-assembler-not "break\[ \t\]" } } */
+/* { dg-final { scan-assembler "\[jb\]sr \[_\]\?abort" } } */
+
+void do_trap (void)
+{
+ __builtin_trap ();
+}
diff --git a/gcc/testsuite/gcc.target/cris/torture/trap-v3.c b/gcc/testsuite/gcc.target/cris/torture/trap-v3.c
new file mode 100644
index 00000000000..e004c5bc82b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/trap-v3.c
@@ -0,0 +1,12 @@
+/* As trap-1.c but with CPU version specified, including. */
+/* { dg-do compile } */
+/* { dg-skip-if "" { "*-*-*" } { "-march=*" } { "" } } */
+/* { dg-options "-march=v3" } */
+/* { dg-final { scan-assembler "break 8" } } */
+/* { dg-final { scan-assembler-not "bsr" } } */
+/* { dg-final { scan-assembler-not "jsr" } } */
+
+void do_trap (void)
+{
+ __builtin_trap ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/large-frame.c b/gcc/testsuite/gcc.target/i386/large-frame.c
new file mode 100644
index 00000000000..2b6df1f6db8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/large-frame.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-final { scan-assembler "-429496" } } */
+extern void dump (int *buf, int a);
+
+void func (int a)
+{
+ int bigbuf[1 << 30];
+ dump (bigbuf, a);
+}
diff --git a/gcc/testsuite/gcc.target/i386/shuf-concat.c b/gcc/testsuite/gcc.target/i386/shuf-concat.c
new file mode 100644
index 00000000000..04ed4a9dbb8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/shuf-concat.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O -msse2 -mfpmath=sse" } */
+
+typedef double v2df __attribute__ ((__vector_size__ (16)));
+
+v2df f(double d,double e){
+ v2df x={-d,d};
+ v2df y={-e,e};
+ return __builtin_ia32_shufpd(x,y,1);
+}
+
+/* { dg-final { scan-assembler-not "\tv?shufpd\[ \t\]" } } */
+/* { dg-final { scan-assembler-times "\tv?unpcklpd\[ \t\]" 1 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/lhs-1.c b/gcc/testsuite/gcc.target/powerpc/lhs-1.c
new file mode 100644
index 00000000000..3b606e685a9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/lhs-1.c
@@ -0,0 +1,22 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-options "-O2 -mcpu=power5" } */
+/* { dg-final { scan-assembler-times "nop" 3 } } */
+
+/* Test generation of nops in load hit store situation. */
+
+typedef union {
+ double val;
+ struct {
+ unsigned int w1;
+ unsigned int w2;
+ };
+} words;
+
+unsigned int f (double d)
+{
+ words u;
+ u.val = d;
+ return u.w2;
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/lhs-2.c b/gcc/testsuite/gcc.target/powerpc/lhs-2.c
new file mode 100644
index 00000000000..748011f8d54
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/lhs-2.c
@@ -0,0 +1,21 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-options "-O2 -mcpu=power6 -msched-groups" } */
+/* { dg-final { scan-assembler "ori 1,1,0" } } */
+
+/* Test generation of group ending nop in load hit store situation. */
+typedef union {
+ double val;
+ struct {
+ unsigned int w1;
+ unsigned int w2;
+ };
+} words;
+
+unsigned int f (double d)
+{
+ words u;
+ u.val = d;
+ return u.w2;
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/lhs-3.c b/gcc/testsuite/gcc.target/powerpc/lhs-3.c
new file mode 100644
index 00000000000..31677ed667a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/lhs-3.c
@@ -0,0 +1,21 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-options "-O2 -mcpu=power7" } */
+/* { dg-final { scan-assembler "ori 2,2,0" } } */
+
+/* Test generation of group ending nop in load hit store situation. */
+typedef union {
+ double val;
+ struct {
+ unsigned int w1;
+ unsigned int w2;
+ };
+} words;
+
+unsigned int f (double d)
+{
+ words u;
+ u.val = d;
+ return u.w2;
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/powerpc.exp b/gcc/testsuite/gcc.target/powerpc/powerpc.exp
index adc59f5804d..c59e4c3ef4d 100644
--- a/gcc/testsuite/gcc.target/powerpc/powerpc.exp
+++ b/gcc/testsuite/gcc.target/powerpc/powerpc.exp
@@ -23,6 +23,7 @@ if { ![istarget powerpc*-*-*] && ![istarget rs6000-*-*] } then {
# Load support procs.
load_lib gcc-dg.exp
+load_lib torture-options.exp
# If a testcase doesn't have special options, use these.
global DEFAULT_CFLAGS
@@ -47,4 +48,5 @@ set-torture-options $SAVRES_TEST_OPTS
gcc-dg-runtest [list $srcdir/$subdir/savres.c] $alti
# All done.
+torture-finish
dg-finish
diff --git a/gcc/testsuite/gcc.target/sh/pr51340-1.c b/gcc/testsuite/gcc.target/sh/pr51340-1.c
new file mode 100644
index 00000000000..337d502b9f8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr51340-1.c
@@ -0,0 +1,13 @@
+/* Check that the fmac insn is generated when -funsafe-math-optimizations
+ is specified. */
+/* { dg-do compile { target "sh*-*-*" } } */
+/* { dg-options "-O1 -funsafe-math-optimizations" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-final { scan-assembler "fmac" } } */
+
+float
+test_func (float a, float b, float c, float d, float e, float f)
+{
+ return a * b + c * d + e * f;
+}
+
diff --git a/gcc/testsuite/gcc.target/sh/pr51340-2.c b/gcc/testsuite/gcc.target/sh/pr51340-2.c
new file mode 100644
index 00000000000..ef9622ec47f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr51340-2.c
@@ -0,0 +1,12 @@
+/* Check that the fmac insn is not generated when -mno-fused-madd is specified. */
+/* { dg-do compile { target "sh*-*-*" } } */
+/* { dg-options "-O1 -funsafe-math-optimizations -mno-fused-madd" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-not "fmac" } } */
+
+float
+test_func (float a, float b, float c, float d, float e, float f)
+{
+ return a * b + c * d + e * f;
+}
+
diff --git a/gcc/testsuite/gcc.target/sh/pr51340-3.c b/gcc/testsuite/gcc.target/sh/pr51340-3.c
new file mode 100644
index 00000000000..d641ae3534e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr51340-3.c
@@ -0,0 +1,12 @@
+/* Check that the fmac insn is generated when -mfused-madd is specified. */
+/* { dg-do compile { target "sh*-*-*" } } */
+/* { dg-options "-O1 -mfused-madd" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-final { scan-assembler "fmac" } } */
+
+float
+test_func (float a, float b, float c, float d, float e, float f)
+{
+ return a * b + c * d + e * f;
+}
+
diff --git a/gcc/testsuite/gfortran.dg/allocate_with_typespec_6.f90 b/gcc/testsuite/gfortran.dg/allocate_with_typespec_6.f90
new file mode 100644
index 00000000000..cd130761a1b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/allocate_with_typespec_6.f90
@@ -0,0 +1,17 @@
+! { dg-do compile }
+!
+! PR fortran/51055
+! PR fortran/45170 comment 14
+!
+! Contributed by Juha Ruokolainen
+! and Hans-Werner Boschmann
+!
+! gfortran was before checking whether the length
+! was a specification expression.
+!
+
+program a
+ character(len=:), allocatable :: s
+ integer :: i=10
+ allocate(character(len=i)::s)
+end program a
diff --git a/gcc/testsuite/gnat.dg/array21.adb b/gcc/testsuite/gnat.dg/array21.adb
new file mode 100644
index 00000000000..c642afdd119
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/array21.adb
@@ -0,0 +1,16 @@
+-- { dg-do run }
+
+with System;
+
+procedure Array21 is
+
+ type Index_T is mod System.Memory_Size;
+ type Arr
+ is array (Index_T range Index_T'Last/2-3 .. Index_T'Last/2+3) of Integer;
+ C : constant Arr := (1, others => 2);
+
+begin
+ if C /= (1, 2, 2, 2, 2, 2, 2) then
+ raise Program_Error;
+ end if;
+end;
diff --git a/gcc/testsuite/gnat.dg/lto14.adb b/gcc/testsuite/gnat.dg/lto14.adb
new file mode 100644
index 00000000000..d81db7af325
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/lto14.adb
@@ -0,0 +1,7 @@
+-- { dg-do link }
+-- { dg-options "-largs -f -margs -flto" { target lto } }
+
+procedure Lto14 is
+begin
+ null;
+end;
diff --git a/gcc/testsuite/gnat.dg/renaming5.adb b/gcc/testsuite/gnat.dg/renaming5.adb
index 25374fe895c..28f8c2c7128 100644
--- a/gcc/testsuite/gnat.dg/renaming5.adb
+++ b/gcc/testsuite/gnat.dg/renaming5.adb
@@ -26,5 +26,5 @@ package body Renaming5 is
end Renaming5;
--- { dg-final { scan-tree-dump-times "goto" 2 "optimized" } }
+-- { dg-final { scan-tree-dump-times "goto" 3 "optimized" } }
-- { dg-final { cleanup-tree-dump "optimized" } }
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index b93dc5cda59..568f6b1cc5d 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -3462,7 +3462,8 @@ proc check_effective_target_vect_char_mult { } {
set et_vect_char_mult_saved 0
if { [istarget ia64-*-*]
|| [istarget i?86-*-*]
- || [istarget x86_64-*-*] } {
+ || [istarget x86_64-*-*]
+ || [check_effective_target_arm32] } {
set et_vect_char_mult_saved 1
}
}
diff --git a/gcc/toplev.c b/gcc/toplev.c
index fab5ca0231e..63ece319287 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -59,7 +59,6 @@ along with GCC; see the file COPYING3. If not see
#include "reload.h"
#include "ira.h"
#include "dwarf2asm.h"
-#include "integrate.h"
#include "debug.h"
#include "target.h"
#include "common/common-target.h"
@@ -578,8 +577,6 @@ compile_file (void)
basically finished. */
if (in_lto_p || !flag_lto || flag_fat_lto_objects)
{
- finish_aliases_2 ();
-
/* Likewise for mudflap static object registrations. */
if (flag_mudflap)
mudflap_finish_file ();
diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c
index 8887b9afee6..702682300d8 100644
--- a/gcc/trans-mem.c
+++ b/gcc/trans-mem.c
@@ -1778,7 +1778,7 @@ static struct tm_region *all_tm_regions;
static bitmap_obstack tm_obstack;
-/* A subroutine of tm_region_init. Record the existance of the
+/* A subroutine of tm_region_init. Record the existence of the
GIMPLE_TRANSACTION statement in a tree of tm_region elements. */
static struct tm_region *
@@ -4328,7 +4328,8 @@ ipa_tm_create_version_alias (struct cgraph_node *node, void *data)
record_tm_clone_pair (old_decl, new_decl);
- if (info->old_node->symbol.force_output)
+ if (info->old_node->symbol.force_output
+ || ipa_ref_list_first_referring (&info->old_node->symbol.ref_list))
ipa_tm_mark_force_output_node (new_node);
return false;
}
@@ -4381,7 +4382,8 @@ ipa_tm_create_version (struct cgraph_node *old_node)
record_tm_clone_pair (old_decl, new_decl);
cgraph_call_function_insertion_hooks (new_node);
- if (old_node->symbol.force_output)
+ if (old_node->symbol.force_output
+ || ipa_ref_list_first_referring (&old_node->symbol.ref_list))
ipa_tm_mark_force_output_node (new_node);
/* Do the same thing, but for any aliases of the original node. */
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c
index 3aff936972e..0acc0e23747 100644
--- a/gcc/tree-data-ref.c
+++ b/gcc/tree-data-ref.c
@@ -721,13 +721,12 @@ dr_analyze_innermost (struct data_reference *dr, struct loop *nest)
{
if (!integer_zerop (TREE_OPERAND (base, 1)))
{
+ double_int moff = mem_ref_offset (base);
+ tree mofft = double_int_to_tree (sizetype, moff);
if (!poffset)
- {
- double_int moff = mem_ref_offset (base);
- poffset = double_int_to_tree (sizetype, moff);
- }
+ poffset = mofft;
else
- poffset = size_binop (PLUS_EXPR, poffset, TREE_OPERAND (base, 1));
+ poffset = size_binop (PLUS_EXPR, poffset, mofft);
}
base = TREE_OPERAND (base, 0);
}
@@ -5266,26 +5265,33 @@ stores_from_loop (struct loop *loop, VEC (gimple, heap) **stmts)
bool
stmt_with_adjacent_zero_store_dr_p (gimple stmt)
{
- tree op0, op1;
+ tree lhs, rhs;
bool res;
struct data_reference *dr;
if (!stmt
|| !gimple_vdef (stmt)
- || !is_gimple_assign (stmt)
- || !gimple_assign_single_p (stmt)
- || !(op1 = gimple_assign_rhs1 (stmt))
- || !(integer_zerop (op1) || real_zerop (op1)))
+ || !gimple_assign_single_p (stmt))
+ return false;
+
+ lhs = gimple_assign_lhs (stmt);
+ rhs = gimple_assign_rhs1 (stmt);
+
+ /* If this is a bitfield store bail out. */
+ if (TREE_CODE (lhs) == COMPONENT_REF
+ && DECL_BIT_FIELD (TREE_OPERAND (lhs, 1)))
+ return false;
+
+ if (!(integer_zerop (rhs) || real_zerop (rhs)))
return false;
dr = XCNEW (struct data_reference);
- op0 = gimple_assign_lhs (stmt);
DR_STMT (dr) = stmt;
- DR_REF (dr) = op0;
+ DR_REF (dr) = lhs;
res = dr_analyze_innermost (dr, loop_containing_stmt (stmt))
- && stride_of_unit_type_p (DR_STEP (dr), TREE_TYPE (op0));
+ && stride_of_unit_type_p (DR_STEP (dr), TREE_TYPE (lhs));
free_data_ref (dr);
return res;
diff --git a/gcc/tree-dfa.c b/gcc/tree-dfa.c
index 31cafa09a73..ef87fd42844 100644
--- a/gcc/tree-dfa.c
+++ b/gcc/tree-dfa.c
@@ -118,27 +118,6 @@ struct gimple_opt_pass pass_referenced_vars =
};
-/*---------------------------------------------------------------------------
- Manage annotations
----------------------------------------------------------------------------*/
-/* Create a new annotation for a _DECL node T. */
-
-var_ann_t
-create_var_ann (tree t)
-{
- var_ann_t ann;
-
- gcc_assert (t);
- gcc_assert (TREE_CODE (t) == VAR_DECL
- || TREE_CODE (t) == PARM_DECL
- || TREE_CODE (t) == RESULT_DECL);
-
- ann = ggc_alloc_cleared_var_ann_d ();
- *DECL_VAR_ANN_PTR (t) = ann;
-
- return ann;
-}
-
/* Renumber all of the gimple stmt uids. */
void
@@ -451,7 +430,10 @@ find_vars_r (tree *tp, int *walk_subtrees, void *data)
/* If T is a regular variable that the optimizers are interested
in, add it to the list of variables. */
- else if (SSA_VAR_P (*tp))
+ else if ((TREE_CODE (*tp) == VAR_DECL
+ && !is_global_var (*tp))
+ || TREE_CODE (*tp) == PARM_DECL
+ || TREE_CODE (*tp) == RESULT_DECL)
add_referenced_var_1 (*tp, fn);
/* Type, _DECL and constant nodes have no interesting children.
@@ -581,17 +563,24 @@ add_referenced_var_1 (tree var, struct function *fn)
|| TREE_CODE (var) == PARM_DECL
|| TREE_CODE (var) == RESULT_DECL);
- if (!*DECL_VAR_ANN_PTR (var))
- create_var_ann (var);
+ gcc_checking_assert ((TREE_CODE (var) == VAR_DECL
+ && VAR_DECL_IS_VIRTUAL_OPERAND (var))
+ || !is_global_var (var));
- /* Insert VAR into the referenced_vars hash table if it isn't present. */
+ /* Insert VAR into the referenced_vars hash table if it isn't present
+ and allocate its var-annotation. */
if (referenced_var_check_and_insert (var, fn))
- return true;
+ {
+ gcc_checking_assert (!*DECL_VAR_ANN_PTR (var));
+ *DECL_VAR_ANN_PTR (var) = ggc_alloc_cleared_var_ann_d ();
+ return true;
+ }
return false;
}
-/* Remove VAR from the list. */
+/* Remove VAR from the list of referenced variables and clear its
+ var-annotation. */
void
remove_referenced_var (tree var)
@@ -601,14 +590,16 @@ remove_referenced_var (tree var)
void **loc;
unsigned int uid = DECL_UID (var);
- /* Preserve var_anns of globals. */
- if (!is_global_var (var)
- && (v_ann = var_ann (var)))
- {
- ggc_free (v_ann);
- *DECL_VAR_ANN_PTR (var) = NULL;
- }
- gcc_assert (DECL_P (var));
+ gcc_checking_assert (TREE_CODE (var) == VAR_DECL
+ || TREE_CODE (var) == PARM_DECL
+ || TREE_CODE (var) == RESULT_DECL);
+
+ gcc_checking_assert (!is_global_var (var));
+
+ v_ann = var_ann (var);
+ ggc_free (v_ann);
+ *DECL_VAR_ANN_PTR (var) = NULL;
+
in.uid = uid;
loc = htab_find_slot_with_hash (gimple_referenced_vars (cfun), &in, uid,
NO_INSERT);
@@ -630,7 +621,8 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset,
HOST_WIDE_INT bitsize = -1;
HOST_WIDE_INT maxsize = -1;
tree size_tree = NULL_TREE;
- HOST_WIDE_INT bit_offset = 0;
+ double_int bit_offset = double_int_zero;
+ HOST_WIDE_INT hbit_offset;
bool seen_variable_array_ref = false;
tree base_type;
@@ -668,7 +660,9 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset,
switch (TREE_CODE (exp))
{
case BIT_FIELD_REF:
- bit_offset += TREE_INT_CST_LOW (TREE_OPERAND (exp, 2));
+ bit_offset
+ = double_int_add (bit_offset,
+ tree_to_double_int (TREE_OPERAND (exp, 2)));
break;
case COMPONENT_REF:
@@ -676,22 +670,23 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset,
tree field = TREE_OPERAND (exp, 1);
tree this_offset = component_ref_field_offset (exp);
- if (this_offset
- && TREE_CODE (this_offset) == INTEGER_CST
- && host_integerp (this_offset, 0))
+ if (this_offset && TREE_CODE (this_offset) == INTEGER_CST)
{
- HOST_WIDE_INT hthis_offset = TREE_INT_CST_LOW (this_offset);
- hthis_offset *= BITS_PER_UNIT;
- hthis_offset
- += TREE_INT_CST_LOW (DECL_FIELD_BIT_OFFSET (field));
- bit_offset += hthis_offset;
+ double_int doffset = tree_to_double_int (this_offset);
+ doffset = double_int_lshift (doffset,
+ BITS_PER_UNIT == 8
+ ? 3 : exact_log2 (BITS_PER_UNIT),
+ HOST_BITS_PER_DOUBLE_INT, true);
+ doffset = double_int_add (doffset,
+ tree_to_double_int
+ (DECL_FIELD_BIT_OFFSET (field)));
+ bit_offset = double_int_add (bit_offset, doffset);
/* If we had seen a variable array ref already and we just
referenced the last field of a struct or a union member
then we have to adjust maxsize by the padding at the end
of our field. */
- if (seen_variable_array_ref
- && maxsize != -1)
+ if (seen_variable_array_ref && maxsize != -1)
{
tree stype = TREE_TYPE (TREE_OPERAND (exp, 0));
tree next = DECL_CHAIN (field);
@@ -703,10 +698,12 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset,
tree fsize = DECL_SIZE_UNIT (field);
tree ssize = TYPE_SIZE_UNIT (stype);
if (host_integerp (fsize, 0)
- && host_integerp (ssize, 0))
+ && host_integerp (ssize, 0)
+ && double_int_fits_in_shwi_p (doffset))
maxsize += ((TREE_INT_CST_LOW (ssize)
- TREE_INT_CST_LOW (fsize))
- * BITS_PER_UNIT - hthis_offset);
+ * BITS_PER_UNIT
+ - double_int_to_shwi (doffset));
else
maxsize = -1;
}
@@ -718,8 +715,12 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset,
/* We need to adjust maxsize to the whole structure bitsize.
But we can subtract any constant offset seen so far,
because that would get us out of the structure otherwise. */
- if (maxsize != -1 && csize && host_integerp (csize, 1))
- maxsize = TREE_INT_CST_LOW (csize) - bit_offset;
+ if (maxsize != -1
+ && csize
+ && host_integerp (csize, 1)
+ && double_int_fits_in_shwi_p (bit_offset))
+ maxsize = TREE_INT_CST_LOW (csize)
+ - double_int_to_shwi (bit_offset);
else
maxsize = -1;
}
@@ -731,24 +732,26 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset,
{
tree index = TREE_OPERAND (exp, 1);
tree low_bound, unit_size;
- double_int doffset;
/* If the resulting bit-offset is constant, track it. */
if (TREE_CODE (index) == INTEGER_CST
&& (low_bound = array_ref_low_bound (exp),
TREE_CODE (low_bound) == INTEGER_CST)
&& (unit_size = array_ref_element_size (exp),
- host_integerp (unit_size, 1))
- && (doffset = double_int_sext
- (double_int_sub (TREE_INT_CST (index),
- TREE_INT_CST (low_bound)),
- TYPE_PRECISION (TREE_TYPE (index))),
- double_int_fits_in_shwi_p (doffset)))
+ TREE_CODE (unit_size) == INTEGER_CST))
{
- HOST_WIDE_INT hoffset = double_int_to_shwi (doffset);
- hoffset *= TREE_INT_CST_LOW (unit_size);
- hoffset *= BITS_PER_UNIT;
- bit_offset += hoffset;
+ double_int doffset
+ = double_int_sext
+ (double_int_sub (TREE_INT_CST (index),
+ TREE_INT_CST (low_bound)),
+ TYPE_PRECISION (TREE_TYPE (index)));
+ doffset = double_int_mul (doffset,
+ tree_to_double_int (unit_size));
+ doffset = double_int_lshift (doffset,
+ BITS_PER_UNIT == 8
+ ? 3 : exact_log2 (BITS_PER_UNIT),
+ HOST_BITS_PER_DOUBLE_INT, true);
+ bit_offset = double_int_add (bit_offset, doffset);
/* An array ref with a constant index up in the structure
hierarchy will constrain the size of any variable array ref
@@ -761,8 +764,12 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset,
/* We need to adjust maxsize to the whole array bitsize.
But we can subtract any constant offset seen so far,
because that would get us outside of the array otherwise. */
- if (maxsize != -1 && asize && host_integerp (asize, 1))
- maxsize = TREE_INT_CST_LOW (asize) - bit_offset;
+ if (maxsize != -1
+ && asize
+ && host_integerp (asize, 1)
+ && double_int_fits_in_shwi_p (bit_offset))
+ maxsize = TREE_INT_CST_LOW (asize)
+ - double_int_to_shwi (bit_offset);
else
maxsize = -1;
@@ -777,7 +784,8 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset,
break;
case IMAGPART_EXPR:
- bit_offset += bitsize;
+ bit_offset
+ = double_int_add (bit_offset, uhwi_to_double_int (bitsize));
break;
case VIEW_CONVERT_EXPR:
@@ -796,10 +804,10 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset,
BITS_PER_UNIT == 8
? 3 : exact_log2 (BITS_PER_UNIT),
HOST_BITS_PER_DOUBLE_INT, true);
- off = double_int_add (off, shwi_to_double_int (bit_offset));
+ off = double_int_add (off, bit_offset);
if (double_int_fits_in_shwi_p (off))
{
- bit_offset = double_int_to_shwi (off);
+ bit_offset = off;
exp = TREE_OPERAND (TREE_OPERAND (exp, 0), 0);
}
}
@@ -815,7 +823,7 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset,
if (TMR_INDEX (exp) || TMR_INDEX2 (exp))
{
exp = TREE_OPERAND (TMR_BASE (exp), 0);
- bit_offset = 0;
+ bit_offset = double_int_zero;
maxsize = -1;
goto done;
}
@@ -828,10 +836,10 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset,
BITS_PER_UNIT == 8
? 3 : exact_log2 (BITS_PER_UNIT),
HOST_BITS_PER_DOUBLE_INT, true);
- off = double_int_add (off, shwi_to_double_int (bit_offset));
+ off = double_int_add (off, bit_offset);
if (double_int_fits_in_shwi_p (off))
{
- bit_offset = double_int_to_shwi (off);
+ bit_offset = off;
exp = TREE_OPERAND (TMR_BASE (exp), 0);
}
}
@@ -846,6 +854,17 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset,
}
done:
+ if (!double_int_fits_in_shwi_p (bit_offset))
+ {
+ *poffset = 0;
+ *psize = bitsize;
+ *pmax_size = -1;
+
+ return exp;
+ }
+
+ hbit_offset = double_int_to_shwi (bit_offset);
+
/* We need to deal with variable arrays ending structures such as
struct { int length; int a[1]; } x; x.a[d]
struct { struct { int a; int b; } a[1]; } x; x.a[d].a
@@ -860,7 +879,7 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset,
if (seen_variable_array_ref
&& maxsize != -1
&& (!host_integerp (TYPE_SIZE (base_type), 1)
- || (bit_offset + maxsize
+ || (hbit_offset + maxsize
== (signed) TREE_INT_CST_LOW (TYPE_SIZE (base_type)))))
maxsize = -1;
@@ -872,7 +891,7 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset,
base decl. */
if (maxsize == -1
&& host_integerp (DECL_SIZE (exp), 1))
- maxsize = TREE_INT_CST_LOW (DECL_SIZE (exp)) - bit_offset;
+ maxsize = TREE_INT_CST_LOW (DECL_SIZE (exp)) - hbit_offset;
}
else if (CONSTANT_CLASS_P (exp))
{
@@ -880,13 +899,13 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset,
base type constant. */
if (maxsize == -1
&& host_integerp (TYPE_SIZE (TREE_TYPE (exp)), 1))
- maxsize = TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (exp))) - bit_offset;
+ maxsize = TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (exp))) - hbit_offset;
}
/* ??? Due to negative offsets in ARRAY_REF we can end up with
negative bit_offset here. We might want to store a zero offset
in this case. */
- *poffset = bit_offset;
+ *poffset = hbit_offset;
*psize = bitsize;
*pmax_size = maxsize;
diff --git a/gcc/tree-diagnostic.c b/gcc/tree-diagnostic.c
index cbdbb778259..774b6c44dd0 100644
--- a/gcc/tree-diagnostic.c
+++ b/gcc/tree-diagnostic.c
@@ -89,16 +89,13 @@ DEF_VEC_ALLOC_O (loc_map_pair, heap);
Here is the diagnostic that we want the compiler to generate:
- test.c: In function 'g':
- test.c:5:14: error: invalid operands to binary << (have 'double' and 'int')
- test.c:2:9: note: in expansion of macro 'OPERATE'
- test.c:5:3: note: expanded from here
- test.c:5:14: note: in expansion of macro 'SHIFTL'
- test.c:8:3: note: expanded from here
- test.c:8:3: note: in expansion of macro 'MULT'
- test.c:13:3: note: expanded from here
-
- The part that goes from the third to the eighth line of this
+ test.c: In function ‘g’:
+ test.c:5:14: error: invalid operands to binary << (have ‘double’ and ‘int’)
+ test.c:2:9: note: in definition of macro 'OPERATE'
+ test.c:8:3: note: in expansion of macro 'SHIFTL'
+ test.c:13:3: note: in expansion of macro 'MULT'
+
+ The part that goes from the third to the fifth line of this
diagnostic (the lines containing the 'note:' string) is called the
unwound macro expansion trace. That's the part generated by this
function. */
@@ -150,10 +147,38 @@ maybe_unwind_expanded_macro_loc (diagnostic_context *context,
if (!LINEMAP_SYSP (map))
FOR_EACH_VEC_ELT (loc_map_pair, loc_vec, ix, iter)
{
- source_location resolved_def_loc = 0, resolved_exp_loc = 0;
+ source_location resolved_def_loc = 0, resolved_exp_loc = 0,
+ saved_location = 0;
+ int resolved_def_loc_line = 0, saved_location_line = 0;
diagnostic_t saved_kind;
const char *saved_prefix;
- source_location saved_location;
+ /* Sometimes, in the unwound macro expansion trace, we want to
+ print a part of the context that shows where, in the
+ definition of the relevant macro, is the token (we are
+ looking at) used. That is the case in the introductory
+ comment of this function, where we print:
+
+ test.c:2:9: note: in definition of macro 'OPERATE'.
+
+ We print that "macro definition context" because the
+ diagnostic line (emitted by the call to
+ pp_ouput_formatted_text in diagnostic_report_diagnostic):
+
+ test.c:5:14: error: invalid operands to binary << (have ‘double’ and ‘int’)
+
+ does not point into the definition of the macro where the
+ token '<<' (that is an argument to the function-like macro
+ OPERATE) is used. So we must "display" the line of that
+ macro definition context to the user somehow.
+
+ A contrario, when the first interesting diagnostic line
+ points into the definition of the macro, we don't need to
+ display any line for that macro definition in the trace
+ anymore, otherwise it'd be redundant.
+
+ This flag is true when we need to display the context of
+ the macro definition. */
+ bool print_definition_context_p = false;
/* Okay, now here is what we want. For each token resulting
from macro expansion we want to show: 1/ where in the
@@ -176,6 +201,8 @@ maybe_unwind_expanded_macro_loc (diagnostic_context *context,
if (l < RESERVED_LOCATION_COUNT
|| LINEMAP_SYSP (m))
continue;
+
+ resolved_def_loc_line = SOURCE_LINE (m, l);
}
/* Resolve the location of the expansion point of the macro
@@ -189,22 +216,40 @@ maybe_unwind_expanded_macro_loc (diagnostic_context *context,
saved_kind = diagnostic->kind;
saved_prefix = pp_get_prefix (context->printer);
saved_location = diagnostic->location;
+ saved_location_line =
+ expand_location_to_spelling_point (saved_location).line;
diagnostic->kind = DK_NOTE;
- diagnostic->location = resolved_def_loc;
- pp_set_prefix (context->printer,
- diagnostic_build_prefix (context, diagnostic));
- pp_newline (context->printer);
- pp_printf (context->printer, "in expansion of macro '%s'",
- linemap_map_get_macro_name (iter->map));
- pp_destroy_prefix (context->printer);
- diagnostic_show_locus (context, diagnostic);
- diagnostic->location = resolved_exp_loc;
- pp_set_prefix (context->printer,
+ /* We need to print the context of the macro definition only
+ when the locus of the first displayed diagnostic (displayed
+ before this trace) was inside the definition of the
+ macro. */
+ print_definition_context_p =
+ (ix == 0 && (saved_location_line != resolved_def_loc_line));
+
+ if (print_definition_context_p)
+ {
+ diagnostic->location = resolved_def_loc;
+ pp_set_prefix (context->printer,
+ diagnostic_build_prefix (context, diagnostic));
+ pp_newline (context->printer);
+ pp_printf (context->printer, "in definition of macro '%s'",
+ linemap_map_get_macro_name (iter->map));
+ pp_destroy_prefix (context->printer);
+ diagnostic_show_locus (context, diagnostic);
+ /* At this step, as we've printed the context of the macro
+ definition, we don't want to print the context of its
+ expansion, otherwise, it'd be redundant. */
+ continue;
+ }
+
+ diagnostic->location = resolved_exp_loc;
+ pp_set_prefix (context->printer,
diagnostic_build_prefix (context, diagnostic));
- pp_newline (context->printer);
- pp_string (context->printer, "expanded from here");
+ pp_newline (context->printer);
+ pp_printf (context->printer, "in expansion of macro '%s'",
+ linemap_map_get_macro_name (iter->map));
pp_destroy_prefix (context->printer);
diagnostic_show_locus (context, diagnostic);
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c
index ef2b5848569..89b95fa78af 100644
--- a/gcc/tree-eh.c
+++ b/gcc/tree-eh.c
@@ -1346,7 +1346,7 @@ lower_try_finally_switch (struct leh_state *state, struct leh_tf_state *tf)
/* Begin inserting code for getting to the finally block. Things
are done in this order to correspond to the sequence the code is
- layed out. */
+ laid out. */
if (tf->may_fallthru)
{
@@ -1957,7 +1957,7 @@ lower_eh_constructs_2 (struct leh_state *state, gimple_stmt_iterator *gsi)
/* If the stmt can throw use a new temporary for the assignment
to a LHS. This makes sure the old value of the LHS is
available on the EH edge. Only do so for statements that
- potentially fall thru (no noreturn calls e.g.), otherwise
+ potentially fall through (no noreturn calls e.g.), otherwise
this new assignment might create fake fallthru regions. */
if (stmt_could_throw_p (stmt)
&& gimple_has_lhs (stmt)
@@ -2748,7 +2748,7 @@ maybe_clean_or_replace_eh_stmt (gimple old_stmt, gimple new_stmt)
return false;
}
-/* Given a statement OLD_STMT in OLD_FUN and a duplicate statment NEW_STMT
+/* Given a statement OLD_STMT in OLD_FUN and a duplicate statement NEW_STMT
in NEW_FUN, copy the EH table data from OLD_STMT to NEW_STMT. The MAP
operand is the return value of duplicate_eh_regions. */
@@ -3307,7 +3307,7 @@ lower_eh_dispatch (basic_block src, gimple stmt)
/* Collect the labels for a switch. Zero the post_landing_pad
field becase we'll no longer have anything keeping these labels
- in existance and the optimizer will be free to merge these
+ in existence and the optimizer will be free to merge these
blocks at will. */
for (c = r->u.eh_try.first_catch; c ; c = c->next_catch)
{
diff --git a/gcc/tree-emutls.c b/gcc/tree-emutls.c
index bae41ac62e6..25da389abbb 100644
--- a/gcc/tree-emutls.c
+++ b/gcc/tree-emutls.c
@@ -434,7 +434,6 @@ gen_emutls_addr (tree decl, struct lower_emutls_data *d)
addr = create_tmp_var (build_pointer_type (TREE_TYPE (decl)), NULL);
x = gimple_build_call (d->builtin_decl, 1, build_fold_addr_expr (cdecl));
gimple_set_location (x, d->loc);
- add_referenced_var (cdecl);
addr = make_ssa_name (addr, x);
gimple_call_set_lhs (x, addr);
diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h
index 8627fc37250..748a97c236e 100644
--- a/gcc/tree-flow-inline.h
+++ b/gcc/tree-flow-inline.h
@@ -39,7 +39,7 @@ gimple_in_ssa_p (const struct function *fun)
static inline htab_t
gimple_referenced_vars (const struct function *fun)
{
- if (!fun->gimple_df)
+ if (!fun || !fun->gimple_df)
return NULL;
return fun->gimple_df->referenced_vars;
}
diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h
index 78bd9f86353..4394b2891bd 100644
--- a/gcc/tree-flow.h
+++ b/gcc/tree-flow.h
@@ -482,7 +482,6 @@ extern int op_prio (const_tree);
extern const char *op_symbol_code (enum tree_code);
/* In tree-dfa.c */
-extern var_ann_t create_var_ann (tree);
extern void renumber_gimple_stmt_uids (void);
extern void renumber_gimple_stmt_uids_in_blocks (basic_block *, int);
extern void dump_dfa_stats (FILE *);
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index f7fcd25fda6..2abdb8914a8 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -48,7 +48,6 @@ along with GCC; see the file COPYING3. If not see
#include "value-prof.h"
#include "tree-pass.h"
#include "target.h"
-#include "integrate.h"
#include "rtl.h" /* FIXME: For asm_str_count. */
@@ -818,6 +817,15 @@ remap_gimple_op_r (tree *tp, int *walk_subtrees, void *data)
|| decl_function_context (*tp) == id->src_fn))
/* These may need to be remapped for EH handling. */
*tp = remap_decl (*tp, id);
+ else if (TREE_CODE (*tp) == FIELD_DECL)
+ {
+ /* If the enclosing record type is variably_modified_type_p, the field
+ has already been remapped. Otherwise, it need not be. */
+ tree *n = (tree *) pointer_map_contains (id->decl_map, *tp);
+ if (n)
+ *tp = *n;
+ *walk_subtrees = 0;
+ }
else if (TYPE_P (*tp))
/* Types may need remapping as well. */
*tp = remap_type (*tp, id);
@@ -876,8 +884,8 @@ remap_gimple_op_r (tree *tp, int *walk_subtrees, void *data)
/* Global variables we haven't seen yet need to go into referenced
vars. If not referenced from types only. */
- if (gimple_in_ssa_p (cfun)
- && TREE_CODE (*tp) == VAR_DECL
+ if (gimple_referenced_vars (cfun)
+ && TREE_CODE (*tp) == VAR_DECL && !is_global_var (*tp)
&& id->remapping_type_depth == 0
&& !processing_debug_stmt)
add_referenced_var (*tp);
@@ -1141,8 +1149,8 @@ copy_tree_body_r (tree *tp, int *walk_subtrees, void *data)
/* Global variables we haven't seen yet needs to go into referenced
vars. If not referenced from types or debug stmts only. */
- if (gimple_in_ssa_p (cfun)
- && TREE_CODE (*tp) == VAR_DECL
+ if (gimple_referenced_vars (cfun)
+ && TREE_CODE (*tp) == VAR_DECL && !is_global_var (*tp)
&& id->remapping_type_depth == 0
&& !processing_debug_stmt)
add_referenced_var (*tp);
@@ -2626,11 +2634,11 @@ setup_one_parameter (copy_body_data *id, tree p, tree value, tree fn,
/* We are eventually using the value - make sure all variables
referenced therein are properly recorded. */
if (value
- && gimple_in_ssa_p (cfun)
+ && gimple_referenced_vars (cfun)
&& TREE_CODE (value) == ADDR_EXPR)
{
tree base = get_base_address (TREE_OPERAND (value, 0));
- if (base && TREE_CODE (base) == VAR_DECL)
+ if (base && TREE_CODE (base) == VAR_DECL && !is_global_var (base))
add_referenced_var (base);
}
@@ -2939,7 +2947,7 @@ declare_return_variable (copy_body_data *id, tree return_slot, tree modify_dest,
gcc_assert (TREE_CODE (TYPE_SIZE_UNIT (callee_type)) == INTEGER_CST);
var = copy_result_decl_to_var (result, id);
- if (gimple_in_ssa_p (cfun))
+ if (gimple_referenced_vars (cfun))
add_referenced_var (var);
DECL_SEEN_IN_BIND_EXPR_P (var) = 1;
@@ -3000,7 +3008,7 @@ declare_return_variable (copy_body_data *id, tree return_slot, tree modify_dest,
&& !is_gimple_val (var))
{
tree temp = create_tmp_var (TREE_TYPE (result), "retvalptr");
- if (gimple_in_ssa_p (id->src_cfun))
+ if (gimple_referenced_vars (cfun))
add_referenced_var (temp);
insert_decl_map (id, result, temp);
/* When RESULT_DECL is in SSA form, we need to remap and initialize
@@ -3249,6 +3257,29 @@ inline_forbidden_p (tree fndecl)
pointer_set_destroy (visited_nodes);
return forbidden_p;
}
+
+/* Return false if the function FNDECL cannot be inlined on account of its
+ attributes, true otherwise. */
+static bool
+function_attribute_inlinable_p (const_tree fndecl)
+{
+ if (targetm.attribute_table)
+ {
+ const_tree a;
+
+ for (a = DECL_ATTRIBUTES (fndecl); a; a = TREE_CHAIN (a))
+ {
+ const_tree name = TREE_PURPOSE (a);
+ int i;
+
+ for (i = 0; targetm.attribute_table[i].name != NULL; i++)
+ if (is_attribute_p (targetm.attribute_table[i].name, name))
+ return targetm.function_attribute_inlinable_p (fndecl);
+ }
+ }
+
+ return true;
+}
/* Returns nonzero if FN is a function that does not have any
fundamental inline blocking properties. */
@@ -5323,10 +5354,8 @@ tree_function_versioning (tree old_decl, tree new_decl,
if (TREE_CODE (op) == ADDR_EXPR)
{
- op = TREE_OPERAND (op, 0);
- while (handled_component_p (op))
- op = TREE_OPERAND (op, 0);
- if (TREE_CODE (op) == VAR_DECL)
+ op = get_base_address (TREE_OPERAND (op, 0));
+ if (op && TREE_CODE (op) == VAR_DECL && !is_global_var (op))
add_referenced_var (op);
}
gcc_assert (TREE_CODE (replace_info->old_tree) == PARM_DECL);
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c
index f4b03bd8394..5f7018a6783 100644
--- a/gcc/tree-loop-distribution.c
+++ b/gcc/tree-loop-distribution.c
@@ -80,32 +80,19 @@ ssa_name_has_uses_outside_loop_p (tree def, loop_p loop)
}
/* Returns true when STMT defines a scalar variable used after the
- loop. */
+ loop LOOP. */
static bool
-stmt_has_scalar_dependences_outside_loop (gimple stmt)
+stmt_has_scalar_dependences_outside_loop (loop_p loop, gimple stmt)
{
- tree name;
+ def_operand_p def_p;
+ ssa_op_iter op_iter;
- switch (gimple_code (stmt))
- {
- case GIMPLE_CALL:
- case GIMPLE_ASSIGN:
- name = gimple_get_lhs (stmt);
- break;
-
- case GIMPLE_PHI:
- name = gimple_phi_result (stmt);
- break;
-
- default:
- return false;
- }
+ FOR_EACH_SSA_DEF_OPERAND (def_p, stmt, op_iter, SSA_OP_DEF)
+ if (ssa_name_has_uses_outside_loop_p (DEF_FROM_PTR (def_p), loop))
+ return true;
- return (name
- && TREE_CODE (name) == SSA_NAME
- && ssa_name_has_uses_outside_loop_p (name,
- loop_containing_stmt (stmt)));
+ return false;
}
/* Update the PHI nodes of NEW_LOOP. NEW_LOOP is a duplicate of
@@ -382,9 +369,16 @@ generate_builtin (struct loop *loop, bitmap partition, bool copy_p)
if (!bitmap_bit_p (partition, x++))
continue;
- /* If the stmt has uses outside of the loop fail. */
- if (stmt_has_scalar_dependences_outside_loop (stmt))
- goto end;
+ /* If the stmt has uses outside of the loop fail.
+ ??? If the stmt is generated in another partition that
+ is not created as builtin we can ignore this. */
+ if (stmt_has_scalar_dependences_outside_loop (loop, stmt))
+ {
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ fprintf (dump_file, "not generating builtin, partition has "
+ "scalar uses outside of the loop\n");
+ goto end;
+ }
if (is_gimple_assign (stmt)
&& !is_gimple_reg (gimple_assign_lhs (stmt)))
@@ -879,60 +873,6 @@ fuse_partitions_with_similar_memory_accesses (struct graph *rdg,
}
}
-/* Returns true when STMT will be code generated in a partition of RDG
- different than PART and that will not be code generated as a
- builtin. */
-
-static bool
-stmt_generated_in_another_partition (struct graph *rdg, gimple stmt, int part,
- VEC (bitmap, heap) *partitions)
-{
- int p;
- bitmap pp;
- unsigned i;
- bitmap_iterator bi;
-
- FOR_EACH_VEC_ELT (bitmap, partitions, p, pp)
- if (p != part
- && !can_generate_builtin (rdg, pp))
- EXECUTE_IF_SET_IN_BITMAP (pp, 0, i, bi)
- if (stmt == RDG_STMT (rdg, i))
- return true;
-
- return false;
-}
-
-/* For each partition in PARTITIONS that will be code generated using
- a builtin, add its scalar computations used after the loop to
- PARTITION. */
-
-static void
-add_scalar_computations_to_partition (struct graph *rdg,
- VEC (bitmap, heap) *partitions,
- bitmap partition)
-{
- int p;
- bitmap pp;
- unsigned i;
- bitmap_iterator bi;
- bitmap l = BITMAP_ALLOC (NULL);
- bitmap pr = BITMAP_ALLOC (NULL);
- bool f = false;
-
- FOR_EACH_VEC_ELT (bitmap, partitions, p, pp)
- if (can_generate_builtin (rdg, pp))
- EXECUTE_IF_SET_IN_BITMAP (pp, 0, i, bi)
- if (stmt_has_scalar_dependences_outside_loop (RDG_STMT (rdg, i))
- && !stmt_generated_in_another_partition (rdg, RDG_STMT (rdg, i), p,
- partitions))
- rdg_flag_vertex_and_dependent (rdg, i, partition, l, pr, &f);
-
- rdg_flag_loop_exits (rdg, l, partition, pr, &f);
-
- BITMAP_FREE (pr);
- BITMAP_FREE (l);
-}
-
/* Aggregate several components into a useful partition that is
registered in the PARTITIONS vector. Partitions will be
distributed in different loops. */
@@ -996,8 +936,6 @@ rdg_build_partitions (struct graph *rdg, VEC (rdgc, heap) *components,
free_rdg_components (comps);
}
- add_scalar_computations_to_partition (rdg, *partitions, partition);
-
/* If there is something left in the last partition, save it. */
if (bitmap_count_bits (partition) > 0)
VEC_safe_push (bitmap, heap, *partitions, partition);
diff --git a/gcc/tree-mudflap.c b/gcc/tree-mudflap.c
index edd7755a701..dfb0ae1ee7d 100644
--- a/gcc/tree-mudflap.c
+++ b/gcc/tree-mudflap.c
@@ -427,10 +427,6 @@ execute_mudflap_function_ops (void)
push_gimplify_context (&gctx);
- add_referenced_var (mf_cache_array_decl);
- add_referenced_var (mf_cache_shift_decl);
- add_referenced_var (mf_cache_mask_decl);
-
/* In multithreaded mode, don't cache the lookup cache parameters. */
if (! flag_mudflap_threads)
mf_decl_cache_locals ();
diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c
index 1566902e3d7..310fe3bd1d7 100644
--- a/gcc/tree-predcom.c
+++ b/gcc/tree-predcom.c
@@ -100,7 +100,7 @@ along with GCC; see the file COPYING3. If not see
and we can combine the chains for e and f into one chain.
5) For each root reference (end of the chain) R, let N be maximum distance
- of a reference reusing its value. Variables R0 upto RN are created,
+ of a reference reusing its value. Variables R0 up to RN are created,
together with phi nodes that transfer values from R1 .. RN to
R0 .. R(N-1).
Initial values are loaded to R0..R(N-1) (in case not all references
diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c
index 55ea0fa8a22..4136821bca6 100644
--- a/gcc/tree-profile.c
+++ b/gcc/tree-profile.c
@@ -347,7 +347,6 @@ gimple_gen_ic_profiler (histogram_value value, unsigned tag, unsigned base)
gimple_assign_set_lhs (stmt2, make_ssa_name (tmp1, stmt2));
find_referenced_vars_in (stmt2);
stmt3 = gimple_build_assign (ic_void_ptr_var, gimple_assign_lhs (stmt2));
- add_referenced_var (ic_void_ptr_var);
gsi_insert_before (&gsi, stmt1, GSI_SAME_STMT);
gsi_insert_before (&gsi, stmt2, GSI_SAME_STMT);
@@ -383,11 +382,9 @@ gimple_gen_ic_func_profiler (void)
counter_ptr = force_gimple_operand_gsi (&gsi, ic_gcov_type_ptr_var,
true, NULL_TREE, true,
GSI_SAME_STMT);
- add_referenced_var (ic_gcov_type_ptr_var);
ptr_var = force_gimple_operand_gsi (&gsi, ic_void_ptr_var,
true, NULL_TREE, true,
GSI_SAME_STMT);
- add_referenced_var (ic_void_ptr_var);
tree_uid = build_int_cst (gcov_type_node, current_function_funcdef_no);
stmt1 = gimple_build_call (tree_indirect_call_profiler_fn, 4,
counter_ptr, tree_uid, cur_func, ptr_var);
@@ -494,7 +491,8 @@ tree_profiling (void)
gcov_type_tmp_var = NULL_TREE;
/* Local pure-const may imply need to fixup the cfg. */
- execute_fixup_cfg ();
+ if (execute_fixup_cfg () & TODO_cleanup_cfg)
+ cleanup_tree_cfg ();
branch_prob ();
if (! flag_branch_probabilities
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 3f84f6b22fb..2e3e97898fe 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -1081,7 +1081,7 @@ disqualify_ops_if_throwing_stmt (gimple stmt, tree lhs, tree rhs)
return false;
}
-/* Scan expressions occuring in STMT, create access structures for all accesses
+/* Scan expressions occurring in STMT, create access structures for all accesses
to candidates for scalarization and remove those candidates which occur in
statements or expressions that prevent them from being split apart. Return
true if any access has been inserted. */
@@ -1549,17 +1549,20 @@ build_user_friendly_ref_for_offset (tree *res, tree type, HOST_WIDE_INT offset,
for (fld = TYPE_FIELDS (type); fld; fld = DECL_CHAIN (fld))
{
HOST_WIDE_INT pos, size;
- tree expr, *expr_ptr;
+ tree tr_pos, expr, *expr_ptr;
if (TREE_CODE (fld) != FIELD_DECL)
continue;
- pos = int_bit_position (fld);
+ tr_pos = bit_position (fld);
+ if (!tr_pos || !host_integerp (tr_pos, 1))
+ continue;
+ pos = TREE_INT_CST_LOW (tr_pos);
gcc_assert (TREE_CODE (type) == RECORD_TYPE || pos == 0);
tr_size = DECL_SIZE (fld);
if (!tr_size || !host_integerp (tr_size, 1))
continue;
- size = tree_low_cst (tr_size, 1);
+ size = TREE_INT_CST_LOW (tr_size);
if (size == 0)
{
if (pos != offset)
@@ -2096,9 +2099,12 @@ analyze_access_subtree (struct access *root, struct access *parent,
&& (TREE_CODE (root->type) != INTEGER_TYPE
|| TYPE_PRECISION (root->type) != root->size)
/* But leave bitfield accesses alone. */
- && (root->offset % BITS_PER_UNIT) == 0)
+ && (TREE_CODE (root->expr) != COMPONENT_REF
+ || !DECL_BIT_FIELD (TREE_OPERAND (root->expr, 1))))
{
tree rt = root->type;
+ gcc_assert ((root->offset % BITS_PER_UNIT) == 0
+ && (root->size % BITS_PER_UNIT) == 0);
root->type = build_nonstandard_integer_type (root->size,
TYPE_UNSIGNED (rt));
root->expr = build_ref_for_offset (UNKNOWN_LOCATION,
diff --git a/gcc/tree-ssa-address.c b/gcc/tree-ssa-address.c
index e11da3eb869..ca261341c3f 100644
--- a/gcc/tree-ssa-address.c
+++ b/gcc/tree-ssa-address.c
@@ -868,7 +868,7 @@ copy_ref_info (tree new_ref, tree old_ref)
duplicate_ssa_name_ptr_info
(new_ptr_base, SSA_NAME_PTR_INFO (TREE_OPERAND (base, 0)));
new_pi = SSA_NAME_PTR_INFO (new_ptr_base);
- /* We have to be careful about transfering alignment information. */
+ /* We have to be careful about transferring alignment information. */
if (get_ptr_info_alignment (new_pi, &align, &misalign)
&& TREE_CODE (old_ref) == MEM_REF
&& !(TREE_CODE (new_ref) == TARGET_MEM_REF
diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c
index 5f3484d3a7d..252020624b4 100644
--- a/gcc/tree-ssa-live.c
+++ b/gcc/tree-ssa-live.c
@@ -348,6 +348,7 @@ static inline void mark_all_vars_used (tree *, void *data);
static tree
mark_all_vars_used_1 (tree *tp, int *walk_subtrees, void *data)
{
+ bitmap global_unused_vars = (bitmap)data;
tree t = *tp;
enum tree_code_class c = TREE_CODE_CLASS (TREE_CODE (t));
tree b;
@@ -374,15 +375,20 @@ mark_all_vars_used_1 (tree *tp, int *walk_subtrees, void *data)
eliminated as unused. */
if (TREE_CODE (t) == VAR_DECL)
{
- if (data != NULL && bitmap_clear_bit ((bitmap) data, DECL_UID (t))
- && DECL_CONTEXT (t) == current_function_decl)
- mark_all_vars_used (&DECL_INITIAL (t), data);
- if (var_ann (t) != NULL)
+ /* Global vars do not have a var-annotation so their use is tracked
+ with the global_unused_vars bitmap. Also walk their initializer
+ when they are first recognized as used. */
+ if (is_global_var (t))
+ {
+ if (bitmap_clear_bit (global_unused_vars, DECL_UID (t)))
+ mark_all_vars_used (&DECL_INITIAL (t), data);
+ }
+ else
set_is_used (t);
}
/* remove_unused_scope_block_p requires information about labels
which are not DECL_IGNORED_P to tell if they might be used in the IL. */
- if (TREE_CODE (t) == LABEL_DECL)
+ else if (TREE_CODE (t) == LABEL_DECL)
/* Although the TREE_USED values that the frontend uses would be
acceptable (albeit slightly over-conservative) for our purposes,
init_vars_expansion clears TREE_USED for LABEL_DECLs too, so we
@@ -423,7 +429,7 @@ mark_scope_block_unused (tree scope)
done by the inliner. */
static bool
-remove_unused_scope_block_p (tree scope)
+remove_unused_scope_block_p (tree scope, bitmap global_unused_vars)
{
tree *t, *next;
bool unused = !TREE_USED (scope);
@@ -466,7 +472,9 @@ remove_unused_scope_block_p (tree scope)
info about optimized-out variables in the scope blocks.
Exception are the scope blocks not containing any instructions
at all so user can't get into the scopes at first place. */
- else if (var_ann (*t) != NULL && is_used_p (*t))
+ else if ((is_global_var (*t)
+ && !bitmap_bit_p (global_unused_vars, DECL_UID (*t)))
+ || (var_ann (*t) != NULL && is_used_p (*t)))
unused = false;
else if (TREE_CODE (*t) == LABEL_DECL && TREE_USED (*t))
/* For labels that are still used in the IL, the decision to
@@ -511,7 +519,7 @@ remove_unused_scope_block_p (tree scope)
}
for (t = &BLOCK_SUBBLOCKS (scope); *t ;)
- if (remove_unused_scope_block_p (*t))
+ if (remove_unused_scope_block_p (*t, global_unused_vars))
{
if (BLOCK_SUBBLOCKS (*t))
{
@@ -689,7 +697,7 @@ remove_unused_locals (void)
tree var, t;
referenced_var_iterator rvi;
bitmap global_unused_vars = NULL;
- unsigned srcidx, dstidx, num;
+ unsigned srcidx, dstidx, num, ix;
bool have_local_clobbers = false;
/* Removing declarations from lexical blocks when not optimizing is
@@ -706,6 +714,13 @@ remove_unused_locals (void)
FOR_EACH_REFERENCED_VAR (cfun, t, rvi)
clear_is_used (t);
+ /* Assume all globals in local decls are unused. */
+ global_unused_vars = BITMAP_ALLOC (NULL);
+ FOR_EACH_LOCAL_DECL (cfun, ix, var)
+ if (TREE_CODE (var) == VAR_DECL
+ && is_global_var (var))
+ bitmap_set_bit (global_unused_vars, DECL_UID (var));
+
/* Walk the CFG marking all referenced symbols. */
FOR_EACH_BB (bb)
{
@@ -733,7 +748,8 @@ remove_unused_locals (void)
TREE_USED (b) = true;
for (i = 0; i < gimple_num_ops (stmt); i++)
- mark_all_vars_used (gimple_op_ptr (gsi_stmt (gsi), i), NULL);
+ mark_all_vars_used (gimple_op_ptr (gsi_stmt (gsi), i),
+ global_unused_vars);
}
for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi))
@@ -743,17 +759,16 @@ remove_unused_locals (void)
tree def;
gimple phi = gsi_stmt (gsi);
- /* No point processing globals. */
- if (is_global_var (SSA_NAME_VAR (gimple_phi_result (phi))))
+ if (!is_gimple_reg (gimple_phi_result (phi)))
continue;
def = gimple_phi_result (phi);
- mark_all_vars_used (&def, NULL);
+ mark_all_vars_used (&def, global_unused_vars);
FOR_EACH_PHI_ARG (arg_p, phi, i, SSA_OP_ALL_USES)
{
tree arg = USE_FROM_PTR (arg_p);
- mark_all_vars_used (&arg, NULL);
+ mark_all_vars_used (&arg, global_unused_vars);
}
}
@@ -783,7 +798,10 @@ remove_unused_locals (void)
lhs = get_base_address (lhs);
if (TREE_CODE (lhs) == SSA_NAME)
lhs = SSA_NAME_VAR (lhs);
- if (DECL_P (lhs) && (!var_ann (lhs) || !is_used_p (lhs)))
+ if (TREE_CODE (lhs) == VAR_DECL
+ && ((is_global_var (lhs)
+ && bitmap_bit_p (global_unused_vars, DECL_UID (lhs)))
+ || (!is_global_var (lhs) && !is_used_p (lhs))))
{
unlink_stmt_vdef (stmt);
gsi_remove (&gsi, true);
@@ -799,27 +817,33 @@ remove_unused_locals (void)
cfun->has_local_explicit_reg_vars = false;
- /* Remove unmarked local vars from local_decls. */
+ /* Remove unmarked local and global vars from local_decls
+ and referenced vars. */
num = VEC_length (tree, cfun->local_decls);
for (srcidx = 0, dstidx = 0; srcidx < num; srcidx++)
{
var = VEC_index (tree, cfun->local_decls, srcidx);
- if (TREE_CODE (var) != FUNCTION_DECL
- && (!var_ann (var)
- || !is_used_p (var)))
+ if (TREE_CODE (var) == VAR_DECL)
{
if (is_global_var (var))
{
- if (global_unused_vars == NULL)
- global_unused_vars = BITMAP_ALLOC (NULL);
- bitmap_set_bit (global_unused_vars, DECL_UID (var));
+ if (bitmap_bit_p (global_unused_vars, DECL_UID (var)))
+ continue;
+ }
+ else if (var_ann (var) == NULL
+ || !is_used_p (var))
+ {
+ if (var_ann (var))
+ remove_referenced_var (var);
+ if (cfun->nonlocal_goto_save_area
+ && TREE_OPERAND (cfun->nonlocal_goto_save_area, 0) == var)
+ cfun->nonlocal_goto_save_area = NULL;
+ continue;
}
- else
- continue;
}
- else if (TREE_CODE (var) == VAR_DECL
- && DECL_HARD_REGISTER (var)
- && !is_global_var (var))
+ if (TREE_CODE (var) == VAR_DECL
+ && DECL_HARD_REGISTER (var)
+ && !is_global_var (var))
cfun->has_local_explicit_reg_vars = true;
if (srcidx != dstidx)
@@ -829,45 +853,19 @@ remove_unused_locals (void)
if (dstidx != num)
VEC_truncate (tree, cfun->local_decls, dstidx);
- /* Remove unmarked global vars from local_decls. */
- if (global_unused_vars != NULL)
- {
- tree var;
- unsigned ix;
- FOR_EACH_LOCAL_DECL (cfun, ix, var)
- if (TREE_CODE (var) == VAR_DECL
- && is_global_var (var)
- && var_ann (var) != NULL
- && is_used_p (var)
- && DECL_CONTEXT (var) == current_function_decl)
- mark_all_vars_used (&DECL_INITIAL (var), global_unused_vars);
-
- num = VEC_length (tree, cfun->local_decls);
- for (srcidx = 0, dstidx = 0; srcidx < num; srcidx++)
- {
- var = VEC_index (tree, cfun->local_decls, srcidx);
- if (TREE_CODE (var) == VAR_DECL
- && is_global_var (var)
- && bitmap_bit_p (global_unused_vars, DECL_UID (var)))
- continue;
-
- if (srcidx != dstidx)
- VEC_replace (tree, cfun->local_decls, dstidx, var);
- dstidx++;
- }
- if (dstidx != num)
- VEC_truncate (tree, cfun->local_decls, dstidx);
- BITMAP_FREE (global_unused_vars);
- }
-
- /* Remove unused variables from REFERENCED_VARs. */
+ /* ??? We end up with decls in referenced-vars that are not in
+ local-decls. */
FOR_EACH_REFERENCED_VAR (cfun, t, rvi)
- if (!is_global_var (t)
- && TREE_CODE (t) != PARM_DECL
- && TREE_CODE (t) != RESULT_DECL
+ if (TREE_CODE (t) == VAR_DECL
+ && !VAR_DECL_IS_VIRTUAL_OPERAND (t)
&& !is_used_p (t))
remove_referenced_var (t);
- remove_unused_scope_block_p (DECL_INITIAL (current_function_decl));
+
+ remove_unused_scope_block_p (DECL_INITIAL (current_function_decl),
+ global_unused_vars);
+
+ BITMAP_FREE (global_unused_vars);
+
if (dump_file && (dump_flags & TDF_DETAILS))
{
fprintf (dump_file, "Scope blocks after cleanups:\n");
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 3016f08e7e3..9ce3a42f182 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -4704,7 +4704,7 @@ may_eliminate_iv (struct ivopts_data *data,
period_value = tree_to_double_int (period);
if (double_int_ucmp (max_niter, period_value) > 0)
{
- /* See if we can take advantage of infered loop bound information. */
+ /* See if we can take advantage of inferred loop bound information. */
if (data->loop_single_exit_p)
{
if (!max_loop_iterations (loop, &max_niter))
@@ -4817,7 +4817,7 @@ determine_use_iv_cost_condition (struct ivopts_data *data,
/* When the condition is a comparison of the candidate IV against
zero, prefer this IV.
- TODO: The constant that we're substracting from the cost should
+ TODO: The constant that we're subtracting from the cost should
be target-dependent. This information should be added to the
target costs for each backend. */
if (!infinite_cost_p (elim_cost) /* Do not try to decrease infinite! */
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c
index 8d99408d54b..befe4612834 100644
--- a/gcc/tree-ssa-loop-niter.c
+++ b/gcc/tree-ssa-loop-niter.c
@@ -591,7 +591,7 @@ number_of_iterations_ne_max (mpz_t bnd, bool no_overflow, tree c, tree s,
overflow, ... */
if (exit_must_be_taken)
{
- /* ... then we can strenghten this to C / S, and possibly we can use
+ /* ... then we can strengthen this to C / S, and possibly we can use
the upper bound on C given by BNDS. */
if (TREE_CODE (c) == INTEGER_CST)
mpz_set_double_int (bnd, tree_to_double_int (c), true);
diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c
index f54d08dffee..a8aaed3962a 100644
--- a/gcc/tree-ssa-math-opts.c
+++ b/gcc/tree-ssa-math-opts.c
@@ -2533,7 +2533,7 @@ convert_mult_to_fma (gimple mul_stmt, tree op1, tree op2)
a*b-c -> fma(a,b,-c): we've exchanged MUL+SUB for FMA+NEG, which
is still two operations. Consider -(a*b)-c -> fma(-a,b,-c): we
still have 3 operations, but in the FMA form the two NEGs are
- independant and could be run in parallel. */
+ independent and could be run in parallel. */
}
FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, mul_result)
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c
index d415ba2faba..1367e1b03b3 100644
--- a/gcc/tree-ssa-operands.c
+++ b/gcc/tree-ssa-operands.c
@@ -177,7 +177,6 @@ create_vop_var (struct function *fn)
TREE_ADDRESSABLE (global_var) = 0;
VAR_DECL_IS_VIRTUAL_OPERAND (global_var) = 1;
- create_var_ann (global_var);
add_referenced_var_1 (global_var, fn);
fn->gimple_df->vop = global_var;
}
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index c63acec556d..9adf55d18cf 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -4069,7 +4069,7 @@ compute_avail (void)
if (TREE_CODE (nary->op[i]) == SSA_NAME)
add_to_exp_gen (block, nary->op[i]);
- /* If the NARY traps and there was a preceeding
+ /* If the NARY traps and there was a preceding
point in the block that might not return avoid
adding the nary to EXP_GEN. */
if (BB_MAY_NOTRETURN (block)
diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c
index a057ad72bed..1c3c77b2229 100644
--- a/gcc/tree-ssa-propagate.c
+++ b/gcc/tree-ssa-propagate.c
@@ -723,7 +723,7 @@ update_gimple_call (gimple_stmt_iterator *si_p, tree fn, int nargs, ...)
call. This can only be done if EXPR is a CALL_EXPR with valid
GIMPLE operands as arguments, or if it is a suitable RHS expression
for a GIMPLE_ASSIGN. More complex expressions will require
- gimplification, which will introduce addtional statements. In this
+ gimplification, which will introduce additional statements. In this
event, no update is performed, and the function returns false.
Note that we cannot mutate a GIMPLE_CALL in-place, so we always
replace the statement at *SI_P with an entirely new statement.
diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c
index 9c363931b76..b4f442de7a8 100644
--- a/gcc/tree-ssa-reassoc.c
+++ b/gcc/tree-ssa-reassoc.c
@@ -1245,15 +1245,15 @@ build_and_add_sum (tree tmpvar, tree op1, tree op2, enum tree_code opcode)
in the candidates bitmap with relevant indices into *OPS.
- Second we build the chains of multiplications or divisions for
- these candidates, counting the number of occurences of (operand, code)
+ these candidates, counting the number of occurrences of (operand, code)
pairs in all of the candidates chains.
- - Third we sort the (operand, code) pairs by number of occurence and
+ - Third we sort the (operand, code) pairs by number of occurrence and
process them starting with the pair with the most uses.
* For each such pair we walk the candidates again to build a
second candidate bitmap noting all multiplication/division chains
- that have at least one occurence of (operand, code).
+ that have at least one occurrence of (operand, code).
* We build an alternate addition chain only covering these
candidates with one (operand, code) operation removed from their
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index ad9460b9411..ae912d732a8 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -998,7 +998,7 @@ vn_reference_fold_indirect (VEC (vn_reference_op_s, heap) **ops,
HOST_WIDE_INT addr_offset;
/* The only thing we have to do is from &OBJ.foo.bar add the offset
- from .foo.bar to the preceeding MEM_REF offset and replace the
+ from .foo.bar to the preceding MEM_REF offset and replace the
address with &OBJ. */
addr_base = get_addr_base_and_unit_offset (TREE_OPERAND (op->op0, 0),
&addr_offset);
@@ -1043,7 +1043,7 @@ vn_reference_maybe_forwprop_address (VEC (vn_reference_op_s, heap) **ops,
off = double_int_sext (off, TYPE_PRECISION (TREE_TYPE (mem_op->op0)));
/* The only thing we have to do is from &OBJ.foo.bar add the offset
- from .foo.bar to the preceeding MEM_REF offset and replace the
+ from .foo.bar to the preceding MEM_REF offset and replace the
address with &OBJ. */
if (code == ADDR_EXPR)
{
@@ -1379,7 +1379,7 @@ vn_reference_lookup_or_insert_for_pieces (tree vuse,
/* Callback for walk_non_aliased_vuses. Tries to perform a lookup
from the statement defining VUSE and if not successful tries to
- translate *REFP and VR_ through an aggregate copy at the defintion
+ translate *REFP and VR_ through an aggregate copy at the definition
of VUSE. */
static void *
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 09642a03f42..e2fdff34e7b 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -5583,7 +5583,8 @@ create_variable_info_for (tree decl, const char *name)
/* If this is a global variable with an initializer and we are in
IPA mode generate constraints for it. */
- if (DECL_INITIAL (decl))
+ if (DECL_INITIAL (decl)
+ && vnode->analyzed)
{
VEC (ce_s, heap) *rhsc = NULL;
struct constraint_expr lhs, *rhsp;
diff --git a/gcc/tree-ssa-ter.c b/gcc/tree-ssa-ter.c
index af8aae04a74..c4a50f5d329 100644
--- a/gcc/tree-ssa-ter.c
+++ b/gcc/tree-ssa-ter.c
@@ -473,7 +473,7 @@ finished_with_expr (temp_expr_table_p tab, int version, bool free_expr)
bitmap_iterator bi;
/* Remove this expression from its dependent lists. The partition dependence
- list is retained and transfered later to whomever uses this version. */
+ list is retained and transferred later to whomever uses this version. */
if (tab->partition_dependencies[version])
{
EXECUTE_IF_SET_IN_BITMAP (tab->partition_dependencies[version], 0, i, bi)
diff --git a/gcc/tree-ssa-uninit.c b/gcc/tree-ssa-uninit.c
index f1ec31527c2..7337b68b4fe 100644
--- a/gcc/tree-ssa-uninit.c
+++ b/gcc/tree-ssa-uninit.c
@@ -1756,7 +1756,7 @@ normalize_preds (VEC(use_pred_info_t, heap) **preds, size_t *n)
/* Computes the predicates that guard the use and checks
if the incoming paths that have empty (or possibly
- empty) defintion can be pruned/filtered. The function returns
+ empty) definition can be pruned/filtered. The function returns
true if it can be determined that the use of PHI's def in
USE_STMT is guarded with a predicate set not overlapping with
predicate sets of all runtime paths that do not have a definition.
@@ -1764,7 +1764,7 @@ normalize_preds (VEC(use_pred_info_t, heap) **preds, size_t *n)
the bb of the use (for phi operand use, the bb is not the bb of
the phi stmt, but the src bb of the operand edge). UNINIT_OPNDS
is a bit vector. If an operand of PHI is uninitialized, the
- correponding bit in the vector is 1. VISIED_PHIS is a pointer
+ corresponding bit in the vector is 1. VISIED_PHIS is a pointer
set of phis being visted. */
static bool
diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c
index 64455af9604..ac63bc671eb 100644
--- a/gcc/tree-ssanames.c
+++ b/gcc/tree-ssanames.c
@@ -281,7 +281,7 @@ set_ptr_info_alignment (struct ptr_info_def *pi, unsigned int align,
pi->misalign = misalign;
}
-/* If pointer decribed by PI has known alignment, increase its known
+/* If pointer described by PI has known alignment, increase its known
misalignment by INCREMENT modulo its current alignment. */
void
diff --git a/gcc/tree-switch-conversion.c b/gcc/tree-switch-conversion.c
index 4f3d1d30f20..def6f5d3e1a 100644
--- a/gcc/tree-switch-conversion.c
+++ b/gcc/tree-switch-conversion.c
@@ -630,7 +630,6 @@ build_one_array (gimple swtch, int num, tree arr_index_type, gimple phi,
DECL_ARTIFICIAL (decl) = 1;
TREE_CONSTANT (decl) = 1;
TREE_READONLY (decl) = 1;
- add_referenced_var (decl);
varpool_finalize_decl (decl);
fetch = build4 (ARRAY_REF, value_type, decl, tidx, NULL_TREE,
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index a5ed0533db6..e34f41a3f1f 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -2972,10 +2972,6 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo,
return false;
}
- base = unshare_expr (DR_BASE_ADDRESS (dr));
- offset = unshare_expr (DR_OFFSET (dr));
- init = unshare_expr (DR_INIT (dr));
-
if (stmt_can_throw_internal (stmt))
{
if (vect_print_dump_info (REPORT_UNVECTORIZED_LOCATIONS))
@@ -2997,6 +2993,32 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo,
return false;
}
+ if (TREE_CODE (DR_REF (dr)) == COMPONENT_REF
+ && DECL_BIT_FIELD (TREE_OPERAND (DR_REF (dr), 1)))
+ {
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOCATIONS))
+ {
+ fprintf (vect_dump, "not vectorized: statement is bitfield "
+ "access ");
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ }
+
+ if (bb_vinfo)
+ {
+ STMT_VINFO_VECTORIZABLE (stmt_info) = false;
+ stop_bb_analysis = true;
+ continue;
+ }
+
+ if (gather)
+ free_data_ref (dr);
+ return false;
+ }
+
+ base = unshare_expr (DR_BASE_ADDRESS (dr));
+ offset = unshare_expr (DR_OFFSET (dr));
+ init = unshare_expr (DR_INIT (dr));
+
if (is_gimple_call (stmt))
{
if (vect_print_dump_info (REPORT_UNVECTORIZED_LOCATIONS))
diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c
index a865fec5d81..10e194fcf1e 100644
--- a/gcc/tree-vect-generic.c
+++ b/gcc/tree-vect-generic.c
@@ -508,7 +508,7 @@ type_for_widest_vector_mode (tree type, optab op)
returns either the element itself, either BIT_FIELD_REF, or an
ARRAY_REF expression.
- GSI is requred to insert temporary variables while building a
+ GSI is required to insert temporary variables while building a
refernece to the element of the vector VECT.
PTMPVEC is a pointer to the temporary variable for caching
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index 4690a4e9211..83cc77116d9 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -1291,7 +1291,7 @@ vect_supported_load_permutation_p (slp_instance slp_instn, int group_size,
FORNOW: not supported in loop SLP because of realignment compications. */
bb_vinfo = STMT_VINFO_BB_VINFO (vinfo_for_stmt (stmt));
bad_permutation = false;
- /* Check that for every node in the instance teh loads form a subchain. */
+ /* Check that for every node in the instance the loads form a subchain. */
if (bb_vinfo)
{
FOR_EACH_VEC_ELT (slp_tree, SLP_INSTANCE_LOADS (slp_instn), i, node)
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 4dc942cc388..2c1bcad9507 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -3282,8 +3282,8 @@ extract_range_from_cond_expr (value_range_t *vr, gimple stmt)
set_value_range_to_varying (&vr1);
/* The resulting value range is the union of the operand ranges */
- vrp_meet (&vr0, &vr1);
copy_value_range (vr, &vr0);
+ vrp_meet (vr, &vr1);
}
@@ -6888,13 +6888,17 @@ vrp_meet (value_range_t *vr0, value_range_t *vr1)
{
if (vr0->type == VR_UNDEFINED)
{
- copy_value_range (vr0, vr1);
+ /* Drop equivalences. See PR53465. */
+ set_value_range (vr0, vr1->type, vr1->min, vr1->max, NULL);
return;
}
if (vr1->type == VR_UNDEFINED)
{
- /* Nothing to do. VR0 already has the resulting range. */
+ /* VR0 already has the resulting range, just drop equivalences.
+ See PR53465. */
+ if (vr0->equiv)
+ bitmap_clear (vr0->equiv);
return;
}
@@ -7036,6 +7040,7 @@ vrp_visit_phi_node (gimple phi)
tree lhs = PHI_RESULT (phi);
value_range_t *lhs_vr = get_value_range (lhs);
value_range_t vr_result = { VR_UNDEFINED, NULL_TREE, NULL_TREE, NULL };
+ bool first = true;
int edges, old_edges;
struct loop *l;
@@ -7092,7 +7097,11 @@ vrp_visit_phi_node (gimple phi)
fprintf (dump_file, "\n");
}
- vrp_meet (&vr_result, &vr_arg);
+ if (first)
+ copy_value_range (&vr_result, &vr_arg);
+ else
+ vrp_meet (&vr_result, &vr_arg);
+ first = false;
if (vr_result.type == VR_VARYING)
break;
diff --git a/gcc/tree.c b/gcc/tree.c
index a001ec221be..38d4038862b 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -1416,17 +1416,24 @@ build_constructor (tree type, VEC(constructor_elt,gc) *vals)
unsigned int i;
constructor_elt *elt;
bool constant_p = true;
+ bool side_effects_p = false;
TREE_TYPE (c) = type;
CONSTRUCTOR_ELTS (c) = vals;
FOR_EACH_VEC_ELT (constructor_elt, vals, i, elt)
- if (!TREE_CONSTANT (elt->value))
- {
+ {
+ /* Mostly ctors will have elts that don't have side-effects, so
+ the usual case is to scan all the elements. Hence a single
+ loop for both const and side effects, rather than one loop
+ each (with early outs). */
+ if (!TREE_CONSTANT (elt->value))
constant_p = false;
- break;
- }
+ if (TREE_SIDE_EFFECTS (elt->value))
+ side_effects_p = true;
+ }
+ TREE_SIDE_EFFECTS (c) = side_effects_p;
TREE_CONSTANT (c) = constant_p;
return c;
@@ -3050,7 +3057,7 @@ push_without_duplicates (tree exp, VEC (tree, heap) **queue)
VEC_safe_push (tree, heap, *queue, exp);
}
-/* Given a tree EXP, find all occurences of references to fields
+/* Given a tree EXP, find all occurrences of references to fields
in a PLACEHOLDER_EXPR and place them in vector REFS without
duplicates. Also record VAR_DECLs and CONST_DECLs. Note that
we assume here that EXP contains only arithmetic expressions
@@ -8480,8 +8487,11 @@ variably_modified_type_p (tree type, tree fn)
a variable in FN. */
#define RETURN_TRUE_IF_VAR(T) \
do { tree _t = (T); \
- if (_t && _t != error_mark_node && TREE_CODE (_t) != INTEGER_CST \
- && (!fn || walk_tree (&_t, find_var_from_fn, fn, NULL))) \
+ if (_t != NULL_TREE \
+ && _t != error_mark_node \
+ && TREE_CODE (_t) != INTEGER_CST \
+ && TREE_CODE (_t) != PLACEHOLDER_EXPR \
+ && (!fn || walk_tree (&_t, find_var_from_fn, fn, NULL))) \
return true; } while (0)
if (type == error_mark_node)
diff --git a/gcc/tree.h b/gcc/tree.h
index 37630f9ea99..0188eefb51f 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -318,25 +318,14 @@ extern const unsigned char tree_code_length[];
extern const char *const tree_code_name[];
-/* We have to be able to tell cgraph about the needed-ness of the target
- of an alias. This requires that the decl have been defined. Aliases
- that precede their definition have to be queued for later processing. */
-
-/* The deferred processing proceeds in several passes. We memorize the
- diagnostics emitted for a pair to prevent repeating messages when the
- queue gets re-scanned after possible updates. */
-
-typedef enum {
- ALIAS_DIAG_NONE = 0x0,
- ALIAS_DIAG_TO_UNDEF = 0x1,
- ALIAS_DIAG_TO_EXTERN = 0x2
-} alias_diag_flags;
-
+/* When procesing aliases on symtab level, we need the declaration of target.
+ For this reason we need to queue aliases and process them after all declarations
+ has been produced. */
+
typedef struct GTY(()) alias_pair
{
tree decl;
tree target;
- int emitted_diags; /* alias_diags already emitted for this pair. */
} alias_pair;
/* Define gc'd vector type. */
@@ -4864,7 +4853,7 @@ typedef struct record_layout_info_s
/* The alignment of the record so far, ignoring #pragma pack and
__attribute__ ((packed)), in bits. */
unsigned int unpacked_align;
- /* The previous field layed out. */
+ /* The previous field laid out. */
tree prev_field;
/* The static variables (i.e., class variables, as opposed to
instance variables) encountered in T. */
@@ -5097,7 +5086,7 @@ extern bool contains_placeholder_p (const_tree);
extern bool type_contains_placeholder_p (tree);
-/* Given a tree EXP, find all occurences of references to fields
+/* Given a tree EXP, find all occurrences of references to fields
in a PLACEHOLDER_EXPR and place them in vector REFS without
duplicates. Also record VAR_DECLs and CONST_DECLs. Note that
we assume here that EXP contains only arithmetic expressions
@@ -5828,10 +5817,6 @@ extern tree decl_attributes (tree *, tree, int);
extern void apply_tm_attr (tree, tree);
-/* In integrate.c */
-extern void set_decl_abstract_flags (tree, int);
-extern void set_decl_origin_self (tree);
-
/* In stor-layout.c */
extern void set_min_and_max_values_for_integral_type (tree, int, bool);
extern void fixup_signed_type (tree);
@@ -5850,24 +5835,8 @@ extern void mark_decl_referenced (tree);
extern void notice_global_symbol (tree);
extern void set_user_assembler_name (tree, const char *);
extern void process_pending_assemble_externals (void);
-extern void finish_aliases_1 (void);
-extern void finish_aliases_2 (void);
-extern void remove_unreachable_alias_pairs (void);
extern bool decl_replaceable_p (tree);
extern bool decl_binds_to_current_def_p (tree);
-
-/* Derived type for use by compute_visible_aliases and callers. A symbol
- alias set is a pointer set into which we enter IDENTIFIER_NODES bearing
- the canonicalised assembler-level symbol names corresponding to decls
- and their aliases. */
-typedef struct pointer_set_t symbol_alias_set_t;
-
-extern void symbol_alias_set_destroy (symbol_alias_set_t *);
-extern int symbol_alias_set_contains (const symbol_alias_set_t *, tree);
-extern symbol_alias_set_t * propagate_aliases_backward (bool (*)
- (tree, tree, void *),
- void *);
-
/* In stmt.c */
extern void expand_computed_goto (tree);
extern bool parse_output_constraint (const char **, int, int, int,
@@ -5879,7 +5848,6 @@ extern tree resolve_asm_operand_names (tree, tree, tree, tree);
extern bool expand_switch_using_bit_tests_p (tree, tree, unsigned int,
unsigned int);
extern void expand_case (gimple);
-extern void expand_decl (tree);
#ifdef HARD_CONST
/* Silly ifdef to avoid having all includers depend on hard-reg-set.h. */
extern tree tree_overlaps_hard_reg_set (tree, HARD_REG_SET *);
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 0a854dc1f9b..ee60c6eecb7 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -549,7 +549,7 @@ default_function_section (tree decl, enum node_frequency freq,
return NULL;
/* Startup code should go to startup subsection unless it is
unlikely executed (this happens especially with function splitting
- where we can split away unnecesary parts of static constructors. */
+ where we can split away unnecessary parts of static constructors. */
if (startup && freq != NODE_FREQUENCY_UNLIKELY_EXECUTED)
return get_named_text_section (decl, ".text.startup", NULL);
@@ -5438,7 +5438,7 @@ VEC(alias_pair,gc) *alias_pairs;
or ASM_OUTPUT_DEF_FROM_DECLS. The function defines the symbol whose
tree node is DECL to have the value of the tree node TARGET. */
-static void
+void
do_assemble_alias (tree decl, tree target)
{
/* Emulated TLS had better not get this var. */
@@ -5538,255 +5538,6 @@ do_assemble_alias (tree decl, tree target)
#endif
}
-
-/* Allocate and construct a symbol alias set. */
-
-static symbol_alias_set_t *
-symbol_alias_set_create (void)
-{
- return pointer_set_create ();
-}
-
-/* Destruct and free a symbol alias set. */
-
-void
-symbol_alias_set_destroy (symbol_alias_set_t *aset)
-{
- pointer_set_destroy (aset);
-}
-
-/* Test if a symbol alias set contains a given name. */
-
-int
-symbol_alias_set_contains (const symbol_alias_set_t *aset, tree t)
-{
- /* We accept either a DECL or an IDENTIFIER directly. */
- if (TREE_CODE (t) != IDENTIFIER_NODE)
- t = DECL_ASSEMBLER_NAME (t);
- t = targetm.asm_out.mangle_assembler_name (IDENTIFIER_POINTER (t));
- return pointer_set_contains (aset, t);
-}
-
-/* Enter a new name into a symbol alias set. */
-
-static int
-symbol_alias_set_insert (symbol_alias_set_t *aset, tree t)
-{
- /* We accept either a DECL or an IDENTIFIER directly. */
- if (TREE_CODE (t) != IDENTIFIER_NODE)
- t = DECL_ASSEMBLER_NAME (t);
- t = targetm.asm_out.mangle_assembler_name (IDENTIFIER_POINTER (t));
- return pointer_set_insert (aset, t);
-}
-
-/* IN_SET_P is a predicate function assuming to be taken
- alias_pair->decl, alias_pair->target and DATA arguments.
-
- Compute set of aliases by including everything where TRIVIALLY_VISIBLE
- predeicate is true and propagate across aliases such that when
- alias DECL is included, its TARGET is included too. */
-
-static symbol_alias_set_t *
-propagate_aliases_forward (bool (*in_set_p)
- (tree decl, tree target, void *data),
- void *data)
-{
- symbol_alias_set_t *set;
- unsigned i;
- alias_pair *p;
- bool changed;
-
- set = symbol_alias_set_create ();
- for (i = 0; VEC_iterate (alias_pair, alias_pairs, i, p); ++i)
- if (in_set_p (p->decl, p->target, data))
- symbol_alias_set_insert (set, p->decl);
- do
- {
- changed = false;
- for (i = 0; VEC_iterate (alias_pair, alias_pairs, i, p); ++i)
- if (symbol_alias_set_contains (set, p->decl)
- && !symbol_alias_set_insert (set, p->target))
- changed = true;
- }
- while (changed);
-
- return set;
-}
-
-/* Like propagate_aliases_forward but do backward propagation. */
-
-symbol_alias_set_t *
-propagate_aliases_backward (bool (*in_set_p)
- (tree decl, tree target, void *data),
- void *data)
-{
- symbol_alias_set_t *set;
- unsigned i;
- alias_pair *p;
- bool changed;
-
- /* We have to compute the set of set nodes including aliases
- themselves. */
- set = symbol_alias_set_create ();
- for (i = 0; VEC_iterate (alias_pair, alias_pairs, i, p); ++i)
- if (in_set_p (p->decl, p->target, data))
- symbol_alias_set_insert (set, p->target);
- do
- {
- changed = false;
- for (i = 0; VEC_iterate (alias_pair, alias_pairs, i, p); ++i)
- if (symbol_alias_set_contains (set, p->target)
- && !symbol_alias_set_insert (set, p->decl))
- changed = true;
- }
- while (changed);
-
- return set;
-}
-/* See if the alias is trivially visible. This means
- 1) alias is expoerted from the unit or
- 2) alias is used in the code.
- We assume that unused cgraph/varpool nodes has been
- removed.
- Used as callback for propagate_aliases. */
-
-static bool
-trivially_visible_alias (tree decl, tree target ATTRIBUTE_UNUSED,
- void *data ATTRIBUTE_UNUSED)
-{
- struct cgraph_node *fnode = NULL;
- struct varpool_node *vnode = NULL;
-
- if (!TREE_PUBLIC (decl))
- {
- if (TREE_CODE (decl) == FUNCTION_DECL)
- fnode = cgraph_get_node (decl);
- else
- vnode = varpool_get_node (decl);
- return vnode || fnode;
- }
- else
- return true;
-}
-
-/* See if the target of alias is defined in this unit.
- Used as callback for propagate_aliases. */
-
-static bool
-trivially_defined_alias (tree decl ATTRIBUTE_UNUSED,
- tree target,
- void *data ATTRIBUTE_UNUSED)
-{
- struct cgraph_node *fnode = NULL;
- struct varpool_node *vnode = NULL;
-
- fnode = cgraph_node_for_asm (target);
- vnode = (fnode == NULL) ? varpool_node_for_asm (target) : NULL;
- return (fnode && fnode->analyzed) || (vnode && vnode->finalized);
-}
-
-/* Remove the alias pairing for functions that are no longer in the call
- graph. */
-
-void
-remove_unreachable_alias_pairs (void)
-{
- symbol_alias_set_t *visible;
- unsigned i;
- alias_pair *p;
-
- if (alias_pairs == NULL)
- return;
-
- /* We have to compute the set of visible nodes including aliases
- themselves. */
- visible = propagate_aliases_forward (trivially_visible_alias, NULL);
-
- for (i = 0; VEC_iterate (alias_pair, alias_pairs, i, p); )
- {
- if (!DECL_EXTERNAL (p->decl)
- && !symbol_alias_set_contains (visible, p->decl))
- {
- VEC_unordered_remove (alias_pair, alias_pairs, i);
- continue;
- }
-
- i++;
- }
-
- symbol_alias_set_destroy (visible);
-}
-
-
-/* First pass of completing pending aliases. Make sure that cgraph knows
- which symbols will be required. */
-
-void
-finish_aliases_1 (void)
-{
- symbol_alias_set_t *defined;
- unsigned i;
- alias_pair *p;
-
- if (alias_pairs == NULL)
- return;
-
- /* We have to compute the set of defined nodes including aliases
- themselves. */
- defined = propagate_aliases_backward (trivially_defined_alias, NULL);
-
- FOR_EACH_VEC_ELT (alias_pair, alias_pairs, i, p)
- {
- tree target_decl;
-
- target_decl = find_decl (p->target);
- if (target_decl == NULL)
- {
- if (symbol_alias_set_contains (defined, p->target))
- continue;
-
- if (! (p->emitted_diags & ALIAS_DIAG_TO_UNDEF)
- && ! lookup_attribute ("weakref", DECL_ATTRIBUTES (p->decl)))
- {
- error ("%q+D aliased to undefined symbol %qE",
- p->decl, p->target);
- p->emitted_diags |= ALIAS_DIAG_TO_UNDEF;
- }
- }
- else if (! (p->emitted_diags & ALIAS_DIAG_TO_EXTERN)
- && DECL_EXTERNAL (target_decl)
- /* We use local aliases for C++ thunks to force the tailcall
- to bind locally. This is a hack - to keep it working do
- the following (which is not strictly correct). */
- && (! TREE_CODE (target_decl) == FUNCTION_DECL
- || ! DECL_VIRTUAL_P (target_decl))
- && ! lookup_attribute ("weakref", DECL_ATTRIBUTES (p->decl)))
- {
- error ("%q+D aliased to external symbol %qE",
- p->decl, p->target);
- p->emitted_diags |= ALIAS_DIAG_TO_EXTERN;
- }
- }
-
- symbol_alias_set_destroy (defined);
-}
-
-/* Second pass of completing pending aliases. Emit the actual assembly.
- This happens at the end of compilation and thus it is assured that the
- target symbol has been emitted. */
-
-void
-finish_aliases_2 (void)
-{
- unsigned i;
- alias_pair *p;
-
- FOR_EACH_VEC_ELT (alias_pair, alias_pairs, i, p)
- do_assemble_alias (p->decl, p->target);
-
- VEC_truncate (alias_pair, alias_pairs, 0);
-}
-
/* Emit an assembler directive to make the symbol for DECL an alias to
the symbol for TARGET. */
@@ -5848,14 +5599,14 @@ assemble_alias (tree decl, tree target)
target_decl = find_decl (target);
else
target_decl= NULL;
- if (target_decl && TREE_ASM_WRITTEN (target_decl))
+ if ((target_decl && TREE_ASM_WRITTEN (target_decl))
+ || cgraph_state >= CGRAPH_STATE_EXPANSION)
do_assemble_alias (decl, target);
else
{
alias_pair *p = VEC_safe_push (alias_pair, gc, alias_pairs, NULL);
p->decl = decl;
p->target = target;
- p->emitted_diags = ALIAS_DIAG_NONE;
}
}
diff --git a/gcc/varpool.c b/gcc/varpool.c
index ceb16f9bbca..b0063c16328 100644
--- a/gcc/varpool.c
+++ b/gcc/varpool.c
@@ -259,7 +259,7 @@ varpool_analyze_node (struct varpool_node *node)
node->analyzed = true;
}
-/* Assemble thunks and aliases asociated to NODE. */
+/* Assemble thunks and aliases associated to NODE. */
static void
assemble_aliases (struct varpool_node *node)
@@ -270,7 +270,7 @@ assemble_aliases (struct varpool_node *node)
if (ref->use == IPA_REF_ALIAS)
{
struct varpool_node *alias = ipa_ref_referring_varpool_node (ref);
- assemble_alias (alias->symbol.decl,
+ do_assemble_alias (alias->symbol.decl,
DECL_ASSEMBLER_NAME (alias->alias_of));
assemble_aliases (alias);
}
@@ -349,7 +349,6 @@ varpool_remove_unreferenced_decls (void)
if (cgraph_dump_file)
fprintf (cgraph_dump_file, "Trivially needed variables:");
- finish_aliases_1 ();
FOR_EACH_DEFINED_VARIABLE (node)
{
if (node->analyzed
@@ -450,7 +449,7 @@ add_new_static_var (tree type)
tree new_decl;
struct varpool_node *new_node;
- new_decl = create_tmp_var (type, NULL);
+ new_decl = create_tmp_var_raw (type, NULL);
DECL_NAME (new_decl) = create_tmp_var_name (NULL);
TREE_READONLY (new_decl) = 0;
TREE_STATIC (new_decl) = 1;
@@ -458,9 +457,7 @@ add_new_static_var (tree type)
DECL_CONTEXT (new_decl) = NULL_TREE;
DECL_ABSTRACT (new_decl) = 0;
lang_hooks.dup_lang_specific_decl (new_decl);
- create_var_ann (new_decl);
new_node = varpool_node (new_decl);
- add_referenced_var (new_decl);
varpool_finalize_decl (new_decl);
return new_node->symbol.decl;
@@ -511,7 +508,7 @@ varpool_extra_name_alias (tree alias, tree decl)
return alias_node;
}
-/* Call calback on NODE and aliases asociated to NODE.
+/* Call calback on NODE and aliases associated to NODE.
When INCLUDE_OVERWRITABLE is false, overwritable aliases and thunks are
skipped. */